Fix issue with LH/BS half volume issue when exiting to Kakariko

This commit is contained in:
codemann8
2025-08-19 10:08:00 -05:00
parent 6566aa6d48
commit 4c5adfbee2
2 changed files with 13 additions and 0 deletions

View File

@@ -2282,6 +2282,9 @@ JSL Overworld_DetermineAndSetMusic : NOP
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
org $9DFD27 org $9DFD27
JSL Overworld_DetermineAndSetMusic : NOP JSL Overworld_DetermineAndSetMusic : NOP
;--------------------------------------------------------------------------------
org $829253
JSL FixHalfVolumeOnSpawnExitToOverworld : NOP
;================================================================================ ;================================================================================
;================================================================================ ;================================================================================

View File

@@ -229,3 +229,13 @@ FallingMusicFadeOut:
.return .return
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
FixHalfVolumeOnSpawnExitToOverworld:
BEQ .exit : STA.w MusicControlRequest ; what we wrote over
LDA.w DungeonID : BNE .exit
LDA.b LinkPosY+1 : ROR : LDA.b LinkPosY : ROR
CMP.b #$DC : BCS .exit ; check if link loading in room from a spawn
; set queue to half volume to trigger full volume on exit
LDA.b #$F2 : STA.w MusicControlQueue
.exit
RTL
;--------------------------------------------------------------------------------