From 6d72a1a9c2ca02033247b52b222813fe0b00c087 Mon Sep 17 00:00:00 2001 From: cassidoxa Date: Wed, 12 Jan 2022 20:31:27 -0500 Subject: [PATCH 1/2] Fix reading starting area offset to prevent indexing out of bounds --- entrances.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrances.asm b/entrances.asm index 35db47e..9d6f59b 100644 --- a/entrances.asm +++ b/entrances.asm @@ -80,8 +80,8 @@ AllowStartFromSingleEntranceCave: LDA $7EF3C8 : AND.w #$00FF ; What we wrote over PHA TAX - LDA.l StartingAreaExitOffset, X + AND.w #$00FF BNE + JMP .done From 1d378211ba67b7f2fe30c9abd07901ba27370b2f Mon Sep 17 00:00:00 2001 From: cassidoxa Date: Thu, 13 Jan 2022 15:51:50 -0500 Subject: [PATCH 2/2] Initialize overworld door frame data when starting in single-exit cave --- entrances.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entrances.asm b/entrances.asm index 9d6f59b..7f993dc 100644 --- a/entrances.asm +++ b/entrances.asm @@ -124,10 +124,10 @@ AllowStartFromSingleEntranceCave: STZ $0699 ;zero out door overlays in case starting overworld door is not set SEP #$20 ; set 8-bit accumulator - LDX $00 + LDA $7EF3C8 : TAX LDA.l StartingAreaOverworldDoor, X : STA.l $7F5099 ;Load overworld door - REP #$20 ; reset 16-bit accumulator + JSL.l CacheDoorFrameData .done PLA