From e123c6a95fd8c865086dd0f2a8a8f7cb24201708 Mon Sep 17 00:00:00 2001 From: Kevin Cathcart Date: Sat, 22 Sep 2018 23:54:24 -0400 Subject: [PATCH] [Inverted] TR entrance fix --- entrances.asm | 8 ++++++++ inventory.asm | 2 ++ sandbox.asm | 2 ++ tables.asm | 6 +++++- 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/entrances.asm b/entrances.asm index 36d1ae2..c10cebd 100644 --- a/entrances.asm +++ b/entrances.asm @@ -183,3 +183,11 @@ PreventEnterOnBonk: LDX.w #$0102 ; rest of what we wrote over JML.l PreventEnterOnBonk_return ;-------------------------------------------------------------------------------- +TurtleRockEntranceFix: + LDA TurtleRockAutoOpenFix : BEQ .done + LDA $8A : CMP.b #$47 : BNE .done + ;If exiting to turtle rock ensure the entrance is open + LDA.l $7EF2C7 : ORA.b #$20 : STA.l $7EF2C7 +.done +RTL +;-------------------------------------------------------------------------------- diff --git a/inventory.asm b/inventory.asm index 6b1937d..98afbd7 100644 --- a/inventory.asm +++ b/inventory.asm @@ -872,6 +872,8 @@ RTL ;-------------------------------------------------------------------------------- ClearOWKeys: PHA + + JSL.l TurtleRockEntranceFix JSL.l FakeWorldFix JSR.w FixBunnyOnExitToLightWorld LDA.l GenericKeys : BEQ + diff --git a/sandbox.asm b/sandbox.asm index 07cadf7..f145579 100644 --- a/sandbox.asm +++ b/sandbox.asm @@ -180,6 +180,8 @@ org $1FED41 : db $0E ; pre-open open TR bomb door org $0ABFBB : db $90 ; Show portal on dark world map +org $308089 : db $01 ; Open TR Entrance if exiting from it + ; Write to StartingAreaOverworldDoor table to indicate the overworld door being used for ; the single entrance spawn point org $308247 ; PC 0x180247 diff --git a/tables.asm b/tables.asm index 79d412c..6a4b9cb 100644 --- a/tables.asm +++ b/tables.asm @@ -359,7 +359,11 @@ org $308087 ; PC 0x180087 IsEncrypted: dw #$0000 ; $0000 = not encrypted, $0001 = encrypted with static key, $0002 = Encrypted w/ passcode entry screen (Not implemented yet) ;-------------------------------------------------------------------------------- -; 0x180089 - 0x18008F (unused) +org $308089 ; PC 0x180089 +TurtleRockAutoOpenFix: +db #$00 ; #$00 - Normal, #$01 - Open TR Entrance if exiting from it +;-------------------------------------------------------------------------------- +; 0x18008A - 0x18008F (unused) ;-------------------------------------------------------------------------------- org $308090 ; PC 0x180090 - 0x180097 ProgressiveSwordLimit: