diff --git a/constants/map_constants.asm b/constants/map_constants.asm index 7e3a628b1..e23a58c64 100644 --- a/constants/map_constants.asm +++ b/constants/map_constants.asm @@ -1,9 +1,9 @@ -newgroup: macro +newgroup: MACRO const_value = const_value + 1 enum_start 1 endm -mapgroup: macro +mapgroup: MACRO ;\1: map id ;\2: height: in blocks ;\3: width: in blocks diff --git a/data/items/mom_phone.asm b/data/items/mom_phone.asm index 533241ca1..288a14acc 100644 --- a/data/items/mom_phone.asm +++ b/data/items/mom_phone.asm @@ -1,4 +1,4 @@ -momitem: macro +momitem: MACRO ; money to trigger, cost, kind, item dt \1 dt \2 diff --git a/data/map_objects.asm b/data/map_objects.asm index af8b6d623..b321dcced 100755 --- a/data/map_objects.asm +++ b/data/map_objects.asm @@ -1,4 +1,4 @@ -sprite_movement_data: macro +sprite_movement_data: MACRO db \1, \2, \3, \4, \5 dn \6, 0 endm diff --git a/data/odd_eggs.asm b/data/odd_eggs.asm index a46d84bdc..f9a29f6d6 100644 --- a/data/odd_eggs.asm +++ b/data/odd_eggs.asm @@ -1,4 +1,4 @@ -prob: macro +prob: MACRO prob_total = prob_total + (\1) dw prob_total * $ffff / 100 endm diff --git a/data/palettes/town_map.asm b/data/palettes/town_map.asm index 49fb7a9ce..1672a66ed 100644 --- a/data/palettes/town_map.asm +++ b/data/palettes/town_map.asm @@ -6,7 +6,7 @@ const PAL_TOWNMAP_POI ; 4 const PAL_TOWNMAP_POI_MTN ; 5 -townmappals: macro +townmappals: MACRO rept _NARG / 2 dn PAL_TOWNMAP_\2, PAL_TOWNMAP_\1 shift diff --git a/data/phone_contacts.asm b/data/phone_contacts.asm index 0c21049bb..c4d600edc 100644 --- a/data/phone_contacts.asm +++ b/data/phone_contacts.asm @@ -1,4 +1,4 @@ -phone: macro +phone: MACRO ; trainer class, trainer id, map, ?, script 1, ?, script 2 db \1, \2 map \3 diff --git a/data/phone_special.asm b/data/phone_special.asm index c66c9ff77..e224bf43a 100644 --- a/data/phone_special.asm +++ b/data/phone_special.asm @@ -1,4 +1,4 @@ -specialcall: macro +specialcall: MACRO ; condition, contact, script dw \1 db \2 diff --git a/data/unown_words.asm b/data/unown_words.asm index e70f72356..d019975c9 100644 --- a/data/unown_words.asm +++ b/data/unown_words.asm @@ -1,4 +1,4 @@ -unownword: macro +unownword: MACRO x = 1 rept STRLEN(\1) db STRSUB(\1, x, 1) - $40 diff --git a/data/wild/roammon_maps.asm b/data/wild/roammon_maps.asm index ee213bff5..bf676c3a9 100644 --- a/data/wild/roammon_maps.asm +++ b/data/wild/roammon_maps.asm @@ -1,7 +1,7 @@ ; Maps that roaming monsters can be on, and possible maps they can jump to. ; Notably missing are Route 40 and Route 41, which are water routes. -roam_map: macro +roam_map: MACRO ; map, # of other maps, other maps map \1 db \2 diff --git a/data/wild/treemon_maps.asm b/data/wild/treemon_maps.asm index 47491c2c9..f70617117 100644 --- a/data/wild/treemon_maps.asm +++ b/data/wild/treemon_maps.asm @@ -1,4 +1,4 @@ -treemon_map: macro +treemon_map: MACRO map \1 db \2 ; treemon set endm diff --git a/engine/battle/battle_transition.asm b/engine/battle/battle_transition.asm index bef74ad29..f0c7a9b61 100644 --- a/engine/battle/battle_transition.asm +++ b/engine/battle/battle_transition.asm @@ -828,7 +828,7 @@ StartTrainerBattle_ZoomToBlack: ; 8c768 (23:4768) ; 8c792 (23:4792) .boxes ; 8c792 -zoombox: macro +zoombox: MACRO ; width, height, start y, start x db \1, \2 dwcoord \3, \4 diff --git a/engine/pic_animation.asm b/engine/pic_animation.asm index 2b93ef749..31780342e 100644 --- a/engine/pic_animation.asm +++ b/engine/pic_animation.asm @@ -56,7 +56,7 @@ pokeanim: MACRO rept _NARG ; Workaround for a bug where macro args can't come after the start of a symbol if !def(\1_POKEANIM) -\1_POKEANIM equs "PokeAnim_\1_" +\1_POKEANIM EQUS "PokeAnim_\1_" endc db (\1_POKEANIM - PokeAnim_SetupCommands) / 2 shift @@ -142,7 +142,7 @@ SetUpPokeAnim: ; d00b4 ; d00da PokeAnim_SetupCommands: ; d00da -setup_command: macro +setup_command: MACRO \1_: dw \1 endm setup_command PokeAnim_Finish diff --git a/engine/unown_puzzle.asm b/engine/unown_puzzle.asm index 3afe8a17d..6b43df67e 100755 --- a/engine/unown_puzzle.asm +++ b/engine/unown_puzzle.asm @@ -114,7 +114,7 @@ InitUnownPuzzlePiecePositions: ; e124e ; e126d .PuzzlePieceInitialPositions: ; e126d -initpuzcoord: macro +initpuzcoord: MACRO rept _NARG / 2 db \1 puzcoord \2 shift @@ -599,7 +599,7 @@ RedrawUnownPuzzlePieces: ; e14d9 UnownPuzzleCoordData: ; e1559 -puzzle_coords: macro +puzzle_coords: MACRO dbpixel \1, \2, \3, \4 dwcoord \5, \6 db \7, \8 diff --git a/home/text.asm b/home/text.asm index dca66c3d1..49f798c3b 100644 --- a/home/text.asm +++ b/home/text.asm @@ -200,7 +200,7 @@ NextChar:: ; 1083 jp PlaceNextChar CheckDict:: ; 1087 -dict: macro +dict: MACRO if \1 == 0 and a else @@ -209,7 +209,7 @@ endc jp z, \2 endm -dict2: macro +dict2: MACRO cp \1 jr nz, ._\@ ld a, \2 @@ -309,7 +309,7 @@ Char15:: ; 117b ; 1186 -print_name: macro +print_name: MACRO push de ld de, \1 jp PlaceCommandCharacter diff --git a/macros/base_stats.asm b/macros/base_stats.asm index f7c841634..9c8c9cb32 100644 --- a/macros/base_stats.asm +++ b/macros/base_stats.asm @@ -1,8 +1,8 @@ ; Used in data/pokemon/base_stats/*.asm -define: macro +define: MACRO if !def(\1) -\1 equs \2 +\1 EQUS \2 endc endm diff --git a/macros/code.asm b/macros/code.asm index 93b35bd94..f4bf5bbdc 100644 --- a/macros/code.asm +++ b/macros/code.asm @@ -38,7 +38,7 @@ jumptable: MACRO ; Many mobile functions were dummied out in localization. mobile EQUS "ret" -maskbits: macro +maskbits: MACRO ; example usage in rejection sampling: ; .loop ; call Random diff --git a/macros/coords.asm b/macros/coords.asm index 2a672c3d0..89dc441c2 100644 --- a/macros/coords.asm +++ b/macros/coords.asm @@ -1,6 +1,6 @@ -bccoord equs "coord bc," -decoord equs "coord de," -hlcoord equs "coord hl," +bccoord EQUS "coord bc," +decoord EQUS "coord de," +hlcoord EQUS "coord hl," coord: MACRO ; register, x, y[, origin] diff --git a/macros/enum.asm b/macros/enum.asm index 933f7b183..3f7770ace 100644 --- a/macros/enum.asm +++ b/macros/enum.asm @@ -1,6 +1,6 @@ ; Enumerate variables -enum_start: macro +enum_start: MACRO if _NARG >= 1 __enum__ = \1 else @@ -13,12 +13,12 @@ __enumdir__ = +1 endc endm -enum: macro +enum: MACRO \1 = __enum__ __enum__ = __enum__ + __enumdir__ endm -enum_set: macro +enum_set: MACRO __enum__ = \1 endm diff --git a/macros/scripts/audio.asm b/macros/scripts/audio.asm index b1d340a91..f8c878394 100644 --- a/macros/scripts/audio.asm +++ b/macros/scripts/audio.asm @@ -1,4 +1,4 @@ -musicheader: macro +musicheader: MACRO ; number of tracks, track idx, address dbw ((\1 - 1) << 6) + (\2 - 1), \3 endm @@ -7,13 +7,13 @@ note: MACRO dn (\1), (\2) - 1 ENDM -sound: macro +sound: MACRO note \1, \2 db \3 ; intensity dw \4 ; frequency endm -noise: macro +noise: MACRO note \1, \2 ; duration db \3 ; intensity db \4 ; frequency @@ -23,11 +23,11 @@ noise: macro enum_start $d8 enum notetype_cmd ; $d8 -octave: macro +octave: MACRO db notetype_cmd - (\1) endm -notetype: macro +notetype: MACRO db notetype_cmd db \1 ; note_length if _NARG >= 2 @@ -36,37 +36,37 @@ notetype: macro endm enum pitchoffset_cmd ; $d9 -pitchoffset: macro +pitchoffset: MACRO db pitchoffset_cmd dn \1, \2 - 1 ; octave, key endm enum tempo_cmd ; $da -tempo: macro +tempo: MACRO db tempo_cmd bigdw \1 ; tempo endm enum dutycycle_cmd ; $db -dutycycle: macro +dutycycle: MACRO db dutycycle_cmd db \1 ; duty_cycle endm enum intensity_cmd ; $dc -intensity: macro +intensity: MACRO db intensity_cmd db \1 ; intensity endm enum soundinput_cmd ; $dd -soundinput: macro +soundinput: MACRO db soundinput_cmd db \1 ; input endm enum sound_duty_cmd ; $de -sound_duty: macro +sound_duty: MACRO db sound_duty_cmd if _NARG == 4 db \1 | (\2 << 2) | (\3 << 4) | (\4 << 6) ; duty sequence @@ -76,190 +76,190 @@ sound_duty: macro endm enum togglesfx_cmd ; $df -togglesfx: macro +togglesfx: MACRO db togglesfx_cmd endm enum slidepitchto_cmd ; $e0 -slidepitchto: macro +slidepitchto: MACRO db slidepitchto_cmd db \1 - 1 ; duration dn \2, \3 ; octave, pitch endm enum vibrato_cmd ; $e1 -vibrato: macro +vibrato: MACRO db vibrato_cmd db \1 ; delay db \2 ; extent endm enum unknownmusic0xe2_cmd ; $e2 -unknownmusic0xe2: macro +unknownmusic0xe2: MACRO db unknownmusic0xe2_cmd db \1 ; unknown endm enum togglenoise_cmd ; $e3 -togglenoise: macro +togglenoise: MACRO db togglenoise_cmd db \1 ; id endm enum panning_cmd ; $e4 -panning: macro +panning: MACRO db panning_cmd db \1 ; tracks endm enum volume_cmd ; $e5 -volume: macro +volume: MACRO db volume_cmd db \1 ; volume endm enum tone_cmd ; $e6 -tone: macro +tone: MACRO db tone_cmd bigdw \1 ; tone endm enum unknownmusic0xe7_cmd ; $e7 -unknownmusic0xe7: macro +unknownmusic0xe7: MACRO db unknownmusic0xe7_cmd db \1 ; unknown endm enum unknownmusic0xe8_cmd ; $e8 -unknownmusic0xe8: macro +unknownmusic0xe8: MACRO db unknownmusic0xe8_cmd db \1 ; unknown endm enum tempo_relative_cmd ; $e9 -tempo_relative: macro +tempo_relative: MACRO db tempo_relative_cmd bigdw \1 ; value endm enum restartchannel_cmd ; $ea -restartchannel: macro +restartchannel: MACRO db restartchannel_cmd dw \1 ; address endm enum newsong_cmd ; $eb -newsong: macro +newsong: MACRO db newsong_cmd bigdw \1 ; id endm enum sfxpriorityon_cmd ; $ec -sfxpriorityon: macro +sfxpriorityon: MACRO db sfxpriorityon_cmd endm enum sfxpriorityoff_cmd ; $ed -sfxpriorityoff: macro +sfxpriorityoff: MACRO db sfxpriorityoff_cmd endm enum unknownmusic0xee_cmd ; $ee -unknownmusic0xee: macro +unknownmusic0xee: MACRO db unknownmusic0xee_cmd dw \1 ; address endm enum stereopanning_cmd ; $ef -stereopanning: macro +stereopanning: MACRO db stereopanning_cmd db \1 ; tracks endm enum sfxtogglenoise_cmd ; $f0 -sfxtogglenoise: macro +sfxtogglenoise: MACRO db sfxtogglenoise_cmd db \1 ; id endm enum music0xf1_cmd ; $f1 -music0xf1: macro +music0xf1: MACRO db music0xf1_cmd endm enum music0xf2_cmd ; $f2 -music0xf2: macro +music0xf2: MACRO db music0xf2_cmd endm enum music0xf3_cmd ; $f3 -music0xf3: macro +music0xf3: MACRO db music0xf3_cmd endm enum music0xf4_cmd ; $f4 -music0xf4: macro +music0xf4: MACRO db music0xf4_cmd endm enum music0xf5_cmd ; $f5 -music0xf5: macro +music0xf5: MACRO db music0xf5_cmd endm enum music0xf6_cmd ; $f6 -music0xf6: macro +music0xf6: MACRO db music0xf6_cmd endm enum music0xf7_cmd ; $f7 -music0xf7: macro +music0xf7: MACRO db music0xf7_cmd endm enum music0xf8_cmd ; $f8 -music0xf8: macro +music0xf8: MACRO db music0xf8_cmd endm enum unknownmusic0xf9_cmd ; $f9 -unknownmusic0xf9: macro +unknownmusic0xf9: MACRO db unknownmusic0xf9_cmd endm enum setcondition_cmd ; $fa -setcondition: macro +setcondition: MACRO db setcondition_cmd db \1 ; condition endm enum jumpif_cmd ; $fb -jumpif: macro +jumpif: MACRO db jumpif_cmd db \1 ; condition dw \2 ; address endm enum jumpchannel_cmd ; $fc -jumpchannel: macro +jumpchannel: MACRO db jumpchannel_cmd dw \1 ; address endm enum loopchannel_cmd ; $fd -loopchannel: macro +loopchannel: MACRO db loopchannel_cmd db \1 ; count dw \2 ; address endm enum callchannel_cmd ; $fe -callchannel: macro +callchannel: MACRO db callchannel_cmd dw \1 ; address endm enum endchannel_cmd ; $ff -endchannel: macro +endchannel: MACRO db endchannel_cmd endm diff --git a/macros/scripts/battle_anims.asm b/macros/scripts/battle_anims.asm index 3c054d460..baa45503e 100644 --- a/macros/scripts/battle_anims.asm +++ b/macros/scripts/battle_anims.asm @@ -1,4 +1,4 @@ -anim_wait: macro +anim_wait: MACRO if \1 >= $d0 flip out endc @@ -9,7 +9,7 @@ endc enum_start $d0 enum anim_obj_command ; $d0 -anim_obj: macro +anim_obj: MACRO db anim_obj_command db \1 ; obj db (\2 << 3) + \3 ; x @@ -18,20 +18,20 @@ anim_obj: macro endm enum anim_1gfx_command ; $d1 -anim_1gfx: macro +anim_1gfx: MACRO db anim_1gfx_command db \1 ; gfx1 endm enum anim_2gfx_command ; $d2 -anim_2gfx: macro +anim_2gfx: MACRO db anim_2gfx_command db \1 ; gfx1 db \2 ; gfx2 endm enum anim_3gfx_command ; $d3 -anim_3gfx: macro +anim_3gfx: MACRO db anim_3gfx_command db \1 ; gfx1 db \2 ; gfx2 @@ -39,7 +39,7 @@ anim_3gfx: macro endm enum anim_4gfx_command ; $d4 -anim_4gfx: macro +anim_4gfx: MACRO db anim_4gfx_command db \1 ; gfx1 db \2 ; gfx2 @@ -48,7 +48,7 @@ anim_4gfx: macro endm enum anim_5gfx_command ; $d5 -anim_5gfx: macro +anim_5gfx: MACRO db anim_5gfx_command db \1 ; gfx1 db \2 ; gfx2 @@ -58,147 +58,147 @@ anim_5gfx: macro endm enum anim_incobj_command ; $d6 -anim_incobj: macro +anim_incobj: MACRO db anim_incobj_command db \1 ; id endm enum anim_setobj_command ; $d7 -anim_setobj: macro +anim_setobj: MACRO db anim_setobj_command db \1 ; id db \2 ; obj endm enum anim_incbgeffect_command ; $d8 -anim_incbgeffect: macro +anim_incbgeffect: MACRO db anim_incbgeffect_command db \1 ; effect endm enum anim_enemyfeetobj_command ; $d9 -anim_enemyfeetobj: macro +anim_enemyfeetobj: MACRO db anim_enemyfeetobj_command endm enum anim_playerheadobj_command ; $da -anim_playerheadobj: macro +anim_playerheadobj: MACRO db anim_playerheadobj_command endm enum anim_checkpokeball_command ; $db -anim_checkpokeball: macro +anim_checkpokeball: MACRO db anim_checkpokeball_command endm enum anim_transform_command ; $dc -anim_transform: macro +anim_transform: MACRO db anim_transform_command endm enum anim_raisesub_command ; $dd -anim_raisesub: macro +anim_raisesub: MACRO db anim_raisesub_command endm enum anim_dropsub_command ; $de -anim_dropsub: macro +anim_dropsub: MACRO db anim_dropsub_command endm enum anim_resetobp0_command ; $df -anim_resetobp0: macro +anim_resetobp0: MACRO db anim_resetobp0_command endm enum anim_sound_command ; $e0 -anim_sound: macro +anim_sound: MACRO db anim_sound_command db (\1 << 2) | \2 ; duration, tracks db \3 ; id endm enum anim_cry_command ; $e1 -anim_cry: macro +anim_cry: MACRO db anim_cry_command db \1 ; pitch endm enum anim_minimizeopp_command ; $e2 -anim_minimizeopp: macro +anim_minimizeopp: MACRO db anim_minimizeopp_command endm enum anim_oamon_command ; $e3 -anim_oamon: macro +anim_oamon: MACRO db anim_oamon_command endm enum anim_oamoff_command ; $e4 -anim_oamoff: macro +anim_oamoff: MACRO db anim_oamoff_command endm enum anim_clearobjs_command ; $e5 -anim_clearobjs: macro +anim_clearobjs: MACRO db anim_clearobjs_command endm enum anim_beatup_command ; $e6 -anim_beatup: macro +anim_beatup: MACRO db anim_beatup_command endm enum anim_0xe7_command ; $e7 -anim_0xe7: macro +anim_0xe7: MACRO db anim_0xe7_command endm enum anim_updateactorpic_command ; $e8 -anim_updateactorpic: macro +anim_updateactorpic: MACRO db anim_updateactorpic_command endm enum anim_minimize_command ; $e9 -anim_minimize: macro +anim_minimize: MACRO db anim_minimize_command endm enum anim_0xea_command ; $ea -anim_0xea: macro +anim_0xea: MACRO db anim_0xea_command endm enum anim_0xeb_command ; $eb -anim_0xeb: macro +anim_0xeb: MACRO db anim_0xeb_command endm enum anim_0xec_command ; $ec -anim_0xec: macro +anim_0xec: MACRO db anim_0xec_command endm enum anim_0xed_command ; $ed -anim_0xed: macro +anim_0xed: MACRO db anim_0xed_command endm enum anim_if_param_and_command ; $ee -anim_if_param_and: macro +anim_if_param_and: MACRO db anim_if_param_and_command db \1 ; value dw \2 ; address endm enum anim_jumpuntil_command ; $ef -anim_jumpuntil: macro +anim_jumpuntil: MACRO db anim_jumpuntil_command dw \1 ; address endm enum anim_bgeffect_command ; $f0 -anim_bgeffect: macro +anim_bgeffect: MACRO db anim_bgeffect_command db \1 ; effect db \2 ; unknown @@ -207,88 +207,88 @@ anim_bgeffect: macro endm enum anim_bgp_command ; $f1 -anim_bgp: macro +anim_bgp: MACRO db anim_bgp_command db \1 ; colors endm enum anim_obp0_command ; $f2 -anim_obp0: macro +anim_obp0: MACRO db anim_obp0_command db \1 ; colors endm enum anim_obp1_command ; $f3 -anim_obp1: macro +anim_obp1: MACRO db anim_obp1_command db \1 ; colors endm enum anim_clearsprites_command ; $f4 -anim_clearsprites: macro +anim_clearsprites: MACRO db anim_clearsprites_command endm enum anim_0xf5_command ; $f5 -anim_0xf5: macro +anim_0xf5: MACRO db anim_0xf5_command endm enum anim_0xf6_command ; $f6 -anim_0xf6: macro +anim_0xf6: MACRO db anim_0xf6_command endm enum anim_0xf7_command ; $f7 -anim_0xf7: macro +anim_0xf7: MACRO db anim_0xf7_command endm enum anim_if_param_equal_command ; $f8 -anim_if_param_equal: macro +anim_if_param_equal: MACRO db anim_if_param_equal_command db \1 ; value dw \2 ; address endm enum anim_setvar_command ; $f9 -anim_setvar: macro +anim_setvar: MACRO db anim_setvar_command db \1 ; value endm enum anim_incvar_command ; $fa -anim_incvar: macro +anim_incvar: MACRO db anim_incvar_command endm enum anim_if_var_equal_command ; $fb -anim_if_var_equal: macro +anim_if_var_equal: MACRO db anim_if_var_equal_command db \1 ; value dw \2 ; address endm enum anim_jump_command ; $fc -anim_jump: macro +anim_jump: MACRO db anim_jump_command dw \1 ; address endm enum anim_loop_command ; $fd -anim_loop: macro +anim_loop: MACRO db anim_loop_command db \1 ; count dw \2 ; address endm enum anim_call_command ; $fe -anim_call: macro +anim_call: MACRO db anim_call_command dw \1 ; address endm enum anim_ret_command ; $ff -anim_ret: macro +anim_ret: MACRO db anim_ret_command endm diff --git a/macros/scripts/battle_commands.asm b/macros/scripts/battle_commands.asm index 5ac9009ff..dc264b291 100644 --- a/macros/scripts/battle_commands.asm +++ b/macros/scripts/battle_commands.asm @@ -1,6 +1,6 @@ -command: macro +command: MACRO enum \1_command -\1 equs "db \1_command" +\1 EQUS "db \1_command" endm ; BattleCommandPointers indexes (see data/battle_command_pointers.asm) diff --git a/macros/scripts/events.asm b/macros/scripts/events.asm index 1bf6b8622..399dd4bb1 100644 --- a/macros/scripts/events.asm +++ b/macros/scripts/events.asm @@ -2,101 +2,101 @@ enum_start enum scall_command ; $00 -scall: macro +scall: MACRO db scall_command dw \1 ; pointer endm enum farscall_command ; $01 -farscall: macro +farscall: MACRO db farscall_command dba \1 endm enum ptcall_command ; $02 -ptcall: macro +ptcall: MACRO db ptcall_command dw \1 ; pointer endm enum jump_command ; $03 -jump: macro +jump: MACRO db jump_command dw \1 ; pointer endm enum farjump_command ; $04 -farjump: macro +farjump: MACRO db farjump_command dba \1 endm enum ptjump_command ; $05 -ptjump: macro +ptjump: MACRO db ptjump_command dw \1 ; pointer endm enum if_equal_command ; $06 -if_equal: macro +if_equal: MACRO db if_equal_command db \1 ; byte dw \2 ; pointer endm enum if_not_equal_command ; $07 -if_not_equal: macro +if_not_equal: MACRO db if_not_equal_command db \1 ; byte dw \2 ; pointer endm enum iffalse_command ; $08 -iffalse: macro +iffalse: MACRO db iffalse_command dw \1 ; pointer endm enum iftrue_command ; $09 -iftrue: macro +iftrue: MACRO db iftrue_command dw \1 ; pointer endm enum if_greater_than_command ; $0a -if_greater_than: macro +if_greater_than: MACRO db if_greater_than_command db \1 ; byte dw \2 ; pointer endm enum if_less_than_command ; $0b -if_less_than: macro +if_less_than: MACRO db if_less_than_command db \1 ; byte dw \2 ; pointer endm enum jumpstd_command ; $0c -jumpstd: macro +jumpstd: MACRO db jumpstd_command dw \1 ; predefined_script endm enum callstd_command ; $0d -callstd: macro +callstd: MACRO db callstd_command dw \1 ; predefined_script endm enum callasm_command ; $0e -callasm: macro +callasm: MACRO db callasm_command dba \1 endm enum special_command ; $0f -special: macro +special: MACRO db special_command dw (\1Special - SpecialsPointers) / 3 endm @@ -107,98 +107,98 @@ add_special: MACRO ENDM enum ptcallasm_command ; $10 -ptcallasm: macro +ptcallasm: MACRO db ptcallasm_command dw \1 ; asm endm enum checkmapscene_command ; $11 -checkmapscene: macro +checkmapscene: MACRO db checkmapscene_command map \1 ; map endm enum setmapscene_command ; $12 -setmapscene: macro +setmapscene: MACRO db setmapscene_command map \1 ; map db \2 ; scene_id endm enum checkscene_command ; $13 -checkscene: macro +checkscene: MACRO db checkscene_command endm enum setscene_command ; $14 -setscene: macro +setscene: MACRO db setscene_command db \1 ; scene_id endm enum writebyte_command ; $15 -writebyte: macro +writebyte: MACRO db writebyte_command db \1 ; value endm enum addvar_command ; $16 -addvar: macro +addvar: MACRO db addvar_command db \1 ; value endm enum random_command ; $17 -random: macro +random: MACRO db random_command db \1 ; input endm enum checkver_command ; $18 -checkver: macro +checkver: MACRO db checkver_command endm enum copybytetovar_command ; $19 -copybytetovar: macro +copybytetovar: MACRO db copybytetovar_command dw \1 ; address endm enum copyvartobyte_command ; $1a -copyvartobyte: macro +copyvartobyte: MACRO db copyvartobyte_command dw \1 ; address endm enum loadvar_command ; $1b -loadvar: macro +loadvar: MACRO db loadvar_command dw \1 ; address db \2 ; value endm enum checkcode_command ; $1c -checkcode: macro +checkcode: MACRO db checkcode_command db \1 ; variable_id endm enum writevarcode_command ; $1d -writevarcode: macro +writevarcode: MACRO db writevarcode_command db \1 ; variable_id endm enum writecode_command ; $1e -writecode: macro +writecode: MACRO db writecode_command db \1 ; variable_id db \2 ; value endm enum giveitem_command ; $1f -giveitem: macro +giveitem: MACRO db giveitem_command db \1 ; item if _NARG == 2 @@ -209,7 +209,7 @@ endc endm enum takeitem_command ; $20 -takeitem: macro +takeitem: MACRO db takeitem_command db \1 ; item if _NARG == 2 @@ -220,70 +220,70 @@ endc endm enum checkitem_command ; $21 -checkitem: macro +checkitem: MACRO db checkitem_command db \1 ; item endm enum givemoney_command ; $22 -givemoney: macro +givemoney: MACRO db givemoney_command db \1 ; account dt \2 ; money endm enum takemoney_command ; $23 -takemoney: macro +takemoney: MACRO db takemoney_command db \1 ; account dt \2 ; money endm enum checkmoney_command ; $24 -checkmoney: macro +checkmoney: MACRO db checkmoney_command db \1 ; account dt \2 ; money endm enum givecoins_command ; $25 -givecoins: macro +givecoins: MACRO db givecoins_command dw \1 ; coins endm enum takecoins_command ; $26 -takecoins: macro +takecoins: MACRO db takecoins_command dw \1 ; coins endm enum checkcoins_command ; $27 -checkcoins: macro +checkcoins: MACRO db checkcoins_command dw \1 ; coins endm enum addcellnum_command ; $28 -addcellnum: macro +addcellnum: MACRO db addcellnum_command db \1 ; person endm enum delcellnum_command ; $29 -delcellnum: macro +delcellnum: MACRO db delcellnum_command db \1 ; person endm enum checkcellnum_command ; $2a -checkcellnum: macro +checkcellnum: MACRO db checkcellnum_command db \1 ; person endm enum checktime_command ; $2b -checktime: macro +checktime: MACRO db checktime_command db \1 ; time endm @@ -293,13 +293,13 @@ checkday EQUS "checktime DAY" checknite EQUS "checktime NITE" enum checkpoke_command ; $2c -checkpoke: macro +checkpoke: MACRO db checkpoke_command db \1 ; pkmn endm enum givepoke_command ; $2d -givepoke: macro +givepoke: MACRO db givepoke_command db \1 ; pokemon db \2 ; level @@ -320,91 +320,91 @@ givepoke: macro endm enum giveegg_command ; $2e -giveegg: macro +giveegg: MACRO db giveegg_command db \1 ; pkmn db \2 ; level endm enum givepokeitem_command ; $2f -givepokeitem: macro +givepokeitem: MACRO db givepokeitem_command dw \1 ; pointer endm enum checkpokeitem_command ; $30 -checkpokeitem: macro +checkpokeitem: MACRO db checkpokeitem_command dw \1 ; pointer endm enum checkevent_command ; $31 -checkevent: macro +checkevent: MACRO db checkevent_command dw \1 ; event_flag endm enum clearevent_command ; $32 -clearevent: macro +clearevent: MACRO db clearevent_command dw \1 ; event_flag endm enum setevent_command ; $33 -setevent: macro +setevent: MACRO db setevent_command dw \1 ; event_flag endm enum checkflag_command ; $34 -checkflag: macro +checkflag: MACRO db checkflag_command dw \1 ; engine_flag endm enum clearflag_command ; $35 -clearflag: macro +clearflag: MACRO db clearflag_command dw \1 ; engine_flag endm enum setflag_command ; $36 -setflag: macro +setflag: MACRO db setflag_command dw \1 ; engine_flag endm enum wildon_command ; $37 -wildon: macro +wildon: MACRO db wildon_command endm enum wildoff_command ; $38 -wildoff: macro +wildoff: MACRO db wildoff_command endm enum xycompare_command ; $39 -xycompare: macro +xycompare: MACRO db xycompare_command dw \1 ; pointer endm enum warpmod_command ; $3a -warpmod: macro +warpmod: MACRO db warpmod_command db \1 ; warp_id map \2 ; map endm enum blackoutmod_command ; $3b -blackoutmod: macro +blackoutmod: MACRO db blackoutmod_command map \1 ; map endm enum warp_command ; $3c -warp: macro +warp: MACRO db warp_command map \1 ; map db \2 ; x @@ -412,46 +412,46 @@ warp: macro endm enum readmoney_command ; $3d -readmoney: macro +readmoney: MACRO db readmoney_command db \1 ; account db \2 ; memory endm enum readcoins_command ; $3e -readcoins: macro +readcoins: MACRO db readcoins_command db \1 ; memory endm enum RAM2MEM_command ; $3f -RAM2MEM: macro +RAM2MEM: MACRO db RAM2MEM_command db \1 ; memory endm enum pokenamemem_command ; $40 -pokenamemem: macro +pokenamemem: MACRO db pokenamemem_command db \1 ; pokemon db \2 ; memory endm enum itemtotext_command ; $41 -itemtotext: macro +itemtotext: MACRO db itemtotext_command db \1 ; item db \2 ; memory endm enum mapnametotext_command ; $42 -mapnametotext: macro +mapnametotext: MACRO db mapnametotext_command db \1 ; memory endm enum trainertotext_command ; $43 -trainertotext: macro +trainertotext: MACRO db trainertotext_command db \1 ; trainer_id db \2 ; trainer_group @@ -459,273 +459,273 @@ trainertotext: macro endm enum stringtotext_command ; $44 -stringtotext: macro +stringtotext: MACRO db stringtotext_command dw \1 ; text_pointer db \2 ; memory endm enum itemnotify_command ; $45 -itemnotify: macro +itemnotify: MACRO db itemnotify_command endm enum pocketisfull_command ; $46 -pocketisfull: macro +pocketisfull: MACRO db pocketisfull_command endm enum opentext_command ; $47 -opentext: macro +opentext: MACRO db opentext_command endm enum refreshscreen_command ; $48 -refreshscreen: macro +refreshscreen: MACRO db refreshscreen_command db \1 ; dummy endm enum closetext_command ; $49 -closetext: macro +closetext: MACRO db closetext_command endm enum loadbytec2cf_command ; $4a -loadbytec2cf: macro +loadbytec2cf: MACRO db loadbytec2cf_command db \1 ; byte endm enum farwritetext_command ; $4b -farwritetext: macro +farwritetext: MACRO db farwritetext_command dba \1 endm enum writetext_command ; $4c -writetext: macro +writetext: MACRO db writetext_command dw \1 ; text_pointer endm enum repeattext_command ; $4d -repeattext: macro +repeattext: MACRO db repeattext_command db \1 ; byte db \2 ; byte endm enum yesorno_command ; $4e -yesorno: macro +yesorno: MACRO db yesorno_command endm enum loadmenudata_command ; $4f -loadmenudata: macro +loadmenudata: MACRO db loadmenudata_command dw \1 ; data endm enum closewindow_command ; $50 -closewindow: macro +closewindow: MACRO db closewindow_command endm enum jumptextfaceplayer_command ; $51 -jumptextfaceplayer: macro +jumptextfaceplayer: MACRO db jumptextfaceplayer_command dw \1 ; text_pointer endm ; IF _CRYSTAL enum farjumptext_command ; $52 -farjumptext: macro +farjumptext: MACRO db farjumptext_command dba \1 endm ; ENDC enum jumptext_command ; $53 -jumptext: macro +jumptext: MACRO db jumptext_command dw \1 ; text_pointer endm enum waitbutton_command ; $54 -waitbutton: macro +waitbutton: MACRO db waitbutton_command endm enum buttonsound_command ; $55 -buttonsound: macro +buttonsound: MACRO db buttonsound_command endm enum pokepic_command ; $56 -pokepic: macro +pokepic: MACRO db pokepic_command db \1 ; pokemon endm enum closepokepic_command ; $57 -closepokepic: macro +closepokepic: MACRO db closepokepic_command endm enum _2dmenu_command ; $58 -_2dmenu: macro +_2dmenu: MACRO db _2dmenu_command endm enum verticalmenu_command ; $59 -verticalmenu: macro +verticalmenu: MACRO db verticalmenu_command endm enum loadpikachudata_command ; $5a -loadpikachudata: macro +loadpikachudata: MACRO db loadpikachudata_command endm enum randomwildmon_command ; $5b -randomwildmon: macro +randomwildmon: MACRO db randomwildmon_command endm enum loadmemtrainer_command ; $5c -loadmemtrainer: macro +loadmemtrainer: MACRO db loadmemtrainer_command endm enum loadwildmon_command ; $5d -loadwildmon: macro +loadwildmon: MACRO db loadwildmon_command db \1 ; pokemon db \2 ; level endm enum loadtrainer_command ; $5e -loadtrainer: macro +loadtrainer: MACRO db loadtrainer_command db \1 ; trainer_group db \2 ; trainer_id endm enum startbattle_command ; $5f -startbattle: macro +startbattle: MACRO db startbattle_command endm enum reloadmapafterbattle_command ; $60 -reloadmapafterbattle: macro +reloadmapafterbattle: MACRO db reloadmapafterbattle_command endm enum catchtutorial_command ; $61 -catchtutorial: macro +catchtutorial: MACRO db catchtutorial_command db \1 ; byte endm enum trainertext_command ; $62 -trainertext: macro +trainertext: MACRO db trainertext_command db \1 ; which_text endm enum trainerflagaction_command ; $63 -trainerflagaction: macro +trainerflagaction: MACRO db trainerflagaction_command db \1 ; action endm enum winlosstext_command ; $64 -winlosstext: macro +winlosstext: MACRO db winlosstext_command dw \1 ; win_text_pointer dw \2 ; loss_text_pointer endm enum scripttalkafter_command ; $65 -scripttalkafter: macro +scripttalkafter: MACRO db scripttalkafter_command endm enum end_if_just_battled_command ; $66 -end_if_just_battled: macro +end_if_just_battled: MACRO db end_if_just_battled_command endm enum check_just_battled_command ; $67 -check_just_battled: macro +check_just_battled: MACRO db check_just_battled_command endm enum setlasttalked_command ; $68 -setlasttalked: macro +setlasttalked: MACRO db setlasttalked_command db \1 ; object id endm enum applymovement_command ; $69 -applymovement: macro +applymovement: MACRO db applymovement_command db \1 ; object id dw \2 ; data endm enum applymovement2_command ; $6a -applymovement2: macro +applymovement2: MACRO db applymovement2_command dw \1 ; data endm enum faceplayer_command ; $6b -faceplayer: macro +faceplayer: MACRO db faceplayer_command endm enum faceobject_command ; $6c -faceobject: macro +faceobject: MACRO db faceobject_command db \1 ; object1 db \2 ; object2 endm enum variablesprite_command ; $6d -variablesprite: macro +variablesprite: MACRO db variablesprite_command db \1 - SPRITE_VARS ; byte db \2 ; sprite endm enum disappear_command ; $6e -disappear: macro +disappear: MACRO db disappear_command db \1 ; object id endm enum appear_command ; $6f -appear: macro +appear: MACRO db appear_command db \1 ; object id endm enum follow_command ; $70 -follow: macro +follow: MACRO db follow_command db \1 ; object2 db \2 ; object1 endm enum stopfollow_command ; $71 -stopfollow: macro +stopfollow: MACRO db stopfollow_command endm enum moveobject_command ; $72 -moveobject: macro +moveobject: MACRO db moveobject_command db \1 ; object id db \2 ; x @@ -733,19 +733,19 @@ moveobject: macro endm enum writeobjectxy_command ; $73 -writeobjectxy: macro +writeobjectxy: MACRO db writeobjectxy_command db \1 ; object id endm enum loademote_command ; $74 -loademote: macro +loademote: MACRO db loademote_command db \1 ; bubble endm enum showemote_command ; $75 -showemote: macro +showemote: MACRO db showemote_command db \1 ; bubble db \2 ; object id @@ -753,34 +753,34 @@ showemote: macro endm enum spriteface_command ; $76 -spriteface: macro +spriteface: MACRO db spriteface_command db \1 ; object id db \2 ; facing endm enum follownotexact_command ; $77 -follownotexact: macro +follownotexact: MACRO db follownotexact_command db \1 ; object2 db \2 ; object1 endm enum earthquake_command ; $78 -earthquake: macro +earthquake: MACRO db earthquake_command db \1 ; param endm enum changemap_command ; $79 -changemap: macro +changemap: MACRO db changemap_command db \1 ; map_bank dw \2 ; map_data_pointer endm enum changeblock_command ; $7a -changeblock: macro +changeblock: MACRO db changeblock_command db \1 ; x db \2 ; y @@ -788,205 +788,205 @@ changeblock: macro endm enum reloadmap_command ; $7b -reloadmap: macro +reloadmap: MACRO db reloadmap_command endm enum reloadmappart_command ; $7c -reloadmappart: macro +reloadmappart: MACRO db reloadmappart_command endm enum writecmdqueue_command ; $7d -writecmdqueue: macro +writecmdqueue: MACRO db writecmdqueue_command dw \1 ; queue_pointer endm enum delcmdqueue_command ; $7e -delcmdqueue: macro +delcmdqueue: MACRO db delcmdqueue_command db \1 ; byte endm enum playmusic_command ; $7f -playmusic: macro +playmusic: MACRO db playmusic_command dw \1 ; music_pointer endm enum encountermusic_command ; $80 -encountermusic: macro +encountermusic: MACRO db encountermusic_command endm enum musicfadeout_command ; $81 -musicfadeout: macro +musicfadeout: MACRO db musicfadeout_command dw \1 ; music db \2 ; fadetime endm enum playmapmusic_command ; $82 -playmapmusic: macro +playmapmusic: MACRO db playmapmusic_command endm enum dontrestartmapmusic_command ; $83 -dontrestartmapmusic: macro +dontrestartmapmusic: MACRO db dontrestartmapmusic_command endm enum cry_command ; $84 -cry: macro +cry: MACRO db cry_command dw \1 ; cry_id endm enum playsound_command ; $85 -playsound: macro +playsound: MACRO db playsound_command dw \1 ; sound_pointer endm enum waitsfx_command ; $86 -waitsfx: macro +waitsfx: MACRO db waitsfx_command endm enum warpsound_command ; $87 -warpsound: macro +warpsound: MACRO db warpsound_command endm enum specialsound_command ; $88 -specialsound: macro +specialsound: MACRO db specialsound_command endm enum passtoengine_command ; $89 -passtoengine: macro +passtoengine: MACRO db passtoengine_command db \1 ; data_pointer endm enum newloadmap_command ; $8a -newloadmap: macro +newloadmap: MACRO db newloadmap_command db \1 ; which_method endm enum pause_command ; $8b -pause: macro +pause: MACRO db pause_command db \1 ; length endm enum deactivatefacing_command ; $8c -deactivatefacing: macro +deactivatefacing: MACRO db deactivatefacing_command db \1 ; time endm enum priorityjump_command ; $8d -priorityjump: macro +priorityjump: MACRO db priorityjump_command dw \1 ; pointer endm enum warpcheck_command ; $8e -warpcheck: macro +warpcheck: MACRO db warpcheck_command endm enum ptpriorityjump_command ; $8f -ptpriorityjump: macro +ptpriorityjump: MACRO db ptpriorityjump_command dw \1 ; pointer endm enum return_command ; $90 -return: macro +return: MACRO db return_command endm enum end_command ; $91 -end: macro +end: MACRO db end_command endm enum reloadandreturn_command ; $92 -reloadandreturn: macro +reloadandreturn: MACRO db reloadandreturn_command db \1 ; which_method endm enum end_all_command ; $93 -end_all: macro +end_all: MACRO db end_all_command endm enum pokemart_command ; $94 -pokemart: macro +pokemart: MACRO db pokemart_command db \1 ; dialog_id dw \2 ; mart_id endm enum elevator_command ; $95 -elevator: macro +elevator: MACRO db elevator_command dw \1 ; floor_list_pointer endm enum trade_command ; $96 -trade: macro +trade: MACRO db trade_command db \1 ; trade_id endm enum askforphonenumber_command ; $97 -askforphonenumber: macro +askforphonenumber: MACRO db askforphonenumber_command db \1 ; number endm enum phonecall_command ; $98 -phonecall: macro +phonecall: MACRO db phonecall_command dw \1 ; caller_name endm enum hangup_command ; $99 -hangup: macro +hangup: MACRO db hangup_command endm enum describedecoration_command ; $9a -describedecoration: macro +describedecoration: MACRO db describedecoration_command db \1 ; byte endm enum fruittree_command ; $9b -fruittree: macro +fruittree: MACRO db fruittree_command db \1 ; tree_id endm enum specialphonecall_command ; $9c -specialphonecall: macro +specialphonecall: MACRO db specialphonecall_command dw \1 ; call_id endm enum checkphonecall_command ; $9d -checkphonecall: macro +checkphonecall: MACRO db checkphonecall_command endm enum verbosegiveitem_command ; $9e -verbosegiveitem: macro +verbosegiveitem: MACRO db verbosegiveitem_command db \1 ; item if _NARG == 2 @@ -997,31 +997,31 @@ endc endm enum verbosegiveitem2_command ; $9f -verbosegiveitem2: macro +verbosegiveitem2: MACRO db verbosegiveitem2_command db \1 ; item db \2 ; var endm enum swarm_command ; $a0 -swarm: macro +swarm: MACRO db swarm_command db \1 ; flag map \2 ; map endm enum halloffame_command ; $a1 -halloffame: macro +halloffame: MACRO db halloffame_command endm enum credits_command ; $a2 -credits: macro +credits: MACRO db credits_command endm enum warpfacing_command ; $a3 -warpfacing: macro +warpfacing: MACRO db warpfacing_command db \1 ; facing map \2 ; map @@ -1030,27 +1030,27 @@ warpfacing: macro endm enum battletowertext_command ; $a4 -battletowertext: macro +battletowertext: MACRO db battletowertext_command db \1 ; memory endm enum landmarktotext_command ; $a5 -landmarktotext: macro +landmarktotext: MACRO db landmarktotext_command db \1 ; id db \2 ; memory endm enum trainerclassname_command ; $a6 -trainerclassname: macro +trainerclassname: MACRO db trainerclassname_command db \1 ; id db \2 ; memory endm enum name_command ; $a7 -name: macro +name: MACRO db name_command db \1 ; type db \2 ; id @@ -1058,12 +1058,12 @@ name: macro endm enum wait_command ; $a8 -wait: macro +wait: MACRO db wait_command db \1 ; duration endm enum check_save_command ; $a9 -check_save: macro +check_save: MACRO db check_save_command endm diff --git a/macros/scripts/gfx_anims.asm b/macros/scripts/gfx_anims.asm index a3fa710a0..dddc43082 100644 --- a/macros/scripts/gfx_anims.asm +++ b/macros/scripts/gfx_anims.asm @@ -1,6 +1,6 @@ ; pic + oam animations -frame: macro +frame: MACRO db \1 x = \2 if _NARG > 2 @@ -15,30 +15,30 @@ endc enum_start $fc enum delanim_command ; $fc -delanim: macro ; used for oam +delanim: MACRO ; used for oam db delanim_command endm enum dorepeat_command ; $fd -dorepeat: macro +dorepeat: MACRO db dorepeat_command db \1 ; # endm enum setrepeat_command ; $fe -setrepeat: macro +setrepeat: MACRO db setrepeat_command db \1 ; # endm enum endanim_command ; $ff -endanim: macro +endanim: MACRO db endanim_command endm __enum__ = $fe enum dorestart_command ; $fe -dorestart: macro ; used for oam +dorestart: MACRO ; used for oam db dorestart_command endm diff --git a/macros/scripts/maps.asm b/macros/scripts/maps.asm index 8ef08ec49..4d3744a38 100644 --- a/macros/scripts/maps.asm +++ b/macros/scripts/maps.asm @@ -1,15 +1,15 @@ -map: macro +map: MACRO ;\1: map id db GROUP_\1, MAP_\1 endm -scene_script: macro +scene_script: MACRO ;\1: script pointer dw \1, 0 endm -warp_def: macro +warp_def: MACRO ;\1: y: top to bottom, starts at 0 ;\2: x: left to right, starts at 0 ;\3: warp destination: starts at 1 @@ -18,7 +18,7 @@ warp_def: macro map \4 endm -coord_event: macro +coord_event: MACRO ;\1: scene id: controlled by setscene/setmapscene ;\2: y: top to bottom, starts at 0 ;\3: x: left to right, starts at 0 @@ -28,7 +28,7 @@ coord_event: macro db $0, $0 endm -bg_event: macro +bg_event: MACRO ;\1: y: top to bottom, starts at 0 ;\2: x: left to right, starts at 0 ;\3: function: a BGEVENT_* constant @@ -37,7 +37,7 @@ bg_event: macro dw \4 endm -object_event: macro +object_event: MACRO ;\1: sprite: a SPRITE_* constant ;\2: y: top to bottom, starts at 0 ;\3: x: left to right, starts at 0 @@ -68,7 +68,7 @@ object_event: macro endm -trainer: macro +trainer: MACRO ;\1: flag: an EVENT_BEAT_* constant ;\2: trainer group ;\3: trainer id @@ -81,7 +81,7 @@ trainer: macro dw \4, \5, \6, \7 endm -itemball: macro +itemball: MACRO ;\1: item: from constants/item_constants.asm ;\2: quantity: default 1 if _NARG == 2 @@ -91,7 +91,7 @@ else endc endm -elevfloor: macro +elevfloor: MACRO ;\1: floor: a FLOOR_* constant ;\2: warp destination: starts at 1 ;\3: map id @@ -99,7 +99,7 @@ elevfloor: macro map \3 ENDM -stonetable: macro +stonetable: MACRO ;\1: warp id ;\2: object_event id ;\3: script pointer diff --git a/macros/scripts/movement.asm b/macros/scripts/movement.asm index 2b0cedc69..b78477739 100644 --- a/macros/scripts/movement.asm +++ b/macros/scripts/movement.asm @@ -4,98 +4,98 @@ ; Directional movements enum movement_turn_head ; $00 -turn_head: macro +turn_head: MACRO db movement_turn_head | \1 endm __enum__ = __enum__ + 3 enum movement_turn_step ; $04 -turn_step: macro +turn_step: MACRO db movement_turn_step | \1 endm __enum__ = __enum__ + 3 enum movement_slow_step ; $08 -slow_step: macro +slow_step: MACRO db movement_slow_step | \1 endm __enum__ = __enum__ + 3 enum movement_step ; $0c -step: macro +step: MACRO db movement_step | \1 endm __enum__ = __enum__ + 3 enum movement_big_step ; $10 -big_step: macro +big_step: MACRO db movement_big_step | \1 endm __enum__ = __enum__ + 3 enum movement_slow_slide_step ; $14 -slow_slide_step: macro +slow_slide_step: MACRO db movement_slow_slide_step | \1 endm __enum__ = __enum__ + 3 enum movement_slide_step ; $18 -slide_step: macro +slide_step: MACRO db movement_slide_step | \1 endm __enum__ = __enum__ + 3 enum movement_fast_slide_step ; $1c -fast_slide_step: macro +fast_slide_step: MACRO db movement_fast_slide_step | \1 endm __enum__ = __enum__ + 3 enum movement_turn_away ; $20 -turn_away: macro +turn_away: MACRO db movement_turn_away | \1 endm __enum__ = __enum__ + 3 enum movement_turn_in ; $24 -turn_in: macro +turn_in: MACRO db movement_turn_in | \1 endm __enum__ = __enum__ + 3 enum movement_turn_waterfall ; $28 -turn_waterfall: macro +turn_waterfall: MACRO db movement_turn_waterfall | \1 endm __enum__ = __enum__ + 3 enum movement_slow_jump_step ; $2c -slow_jump_step: macro +slow_jump_step: MACRO db movement_slow_jump_step | \1 endm __enum__ = __enum__ + 3 enum movement_jump_step ; $30 -jump_step: macro +jump_step: MACRO db movement_jump_step | \1 endm __enum__ = __enum__ + 3 enum movement_fast_jump_step ; $34 -fast_jump_step: macro +fast_jump_step: MACRO db movement_fast_jump_step | \1 endm @@ -103,39 +103,39 @@ __enum__ = __enum__ + 3 ; Control enum movement_remove_sliding ; $38 -remove_sliding: macro +remove_sliding: MACRO db movement_remove_sliding endm enum movement_set_sliding ; $39 -set_sliding: macro +set_sliding: MACRO db movement_set_sliding endm enum movement_remove_fixed_facing ; $3a -remove_fixed_facing: macro +remove_fixed_facing: MACRO db movement_remove_fixed_facing endm enum movement_fix_facing ; $3b -fix_facing: macro +fix_facing: MACRO db movement_fix_facing endm enum movement_show_object ; $3c -show_object: macro +show_object: MACRO db movement_show_object endm enum movement_hide_object ; $3d -hide_object: macro +hide_object: MACRO db movement_hide_object endm ; Sleep enum movement_step_sleep ; $3e -step_sleep: macro +step_sleep: MACRO if \1 <= 8 db movement_step_sleep + \1 - 1 else @@ -146,101 +146,101 @@ endm __enum__ = __enum__ + 8 enum movement_step_end ; $47 -step_end: macro +step_end: MACRO db movement_step_end endm enum movement_step_48 ; $48 -step_48: macro +step_48: MACRO db movement_step_48 db \1 ; ??? endm enum movement_remove_object ; $49 -remove_object: macro +remove_object: MACRO db movement_remove_object endm enum movement_step_loop ; $4a -step_loop: macro +step_loop: MACRO db movement_step_loop endm enum movement_step_4b ; $4b -step_4b: macro +step_4b: MACRO db movement_step_4b endm enum movement_teleport_from ; $4c -teleport_from: macro +teleport_from: MACRO db movement_teleport_from endm enum movement_teleport_to ; $4d -teleport_to: macro +teleport_to: MACRO db movement_teleport_to endm enum movement_skyfall ; $4e -skyfall: macro +skyfall: MACRO db movement_skyfall endm enum movement_step_dig ; $4f -step_dig: macro +step_dig: MACRO db movement_step_dig db \1 ; length endm enum movement_step_bump ; $50 -step_bump: macro +step_bump: MACRO db movement_step_bump endm enum movement_fish_got_bite ; $51 -fish_got_bite: macro +fish_got_bite: MACRO db movement_fish_got_bite endm enum movement_fish_cast_rod ; $52 -fish_cast_rod: macro +fish_cast_rod: MACRO db movement_fish_cast_rod endm enum movement_hide_emote ; $53 -hide_emote: macro +hide_emote: MACRO db movement_hide_emote endm enum movement_show_emote ; $54 -show_emote: macro +show_emote: MACRO db movement_show_emote endm enum movement_step_shake ; $55 -step_shake: macro +step_shake: MACRO db movement_step_shake db \1 ; displacement endm enum movement_tree_shake ; $56 -tree_shake: macro +tree_shake: MACRO db movement_tree_shake endm enum movement_rock_smash ; $57 -rock_smash: macro +rock_smash: MACRO db movement_rock_smash db \1 ; length endm enum movement_return_dig ; $58 -return_dig: macro +return_dig: MACRO db movement_return_dig db \1 ; length endm enum movement_skyfall_top ; $59 -skyfall_top: macro +skyfall_top: MACRO db movement_skyfall_top endm diff --git a/macros/scripts/text.asm b/macros/scripts/text.asm index 839f78eb7..d84b5fcbc 100644 --- a/macros/scripts/text.asm +++ b/macros/scripts/text.asm @@ -17,111 +17,111 @@ text_from_ram: MACRO ENDM enum TX_BCD ; $02 -text_bcd: macro +text_bcd: MACRO db TX_BCD dw \1 db \2 ENDM enum TX_MOVE ; $03 -text_move: macro +text_move: MACRO db TX_MOVE dw \1 ENDM enum TX_BOX ; $04 -text_box: macro +text_box: MACRO db TX_BOX dw \1 db \2, \3 ENDM enum TX_LOW ; $05 -text_low: macro +text_low: MACRO db TX_LOW endm enum WAIT_BUTTON ; $06 -text_waitbutton: macro +text_waitbutton: MACRO db WAIT_BUTTON endm enum TX_SCROLL ; $07 -text_scroll: macro +text_scroll: MACRO db TX_SCROLL endm enum START_ASM ; $08 -start_asm: macro +start_asm: MACRO db START_ASM endm enum TX_NUM ; $09 -deciram: macro +deciram: MACRO db TX_NUM dw \1 ; address dn \2, \3 ; bytes, digits endm enum TX_EXIT ; $0a -interpret_data: macro +interpret_data: MACRO db TX_EXIT endm enum TX_SOUND_0B ; $0b -sound_dex_fanfare_50_79: macro +sound_dex_fanfare_50_79: MACRO db TX_SOUND_0B endm enum TX_DOTS ; $0c -limited_interpret_data: macro +limited_interpret_data: MACRO db TX_DOTS db \1 endm enum TX_LINK_WAIT_BUTTON ; $0d -link_wait_button: macro +link_wait_button: MACRO db TX_LINK_WAIT_BUTTON endm enum TX_SOUND_0E ; $0e -sound_dex_fanfare_20_49: macro +sound_dex_fanfare_20_49: MACRO db TX_SOUND_0E endm enum TX_SOUND_0F ; $0f -sound_item: macro +sound_item: MACRO db TX_SOUND_0F endm enum TX_SOUND_10 ; $10 -sound_caught_mon: macro +sound_caught_mon: MACRO db TX_SOUND_10 endm enum TX_SOUND_11 ; $11 -sound_dex_fanfare_80_109: macro +sound_dex_fanfare_80_109: MACRO db TX_SOUND_11 endm enum TX_SOUND_12 ; $12 -sound_fanfare: macro +sound_fanfare: MACRO db TX_SOUND_12 endm enum TX_SOUND_13 ; $13 -sound_slot_machine_start: macro +sound_slot_machine_start: MACRO db TX_SOUND_13 endm enum TX_STRINGBUFFER ; $14 -text_buffer: macro +text_buffer: MACRO db TX_STRINGBUFFER db \1 endm enum TX_DAY ; $15 -current_day: macro +current_day: MACRO db TX_DAY endm diff --git a/macros/scripts/trade_anims.asm b/macros/scripts/trade_anims.asm index 4b0291eea..a292d6df5 100644 --- a/macros/scripts/trade_anims.asm +++ b/macros/scripts/trade_anims.asm @@ -2,167 +2,167 @@ enum_start enum tradeanim_next_command ; $00 -tradeanim_next: macro +tradeanim_next: MACRO db tradeanim_next_command endm enum tradeanim_show_givemon_data_command ; $01 -tradeanim_show_givemon_data: macro +tradeanim_show_givemon_data: MACRO db tradeanim_show_givemon_data_command endm enum tradeanim_show_getmon_data_command ; $02 -tradeanim_show_getmon_data: macro +tradeanim_show_getmon_data: MACRO db tradeanim_show_getmon_data_command endm enum tradeanim_enter_link_tube_command ; $03 -tradeanim_enter_link_tube: macro +tradeanim_enter_link_tube: MACRO db tradeanim_enter_link_tube_command endm __enum__ set $5 enum tradeanim_exit_link_tube_command ; $05 -tradeanim_exit_link_tube: macro +tradeanim_exit_link_tube: MACRO db tradeanim_exit_link_tube_command endm enum tradeanim_tube_to_ot_command ; $06 -tradeanim_tube_to_ot: macro +tradeanim_tube_to_ot: MACRO db tradeanim_tube_to_ot_command endm __enum__ set $0e enum tradeanim_tube_to_player_command ; $0e -tradeanim_tube_to_player: macro +tradeanim_tube_to_player: MACRO db tradeanim_tube_to_player_command endm __enum__ set $16 enum tradeanim_sent_to_ot_text_command ; $16 -tradeanim_sent_to_ot_text: macro +tradeanim_sent_to_ot_text: MACRO db tradeanim_sent_to_ot_text_command endm enum tradeanim_ot_bids_farewell_command ; $17 -tradeanim_ot_bids_farewell: macro +tradeanim_ot_bids_farewell: MACRO db tradeanim_ot_bids_farewell_command endm enum tradeanim_take_care_of_text_command ; $18 -tradeanim_take_care_of_text: macro +tradeanim_take_care_of_text: MACRO db tradeanim_take_care_of_text_command endm enum tradeanim_ot_sends_text_1_command ; $19 -tradeanim_ot_sends_text_1: macro +tradeanim_ot_sends_text_1: MACRO db tradeanim_ot_sends_text_1_command endm enum tradeanim_ot_sends_text_2_command ; $1a -tradeanim_ot_sends_text_2: macro +tradeanim_ot_sends_text_2: MACRO db tradeanim_ot_sends_text_2_command endm enum tradeanim_setup_givemon_scroll_command ; $1b -tradeanim_setup_givemon_scroll: macro +tradeanim_setup_givemon_scroll: MACRO db tradeanim_setup_givemon_scroll_command endm enum tradeanim_do_givemon_scroll_command ; $1c -tradeanim_do_givemon_scroll: macro +tradeanim_do_givemon_scroll: MACRO db tradeanim_do_givemon_scroll_command endm enum tradeanim_frontpic_scroll_command ; $1d -tradeanim_frontpic_scroll: macro +tradeanim_frontpic_scroll: MACRO db tradeanim_frontpic_scroll_command endm enum tradeanim_textbox_scroll_command ; $1e -tradeanim_textbox_scroll: macro +tradeanim_textbox_scroll: MACRO db tradeanim_textbox_scroll_command endm enum tradeanim_scroll_out_right_command ; $1f -tradeanim_scroll_out_right: macro +tradeanim_scroll_out_right: MACRO db tradeanim_scroll_out_right_command endm __enum__ set $21 enum tradeanim_wait_80_command ; $21 -tradeanim_wait_80: macro +tradeanim_wait_80: MACRO db tradeanim_wait_80_command endm enum tradeanim_wait_40_command ; $22 -tradeanim_wait_40: macro +tradeanim_wait_40: MACRO db tradeanim_wait_40_command endm enum tradeanim_rocking_ball_command ; $23 -tradeanim_rocking_ball: macro +tradeanim_rocking_ball: MACRO db tradeanim_rocking_ball_command endm enum tradeanim_drop_ball_command ; $24 -tradeanim_drop_ball: macro +tradeanim_drop_ball: MACRO db tradeanim_drop_ball_command endm enum tradeanim_wait_anim_command ; $25 -tradeanim_wait_anim: macro +tradeanim_wait_anim: MACRO db tradeanim_wait_anim_command endm __enum__ set $27 enum tradeanim_poof_command ; $27 -tradeanim_poof: macro +tradeanim_poof: MACRO db tradeanim_poof_command endm enum tradeanim_bulge_through_tube_command ; $28 -tradeanim_bulge_through_tube: macro +tradeanim_bulge_through_tube: MACRO db tradeanim_bulge_through_tube_command endm enum tradeanim_give_trademon_sfx_command ; $29 -tradeanim_give_trademon_sfx: macro +tradeanim_give_trademon_sfx: MACRO db tradeanim_give_trademon_sfx_command endm enum tradeanim_get_trademon_sfx_command ; $2a -tradeanim_get_trademon_sfx: macro +tradeanim_get_trademon_sfx: MACRO db tradeanim_get_trademon_sfx_command endm enum tradeanim_end_command ; $2b -tradeanim_end: macro +tradeanim_end: MACRO db tradeanim_end_command endm enum tradeanim_animate_frontpic_command ; $2c -tradeanim_animate_frontpic: macro +tradeanim_animate_frontpic: MACRO db tradeanim_animate_frontpic_command endm enum tradeanim_wait_96_command ; $2d -tradeanim_wait_96: macro +tradeanim_wait_96: MACRO db tradeanim_wait_96_command endm enum tradeanim_wait_80_if_ot_egg_command ; $2e -tradeanim_wait_80_if_ot_egg: macro +tradeanim_wait_80_if_ot_egg: MACRO db tradeanim_wait_80_if_ot_egg_command endm enum tradeanim_wait_180_if_ot_egg_command ; $2f -tradeanim_wait_180_if_ot_egg: macro +tradeanim_wait_180_if_ot_egg: MACRO db tradeanim_wait_180_if_ot_egg_command endm @@ -171,85 +171,85 @@ endm enum_start $01 enum mobiletradeanim_showgivemon_command ; $01 -mobiletradeanim_showgivemon: macro +mobiletradeanim_showgivemon: MACRO db mobiletradeanim_showgivemon_command endm enum mobiletradeanim_02_command ; $02 -mobiletradeanim_02: macro +mobiletradeanim_02: MACRO db mobiletradeanim_02_command endm enum mobiletradeanim_sendmon_command ; $03 -mobiletradeanim_sendmon: macro +mobiletradeanim_sendmon: MACRO db mobiletradeanim_sendmon_command endm __enum__ set $05 enum mobiletradeanim_05_command ; $05 -mobiletradeanim_05: macro +mobiletradeanim_05: MACRO db mobiletradeanim_05_command endm enum mobiletradeanim_06_command ; $06 -mobiletradeanim_06: macro +mobiletradeanim_06: MACRO db mobiletradeanim_06_command endm enum mobiletradeanim_07_command ; $07 -mobiletradeanim_07: macro +mobiletradeanim_07: MACRO db mobiletradeanim_07_command endm enum mobiletradeanim_receivemon_command ; $08 -mobiletradeanim_receivemon: macro +mobiletradeanim_receivemon: MACRO db mobiletradeanim_receivemon_command endm __enum__ set $0b enum mobiletradeanim_showgetmon_command ; $0b -mobiletradeanim_showgetmon: macro +mobiletradeanim_showgetmon: MACRO db mobiletradeanim_showgetmon_command endm enum mobiletradeanim_end_command ; $0c -mobiletradeanim_end: macro +mobiletradeanim_end: MACRO db mobiletradeanim_end_command endm enum mobiletradeanim_showgtsgivemon_command ; $0d -mobiletradeanim_showgtsgivemon: macro +mobiletradeanim_showgtsgivemon: MACRO db mobiletradeanim_showgtsgivemon_command endm enum mobiletradeanim_showgtsgetmon_command ; $0e -mobiletradeanim_showgtsgetmon: macro +mobiletradeanim_showgtsgetmon: MACRO db mobiletradeanim_showgtsgetmon_command endm enum mobiletradeanim_0f_command ; $0f -mobiletradeanim_0f: macro +mobiletradeanim_0f: MACRO db mobiletradeanim_0f_command endm enum mobiletradeanim_10_command ; $10 -mobiletradeanim_10: macro +mobiletradeanim_10: MACRO db mobiletradeanim_10_command endm enum mobiletradeanim_11_command ; $11 -mobiletradeanim_11: macro +mobiletradeanim_11: MACRO db mobiletradeanim_11_command endm enum mobiletradeanim_12_command ; $12 -mobiletradeanim_12: macro +mobiletradeanim_12: MACRO db mobiletradeanim_12_command endm enum mobiletradeanim_showoddegg_command ; $13 -mobiletradeanim_showoddegg: macro +mobiletradeanim_showoddegg: MACRO db mobiletradeanim_showoddegg_command endm diff --git a/macros/wram.asm b/macros/wram.asm index e47e0a2f4..4325a4ad8 100755 --- a/macros/wram.asm +++ b/macros/wram.asm @@ -211,7 +211,7 @@ roam_struct: MACRO \1DVs:: dw ENDM -bugcontestwinner: macro +bugcontestwinner: MACRO \1WinnerID:: db \1Mon:: db \1Score:: dw diff --git a/maps/GoldenrodUndergroundSwitchRoomEntrances.asm b/maps/GoldenrodUndergroundSwitchRoomEntrances.asm index d27b6ff85..747d86a3f 100644 --- a/maps/GoldenrodUndergroundSwitchRoomEntrances.asm +++ b/maps/GoldenrodUndergroundSwitchRoomEntrances.asm @@ -4,7 +4,7 @@ UNDERGROUND_DOOR_CLOSED3 EQU $3f UNDERGROUND_DOOR_OPEN1 EQU $2d UNDERGROUND_DOOR_OPEN2 EQU $3d -ugdoor: macro +ugdoor: MACRO \1_YCOORD EQU \2 \1_XCOORD EQU \3 endm @@ -26,7 +26,7 @@ endm ugdoor UGDOOR_15, $12, $0a ugdoor UGDOOR_16, $12, $0c -doorstate: macro +doorstate: MACRO changeblock UGDOOR_\1_YCOORD, UGDOOR_\1_XCOORD, UNDERGROUND_DOOR_\2 endm diff --git a/maps/map_headers.asm b/maps/map_headers.asm index 9053329d7..62df15ec5 100644 --- a/maps/map_headers.asm +++ b/maps/map_headers.asm @@ -1,4 +1,4 @@ -map_header: macro +map_header: MACRO ;\1: map label ;\2: tileset: a TILESET_* constant ;\3: environment: TOWN, ROUTE, INDOOR, CAVE, ENVIRONMENT_5, GATE, or DUNGEON diff --git a/maps/second_map_headers.asm b/maps/second_map_headers.asm index 7503e72ae..03702b4bb 100644 --- a/maps/second_map_headers.asm +++ b/maps/second_map_headers.asm @@ -1,4 +1,4 @@ -map_header_2: macro +map_header_2: MACRO ;\1: map label ;\2: map id ;\3: border block @@ -14,7 +14,7 @@ map_header_2: macro db \4 endm -connection: macro +connection: MACRO if "\1" == "north" ;\2: map id ;\3: map label (eventually will be rolled into map id) diff --git a/mobile/fixed_words.asm b/mobile/fixed_words.asm index a0f65599c..de78a1a4e 100755 --- a/mobile/fixed_words.asm +++ b/mobile/fixed_words.asm @@ -4209,7 +4209,7 @@ MobileEZChatCategoryPointers: ; 11daac ; 11f220 MobileEZChatData_WordAndPageCounts: -macro_11f220: macro +macro_11f220: MACRO ; parameter: number of words db \1 ; 12 words per page (0-based indexing) @@ -4240,7 +4240,7 @@ EZChat_SortedWords: ; allocated size for each. ; These arrays are expanded dynamically to accomodate ; any Pokemon you've seen that starts with each kana.\ -macro_11f23c: macro +macro_11f23c: MACRO dw x - w3_d000, \1 x = x + 2 * \1 endm diff --git a/tilesets/tilesets.asm b/tilesets/tilesets.asm index b63e962f1..f71b71baa 100644 --- a/tilesets/tilesets.asm +++ b/tilesets/tilesets.asm @@ -1,4 +1,4 @@ -tileset: macro +tileset: MACRO dba \1GFX, \1Meta, \1Coll dw \1Anim dw NULL