1
0
Fork 0

Fix InstantRestart to v0.2.0: fource resetting coin count

This commit is contained in:
sup39 2022-04-28 04:40:00 +09:00
parent df4177ce5f
commit b65a11b611

View file

@ -4,20 +4,29 @@
.set aBL, 1160 + updateGameMode__12TMarDirectorFv .set aBL, 1160 + updateGameMode__12TMarDirectorFv
.L_C2: .L_C2:
# check input
lis r3, aInput@ha lis r3, aInput@ha
lhz r5, aInput@l(r3) lhz r5, aInput@l(r3)
cmplwi r5, 0x801 cmplwi r5, 0x801
bne+ .L_done bne+ .L_done
# reset QFT
lis r3, 0x817F lis r3, 0x817F
li r5, 0x1 li r5, 0x1
stb r5, 0xB3(r3) stb r5, 0xB3(r3)
stb r5, 0x100(r3) stb r5, 0x100(r3)
# set next area
lis r3, aArea@ha lis r3, aArea@ha
lwzu r5, aArea@l(r3) lwzu r5, aArea@l(r3)
stw r5, 4(r3) stw r5, 4(r3)
# set curArea to 0x40 to force reset coin counter
li r5, 0x40
stw r5, 0(r3)
# b moveStage
lis r3, aBL@h lis r3, aBL@h
ori r3, r3, aBL@l ori r3, r3, aBL@l
mtlr r3 mtlr r3
blr blr
# original instruction
.L_done: .L_done:
cmpwi r0, 0x2 cmpwi r0, 0x2