fix xbox rare alert patch

This commit is contained in:
Martin Michelsen
2024-05-22 22:13:47 -07:00
parent 340a36878b
commit 8421ab16d5
7 changed files with 56 additions and 49 deletions
@@ -51,28 +51,29 @@ sound1_start:
pop edi # From original function
pop esi # From original function
add esp, 0xC # From original function
test eax, eax
je fail # Item does not exist (was on a different floor)
cmp byte [eax + 0xEF], 0x4
je do_sound
je +0x503 # sound2_start
fail:
ret
do_sound:
xor ecx, ecx
push ecx
jmp +0x502 # sound2_start
sound1_end:
.data 0x00188A72
.deltaof sound2_start, sound2_end
sound2_start:
xor ecx, ecx
push ecx
push ecx
push ecx
push 0x0000055E
call +0x162742 # 002EB1C0 => play_sound(0x55E, nullptr, 0, 0);
jmp +0x31 # sound3_start
jmp +0x33 # sound3_start
sound2_end:
.data 0x00188AB1
.deltaof sound3_start, sound3_end
sound3_start:
call +0x16270A # 002EB1C0 => play_sound(0x55E, nullptr, 0, 0);
add esp, 0x10
ret
sound3_end: