diff --git a/doortables.asm b/doortables.asm index db1b671..8ee0dd6 100644 --- a/doortables.asm +++ b/doortables.asm @@ -580,8 +580,8 @@ dw $00bc, $00a2, $00a3, $00c2, $001a, $0049, $0014, $008c ; Ice Many Pots, Swamp Waterfall, GT Gauntlet 3, Eastern Push Block, Eastern Courtyard, Eastern Map Valley ; Eastern Cannonball, HC East Hall dw $009f, $0066, $005d, $00a8, $00a9, $00aa, $00b9, $0052 -; HC West Hall, TR Dash Bridge, TR Hub, Pod Arena, GT Petting Zoo -dw $0050, $00c5, $00c6, $0009, $0003, $002a, $007d +; HC West Hall, TR Dash Bridge, TR Hub, Pod Arena, GT Petting Zoo, Ice Spike Cross +dw $0050, $00c5, $00c6, $0009, $0003, $002a, $007d, $005e dw $ffff ; dungeon tables diff --git a/hooks.asm b/hooks.asm index 939de7d..05f9411 100755 --- a/hooks.asm +++ b/hooks.asm @@ -1668,6 +1668,17 @@ dw !REG_MUSIC_CONTROL org $0CF05F dw !REG_MUSIC_CONTROL + +; Conditionally disable UW music changes in Door Rando +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 : + + +org $02C3F2 ; <- Bank02.asm:10521 Unused call +Underworld_DoorDown_Call: +org $02C3F3 +dw $8AD9 ; address of Bank02.asm:2085 ;-------------------------------------------------------------------------------- ;================================================================================ diff --git a/music.asm b/music.asm index 153a081..8a4e4e1 100644 --- a/music.asm +++ b/music.asm @@ -52,7 +52,8 @@ PreOverworld_LoadProperties_ChooseMusic: .endOfLightWorldChecks ; if we are in the light world go ahead and set chosen selection - LDA $7EF3CA : BEQ .checkInverted+4 + ;LDA $7EF3CA : BEQ .checkInverted+4 + JSL OWWorldCheck : BEQ .checkInverted+4 LDX.b #$0F ; dark woods theme @@ -68,7 +69,7 @@ PreOverworld_LoadProperties_ChooseMusic: ; if not inverted and light world, or inverted and dark world, skip moon pearl check .checkInverted - LDA $7EF3CA : CLC : ROL #$03 : CMP InvertedMode : BEQ .lastCheck + JSL OWWorldCheck : CLC : ROL #$03 : CMP InvertedMode : BEQ .lastCheck ; Does Link have a moon pearl? LDA $7EF357 : BNE + @@ -285,3 +286,21 @@ Overworld_MosaicDarkWorldChecks: .done RTL ;-------------------------------------------------------------------------------- + +;-------------------------------------------------------------------------------- +; This is the where the music can change due to an UW transition +; +; On entry, A=16bit XY=8bit, A & X safe to mod, Y unknown +Underworld_DoorDown_Entry: + LDA.l DRMode : TAX : LDA $A0 : CPX #0 : BNE .done + +.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 +;-------------------------------------------------------------------------------- diff --git a/normal.asm b/normal.asm index a8ab959..aabb24d 100644 --- a/normal.asm +++ b/normal.asm @@ -398,7 +398,7 @@ StraightStairsTrapDoor: .animateTraps lda #$05 : sta $11 inc $0468 : stz $068e : stz $0690 - ++ rtl + ++ JSL Underworld_DoorDown_Call : rtl + JML Dungeon_ApproachFixedColor ; what we wrote over } diff --git a/owrando.asm b/owrando.asm index 0edfdf7..b3f9af8 100644 --- a/owrando.asm +++ b/owrando.asm @@ -31,6 +31,10 @@ db #$b0 ; BCS to replace BEQ org $06907f ; < 3107f - sprite_prep.asm:2170 (LDA $7EF3CA) lda $8a : and.b #$40 +; Dark Bonk Rocks Rain Sequence Guards (allowing Tile Swap on Dark Bonk Rocks) +;org $09c957 ; <- 4c957 +;dw #$cb5f ; matches value on Central Bonk Rocks screen + ;(replacing -> LDA $8A : AND.b #$40) org $00d8c4 ; < ? - Bank00.asm:4068 () jsl.l OWWorldCheck diff --git a/tables.asm b/tables.asm index b0f8c79..1d90dd7 100644 --- a/tables.asm +++ b/tables.asm @@ -848,7 +848,7 @@ db #$08 ; #$08 = 1 Heart (default) - #$02 = 1/4 Heart ;================================================================================ org $308169 ; PC 0x180169 AgahnimDoorStyle: -db #$02 ; #00 = Never Locked - #$01 = Locked During Escape (default) - #$02 = Locked Without 7 Crystals +db #$01 ; #00 = Never Locked - #$01 = Locked During Escape (default) - #$02 = Locked Without 7 Crystals ;================================================================================ org $30816A ; PC 0x18016A FreeItemText: