Suppressed awkward/abrupt music changes in dungeons when DR is enabled

This commit is contained in:
codemann8
2021-07-12 19:22:57 -05:00
parent 9209153643
commit dc2a468acb
2 changed files with 11 additions and 5 deletions

View File

@@ -1673,8 +1673,10 @@ org $0CF05F
dw !REG_MUSIC_CONTROL
; Conditionally disable UW music changes in Door Rando
org $028ADB ; <- Bank02.asm:2088 (LDX.b #$14 : LDA $A0)
JSL.l Underworld_DoorDown_Entry
org $028ADB ; <- Bank02.asm:2088-2095 (LDX.b #$14 : LDA $A0 ...)
JSL.l Underworld_DoorDown_Entry : CPX #$10
db $B0, $21 ; BCS $028B04
BRA + : NOP #6 : +
;--------------------------------------------------------------------------------
;================================================================================

View File

@@ -292,10 +292,14 @@ Overworld_MosaicDarkWorldChecks:
;
; On entry, A=16bit XY=8bit, A & X safe to mod, Y unknown
Underworld_DoorDown_Entry:
LDA.l DRMode : TAX : LDA.w #0 : CPX #0 : BNE .done
LDA.l DRMode : TAX : LDA $A0 : CPX #0 : BNE .done
.vanilla
LDX #$14 : LDA $A0 ; thing we wrote over - prepare Sanc music track, load current room ID
.vanilla ; thing we wrote over
LDX #$14 ;: LDA $A0
CMP.w #$0012 : BEQ .done
LDX.b #$10 ; value for Hyrule Castle music
CMP.w #$0002 : BEQ .done
.done
RTL