diff options
author | Rangi <35663410+Rangi42@users.noreply.github.com> | 2020-02-05 18:51:20 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-05 18:51:20 -0500 |
commit | fb9cbe7d1e8ae9062b4ae2b58028402686ea83d5 (patch) | |
tree | b494e5e449e2ff486c28ce817b58733ce0494e72 /macros/legacy.asm | |
parent | 24c058bc0af611f0fb8da5286dc08ae1837b131c (diff) | |
parent | cbf14612eae2c2f0d45d22d750b056456f5db6c7 (diff) |
Merge pull request #650 from pret/audio-macros
Update audio macros and arguments
Diffstat (limited to 'macros/legacy.asm')
-rw-r--r-- | macros/legacy.asm | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/macros/legacy.asm b/macros/legacy.asm index 7192195fc..6234b8343 100644 --- a/macros/legacy.asm +++ b/macros/legacy.asm @@ -7,7 +7,87 @@ callba EQUS "farcall" callab EQUS "callfar" ; macros/scripts/audio.asm +__ EQU 0 +CC EQU 13 + +musicheader: MACRO + channel_count \1 + channel \2, \3 +ENDM + +sound: MACRO + note \1, \2 + db \3 + dw \4 +ENDM + +noise: MACRO + note \1, \2 + db \3 + db \4 +ENDM + +notetype: MACRO +IF _NARG >= 2 + note_type \1, \2 >> 4, \2 & $0f +ELSE + note_type \1 +ENDC +ENDM + +pitchoffset: MACRO + transpose \1, \2 - 1 +ENDM + +dutycycle EQUS "duty_cycle" + +intensity: MACRO + volume_envelope \1 >> 4, \1 & $0f +ENDM + +soundinput: MACRO + pitch_sweep \1 >> 4, \1 & $0f +ENDM + unknownmusic0xde EQUS "sound_duty" +sound_duty: MACRO + db $de +IF _NARG == 4 + db \1 | (\2 << 2) | (\3 << 4) | (\4 << 6) +ELSE + db \1 +ENDC +ENDM + +togglesfx EQUS "toggle_sfx" + +slidepitchto: MACRO + pitch_slide \1, (8 - \2), \3 +ENDM + +togglenoise EQUS "toggle_noise" + +panning: MACRO + force_stereo_panning ((\1 >> 4) & 1), (\1 & 1) +ENDM + +tone EQUS "pitch_offset" +restartchannel EQUS "restart_channel" +newsong EQUS "new_song" +sfxpriorityon EQUS "sfx_priority_on" +sfxpriorityoff EQUS "sfx_priority_off" + +stereopanning: MACRO + stereo_panning ((\1 >> 4) & 1), (\1 & 1) +ENDM + +sfxtogglenoise EQUS "sfx_toggle_noise" +setcondition EQUS "set_condition" +jumpif EQUS "sound_jump_if" +jumpchannel EQUS "sound_jump" +loopchannel EQUS "sound_loop" +callchannel EQUS "sound_call" +endchannel EQUS "sound_ret" ; macros/scripts/events.asm |