From 6b5be9129cabe72b9f775b02db1bf7e7169153da Mon Sep 17 00:00:00 2001 From: vulcandth Date: Mon, 6 Jun 2022 16:25:31 -0500 Subject: RGBDS syntax updates (#358) New MACRO and DEF syntax --- macros/scripts/audio.asm | 54 +++++++------- macros/scripts/events.asm | 138 +++++++++++++++++----------------- macros/scripts/maps.asm | 184 +++++++++++++++++++++++----------------------- macros/scripts/text.asm | 88 +++++++++++----------- 4 files changed, 232 insertions(+), 232 deletions(-) (limited to 'macros/scripts') diff --git a/macros/scripts/audio.asm b/macros/scripts/audio.asm index b12a2adc..114bf576 100644 --- a/macros/scripts/audio.asm +++ b/macros/scripts/audio.asm @@ -1,4 +1,4 @@ -audio_header: MACRO +MACRO audio_header db (_NARG - 2) << 6 | \2 dw \1_\2 IF _NARG > 2 @@ -24,7 +24,7 @@ ENDM ; small magnitude means quick change, large magnitude means slow change ; in signed magnitude representation, so a value of 8 is the same as (negative) 0 const pitch_sweep_cmd ; $10 -pitch_sweep: MACRO +MACRO pitch_sweep db pitch_sweep_cmd IF \2 < 0 db (\1 << 4) | (%1000 | (\2 * -1)) @@ -41,8 +41,8 @@ ENDM ; fade: positive value means decrease in volume, negative value means increase in volume ; small magnitude means quick change, large magnitude means slow change ; in signed magnitude representation, so a value of 8 is the same as (negative) 0 -square_note_cmd EQU sfx_note_cmd ; $20 -square_note: MACRO +DEF square_note_cmd EQU sfx_note_cmd ; $20 +MACRO square_note db square_note_cmd | \1 IF \3 < 0 db (\2 << 4) | (%1000 | (\3 * -1)) @@ -56,8 +56,8 @@ ENDM ; fade: positive value means decrease in volume, negative value means increase in volume ; small magnitude means quick change, large magnitude means slow change ; in signed magnitude representation, so a value of 8 is the same as (negative) 0 -noise_note_cmd EQU sfx_note_cmd ; $20 -noise_note: MACRO +DEF noise_note_cmd EQU sfx_note_cmd ; $20 +MACRO noise_note db noise_note_cmd | \1 IF \3 < 0 db (\2 << 4) | (%1000 | (\3 * -1)) @@ -68,7 +68,7 @@ noise_note: MACRO ENDM ; arguments: pitch, length [1, 16] -note: MACRO +MACRO note db (\1 << 4) | (\2 - 1) ENDM @@ -76,7 +76,7 @@ ENDM ; arguments: instrument [1, 19], length [1, 16] const drum_note_cmd ; $b0 -drum_note: MACRO +MACRO drum_note db drum_note_cmd | (\2 - 1) db \1 ENDM @@ -85,7 +85,7 @@ ENDM ; like drum_note but one 1 byte instead of 2 ; can only be used with instruments 1-10, excluding 2 ; unused -drum_note_short: MACRO +MACRO drum_note_short db (\1 << 4) | (\2 - 1) ENDM @@ -93,7 +93,7 @@ ENDM ; arguments: length [1, 16] const rest_cmd ; $c0 -rest: MACRO +MACRO rest db rest_cmd | (\1 - 1) ENDM @@ -104,7 +104,7 @@ ENDM ; small magnitude means quick change, large magnitude means slow change ; in signed magnitude representation, so a value of 8 is the same as (negative) 0 const note_type_cmd ; $d0 -note_type: MACRO +MACRO note_type db note_type_cmd | \1 IF \3 < 0 db (\2 << 4) | (%1000 | (\3 * -1)) @@ -114,8 +114,8 @@ note_type: MACRO ENDM ; arguments: speed [0, 15] -drum_speed_cmd EQU note_type_cmd ; $d0 -drum_speed: MACRO +DEF drum_speed_cmd EQU note_type_cmd ; $d0 +MACRO drum_speed db drum_speed_cmd | \1 ENDM @@ -123,7 +123,7 @@ ENDM ; arguments: octave [1, 8] const octave_cmd ; $e0 -octave: MACRO +MACRO octave db octave_cmd | (8 - \1) ENDM @@ -131,7 +131,7 @@ ENDM ; when enabled, effective frequency used is incremented by 1 const toggle_perfect_pitch_cmd ; $e8 -toggle_perfect_pitch: MACRO +MACRO toggle_perfect_pitch db toggle_perfect_pitch_cmd ENDM @@ -142,7 +142,7 @@ ENDM ; depth: amplitude of vibrato wave ; rate: frequency of vibrato wave const vibrato_cmd ; $ea -vibrato: MACRO +MACRO vibrato db vibrato_cmd db \1 db (\2 << 4) | \3 @@ -150,7 +150,7 @@ ENDM ; arguments: length [1, 256], octave [1, 8], pitch const pitch_slide_cmd ; $eb -pitch_slide: MACRO +MACRO pitch_slide db pitch_slide_cmd db \1 - 1 db ((8 - \2) << 4) | \3 @@ -158,7 +158,7 @@ ENDM ; arguments: duty cycle [0, 3] (12.5%, 25%, 50%, 75%) const duty_cycle_cmd ; $ec -duty_cycle: MACRO +MACRO duty_cycle db duty_cycle_cmd db \1 ENDM @@ -170,27 +170,27 @@ ENDM ; if larger than $100, large note speed or note length values might cause overflow ; stored in big endian const tempo_cmd ; $ed -tempo: MACRO +MACRO tempo db tempo_cmd db HIGH(\1), LOW(\1) ENDM ; arguments: left output enable mask, right output enable mask const stereo_panning_cmd ; $ee -stereo_panning: MACRO +MACRO stereo_panning db stereo_panning_cmd db (\1 << 4) | \2 ENDM const unknownmusic0xef_cmd ; $ef -unknownmusic0xef: MACRO +MACRO unknownmusic0xef db unknownmusic0xef_cmd db \1 ENDM ; arguments: left master volume [0, 7], right master volume [0, 7] const volume_cmd ; $f0 -volume: MACRO +MACRO volume db volume_cmd db (\1 << 4) | \2 ENDM @@ -199,7 +199,7 @@ ENDM ; when enabled, the sfx data is interpreted as music data const execute_music_cmd ; $f8 -execute_music: MACRO +MACRO execute_music db execute_music_cmd ENDM @@ -207,27 +207,27 @@ ENDM ; arguments: duty cycle 1, duty cycle 2, duty cycle 3, duty cycle 4 const duty_cycle_pattern_cmd ; $fc -duty_cycle_pattern: MACRO +MACRO duty_cycle_pattern db duty_cycle_pattern_cmd db \1 << 6 | \2 << 4 | \3 << 2 | \4 ENDM ; arguments: address const sound_call_cmd ; $fd -sound_call: MACRO +MACRO sound_call db sound_call_cmd dw \1 ENDM ; arguments: count, address const sound_loop_cmd ; $fe -sound_loop: MACRO +MACRO sound_loop db sound_loop_cmd db \1 dw \2 ENDM const sound_ret_cmd ; $ff -sound_ret: MACRO +MACRO sound_ret db sound_ret_cmd ENDM diff --git a/macros/scripts/events.asm b/macros/scripts/events.asm index a9b1c615..fdbedb6f 100644 --- a/macros/scripts/events.asm +++ b/macros/scripts/events.asm @@ -1,7 +1,7 @@ ;\1 = event index ;\2 = return result in carry instead of zero flag -CheckEvent: MACRO -event_byte = ((\1) / 8) +MACRO CheckEvent + DEF event_byte = ((\1) / 8) ld a, [wEventFlags + event_byte] IF _NARG > 1 @@ -19,9 +19,9 @@ ENDM ;\1 = event index -CheckEventReuseA: MACRO +MACRO CheckEventReuseA IF event_byte != ((\1) / 8) -event_byte = ((\1) / 8) + DEF event_byte = ((\1) / 8) ld a, [wEventFlags + event_byte] ENDC @@ -31,10 +31,10 @@ ENDM ;\1 = event index ;\2 = event index of the last event used before the branch -CheckEventAfterBranchReuseA: MACRO -event_byte = ((\2) / 8) +MACRO CheckEventAfterBranchReuseA + DEF event_byte = ((\2) / 8) IF event_byte != ((\1) / 8) -event_byte = ((\1) / 8) + DEF event_byte = ((\1) / 8) ld a, [wEventFlags + event_byte] ENDC @@ -45,7 +45,7 @@ ENDM ;\1 = reg ;\2 = event index ;\3 = event index this event is relative to (optional, this is needed when there is a fixed flag address) -EventFlagBit: MACRO +MACRO EventFlagBit IF _NARG > 2 ld \1, ((\3) % 8) + ((\2) - (\3)) ELSE @@ -56,24 +56,24 @@ ENDM ;\1 = reg ;\2 = event index -EventFlagAddress: MACRO -event_byte = ((\2) / 8) +MACRO EventFlagAddress + DEF event_byte = ((\2) / 8) ld \1, wEventFlags + event_byte ENDM ;\1 = event index -CheckEventHL: MACRO -event_byte = ((\1) / 8) +MACRO CheckEventHL + DEF event_byte = ((\1) / 8) ld hl, wEventFlags + event_byte bit (\1) % 8, [hl] ENDM ;\1 = event index -CheckEventReuseHL: MACRO -IF event_byte != ((\1) / 8) -event_byte = ((\1) / 8) +MACRO CheckEventReuseHL + IF event_byte != ((\1) / 8) + DEF event_byte = ((\1) / 8) ld hl, wEventFlags + event_byte ENDC @@ -83,18 +83,18 @@ ENDM ; dangerous, only use when HL is guaranteed to be the desired value ;\1 = event index -CheckEventForceReuseHL: MACRO -event_byte = ((\1) / 8) +MACRO CheckEventForceReuseHL + DEF event_byte = ((\1) / 8) bit (\1) % 8, [hl] ENDM ;\1 = event index ;\2 = event index of the last event used before the branch -CheckEventAfterBranchReuseHL: MACRO -event_byte = ((\2) / 8) -IF event_byte != ((\1) / 8) -event_byte = ((\1) / 8) +MACRO CheckEventAfterBranchReuseHL + DEF event_byte = ((\2) / 8) + IF event_byte != ((\1) / 8) + DEF event_byte = ((\1) / 8) ld hl, wEventFlags + event_byte ENDC @@ -103,8 +103,8 @@ ENDM ;\1 = event index -CheckAndSetEvent: MACRO -event_byte = ((\1) / 8) +MACRO CheckAndSetEvent + DEF event_byte = ((\1) / 8) ld hl, wEventFlags + event_byte bit (\1) % 8, [hl] set (\1) % 8, [hl] @@ -112,8 +112,8 @@ ENDM ;\1 = event index -CheckAndResetEvent: MACRO -event_byte = ((\1) / 8) +MACRO CheckAndResetEvent + DEF event_byte = ((\1) / 8) ld hl, wEventFlags + event_byte bit (\1) % 8, [hl] res (\1) % 8, [hl] @@ -121,7 +121,7 @@ ENDM ;\1 = event index -CheckAndSetEventA: MACRO +MACRO CheckAndSetEventA ld a, [wEventFlags + ((\1) / 8)] bit (\1) % 8, a set (\1) % 8, a @@ -130,7 +130,7 @@ ENDM ;\1 = event index -CheckAndResetEventA: MACRO +MACRO CheckAndResetEventA ld a, [wEventFlags + ((\1) / 8)] bit (\1) % 8, a res (\1) % 8, a @@ -139,17 +139,17 @@ ENDM ;\1 = event index -SetEvent: MACRO -event_byte = ((\1) / 8) +MACRO SetEvent + DEF event_byte = ((\1) / 8) ld hl, wEventFlags + event_byte set (\1) % 8, [hl] ENDM ;\1 = event index -SetEventReuseHL: MACRO +MACRO SetEventReuseHL IF event_byte != ((\1) / 8) -event_byte = ((\1) / 8) + DEF event_byte = ((\1) / 8) ld hl, wEventFlags + event_byte ENDC @@ -159,10 +159,10 @@ ENDM ;\1 = event index ;\2 = event index of the last event used before the branch -SetEventAfterBranchReuseHL: MACRO -event_byte = ((\2) / 8) -IF event_byte != ((\1) / 8) -event_byte = ((\1) / 8) +MACRO SetEventAfterBranchReuseHL + DEF event_byte = ((\2) / 8) + IF event_byte != ((\1) / 8) + DEF event_byte = ((\1) / 8) ld hl, wEventFlags + event_byte ENDC @@ -172,8 +172,8 @@ ENDM ; dangerous, only use when HL is guaranteed to be the desired value ;\1 = event index -SetEventForceReuseHL: MACRO -event_byte = ((\1) / 8) +MACRO SetEventForceReuseHL + DEF event_byte = ((\1) / 8) set (\1) % 8, [hl] ENDM @@ -181,7 +181,7 @@ ENDM ;\1 = event index ;\2 = event index ;\3, \4, ... = additional (optional) event indices -SetEvents: MACRO +MACRO SetEvents SetEvent \1 REPT _NARG - 1 SetEventReuseHL \2 @@ -191,17 +191,17 @@ ENDM ;\1 = event index -ResetEvent: MACRO -event_byte = ((\1) / 8) +MACRO ResetEvent + DEF event_byte = ((\1) / 8) ld hl, wEventFlags + event_byte res (\1) % 8, [hl] ENDM ;\1 = event index -ResetEventReuseHL: MACRO +MACRO ResetEventReuseHL IF event_byte != ((\1) / 8) -event_byte = ((\1) / 8) + DEF event_byte = ((\1) / 8) ld hl, wEventFlags + event_byte ENDC @@ -211,10 +211,10 @@ ENDM ;\1 = event index ;\2 = event index of the last event used before the branch -ResetEventAfterBranchReuseHL: MACRO -event_byte = ((\2) / 8) -IF event_byte != ((\1) / 8) -event_byte = ((\1) / 8) +MACRO ResetEventAfterBranchReuseHL + DEF event_byte = ((\2) / 8) + IF event_byte != ((\1) / 8) + DEF event_byte = ((\1) / 8) ld hl, wEventFlags + event_byte ENDC @@ -224,8 +224,8 @@ ENDM ; dangerous, only use when HL is guaranteed to be the desired value ;\1 = event index -ResetEventForceReuseHL: MACRO -event_byte = ((\1) / 8) +MACRO ResetEventForceReuseHL + DEF event_byte = ((\1) / 8) res (\1) % 8, [hl] ENDM @@ -233,7 +233,7 @@ ENDM ;\1 = event index ;\2 = event index ;\3 = event index (optional) -ResetEvents: MACRO +MACRO ResetEvents ResetEvent \1 REPT _NARG - 1 ResetEventReuseHL \2 @@ -244,9 +244,9 @@ ENDM ;\1 = start ;\2 = end -SetEventRange: MACRO -event_start_byte = ((\1) / 8) -event_end_byte = ((\2) / 8) +MACRO SetEventRange + DEF event_start_byte = ((\1) / 8) + DEF event_end_byte = ((\2) / 8) IF event_end_byte < event_start_byte FAIL "Incorrect argument order in SetEventRange." @@ -257,12 +257,12 @@ event_end_byte = ((\2) / 8) or (1 << (((\2) % 8) + 1)) - (1 << ((\1) % 8)) ld [wEventFlags + event_start_byte], a ELSE -event_fill_start = event_start_byte + 1 -event_fill_count = event_end_byte - event_start_byte - 1 + DEF event_fill_start = event_start_byte + 1 + DEF event_fill_count = event_end_byte - event_start_byte - 1 IF ((\1) % 8) == 0 -event_fill_start -= 1 -event_fill_count += 1 + DEF event_fill_start -= 1 + DEF event_fill_count += 1 ELSE ld a, [wEventFlags + event_start_byte] or $ff - ((1 << ((\1) % 8)) - 1) @@ -270,7 +270,7 @@ event_fill_count += 1 ENDC IF ((\2) % 8) == 7 -event_fill_count += 1 + DEF event_fill_count += 1 ENDC IF event_fill_count == 1 @@ -306,9 +306,9 @@ ENDM ;\1 = start ;\2 = end ;\3 = assume a is 0 if present -ResetEventRange: MACRO -event_start_byte = ((\1) / 8) -event_end_byte = ((\2) / 8) +MACRO ResetEventRange + DEF event_start_byte = ((\1) / 8) + DEF event_end_byte = ((\2) / 8) IF event_end_byte < event_start_byte FAIL "Incorrect argument order in ResetEventRange." @@ -319,12 +319,12 @@ event_end_byte = ((\2) / 8) and ~((1 << (((\2) % 8) + 1)) - (1 << ((\1) % 8))) & $ff ld [wEventFlags + event_start_byte], a ELSE -event_fill_start = event_start_byte + 1 -event_fill_count = event_end_byte - event_start_byte - 1 + DEF event_fill_start = event_start_byte + 1 + DEF event_fill_count = event_end_byte - event_start_byte - 1 IF ((\1) % 8) == 0 -event_fill_start -= 1 -event_fill_count += 1 + DEF event_fill_start -= 1 + DEF event_fill_count += 1 ELSE ld a, [wEventFlags + event_start_byte] and ~($ff - ((1 << ((\1) % 8)) - 1)) & $ff @@ -332,7 +332,7 @@ event_fill_count += 1 ENDC IF ((\2) % 8) == 7 -event_fill_count += 1 + DEF event_fill_count += 1 ENDC IF event_fill_count == 1 @@ -375,10 +375,10 @@ ENDM ;\1 = event index 1 ;\2 = event index 2 ;\3 = try to reuse a (optional) -CheckBothEventsSet: MACRO +MACRO CheckBothEventsSet IF ((\1) / 8) == ((\2) / 8) IF (_NARG < 3) || (((\1) / 8) != event_byte) -event_byte = ((\1) / 8) + DEF event_byte = ((\1) / 8) ld a, [wEventFlags + ((\1) / 8)] ENDC and (1 << ((\1) % 8)) | (1 << ((\2) % 8)) @@ -411,7 +411,7 @@ ENDM ; returns the complement of whether either event is set in Z flag ;\1 = event index 1 ;\2 = event index 2 -CheckEitherEventSet: MACRO +MACRO CheckEitherEventSet IF ((\1) / 8) == ((\2) / 8) ld a, [wEventFlags + ((\1) / 8)] and (1 << ((\1) % 8)) | (1 << ((\2) % 8)) @@ -441,7 +441,7 @@ ENDM ; for handling fixed event bits when events are inserted/removed ;\1 = event index ;\2 = fixed flag bit -AdjustEventBit: MACRO +MACRO AdjustEventBit IF ((\1) % 8) != (\2) add ((\1) % 8) - (\2) ENDC diff --git a/macros/scripts/maps.asm b/macros/scripts/maps.asm index bae8fd07..5c1a8ad5 100644 --- a/macros/scripts/maps.asm +++ b/macros/scripts/maps.asm @@ -1,7 +1,7 @@ -def_object_events: MACRO -REDEF _NUM_OBJECT_EVENTS EQUS "_NUM_OBJECT_EVENTS_\@" +MACRO def_object_events + REDEF _NUM_OBJECT_EVENTS EQUS "_NUM_OBJECT_EVENTS_\@" db {_NUM_OBJECT_EVENTS} -{_NUM_OBJECT_EVENTS} = 0 + DEF {_NUM_OBJECT_EVENTS} = 0 ENDM ;\1 x position @@ -13,7 +13,7 @@ ENDM ;\7 items only: item id ;\7 trainers only: trainer class/pokemon id ;\8 trainers only: trainer number/pokemon level -object_event: MACRO +MACRO object_event db \3 db \2 + 4 db \1 + 4 @@ -29,42 +29,42 @@ object_event: MACRO ELSE db \6 ENDC -{_NUM_OBJECT_EVENTS} += 1 + DEF {_NUM_OBJECT_EVENTS} += 1 ENDM -def_warp_events: MACRO -REDEF _NUM_WARP_EVENTS EQUS "_NUM_WARP_EVENTS_\@" +MACRO def_warp_events + REDEF _NUM_WARP_EVENTS EQUS "_NUM_WARP_EVENTS_\@" db {_NUM_WARP_EVENTS} -{_NUM_WARP_EVENTS} = 0 + DEF {_NUM_WARP_EVENTS} = 0 ENDM ;\1 x position ;\2 y position ;\3 destination map (-1 = wLastMap) ;\4 destination warp id; starts at 1 (internally at 0) -warp_event: MACRO +MACRO warp_event db \2, \1, \4 - 1, \3 -_WARP_{d:{_NUM_WARP_EVENTS}}_X = \1 -_WARP_{d:{_NUM_WARP_EVENTS}}_Y = \2 -{_NUM_WARP_EVENTS} += 1 + DEF _WARP_{d:{_NUM_WARP_EVENTS}}_X = \1 + DEF _WARP_{d:{_NUM_WARP_EVENTS}}_Y = \2 + DEF {_NUM_WARP_EVENTS} += 1 ENDM -def_bg_events: MACRO -REDEF _NUM_BG_EVENTS EQUS "_NUM_BG_EVENTS_\@" +MACRO def_bg_events + REDEF _NUM_BG_EVENTS EQUS "_NUM_BG_EVENTS_\@" db {_NUM_BG_EVENTS} -{_NUM_BG_EVENTS} = 0 + DEF {_NUM_BG_EVENTS} = 0 ENDM ;\1 x position ;\2 y position ;\3 sign id -bg_event: MACRO +MACRO bg_event db \2, \1, \3 -{_NUM_BG_EVENTS} += 1 + DEF {_NUM_BG_EVENTS} += 1 ENDM ;\1 source map -def_warps_to: MACRO +MACRO def_warps_to FOR n, _NUM_WARP_EVENTS warp_to _WARP_{d:n}_X, _WARP_{d:n}_Y, \1_WIDTH ENDR @@ -73,18 +73,18 @@ ENDM ;\1 x position ;\2 y position ;\3 map width -warp_to: MACRO +MACRO warp_to event_displacement \3, \1, \2 ENDM ;\1 first bit offset / first object id -def_trainers: MACRO -IF _NARG == 1 -CURRENT_TRAINER_BIT = \1 -ELSE -CURRENT_TRAINER_BIT = 1 -ENDC +MACRO def_trainers + IF _NARG == 1 + DEF CURRENT_TRAINER_BIT = \1 + ELSE + DEF CURRENT_TRAINER_BIT = 1 + ENDC ENDM ;\1 event flag @@ -92,22 +92,22 @@ ENDM ;\3 TextBeforeBattle ;\4 TextAfterBattle ;\5 TextEndBattle -trainer: MACRO -_ev_bit = \1 % 8 -_cur_bit = CURRENT_TRAINER_BIT % 8 +MACRO trainer + DEF _ev_bit = \1 % 8 + DEF _cur_bit = CURRENT_TRAINER_BIT % 8 ASSERT _ev_bit == _cur_bit, \ "Expected \1 to be bit {d:_cur_bit}, got {d:_ev_bit}" db CURRENT_TRAINER_BIT db \2 << 4 dw wEventFlags + (\1 - CURRENT_TRAINER_BIT) / 8 dw \3, \5, \4, \4 -CURRENT_TRAINER_BIT += 1 + DEF CURRENT_TRAINER_BIT += 1 ENDM ;\1 x position ;\2 y position ;\3 movement data -map_coord_movement: MACRO +MACRO map_coord_movement dbmapcoord \1, \2 dw \3 ENDM @@ -117,10 +117,10 @@ ENDM ;\2 map id ;\3 tileset ;\4 connections: combo of NORTH, SOUTH, WEST, and/or EAST, or 0 for none -map_header: MACRO -CURRENT_MAP_WIDTH = \2_WIDTH -CURRENT_MAP_HEIGHT = \2_HEIGHT -CURRENT_MAP_OBJECT EQUS "\1_Object" +MACRO map_header + DEF CURRENT_MAP_WIDTH = \2_WIDTH + DEF CURRENT_MAP_HEIGHT = \2_HEIGHT + DEF CURRENT_MAP_OBJECT EQUS "\1_Object" \1_h:: db \3 db CURRENT_MAP_HEIGHT, CURRENT_MAP_WIDTH @@ -131,7 +131,7 @@ CURRENT_MAP_OBJECT EQUS "\1_Object" ENDM ; Comes after map_header and connection macros -end_map_header: MACRO +MACRO end_map_header dw {CURRENT_MAP_OBJECT} PURGE CURRENT_MAP_WIDTH, CURRENT_MAP_HEIGHT, CURRENT_MAP_OBJECT ENDM @@ -142,63 +142,63 @@ ENDM ;\3 map id ;\4 offset of the target map relative to the current map ; (x offset for east/west, y offset for north/south) -connection: MACRO - -; Calculate tile offsets for source (current) and target maps -_src = 0 -_tgt = (\4) + 3 -IF _tgt < 2 -_src = -_tgt -_tgt = 0 -ENDC - -IF !STRCMP("\1", "north") -_blk = \3_WIDTH * (\3_HEIGHT - 3) + _src -_map = _tgt -_win = (\3_WIDTH + 6) * \3_HEIGHT + 1 -_y = \3_HEIGHT * 2 - 1 -_x = (\4) * -2 -_len = CURRENT_MAP_WIDTH + 3 - (\4) -IF _len > \3_WIDTH -_len = \3_WIDTH -ENDC - -ELIF !STRCMP("\1", "south") -_blk = _src -_map = (CURRENT_MAP_WIDTH + 6) * (CURRENT_MAP_HEIGHT + 3) + _tgt -_win = \3_WIDTH + 7 -_y = 0 -_x = (\4) * -2 -_len = CURRENT_MAP_WIDTH + 3 - (\4) -IF _len > \3_WIDTH -_len = \3_WIDTH -ENDC - -ELIF !STRCMP("\1", "west") -_blk = (\3_WIDTH * _src) + \3_WIDTH - 3 -_map = (CURRENT_MAP_WIDTH + 6) * _tgt -_win = (\3_WIDTH + 6) * 2 - 6 -_y = (\4) * -2 -_x = \3_WIDTH * 2 - 1 -_len = CURRENT_MAP_HEIGHT + 3 - (\4) -IF _len > \3_HEIGHT -_len = \3_HEIGHT -ENDC - -ELIF !STRCMP("\1", "east") -_blk = (\3_WIDTH * _src) -_map = (CURRENT_MAP_WIDTH + 6) * _tgt + CURRENT_MAP_WIDTH + 3 -_win = \3_WIDTH + 7 -_y = (\4) * -2 -_x = 0 -_len = CURRENT_MAP_HEIGHT + 3 - (\4) -IF _len > \3_HEIGHT -_len = \3_HEIGHT -ENDC - -ELSE -fail "Invalid direction for 'connection'." -ENDC +MACRO connection + + ; Calculate tile offsets for source (current) and target maps + DEF _src = 0 + DEF _tgt = (\4) + 3 + IF _tgt < 2 + DEF _src = -_tgt + DEF _tgt = 0 + ENDC + + IF !STRCMP("\1", "north") + DEF _blk = \3_WIDTH * (\3_HEIGHT - 3) + _src + DEF _map = _tgt + DEF _win = (\3_WIDTH + 6) * \3_HEIGHT + 1 + DEF _y = \3_HEIGHT * 2 - 1 + DEF _x = (\4) * -2 + DEF _len = CURRENT_MAP_WIDTH + 3 - (\4) + IF _len > \3_WIDTH + DEF _len = \3_WIDTH + ENDC + + ELIF !STRCMP("\1", "south") + DEF _blk = _src + DEF _map = (CURRENT_MAP_WIDTH + 6) * (CURRENT_MAP_HEIGHT + 3) + _tgt + DEF _win = \3_WIDTH + 7 + DEF _y = 0 + DEF _x = (\4) * -2 + DEF _len = CURRENT_MAP_WIDTH + 3 - (\4) + IF _len > \3_WIDTH + DEF _len = \3_WIDTH + ENDC + + ELIF !STRCMP("\1", "west") + DEF _blk = (\3_WIDTH * _src) + \3_WIDTH - 3 + DEF _map = (CURRENT_MAP_WIDTH + 6) * _tgt + DEF _win = (\3_WIDTH + 6) * 2 - 6 + DEF _y = (\4) * -2 + DEF _x = \3_WIDTH * 2 - 1 + DEF _len = CURRENT_MAP_HEIGHT + 3 - (\4) + IF _len > \3_HEIGHT + DEF _len = \3_HEIGHT + ENDC + + ELIF !STRCMP("\1", "east") + DEF _blk = (\3_WIDTH * _src) + DEF _map = (CURRENT_MAP_WIDTH + 6) * _tgt + CURRENT_MAP_WIDTH + 3 + DEF _win = \3_WIDTH + 7 + DEF _y = (\4) * -2 + DEF _x = 0 + DEF _len = CURRENT_MAP_HEIGHT + 3 - (\4) + IF _len > \3_HEIGHT + DEF _len = \3_HEIGHT + ENDC + + ELSE + fail "Invalid direction for 'connection'." + ENDC db \3 dw \2_Blocks + _blk diff --git a/macros/scripts/text.asm b/macros/scripts/text.asm index c446c6c7..418e839c 100644 --- a/macros/scripts/text.asm +++ b/macros/scripts/text.asm @@ -1,44 +1,44 @@ -text EQUS "db TX_START," ; Start writing text. -next EQUS "db \"\"," ; Move a line down. -line EQUS "db \"\"," ; Start writing at the bottom line. -para EQUS "db \"\"," ; Start a new paragraph. -cont EQUS "db \"\"," ; Scroll to the next line. -done EQUS "db \"\"" ; End a text box. -prompt EQUS "db \"\"" ; Prompt the player to end a text box (initiating some other event). +DEF text EQUS "db TX_START," ; Start writing text. +DEF next EQUS "db \"\"," ; Move a line down. +DEF line EQUS "db \"\"," ; Start writing at the bottom line. +DEF para EQUS "db \"\"," ; Start a new paragraph. +DEF cont EQUS "db \"\"," ; Scroll to the next line. +DEF done EQUS "db \"\"" ; End a text box. +DEF prompt EQUS "db \"\"" ; Prompt the player to end a text box (initiating some other event). -page EQUS "db \"\"," ; Start a new Pokédex page. -dex EQUS "db \"\", \"@\"" ; End a Pokédex entry. +DEF page EQUS "db \"\"," ; Start a new Pokédex page. +DEF dex EQUS "db \"\", \"@\"" ; End a Pokédex entry. ; TextCommandJumpTable indexes (see home/text.asm) const_def const TX_START ; $00 -text_start: MACRO +MACRO text_start db TX_START ENDM const TX_RAM ; $01 -text_ram: MACRO +MACRO text_ram db TX_RAM dw \1 ; address to read from ENDM const TX_BCD ; $02 -text_bcd: MACRO +MACRO text_bcd db TX_BCD dw \1 ; address to read from db \2 ; number of bytes + print flags ENDM const TX_MOVE ; $03 -text_move: MACRO +MACRO text_move db TX_MOVE dw \1 ; address of the new location ENDM const TX_BOX ; $04 -text_box: MACRO +MACRO text_box ; draw box db TX_BOX dw \1 ; address of upper left corner @@ -46,27 +46,27 @@ text_box: MACRO ENDM const TX_LOW ; $05 -text_low: MACRO +MACRO text_low db TX_LOW ENDM const TX_PROMPT_BUTTON ; $06 -text_promptbutton: MACRO +MACRO text_promptbutton db TX_PROMPT_BUTTON ENDM const TX_SCROLL ; $07 -text_scroll: MACRO +MACRO text_scroll db TX_SCROLL ENDM const TX_START_ASM ; $08 -text_asm: MACRO +MACRO text_asm db TX_START_ASM ENDM const TX_NUM ; $09 -text_decimal: MACRO +MACRO text_decimal ; print a big-endian decimal number. db TX_NUM dw \1 ; address to read from @@ -74,76 +74,76 @@ text_decimal: MACRO ENDM const TX_PAUSE ; $0a -text_pause: MACRO +MACRO text_pause db TX_PAUSE ENDM const TX_SOUND_GET_ITEM_1 ; $0b -sound_get_item_1: MACRO +MACRO sound_get_item_1 db TX_SOUND_GET_ITEM_1 ENDM -TX_SOUND_LEVEL_UP EQU TX_SOUND_GET_ITEM_1 -sound_level_up EQUS "sound_get_item_1" +DEF TX_SOUND_LEVEL_UP EQU TX_SOUND_GET_ITEM_1 +DEF sound_level_up EQUS "sound_get_item_1" const TX_DOTS ; $0c -text_dots: MACRO +MACRO text_dots db TX_DOTS db \1 ; number of ellipses to draw ENDM const TX_WAIT_BUTTON ; $0d -text_waitbutton: MACRO +MACRO text_waitbutton db TX_WAIT_BUTTON ENDM const TX_SOUND_POKEDEX_RATING ; $0e -sound_pokedex_rating: MACRO +MACRO sound_pokedex_rating db TX_SOUND_POKEDEX_RATING ENDM const TX_SOUND_GET_ITEM_1_DUPLICATE ; $0f -sound_get_item_1_duplicate: MACRO +MACRO sound_get_item_1_duplicate db TX_SOUND_GET_ITEM_1_DUPLICATE ENDM const TX_SOUND_GET_ITEM_2 ; $10 -sound_get_item_2: MACRO +MACRO sound_get_item_2 db TX_SOUND_GET_ITEM_2 ENDM const TX_SOUND_GET_KEY_ITEM ; $11 -sound_get_key_item: MACRO +MACRO sound_get_key_item db TX_SOUND_GET_KEY_ITEM ENDM const TX_SOUND_CAUGHT_MON ; $12 -sound_caught_mon: MACRO +MACRO sound_caught_mon db TX_SOUND_CAUGHT_MON ENDM const TX_SOUND_DEX_PAGE_ADDED ; $13 -sound_dex_page_added: MACRO +MACRO sound_dex_page_added db TX_SOUND_DEX_PAGE_ADDED ENDM const TX_SOUND_CRY_NIDORINA ; $14 -sound_cry_nidorina: MACRO +MACRO sound_cry_nidorina db TX_SOUND_CRY_NIDORINA ENDM const TX_SOUND_CRY_PIDGEOT ; $15 -sound_cry_pidgeot: MACRO +MACRO sound_cry_pidgeot db TX_SOUND_CRY_PIDGEOT ENDM const TX_SOUND_CRY_DEWGONG ; $16 -sound_cry_dewgong: MACRO +MACRO sound_cry_dewgong db TX_SOUND_CRY_DEWGONG ENDM const TX_FAR ; $17 -text_far: MACRO +MACRO text_far db TX_FAR dab \1 ; address of text commands ENDM @@ -152,7 +152,7 @@ ENDM const_next $50 const TX_END ; $50 -text_end: MACRO +MACRO text_end db TX_END ENDM @@ -161,12 +161,12 @@ ENDM const_def -1, -1 const TX_SCRIPT_POKECENTER_NURSE ; $ff -script_pokecenter_nurse: MACRO +MACRO script_pokecenter_nurse db TX_SCRIPT_POKECENTER_NURSE ENDM const TX_SCRIPT_MART ; $fe -script_mart: MACRO +MACRO script_mart db TX_SCRIPT_MART db _NARG ; number of items IF _NARG @@ -176,12 +176,12 @@ script_mart: MACRO ENDM const TX_SCRIPT_BILLS_PC ; $fd -script_bills_pc: MACRO +MACRO script_bills_pc db TX_SCRIPT_BILLS_PC ENDM const TX_SCRIPT_PLAYERS_PC ; $fc -script_players_pc: MACRO +MACRO script_players_pc db TX_SCRIPT_PLAYERS_PC ENDM @@ -190,23 +190,23 @@ ENDM const_skip ; $fa const TX_SCRIPT_POKECENTER_PC ; $f9 -script_pokecenter_pc: MACRO +MACRO script_pokecenter_pc db TX_SCRIPT_POKECENTER_PC ENDM const_skip ; $f8 const TX_SCRIPT_PRIZE_VENDOR ; $f7 -script_prize_vendor: MACRO +MACRO script_prize_vendor db TX_SCRIPT_PRIZE_VENDOR ENDM const TX_SCRIPT_CABLE_CLUB_RECEPTIONIST ; $f6 -script_cable_club_receptionist: MACRO +MACRO script_cable_club_receptionist db TX_SCRIPT_CABLE_CLUB_RECEPTIONIST ENDM const TX_SCRIPT_VENDING_MACHINE ; $f5 -script_vending_machine: MACRO +MACRO script_vending_machine db TX_SCRIPT_VENDING_MACHINE ENDM -- cgit v1.3.1-sl0p From bbb0e7e82deb6741f75a12b48f81076d92f5d9dc Mon Sep 17 00:00:00 2001 From: Rangi <35663410+Rangi42@users.noreply.github.com> Date: Thu, 11 Aug 2022 21:23:08 -0400 Subject: Use the same music headers as pokecrystal (#382) --- audio.asm | 6 +- audio/engine_1.asm | 84 ++--- audio/engine_2.asm | 94 +++--- audio/engine_3.asm | 84 ++--- audio/headers/musicheaders1.asm | 109 +++++-- audio/headers/musicheaders2.asm | 35 +- audio/headers/musicheaders3.asm | 96 +++++- audio/headers/sfxheaders1.asm | 375 +++++++++++++++------ audio/headers/sfxheaders2.asm | 471 ++++++++++++++++++++------- audio/headers/sfxheaders3.asm | 400 +++++++++++++++++------ audio/low_health_alarm.asm | 4 +- audio/poke_flute.asm | 2 +- audio/wave_instruments.asm | 33 -- audio/wave_samples.asm | 33 ++ constants/audio_constants.asm | 16 +- engine/battle/core.asm | 6 +- engine/battle/end_of_battle.asm | 2 +- engine/events/hidden_objects/safari_game.asm | 2 +- engine/items/item_effects.asm | 6 +- engine/movie/evolution.asm | 2 +- engine/overworld/elevator.asm | 2 +- home/audio.asm | 8 +- home/delay.asm | 2 +- home/overworld.asm | 4 +- macros/scripts/audio.asm | 55 ++-- scripts/PewterPokecenter.asm | 2 +- 26 files changed, 1346 insertions(+), 587 deletions(-) delete mode 100644 audio/wave_instruments.asm create mode 100644 audio/wave_samples.asm (limited to 'macros/scripts') diff --git a/audio.asm b/audio.asm index 35b0d872..e934c440 100644 --- a/audio.asm +++ b/audio.asm @@ -44,7 +44,7 @@ INCLUDE "audio/sfx/noise_instrument18_1.asm" INCLUDE "audio/sfx/noise_instrument19_1.asm" Audio1_WavePointers: -INCLUDE "audio/wave_instruments.asm" +INCLUDE "audio/wave_samples.asm" INCLUDE "audio/sfx/start_menu_1.asm" INCLUDE "audio/sfx/pokeflute.asm" @@ -144,7 +144,7 @@ INCLUDE "audio/sfx/noise_instrument18_2.asm" INCLUDE "audio/sfx/noise_instrument19_2.asm" Audio2_WavePointers: -INCLUDE "audio/wave_instruments.asm" +INCLUDE "audio/wave_samples.asm" INCLUDE "audio/sfx/press_ab_2.asm" INCLUDE "audio/sfx/start_menu_2.asm" @@ -270,7 +270,7 @@ INCLUDE "audio/sfx/noise_instrument18_3.asm" INCLUDE "audio/sfx/noise_instrument19_3.asm" Audio3_WavePointers: -INCLUDE "audio/wave_instruments.asm" +INCLUDE "audio/wave_samples.asm" INCLUDE "audio/sfx/start_menu_3.asm" INCLUDE "audio/sfx/cut_3.asm" diff --git a/audio/engine_1.asm b/audio/engine_1.asm index f9b4166a..8b30fb1a 100644 --- a/audio/engine_1.asm +++ b/audio/engine_1.asm @@ -1,7 +1,7 @@ ; The first of three duplicated sound engines. Audio1_UpdateMusic:: - ld c, Ch1 + ld c, CHAN1 .loop ld b, 0 ld hl, wChannelSoundIDs @@ -10,7 +10,7 @@ Audio1_UpdateMusic:: and a jr z, .nextChannel ld a, c - cp Ch5 + cp CHAN5 jr nc, .applyAffects ; if sfx channel ld a, [wMuteAudioAndPauseMusic] and a @@ -30,7 +30,7 @@ Audio1_UpdateMusic:: .nextChannel ld a, c inc c ; inc channel number - cp Ch8 + cp CHAN8 jr nz, .loop ret @@ -46,9 +46,9 @@ Audio1_ApplyMusicAffects: dec a ; otherwise, decrease the delay timer ld [hl], a ld a, c - cp Ch5 + cp CHAN5 jr nc, .startChecks ; if a sfx channel - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 add hl, bc ld a, [hl] and a @@ -171,7 +171,7 @@ Audio1_sound_ret: bit BIT_SOUND_CALL, [hl] jr nz, .returnFromCall ld a, c - cp Ch4 + cp CHAN4 jr nc, .noiseOrSfxChannel jr .disableChannelOutput .noiseOrSfxChannel @@ -179,7 +179,7 @@ Audio1_sound_ret: ld hl, wChannelFlags2 add hl, bc res BIT_EXECUTE_MUSIC, [hl] - cp Ch7 + cp CHAN7 jr nz, .skipSfxChannel3 ; restart hardware channel 3 (wave channel) output ld a, $0 @@ -223,19 +223,19 @@ Audio1_sound_ret: and [hl] ldh [rNR51], a .afterDisable - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp CRY_SFX_START jr nc, .maybeCry jr .skipCry .maybeCry - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp CRY_SFX_END jr z, .skipCry jr c, .cry jr .skipCry .cry ld a, c - cp Ch5 + cp CHAN5 jr z, .skipRewind call Audio1_GoBackOneCommandIfCry ret c @@ -336,14 +336,14 @@ Audio1_note_type: add hl, bc ld [hl], a ; store low nibble as speed ld a, c - cp Ch4 + cp CHAN4 jr z, .noiseChannel ; noise channel has 0 params call Audio1_GetNextMusicByte ld d, a ld a, c - cp Ch3 + cp CHAN3 jr z, .musicChannel3 - cp Ch7 + cp CHAN7 jr nz, .skipChannel3 ld hl, wSfxWaveInstrument jr .channel3 @@ -477,7 +477,7 @@ Audio1_tempo: cp tempo_cmd jr nz, Audio1_stereo_panning ld a, c - cp Ch5 + cp CHAN5 jr nc, .sfxChannel call Audio1_GetNextMusicByte ld [wMusicTempo], a ; store first param @@ -520,10 +520,10 @@ Audio1_unknownmusic0xef: ld a, [wDisableChannelOutputWhenSfxEnds] and a jr nz, .skip - ld a, [wChannelSoundIDs + Ch8] + ld a, [wChannelSoundIDs + CHAN8] ld [wDisableChannelOutputWhenSfxEnds], a xor a - ld [wChannelSoundIDs + Ch8], a + ld [wChannelSoundIDs + CHAN8], a .skip jp Audio1_sound_ret @@ -577,7 +577,7 @@ Audio1_sfx_note: cp sfx_note_cmd jr nz, Audio1_pitch_sweep ld a, c - cp Ch4 ; is this a noise or sfx channel? + cp CHAN4 ; is this a noise or sfx channel? jr c, Audio1_pitch_sweep ; no ld b, 0 ld hl, wChannelFlags2 @@ -607,7 +607,7 @@ Audio1_sfx_note: call Audio1_GetNextMusicByte ld e, a ld a, c - cp Ch8 + cp CHAN8 ld a, 0 jr z, .skip ; Channels 1 through 3 have 2 registers that control frequency, but the noise @@ -627,7 +627,7 @@ Audio1_sfx_note: Audio1_pitch_sweep: ld a, c - cp Ch5 + cp CHAN5 jr c, Audio1_note ; if not a sfx ld a, d cp pitch_sweep_cmd @@ -643,7 +643,7 @@ Audio1_pitch_sweep: Audio1_note: ld a, c - cp Ch4 + cp CHAN4 jr nz, Audio1_note_length ; if not noise channel ld a, d and $f0 @@ -701,7 +701,7 @@ Audio1_note_length: ld l, b call Audio1_MultiplyAdd ld a, c - cp Ch5 + cp CHAN5 jr nc, .sfxChannel ld a, [wMusicTempo] ld d, a @@ -711,7 +711,7 @@ Audio1_note_length: .sfxChannel ld d, $1 ld e, $0 - cp Ch8 + cp CHAN8 jr z, .skip ; if noise channel call Audio1_SetSfxTempo ld a, [wSfxTempo] @@ -751,10 +751,10 @@ Audio1_note_pitch: cp rest_cmd jr nz, .notRest ld a, c - cp Ch5 + cp CHAN5 jr nc, .next ; If this isn't an SFX channel, try the corresponding SFX channel. - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 add hl, bc ld a, [hl] and a @@ -762,9 +762,9 @@ Audio1_note_pitch: ; fall through .next ld a, c - cp Ch3 + cp CHAN3 jr z, .channel3 - cp Ch7 + cp CHAN7 jr nz, .notChannel3 .channel3 ld b, 0 @@ -800,10 +800,10 @@ Audio1_note_pitch: .skipPitchSlide push de ld a, c - cp Ch5 + cp CHAN5 jr nc, .sfxChannel ; if sfx channel ; If this isn't an SFX channel, try the corresponding SFX channel. - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 ld d, 0 ld e, a add hl, de @@ -848,12 +848,12 @@ Audio1_EnableChannelOutput: or [hl] ; set this channel's bits ld d, a ld a, c - cp Ch8 + cp CHAN8 jr z, .noiseChannelOrNoSfx - cp Ch5 + cp CHAN5 jr nc, .skip ; if sfx channel ; If this isn't an SFX channel, try the corresponding SFX channel. - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 add hl, bc ld a, [hl] and a @@ -883,9 +883,9 @@ Audio1_ApplyDutyCycleAndSoundLength: add hl, bc ld d, [hl] ld a, c - cp Ch3 + cp CHAN3 jr z, .skipDuty ; if music channel 3 - cp Ch7 + cp CHAN7 jr z, .skipDuty ; if sfx channel 3 ; include duty cycle (except on channel 3 which doesn't have it) ld a, d @@ -904,15 +904,15 @@ Audio1_ApplyDutyCycleAndSoundLength: Audio1_ApplyWavePatternAndFrequency: ld a, c - cp Ch3 + cp CHAN3 jr z, .channel3 - cp Ch7 + cp CHAN7 jr nz, .notChannel3 ; fall through .channel3 push de ld de, wMusicWaveInstrument - cp Ch3 + cp CHAN3 jr z, .next ld de, wSfxWaveInstrument .next @@ -1016,7 +1016,7 @@ Audio1_GoBackOneCommandIfCry: Audio1_IsCry: ; Returns whether the currently playing audio is a cry in carry. - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp CRY_SFX_START jr nc, .next jr .no @@ -1453,7 +1453,7 @@ Audio1_PlaySound:: and a jr z, .playChannel ld a, e - cp Ch8 + cp CHAN8 jr nz, .notNoiseChannel ld a, [wSoundID] cp NOISE_INSTRUMENTS_END @@ -1552,7 +1552,7 @@ Audio1_PlaySound:: add hl, de ld [hl], a ld a, e - cp Ch5 + cp CHAN5 jr nz, .skipSweepDisable ld a, $8 ldh [rNR10], a ; sweep off @@ -1654,7 +1654,7 @@ Audio1_PlaySound:: ld a, [wSoundID] ld [hl], a pop af - cp Ch4 + cp CHAN4 jr c, .skipSettingFlag ld hl, wChannelFlags1 add hl, bc @@ -1686,12 +1686,12 @@ Audio1_PlaySound:: jr c, .cry jr .done .cry - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 ld [hli], a ld [hli], a ld [hli], a ld [hl], a - ld hl, wChannelCommandPointers + Ch7 * 2 ; sfx wave channel pointer + ld hl, wChannelCommandPointers + CHAN7 * 2 ; sfx wave channel pointer ld de, Audio1_CryRet ld [hl], e inc hl diff --git a/audio/engine_2.asm b/audio/engine_2.asm index 30845fc8..8783c4c6 100644 --- a/audio/engine_2.asm +++ b/audio/engine_2.asm @@ -3,7 +3,7 @@ ; and the low health alarm that plays in battle Audio2_UpdateMusic:: - ld c, Ch1 + ld c, CHAN1 .loop ld b, 0 ld hl, wChannelSoundIDs @@ -12,7 +12,7 @@ Audio2_UpdateMusic:: and a jr z, .nextChannel ld a, c - cp Ch5 + cp CHAN5 jr nc, .applyAffects ; if sfx channel ld a, [wMuteAudioAndPauseMusic] and a @@ -32,7 +32,7 @@ Audio2_UpdateMusic:: .nextChannel ld a, c inc c ; inc channel number - cp Ch8 + cp CHAN8 jr nz, .loop ret @@ -48,9 +48,9 @@ Audio2_ApplyMusicAffects: dec a ; otherwise, decrease the delay timer ld [hl], a ld a, c - cp Ch5 + cp CHAN5 jr nc, .startChecks ; if a sfx channel - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 add hl, bc ld a, [hl] and a @@ -161,7 +161,7 @@ Audio2_PlayNextNote: res BIT_PITCH_SLIDE_DECREASING, [hl] ; --- this section is only present in this copy of the sound engine ld a, c - cp Ch5 + cp CHAN5 jr nz, .beginChecks ld a, [wLowHealthAlarm] ; low health alarm enabled? bit 7, a @@ -182,7 +182,7 @@ Audio2_sound_ret: bit BIT_SOUND_CALL, [hl] jr nz, .returnFromCall ld a, c - cp Ch4 + cp CHAN4 jr nc, .noiseOrSfxChannel jr .disableChannelOutput .noiseOrSfxChannel @@ -190,7 +190,7 @@ Audio2_sound_ret: ld hl, wChannelFlags2 add hl, bc res BIT_EXECUTE_MUSIC, [hl] - cp Ch7 + cp CHAN7 jr nz, .skipSfxChannel3 ; restart hardware channel 3 (wave channel) output ld a, $0 @@ -234,19 +234,19 @@ Audio2_sound_ret: and [hl] ldh [rNR51], a .afterDisable - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp CRY_SFX_START jr nc, .maybeCry jr .skipCry .maybeCry - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp CRY_SFX_END jr z, .skipCry jr c, .cry jr .skipCry .cry ld a, c - cp Ch5 + cp CHAN5 jr z, .skipRewind call Audio2_GoBackOneCommandIfCry ret c @@ -347,14 +347,14 @@ Audio2_note_type: add hl, bc ld [hl], a ; store low nibble as speed ld a, c - cp Ch4 + cp CHAN4 jr z, .noiseChannel ; noise channel has 0 params call Audio2_GetNextMusicByte ld d, a ld a, c - cp Ch3 + cp CHAN3 jr z, .musicChannel3 - cp Ch7 + cp CHAN7 jr nz, .skipChannel3 ld hl, wSfxWaveInstrument jr .channel3 @@ -488,7 +488,7 @@ Audio2_tempo: cp tempo_cmd jr nz, Audio2_stereo_panning ld a, c - cp Ch5 + cp CHAN5 jr nc, .sfxChannel call Audio2_GetNextMusicByte ld [wMusicTempo], a ; store first param @@ -531,10 +531,10 @@ Audio2_unknownmusic0xef: ld a, [wDisableChannelOutputWhenSfxEnds] and a jr nz, .skip - ld a, [wChannelSoundIDs + Ch8] + ld a, [wChannelSoundIDs + CHAN8] ld [wDisableChannelOutputWhenSfxEnds], a xor a - ld [wChannelSoundIDs + Ch8], a + ld [wChannelSoundIDs + CHAN8], a .skip jp Audio2_sound_ret @@ -588,7 +588,7 @@ Audio2_sfx_note: cp sfx_note_cmd jr nz, Audio2_pitch_sweep ld a, c - cp Ch4 ; is this a noise or sfx channel? + cp CHAN4 ; is this a noise or sfx channel? jr c, Audio2_pitch_sweep ; no ld b, 0 ld hl, wChannelFlags2 @@ -618,7 +618,7 @@ Audio2_sfx_note: call Audio2_GetNextMusicByte ld e, a ld a, c - cp Ch8 + cp CHAN8 ld a, 0 jr z, .skip ; Channels 1 through 3 have 2 registers that control frequency, but the noise @@ -638,7 +638,7 @@ Audio2_sfx_note: Audio2_pitch_sweep: ld a, c - cp Ch5 + cp CHAN5 jr c, Audio2_note ; if not a sfx ld a, d cp pitch_sweep_cmd @@ -654,7 +654,7 @@ Audio2_pitch_sweep: Audio2_note: ld a, c - cp Ch4 + cp CHAN4 jr nz, Audio2_note_length ; if not noise channel ld a, d and $f0 @@ -712,7 +712,7 @@ Audio2_note_length: ld l, b call Audio2_MultiplyAdd ld a, c - cp Ch5 + cp CHAN5 jr nc, .sfxChannel ld a, [wMusicTempo] ld d, a @@ -722,7 +722,7 @@ Audio2_note_length: .sfxChannel ld d, $1 ld e, $0 - cp Ch8 + cp CHAN8 jr z, .skip ; if noise channel call Audio2_SetSfxTempo ld a, [wSfxTempo] @@ -762,10 +762,10 @@ Audio2_note_pitch: cp rest_cmd jr nz, .notRest ld a, c - cp Ch5 + cp CHAN5 jr nc, .next ; If this isn't an SFX channel, try the corresponding SFX channel. - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 add hl, bc ld a, [hl] and a @@ -773,9 +773,9 @@ Audio2_note_pitch: ; fall through .next ld a, c - cp Ch3 + cp CHAN3 jr z, .channel3 - cp Ch7 + cp CHAN7 jr nz, .notChannel3 .channel3 ld b, 0 @@ -811,10 +811,10 @@ Audio2_note_pitch: .skipPitchSlide push de ld a, c - cp Ch5 + cp CHAN5 jr nc, .sfxChannel ; if sfx channel ; If this isn't an SFX channel, try the corresponding SFX channel. - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 ld d, 0 ld e, a add hl, de @@ -859,12 +859,12 @@ Audio2_EnableChannelOutput: or [hl] ; set this channel's bits ld d, a ld a, c - cp Ch8 + cp CHAN8 jr z, .noiseChannelOrNoSfx - cp Ch5 + cp CHAN5 jr nc, .skip ; if sfx channel ; If this isn't an SFX channel, try the corresponding SFX channel. - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 add hl, bc ld a, [hl] and a @@ -894,9 +894,9 @@ Audio2_ApplyDutyCycleAndSoundLength: add hl, bc ld d, [hl] ld a, c - cp Ch3 + cp CHAN3 jr z, .skipDuty ; if music channel 3 - cp Ch7 + cp CHAN7 jr z, .skipDuty ; if sfx channel 3 ; include duty cycle (except on channel 3 which doesn't have it) ld a, d @@ -915,15 +915,15 @@ Audio2_ApplyDutyCycleAndSoundLength: Audio2_ApplyWavePatternAndFrequency: ld a, c - cp Ch3 + cp CHAN3 jr z, .channel3 - cp Ch7 + cp CHAN7 jr nz, .notChannel3 ; fall through .channel3 push de ld de, wMusicWaveInstrument - cp Ch3 + cp CHAN3 jr z, .next ld de, wSfxWaveInstrument .next @@ -963,7 +963,7 @@ Audio2_ApplyWavePatternAndFrequency: ld [hl], d ; store frequency high byte ; --- this section is only present in this copy of the sound engine ld a, c - cp Ch5 + cp CHAN5 jr c, .musicChannel call Audio2_ApplyFrequencyModifier .musicChannel @@ -974,7 +974,7 @@ Audio2_ApplyWavePatternAndFrequency: ; unused Audio2_ResetCryModifiers: ld a, c - cp Ch5 + cp CHAN5 jr nz, .skip ld a, [wLowHealthAlarm] bit 7, a @@ -1056,7 +1056,7 @@ Audio2_GoBackOneCommandIfCry: Audio2_IsCry: ; Returns whether the currently playing audio is a cry in carry. - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp CRY_SFX_START jr nc, .next jr .no @@ -1075,9 +1075,9 @@ Audio2_IsCry: ; --- this section is only present in this copy of the sound engine Audio2_IsBattleSFX: ; Returns whether the currently playing audio is a battle sfx in carry. - ld a, [wChannelSoundIDs + Ch8] + ld a, [wChannelSoundIDs + CHAN8] ld b, a - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] or b cp BATTLE_SFX_START jr nc, .next @@ -1516,7 +1516,7 @@ Audio2_PlaySound:: and a jr z, .playChannel ld a, e - cp Ch8 + cp CHAN8 jr nz, .notNoiseChannel ld a, [wSoundID] cp NOISE_INSTRUMENTS_END @@ -1615,7 +1615,7 @@ Audio2_PlaySound:: add hl, de ld [hl], a ld a, e - cp Ch5 + cp CHAN5 jr nz, .skipSweepDisable ld a, $8 ldh [rNR10], a ; sweep off @@ -1717,7 +1717,7 @@ Audio2_PlaySound:: ld a, [wSoundID] ld [hl], a pop af - cp Ch4 + cp CHAN4 jr c, .skipSettingFlag ld hl, wChannelFlags1 add hl, bc @@ -1749,12 +1749,12 @@ Audio2_PlaySound:: jr c, .cry jr .done .cry - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 ld [hli], a ld [hli], a ld [hli], a ld [hl], a - ld hl, wChannelCommandPointers + Ch7 * 2 ; sfx wave channel pointer + ld hl, wChannelCommandPointers + CHAN7 * 2 ; sfx wave channel pointer ld de, Audio2_CryRet ld [hl], e inc hl diff --git a/audio/engine_3.asm b/audio/engine_3.asm index 57618486..404e6e7c 100644 --- a/audio/engine_3.asm +++ b/audio/engine_3.asm @@ -1,7 +1,7 @@ ; The third of three duplicated sound engines. Audio3_UpdateMusic:: - ld c, Ch1 + ld c, CHAN1 .loop ld b, 0 ld hl, wChannelSoundIDs @@ -10,7 +10,7 @@ Audio3_UpdateMusic:: and a jr z, .nextChannel ld a, c - cp Ch5 + cp CHAN5 jr nc, .applyAffects ; if sfx channel ld a, [wMuteAudioAndPauseMusic] and a @@ -30,7 +30,7 @@ Audio3_UpdateMusic:: .nextChannel ld a, c inc c ; inc channel number - cp Ch8 + cp CHAN8 jr nz, .loop ret @@ -46,9 +46,9 @@ Audio3_ApplyMusicAffects: dec a ; otherwise, decrease the delay timer ld [hl], a ld a, c - cp Ch5 + cp CHAN5 jr nc, .startChecks ; if a sfx channel - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 add hl, bc ld a, [hl] and a @@ -171,7 +171,7 @@ Audio3_sound_ret: bit BIT_SOUND_CALL, [hl] jr nz, .returnFromCall ld a, c - cp Ch4 + cp CHAN4 jr nc, .noiseOrSfxChannel jr .disableChannelOutput .noiseOrSfxChannel @@ -179,7 +179,7 @@ Audio3_sound_ret: ld hl, wChannelFlags2 add hl, bc res BIT_EXECUTE_MUSIC, [hl] - cp Ch7 + cp CHAN7 jr nz, .skipSfxChannel3 ; restart hardware channel 3 (wave channel) output ld a, $0 @@ -223,19 +223,19 @@ Audio3_sound_ret: and [hl] ldh [rNR51], a .afterDisable - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp CRY_SFX_START jr nc, .maybeCry jr .skipCry .maybeCry - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp CRY_SFX_END jr z, .skipCry jr c, .cry jr .skipCry .cry ld a, c - cp Ch5 + cp CHAN5 jr z, .skipRewind call Audio3_GoBackOneCommandIfCry ret c @@ -336,14 +336,14 @@ Audio3_note_type: add hl, bc ld [hl], a ; store low nibble as speed ld a, c - cp Ch4 + cp CHAN4 jr z, .noiseChannel ; noise channel has 0 params call Audio3_GetNextMusicByte ld d, a ld a, c - cp Ch3 + cp CHAN3 jr z, .musicChannel3 - cp Ch7 + cp CHAN7 jr nz, .skipChannel3 ld hl, wSfxWaveInstrument jr .channel3 @@ -477,7 +477,7 @@ Audio3_tempo: cp tempo_cmd jr nz, Audio3_stereo_panning ld a, c - cp Ch5 + cp CHAN5 jr nc, .sfxChannel call Audio3_GetNextMusicByte ld [wMusicTempo], a ; store first param @@ -520,10 +520,10 @@ Audio3_unknownmusic0xef: ld a, [wDisableChannelOutputWhenSfxEnds] and a jr nz, .skip - ld a, [wChannelSoundIDs + Ch8] + ld a, [wChannelSoundIDs + CHAN8] ld [wDisableChannelOutputWhenSfxEnds], a xor a - ld [wChannelSoundIDs + Ch8], a + ld [wChannelSoundIDs + CHAN8], a .skip jp Audio3_sound_ret @@ -577,7 +577,7 @@ Audio3_sfx_note: cp sfx_note_cmd jr nz, Audio3_pitch_sweep ld a, c - cp Ch4 ; is this a noise or sfx channel? + cp CHAN4 ; is this a noise or sfx channel? jr c, Audio3_pitch_sweep ; no ld b, 0 ld hl, wChannelFlags2 @@ -607,7 +607,7 @@ Audio3_sfx_note: call Audio3_GetNextMusicByte ld e, a ld a, c - cp Ch8 + cp CHAN8 ld a, 0 jr z, .skip ; Channels 1 through 3 have 2 registers that control frequency, but the noise @@ -627,7 +627,7 @@ Audio3_sfx_note: Audio3_pitch_sweep: ld a, c - cp Ch5 + cp CHAN5 jr c, Audio3_note ; if not a sfx ld a, d cp pitch_sweep_cmd @@ -643,7 +643,7 @@ Audio3_pitch_sweep: Audio3_note: ld a, c - cp Ch4 + cp CHAN4 jr nz, Audio3_note_length ; if not noise channel ld a, d and $f0 @@ -701,7 +701,7 @@ Audio3_note_length: ld l, b call Audio3_MultiplyAdd ld a, c - cp Ch5 + cp CHAN5 jr nc, .sfxChannel ld a, [wMusicTempo] ld d, a @@ -711,7 +711,7 @@ Audio3_note_length: .sfxChannel ld d, $1 ld e, $0 - cp Ch8 + cp CHAN8 jr z, .skip ; if noise channel call Audio3_SetSfxTempo ld a, [wSfxTempo] @@ -751,10 +751,10 @@ Audio3_note_pitch: cp rest_cmd jr nz, .notRest ld a, c - cp Ch5 + cp CHAN5 jr nc, .next ; If this isn't an SFX channel, try the corresponding SFX channel. - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 add hl, bc ld a, [hl] and a @@ -762,9 +762,9 @@ Audio3_note_pitch: ; fall through .next ld a, c - cp Ch3 + cp CHAN3 jr z, .channel3 - cp Ch7 + cp CHAN7 jr nz, .notChannel3 .channel3 ld b, 0 @@ -800,10 +800,10 @@ Audio3_note_pitch: .skipPitchSlide push de ld a, c - cp Ch5 + cp CHAN5 jr nc, .sfxChannel ; if sfx channel ; If this isn't an SFX channel, try the corresponding SFX channel. - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 ld d, 0 ld e, a add hl, de @@ -848,12 +848,12 @@ Audio3_EnableChannelOutput: or [hl] ; set this channel's bits ld d, a ld a, c - cp Ch8 + cp CHAN8 jr z, .noiseChannelOrNoSfx - cp Ch5 + cp CHAN5 jr nc, .skip ; if sfx channel ; If this isn't an SFX channel, try the corresponding SFX channel. - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 add hl, bc ld a, [hl] and a @@ -883,9 +883,9 @@ Audio3_ApplyDutyCycleAndSoundLength: add hl, bc ld d, [hl] ld a, c - cp Ch3 + cp CHAN3 jr z, .skipDuty ; if music channel 3 - cp Ch7 + cp CHAN7 jr z, .skipDuty ; if sfx channel 3 ; include duty cycle (except on channel 3 which doesn't have it) ld a, d @@ -904,15 +904,15 @@ Audio3_ApplyDutyCycleAndSoundLength: Audio3_ApplyWavePatternAndFrequency: ld a, c - cp Ch3 + cp CHAN3 jr z, .channel3 - cp Ch7 + cp CHAN7 jr nz, .notChannel3 ; fall through .channel3 push de ld de, wMusicWaveInstrument - cp Ch3 + cp CHAN3 jr z, .next ld de, wSfxWaveInstrument .next @@ -1016,7 +1016,7 @@ Audio3_GoBackOneCommandIfCry: Audio3_IsCry: ; Returns whether the currently playing audio is a cry in carry. - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp CRY_SFX_START jr nc, .next jr .no @@ -1453,7 +1453,7 @@ Audio3_PlaySound:: and a jr z, .playChannel ld a, e - cp Ch8 + cp CHAN8 jr nz, .notNoiseChannel ld a, [wSoundID] cp NOISE_INSTRUMENTS_END @@ -1552,7 +1552,7 @@ Audio3_PlaySound:: add hl, de ld [hl], a ld a, e - cp Ch5 + cp CHAN5 jr nz, .skipSweepDisable ld a, $8 ldh [rNR10], a ; sweep off @@ -1654,7 +1654,7 @@ Audio3_PlaySound:: ld a, [wSoundID] ld [hl], a pop af - cp Ch4 + cp CHAN4 jr c, .skipSettingFlag ld hl, wChannelFlags1 add hl, bc @@ -1686,12 +1686,12 @@ Audio3_PlaySound:: jr c, .cry jr .done .cry - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 ld [hli], a ld [hli], a ld [hli], a ld [hl], a - ld hl, wChannelCommandPointers + Ch7 * 2 ; sfx wave channel pointer + ld hl, wChannelCommandPointers + CHAN7 * 2 ; sfx wave channel pointer ld de, Audio3_CryRet ld [hl], e inc hl diff --git a/audio/headers/musicheaders1.asm b/audio/headers/musicheaders1.asm index ef85eae6..fb387671 100644 --- a/audio/headers/musicheaders1.asm +++ b/audio/headers/musicheaders1.asm @@ -1,66 +1,135 @@ Music_PalletTown:: - audio_header Music_PalletTown, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_PalletTown_Ch1 + channel 2, Music_PalletTown_Ch2 + channel 3, Music_PalletTown_Ch3 Music_Pokecenter:: - audio_header Music_Pokecenter, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_Pokecenter_Ch1 + channel 2, Music_Pokecenter_Ch2 + channel 3, Music_Pokecenter_Ch3 Music_Gym:: - audio_header Music_Gym, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_Gym_Ch1 + channel 2, Music_Gym_Ch2 + channel 3, Music_Gym_Ch3 ; Viridian City, Pewter City, Saffron City Music_Cities1:: - audio_header Music_Cities1, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Cities1_Ch1 + channel 2, Music_Cities1_Ch2 + channel 3, Music_Cities1_Ch3 + channel 4, Music_Cities1_Ch4 ; Cerulean City, Fuchsia City Music_Cities2:: - audio_header Music_Cities2, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_Cities2_Ch1 + channel 2, Music_Cities2_Ch2 + channel 3, Music_Cities2_Ch3 Music_Celadon:: - audio_header Music_Celadon, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_Celadon_Ch1 + channel 2, Music_Celadon_Ch2 + channel 3, Music_Celadon_Ch3 Music_Cinnabar:: - audio_header Music_Cinnabar, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_Cinnabar_Ch1 + channel 2, Music_Cinnabar_Ch2 + channel 3, Music_Cinnabar_Ch3 Music_Vermilion:: - audio_header Music_Vermilion, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Vermilion_Ch1 + channel 2, Music_Vermilion_Ch2 + channel 3, Music_Vermilion_Ch3 + channel 4, Music_Vermilion_Ch4 Music_Lavender:: - audio_header Music_Lavender, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Lavender_Ch1 + channel 2, Music_Lavender_Ch2 + channel 3, Music_Lavender_Ch3 + channel 4, Music_Lavender_Ch4 Music_SSAnne:: - audio_header Music_SSAnne, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_SSAnne_Ch1 + channel 2, Music_SSAnne_Ch2 + channel 3, Music_SSAnne_Ch3 Music_MeetProfOak:: - audio_header Music_MeetProfOak, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_MeetProfOak_Ch1 + channel 2, Music_MeetProfOak_Ch2 + channel 3, Music_MeetProfOak_Ch3 Music_MeetRival:: - audio_header Music_MeetRival, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_MeetRival_Ch1 + channel 2, Music_MeetRival_Ch2 + channel 3, Music_MeetRival_Ch3 Music_MuseumGuy:: - audio_header Music_MuseumGuy, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_MuseumGuy_Ch1 + channel 2, Music_MuseumGuy_Ch2 + channel 3, Music_MuseumGuy_Ch3 + channel 4, Music_MuseumGuy_Ch4 Music_SafariZone:: - audio_header Music_SafariZone, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_SafariZone_Ch1 + channel 2, Music_SafariZone_Ch2 + channel 3, Music_SafariZone_Ch3 Music_PkmnHealed:: - audio_header Music_PkmnHealed, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_PkmnHealed_Ch1 + channel 2, Music_PkmnHealed_Ch2 + channel 3, Music_PkmnHealed_Ch3 ; Routes 1 and 2 Music_Routes1:: - audio_header Music_Routes1, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Routes1_Ch1 + channel 2, Music_Routes1_Ch2 + channel 3, Music_Routes1_Ch3 + channel 4, Music_Routes1_Ch4 ; Routes 24 and 25 Music_Routes2:: - audio_header Music_Routes2, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Routes2_Ch1 + channel 2, Music_Routes2_Ch2 + channel 3, Music_Routes2_Ch3 + channel 4, Music_Routes2_Ch4 ; Routes 3, 4, 5, 6, 7, 8, 9, 10, 16, 17, 18, 19, 20, 21, 22 Music_Routes3:: - audio_header Music_Routes3, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Routes3_Ch1 + channel 2, Music_Routes3_Ch2 + channel 3, Music_Routes3_Ch3 + channel 4, Music_Routes3_Ch4 ; Routes 11, 12, 13, 14, 15 Music_Routes4:: - audio_header Music_Routes4, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Routes4_Ch1 + channel 2, Music_Routes4_Ch2 + channel 3, Music_Routes4_Ch3 + channel 4, Music_Routes4_Ch4 ; Route 23, Indigo Plateau Music_IndigoPlateau:: - audio_header Music_IndigoPlateau, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_IndigoPlateau_Ch1 + channel 2, Music_IndigoPlateau_Ch2 + channel 3, Music_IndigoPlateau_Ch3 + channel 4, Music_IndigoPlateau_Ch4 diff --git a/audio/headers/musicheaders2.asm b/audio/headers/musicheaders2.asm index d6cca9a9..c24c08d6 100644 --- a/audio/headers/musicheaders2.asm +++ b/audio/headers/musicheaders2.asm @@ -1,20 +1,41 @@ Music_GymLeaderBattle:: - audio_header Music_GymLeaderBattle, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_GymLeaderBattle_Ch1 + channel 2, Music_GymLeaderBattle_Ch2 + channel 3, Music_GymLeaderBattle_Ch3 Music_TrainerBattle:: - audio_header Music_TrainerBattle, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_TrainerBattle_Ch1 + channel 2, Music_TrainerBattle_Ch2 + channel 3, Music_TrainerBattle_Ch3 Music_WildBattle:: - audio_header Music_WildBattle, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_WildBattle_Ch1 + channel 2, Music_WildBattle_Ch2 + channel 3, Music_WildBattle_Ch3 Music_FinalBattle:: - audio_header Music_FinalBattle, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_FinalBattle_Ch1 + channel 2, Music_FinalBattle_Ch2 + channel 3, Music_FinalBattle_Ch3 Music_DefeatedTrainer:: - audio_header Music_DefeatedTrainer, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_DefeatedTrainer_Ch1 + channel 2, Music_DefeatedTrainer_Ch2 + channel 3, Music_DefeatedTrainer_Ch3 Music_DefeatedWildMon:: - audio_header Music_DefeatedWildMon, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_DefeatedWildMon_Ch1 + channel 2, Music_DefeatedWildMon_Ch2 + channel 3, Music_DefeatedWildMon_Ch3 Music_DefeatedGymLeader:: - audio_header Music_DefeatedGymLeader, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_DefeatedGymLeader_Ch1 + channel 2, Music_DefeatedGymLeader_Ch2 + channel 3, Music_DefeatedGymLeader_Ch3 diff --git a/audio/headers/musicheaders3.asm b/audio/headers/musicheaders3.asm index ca21b419..82699f8e 100644 --- a/audio/headers/musicheaders3.asm +++ b/audio/headers/musicheaders3.asm @@ -1,56 +1,116 @@ Music_TitleScreen:: - audio_header Music_TitleScreen, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_TitleScreen_Ch1 + channel 2, Music_TitleScreen_Ch2 + channel 3, Music_TitleScreen_Ch3 + channel 4, Music_TitleScreen_Ch4 Music_Credits:: - audio_header Music_Credits, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_Credits_Ch1 + channel 2, Music_Credits_Ch2 + channel 3, Music_Credits_Ch3 Music_HallOfFame:: - audio_header Music_HallOfFame, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_HallOfFame_Ch1 + channel 2, Music_HallOfFame_Ch2 + channel 3, Music_HallOfFame_Ch3 Music_OaksLab:: - audio_header Music_OaksLab, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_OaksLab_Ch1 + channel 2, Music_OaksLab_Ch2 + channel 3, Music_OaksLab_Ch3 Music_JigglypuffSong:: - audio_header Music_JigglypuffSong, Ch1, Ch2 + channel_count 2 + channel 1, Music_JigglypuffSong_Ch1 + channel 2, Music_JigglypuffSong_Ch2 Music_BikeRiding:: - audio_header Music_BikeRiding, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_BikeRiding_Ch1 + channel 2, Music_BikeRiding_Ch2 + channel 3, Music_BikeRiding_Ch3 + channel 4, Music_BikeRiding_Ch4 Music_Surfing:: - audio_header Music_Surfing, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_Surfing_Ch1 + channel 2, Music_Surfing_Ch2 + channel 3, Music_Surfing_Ch3 Music_GameCorner:: - audio_header Music_GameCorner, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_GameCorner_Ch1 + channel 2, Music_GameCorner_Ch2 + channel 3, Music_GameCorner_Ch3 Music_IntroBattle:: - audio_header Music_IntroBattle, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_IntroBattle_Ch1 + channel 2, Music_IntroBattle_Ch2 + channel 3, Music_IntroBattle_Ch3 + channel 4, Music_IntroBattle_Ch4 ; Power Plant, Cerulean Cave, Rocket HQ Music_Dungeon1:: - audio_header Music_Dungeon1, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Dungeon1_Ch1 + channel 2, Music_Dungeon1_Ch2 + channel 3, Music_Dungeon1_Ch3 + channel 4, Music_Dungeon1_Ch4 ; Viridian Forest, Seafoam Islands Music_Dungeon2:: - audio_header Music_Dungeon2, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Dungeon2_Ch1 + channel 2, Music_Dungeon2_Ch2 + channel 3, Music_Dungeon2_Ch3 + channel 4, Music_Dungeon2_Ch4 ; Mt. Moon, Rock Tunnel, Victory Road Music_Dungeon3:: - audio_header Music_Dungeon3, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_Dungeon3_Ch1 + channel 2, Music_Dungeon3_Ch2 + channel 3, Music_Dungeon3_Ch3 + channel 4, Music_Dungeon3_Ch4 Music_CinnabarMansion:: - audio_header Music_CinnabarMansion, Ch1, Ch2, Ch3, Ch4 + channel_count 4 + channel 1, Music_CinnabarMansion_Ch1 + channel 2, Music_CinnabarMansion_Ch2 + channel 3, Music_CinnabarMansion_Ch3 + channel 4, Music_CinnabarMansion_Ch4 Music_PokemonTower:: - audio_header Music_PokemonTower, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_PokemonTower_Ch1 + channel 2, Music_PokemonTower_Ch2 + channel 3, Music_PokemonTower_Ch3 Music_SilphCo:: - audio_header Music_SilphCo, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_SilphCo_Ch1 + channel 2, Music_SilphCo_Ch2 + channel 3, Music_SilphCo_Ch3 Music_MeetEvilTrainer:: - audio_header Music_MeetEvilTrainer, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_MeetEvilTrainer_Ch1 + channel 2, Music_MeetEvilTrainer_Ch2 + channel 3, Music_MeetEvilTrainer_Ch3 Music_MeetFemaleTrainer:: - audio_header Music_MeetFemaleTrainer, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_MeetFemaleTrainer_Ch1 + channel 2, Music_MeetFemaleTrainer_Ch2 + channel 3, Music_MeetFemaleTrainer_Ch3 Music_MeetMaleTrainer:: - audio_header Music_MeetMaleTrainer, Ch1, Ch2, Ch3 + channel_count 3 + channel 1, Music_MeetMaleTrainer_Ch1 + channel 2, Music_MeetMaleTrainer_Ch2 + channel 3, Music_MeetMaleTrainer_Ch3 diff --git a/audio/headers/sfxheaders1.asm b/audio/headers/sfxheaders1.asm index 2d5eca4a..297b7582 100644 --- a/audio/headers/sfxheaders1.asm +++ b/audio/headers/sfxheaders1.asm @@ -2,287 +2,472 @@ SFX_Headers_1:: db $ff, $ff, $ff ; padding SFX_Noise_Instrument01_1:: - audio_header SFX_Noise_Instrument01_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument01_1_Ch8 SFX_Noise_Instrument02_1:: - audio_header SFX_Noise_Instrument02_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument02_1_Ch8 SFX_Noise_Instrument03_1:: - audio_header SFX_Noise_Instrument03_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument03_1_Ch8 SFX_Noise_Instrument04_1:: - audio_header SFX_Noise_Instrument04_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument04_1_Ch8 SFX_Noise_Instrument05_1:: - audio_header SFX_Noise_Instrument05_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument05_1_Ch8 SFX_Noise_Instrument06_1:: - audio_header SFX_Noise_Instrument06_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument06_1_Ch8 SFX_Noise_Instrument07_1:: - audio_header SFX_Noise_Instrument07_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument07_1_Ch8 SFX_Noise_Instrument08_1:: - audio_header SFX_Noise_Instrument08_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument08_1_Ch8 SFX_Noise_Instrument09_1:: - audio_header SFX_Noise_Instrument09_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument09_1_Ch8 SFX_Noise_Instrument10_1:: - audio_header SFX_Noise_Instrument10_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument10_1_Ch8 SFX_Noise_Instrument11_1:: - audio_header SFX_Noise_Instrument11_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument11_1_Ch8 SFX_Noise_Instrument12_1:: - audio_header SFX_Noise_Instrument12_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument12_1_Ch8 SFX_Noise_Instrument13_1:: - audio_header SFX_Noise_Instrument13_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument13_1_Ch8 SFX_Noise_Instrument14_1:: - audio_header SFX_Noise_Instrument14_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument14_1_Ch8 SFX_Noise_Instrument15_1:: - audio_header SFX_Noise_Instrument15_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument15_1_Ch8 SFX_Noise_Instrument16_1:: - audio_header SFX_Noise_Instrument16_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument16_1_Ch8 SFX_Noise_Instrument17_1:: - audio_header SFX_Noise_Instrument17_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument17_1_Ch8 SFX_Noise_Instrument18_1:: - audio_header SFX_Noise_Instrument18_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument18_1_Ch8 SFX_Noise_Instrument19_1:: - audio_header SFX_Noise_Instrument19_1, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument19_1_Ch8 SFX_Cry00_1:: - audio_header SFX_Cry00_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry00_1_Ch5 + channel 6, SFX_Cry00_1_Ch6 + channel 8, SFX_Cry00_1_Ch8 SFX_Cry01_1:: - audio_header SFX_Cry01_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry01_1_Ch5 + channel 6, SFX_Cry01_1_Ch6 + channel 8, SFX_Cry01_1_Ch8 SFX_Cry02_1:: - audio_header SFX_Cry02_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry02_1_Ch5 + channel 6, SFX_Cry02_1_Ch6 + channel 8, SFX_Cry02_1_Ch8 SFX_Cry03_1:: - audio_header SFX_Cry03_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry03_1_Ch5 + channel 6, SFX_Cry03_1_Ch6 + channel 8, SFX_Cry03_1_Ch8 SFX_Cry04_1:: - audio_header SFX_Cry04_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry04_1_Ch5 + channel 6, SFX_Cry04_1_Ch6 + channel 8, SFX_Cry04_1_Ch8 SFX_Cry05_1:: - audio_header SFX_Cry05_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry05_1_Ch5 + channel 6, SFX_Cry05_1_Ch6 + channel 8, SFX_Cry05_1_Ch8 SFX_Cry06_1:: - audio_header SFX_Cry06_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry06_1_Ch5 + channel 6, SFX_Cry06_1_Ch6 + channel 8, SFX_Cry06_1_Ch8 SFX_Cry07_1:: - audio_header SFX_Cry07_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry07_1_Ch5 + channel 6, SFX_Cry07_1_Ch6 + channel 8, SFX_Cry07_1_Ch8 SFX_Cry08_1:: - audio_header SFX_Cry08_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry08_1_Ch5 + channel 6, SFX_Cry08_1_Ch6 + channel 8, SFX_Cry08_1_Ch8 SFX_Cry09_1:: - audio_header SFX_Cry09_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry09_1_Ch5 + channel 6, SFX_Cry09_1_Ch6 + channel 8, SFX_Cry09_1_Ch8 SFX_Cry0A_1:: - audio_header SFX_Cry0A_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0A_1_Ch5 + channel 6, SFX_Cry0A_1_Ch6 + channel 8, SFX_Cry0A_1_Ch8 SFX_Cry0B_1:: - audio_header SFX_Cry0B_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0B_1_Ch5 + channel 6, SFX_Cry0B_1_Ch6 + channel 8, SFX_Cry0B_1_Ch8 SFX_Cry0C_1:: - audio_header SFX_Cry0C_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0C_1_Ch5 + channel 6, SFX_Cry0C_1_Ch6 + channel 8, SFX_Cry0C_1_Ch8 SFX_Cry0D_1:: - audio_header SFX_Cry0D_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0D_1_Ch5 + channel 6, SFX_Cry0D_1_Ch6 + channel 8, SFX_Cry0D_1_Ch8 SFX_Cry0E_1:: - audio_header SFX_Cry0E_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0E_1_Ch5 + channel 6, SFX_Cry0E_1_Ch6 + channel 8, SFX_Cry0E_1_Ch8 SFX_Cry0F_1:: - audio_header SFX_Cry0F_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0F_1_Ch5 + channel 6, SFX_Cry0F_1_Ch6 + channel 8, SFX_Cry0F_1_Ch8 SFX_Cry10_1:: - audio_header SFX_Cry10_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry10_1_Ch5 + channel 6, SFX_Cry10_1_Ch6 + channel 8, SFX_Cry10_1_Ch8 SFX_Cry11_1:: - audio_header SFX_Cry11_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry11_1_Ch5 + channel 6, SFX_Cry11_1_Ch6 + channel 8, SFX_Cry11_1_Ch8 SFX_Cry12_1:: - audio_header SFX_Cry12_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry12_1_Ch5 + channel 6, SFX_Cry12_1_Ch6 + channel 8, SFX_Cry12_1_Ch8 SFX_Cry13_1:: - audio_header SFX_Cry13_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry13_1_Ch5 + channel 6, SFX_Cry13_1_Ch6 + channel 8, SFX_Cry13_1_Ch8 SFX_Cry14_1:: - audio_header SFX_Cry14_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry14_1_Ch5 + channel 6, SFX_Cry14_1_Ch6 + channel 8, SFX_Cry14_1_Ch8 SFX_Cry15_1:: - audio_header SFX_Cry15_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry15_1_Ch5 + channel 6, SFX_Cry15_1_Ch6 + channel 8, SFX_Cry15_1_Ch8 SFX_Cry16_1:: - audio_header SFX_Cry16_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry16_1_Ch5 + channel 6, SFX_Cry16_1_Ch6 + channel 8, SFX_Cry16_1_Ch8 SFX_Cry17_1:: - audio_header SFX_Cry17_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry17_1_Ch5 + channel 6, SFX_Cry17_1_Ch6 + channel 8, SFX_Cry17_1_Ch8 SFX_Cry18_1:: - audio_header SFX_Cry18_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry18_1_Ch5 + channel 6, SFX_Cry18_1_Ch6 + channel 8, SFX_Cry18_1_Ch8 SFX_Cry19_1:: - audio_header SFX_Cry19_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry19_1_Ch5 + channel 6, SFX_Cry19_1_Ch6 + channel 8, SFX_Cry19_1_Ch8 SFX_Cry1A_1:: - audio_header SFX_Cry1A_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1A_1_Ch5 + channel 6, SFX_Cry1A_1_Ch6 + channel 8, SFX_Cry1A_1_Ch8 SFX_Cry1B_1:: - audio_header SFX_Cry1B_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1B_1_Ch5 + channel 6, SFX_Cry1B_1_Ch6 + channel 8, SFX_Cry1B_1_Ch8 SFX_Cry1C_1:: - audio_header SFX_Cry1C_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1C_1_Ch5 + channel 6, SFX_Cry1C_1_Ch6 + channel 8, SFX_Cry1C_1_Ch8 SFX_Cry1D_1:: - audio_header SFX_Cry1D_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1D_1_Ch5 + channel 6, SFX_Cry1D_1_Ch6 + channel 8, SFX_Cry1D_1_Ch8 SFX_Cry1E_1:: - audio_header SFX_Cry1E_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1E_1_Ch5 + channel 6, SFX_Cry1E_1_Ch6 + channel 8, SFX_Cry1E_1_Ch8 SFX_Cry1F_1:: - audio_header SFX_Cry1F_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1F_1_Ch5 + channel 6, SFX_Cry1F_1_Ch6 + channel 8, SFX_Cry1F_1_Ch8 SFX_Cry20_1:: - audio_header SFX_Cry20_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry20_1_Ch5 + channel 6, SFX_Cry20_1_Ch6 + channel 8, SFX_Cry20_1_Ch8 SFX_Cry21_1:: - audio_header SFX_Cry21_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry21_1_Ch5 + channel 6, SFX_Cry21_1_Ch6 + channel 8, SFX_Cry21_1_Ch8 SFX_Cry22_1:: - audio_header SFX_Cry22_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry22_1_Ch5 + channel 6, SFX_Cry22_1_Ch6 + channel 8, SFX_Cry22_1_Ch8 SFX_Cry23_1:: - audio_header SFX_Cry23_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry23_1_Ch5 + channel 6, SFX_Cry23_1_Ch6 + channel 8, SFX_Cry23_1_Ch8 SFX_Cry24_1:: - audio_header SFX_Cry24_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry24_1_Ch5 + channel 6, SFX_Cry24_1_Ch6 + channel 8, SFX_Cry24_1_Ch8 SFX_Cry25_1:: - audio_header SFX_Cry25_1, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry25_1_Ch5 + channel 6, SFX_Cry25_1_Ch6 + channel 8, SFX_Cry25_1_Ch8 SFX_Get_Item1_1:: - audio_header SFX_Get_Item1_1, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Get_Item1_1_Ch5 + channel 6, SFX_Get_Item1_1_Ch6 + channel 7, SFX_Get_Item1_1_Ch7 SFX_Get_Item2_1:: - audio_header SFX_Get_Item2_1, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Get_Item2_1_Ch5 + channel 6, SFX_Get_Item2_1_Ch6 + channel 7, SFX_Get_Item2_1_Ch7 SFX_Tink_1:: - audio_header SFX_Tink_1, Ch5 + channel_count 1 + channel 5, SFX_Tink_1_Ch5 SFX_Heal_HP_1:: - audio_header SFX_Heal_HP_1, Ch5 + channel_count 1 + channel 5, SFX_Heal_HP_1_Ch5 SFX_Heal_Ailment_1:: - audio_header SFX_Heal_Ailment_1, Ch5 + channel_count 1 + channel 5, SFX_Heal_Ailment_1_Ch5 SFX_Start_Menu_1:: - audio_header SFX_Start_Menu_1, Ch8 + channel_count 1 + channel 8, SFX_Start_Menu_1_Ch8 SFX_Press_AB_1:: - audio_header SFX_Press_AB_1, Ch5 + channel_count 1 + channel 5, SFX_Press_AB_1_Ch5 SFX_Pokedex_Rating_1:: - audio_header SFX_Pokedex_Rating_1, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Pokedex_Rating_1_Ch5 + channel 6, SFX_Pokedex_Rating_1_Ch6 + channel 7, SFX_Pokedex_Rating_1_Ch7 SFX_Get_Key_Item_1:: - audio_header SFX_Get_Key_Item_1, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Get_Key_Item_1_Ch5 + channel 6, SFX_Get_Key_Item_1_Ch6 + channel 7, SFX_Get_Key_Item_1_Ch7 SFX_Poisoned_1:: - audio_header SFX_Poisoned_1, Ch5 + channel_count 1 + channel 5, SFX_Poisoned_1_Ch5 SFX_Trade_Machine_1:: - audio_header SFX_Trade_Machine_1, Ch5 + channel_count 1 + channel 5, SFX_Trade_Machine_1_Ch5 SFX_Turn_On_PC_1:: - audio_header SFX_Turn_On_PC_1, Ch5 + channel_count 1 + channel 5, SFX_Turn_On_PC_1_Ch5 SFX_Turn_Off_PC_1:: - audio_header SFX_Turn_Off_PC_1, Ch5 + channel_count 1 + channel 5, SFX_Turn_Off_PC_1_Ch5 SFX_Enter_PC_1:: - audio_header SFX_Enter_PC_1, Ch5 + channel_count 1 + channel 5, SFX_Enter_PC_1_Ch5 SFX_Shrink_1:: - audio_header SFX_Shrink_1, Ch5 + channel_count 1 + channel 5, SFX_Shrink_1_Ch5 SFX_Switch_1:: - audio_header SFX_Switch_1, Ch5 + channel_count 1 + channel 5, SFX_Switch_1_Ch5 SFX_Healing_Machine_1:: - audio_header SFX_Healing_Machine_1, Ch5 + channel_count 1 + channel 5, SFX_Healing_Machine_1_Ch5 SFX_Teleport_Exit1_1:: - audio_header SFX_Teleport_Exit1_1, Ch5 + channel_count 1 + channel 5, SFX_Teleport_Exit1_1_Ch5 SFX_Teleport_Enter1_1:: - audio_header SFX_Teleport_Enter1_1, Ch5 + channel_count 1 + channel 5, SFX_Teleport_Enter1_1_Ch5 SFX_Teleport_Exit2_1:: - audio_header SFX_Teleport_Exit2_1, Ch5 + channel_count 1 + channel 5, SFX_Teleport_Exit2_1_Ch5 SFX_Ledge_1:: - audio_header SFX_Ledge_1, Ch5 + channel_count 1 + channel 5, SFX_Ledge_1_Ch5 SFX_Teleport_Enter2_1:: - audio_header SFX_Teleport_Enter2_1, Ch8 + channel_count 1 + channel 8, SFX_Teleport_Enter2_1_Ch8 SFX_Fly_1:: - audio_header SFX_Fly_1, Ch8 + channel_count 1 + channel 8, SFX_Fly_1_Ch8 SFX_Denied_1:: - audio_header SFX_Denied_1, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Denied_1_Ch5 + channel 6, SFX_Denied_1_Ch6 SFX_Arrow_Tiles_1:: - audio_header SFX_Arrow_Tiles_1, Ch5 + channel_count 1 + channel 5, SFX_Arrow_Tiles_1_Ch5 SFX_Push_Boulder_1:: - audio_header SFX_Push_Boulder_1, Ch8 + channel_count 1 + channel 8, SFX_Push_Boulder_1_Ch8 SFX_SS_Anne_Horn_1:: - audio_header SFX_SS_Anne_Horn_1, Ch5, Ch6 + channel_count 2 + channel 5, SFX_SS_Anne_Horn_1_Ch5 + channel 6, SFX_SS_Anne_Horn_1_Ch6 SFX_Withdraw_Deposit_1:: - audio_header SFX_Withdraw_Deposit_1, Ch5 + channel_count 1 + channel 5, SFX_Withdraw_Deposit_1_Ch5 SFX_Cut_1:: - audio_header SFX_Cut_1, Ch8 + channel_count 1 + channel 8, SFX_Cut_1_Ch8 SFX_Go_Inside_1:: - audio_header SFX_Go_Inside_1, Ch8 + channel_count 1 + channel 8, SFX_Go_Inside_1_Ch8 SFX_Swap_1:: - audio_header SFX_Swap_1, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Swap_1_Ch5 + channel 6, SFX_Swap_1_Ch6 SFX_59_1:: - audio_header SFX_59_1, Ch5, Ch6 + channel_count 2 + channel 5, SFX_59_1_Ch5 + channel 6, SFX_59_1_Ch6 SFX_Purchase_1:: - audio_header SFX_Purchase_1, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Purchase_1_Ch5 + channel 6, SFX_Purchase_1_Ch6 SFX_Collision_1:: - audio_header SFX_Collision_1, Ch5 + channel_count 1 + channel 5, SFX_Collision_1_Ch5 SFX_Go_Outside_1:: - audio_header SFX_Go_Outside_1, Ch8 + channel_count 1 + channel 8, SFX_Go_Outside_1_Ch8 SFX_Save_1:: - audio_header SFX_Save_1, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Save_1_Ch5 + channel 6, SFX_Save_1_Ch6 ; the Pokeflute sound effect directly hijacks channel 3 SFX_Pokeflute:: - audio_header SFX_Pokeflute, Ch3 + channel_count 1 + channel 3, SFX_Pokeflute_Ch3 SFX_Safari_Zone_PA:: - audio_header SFX_Safari_Zone_PA, Ch5 + channel_count 1 + channel 5, SFX_Safari_Zone_PA_Ch5 diff --git a/audio/headers/sfxheaders2.asm b/audio/headers/sfxheaders2.asm index 912d137e..1ccbf265 100644 --- a/audio/headers/sfxheaders2.asm +++ b/audio/headers/sfxheaders2.asm @@ -2,358 +2,591 @@ SFX_Headers_2:: db $ff, $ff, $ff ; padding SFX_Noise_Instrument01_2:: - audio_header SFX_Noise_Instrument01_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument01_2_Ch8 SFX_Noise_Instrument02_2:: - audio_header SFX_Noise_Instrument02_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument02_2_Ch8 SFX_Noise_Instrument03_2:: - audio_header SFX_Noise_Instrument03_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument03_2_Ch8 SFX_Noise_Instrument04_2:: - audio_header SFX_Noise_Instrument04_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument04_2_Ch8 SFX_Noise_Instrument05_2:: - audio_header SFX_Noise_Instrument05_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument05_2_Ch8 SFX_Noise_Instrument06_2:: - audio_header SFX_Noise_Instrument06_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument06_2_Ch8 SFX_Noise_Instrument07_2:: - audio_header SFX_Noise_Instrument07_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument07_2_Ch8 SFX_Noise_Instrument08_2:: - audio_header SFX_Noise_Instrument08_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument08_2_Ch8 SFX_Noise_Instrument09_2:: - audio_header SFX_Noise_Instrument09_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument09_2_Ch8 SFX_Noise_Instrument10_2:: - audio_header SFX_Noise_Instrument10_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument10_2_Ch8 SFX_Noise_Instrument11_2:: - audio_header SFX_Noise_Instrument11_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument11_2_Ch8 SFX_Noise_Instrument12_2:: - audio_header SFX_Noise_Instrument12_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument12_2_Ch8 SFX_Noise_Instrument13_2:: - audio_header SFX_Noise_Instrument13_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument13_2_Ch8 SFX_Noise_Instrument14_2:: - audio_header SFX_Noise_Instrument14_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument14_2_Ch8 SFX_Noise_Instrument15_2:: - audio_header SFX_Noise_Instrument15_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument15_2_Ch8 SFX_Noise_Instrument16_2:: - audio_header SFX_Noise_Instrument16_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument16_2_Ch8 SFX_Noise_Instrument17_2:: - audio_header SFX_Noise_Instrument17_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument17_2_Ch8 SFX_Noise_Instrument18_2:: - audio_header SFX_Noise_Instrument18_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument18_2_Ch8 SFX_Noise_Instrument19_2:: - audio_header SFX_Noise_Instrument19_2, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument19_2_Ch8 SFX_Cry00_2:: - audio_header SFX_Cry00_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry00_2_Ch5 + channel 6, SFX_Cry00_2_Ch6 + channel 8, SFX_Cry00_2_Ch8 SFX_Cry01_2:: - audio_header SFX_Cry01_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry01_2_Ch5 + channel 6, SFX_Cry01_2_Ch6 + channel 8, SFX_Cry01_2_Ch8 SFX_Cry02_2:: - audio_header SFX_Cry02_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry02_2_Ch5 + channel 6, SFX_Cry02_2_Ch6 + channel 8, SFX_Cry02_2_Ch8 SFX_Cry03_2:: - audio_header SFX_Cry03_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry03_2_Ch5 + channel 6, SFX_Cry03_2_Ch6 + channel 8, SFX_Cry03_2_Ch8 SFX_Cry04_2:: - audio_header SFX_Cry04_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry04_2_Ch5 + channel 6, SFX_Cry04_2_Ch6 + channel 8, SFX_Cry04_2_Ch8 SFX_Cry05_2:: - audio_header SFX_Cry05_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry05_2_Ch5 + channel 6, SFX_Cry05_2_Ch6 + channel 8, SFX_Cry05_2_Ch8 SFX_Cry06_2:: - audio_header SFX_Cry06_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry06_2_Ch5 + channel 6, SFX_Cry06_2_Ch6 + channel 8, SFX_Cry06_2_Ch8 SFX_Cry07_2:: - audio_header SFX_Cry07_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry07_2_Ch5 + channel 6, SFX_Cry07_2_Ch6 + channel 8, SFX_Cry07_2_Ch8 SFX_Cry08_2:: - audio_header SFX_Cry08_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry08_2_Ch5 + channel 6, SFX_Cry08_2_Ch6 + channel 8, SFX_Cry08_2_Ch8 SFX_Cry09_2:: - audio_header SFX_Cry09_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry09_2_Ch5 + channel 6, SFX_Cry09_2_Ch6 + channel 8, SFX_Cry09_2_Ch8 SFX_Cry0A_2:: - audio_header SFX_Cry0A_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0A_2_Ch5 + channel 6, SFX_Cry0A_2_Ch6 + channel 8, SFX_Cry0A_2_Ch8 SFX_Cry0B_2:: - audio_header SFX_Cry0B_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0B_2_Ch5 + channel 6, SFX_Cry0B_2_Ch6 + channel 8, SFX_Cry0B_2_Ch8 SFX_Cry0C_2:: - audio_header SFX_Cry0C_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0C_2_Ch5 + channel 6, SFX_Cry0C_2_Ch6 + channel 8, SFX_Cry0C_2_Ch8 SFX_Cry0D_2:: - audio_header SFX_Cry0D_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0D_2_Ch5 + channel 6, SFX_Cry0D_2_Ch6 + channel 8, SFX_Cry0D_2_Ch8 SFX_Cry0E_2:: - audio_header SFX_Cry0E_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0E_2_Ch5 + channel 6, SFX_Cry0E_2_Ch6 + channel 8, SFX_Cry0E_2_Ch8 SFX_Cry0F_2:: - audio_header SFX_Cry0F_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0F_2_Ch5 + channel 6, SFX_Cry0F_2_Ch6 + channel 8, SFX_Cry0F_2_Ch8 SFX_Cry10_2:: - audio_header SFX_Cry10_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry10_2_Ch5 + channel 6, SFX_Cry10_2_Ch6 + channel 8, SFX_Cry10_2_Ch8 SFX_Cry11_2:: - audio_header SFX_Cry11_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry11_2_Ch5 + channel 6, SFX_Cry11_2_Ch6 + channel 8, SFX_Cry11_2_Ch8 SFX_Cry12_2:: - audio_header SFX_Cry12_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry12_2_Ch5 + channel 6, SFX_Cry12_2_Ch6 + channel 8, SFX_Cry12_2_Ch8 SFX_Cry13_2:: - audio_header SFX_Cry13_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry13_2_Ch5 + channel 6, SFX_Cry13_2_Ch6 + channel 8, SFX_Cry13_2_Ch8 SFX_Cry14_2:: - audio_header SFX_Cry14_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry14_2_Ch5 + channel 6, SFX_Cry14_2_Ch6 + channel 8, SFX_Cry14_2_Ch8 SFX_Cry15_2:: - audio_header SFX_Cry15_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry15_2_Ch5 + channel 6, SFX_Cry15_2_Ch6 + channel 8, SFX_Cry15_2_Ch8 SFX_Cry16_2:: - audio_header SFX_Cry16_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry16_2_Ch5 + channel 6, SFX_Cry16_2_Ch6 + channel 8, SFX_Cry16_2_Ch8 SFX_Cry17_2:: - audio_header SFX_Cry17_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry17_2_Ch5 + channel 6, SFX_Cry17_2_Ch6 + channel 8, SFX_Cry17_2_Ch8 SFX_Cry18_2:: - audio_header SFX_Cry18_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry18_2_Ch5 + channel 6, SFX_Cry18_2_Ch6 + channel 8, SFX_Cry18_2_Ch8 SFX_Cry19_2:: - audio_header SFX_Cry19_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry19_2_Ch5 + channel 6, SFX_Cry19_2_Ch6 + channel 8, SFX_Cry19_2_Ch8 SFX_Cry1A_2:: - audio_header SFX_Cry1A_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1A_2_Ch5 + channel 6, SFX_Cry1A_2_Ch6 + channel 8, SFX_Cry1A_2_Ch8 SFX_Cry1B_2:: - audio_header SFX_Cry1B_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1B_2_Ch5 + channel 6, SFX_Cry1B_2_Ch6 + channel 8, SFX_Cry1B_2_Ch8 SFX_Cry1C_2:: - audio_header SFX_Cry1C_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1C_2_Ch5 + channel 6, SFX_Cry1C_2_Ch6 + channel 8, SFX_Cry1C_2_Ch8 SFX_Cry1D_2:: - audio_header SFX_Cry1D_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1D_2_Ch5 + channel 6, SFX_Cry1D_2_Ch6 + channel 8, SFX_Cry1D_2_Ch8 SFX_Cry1E_2:: - audio_header SFX_Cry1E_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1E_2_Ch5 + channel 6, SFX_Cry1E_2_Ch6 + channel 8, SFX_Cry1E_2_Ch8 SFX_Cry1F_2:: - audio_header SFX_Cry1F_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1F_2_Ch5 + channel 6, SFX_Cry1F_2_Ch6 + channel 8, SFX_Cry1F_2_Ch8 SFX_Cry20_2:: - audio_header SFX_Cry20_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry20_2_Ch5 + channel 6, SFX_Cry20_2_Ch6 + channel 8, SFX_Cry20_2_Ch8 SFX_Cry21_2:: - audio_header SFX_Cry21_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry21_2_Ch5 + channel 6, SFX_Cry21_2_Ch6 + channel 8, SFX_Cry21_2_Ch8 SFX_Cry22_2:: - audio_header SFX_Cry22_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry22_2_Ch5 + channel 6, SFX_Cry22_2_Ch6 + channel 8, SFX_Cry22_2_Ch8 SFX_Cry23_2:: - audio_header SFX_Cry23_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry23_2_Ch5 + channel 6, SFX_Cry23_2_Ch6 + channel 8, SFX_Cry23_2_Ch8 SFX_Cry24_2:: - audio_header SFX_Cry24_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry24_2_Ch5 + channel 6, SFX_Cry24_2_Ch6 + channel 8, SFX_Cry24_2_Ch8 SFX_Cry25_2:: - audio_header SFX_Cry25_2, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry25_2_Ch5 + channel 6, SFX_Cry25_2_Ch6 + channel 8, SFX_Cry25_2_Ch8 SFX_Level_Up:: - audio_header SFX_Level_Up, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Level_Up_Ch5 + channel 6, SFX_Level_Up_Ch6 + channel 7, SFX_Level_Up_Ch7 SFX_Get_Item2_2:: - audio_header SFX_Get_Item2_2, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Get_Item2_2_Ch5 + channel 6, SFX_Get_Item2_2_Ch6 + channel 7, SFX_Get_Item2_2_Ch7 SFX_Tink_2:: - audio_header SFX_Tink_2, Ch5 + channel_count 1 + channel 5, SFX_Tink_2_Ch5 SFX_Heal_HP_2:: - audio_header SFX_Heal_HP_2, Ch5 + channel_count 1 + channel 5, SFX_Heal_HP_2_Ch5 SFX_Heal_Ailment_2:: - audio_header SFX_Heal_Ailment_2, Ch5 + channel_count 1 + channel 5, SFX_Heal_Ailment_2_Ch5 SFX_Start_Menu_2:: - audio_header SFX_Start_Menu_2, Ch8 + channel_count 1 + channel 8, SFX_Start_Menu_2_Ch8 SFX_Press_AB_2:: - audio_header SFX_Press_AB_2, Ch5 + channel_count 1 + channel 5, SFX_Press_AB_2_Ch5 SFX_Ball_Toss:: - audio_header SFX_Ball_Toss, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Ball_Toss_Ch5 + channel 6, SFX_Ball_Toss_Ch6 SFX_Ball_Poof:: - audio_header SFX_Ball_Poof, Ch5, Ch8 + channel_count 2 + channel 5, SFX_Ball_Poof_Ch5 + channel 8, SFX_Ball_Poof_Ch8 SFX_Faint_Thud:: - audio_header SFX_Faint_Thud, Ch5, Ch8 + channel_count 2 + channel 5, SFX_Faint_Thud_Ch5 + channel 8, SFX_Faint_Thud_Ch8 SFX_Run:: - audio_header SFX_Run, Ch8 + channel_count 1 + channel 8, SFX_Run_Ch8 SFX_Dex_Page_Added:: - audio_header SFX_Dex_Page_Added, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Dex_Page_Added_Ch5 + channel 6, SFX_Dex_Page_Added_Ch6 SFX_Caught_Mon:: - audio_header SFX_Caught_Mon, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Caught_Mon_Ch5 + channel 6, SFX_Caught_Mon_Ch6 + channel 7, SFX_Caught_Mon_Ch7 SFX_Peck:: - audio_header SFX_Peck, Ch8 + channel_count 1 + channel 8, SFX_Peck_Ch8 SFX_Faint_Fall:: - audio_header SFX_Faint_Fall, Ch5 + channel_count 1 + channel 5, SFX_Faint_Fall_Ch5 SFX_Battle_09:: - audio_header SFX_Battle_09, Ch5 + channel_count 1 + channel 5, SFX_Battle_09_Ch5 SFX_Pound:: - audio_header SFX_Pound, Ch8 + channel_count 1 + channel 8, SFX_Pound_Ch8 SFX_Battle_0B:: - audio_header SFX_Battle_0B, Ch8 + channel_count 1 + channel 8, SFX_Battle_0B_Ch8 SFX_Battle_0C:: - audio_header SFX_Battle_0C, Ch8 + channel_count 1 + channel 8, SFX_Battle_0C_Ch8 SFX_Battle_0D:: - audio_header SFX_Battle_0D, Ch8 + channel_count 1 + channel 8, SFX_Battle_0D_Ch8 SFX_Battle_0E:: - audio_header SFX_Battle_0E, Ch8 + channel_count 1 + channel 8, SFX_Battle_0E_Ch8 SFX_Battle_0F:: - audio_header SFX_Battle_0F, Ch8 + channel_count 1 + channel 8, SFX_Battle_0F_Ch8 SFX_Damage:: - audio_header SFX_Damage, Ch8 + channel_count 1 + channel 8, SFX_Damage_Ch8 SFX_Not_Very_Effective:: - audio_header SFX_Not_Very_Effective, Ch8 + channel_count 1 + channel 8, SFX_Not_Very_Effective_Ch8 SFX_Battle_12:: - audio_header SFX_Battle_12, Ch8 + channel_count 1 + channel 8, SFX_Battle_12_Ch8 SFX_Battle_13:: - audio_header SFX_Battle_13, Ch8 + channel_count 1 + channel 8, SFX_Battle_13_Ch8 SFX_Battle_14:: - audio_header SFX_Battle_14, Ch8 + channel_count 1 + channel 8, SFX_Battle_14_Ch8 SFX_Vine_Whip:: - audio_header SFX_Vine_Whip, Ch8 + channel_count 1 + channel 8, SFX_Vine_Whip_Ch8 SFX_Battle_16:: - audio_header SFX_Battle_16, Ch8 + channel_count 1 + channel 8, SFX_Battle_16_Ch8 SFX_Battle_17:: - audio_header SFX_Battle_17, Ch8 + channel_count 1 + channel 8, SFX_Battle_17_Ch8 SFX_Battle_18:: - audio_header SFX_Battle_18, Ch8 + channel_count 1 + channel 8, SFX_Battle_18_Ch8 SFX_Battle_19:: - audio_header SFX_Battle_19, Ch8 + channel_count 1 + channel 8, SFX_Battle_19_Ch8 SFX_Super_Effective:: - audio_header SFX_Super_Effective, Ch8 + channel_count 1 + channel 8, SFX_Super_Effective_Ch8 SFX_Battle_1B:: - audio_header SFX_Battle_1B, Ch8 + channel_count 1 + channel 8, SFX_Battle_1B_Ch8 SFX_Battle_1C:: - audio_header SFX_Battle_1C, Ch8 + channel_count 1 + channel 8, SFX_Battle_1C_Ch8 SFX_Doubleslap:: - audio_header SFX_Doubleslap, Ch8 + channel_count 1 + channel 8, SFX_Doubleslap_Ch8 SFX_Battle_1E:: - audio_header SFX_Battle_1E, Ch5, Ch8 + channel_count 2 + channel 5, SFX_Battle_1E_Ch5 + channel 8, SFX_Battle_1E_Ch8 SFX_Horn_Drill:: - audio_header SFX_Horn_Drill, Ch8 + channel_count 1 + channel 8, SFX_Horn_Drill_Ch8 SFX_Battle_20:: - audio_header SFX_Battle_20, Ch8 + channel_count 1 + channel 8, SFX_Battle_20_Ch8 SFX_Battle_21:: - audio_header SFX_Battle_21, Ch8 + channel_count 1 + channel 8, SFX_Battle_21_Ch8 SFX_Battle_22:: - audio_header SFX_Battle_22, Ch8 + channel_count 1 + channel 8, SFX_Battle_22_Ch8 SFX_Battle_23:: - audio_header SFX_Battle_23, Ch8 + channel_count 1 + channel 8, SFX_Battle_23_Ch8 SFX_Battle_24:: - audio_header SFX_Battle_24, Ch5, Ch8 + channel_count 2 + channel 5, SFX_Battle_24_Ch5 + channel 8, SFX_Battle_24_Ch8 SFX_Battle_25:: - audio_header SFX_Battle_25, Ch8 + channel_count 1 + channel 8, SFX_Battle_25_Ch8 SFX_Battle_26:: - audio_header SFX_Battle_26, Ch8 + channel_count 1 + channel 8, SFX_Battle_26_Ch8 SFX_Battle_27:: - audio_header SFX_Battle_27, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Battle_27_Ch5 + channel 6, SFX_Battle_27_Ch6 + channel 8, SFX_Battle_27_Ch8 SFX_Battle_28:: - audio_header SFX_Battle_28, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Battle_28_Ch5 + channel 6, SFX_Battle_28_Ch6 + channel 8, SFX_Battle_28_Ch8 SFX_Battle_29:: - audio_header SFX_Battle_29, Ch5, Ch8 + channel_count 2 + channel 5, SFX_Battle_29_Ch5 + channel 8, SFX_Battle_29_Ch8 SFX_Battle_2A:: - audio_header SFX_Battle_2A, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Battle_2A_Ch5 + channel 6, SFX_Battle_2A_Ch6 + channel 8, SFX_Battle_2A_Ch8 SFX_Battle_2B:: - audio_header SFX_Battle_2B, Ch5, Ch8 + channel_count 2 + channel 5, SFX_Battle_2B_Ch5 + channel 8, SFX_Battle_2B_Ch8 SFX_Battle_2C:: - audio_header SFX_Battle_2C, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Battle_2C_Ch5 + channel 6, SFX_Battle_2C_Ch6 + channel 8, SFX_Battle_2C_Ch8 SFX_Psybeam:: - audio_header SFX_Psybeam, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Psybeam_Ch5 + channel 6, SFX_Psybeam_Ch6 + channel 8, SFX_Psybeam_Ch8 SFX_Battle_2E:: - audio_header SFX_Battle_2E, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Battle_2E_Ch5 + channel 6, SFX_Battle_2E_Ch6 + channel 8, SFX_Battle_2E_Ch8 SFX_Battle_2F:: - audio_header SFX_Battle_2F, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Battle_2F_Ch5 + channel 6, SFX_Battle_2F_Ch6 + channel 8, SFX_Battle_2F_Ch8 SFX_Psychic_M:: - audio_header SFX_Psychic_M, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Psychic_M_Ch5 + channel 6, SFX_Psychic_M_Ch6 + channel 8, SFX_Psychic_M_Ch8 SFX_Battle_31:: - audio_header SFX_Battle_31, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Battle_31_Ch5 + channel 6, SFX_Battle_31_Ch6 SFX_Battle_32:: - audio_header SFX_Battle_32, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Battle_32_Ch5 + channel 6, SFX_Battle_32_Ch6 SFX_Battle_33:: - audio_header SFX_Battle_33, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Battle_33_Ch5 + channel 6, SFX_Battle_33_Ch6 SFX_Battle_34:: - audio_header SFX_Battle_34, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Battle_34_Ch5 + channel 6, SFX_Battle_34_Ch6 + channel 8, SFX_Battle_34_Ch8 SFX_Battle_35:: - audio_header SFX_Battle_35, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Battle_35_Ch5 + channel 6, SFX_Battle_35_Ch6 SFX_Battle_36:: - audio_header SFX_Battle_36, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Battle_36_Ch5 + channel 6, SFX_Battle_36_Ch6 + channel 8, SFX_Battle_36_Ch8 SFX_Silph_Scope:: - audio_header SFX_Silph_Scope, Ch5 + channel_count 1 + channel 5, SFX_Silph_Scope_Ch5 diff --git a/audio/headers/sfxheaders3.asm b/audio/headers/sfxheaders3.asm index 2732767f..bc6451a7 100644 --- a/audio/headers/sfxheaders3.asm +++ b/audio/headers/sfxheaders3.asm @@ -2,310 +2,504 @@ SFX_Headers_3:: db $ff, $ff, $ff ; padding SFX_Noise_Instrument01_3:: - audio_header SFX_Noise_Instrument01_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument01_3_Ch8 SFX_Noise_Instrument02_3:: - audio_header SFX_Noise_Instrument02_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument02_3_Ch8 SFX_Noise_Instrument03_3:: - audio_header SFX_Noise_Instrument03_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument03_3_Ch8 SFX_Noise_Instrument04_3:: - audio_header SFX_Noise_Instrument04_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument04_3_Ch8 SFX_Noise_Instrument05_3:: - audio_header SFX_Noise_Instrument05_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument05_3_Ch8 SFX_Noise_Instrument06_3:: - audio_header SFX_Noise_Instrument06_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument06_3_Ch8 SFX_Noise_Instrument07_3:: - audio_header SFX_Noise_Instrument07_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument07_3_Ch8 SFX_Noise_Instrument08_3:: - audio_header SFX_Noise_Instrument08_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument08_3_Ch8 SFX_Noise_Instrument09_3:: - audio_header SFX_Noise_Instrument09_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument09_3_Ch8 SFX_Noise_Instrument10_3:: - audio_header SFX_Noise_Instrument10_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument10_3_Ch8 SFX_Noise_Instrument11_3:: - audio_header SFX_Noise_Instrument11_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument11_3_Ch8 SFX_Noise_Instrument12_3:: - audio_header SFX_Noise_Instrument12_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument12_3_Ch8 SFX_Noise_Instrument13_3:: - audio_header SFX_Noise_Instrument13_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument13_3_Ch8 SFX_Noise_Instrument14_3:: - audio_header SFX_Noise_Instrument14_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument14_3_Ch8 SFX_Noise_Instrument15_3:: - audio_header SFX_Noise_Instrument15_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument15_3_Ch8 SFX_Noise_Instrument16_3:: - audio_header SFX_Noise_Instrument16_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument16_3_Ch8 SFX_Noise_Instrument17_3:: - audio_header SFX_Noise_Instrument17_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument17_3_Ch8 SFX_Noise_Instrument18_3:: - audio_header SFX_Noise_Instrument18_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument18_3_Ch8 SFX_Noise_Instrument19_3:: - audio_header SFX_Noise_Instrument19_3, Ch8 + channel_count 1 + channel 8, SFX_Noise_Instrument19_3_Ch8 SFX_Cry00_3:: - audio_header SFX_Cry00_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry00_3_Ch5 + channel 6, SFX_Cry00_3_Ch6 + channel 8, SFX_Cry00_3_Ch8 SFX_Cry01_3:: - audio_header SFX_Cry01_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry01_3_Ch5 + channel 6, SFX_Cry01_3_Ch6 + channel 8, SFX_Cry01_3_Ch8 SFX_Cry02_3:: - audio_header SFX_Cry02_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry02_3_Ch5 + channel 6, SFX_Cry02_3_Ch6 + channel 8, SFX_Cry02_3_Ch8 SFX_Cry03_3:: - audio_header SFX_Cry03_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry03_3_Ch5 + channel 6, SFX_Cry03_3_Ch6 + channel 8, SFX_Cry03_3_Ch8 SFX_Cry04_3:: - audio_header SFX_Cry04_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry04_3_Ch5 + channel 6, SFX_Cry04_3_Ch6 + channel 8, SFX_Cry04_3_Ch8 SFX_Cry05_3:: - audio_header SFX_Cry05_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry05_3_Ch5 + channel 6, SFX_Cry05_3_Ch6 + channel 8, SFX_Cry05_3_Ch8 SFX_Cry06_3:: - audio_header SFX_Cry06_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry06_3_Ch5 + channel 6, SFX_Cry06_3_Ch6 + channel 8, SFX_Cry06_3_Ch8 SFX_Cry07_3:: - audio_header SFX_Cry07_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry07_3_Ch5 + channel 6, SFX_Cry07_3_Ch6 + channel 8, SFX_Cry07_3_Ch8 SFX_Cry08_3:: - audio_header SFX_Cry08_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry08_3_Ch5 + channel 6, SFX_Cry08_3_Ch6 + channel 8, SFX_Cry08_3_Ch8 SFX_Cry09_3:: - audio_header SFX_Cry09_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry09_3_Ch5 + channel 6, SFX_Cry09_3_Ch6 + channel 8, SFX_Cry09_3_Ch8 SFX_Cry0A_3:: - audio_header SFX_Cry0A_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0A_3_Ch5 + channel 6, SFX_Cry0A_3_Ch6 + channel 8, SFX_Cry0A_3_Ch8 SFX_Cry0B_3:: - audio_header SFX_Cry0B_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0B_3_Ch5 + channel 6, SFX_Cry0B_3_Ch6 + channel 8, SFX_Cry0B_3_Ch8 SFX_Cry0C_3:: - audio_header SFX_Cry0C_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0C_3_Ch5 + channel 6, SFX_Cry0C_3_Ch6 + channel 8, SFX_Cry0C_3_Ch8 SFX_Cry0D_3:: - audio_header SFX_Cry0D_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0D_3_Ch5 + channel 6, SFX_Cry0D_3_Ch6 + channel 8, SFX_Cry0D_3_Ch8 SFX_Cry0E_3:: - audio_header SFX_Cry0E_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0E_3_Ch5 + channel 6, SFX_Cry0E_3_Ch6 + channel 8, SFX_Cry0E_3_Ch8 SFX_Cry0F_3:: - audio_header SFX_Cry0F_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry0F_3_Ch5 + channel 6, SFX_Cry0F_3_Ch6 + channel 8, SFX_Cry0F_3_Ch8 SFX_Cry10_3:: - audio_header SFX_Cry10_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry10_3_Ch5 + channel 6, SFX_Cry10_3_Ch6 + channel 8, SFX_Cry10_3_Ch8 SFX_Cry11_3:: - audio_header SFX_Cry11_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry11_3_Ch5 + channel 6, SFX_Cry11_3_Ch6 + channel 8, SFX_Cry11_3_Ch8 SFX_Cry12_3:: - audio_header SFX_Cry12_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry12_3_Ch5 + channel 6, SFX_Cry12_3_Ch6 + channel 8, SFX_Cry12_3_Ch8 SFX_Cry13_3:: - audio_header SFX_Cry13_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry13_3_Ch5 + channel 6, SFX_Cry13_3_Ch6 + channel 8, SFX_Cry13_3_Ch8 SFX_Cry14_3:: - audio_header SFX_Cry14_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry14_3_Ch5 + channel 6, SFX_Cry14_3_Ch6 + channel 8, SFX_Cry14_3_Ch8 SFX_Cry15_3:: - audio_header SFX_Cry15_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry15_3_Ch5 + channel 6, SFX_Cry15_3_Ch6 + channel 8, SFX_Cry15_3_Ch8 SFX_Cry16_3:: - audio_header SFX_Cry16_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry16_3_Ch5 + channel 6, SFX_Cry16_3_Ch6 + channel 8, SFX_Cry16_3_Ch8 SFX_Cry17_3:: - audio_header SFX_Cry17_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry17_3_Ch5 + channel 6, SFX_Cry17_3_Ch6 + channel 8, SFX_Cry17_3_Ch8 SFX_Cry18_3:: - audio_header SFX_Cry18_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry18_3_Ch5 + channel 6, SFX_Cry18_3_Ch6 + channel 8, SFX_Cry18_3_Ch8 SFX_Cry19_3:: - audio_header SFX_Cry19_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry19_3_Ch5 + channel 6, SFX_Cry19_3_Ch6 + channel 8, SFX_Cry19_3_Ch8 SFX_Cry1A_3:: - audio_header SFX_Cry1A_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1A_3_Ch5 + channel 6, SFX_Cry1A_3_Ch6 + channel 8, SFX_Cry1A_3_Ch8 SFX_Cry1B_3:: - audio_header SFX_Cry1B_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1B_3_Ch5 + channel 6, SFX_Cry1B_3_Ch6 + channel 8, SFX_Cry1B_3_Ch8 SFX_Cry1C_3:: - audio_header SFX_Cry1C_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1C_3_Ch5 + channel 6, SFX_Cry1C_3_Ch6 + channel 8, SFX_Cry1C_3_Ch8 SFX_Cry1D_3:: - audio_header SFX_Cry1D_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1D_3_Ch5 + channel 6, SFX_Cry1D_3_Ch6 + channel 8, SFX_Cry1D_3_Ch8 SFX_Cry1E_3:: - audio_header SFX_Cry1E_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1E_3_Ch5 + channel 6, SFX_Cry1E_3_Ch6 + channel 8, SFX_Cry1E_3_Ch8 SFX_Cry1F_3:: - audio_header SFX_Cry1F_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry1F_3_Ch5 + channel 6, SFX_Cry1F_3_Ch6 + channel 8, SFX_Cry1F_3_Ch8 SFX_Cry20_3:: - audio_header SFX_Cry20_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry20_3_Ch5 + channel 6, SFX_Cry20_3_Ch6 + channel 8, SFX_Cry20_3_Ch8 SFX_Cry21_3:: - audio_header SFX_Cry21_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry21_3_Ch5 + channel 6, SFX_Cry21_3_Ch6 + channel 8, SFX_Cry21_3_Ch8 SFX_Cry22_3:: - audio_header SFX_Cry22_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry22_3_Ch5 + channel 6, SFX_Cry22_3_Ch6 + channel 8, SFX_Cry22_3_Ch8 SFX_Cry23_3:: - audio_header SFX_Cry23_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry23_3_Ch5 + channel 6, SFX_Cry23_3_Ch6 + channel 8, SFX_Cry23_3_Ch8 SFX_Cry24_3:: - audio_header SFX_Cry24_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry24_3_Ch5 + channel 6, SFX_Cry24_3_Ch6 + channel 8, SFX_Cry24_3_Ch8 SFX_Cry25_3:: - audio_header SFX_Cry25_3, Ch5, Ch6, Ch8 + channel_count 3 + channel 5, SFX_Cry25_3_Ch5 + channel 6, SFX_Cry25_3_Ch6 + channel 8, SFX_Cry25_3_Ch8 SFX_Get_Item1_3:: - audio_header SFX_Get_Item1_3, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Get_Item1_3_Ch5 + channel 6, SFX_Get_Item1_3_Ch6 + channel 7, SFX_Get_Item1_3_Ch7 SFX_Get_Item2_3:: - audio_header SFX_Get_Item2_3, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Get_Item2_3_Ch5 + channel 6, SFX_Get_Item2_3_Ch6 + channel 7, SFX_Get_Item2_3_Ch7 SFX_Tink_3:: - audio_header SFX_Tink_3, Ch5 + channel_count 1 + channel 5, SFX_Tink_3_Ch5 SFX_Heal_HP_3:: - audio_header SFX_Heal_HP_3, Ch5 + channel_count 1 + channel 5, SFX_Heal_HP_3_Ch5 SFX_Heal_Ailment_3:: - audio_header SFX_Heal_Ailment_3, Ch5 + channel_count 1 + channel 5, SFX_Heal_Ailment_3_Ch5 SFX_Start_Menu_3:: - audio_header SFX_Start_Menu_3, Ch8 + channel_count 1 + channel 8, SFX_Start_Menu_3_Ch8 SFX_Press_AB_3:: - audio_header SFX_Press_AB_3, Ch5 + channel_count 1 + channel 5, SFX_Press_AB_3_Ch5 SFX_Pokedex_Rating_3:: - audio_header SFX_Pokedex_Rating_3, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Pokedex_Rating_3_Ch5 + channel 6, SFX_Pokedex_Rating_3_Ch6 + channel 7, SFX_Pokedex_Rating_3_Ch7 SFX_Get_Key_Item_3:: - audio_header SFX_Get_Key_Item_3, Ch5, Ch6, Ch7 + channel_count 3 + channel 5, SFX_Get_Key_Item_3_Ch5 + channel 6, SFX_Get_Key_Item_3_Ch6 + channel 7, SFX_Get_Key_Item_3_Ch7 SFX_Poisoned_3:: - audio_header SFX_Poisoned_3, Ch5 + channel_count 1 + channel 5, SFX_Poisoned_3_Ch5 SFX_Trade_Machine_3:: - audio_header SFX_Trade_Machine_3, Ch5 + channel_count 1 + channel 5, SFX_Trade_Machine_3_Ch5 SFX_Turn_On_PC_3:: - audio_header SFX_Turn_On_PC_3, Ch5 + channel_count 1 + channel 5, SFX_Turn_On_PC_3_Ch5 SFX_Turn_Off_PC_3:: - audio_header SFX_Turn_Off_PC_3, Ch5 + channel_count 1 + channel 5, SFX_Turn_Off_PC_3_Ch5 SFX_Enter_PC_3:: - audio_header SFX_Enter_PC_3, Ch5 + channel_count 1 + channel 5, SFX_Enter_PC_3_Ch5 SFX_Shrink_3:: - audio_header SFX_Shrink_3, Ch5 + channel_count 1 + channel 5, SFX_Shrink_3_Ch5 SFX_Switch_3:: - audio_header SFX_Switch_3, Ch5 + channel_count 1 + channel 5, SFX_Switch_3_Ch5 SFX_Healing_Machine_3:: - audio_header SFX_Healing_Machine_3, Ch5 + channel_count 1 + channel 5, SFX_Healing_Machine_3_Ch5 SFX_Teleport_Exit1_3:: - audio_header SFX_Teleport_Exit1_3, Ch5 + channel_count 1 + channel 5, SFX_Teleport_Exit1_3_Ch5 SFX_Teleport_Enter1_3:: - audio_header SFX_Teleport_Enter1_3, Ch5 + channel_count 1 + channel 5, SFX_Teleport_Enter1_3_Ch5 SFX_Teleport_Exit2_3:: - audio_header SFX_Teleport_Exit2_3, Ch5 + channel_count 1 + channel 5, SFX_Teleport_Exit2_3_Ch5 SFX_Ledge_3:: - audio_header SFX_Ledge_3, Ch5 + channel_count 1 + channel 5, SFX_Ledge_3_Ch5 SFX_Teleport_Enter2_3:: - audio_header SFX_Teleport_Enter2_3, Ch8 + channel_count 1 + channel 8, SFX_Teleport_Enter2_3_Ch8 SFX_Fly_3:: - audio_header SFX_Fly_3, Ch8 + channel_count 1 + channel 8, SFX_Fly_3_Ch8 SFX_Denied_3:: - audio_header SFX_Denied_3, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Denied_3_Ch5 + channel 6, SFX_Denied_3_Ch6 SFX_Arrow_Tiles_3:: - audio_header SFX_Arrow_Tiles_3, Ch5 + channel_count 1 + channel 5, SFX_Arrow_Tiles_3_Ch5 SFX_Push_Boulder_3:: - audio_header SFX_Push_Boulder_3, Ch8 + channel_count 1 + channel 8, SFX_Push_Boulder_3_Ch8 SFX_SS_Anne_Horn_3:: - audio_header SFX_SS_Anne_Horn_3, Ch5, Ch6 + channel_count 2 + channel 5, SFX_SS_Anne_Horn_3_Ch5 + channel 6, SFX_SS_Anne_Horn_3_Ch6 SFX_Withdraw_Deposit_3:: - audio_header SFX_Withdraw_Deposit_3, Ch5 + channel_count 1 + channel 5, SFX_Withdraw_Deposit_3_Ch5 SFX_Cut_3:: - audio_header SFX_Cut_3, Ch8 + channel_count 1 + channel 8, SFX_Cut_3_Ch8 SFX_Go_Inside_3:: - audio_header SFX_Go_Inside_3, Ch8 + channel_count 1 + channel 8, SFX_Go_Inside_3_Ch8 SFX_Swap_3:: - audio_header SFX_Swap_3, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Swap_3_Ch5 + channel 6, SFX_Swap_3_Ch6 SFX_59_3:: - audio_header SFX_59_3, Ch5, Ch6 + channel_count 2 + channel 5, SFX_59_3_Ch5 + channel 6, SFX_59_3_Ch6 SFX_Purchase_3:: - audio_header SFX_Purchase_3, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Purchase_3_Ch5 + channel 6, SFX_Purchase_3_Ch6 SFX_Collision_3:: - audio_header SFX_Collision_3, Ch5 + channel_count 1 + channel 5, SFX_Collision_3_Ch5 SFX_Go_Outside_3:: - audio_header SFX_Go_Outside_3, Ch8 + channel_count 1 + channel 8, SFX_Go_Outside_3_Ch8 SFX_Save_3:: - audio_header SFX_Save_3, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Save_3_Ch5 + channel 6, SFX_Save_3_Ch6 SFX_Intro_Lunge:: - audio_header SFX_Intro_Lunge, Ch8 + channel_count 1 + channel 8, SFX_Intro_Lunge_Ch8 SFX_Intro_Hip:: - audio_header SFX_Intro_Hip, Ch5 + channel_count 1 + channel 5, SFX_Intro_Hip_Ch5 SFX_Intro_Hop:: - audio_header SFX_Intro_Hop, Ch5 + channel_count 1 + channel 5, SFX_Intro_Hop_Ch5 SFX_Intro_Raise:: - audio_header SFX_Intro_Raise, Ch8 + channel_count 1 + channel 8, SFX_Intro_Raise_Ch8 SFX_Intro_Crash:: - audio_header SFX_Intro_Crash, Ch8 + channel_count 1 + channel 8, SFX_Intro_Crash_Ch8 SFX_Intro_Whoosh:: - audio_header SFX_Intro_Whoosh, Ch8 + channel_count 1 + channel 8, SFX_Intro_Whoosh_Ch8 SFX_Slots_Stop_Wheel:: - audio_header SFX_Slots_Stop_Wheel, Ch5 + channel_count 1 + channel 5, SFX_Slots_Stop_Wheel_Ch5 SFX_Slots_Reward:: - audio_header SFX_Slots_Reward, Ch5 + channel_count 1 + channel 5, SFX_Slots_Reward_Ch5 SFX_Slots_New_Spin:: - audio_header SFX_Slots_New_Spin, Ch5, Ch6 + channel_count 2 + channel 5, SFX_Slots_New_Spin_Ch5 + channel 6, SFX_Slots_New_Spin_Ch6 SFX_Shooting_Star:: - audio_header SFX_Shooting_Star, Ch5 + channel_count 1 + channel 5, SFX_Shooting_Star_Ch5 diff --git a/audio/low_health_alarm.asm b/audio/low_health_alarm.asm index 65e19aa7..35fe1815 100644 --- a/audio/low_health_alarm.asm +++ b/audio/low_health_alarm.asm @@ -20,7 +20,7 @@ Music_DoLowHealthAlarm:: .noTone ld a, $86 - ld [wChannelSoundIDs + Ch5], a ;disable sound channel? + ld [wChannelSoundIDs + CHAN5], a ;disable sound channel? ld a, [wLowHealthAlarm] and $7f ;decrement alarm timer. dec a @@ -34,7 +34,7 @@ Music_DoLowHealthAlarm:: .disableAlarm xor a ld [wLowHealthAlarm], a ;disable alarm - ld [wChannelSoundIDs + Ch5], a ;re-enable sound channel? + ld [wChannelSoundIDs + CHAN5], a ;re-enable sound channel? ld de, .toneDataSilence jr .playTone diff --git a/audio/poke_flute.asm b/audio/poke_flute.asm index f55a2a1f..1c0caab1 100644 --- a/audio/poke_flute.asm +++ b/audio/poke_flute.asm @@ -3,7 +3,7 @@ Music_PokeFluteInBattle:: ld a, SFX_CAUGHT_MON call PlaySoundWaitForCurrent ; then immediately overwrite the channel pointers - ld hl, wChannelCommandPointers + Ch5 * 2 + ld hl, wChannelCommandPointers + CHAN5 * 2 ld de, SFX_Pokeflute_Ch5 call Audio2_OverwriteChannelPointer ld de, SFX_Pokeflute_Ch6 diff --git a/audio/wave_instruments.asm b/audio/wave_instruments.asm deleted file mode 100644 index 15376004..00000000 --- a/audio/wave_instruments.asm +++ /dev/null @@ -1,33 +0,0 @@ -; This file is INCLUDEd three times, once for each audio engine. - - dw .wave0 - dw .wave1 - dw .wave2 - dw .wave3 - dw .wave4 - dw .wave5 ; used in the Lavender Town and Pokemon Tower themes - dw .wave5 ; unused - dw .wave5 ; unused - dw .wave5 ; unused - -; these are the definitions for the channel 3 instruments -; each instrument definition is made up of 32 points (nibbles) that form -; the graph of the wave -; the current instrument is copied to rWave_0--rWave_f -.wave0 - dn 0, 2, 4, 6, 8, 10, 12, 14, 15, 15, 15, 14, 14, 13, 13, 12, 12, 11, 10, 9, 8, 7, 6, 5, 4, 4, 3, 3, 2, 2, 1, 1 - -.wave1 - dn 0, 2, 4, 6, 8, 10, 12, 14, 14, 15, 15, 15, 15, 14, 14, 14, 13, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 2, 1, 1 - -.wave2 - dn 1, 3, 6, 9, 11, 13, 14, 14, 14, 14, 15, 15, 15, 15, 14, 13, 13, 14, 15, 15, 15, 15, 14, 14, 14, 14, 13, 11, 9, 6, 3, 1 - -.wave3 - dn 0, 2, 4, 6, 8, 10, 12, 13, 14, 15, 15, 14, 13, 14, 15, 15, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 - -.wave4 - dn 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 14, 15, 7, 7, 15, 14, 14, 13, 12, 10, 8, 7, 6, 5, 4, 3, 2, 1, 0 - -; duty 5 reads from sfx data -.wave5 diff --git a/audio/wave_samples.asm b/audio/wave_samples.asm new file mode 100644 index 00000000..15376004 --- /dev/null +++ b/audio/wave_samples.asm @@ -0,0 +1,33 @@ +; This file is INCLUDEd three times, once for each audio engine. + + dw .wave0 + dw .wave1 + dw .wave2 + dw .wave3 + dw .wave4 + dw .wave5 ; used in the Lavender Town and Pokemon Tower themes + dw .wave5 ; unused + dw .wave5 ; unused + dw .wave5 ; unused + +; these are the definitions for the channel 3 instruments +; each instrument definition is made up of 32 points (nibbles) that form +; the graph of the wave +; the current instrument is copied to rWave_0--rWave_f +.wave0 + dn 0, 2, 4, 6, 8, 10, 12, 14, 15, 15, 15, 14, 14, 13, 13, 12, 12, 11, 10, 9, 8, 7, 6, 5, 4, 4, 3, 3, 2, 2, 1, 1 + +.wave1 + dn 0, 2, 4, 6, 8, 10, 12, 14, 14, 15, 15, 15, 15, 14, 14, 14, 13, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 2, 1, 1 + +.wave2 + dn 1, 3, 6, 9, 11, 13, 14, 14, 14, 14, 15, 15, 15, 15, 14, 13, 13, 14, 15, 15, 15, 15, 14, 14, 14, 14, 13, 11, 9, 6, 3, 1 + +.wave3 + dn 0, 2, 4, 6, 8, 10, 12, 13, 14, 15, 15, 14, 13, 14, 15, 15, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 + +.wave4 + dn 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 14, 15, 7, 7, 15, 14, 14, 13, 12, 10, 8, 7, 6, 5, 4, 3, 2, 1, 0 + +; duty 5 reads from sfx data +.wave5 diff --git a/constants/audio_constants.asm b/constants/audio_constants.asm index 59900fec..a8903052 100644 --- a/constants/audio_constants.asm +++ b/constants/audio_constants.asm @@ -19,15 +19,15 @@ DEF NUM_NOTES EQU const_value ; Audio[1|2|3]_HWChannelBaseAddresses, Audio[1|2|3]_HWChannelDisableMasks, ; and Audio[1|2|3]_HWChannelEnableMasks indexes (see audio/engine_[1|2|3].asm) const_def - const Ch1 ; 0 - const Ch2 ; 1 - const Ch3 ; 2 - const Ch4 ; 3 + const CHAN1 ; 0 + const CHAN2 ; 1 + const CHAN3 ; 2 + const CHAN4 ; 3 DEF NUM_MUSIC_CHANS EQU const_value - const Ch5 ; 4 - const Ch6 ; 5 - const Ch7 ; 6 - const Ch8 ; 7 + const CHAN5 ; 4 + const CHAN6 ; 5 + const CHAN7 ; 6 + const CHAN8 ; 7 DEF NUM_NOISE_CHANS EQU const_value - NUM_MUSIC_CHANS DEF NUM_CHANNELS EQU const_value diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 6aa697c9..f84b759c 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -782,7 +782,7 @@ FaintEnemyPokemon: ld a, SFX_FAINT_FALL call PlaySoundWaitForCurrent .sfxwait - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp SFX_FAINT_FALL jr z, .sfxwait ld a, SFX_FAINT_THUD @@ -866,7 +866,7 @@ EndLowHealthAlarm: ; the low health alarm and prevents it from reactivating until the next battle. xor a ld [wLowHealthAlarm], a ; turn off low health alarm - ld [wChannelSoundIDs + Ch5], a + ld [wChannelSoundIDs + CHAN5], a inc a ld [wLowHealthAlarmDisabled], a ; prevent it from reactivating ret @@ -1864,7 +1864,7 @@ DrawPlayerHUDAndHPBar: ld [hl], $0 ret z xor a - ld [wChannelSoundIDs + Ch5], a + ld [wChannelSoundIDs + CHAN5], a ret .setLowHealthAlarm ld hl, wLowHealthAlarm diff --git a/engine/battle/end_of_battle.asm b/engine/battle/end_of_battle.asm index bd4a1901..b9f9d537 100644 --- a/engine/battle/end_of_battle.asm +++ b/engine/battle/end_of_battle.asm @@ -46,7 +46,7 @@ EndOfBattle: .resetVariables xor a ld [wLowHealthAlarm], a ;disable low health alarm - ld [wChannelSoundIDs + Ch5], a + ld [wChannelSoundIDs + CHAN5], a ld [wIsInBattle], a ld [wBattleType], a ld [wMoveMissed], a diff --git a/engine/events/hidden_objects/safari_game.asm b/engine/events/hidden_objects/safari_game.asm index ac07e2f3..ea00be5a 100644 --- a/engine/events/hidden_objects/safari_game.asm +++ b/engine/events/hidden_objects/safari_game.asm @@ -37,7 +37,7 @@ SafariZoneGameOver: ld a, SFX_SAFARI_ZONE_PA call PlayMusic .waitForMusicToPlay - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp SFX_SAFARI_ZONE_PA jr nz, .waitForMusicToPlay ld a, TEXT_SAFARI_GAME_OVER diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index 913b8636..a89031b4 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -991,7 +991,7 @@ ItemUseMedicine: .notFullHP ; if the pokemon's current HP doesn't equal its max HP xor a ld [wLowHealthAlarm], a ;disable low health alarm - ld [wChannelSoundIDs + Ch5], a + ld [wChannelSoundIDs + CHAN5], a push hl push de ld bc, wPartyMon1MaxHP - (wPartyMon1HP + 1) @@ -1732,7 +1732,7 @@ ItemUsePokeflute: call WaitForSoundToFinish ; wait for sound to end farcall Music_PokeFluteInBattle ; play in-battle pokeflute music .musicWaitLoop ; wait for music to finish playing - ld a, [wChannelSoundIDs + Ch7] + ld a, [wChannelSoundIDs + CHAN7] and a ; music off? jr nz, .musicWaitLoop .skipMusic @@ -1799,7 +1799,7 @@ PlayedFluteHadEffectText: ld c, BANK(SFX_Pokeflute) call PlayMusic .musicWaitLoop ; wait for music to finish playing - ld a, [wChannelSoundIDs + Ch3] + ld a, [wChannelSoundIDs + CHAN3] cp SFX_POKEFLUTE jr z, .musicWaitLoop call PlayDefaultMusic ; start playing normal music again diff --git a/engine/movie/evolution.asm b/engine/movie/evolution.asm index 77840556..4464fd87 100644 --- a/engine/movie/evolution.asm +++ b/engine/movie/evolution.asm @@ -8,7 +8,7 @@ EvolveMon: push af xor a ld [wLowHealthAlarm], a - ld [wChannelSoundIDs + Ch5], a + ld [wChannelSoundIDs + CHAN5], a dec a ; SFX_STOP_ALL_MUSIC ld [wNewSoundID], a call PlaySound diff --git a/engine/overworld/elevator.asm b/engine/overworld/elevator.asm index fa404602..0d19c127 100644 --- a/engine/overworld/elevator.asm +++ b/engine/overworld/elevator.asm @@ -33,7 +33,7 @@ ShakeElevator:: ld a, SFX_SAFARI_ZONE_PA call PlayMusic .musicLoop - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp SFX_SAFARI_ZONE_PA jr z, .musicLoop call UpdateSprites diff --git a/home/audio.asm b/home/audio.asm index eded85e9..1da6453c 100644 --- a/home/audio.asm +++ b/home/audio.asm @@ -146,10 +146,10 @@ PlaySound:: and a jr z, .next xor a - ld [wChannelSoundIDs + Ch5], a - ld [wChannelSoundIDs + Ch6], a - ld [wChannelSoundIDs + Ch7], a - ld [wChannelSoundIDs + Ch8], a + ld [wChannelSoundIDs + CHAN5], a + ld [wChannelSoundIDs + CHAN6], a + ld [wChannelSoundIDs + CHAN7], a + ld [wChannelSoundIDs + CHAN8], a .next ld a, [wAudioFadeOutControl] and a ; has a fade-out length been specified? diff --git a/home/delay.asm b/home/delay.asm index 850b23e9..3d1ea44d 100644 --- a/home/delay.asm +++ b/home/delay.asm @@ -18,7 +18,7 @@ WaitForSoundToFinish:: ret nz push hl .waitLoop - ld hl, wChannelSoundIDs + Ch5 + ld hl, wChannelSoundIDs + CHAN5 xor a or [hl] inc hl diff --git a/home/overworld.asm b/home/overworld.asm index 74c97cb7..a4e547bf 100644 --- a/home/overworld.asm +++ b/home/overworld.asm @@ -1244,7 +1244,7 @@ CollisionCheckOnLand:: call CheckTilePassable jr nc, .noCollision .collision - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp SFX_COLLISION ; check if collision sound is already playing jr z, .setCarry ld a, SFX_COLLISION @@ -1925,7 +1925,7 @@ CollisionCheckOnWater:: jr z, .stopSurfing ; stop surfing if the tile is passable jr .loop .collision - ld a, [wChannelSoundIDs + Ch5] + ld a, [wChannelSoundIDs + CHAN5] cp SFX_COLLISION ; check if collision sound is already playing jr z, .setCarry ld a, SFX_COLLISION diff --git a/macros/scripts/audio.asm b/macros/scripts/audio.asm index 114bf576..6b8a650a 100644 --- a/macros/scripts/audio.asm +++ b/macros/scripts/audio.asm @@ -1,18 +1,15 @@ -MACRO audio_header - db (_NARG - 2) << 6 | \2 - dw \1_\2 - IF _NARG > 2 - db \3 - dw \1_\3 - ENDC - IF _NARG > 3 - db \4 - dw \1_\4 - ENDC - IF _NARG > 4 - db \5 - dw \1_\5 - ENDC +MACRO channel_count + ASSERT 0 < (\1) && (\1) <= NUM_MUSIC_CHANS, \ + "channel_count must be 1-{d:NUM_MUSIC_CHANS}" + DEF _num_channels = \1 - 1 +ENDM + +MACRO channel + 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 + DEF _num_channels = 0 ENDM const_def $10 @@ -27,9 +24,9 @@ ENDM MACRO pitch_sweep db pitch_sweep_cmd IF \2 < 0 - db (\1 << 4) | (%1000 | (\2 * -1)) + dn \1, %1000 | (\2 * -1) ELSE - db (\1 << 4) | \2 + dn \1, \2 ENDC ENDM @@ -45,9 +42,9 @@ DEF square_note_cmd EQU sfx_note_cmd ; $20 MACRO square_note db square_note_cmd | \1 IF \3 < 0 - db (\2 << 4) | (%1000 | (\3 * -1)) + dn \2, %1000 | (\3 * -1) ELSE - db (\2 << 4) | \3 + dn \2, \3 ENDC dw \4 ENDM @@ -60,16 +57,16 @@ DEF noise_note_cmd EQU sfx_note_cmd ; $20 MACRO noise_note db noise_note_cmd | \1 IF \3 < 0 - db (\2 << 4) | (%1000 | (\3 * -1)) + dn \2, %1000 | (\3 * -1) ELSE - db (\2 << 4) | \3 + dn \2, \3 ENDC db \4 ENDM ; arguments: pitch, length [1, 16] MACRO note - db (\1 << 4) | (\2 - 1) + dn \1, \2 - 1 ENDM const_next $b0 @@ -86,7 +83,7 @@ ENDM ; can only be used with instruments 1-10, excluding 2 ; unused MACRO drum_note_short - db (\1 << 4) | (\2 - 1) + note \1, \2 ENDM const_next $c0 @@ -107,9 +104,9 @@ ENDM MACRO note_type db note_type_cmd | \1 IF \3 < 0 - db (\2 << 4) | (%1000 | (\3 * -1)) + dn \2, %1000 | (\3 * -1) ELSE - db (\2 << 4) | \3 + dn \2, \3 ENDC ENDM @@ -145,7 +142,7 @@ ENDM MACRO vibrato db vibrato_cmd db \1 - db (\2 << 4) | \3 + dn \2, \3 ENDM ; arguments: length [1, 256], octave [1, 8], pitch @@ -153,7 +150,7 @@ ENDM MACRO pitch_slide db pitch_slide_cmd db \1 - 1 - db ((8 - \2) << 4) | \3 + dn 8 - \2, \3 ENDM ; arguments: duty cycle [0, 3] (12.5%, 25%, 50%, 75%) @@ -179,7 +176,7 @@ ENDM const stereo_panning_cmd ; $ee MACRO stereo_panning db stereo_panning_cmd - db (\1 << 4) | \2 + dn \1, \2 ENDM const unknownmusic0xef_cmd ; $ef @@ -192,7 +189,7 @@ ENDM const volume_cmd ; $f0 MACRO volume db volume_cmd - db (\1 << 4) | \2 + dn \1, \2 ENDM const_next $f8 diff --git a/scripts/PewterPokecenter.asm b/scripts/PewterPokecenter.asm index 5030244c..3267dcee 100644 --- a/scripts/PewterPokecenter.asm +++ b/scripts/PewterPokecenter.asm @@ -62,7 +62,7 @@ PewterJigglypuffText: call DelayFrames ld a, [wChannelSoundIDs] ld b, a - ld a, [wChannelSoundIDs + Ch2] + ld a, [wChannelSoundIDs + CHAN2] or b jr nz, .spinMovementLoop -- cgit v1.3.1-sl0p