factor out Ep3 USA check in patches

This commit is contained in:
Martin Michelsen
2023-02-17 21:48:10 -08:00
parent bebb69649c
commit d5773b93da
3 changed files with 10 additions and 17 deletions
+2 -9
View File
@@ -22,6 +22,8 @@ start:
# But we leave it in to be consistent with patches for Episodes 1&2.
.include InitClearCaches
.include Episode3USAOnly
stwu [r1 - 0x20], r1
mflr r0
stw [r1 + 0x24], r0
@@ -29,15 +31,6 @@ start:
stw [r1 + 0x0C], r30
stw [r1 + 0x08], r29
# First, make sure this is actually Episode 3 USA; if not, do nothing
lis r4, 0x4750
ori r4, r4, 0x5345 # 'GPSE'
lis r5, 0x8000
lwz r5, [r5]
li r3, -1
cmp r4, r5
bne skip_all
# Write a short hook that updates our editors table when TEditor_destroy() is
# called
bl get_TEditor_destroy_hook_addr
+1 -8
View File
@@ -15,14 +15,7 @@ start:
# But we leave it in to be consistent with patches for Episodes 1&2.
.include InitClearCaches
# First, make sure this is actually Episode 3 USA; if not, do nothing
lis r4, 0x4750
ori r4, r4, 0x5345 # 'GPSE'
lis r5, 0x8000
lwz r5, [r5]
li r3, -1
cmp r4, r5
bnelr
.include Episode3USAOnly
# Call seq_var_set(7000) - this gives the local player a VIP card
li r3, 7000
+7
View File
@@ -0,0 +1,7 @@
lis r4, 0x4750
ori r4, r4, 0x5345 # 'GPSE'
lis r5, 0x8000
lwz r5, [r5]
li r3, -1
cmp r4, r5
bnelr