F2 Energy/Scrap Popup Texts

Other Projects; support/discussion/questions

Moderator: thunderchero

Post Reply
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2404
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

F2 Energy/Scrap Popup Texts

Post by Tethys »

So I found some locations that deal directly with these 2 locations, I was trying to figure out a way to push the values from the scrap screen to the main energy popup text to give a more accurate indicator of secondary main structures in the energy screen. There are 2 mines active and you can see the total bonus in the scrap screen, where you only see the building bonus in the Energy popup text. But I think this might be a little different because of the energy screen patch applied?
smallish_project.png
smallish_project.png (93.28 KiB) Viewed 3423 times
4FA428 | Scrap screen display
4D5B2B | Energy screen popup display

Both using esp but using different locator (130h vs 1C0h) and variable in stack. Could I simply redirect the calls to c2_edifbnft with c4_edifbnft calls to switch all energy screen popup texts to reading the ones from the scrap screen, even though the esp is a different size? I think it was just 2 calls in the OBs_ subroutine. I am also worried about the registers being different (first four push commands beginning of each sub). Its not a priority project, something on the back burner that's sort of a new thing since I have removed the build limit for Y-class deuterium mines.

Edit: I see the problem. The function is unsupported for energy screen because there are no integer loading and storing of the actual variables. And the stack register is different so I'd need to recalculate some things if I wanted this. I might get around to it in the future though.
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3258
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: F2 Energy/Scrap Popup Texts

Post by Flocke »

Tethys wrote: Thu Oct 19, 2023 12:31 pm Edit: I see the problem. The function is unsupported for energy screen because there are no integer loading and storing of the actual variables. And the stack register is different so I'd need to recalculate some things if I wanted this. I might get around to it in the future though.
Nice idea, but you'll either have to write a new routine or cleverly combine those two by overlapping separate UI elemets. Without checking the asm code, I'd still expect alot code changes needed and a possible rewrite.

My attempt rather would be to write a new UI renderer. :twisted:
Post Reply

Return to “Other Projects”