From 4398dde1e483d74ae9997aba11f62b9810f9f77b Mon Sep 17 00:00:00 2001 From: dannye <33dannye@gmail.com> Date: Fri, 16 Mar 2018 20:35:40 -0500 Subject: Break up sfxnote parameters into duty, volume, volume change and pitch --- macros/audio_macros.asm | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'macros') diff --git a/macros/audio_macros.asm b/macros/audio_macros.asm index 8195a04d..6d7b45c8 100755 --- a/macros/audio_macros.asm +++ b/macros/audio_macros.asm @@ -40,17 +40,26 @@ pitchenvelope: MACRO ENDC ENDM +;format: duty, volume, volume change, pitch squarenote: MACRO db $20 | \1 - db \2 - db \3 - db \4 + IF \3 < 0 + db (\2 << 4) | (%1000 | (\3 * -1)) + ELSE + db (\2 << 4) | \3 + ENDC + dw \4 ENDM +;format: duty, volume, volume change, pitch noisenote: MACRO db $20 | \1 - db \2 - db \3 + IF \3 < 0 + db (\2 << 4) | (%1000 | (\3 * -1)) + ELSE + db (\2 << 4) | \3 + ENDC + db \4 ENDM ;format: pitch length (in 16ths) -- cgit v1.2.3