Fix Aga causing fake worlds

This commit is contained in:
Kevin Cathcart
2018-09-14 20:17:20 -04:00
parent 72f7451b6c
commit 3c852265b6

View File

@@ -15,12 +15,20 @@ GetAgahnimDeath:
LDA $A0 ; get room id
CMP.b #13 : BNE + ; Agahnim 2 room
LDA.l Bugfix_SetWorldOnAgahnimDeath : BEQ ++
LDA.l InvertedMode : BEQ +++
LDA.b #$00 : STA !DARK_WORLD ; Switch to dark world
BRA ++
+++
LDA.b #$40 : STA !DARK_WORLD ; Switch to dark world
++
LDA.b #$01 ; Use Agahnim 2
RTL
+ ; Elsewhere
LDA.l Bugfix_SetWorldOnAgahnimDeath : BEQ ++
LDA.l InvertedMode : BEQ +++
LDA.b #$40 : STA !DARK_WORLD ; Switch to dark world
BRA ++
+++
LDA.b #$00 : STA !DARK_WORLD ; Switch to light world
; (This will later get flipped to DW when Agahnim 1
; warps us to the pyramid)
@@ -80,4 +88,3 @@ AddSignToEDMBridge:
LDA.w #$0DBE ;Restore Previous Code
RTL
;--------------------------------------------------------------------------------