Fixes for DW Aga 1 / LW Aga 2

This commit is contained in:
Wulfy
2017-06-06 02:17:19 -04:00
parent 9e1ef274ce
commit bd473670d0
3 changed files with 43 additions and 6 deletions

View File

@@ -1,6 +1,33 @@
;================================================================================
; Glitched Mode Fixes
;================================================================================
GetAgahnimPalette:
LDA $A0 ; get room id
CMP.b #13 : BNE + ; Agahnim 2 room
LDA.b #$07 ; Use Agahnim 2
RTL
+ ; Elsewhere
LDA.b #$0b ; Use Agahnim 1
RTL
;--------------------------------------------------------------------------------
GetAgahnimDeath:
STA $0BA0, X ; thing we wrote over
LDA $A0 ; get room id
CMP.b #13 : BNE + ; Agahnim 2 room
LDA.l Bugfix_SetWorldOnAgahnimDeath : BEQ ++
LDA.b #$40 : STA !DARK_WORLD ; Switch to dark world
++
LDA.b #$01 ; Use Agahnim 2
RTL
+ ; Elsewhere
LDA.l Bugfix_SetWorldOnAgahnimDeath : BEQ ++
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)
++
LDA.b #$00 ; Use Agahnim 1
RTL
;--------------------------------------------------------------------------------
GetAgahnimType:
LDA $A0 ; get room id
CMP.b #13 : BNE + ; Agahnim 2 room
@@ -11,15 +38,15 @@ GetAgahnimType:
.done
RTL
;--------------------------------------------------------------------------------
GetAgahnimPalette:
PHX
GetAgahnimSlot:
PHX ; thing we wrote over
LDA $A0 ; get room id
CMP.b #13 : BNE + ; Agahnim 2 room
LDA.b #$01 ; Use Agahnim 2
JML.l GetAgahnimPaletteReturn
JML.l GetAgahnimSlotReturn
+ ; Elsewhere
LDA.b #$00 ; Use Agahnim 1
JML.l GetAgahnimPaletteReturn
JML.l GetAgahnimSlotReturn
;--------------------------------------------------------------------------------
GetAgahnimLightning:
INC $0E30, X ; thing we wrote over