From 4706b31d82e06b80fd184f15caa2525f2e5c498c Mon Sep 17 00:00:00 2001 From: Kevin Cathcart Date: Fri, 28 Sep 2018 20:51:17 -0400 Subject: [PATCH] Fix oddity if portal activates during an animated entrance --- entrances.asm | 14 ++++++++++++++ hooks.asm | 11 +++++++++++ 2 files changed, 25 insertions(+) diff --git a/entrances.asm b/entrances.asm index 3519551..ca1cb5d 100644 --- a/entrances.asm +++ b/entrances.asm @@ -194,3 +194,17 @@ TurtleRockEntranceFix: .done RTL ;-------------------------------------------------------------------------------- +AnimatedEntranceFix: ;when an entrance animation tries to start + PHA + LDA.l InvertedMode : BEQ + ;If we are in inverted mode + LDA $8A : AND.b #$40 : BNE + ;and in the light world + PLA + STZ $04C6 ; skip it. + LDA #$00 + RTL + + + PLA + STA $02E4 ;what we wrote over + STA $0FC1 ;what we wrote over + STA $0710 ;what we wrote over +RTL diff --git a/hooks.asm b/hooks.asm index 28af0e8..9760c17 100755 --- a/hooks.asm +++ b/hooks.asm @@ -1099,6 +1099,17 @@ org $08B708 ; <- 43708 - ancilla_quake_spell.asm : 83 _ancilla_quake_spell_83: ;-------------------------------------------------------------------------------- +;================================================================================ +; Animated Entrances +;-------------------------------------------------------------------------------- +org $1BCAC4 ; <- Bank1B.asm : 1537 (STA $02E4 ; Link can't move.) +JSL AnimatedEntranceFix +BNE + + RTL + NOP #2 ++ +;-------------------------------------------------------------------------------- + ;================================================================================ ; Big & Great Fairies ;--------------------------------------------------------------------------------