From 9155d43a50a5d421c61b101bbec67e565b1be433 Mon Sep 17 00:00:00 2001 From: Kat Date: Sat, 1 Sep 2018 23:08:05 -0400 Subject: [PATCH] flute fix and crystal door lock --- entrances.asm | 5 +++++ hooks.asm | 3 ++- tables.asm | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/entrances.asm b/entrances.asm index 76e7ecc..8974abb 100644 --- a/entrances.asm +++ b/entrances.asm @@ -9,7 +9,12 @@ LockAgahnimDoors: LDA.w #$0000 : RTL + : CMP.w #$0001 : BNE + JSR.w OldLockAgahnimDoors : RTL + + : CMP.w #$0002 : BNE + + LDA $7EF37A : AND.w #$007F : CMP.w #$007F : BEQ .unlock + LDA.w #$0001 + RTL + + .unlock LDA.w #$0000 ; fallback to never locked RTL ;-------------------------------------------------------------------------------- diff --git a/hooks.asm b/hooks.asm index 0ee034e..de009af 100644 --- a/hooks.asm +++ b/hooks.asm @@ -1917,7 +1917,8 @@ JSL.l OnEnterWater : NOP org $0AB8E5 ; <- 538E5 JSL.l FloodGateAndMasterSwordFollowerReset JSL.l IncrementFlute -NOP #32 +STZ $1000 : STZ $1001 +NOP #26 ;-------------------------------------------------------------------------------- org $02AA87 ; <- 12A87 JSL.l OnOWTransition diff --git a/tables.asm b/tables.asm index f5d22a1..8aa2ea1 100644 --- a/tables.asm +++ b/tables.asm @@ -747,7 +747,7 @@ db #$08 ; #$08 = 1 Heart (default) - #$02 = 1/4 Heart ;================================================================================ org $308169 ; PC 0x180169 AgahnimDoorStyle: -db #$01 ; #00 = Never Locked - #$01 = Locked During Escape (default) +db #$02 ; #00 = Never Locked - #$01 = Locked During Escape (default) - #$02 = Locked Without 7 Crystals ;================================================================================ org $30816A ; PC 0x18016A FreeItemText: