aboutsummaryrefslogtreecommitdiffstats
path: root/audio/alternate_tempo.asm
diff options
context:
space:
mode:
authorRangi <35663410+Rangi42@users.noreply.github.com>2020-07-03 09:38:52 -0400
committerGitHub <noreply@github.com>2020-07-03 09:38:52 -0400
commitc85050497c1bd062e9cd40bf5b32fa3beca366cc (patch)
tree9593ddd3ab820223ab580d5fc0ae133b485b8315 /audio/alternate_tempo.asm
parentActually run .travis/webhook.sh (diff)
parentAdd engine/movie/oak_speech/ subdirectory (diff)
downloadpokeyellow-c85050497c1bd062e9cd40bf5b32fa3beca366cc.tar.gz
pokeyellow-c85050497c1bd062e9cd40bf5b32fa3beca366cc.tar.xz
pokeyellow-c85050497c1bd062e9cd40bf5b32fa3beca366cc.zip
Merge pull request #256 from Rangi42/master
Add subdirectories to engine/ similar to pokecrystal
Diffstat (limited to 'audio/alternate_tempo.asm')
-rw-r--r--audio/alternate_tempo.asm50
1 files changed, 50 insertions, 0 deletions
diff --git a/audio/alternate_tempo.asm b/audio/alternate_tempo.asm
new file mode 100644
index 00000000..6c2cdc49
--- /dev/null
+++ b/audio/alternate_tempo.asm
@@ -0,0 +1,50 @@
+; an alternate start for MeetRival which has a different first measure
+Music_RivalAlternateStart::
+ ld c, BANK(Music_MeetRival)
+ ld a, MUSIC_MEET_RIVAL
+ call PlayMusic
+ ld hl, wChannelCommandPointers
+ ld de, Music_MeetRival_branch_b1a2
+ call Audio1_OverwriteChannelPointer
+ ld de, Music_MeetRival_branch_b21d
+ call Audio1_OverwriteChannelPointer
+ ld de, Music_MeetRival_branch_b2b5
+
+Audio1_OverwriteChannelPointer:
+ ld a, e
+ ld [hli], a
+ ld a, d
+ ld [hli], a
+ ret
+
+; an alternate tempo for MeetRival which is slightly slower
+Music_RivalAlternateTempo::
+ ld c, BANK(Music_MeetRival)
+ ld a, MUSIC_MEET_RIVAL
+ call PlayMusic
+ ld hl, wChannelCommandPointers
+ ld de, Music_MeetRival_branch_b119
+ jp Audio1_OverwriteChannelPointer
+
+; applies both the alternate start and alternate tempo
+Music_RivalAlternateStartAndTempo::
+ call Music_RivalAlternateStart
+ ld hl, wChannelCommandPointers
+ ld de, Music_MeetRival_branch_b19b
+ jp Audio1_OverwriteChannelPointer
+
+; an alternate tempo for Cities1 which is used for the Hall of Fame room
+Music_Cities1AlternateTempo::
+ ld a, 10
+ ld [wAudioFadeOutCounterReloadValue], a
+ ld [wAudioFadeOutCounter], a
+ ld a, $ff ; stop playing music after the fade-out is finished
+ ld [wAudioFadeOutControl], a
+ ld c, 100
+ call DelayFrames ; wait for the fade-out to finish
+ ld c, BANK(Music_Cities1)
+ ld a, MUSIC_CITIES1
+ call PlayMusic
+ ld hl, wChannelCommandPointers
+ ld de, Music_Cities1_branch_aa6f
+ jp Audio1_OverwriteChannelPointer