Merged in DR v1.4.1.6

This commit is contained in:
codemann8
2024-02-23 10:57:24 -06:00
235 changed files with 30100 additions and 17937 deletions

View File

@@ -2,7 +2,7 @@
; Glitched Mode Fixes
;================================================================================
GetAgahnimPalette:
LDA $A0 ; get room id
LDA.b RoomIndex ; get room id
CMP.b #13 : BNE + ; Agahnim 2 room
LDA.b #$07 ; Use Agahnim 2
RTL
@@ -11,25 +11,25 @@ GetAgahnimPalette:
RTL
;--------------------------------------------------------------------------------
GetAgahnimDeath:
STA $0BA0, X ; thing we wrote over
LDA $A0 ; get room id
STA.w SpriteAncillaInteract, X ; thing we wrote over
LDA.b RoomIndex ; get room id
CMP.b #13 : BNE + ; Agahnim 2 room
LDA.l Bugfix_SetWorldOnAgahnimDeath : BEQ ++
LDA.l InvertedMode : BEQ +++
LDA.b #$00 : STA CurrentWorld ; Switch to light world
LDA.b #$00 : STA.l CurrentWorld ; Switch to light world
BRA ++
+++
LDA.b #$40 : STA CurrentWorld ; Switch to dark world
LDA.b #$40 : STA.l CurrentWorld ; 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 CurrentWorld ; Switch to dark world
LDA.b #$40 : STA.l CurrentWorld ; Switch to dark world
BRA ++
+++
LDA.b #$00 : STA CurrentWorld ; Switch to light world
LDA.b #$00 : STA.l CurrentWorld ; Switch to light world
; (This will later get flipped to DW when Agahnim 1
; warps us to the pyramid)
++
@@ -37,7 +37,7 @@ GetAgahnimDeath:
RTL
;--------------------------------------------------------------------------------
GetAgahnimType:
LDA $A0 ; get room id
LDA.b RoomIndex ; get room id
CMP.b #13 : BNE + ; Agahnim 2 room
LDA.b #$0006 ; Use Agahnim 2
BRA .done
@@ -48,17 +48,17 @@ RTL
;--------------------------------------------------------------------------------
GetAgahnimSlot:
PHX ; thing we wrote over
LDA $A0 ; get room id
LDA.b RoomIndex ; get room id
CMP.b #13 : BNE + ; Agahnim 2 room
LDA.b #$01 ; Use Agahnim 2
JML.l GetAgahnimSlotReturn
JML GetAgahnimSlotReturn
+ ; Elsewhere
LDA.b #$00 ; Use Agahnim 1
JML.l GetAgahnimSlotReturn
JML GetAgahnimSlotReturn
;--------------------------------------------------------------------------------
GetAgahnimLightning:
INC $0E30, X ; thing we wrote over
LDA $A0 ; get room id
INC.w SpriteAux, X ; thing we wrote over
LDA.b RoomIndex ; get room id
CMP.b #13 : BNE + ; Agahnim 2 room
LDA.b #$01 ; Use Agahnim 2
RTL
@@ -69,11 +69,11 @@ GetAgahnimLightning:
;0 = Allow
;1 = Forbid
AllowJoypadInput:
LDA PermitSQFromBosses : BEQ .fullCheck
LDA $0403 : AND.b #$80 : BEQ .fullCheck
LDA $0112 : ORA $02E4 ; we have heart container, do short check
LDA.l PermitSQFromBosses : BEQ .fullCheck
LDA.w RoomItemsTaken : AND.b #$80 : BEQ .fullCheck
LDA.w MedallionFlag : ORA.w CutsceneFlag ; we have heart container, do short check
RTL
.fullCheck
LDA $0112 : ORA $02E4 : ORA $0FFC
LDA.w MedallionFlag : ORA.w CutsceneFlag : ORA.w NoMenu
RTL
;--------------------------------------------------------------------------------