From 3e9f598fe16cb6ce42c600e3467c3b66a55aa2e8 Mon Sep 17 00:00:00 2001 From: codemann8 Date: Sat, 15 Jan 2022 04:07:27 -0600 Subject: [PATCH] Added flute SFX to itemget if collecting a pre-activated flute --- hooks.asm | 5 +++++ inventory.asm | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/hooks.asm b/hooks.asm index 9d70fb0..9b68d7c 100755 --- a/hooks.asm +++ b/hooks.asm @@ -1021,6 +1021,11 @@ NOP org $07B57D ; 3B57D - Bank07.asm:8527 (LDA Link_ReceiveItemAlternates, Y : STA $03) JSL.l Link_ReceiveItemAlternatesExpanded_loadAlternate NOP + +org $08C563 +JML ItemGetAlternateSFX : NOP +org $0988A5 +JSL ItemGetOverworldAlternateSFX : NOP #5 ;-------------------------------------------------------------------------------- org $09892E ; 4892E - ancilla_init.asm:1307 (LDA BottleList, X) LDA.w BottleListExpanded, X diff --git a/inventory.asm b/inventory.asm index 5e0e918..4966ae8 100644 --- a/inventory.asm +++ b/inventory.asm @@ -1216,3 +1216,21 @@ RTL } ;-------------------------------------------------------------------------------- +; A = item id being collected +ItemGetAlternateSFX: +PEA $C567 ; PC to RTS to in bank 08 +CMP #$4A : BNE + + ; collecting pre-activated flute + LDA #$3E : JML $088007 ++ ; normal itemget sfx +LDA #$0F : JML $08800E ; what we wrote over + +; A = item id being collected +ItemGetOverworldAlternateSFX: +CMP.b #$4A : BNE + + LDA.b #$3E : STA.w $012E + RTL ++ ; normal itemget sfx +JSL Sound_SetSfxPanWithPlayerCoords : ORA.b #$0F : STA.w $012F ; what we wrote over +RTL +;--------------------------------------------------------------------------------