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 f7f558cd59
commit 79bdace3b3
3 changed files with 24 additions and 1 deletions

View File

@@ -1179,6 +1179,9 @@ JSL.l RestoreMenu_SetSubModule : NOP
org $88D395 ; <- 45395 - ancilla_bird_travel_intro.asm : 253
JSL.l UpgradeFlute : NOP #2
;--------------------------------------------------------------------------------
org $87A408 ; LDA.l $7EF34C
JSL.l FluteCallForDuck
;--------------------------------------------------------------------------------
org $85E4D7 ; <- 2E4D7 - sprite_witch.asm : 213
JSL RemoveMushroom : NOP #2
;--------------------------------------------------------------------------------

View File

@@ -462,6 +462,20 @@ UpgradeFlute:
LDA.b #$03 : STA.l 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

@@ -233,7 +233,13 @@ CheckMusicLoadRequest:
LDA.w DungeonID
CMP.b #$08 : BNE .check_fallback ; Hyrule Castle 2
.dungeon
LDA.w DungeonID : LSR : !ADD.b #33 : STA.w MusicControlRequest
LDA.w DungeonID : 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.w MusicControlRequest
.check_fallback
LDX.w MusicControlRequest