diff --git a/entrances.asm b/entrances.asm index 389e53b..7b7b923 100644 --- a/entrances.asm +++ b/entrances.asm @@ -82,6 +82,11 @@ AllowStartFromSingleEntranceCave: STA $7EC14C ; Cache the overworld area number STA $7EC140 ; Cache the aux overworld area number + SEP #$20 ; set 8-bit accumulator + LDX $00 + LDA.l StartingAreaOverworldDoor, X : STA.l $7F5099 ;Load overworld door + REP #$20 ; reset 16-bit accumulator + .done PLA RTL diff --git a/sandbox.asm b/sandbox.asm index 8aa4ee6..be60461 100644 --- a/sandbox.asm +++ b/sandbox.asm @@ -175,6 +175,13 @@ org $07AA3A : db $D0 ; residual portal? org $08D40C : db $D0 ; morph poof org $308174 : db $01 ; ER's Fix fake worlds fix. Currently needed for inverted +org $1FED31 : db $0E ; pre-open open TR bomb door +org $1FED41 : db $0E ; pre-open open TR bomb door + +; Write to StartingAreaOverworldDoor table to indicate the overworld door being used for +; the single entrance spawn point +org $308247 ; PC 0x180247 +db $00, $5A, $00, $00, $00, $00, $00 ;org $02E849 ; Fly 1 to Sanctuary diff --git a/tables.asm b/tables.asm index 0aa5408..fa6860a 100644 --- a/tables.asm +++ b/tables.asm @@ -925,7 +925,14 @@ org $308240 ; PC 0x180240 StartingAreaExitOffset: db $00, $00, $00, $00, $00, $00, $00 ;-------------------------------------------------------------------------------- -; 0x180246 - 0x18024F (unused) +org $308247 ; PC 0x180247 +; For any starting areas in single entrance caves you can specify the overworld door here +; to enable drawing the doorframes These values should be the overworld door index+1. +; A value of zero uses the vanilla door frame table. +StartingAreaOverworldDoor: +db $00, $00, $00, $00, $00, $00, $00 +;-------------------------------------------------------------------------------- +; 0x18024E - 0x18024F (unused) ;------------------------------------------------------------------------------- ; $308250 (0x180250) - $30829F (0x18029F) org $308250 ; PC 0x180250