summaryrefslogtreecommitdiff
path: root/_inc
diff options
context:
space:
mode:
authorClownacy <Clownacy@users.noreply.github.com>2023-09-07 16:43:19 +0100
committerClownacy <Clownacy@users.noreply.github.com>2023-09-07 16:43:19 +0100
commitc497f6930d92e0a16f90fcbef473853f12d08641 (patch)
tree02dbed3333cb73457e95aa1a7c1e817ec35315f2 /_inc
parent2c2d63174b2dfd21e6de596dbd35fc1f56febec6 (diff)
Add a bugfix for the Labyrinth Zone water tunnels.
Diffstat (limited to '_inc')
-rw-r--r--_inc/LZWaterFeatures.asm8
1 files changed, 8 insertions, 0 deletions
diff --git a/_inc/LZWaterFeatures.asm b/_inc/LZWaterFeatures.asm
index 263793b..4ff6310 100644
--- a/_inc/LZWaterFeatures.asm
+++ b/_inc/LZWaterFeatures.asm
@@ -304,6 +304,10 @@ LZWindTunnels:
blo.s .chknext
cmp.w 6(a2),d2
bhs.s .chknext ; branch if Sonic is outside a range
+ if FixBugs
+ ; d0 is overwritten but later used as if it wasn't!
+ move.w d0,d1
+ endif
move.b (v_vbla_byte).w,d0
andi.b #$3F,d0 ; does VInt counter fall on 0, $40, $80 or $C0?
bne.s .skipsound ; if not, branch
@@ -316,6 +320,10 @@ LZWindTunnels:
cmpi.b #4,obRoutine(a1) ; is Sonic hurt/dying?
bhs.s .clrquit ; if yes, branch
move.b #1,(f_wtunnelmode).w
+ if FixBugs
+ ; See above.
+ move.w d1,d0
+ endif
subi.w #$80,d0
cmp.w (a2),d0
bhs.s .movesonic