summaryrefslogtreecommitdiff
path: root/macros/scripts/audio.asm
diff options
context:
space:
mode:
authorRangi <35663410+Rangi42@users.noreply.github.com>2020-10-30 12:26:03 -0400
committerGitHub <noreply@github.com>2020-10-30 12:26:03 -0400
commit7a42f1790ae1e9e357593879bd38c6596dcb03da (patch)
treedbf4ee19995364f15a3b3f98925f606c50598334 /macros/scripts/audio.asm
parenta2b6befd7d12b2ad8bb97979a10519500dcdd870 (diff)
parent1092983bde65bbf1a27eeabbfbceec1f278a4831 (diff)
Merge pull request #776 from Rangi42/unreferenced
Comment, remove, or revise many unreferenced labels
Diffstat (limited to 'macros/scripts/audio.asm')
-rw-r--r--macros/scripts/audio.asm5
1 files changed, 5 insertions, 0 deletions
diff --git a/macros/scripts/audio.asm b/macros/scripts/audio.asm
index 2776c293f..127f2d1e3 100644
--- a/macros/scripts/audio.asm
+++ b/macros/scripts/audio.asm
@@ -1,8 +1,12 @@
channel_count: MACRO
+ assert 0 < (\1) && (\1) <= NUM_MUSIC_CHANS, \
+ "channel_count must be 1-{d:NUM_MUSIC_CHANS}"
_num_channels = \1 - 1
ENDM
channel: MACRO
+ assert 0 < (\1) && (\1) <= NUM_CHANNELS, \
+ "channel id must be 1-{d:NUM_CHANNELS}"
dn (_num_channels << 2), \1 - 1 ; channel id
dw \2 ; address
_num_channels = 0
@@ -46,6 +50,7 @@ FIRST_MUSIC_CMD EQU const_value
const octave_cmd ; $d0
octave: MACRO
+ assert 0 < (\1) && (\1) < 8, "octave must be 1-8"
db octave_cmd | 8 - (\1) ; octave
ENDM