aboutsummaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authordannye <33dannye@gmail.com>2022-07-15 05:43:56 -0500
committerdannye <33dannye@gmail.com>2022-07-15 05:43:56 -0500
commit5222068e7cdf996b3003fafe57e8662dda94a2cd (patch)
tree20a84bc0c54fccfcaf92892bb0856a659a57b039 /audio
parentRemove empty lines on the top of map header files (#98) (diff)
downloadpokeyellow-5222068e7cdf996b3003fafe57e8662dda94a2cd.tar.gz
pokeyellow-5222068e7cdf996b3003fafe57e8662dda94a2cd.tar.xz
pokeyellow-5222068e7cdf996b3003fafe57e8662dda94a2cd.zip
Fix some hardcoded battle sfx ids
Diffstat (limited to 'audio')
-rw-r--r--audio/engine_1.asm23
1 files changed, 12 insertions, 11 deletions
diff --git a/audio/engine_1.asm b/audio/engine_1.asm
index df3281cb..9fb0ef1e 100644
--- a/audio/engine_1.asm
+++ b/audio/engine_1.asm
@@ -982,7 +982,7 @@ Audio1_ApplyWavePatternAndFrequency:
Audio1_SetSfxTempo:
call Audio1_IsCry
jr c, .isCry
- call Audio1_96c3
+ call Audio1_IsBattleSFX
jr nc, .notCry
.isCry
ld d, 0
@@ -1005,7 +1005,7 @@ Audio1_SetSfxTempo:
Audio1_ApplyFrequencyModifier:
call Audio1_IsCry
jr c, .isCry
- call Audio1_96c3
+ call Audio1_IsBattleSFX
ret nc
.isCry
; if playing a cry, add the cry's frequency modifier
@@ -1062,23 +1062,24 @@ Audio1_IsCry:
scf
ret
-Audio1_96c3:
+Audio1_IsBattleSFX:
+ ; Returns whether the currently playing audio is a battle sfx in carry.
ld a, [wAudioROMBank]
cp BANK("Audio Engine 2")
- jr nz, .asm_96dc
+ jr nz, .no
ld a, [wChannelSoundIDs + Ch8]
ld b, a
ld a, [wChannelSoundIDs + Ch5]
or b
- cp $9d
- jr c, .asm_96dc
- cp $ea
- jr z, .asm_96de
- jr c, .asm_96de
-.asm_96dc
+ cp BATTLE_SFX_START
+ jr c, .no
+ cp BATTLE_SFX_END
+ jr z, .yes
+ jr c, .yes
+.no
and a
ret
-.asm_96de
+.yes
scf
ret