diff options
Diffstat (limited to 'macros/scripts')
-rw-r--r-- | macros/scripts/audio.asm | 250 | ||||
-rw-r--r-- | macros/scripts/events.asm | 260 | ||||
-rw-r--r-- | macros/scripts/maps.asm | 4 | ||||
-rw-r--r-- | macros/scripts/movement.asm | 436 |
4 files changed, 490 insertions, 460 deletions
diff --git a/macros/scripts/audio.asm b/macros/scripts/audio.asm index fc9e3397..92654ff9 100644 --- a/macros/scripts/audio.asm +++ b/macros/scripts/audio.asm @@ -1,21 +1,42 @@ -musicheader: MACRO - ; number of tracks, track idx, address - dbw ((\1 - 1) << 6) + (\2 - 1), \3 +channel_count: MACRO +_num_channels = \1 - 1 +ENDM + +channel: MACRO + dn (_num_channels << 2), \1 - 1 ; channel id + dw \2 ; address +_num_channels = 0 ENDM note: MACRO - dn (\1), (\2) - 1 + dn (\1), (\2) - 1 ; pitch, length +ENDM + +drum_note: MACRO + note \1, \2 ; drum instrument, length ENDM -sound: MACRO - note \1, \2 - db \3 ; intensity +rest: MACRO + note 0, \1 ; length +ENDM + +square_note: MACRO + db \1 ; length + IF \3 < 0 + dn \2, %1000 | (\3 * -1) ; volume envelope + ELSE + dn \2, \3 ; volume envelope + ENDC dw \4 ; frequency ENDM -noise: MACRO - note \1, \2 ; duration - db \3 ; intensity +noise_note: MACRO + db \1 ; length + IF \3 < 0 + dn \2, %1000 | (\3 * -1) ; volume envelope + ELSE + dn \2, \3 ; volume envelope + ENDC db \4 ; frequency ENDM @@ -25,24 +46,33 @@ FIRST_MUSIC_CMD EQU __enum__ enum octave_cmd ; $d0 octave: MACRO - db octave_cmd | 8 - (\1) + db octave_cmd | 8 - (\1) ; octave ENDM __enumdir__ = +1 - enum notetype_cmd ; $d8 -notetype: MACRO - db notetype_cmd - db \1 ; note_length -if _NARG >= 2 - db \2 ; intensity -endc + enum note_type_cmd ; $d8 +note_type: MACRO + db note_type_cmd + db \1 ; note length + IF _NARG >= 2 + IF \3 < 0 + dn \2, %1000 | (\3 * -1) ; volume envelope + ELSE + dn \2, \3 ; volume envelope + ENDC + ENDC +ENDM + +; only valid on the noise channel +drum_speed: MACRO + note_type \1 ; note length ENDM - enum pitchoffset_cmd ; $d9 -pitchoffset: MACRO - db pitchoffset_cmd - dn \1, \2 - 1 ; octave, key + enum transpose_cmd ; $d9 +transpose: MACRO + db transpose_cmd + dn \1, \2 ; num octaves, num pitches ENDM enum tempo_cmd ; $da @@ -51,51 +81,59 @@ tempo: MACRO bigdw \1 ; tempo ENDM - enum dutycycle_cmd ; $db -dutycycle: MACRO - db dutycycle_cmd - db \1 ; duty_cycle + enum duty_cycle_cmd ; $db +duty_cycle: MACRO + db duty_cycle_cmd + db \1 ; duty cycle ENDM - enum intensity_cmd ; $dc -intensity: MACRO - db intensity_cmd - db \1 ; intensity + enum volume_envelope_cmd ; $dc +volume_envelope: MACRO + db volume_envelope_cmd + IF \2 < 0 + dn \1, %1000 | (\2 * -1) ; volume envelope + ELSE + dn \1, \2 ; volume envelope + ENDC ENDM - enum soundinput_cmd ; $dd -soundinput: MACRO - db soundinput_cmd - db \1 ; input + enum pitch_sweep_cmd ; $dd +pitch_sweep: MACRO + db pitch_sweep_cmd + IF \2 < 0 + dn \1, %1000 | (\2 * -1) ; pitch sweep + ELSE + dn \1, \2 ; pitch sweep + ENDC ENDM - enum sound_duty_cmd ; $de -sound_duty: MACRO - db sound_duty_cmd -if _NARG == 4 - db \1 | (\2 << 2) | (\3 << 4) | (\4 << 6) ; duty sequence -else - db \1 ; LEGACY: Support for one-byte duty value -endc + enum duty_cycle_pattern_cmd ; $de +duty_cycle_pattern: MACRO + db duty_cycle_pattern_cmd + db (\1 << 6) | (\2 << 4) | (\3 << 2) | (\4 << 0) ; duty cycle pattern ENDM - enum togglesfx_cmd ; $df -togglesfx: MACRO - db togglesfx_cmd + enum toggle_sfx_cmd ; $df +toggle_sfx: MACRO + db toggle_sfx_cmd ENDM - enum slidepitchto_cmd ; $e0 -slidepitchto: MACRO - db slidepitchto_cmd + enum pitch_slide_cmd ; $e0 +pitch_slide: MACRO + db pitch_slide_cmd db \1 - 1 ; duration - dn \2, \3 ; octave, pitch + dn 8 - \2, \3 % 12 ; octave, pitch ENDM enum vibrato_cmd ; $e1 vibrato: MACRO db vibrato_cmd db \1 ; delay - db \2 ; extent + IF _NARG > 2 + dn \2, \3 ; extent, rate + ELSE + db \2 ; LEGACY: Support for 1-arg extent + ENDC ENDM enum unknownmusic0xe2_cmd ; $e2 @@ -104,28 +142,34 @@ unknownmusic0xe2: MACRO db \1 ; unknown ENDM - enum togglenoise_cmd ; $e3 -togglenoise: MACRO - db togglenoise_cmd - db \1 ; id + enum toggle_noise_cmd ; $e3 +toggle_noise: MACRO + db toggle_noise_cmd + IF _NARG > 0 + db \1 ; drum kit + ENDC ENDM - enum panning_cmd ; $e4 -panning: MACRO - db panning_cmd - db \1 ; tracks + enum force_stereo_panning_cmd ; $e4 +force_stereo_panning: MACRO + db force_stereo_panning_cmd + dn %1111 * (1 && \1), %1111 * (1 && \2) ; left enable, right enable ENDM enum volume_cmd ; $e5 volume: MACRO db volume_cmd - db \1 ; volume + IF _NARG > 1 + dn \1, \2 ; left volume, right volume + ELSE + db \1 ; LEGACY: Support for 1-arg volume + ENDC ENDM - enum tone_cmd ; $e6 -tone: MACRO - db tone_cmd - bigdw \1 ; tone + enum pitch_offset_cmd ; $e6 +pitch_offset: MACRO + db pitch_offset_cmd + bigdw \1 ; pitch offset ENDM enum unknownmusic0xe7_cmd ; $e7 @@ -143,29 +187,29 @@ ENDM enum tempo_relative_cmd ; $e9 tempo_relative: MACRO db tempo_relative_cmd - bigdw \1 ; value + bigdw \1 ; tempo adjustment ENDM - enum restartchannel_cmd ; $ea -restartchannel: MACRO - db restartchannel_cmd + enum restart_channel_cmd ; $ea +restart_channel: MACRO + db restart_channel_cmd dw \1 ; address ENDM - enum newsong_cmd ; $eb -newsong: MACRO - db newsong_cmd + enum new_song_cmd ; $eb +new_song: MACRO + db new_song_cmd bigdw \1 ; id ENDM - enum sfxpriorityon_cmd ; $ec -sfxpriorityon: MACRO - db sfxpriorityon_cmd + enum sfx_priority_on_cmd ; $ec +sfx_priority_on: MACRO + db sfx_priority_on_cmd ENDM - enum sfxpriorityoff_cmd ; $ed -sfxpriorityoff: MACRO - db sfxpriorityoff_cmd + enum sfx_priority_off_cmd ; $ed +sfx_priority_off: MACRO + db sfx_priority_off_cmd ENDM enum unknownmusic0xee_cmd ; $ee @@ -174,16 +218,18 @@ unknownmusic0xee: MACRO dw \1 ; address ENDM - enum stereopanning_cmd ; $ef -stereopanning: MACRO - db stereopanning_cmd - db \1 ; tracks + enum stereo_panning_cmd ; $ef +stereo_panning: MACRO + db stereo_panning_cmd + dn %1111 * (1 && \1), %1111 * (1 && \2) ; left enable, right enable ENDM - enum sfxtogglenoise_cmd ; $f0 -sfxtogglenoise: MACRO - db sfxtogglenoise_cmd - db \1 ; id + enum sfx_toggle_noise_cmd ; $f0 +sfx_toggle_noise: MACRO + db sfx_toggle_noise_cmd + IF _NARG > 0 + db \1 ; drum kit + ENDC ENDM enum music0xf1_cmd ; $f1 @@ -231,39 +277,39 @@ unknownmusic0xf9: MACRO db unknownmusic0xf9_cmd ENDM - enum setcondition_cmd ; $fa -setcondition: MACRO - db setcondition_cmd + enum set_condition_cmd ; $fa +set_condition: MACRO + db set_condition_cmd db \1 ; condition ENDM - enum jumpif_cmd ; $fb -jumpif: MACRO - db jumpif_cmd + enum sound_jump_if_cmd ; $fb +sound_jump_if: MACRO + db sound_jump_if_cmd db \1 ; condition dw \2 ; address ENDM - enum jumpchannel_cmd ; $fc -jumpchannel: MACRO - db jumpchannel_cmd + enum sound_jump_cmd ; $fc +sound_jump: MACRO + db sound_jump_cmd dw \1 ; address ENDM - enum loopchannel_cmd ; $fd -loopchannel: MACRO - db loopchannel_cmd + enum sound_loop_cmd ; $fd +sound_loop: MACRO + db sound_loop_cmd db \1 ; count dw \2 ; address ENDM - enum callchannel_cmd ; $fe -callchannel: MACRO - db callchannel_cmd + enum sound_call_cmd ; $fe +sound_call: MACRO + db sound_call_cmd dw \1 ; address ENDM - enum endchannel_cmd ; $ff -endchannel: MACRO - db endchannel_cmd + enum sound_ret_cmd ; $ff +sound_ret: MACRO + db sound_ret_cmd ENDM diff --git a/macros/scripts/events.asm b/macros/scripts/events.asm index 3a6578d7..dd5af81d 100644 --- a/macros/scripts/events.asm +++ b/macros/scripts/events.asm @@ -13,27 +13,27 @@ farscall: MACRO dba \1 ENDM - enum ptcall_command ; $02 -ptcall: MACRO - db ptcall_command + enum memcall_command ; $02 +memcall: MACRO + db memcall_command dw \1 ; pointer ENDM - enum jump_command ; $03 -jump: MACRO - db jump_command + enum sjump_command ; $03 +sjump: MACRO + db sjump_command dw \1 ; pointer ENDM - enum farjump_command ; $04 -farjump: MACRO - db farjump_command + enum farsjump_command ; $04 +farsjump: MACRO + db farsjump_command dba \1 ENDM - enum ptjump_command ; $05 -ptjump: MACRO - db ptjump_command + enum memjump_command ; $05 +memjump: MACRO + db memjump_command dw \1 ; pointer ENDM @@ -101,9 +101,9 @@ special: MACRO dw (\1Special - SpecialsPointers) / 3 ENDM - enum ptcallasm_command ; $10 -ptcallasm: MACRO - db ptcallasm_command + enum memcallasm_command ; $10 +memcallasm: MACRO + db memcallasm_command dw \1 ; asm ENDM @@ -131,15 +131,15 @@ setscene: MACRO db \1 ; scene_id ENDM - enum writebyte_command ; $15 -writebyte: MACRO - db writebyte_command + enum setval_command ; $15 +setval: MACRO + db setval_command db \1 ; value ENDM - enum addvar_command ; $16 -addvar: MACRO - db addvar_command + enum addval_command ; $16 +addval: MACRO + db addval_command db \1 ; value ENDM @@ -154,42 +154,47 @@ checkver: MACRO db checkver_command ENDM - enum copybytetovar_command ; $19 -copybytetovar: MACRO - db copybytetovar_command + enum readmem_command ; $19 +readmem: MACRO + db readmem_command dw \1 ; address ENDM - enum copyvartobyte_command ; $1a -copyvartobyte: MACRO - db copyvartobyte_command + enum writemem_command ; $1a +writemem: MACRO + db writemem_command dw \1 ; address ENDM - enum loadvar_command ; $1b -loadvar: MACRO - db loadvar_command + enum loadmem_command ; $1b +loadmem: MACRO + db loadmem_command dw \1 ; address db \2 ; value ENDM - enum checkcode_command ; $1c -checkcode: MACRO - db checkcode_command + enum readvar_command ; $1c +readvar: MACRO + db readvar_command db \1 ; variable_id ENDM - enum writevarcode_command ; $1d -writevarcode: MACRO - db writevarcode_command + enum writevar_command ; $1d +writevar: MACRO + db writevar_command db \1 ; variable_id ENDM - enum writecode_command ; $1e -writecode: MACRO - db writecode_command + enum loadvar_command ; $1e +loadvar: MACRO +if STRIN("\1", "VAR_") != 1 +; LEGACY: Support for the old name of "loadmem" + loadmem \1, \2 +else + db loadvar_command db \1 ; variable_id db \2 ; value +endc ENDM enum giveitem_command ; $1f @@ -400,58 +405,58 @@ warp: MACRO db \3 ; y ENDM - enum readmoney_command ; $3d -readmoney: MACRO - db readmoney_command - db \1 ; account - db \2 ; memory + enum getmoney_command ; $3d +getmoney: MACRO + db getmoney_command + db \2 ; account + db \1 ; string_buffer ENDM - enum readcoins_command ; $3e -readcoins: MACRO - db readcoins_command - db \1 ; memory + enum getcoins_command ; $3e +getcoins: MACRO + db getcoins_command + db \1 ; string_buffer ENDM - enum vartomem_command ; $3f -vartomem: MACRO - db vartomem_command - db \1 ; memory + enum getnum_command ; $3f +getnum: MACRO + db getnum_command + db \1 ; string_buffer ENDM - enum pokenamemem_command ; $40 -pokenamemem: MACRO - db pokenamemem_command - db \1 ; pokemon - db \2 ; memory + enum getmonname_command ; $40 +getmonname: MACRO + db getmonname_command + db \2 ; pokemon + db \1 ; string_buffer ENDM - enum itemtotext_command ; $41 -itemtotext: MACRO - db itemtotext_command - db \1 ; item - db \2 ; memory + enum getitemname_command ; $41 +getitemname: MACRO + db getitemname_command + db \2 ; item + db \1 ; string_buffer ENDM - enum mapnametotext_command ; $42 -mapnametotext: MACRO - db mapnametotext_command - db \1 ; memory + enum getcurlandmarkname_command ; $42 +getcurlandmarkname: MACRO + db getcurlandmarkname_command + db \1 ; string_buffer ENDM - enum trainertotext_command ; $43 -trainertotext: MACRO - db trainertotext_command - db \1 ; trainer_id + enum gettrainername_command ; $43 +gettrainername: MACRO + db gettrainername_command db \2 ; trainer_group - db \3 ; memory + db \3 ; trainer_id + db \1 ; string_buffer ENDM - enum stringtotext_command ; $44 -stringtotext: MACRO - db stringtotext_command - dw \1 ; text_pointer - db \2 ; memory + enum getstring_command ; $44 +getstring: MACRO + db getstring_command + dw \2 ; text_pointer + db \1 ; string_buffer ENDM enum itemnotify_command ; $45 @@ -484,9 +489,9 @@ closetext: MACRO db closetext_command ENDM - enum loadbytec2cf_command ; $4a -loadbytec2cf: MACRO - db loadbytec2cf_command + enum writeunusedbytebuffer_command ; $4a +writeunusedbytebuffer: MACRO + db writeunusedbytebuffer_command db \1 ; byte ENDM @@ -542,9 +547,9 @@ waitbutton: MACRO db waitbutton_command ENDM - enum buttonsound_command ; $54 -buttonsound: MACRO - db buttonsound_command + enum promptbutton_command ; $54 +promptbutton: MACRO + db promptbutton_command ENDM enum pokepic_command ; $55 @@ -578,9 +583,9 @@ randomwildmon: MACRO db randomwildmon_command ENDM - enum loadmemtrainer_command ; $5b -loadmemtrainer: MACRO - db loadmemtrainer_command + enum loadtemptrainer_command ; $5b +loadtemptrainer: MACRO + db loadtemptrainer_command ENDM enum loadwildmon_command ; $5c @@ -616,7 +621,7 @@ ENDM enum trainertext_command ; $61 trainertext: MACRO db trainertext_command - db \1 ; which_text + db \1 ; text_id ENDM enum trainerflagaction_command ; $62 @@ -660,9 +665,9 @@ applymovement: MACRO dw \2 ; data ENDM - enum applymovement2_command ; $69 -applymovement2: MACRO - db applymovement2_command + enum applymovementlasttalked_command ; $69 +applymovementlasttalked: MACRO + db applymovementlasttalked_command dw \1 ; data ENDM @@ -757,11 +762,10 @@ earthquake: MACRO db \1 ; param ENDM - enum changemap_command ; $78 -changemap: MACRO - db changemap_command - db \1 ; map_bank - dw \2 ; map_data_pointer + enum changemapblocks_command ; $78 +changemapblocks: MACRO + db changemapblocks_command + dba \1 ; map_data_pointer ENDM enum changeblock_command ; $79 @@ -849,10 +853,10 @@ specialsound: MACRO db specialsound_command ENDM - enum passtoengine_command ; $88 -passtoengine: MACRO - db passtoengine_command - db \1 ; data_pointer + enum autoinput_command ; $88 +autoinput: MACRO + db autoinput_command + dba \1 ENDM enum newloadmap_command ; $89 @@ -873,9 +877,9 @@ deactivatefacing: MACRO db \1 ; time ENDM - enum priorityjump_command ; $8c -priorityjump: MACRO - db priorityjump_command + enum prioritysjump_command ; $8c +prioritysjump: MACRO + db prioritysjump_command dw \1 ; pointer ENDM @@ -884,9 +888,9 @@ warpcheck: MACRO db warpcheck_command ENDM - enum ptpriorityjump_command ; $8e -ptpriorityjump: MACRO - db ptpriorityjump_command + enum stopandsjump_command ; $8e +stopandsjump: MACRO + db stopandsjump_command dw \1 ; pointer ENDM @@ -900,25 +904,25 @@ end: MACRO db end_command ENDM - enum reloadandreturn_command ; $92 + enum reloadandreturn_command ; $91 reloadandreturn: MACRO db reloadandreturn_command db \1 ; which_method ENDM - enum endall_command ; $93 + enum endall_command ; $92 endall: MACRO db endall_command ENDM - enum pokemart_command ; $94 + enum pokemart_command ; $93 pokemart: MACRO db pokemart_command db \1 ; dialog_id dw \2 ; mart_id ENDM - enum elevator_command ; $95 + enum elevator_command ; $94 elevator: MACRO db elevator_command dw \1 ; floor_list_pointer @@ -1007,41 +1011,41 @@ warpfacing: MACRO db \4 ; y ENDM - enum battletowertext_command ; $a4 + enum battletowertext_command ; $a2 battletowertext: MACRO db battletowertext_command - db \1 ; memory + db \1 ; bttext_id ENDM - enum landmarktotext_command ; $a5 -landmarktotext: MACRO - db landmarktotext_command - db \1 ; id - db \2 ; memory + enum getlandmarkname_command ; $a3 +getlandmarkname: MACRO + db getlandmarkname_command + db \2 ; landmark_id + db \1 ; string_buffer ENDM - enum trainerclassname_command ; $a6 -trainerclassname: MACRO - db trainerclassname_command - db \1 ; id - db \2 ; memory + enum gettrainerclassname_command ; $a4 +gettrainerclassname: MACRO + db gettrainerclassname_command + db \2 ; trainer_group + db \1 ; string_buffer ENDM - enum name_command ; $a7 -name: MACRO - db name_command - db \1 ; type - db \2 ; id - db \3 ; memory + enum getname_command ; $a5 +getname: MACRO + db getname_command + db \2 ; type + db \3 ; id + db \1 ; memory ENDM - enum wait_command ; $a8 + enum wait_command ; $a6 wait: MACRO db wait_command db \1 ; duration ENDM - enum checksave_command ; $a9 + enum checksave_command ; $a7 checksave: MACRO db checksave_command ENDM diff --git a/macros/scripts/maps.asm b/macros/scripts/maps.asm index 7f5947a5..edf2b421 100644 --- a/macros/scripts/maps.asm +++ b/macros/scripts/maps.asm @@ -3,6 +3,8 @@ map_id: MACRO db GROUP_\1, MAP_\1 ENDM +object_const_def EQUS "const_def 2" + scene_script: MACRO ;\1: script pointer dw \1 @@ -32,7 +34,7 @@ coord_event: MACRO db \3, \2, \1 db 0 ; filler dw \4 - db 0, 0 ; filler + dw 0 ; filler ENDM bg_event: MACRO diff --git a/macros/scripts/movement.asm b/macros/scripts/movement.asm index 49d95f82..eeda6bd8 100644 --- a/macros/scripts/movement.asm +++ b/macros/scripts/movement.asm @@ -1,242 +1,220 @@ - - enum_start - - enum movement_turn_head -turn_head: macro - db movement_turn_head | \1 ; $00 - endm - -__enum__ SET $4 - - enum movement_turn_step -turn_step: macro - db movement_turn_step | \1 ; $04 - endm - -__enum__ SET $8 - - enum movement_slow_step -slow_step: macro - db movement_slow_step | \1; $08 - endm - -__enum__ SET $c - - enum movement_step -step: macro - db movement_step | \1 ; $0c - endm - -__enum__ SET $10 - - enum movement_big_step -big_step: macro - db movement_big_step | \1 ; $10 - endm - -__enum__ SET $14 - - enum movement_slow_slide_step -slow_slide_step: macro - db movement_slow_slide_step | \1 ; $14 - endm - -__enum__ SET $18 - - enum movement_slide_step -slide_step: macro - db movement_slide_step | \1 ; $18 - endm - -__enum__ SET $1c - - enum movement_fast_slide_step -fast_slide_step: macro - db movement_fast_slide_step | \1 ; $1c - endm - -__enum__ SET $20 - - enum movement_turn_away -turn_away: macro - db movement_turn_away | \1 ; $20 - endm - -__enum__ SET $24 - - enum movement_turn_in -turn_in: macro - db movement_turn_in | \1 ; $24 - endm - -__enum__ SET $28 - - enum movement_turn_waterfall -turn_waterfall: macro - db movement_turn_waterfall | \1 ; $28 - endm - -__enum__ SET $2c - - enum movement_slow_jump_step -slow_jump_step: macro - db movement_slow_jump_step | \1 ; $2c - endm - -__enum__ SET $30 - - enum movement_jump_step -jump_step: macro - db movement_jump_step | \1 ; $30 - endm - -__enum__ SET $34 - - enum movement_fast_jump_step -fast_jump_step: macro - db movement_fast_jump_step | \1 ; $34 - endm +; MovementPointers indexes (see engine/overworld/movement.asm) + enum_start 0, +4 + +; Directional movements + + enum movement_turn_head ; $00 +turn_head: MACRO + db movement_turn_head | \1 +ENDM + + enum movement_turn_step ; $04 +turn_step: MACRO + db movement_turn_step | \1 +ENDM + + enum movement_slow_step ; $08 +slow_step: MACRO + db movement_slow_step | \1 +ENDM + + enum movement_step ; $0c +step: MACRO + db movement_step | \1 +ENDM + + enum movement_big_step ; $10 +big_step: MACRO + db movement_big_step | \1 +ENDM + + enum movement_slow_slide_step ; $14 +slow_slide_step: MACRO + db movement_slow_slide_step | \1 +ENDM + + enum movement_slide_step ; $18 +slide_step: MACRO + db movement_slide_step | \1 +ENDM + + enum movement_fast_slide_step ; $1c +fast_slide_step: MACRO + db movement_fast_slide_step | \1 +ENDM + + enum movement_turn_away ; $20 +turn_away: MACRO + db movement_turn_away | \1 +ENDM + + enum movement_turn_in ; $24 +turn_in: MACRO + db movement_turn_in | \1 +ENDM + + enum movement_turn_waterfall ; $28 +turn_waterfall: MACRO + db movement_turn_waterfall | \1 +ENDM + + enum movement_slow_jump_step ; $2c +slow_jump_step: MACRO + db movement_slow_jump_step | \1 +ENDM + + enum movement_jump_step ; $30 +jump_step: MACRO + db movement_jump_step | \1 +ENDM + + enum movement_fast_jump_step ; $34 +fast_jump_step: MACRO + db movement_fast_jump_step | \1 +ENDM + +__enumdir__ = +1 ; Control -__enum__ SET $38 - - enum movement_remove_sliding -remove_sliding: macro - db movement_remove_sliding ; $38 - endm - - enum movement_set_sliding -set_sliding: macro - db movement_set_sliding ; $39 - endm - - enum movement_remove_fixed_facing -remove_fixed_facing: macro - db movement_remove_fixed_facing ; $3a - endm - - enum movement_fix_facing -fix_facing: macro - db movement_fix_facing ; $3b - endm - - enum movement_show_person -show_person: macro - db movement_show_person ; $3c - endm - - enum movement_hide_person -hide_person: macro - db movement_hide_person ; $3d - endm + enum movement_remove_sliding ; $38 +remove_sliding: MACRO + db movement_remove_sliding +ENDM + + enum movement_set_sliding ; $39 +set_sliding: MACRO + db movement_set_sliding +ENDM + + enum movement_remove_fixed_facing ; $3a +remove_fixed_facing: MACRO + db movement_remove_fixed_facing +ENDM + + enum movement_fix_facing ; $3b +fix_facing: MACRO + db movement_fix_facing +ENDM + + enum movement_show_object ; $3c +show_object: MACRO + db movement_show_object +ENDM + + enum movement_hide_object ; $3d +hide_object: MACRO + db movement_hide_object +ENDM ; Sleep - enum movement_step_sleep -step_sleep: macro + enum movement_step_sleep ; $3e +step_sleep: MACRO if \1 <= 8 db movement_step_sleep + \1 - 1 else db movement_step_sleep + 8, \1 endc -endm - -__enum__ SET $47 - - enum movement_step_end -step_end: macro - db movement_step_end ; $47 - endm - -; Whatever Movement_48 is, it takes a one-byte parameter - -__enum__ = $49 - - enum movement_remove_person -remove_person: macro - db movement_remove_person ; $49 - endm - - enum movement_step_loop -step_loop: macro - db movement_step_loop ; $4a - endm - - enum movement_step_4b -step_4b: macro - db movement_step_4b ; $4b - endm - - enum movement_teleport_from -teleport_from: macro - db movement_teleport_from ; $4c - endm - - enum movement_teleport_to -teleport_to: macro - db movement_teleport_to ; $4d - endm - - enum movement_skyfall -skyfall: macro - db movement_skyfall ; $4e - endm - - enum movement_step_dig -step_dig: macro - db movement_step_dig ; $4f - db \1 - endm - - enum movement_step_bump -step_bump: macro - db movement_step_bump ; $50 - endm - - enum movement_fish_got_bite -fish_got_bite: macro - db movement_fish_got_bite ; $51 - endm - - enum movement_fish_cast_rod -fish_cast_rod: macro - db movement_fish_cast_rod ; $52 - endm - - enum movement_hide_emote -hide_emote: macro - db movement_hide_emote ; $53 - endm - - enum movement_show_emote -show_emote: macro - db movement_show_emote ; $54 - endm - - enum movement_step_shake -step_shake: macro - db movement_step_shake ; $55 +ENDM + +__enum__ = __enum__ + 8 + + enum movement_step_end ; $47 +step_end: MACRO + db movement_step_end +ENDM + + enum movement_step_48 ; $48 +step_48: MACRO + db movement_step_48 + db \1 ; ??? +ENDM + + enum movement_remove_object ; $49 +remove_object: MACRO + db movement_remove_object +ENDM + + enum movement_step_loop ; $4a +step_loop: MACRO + db movement_step_loop +ENDM + + enum movement_step_4b ; $4b +step_4b: MACRO + db movement_step_4b +ENDM + + enum movement_teleport_from ; $4c +teleport_from: MACRO + db movement_teleport_from +ENDM + + enum movement_teleport_to ; $4d +teleport_to: MACRO + db movement_teleport_to +ENDM + + enum movement_skyfall ; $4e +skyfall: MACRO + db movement_skyfall +ENDM + + enum movement_step_dig ; $4f +step_dig: MACRO + db movement_step_dig + db \1 ; length +ENDM + + enum movement_step_bump ; $50 +step_bump: MACRO + db movement_step_bump +ENDM + + enum movement_fish_got_bite ; $51 +fish_got_bite: MACRO + db movement_fish_got_bite +ENDM + + enum movement_fish_cast_rod ; $52 +fish_cast_rod: MACRO + db movement_fish_cast_rod +ENDM + + enum movement_hide_emote ; $53 +hide_emote: MACRO + db movement_hide_emote +ENDM + + enum movement_show_emote ; $54 +show_emote: MACRO + db movement_show_emote +ENDM + + enum movement_step_shake ; $55 +step_shake: MACRO + db movement_step_shake db \1 ; displacement - endm +ENDM - enum movement_tree_shake -tree_shake: macro + enum movement_tree_shake ; $56 +tree_shake: MACRO db movement_tree_shake - endm - - enum movement_rock_smash -rock_smash: macro - db movement_rock_smash ; $57 - db \1 - endm - - enum movement_return_dig -return_dig: macro - db movement_return_dig ; $58 - db \1 - endm - - enum movement_skyfall_top -skyfall_top: macro - db movement_skyfall_top ; $59 - endm +ENDM + + enum movement_rock_smash ; $57 +rock_smash: MACRO + db movement_rock_smash + db \1 ; length +ENDM + + enum movement_return_dig ; $58 +return_dig: MACRO + db movement_return_dig + db \1 ; length +ENDM + + enum movement_skyfall_top ; $59 +skyfall_top: MACRO + db movement_skyfall_top +ENDM |