aboutsummaryrefslogtreecommitdiffstats
path: root/home/audio.asm
diff options
context:
space:
mode:
authordannye <corrnondacqb@yahoo.com>2016-07-16 11:11:50 -0500
committerdannye <corrnondacqb@yahoo.com>2016-07-16 11:11:50 -0500
commit707ba908f780d42e1f26af85bef0bf0eb478b877 (patch)
tree88fba78e2d9c590c4860a2e63eed00a2e29d4005 /home/audio.asm
parentMerge branch 'master' of https://github.com/pret/pokeyellow into merge-pokered (diff)
parentMerge pull request #15 from pret/remove-pip (diff)
downloadpokeyellow-707ba908f780d42e1f26af85bef0bf0eb478b877.tar.gz
pokeyellow-707ba908f780d42e1f26af85bef0bf0eb478b877.tar.xz
pokeyellow-707ba908f780d42e1f26af85bef0bf0eb478b877.zip
Merge branch 'master' of https://github.com/pret/pokeyellow
Diffstat (limited to 'home/audio.asm')
-rw-r--r--home/audio.asm16
1 files changed, 9 insertions, 7 deletions
diff --git a/home/audio.asm b/home/audio.asm
index e360aab2..3cd2ffd0 100644
--- a/home/audio.asm
+++ b/home/audio.asm
@@ -17,6 +17,7 @@ PlayDefaultMusicFadeOutCurrent::
ld [wLastMusicSoundID], a
ld c, 8
ld d, c
+
PlayDefaultMusicCommon::
ld a, [wWalkBikeSurfState]
and a
@@ -35,7 +36,7 @@ PlayDefaultMusicCommon::
ld b, a
ld a, d
and a ; should current music be faded out first?
- ld a, $1f ; BANK(Music_BikeRiding)
+ ld a, BANK(Music_BikeRiding)
jr nz, .next2
; Only change the audio ROM bank if the current music isn't going to be faded
@@ -87,7 +88,7 @@ CheckForNoBikingMusicMap::
ret
UpdateMusic6Times::
- ld c, $6
+ ld c, 6
UpdateMusicCTimes::
.loop
push bc
@@ -165,16 +166,17 @@ PlaySound::
ld [wChannelSoundIDs + CH7], a
.next
ld a, [wAudioFadeOutControl]
- and a
+ and a ; has a fade-out length been specified?
jr z, .noFadeOut
ld a, [wNewSoundID]
- and a
- jr z, .done
+ and a ; is the new sound ID 0?
+ jr z, .done ; if so, do nothing
xor a
ld [wNewSoundID], a
ld a, [wLastMusicSoundID]
- cp $ff
- jr nz, .fadeOut
+ cp $ff ; has the music been stopped?
+ jr nz, .fadeOut ; if not, fade out the current music
+; If it has been stopped, start playing the new music immediately.
xor a
ld [wAudioFadeOutControl], a
.noFadeOut