From 55473a4d0117c73ddb07be5484b3edb70ad54c7b Mon Sep 17 00:00:00 2001 From: Kevin Cathcart Date: Sat, 16 Dec 2017 14:57:45 -0500 Subject: [PATCH] GT in Kakariko music fix This fixes music stopping partway up GT when the player encounters a "PsychoSoldier" (MathOnNapkin's name). Both types of this sprite sharethe same audio code. They have code to play special music if chasing link in Kakariko. That is fine in vanilla or item rando, but if they try to play this music in a dungeon located in kakariko, this will cause the music to just stop, because that song is not avaiulable in the dungeon music bank. This patch fixes this by adding an extra check to make sure we are in the overworld before playing this song. --- hooks.asm | 4 ++++ music.asm | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/hooks.asm b/hooks.asm index 3c2558b..636ded4 100644 --- a/hooks.asm +++ b/hooks.asm @@ -1950,6 +1950,10 @@ org $0282F4 ; <- Bank02.asm:654 (LDY.b #$58 ...) JML.l PreOverworld_LoadProperties_ChooseMusic org $028389 ; <- Bank02.asm:763 PreOverworld_LoadProperties_SetSong: +;-------------------------------------------------------------------------------- +org $05CC58 ; <- Bank05.asm:1307 (LDA $040A : CMP.b #$18) +JSL PsychoSolder_MusicCheck +NOP #1 ;================================================================================ ;================================================================================ diff --git a/music.asm b/music.asm index 2f3eeb5..c1d96d0 100644 --- a/music.asm +++ b/music.asm @@ -77,3 +77,13 @@ PreOverworld_LoadProperties_ChooseMusic: JML.l PreOverworld_LoadProperties_SetSong ;-------------------------------------------------------------------------------- + +;-------------------------------------------------------------------------------- +;0 = Is Kakariko Overworld +;1 = Not Kakariko Overworld +PsychoSolder_MusicCheck: + LDA $040A : CMP.b #$18 : BNE .done ; thing we overwrote - check if overworld location is Kakariko + LDA $1B ; Also check that we are outdoors + .done +RTL +;--------------------------------------------------------------------------------