Skip to content

Commit

Permalink
Move _Load_Game_Post_Load_Game hook to avoid patching conflict with V…
Browse files Browse the repository at this point in the history
…inifera
  • Loading branch information
Rampastring committed Jan 15, 2025
1 parent 9a6440c commit efeba71
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/savegame.asm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
cextern Anticheat1
cextern AntiCheatArray

@LJMP 0x005D6B92, _Load_Game_Post_Load_Game_Hook
@LJMP 0x005DC49B, _Load_Game_Post_Load_Game_Hook
@LJMP 0x005D4FF5, _Save_Game_Pre_Save_Game_Hook

_Save_Game_Pre_Save_Game_Hook:
Expand All @@ -31,11 +31,14 @@ _Load_Game_Post_Load_Game_Hook:
mov al, byte [eax+0x1D91]
mov byte [0x007E2500], al

mov ecx, MouseClass_Map
call 0x005F3E20
; mov ecx, MouseClass_Map
; call 0x005F3E20 SidebarClass::Recalc
call 0x004082D0
jmp 0x005D6B97
; call 0x004082D0 WWDebug_Printf
; jmp 0x005D6B97

mov esi, [Frame]
jmp 0x005DC4A1

; Reset auto-save timer on scenario restart
; Hooks beginning of Do_Restart function
Expand Down

0 comments on commit efeba71

Please sign in to comment.