aboutsummaryrefslogtreecommitdiffstats
path: root/audio/poke_flute.asm
diff options
context:
space:
mode:
authordannye <33dannye@gmail.com>2020-11-04 00:06:44 -0600
committerdannye <33dannye@gmail.com>2020-11-04 00:06:44 -0600
commit5647ca687b92954dcf37a6ea6bfbc9a341c32de4 (patch)
treedde1937a1bfdb3a835f4155e1c2eb8f1aaf86f63 /audio/poke_flute.asm
parentMerge pull request #55 from Deokishisu/patch-1 (diff)
downloadpokeyellow-5647ca687b92954dcf37a6ea6bfbc9a341c32de4.tar.gz
pokeyellow-5647ca687b92954dcf37a6ea6bfbc9a341c32de4.tar.xz
pokeyellow-5647ca687b92954dcf37a6ea6bfbc9a341c32de4.zip
Sync with pokered
Diffstat (limited to 'audio/poke_flute.asm')
-rw-r--r--audio/poke_flute.asm18
1 files changed, 18 insertions, 0 deletions
diff --git a/audio/poke_flute.asm b/audio/poke_flute.asm
new file mode 100644
index 00000000..f55a2a1f
--- /dev/null
+++ b/audio/poke_flute.asm
@@ -0,0 +1,18 @@
+Music_PokeFluteInBattle::
+ ; begin playing the "caught mon" sound effect
+ ld a, SFX_CAUGHT_MON
+ call PlaySoundWaitForCurrent
+ ; then immediately overwrite the channel pointers
+ ld hl, wChannelCommandPointers + Ch5 * 2
+ ld de, SFX_Pokeflute_Ch5
+ call Audio2_OverwriteChannelPointer
+ ld de, SFX_Pokeflute_Ch6
+ call Audio2_OverwriteChannelPointer
+ ld de, SFX_Pokeflute_Ch7
+
+Audio2_OverwriteChannelPointer:
+ ld a, e
+ ld [hli], a
+ ld a, d
+ ld [hli], a
+ ret