Mirror scroll spawns in Zelda's cell instead of last entrance (mirror remains unchanged)

Tapestry is open when spawning in the throne room.
This commit is contained in:
aerinon
2022-06-14 12:36:04 -06:00
parent 9779f91ce9
commit 2579038832
3 changed files with 22 additions and 1 deletions

View File

@@ -518,6 +518,9 @@ Dungeon_SaveRoomData_justKeys:
org $02B861
Dungeon_SaveRoomQuadrantData:
org $02D9B9
Underworld_LoadSpawnEntrance:
org $02FD8A ; 17D8A - Bank0E.asm: 3732 Note: Different bank
LoadGearPalettes_bunny:

View File

@@ -2439,6 +2439,9 @@ NOP #6 ; remove check
org $068841 ; <- 30841 - sprite_prep.asm:269 (LDA $0D00, X : ADD.b #$03 : STA $0D00, X)
JSL.l Mantle_CorrectPosition : NOP #2
;--------------------------------------------------------------------------------
org $02D6FC ; <- bank02 : Underworld_LoadEntrance.not_a_respawn (LDA.w $010E : AND.w #$00FF)
JSL MirrorScrollSpawnZelda : NOP #2
;--------------------------------------------------------------------------------
org $0DFA53 ; <- 6FA53 - hud check for lantern
JSL.l LampCheck
;--------------------------------------------------------------------------------

View File

@@ -2,7 +2,9 @@
; Mantle Object Changes
;--------------------------------------------------------------------------------
Mantle_CorrectPosition:
LDA ProgressFlags : AND.b #$04 : BEQ +
LDA.l ProgressFlags : AND.b #$04 : BNE .spawnOpen
LDA.l StartingEntrance : CMP.b #$04 : BNE +
.spawnOpen
LDA.b #$0A : STA $0D10, X ; just spawn it off to the side where we know it should be
LDA.b #$03 : STA $0D30, X
LDA.b #$90 : STA $0ED0, X
@@ -10,3 +12,16 @@ Mantle_CorrectPosition:
LDA $0D00, X : !ADD.b #$03 ; thing we did originally
RTL
;--------------------------------------------------------------------------------
MirrorScrollSpawnZelda:
SEP #$20
LDA.l StartingEntrance : CMP.b #$02 : BNE +
LDA.l MirrorEquipment : CMP.b #$01 : BNE +
REP #$20
PLA ; remove JSL 16 bits
PEA.w Underworld_LoadSpawnEntrance-1
RTL
+ REP #$20
; what we replaced
LDA.w $010E : AND.w #$00FF
RTL