User:Araxestroy: Difference between revisions

From sc2k-reverse
Jump to navigationJump to search
No edit summary
Line 1: Line 1:
Hi, I'm Troy. I started and maintain the sc2kfix plugin and project.
Hi, I'm Troy. I started and maintain the sc2kfix plugin and project.


=== Notepad ===
== Notepad ==
::''Subpages:'' [[User:Araxestroy/DOS version decompilation notes]]


[[User:Araxestroy/DOS version decompilation notes]]
=== Loading requirements ===
 
Intercept at '''int __thiscall LoadGame(void *this, int *a2, char *Src)''' -- 0x4025A4 -- and check the extension; jump to 0x4302E0 for .sc2
 
# Load everything into the structures
# Load pszCityName
# Call '''void sub_402743(void)''' -- recalculates border connections, updates power and water consumption, loads bond information, does some pollution modifiers I think?
# Call '''void sub_402EF5(void)''' -- updates dwTileCount
# Call '''void sub_401FFA(void)''' -- does ''something'' with regards to graphs, I think? Needs investigation
# Call '''void sub_430C00(void)''' if we need to "uncompress" XLAB -- should only need to be done on manually converted save files
# Return a non-zero from LoadGame intercept

Revision as of 22:18, 15 March 2025

Hi, I'm Troy. I started and maintain the sc2kfix plugin and project.

Notepad

Subpages: User:Araxestroy/DOS version decompilation notes

Loading requirements

Intercept at int __thiscall LoadGame(void *this, int *a2, char *Src) -- 0x4025A4 -- and check the extension; jump to 0x4302E0 for .sc2

  1. Load everything into the structures
  2. Load pszCityName
  3. Call void sub_402743(void) -- recalculates border connections, updates power and water consumption, loads bond information, does some pollution modifiers I think?
  4. Call void sub_402EF5(void) -- updates dwTileCount
  5. Call void sub_401FFA(void) -- does something with regards to graphs, I think? Needs investigation
  6. Call void sub_430C00(void) if we need to "uncompress" XLAB -- should only need to be done on manually converted save files
  7. Return a non-zero from LoadGame intercept