fix: disable flute in rain state (except glitched modes)

fix(msu): GTBK music in DR
This commit is contained in:
Randall Rupper
2023-11-15 14:30:44 -07:00
parent 1290751307
commit 62356f0159
3 changed files with 24 additions and 1 deletions

View File

@@ -1300,6 +1300,9 @@ org $08D395 ; <- 45395 - ancilla_bird_travel_intro.asm : 253
JSL.l UpgradeFlute
NOP #2
;--------------------------------------------------------------------------------
org $07A408 ; LDA.l $7EF34C
JSL.l FluteCallForDuck
;--------------------------------------------------------------------------------
org $05E4D7 ; <- 2E4D7 - sprite_witch.asm : 213
JSL.l RemoveMushroom
NOP #2

View File

@@ -820,6 +820,20 @@ UpgradeFlute:
LDA.b #$03 : STA FluteEquipment ; upgrade primary inventory
RTL
;--------------------------------------------------------------------------------
; FluteCallForDuck:
;--------------------------------------------------------------------------------
; sets A to #$02 to ignore summoning the duck
FluteCallForDuck:
LDA.l WarningFlags : AND.b #$20 : BNE .vanilla ; glitched modes allowed flute in rain state
LDA.l ProgressIndicator : CMP.b #$02 : BCS .vanilla ; must rescue Zelda first
.noDuck
LDA.b #$02 : RTL
.vanilla
LDA.l FluteEquipment ; what we wrote over
RTL
;--------------------------------------------------------------------------------
;--------------------------------------------------------------------------------
; CheckKeys:

View File

@@ -271,7 +271,13 @@ CheckMusicLoadRequest:
LDA $040C
CMP.b #$08 : BNE .check_fallback ; Hyrule Castle 2
.dungeon
LDA $040C : LSR : !ADD.b #33 : STA !REG_MUSIC_CONTROL_REQUEST
LDA $040C : CMP.b #$1A : BNE +
PHA : LDA.l DRMode : BEQ ++
LDA.w BigKeyField : AND.b #$04 : BEQ ++
; if door rando and entering GT with BK
PLA : LDA.b #59 : BRA .check_fallback-3
++ PLA
+ LSR : !ADD.b #33 : STA !REG_MUSIC_CONTROL_REQUEST
.check_fallback
LDX !REG_MUSIC_CONTROL_REQUEST