From 60eafcaf460560d829d49f459c337ebb0a5a7cd6 Mon Sep 17 00:00:00 2001 From: Kevin Cathcart Date: Sat, 10 Feb 2018 22:05:44 -0500 Subject: [PATCH] Fix the dark world Restore fake world fix to previous position Change how the FixBunnyOnExitToLightworld Code works, and where it is called from --- bugfixes.asm | 8 ++++---- hooks.asm | 3 --- inventory.asm | 2 ++ 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/bugfixes.asm b/bugfixes.asm index 584190d..e088ef3 100644 --- a/bugfixes.asm +++ b/bugfixes.asm @@ -66,12 +66,12 @@ RTL ;-------------------------------------------------------------------------------- FixBunnyOnExitToLightWorld: - JSL.l FakeWorldFix LDA.w $02E0 : BEQ + - JMP.w DecideIfBunny + JSL.l DecideIfBunny : BEQ + + STZ $5D ; set player mode to Normal + STZ $02E0 : STZ $56 ; return player graphics to normal + - LDA $7EF357; thing we overwrote -RTL +RTS ;-------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------- diff --git a/hooks.asm b/hooks.asm index 78b90c2..dc1d12e 100644 --- a/hooks.asm +++ b/hooks.asm @@ -1108,9 +1108,6 @@ JSL.l LoadModifiedTileBufferAddress : NOP #2 org $078F32 ; <- 38F32 - Bank07.asm:2420 - (LDA $7EF357) JSL.l DecideIfBunny ; for bunny beams ;-------------------------------------------------------------------------------- -org $028468 ; <- 10468 Bank02.asm:911 - (LDA $7EF357) -JSL.l FixBunnyOnExitToLightWorld ; for cross-world connections -;-------------------------------------------------------------------------------- ;================================================================================ ; Other bunny Fixes diff --git a/inventory.asm b/inventory.asm index 60abf0e..d01c83e 100644 --- a/inventory.asm +++ b/inventory.asm @@ -830,6 +830,8 @@ RTL ;-------------------------------------------------------------------------------- ClearOWKeys: PHA + JSL.l FakeWorldFix + JSR.w FixBunnyOnExitToLightWorld LDA.l GenericKeys : BEQ + PLA : LDA $7EF38B : STA $7EF36F RTL