diff options
42 files changed, 464 insertions, 464 deletions
diff --git a/constants/deco_constants.asm b/constants/deco_constants.asm index 7546d9e1f..84fcdb94d 100644 --- a/constants/deco_constants.asm +++ b/constants/deco_constants.asm @@ -57,7 +57,7 @@ const_value = 1 deco: MACRO const DECO_\1 enum DECOFLAG_\1 -endm +ENDM ; decorations: ; - DecorationAttributes (see data/decorations/attributes.asm) diff --git a/constants/map_constants.asm b/constants/map_constants.asm index e23a58c64..74e4f4ce0 100644 --- a/constants/map_constants.asm +++ b/constants/map_constants.asm @@ -1,7 +1,7 @@ newgroup: MACRO const_value = const_value + 1 enum_start 1 -endm +ENDM mapgroup: MACRO ;\1: map id @@ -11,7 +11,7 @@ GROUP_\1 EQU const_value enum MAP_\1 \1_HEIGHT EQU \2 \1_WIDTH EQU \3 -endm +ENDM ; map group ids ; `newgroup` indexes are for: diff --git a/data/battle_anims/objects.asm b/data/battle_anims/objects.asm index 8117d8495..62ec0140e 100755 --- a/data/battle_anims/objects.asm +++ b/data/battle_anims/objects.asm @@ -14,7 +14,7 @@ battleanimobj: MACRO db \4 ; callback db \5 ; palette db \6 ; tile offset -endm +ENDM BattleAnimObjects: ; ccb56 ; entries correspond to ANIM_OBJ_* constants diff --git a/data/map_objects.asm b/data/map_objects.asm index b321dcced..19a7c8d27 100755 --- a/data/map_objects.asm +++ b/data/map_objects.asm @@ -1,7 +1,7 @@ sprite_movement_data: MACRO db \1, \2, \3, \4, \5 dn \6, 0 -endm +ENDM SpriteMovementData:: ; 4273 ; entries correspond to SPRITEMOVEDATA_* constants diff --git a/data/odd_eggs.asm b/data/odd_eggs.asm index f9a29f6d6..aa7e8176b 100644 --- a/data/odd_eggs.asm +++ b/data/odd_eggs.asm @@ -1,7 +1,7 @@ prob: MACRO prob_total = prob_total + (\1) dw prob_total * $ffff / 100 -endm +ENDM OddEggProbabilities: prob_total = 0 diff --git a/data/palettes/town_map.asm b/data/palettes/town_map.asm index 1672a66ed..696863e85 100644 --- a/data/palettes/town_map.asm +++ b/data/palettes/town_map.asm @@ -12,7 +12,7 @@ rept _NARG / 2 shift shift endr -endm +ENDM ; gfx/pokegear/town_map.png townmappals EARTH, EARTH, EARTH, MOUNTAIN, MOUNTAIN, MOUNTAIN diff --git a/data/phone_contacts.asm b/data/phone_contacts.asm index c4d600edc..cfeaad8a1 100644 --- a/data/phone_contacts.asm +++ b/data/phone_contacts.asm @@ -6,7 +6,7 @@ phone: MACRO dba \5 db \6 dba \7 -endm +ENDM PhoneContacts: ; 9045f ; entries correspond to PHONE_* constants diff --git a/data/phone_special.asm b/data/phone_special.asm index e224bf43a..03c27743a 100644 --- a/data/phone_special.asm +++ b/data/phone_special.asm @@ -3,7 +3,7 @@ specialcall: MACRO dw \1 db \2 dba \3 -endm +ENDM SpecialPhoneCallList: ; 90627 ; entries correspond to SPECIALCALL_* constants diff --git a/data/unown_words.asm b/data/unown_words.asm index d019975c9..ea8c4b2a8 100644 --- a/data/unown_words.asm +++ b/data/unown_words.asm @@ -5,7 +5,7 @@ x = 1 x = x + 1 endr db -1 -endm +ENDM UnownWords: ; fba5a ; entries correspond to Unown forms diff --git a/data/wild/roammon_maps.asm b/data/wild/roammon_maps.asm index bf676c3a9..c0b552b26 100644 --- a/data/wild/roammon_maps.asm +++ b/data/wild/roammon_maps.asm @@ -10,7 +10,7 @@ rept \2 shift endr db 0 -endm +ENDM RoamMaps: ; 2a40f roam_map ROUTE_29, 2, ROUTE_30, ROUTE_46 diff --git a/data/wild/treemon_maps.asm b/data/wild/treemon_maps.asm index f70617117..e825930cc 100644 --- a/data/wild/treemon_maps.asm +++ b/data/wild/treemon_maps.asm @@ -1,7 +1,7 @@ treemon_map: MACRO map \1 db \2 ; treemon set -endm +ENDM TreeMonMaps: ; b825e treemon_map ROUTE_26, 4 diff --git a/engine/battle/battle_transition.asm b/engine/battle/battle_transition.asm index 47c3b9f41..f2fef5553 100644 --- a/engine/battle/battle_transition.asm +++ b/engine/battle/battle_transition.asm @@ -832,7 +832,7 @@ zoombox: MACRO ; width, height, start y, start x db \1, \2 dwcoord \3, \4 -endm +ENDM zoombox 4, 2, 8, 8 zoombox 6, 4, 7, 7 zoombox 8, 6, 6, 6 diff --git a/engine/battle_anims/bg_effects.asm b/engine/battle_anims/bg_effects.asm index ab4a8036b..c1a2bef4b 100644 --- a/engine/battle_anims/bg_effects.asm +++ b/engine/battle_anims/bg_effects.asm @@ -871,7 +871,7 @@ BattleBGEffect_RunPicResizeScript: ; c83ed (32:43ed) bgsquare: MACRO dn \1, \2 dw \3 -endm +ENDM bgsquare 6, 6, .SixBySix bgsquare 4, 4, .FourByFour diff --git a/engine/billspc.asm b/engine/billspc.asm index 80dee0cc8..554fb6bf1 100755 --- a/engine/billspc.asm +++ b/engine/billspc.asm @@ -1450,7 +1450,7 @@ ENDC ld a, [wd004] inc a ld [wBillsPC_NumMonsInBox], a -endm +ENDM CopyBoxmonSpecies: ; e2d30 (38:6d30) xor a diff --git a/engine/card_flip.asm b/engine/card_flip.asm index c1585c5dc..f03db190d 100755 --- a/engine/card_flip.asm +++ b/engine/card_flip.asm @@ -1413,7 +1413,7 @@ else dbpixel \1, \2 dw \3 endc -endm +ENDM cardflip_cursor 11, 2, .Impossible cardflip_cursor 12, 2, .Impossible diff --git a/engine/events/crystal_unown.asm b/engine/events/crystal_unown.asm index 6c0e972f8..352306055 100644 --- a/engine/events/crystal_unown.asm +++ b/engine/events/crystal_unown.asm @@ -178,7 +178,7 @@ endc shift endr db $ff -endm +ENDM .UnownText_Escape: ; db $08, $44, $04, $00, $2e, $08, $ff diff --git a/engine/events/print_unown_2.asm b/engine/events/print_unown_2.asm index 057db5176..c932ded38 100644 --- a/engine/events/print_unown_2.asm +++ b/engine/events/print_unown_2.asm @@ -105,7 +105,7 @@ x = x +- \2 endr y = y + 1 endr -endm +ENDM UnownPrinter_OverworldMapRectangle: ; e008b overworldmaprect 7, 7 diff --git a/engine/pic_animation.asm b/engine/pic_animation.asm index bb7615ae0..b060f5b4b 100644 --- a/engine/pic_animation.asm +++ b/engine/pic_animation.asm @@ -144,7 +144,7 @@ SetUpPokeAnim: ; d00b4 PokeAnim_SetupCommands: ; d00da setup_command: MACRO \1_: dw \1 -endm +ENDM setup_command PokeAnim_Finish setup_command PokeAnim_BasePic setup_command PokeAnim_SetWait @@ -586,7 +586,7 @@ x = x + 1 endr y = y + 7 endr -endm +ENDM PokeAnim_ConvertAndApplyBitmask: ; d036b xor a diff --git a/engine/unown_puzzle.asm b/engine/unown_puzzle.asm index a2b8ac86e..525345e68 100755 --- a/engine/unown_puzzle.asm +++ b/engine/unown_puzzle.asm @@ -120,7 +120,7 @@ rept _NARG / 2 shift shift endr -endm +ENDM initpuzcoord 0,0, 0,1, 0,2, 0,3, 0,4, 0,5 initpuzcoord 1,0, 1,5 initpuzcoord 2,0, 2,5 @@ -603,7 +603,7 @@ puzzle_coords: MACRO dbpixel \1, \2, \3, \4 dwcoord \5, \6 db \7, \8 -endm +ENDM ; OAM coords, tilemap coords, vacant tile, filler puzzle_coords 3, 3, 4, 4, 1, 0, PUZZLE_BORDER, 0 puzzle_coords 6, 3, 4, 4, 4, 0, PUZZLE_BORDER, 0 diff --git a/home/text.asm b/home/text.asm index 49f798c3b..7cf3c2c60 100644 --- a/home/text.asm +++ b/home/text.asm @@ -207,14 +207,14 @@ else cp \1 endc jp z, \2 -endm +ENDM dict2: MACRO cp \1 jr nz, ._\@ ld a, \2 ._\@: -endm +ENDM dict "<DAY>", Char15 dict "<LINE>", LineChar @@ -313,7 +313,7 @@ print_name: MACRO push de ld de, \1 jp PlaceCommandCharacter -endm +ENDM PrintMomsName: print_name MomsName ; 1186 PrintPlayerName: print_name PlayerName ; 118d diff --git a/macros/base_stats.asm b/macros/base_stats.asm index 9c8c9cb32..f260e35d9 100644 --- a/macros/base_stats.asm +++ b/macros/base_stats.asm @@ -4,7 +4,7 @@ define: MACRO if !def(\1) \1 EQUS \2 endc -endm +ENDM const_value = 0 diff --git a/macros/code.asm b/macros/code.asm index f4bf5bbdc..5ec214d50 100644 --- a/macros/code.asm +++ b/macros/code.asm @@ -2,11 +2,11 @@ lb: MACRO ; r, hi, lo ld \1, (\2 & $ff) << 8 + (\3 & $ff) - ENDM +ENDM ln: MACRO ; r, hi, lo ld \1, (\2 & $f) << 4 + (\3 & $f) - ENDM +ENDM ldpixel: MACRO if _NARG >= 5 @@ -14,7 +14,7 @@ if _NARG >= 5 else lb \1, \2 * 8, \3 * 8 endc - ENDM +ENDM depixel EQUS "ldpixel de," bcpixel EQUS "ldpixel bc," @@ -33,7 +33,7 @@ jumptable: MACRO ld h, [hl] ld l, a jp hl - ENDM +ENDM ; Many mobile functions were dummied out in localization. mobile EQUS "ret" @@ -52,4 +52,4 @@ x = (x + 1) * 2 +- 1 endc endr and x - ENDM +ENDM diff --git a/macros/coords.asm b/macros/coords.asm index 6ed400927..a8e64c0c9 100644 --- a/macros/coords.asm +++ b/macros/coords.asm @@ -9,7 +9,7 @@ coord: MACRO else ld \1, \4 + SCREEN_WIDTH * (\3) + (\2) endc - ENDM +ENDM dwcoord: MACRO rept _NARG / 2 @@ -17,7 +17,7 @@ dwcoord: MACRO shift shift endr - ENDM +ENDM ldcoord_a: MACRO if _NARG < 3 @@ -25,7 +25,7 @@ ldcoord_a: MACRO else ld [\3 + SCREEN_WIDTH * (\2) + (\1)], a endc - ENDM +ENDM lda_coord: MACRO if _NARG < 3 @@ -33,7 +33,7 @@ lda_coord: MACRO else ld a, [\3 + SCREEN_WIDTH * (\2) + (\1)] endc - ENDM +ENDM bgrows EQUS "* $20" ; SCREEN_WIDTH diff --git a/macros/data.asm b/macros/data.asm index ee812d43a..55f41a204 100644 --- a/macros/data.asm +++ b/macros/data.asm @@ -3,27 +3,27 @@ dwb: MACRO dw \1 db \2 - ENDM +ENDM dbw: MACRO db \1 dw \2 - ENDM +ENDM dbbw: MACRO db \1, \2 dw \3 - ENDM +ENDM dbww: MACRO db \1 dw \2, \3 - ENDM +ENDM dbwww: MACRO db \1 dw \2, \3, \4 - ENDM +ENDM dn: MACRO ; nybbles rept _NARG / 2 @@ -31,7 +31,7 @@ dn: MACRO ; nybbles shift shift endr - ENDM +ENDM dc: MACRO ; "crumbs" rept _NARG / 4 @@ -41,7 +41,7 @@ dc: MACRO ; "crumbs" shift shift endr - ENDM +ENDM dx: MACRO x = 8 * ((\1) - 1) @@ -49,33 +49,33 @@ x = 8 * ((\1) - 1) db ((\2) >> x) & $ff x = x + -8 endr - ENDM +ENDM dt: MACRO ; three-byte (big-endian) dx 3, \1 - ENDM +ENDM dd: MACRO ; four-byte (big-endian) dx 4, \1 - ENDM +ENDM bigdw: MACRO ; big-endian word dx 2, \1 - ENDM +ENDM dba: MACRO ; dbw bank, address rept _NARG dbw BANK(\1), \1 shift endr - ENDM +ENDM dab: MACRO ; dwb address, bank rept _NARG dwb \1, BANK(\1) shift endr - ENDM +ENDM dba_pic: MACRO ; dbw bank, address db BANK(\1) - PICS_FIX @@ -89,7 +89,7 @@ if _NARG >= 4 else db \1 * 8, \2 * 8 endc -endm +ENDM dsprite: MACRO ; conditional segment is there because not every instance of @@ -99,7 +99,7 @@ if _NARG >= 7 ; y tile, y pxl, x tile, x pxl, vtile offset, flags, palette else db (\1 * 8) % $100 + \2, (\3 * 8) % $100 + \4, \5, \6 endc -endm +ENDM sine_wave: MACRO diff --git a/macros/enum.asm b/macros/enum.asm index 3f7770ace..0c1d4a064 100644 --- a/macros/enum.asm +++ b/macros/enum.asm @@ -11,16 +11,16 @@ __enumdir__ = \2 else __enumdir__ = +1 endc -endm +ENDM enum: MACRO \1 = __enum__ __enum__ = __enum__ + __enumdir__ -endm +ENDM enum_set: MACRO __enum__ = \1 -endm +ENDM ; Enumerate constants diff --git a/macros/rst.asm b/macros/rst.asm index cf4cc5314..58f54d5e8 100644 --- a/macros/rst.asm +++ b/macros/rst.asm @@ -6,13 +6,13 @@ farcall: MACRO ; bank, address ld a, BANK(\1) ld hl, \1 rst FarCall - ENDM +ENDM callfar: MACRO ; address, bank ld hl, \1 ld a, BANK(\1) rst FarCall - ENDM +ENDM ; legacy support for pre-2018 pokecrystal callba EQUS "farcall" @@ -26,4 +26,4 @@ homecall: MACRO call \1 pop af rst Bankswitch - ENDM +ENDM diff --git a/macros/scripts/audio.asm b/macros/scripts/audio.asm index f8c878394..98933890c 100644 --- a/macros/scripts/audio.asm +++ b/macros/scripts/audio.asm @@ -1,23 +1,23 @@ musicheader: MACRO ; number of tracks, track idx, address dbw ((\1 - 1) << 6) + (\2 - 1), \3 - endm +ENDM note: MACRO dn (\1), (\2) - 1 - ENDM +ENDM sound: MACRO note \1, \2 db \3 ; intensity dw \4 ; frequency - endm +ENDM noise: MACRO note \1, \2 ; duration db \3 ; intensity db \4 ; frequency - endm +ENDM ; MusicCommands indexes (see audio/engine.asm) enum_start $d8 @@ -25,7 +25,7 @@ noise: MACRO enum notetype_cmd ; $d8 octave: MACRO db notetype_cmd - (\1) - endm +ENDM notetype: MACRO db notetype_cmd @@ -33,37 +33,37 @@ notetype: MACRO if _NARG >= 2 db \2 ; intensity endc - endm +ENDM enum pitchoffset_cmd ; $d9 pitchoffset: MACRO db pitchoffset_cmd dn \1, \2 - 1 ; octave, key - endm +ENDM enum tempo_cmd ; $da tempo: MACRO db tempo_cmd bigdw \1 ; tempo - endm +ENDM enum dutycycle_cmd ; $db dutycycle: MACRO db dutycycle_cmd db \1 ; duty_cycle - endm +ENDM enum intensity_cmd ; $dc intensity: MACRO db intensity_cmd db \1 ; intensity - endm +ENDM enum soundinput_cmd ; $dd soundinput: MACRO db soundinput_cmd db \1 ; input - endm +ENDM enum sound_duty_cmd ; $de sound_duty: MACRO @@ -73,193 +73,193 @@ sound_duty: MACRO else db \1 ; one-byte duty value for legacy support endc - endm +ENDM enum togglesfx_cmd ; $df togglesfx: MACRO db togglesfx_cmd - endm +ENDM enum slidepitchto_cmd ; $e0 slidepitchto: MACRO db slidepitchto_cmd db \1 - 1 ; duration dn \2, \3 ; octave, pitch - endm +ENDM enum vibrato_cmd ; $e1 vibrato: MACRO db vibrato_cmd db \1 ; delay db \2 ; extent - endm +ENDM enum unknownmusic0xe2_cmd ; $e2 unknownmusic0xe2: MACRO db unknownmusic0xe2_cmd db \1 ; unknown - endm +ENDM enum togglenoise_cmd ; $e3 togglenoise: MACRO db togglenoise_cmd db \1 ; id - endm +ENDM enum panning_cmd ; $e4 panning: MACRO db panning_cmd db \1 ; tracks - endm +ENDM enum volume_cmd ; $e5 volume: MACRO db volume_cmd db \1 ; volume - endm +ENDM enum tone_cmd ; $e6 tone: MACRO db tone_cmd bigdw \1 ; tone - endm +ENDM enum unknownmusic0xe7_cmd ; $e7 unknownmusic0xe7: MACRO db unknownmusic0xe7_cmd db \1 ; unknown - endm +ENDM enum unknownmusic0xe8_cmd ; $e8 unknownmusic0xe8: MACRO db unknownmusic0xe8_cmd db \1 ; unknown - endm +ENDM enum tempo_relative_cmd ; $e9 tempo_relative: MACRO db tempo_relative_cmd bigdw \1 ; value - endm +ENDM enum restartchannel_cmd ; $ea restartchannel: MACRO db restartchannel_cmd dw \1 ; address - endm +ENDM enum newsong_cmd ; $eb newsong: MACRO db newsong_cmd bigdw \1 ; id - endm +ENDM enum sfxpriorityon_cmd ; $ec sfxpriorityon: MACRO db sfxpriorityon_cmd - endm +ENDM enum sfxpriorityoff_cmd ; $ed sfxpriorityoff: MACRO db sfxpriorityoff_cmd - endm +ENDM enum unknownmusic0xee_cmd ; $ee unknownmusic0xee: MACRO db unknownmusic0xee_cmd dw \1 ; address - endm +ENDM enum stereopanning_cmd ; $ef stereopanning: MACRO db stereopanning_cmd db \1 ; tracks - endm +ENDM enum sfxtogglenoise_cmd ; $f0 sfxtogglenoise: MACRO db sfxtogglenoise_cmd db \1 ; id - endm +ENDM enum music0xf1_cmd ; $f1 music0xf1: MACRO db music0xf1_cmd - endm +ENDM enum music0xf2_cmd ; $f2 music0xf2: MACRO db music0xf2_cmd - endm +ENDM enum music0xf3_cmd ; $f3 music0xf3: MACRO db music0xf3_cmd - endm +ENDM enum music0xf4_cmd ; $f4 music0xf4: MACRO db music0xf4_cmd - endm +ENDM enum music0xf5_cmd ; $f5 music0xf5: MACRO db music0xf5_cmd - endm +ENDM enum music0xf6_cmd ; $f6 music0xf6: MACRO db music0xf6_cmd - endm +ENDM enum music0xf7_cmd ; $f7 music0xf7: MACRO db music0xf7_cmd - endm +ENDM enum music0xf8_cmd ; $f8 music0xf8: MACRO db music0xf8_cmd - endm +ENDM enum unknownmusic0xf9_cmd ; $f9 unknownmusic0xf9: MACRO db unknownmusic0xf9_cmd - endm +ENDM enum setcondition_cmd ; $fa setcondition: MACRO db setcondition_cmd db \1 ; condition - endm +ENDM enum jumpif_cmd ; $fb jumpif: MACRO db jumpif_cmd db \1 ; condition dw \2 ; address - endm +ENDM enum jumpchannel_cmd ; $fc jumpchannel: MACRO db jumpchannel_cmd dw \1 ; address - endm +ENDM enum loopchannel_cmd ; $fd loopchannel: MACRO db loopchannel_cmd db \1 ; count dw \2 ; address - endm +ENDM enum callchannel_cmd ; $fe callchannel: MACRO db callchannel_cmd dw \1 ; address - endm +ENDM enum endchannel_cmd ; $ff endchannel: MACRO db endchannel_cmd - endm +ENDM diff --git a/macros/scripts/battle_anims.asm b/macros/scripts/battle_anims.asm index baa45503e..7b379e7d2 100644 --- a/macros/scripts/battle_anims.asm +++ b/macros/scripts/battle_anims.asm @@ -3,7 +3,7 @@ if \1 >= $d0 flip out endc db \1 - endm +ENDM ; BattleAnimCommands indexes (see engine/battle_anims/anim_commands.asm) enum_start $d0 @@ -15,20 +15,20 @@ anim_obj: MACRO db (\2 << 3) + \3 ; x db (\4 << 3) + \5 ; y db \6 ; param - endm +ENDM enum anim_1gfx_command ; $d1 anim_1gfx: MACRO db anim_1gfx_command db \1 ; gfx1 - endm +ENDM enum anim_2gfx_command ; $d2 anim_2gfx: MACRO db anim_2gfx_command db \1 ; gfx1 db \2 ; gfx2 - endm +ENDM enum anim_3gfx_command ; $d3 anim_3gfx: MACRO @@ -36,7 +36,7 @@ anim_3gfx: MACRO db \1 ; gfx1 db \2 ; gfx2 db \3 ; gfx3 - endm +ENDM enum anim_4gfx_command ; $d4 anim_4gfx: MACRO @@ -45,7 +45,7 @@ anim_4gfx: MACRO db \2 ; gfx2 db \3 ; gfx3 db \4 ; gfx4 - endm +ENDM enum anim_5gfx_command ; $d5 anim_5gfx: MACRO @@ -55,147 +55,147 @@ anim_5gfx: MACRO db \3 ; gfx3 db \4 ; gfx4 db \5 ; gfx5 - endm +ENDM enum anim_incobj_command ; $d6 anim_incobj: MACRO db anim_incobj_command db \1 ; id - endm +ENDM enum anim_setobj_command ; $d7 anim_setobj: MACRO db anim_setobj_command db \1 ; id db \2 ; obj - endm +ENDM enum anim_incbgeffect_command ; $d8 anim_incbgeffect: MACRO db anim_incbgeffect_command db \1 ; effect - endm +ENDM enum anim_enemyfeetobj_command ; $d9 anim_enemyfeetobj: MACRO db anim_enemyfeetobj_command - endm +ENDM enum anim_playerheadobj_command ; $da anim_playerheadobj: MACRO db anim_playerheadobj_command - endm +ENDM enum anim_checkpokeball_command ; $db anim_checkpokeball: MACRO db anim_checkpokeball_command - endm +ENDM enum anim_transform_command ; $dc anim_transform: MACRO db anim_transform_command - endm +ENDM enum anim_raisesub_command ; $dd anim_raisesub: MACRO db anim_raisesub_command - endm +ENDM enum anim_dropsub_command ; $de anim_dropsub: MACRO db anim_dropsub_command - endm +ENDM enum anim_resetobp0_command ; $df anim_resetobp0: MACRO db anim_resetobp0_command - endm +ENDM enum anim_sound_command ; $e0 anim_sound: MACRO db anim_sound_command db (\1 << 2) | \2 ; duration, tracks db \3 ; id - endm +ENDM enum anim_cry_command ; $e1 anim_cry: MACRO db anim_cry_command db \1 ; pitch - endm +ENDM enum anim_minimizeopp_command ; $e2 anim_minimizeopp: MACRO db anim_minimizeopp_command - endm +ENDM enum anim_oamon_command ; $e3 anim_oamon: MACRO db anim_oamon_command - endm +ENDM enum anim_oamoff_command ; $e4 anim_oamoff: MACRO db anim_oamoff_command - endm +ENDM enum anim_clearobjs_command ; $e5 anim_clearobjs: MACRO db anim_clearobjs_command - endm +ENDM enum anim_beatup_command ; $e6 anim_beatup: MACRO db anim_beatup_command - endm +ENDM enum anim_0xe7_command ; $e7 anim_0xe7: MACRO db anim_0xe7_command - endm +ENDM enum anim_updateactorpic_command ; $e8 anim_updateactorpic: MACRO db anim_updateactorpic_command - endm +ENDM enum anim_minimize_command ; $e9 anim_minimize: MACRO db anim_minimize_command - endm +ENDM enum anim_0xea_command ; $ea anim_0xea: MACRO db anim_0xea_command - endm +ENDM enum anim_0xeb_command ; $eb anim_0xeb: MACRO db anim_0xeb_command - endm +ENDM enum anim_0xec_command ; $ec anim_0xec: MACRO db anim_0xec_command - endm +ENDM enum anim_0xed_command ; $ed anim_0xed: MACRO db anim_0xed_command - endm +ENDM enum anim_if_param_and_command ; $ee anim_if_param_and: MACRO db anim_if_param_and_command db \1 ; value dw \2 ; address - endm +ENDM enum anim_jumpuntil_command ; $ef anim_jumpuntil: MACRO db anim_jumpuntil_command dw \1 ; address - endm +ENDM enum anim_bgeffect_command ; $f0 anim_bgeffect: MACRO @@ -204,91 +204,91 @@ anim_bgeffect: MACRO db \2 ; unknown db \3 ; unknown db \4 ; unknown - endm +ENDM enum anim_bgp_command ; $f1 anim_bgp: MACRO db anim_bgp_command db \1 ; colors - endm +ENDM enum anim_obp0_command ; $f2 anim_obp0: MACRO db anim_obp0_command db \1 ; colors - endm +ENDM enum anim_obp1_command ; $f3 anim_obp1: MACRO db anim_obp1_command db \1 ; colors - endm +ENDM enum anim_clearsprites_command ; $f4 anim_clearsprites: MACRO db anim_clearsprites_command - endm +ENDM enum anim_0xf5_command ; $f5 anim_0xf5: MACRO db anim_0xf5_command - endm +ENDM enum anim_0xf6_command ; $f6 anim_0xf6: MACRO db anim_0xf6_command - endm +ENDM enum anim_0xf7_command ; $f7 anim_0xf7: MACRO db anim_0xf7_command - endm +ENDM enum anim_if_param_equal_command ; $f8 anim_if_param_equal: MACRO db anim_if_param_equal_command db \1 ; value dw \2 ; address - endm +ENDM enum anim_setvar_command ; $f9 anim_setvar: MACRO db anim_setvar_command db \1 ; value - endm +ENDM enum anim_incvar_command ; $fa anim_incvar: MACRO db anim_incvar_command - endm +ENDM enum anim_if_var_equal_command ; $fb anim_if_var_equal: MACRO db anim_if_var_equal_command db \1 ; value dw \2 ; address - endm +ENDM enum anim_jump_command ; $fc anim_jump: MACRO db anim_jump_command dw \1 ; address - endm +ENDM enum anim_loop_command ; $fd anim_loop: MACRO db anim_loop_command db \1 ; count dw \2 ; address - endm +ENDM enum anim_call_command ; $fe anim_call: MACRO db anim_call_command dw \1 ; address - endm +ENDM enum anim_ret_command ; $ff anim_ret: MACRO db anim_ret_command - endm +ENDM diff --git a/macros/scripts/battle_commands.asm b/macros/scripts/battle_commands.asm index dc264b291..5933740f0 100644 --- a/macros/scripts/battle_commands.asm +++ b/macros/scripts/battle_commands.asm @@ -1,7 +1,7 @@ command: MACRO enum \1_command \1 EQUS "db \1_command" -endm +ENDM ; BattleCommandPointers indexes (see data/battle_command_pointers.asm) enum_start 1 diff --git a/macros/scripts/events.asm b/macros/scripts/events.asm index 399dd4bb1..a494a33af 100644 --- a/macros/scripts/events.asm +++ b/macros/scripts/events.asm @@ -5,101 +5,101 @@ scall: MACRO db scall_command dw \1 ; pointer - endm +ENDM enum farscall_command ; $01 farscall: MACRO db farscall_command dba \1 - endm +ENDM enum ptcall_command ; $02 ptcall: MACRO db ptcall_command dw \1 ; pointer - endm +ENDM enum jump_command ; $03 jump: MACRO db jump_command dw \1 ; pointer - endm +ENDM enum farjump_command ; $04 farjump: MACRO db farjump_command dba \1 - endm +ENDM enum ptjump_command ; $05 ptjump: MACRO db ptjump_command dw \1 ; pointer - endm +ENDM enum if_equal_command ; $06 if_equal: MACRO db if_equal_command db \1 ; byte dw \2 ; pointer - endm +ENDM enum if_not_equal_command ; $07 if_not_equal: MACRO db if_not_equal_command db \1 ; byte dw \2 ; pointer - endm +ENDM enum iffalse_command ; $08 iffalse: MACRO db iffalse_command dw \1 ; pointer - endm +ENDM enum iftrue_command ; $09 iftrue: MACRO db iftrue_command dw \1 ; pointer - endm +ENDM enum if_greater_than_command ; $0a if_greater_than: MACRO db if_greater_than_command db \1 ; byte dw \2 ; pointer - endm +ENDM enum if_less_than_command ; $0b if_less_than: MACRO db if_less_than_command db \1 ; byte dw \2 ; pointer - endm +ENDM enum jumpstd_command ; $0c jumpstd: MACRO db jumpstd_command dw \1 ; predefined_script - endm +ENDM enum callstd_command ; $0d callstd: MACRO db callstd_command dw \1 ; predefined_script - endm +ENDM enum callasm_command ; $0e callasm: MACRO db callasm_command dba \1 - endm +ENDM enum special_command ; $0f special: MACRO db special_command dw (\1Special - SpecialsPointers) / 3 - endm +ENDM add_special: MACRO \1Special:: @@ -110,92 +110,92 @@ ENDM ptcallasm: MACRO db ptcallasm_command dw \1 ; asm - endm +ENDM enum checkmapscene_command ; $11 checkmapscene: MACRO db checkmapscene_command map \1 ; map - endm +ENDM enum setmapscene_command ; $12 setmapscene: MACRO db setmapscene_command map \1 ; map db \2 ; scene_id - endm +ENDM enum checkscene_command ; $13 checkscene: MACRO db checkscene_command - endm +ENDM enum setscene_command ; $14 setscene: MACRO db setscene_command db \1 ; scene_id - endm +ENDM enum writebyte_command ; $15 writebyte: MACRO db writebyte_command db \1 ; value - endm +ENDM enum addvar_command ; $16 addvar: MACRO db addvar_command db \1 ; value - endm +ENDM enum random_command ; $17 random: MACRO db random_command db \1 ; input - endm +ENDM enum checkver_command ; $18 checkver: MACRO db checkver_command - endm +ENDM enum copybytetovar_command ; $19 copybytetovar: MACRO db copybytetovar_command dw \1 ; address - endm +ENDM enum copyvartobyte_command ; $1a copyvartobyte: MACRO db copyvartobyte_command dw \1 ; address - endm +ENDM enum loadvar_command ; $1b loadvar: MACRO db loadvar_command dw \1 ; address db \2 ; value - endm +ENDM enum checkcode_command ; $1c checkcode: MACRO db checkcode_command db \1 ; variable_id - endm +ENDM enum writevarcode_command ; $1d writevarcode: MACRO db writevarcode_command db \1 ; variable_id - endm +ENDM enum writecode_command ; $1e writecode: MACRO db writecode_command db \1 ; variable_id db \2 ; value - endm +ENDM enum giveitem_command ; $1f giveitem: MACRO @@ -206,7 +206,7 @@ if _NARG == 2 else db 1 endc - endm +ENDM enum takeitem_command ; $20 takeitem: MACRO @@ -217,76 +217,76 @@ if _NARG == 2 else db 1 endc - endm +ENDM enum checkitem_command ; $21 checkitem: MACRO db checkitem_command db \1 ; item - endm +ENDM enum givemoney_command ; $22 givemoney: MACRO db givemoney_command db \1 ; account dt \2 ; money - endm +ENDM enum takemoney_command ; $23 takemoney: MACRO db takemoney_command db \1 ; account dt \2 ; money - endm +ENDM enum checkmoney_command ; $24 checkmoney: MACRO db checkmoney_command db \1 ; account dt \2 ; money - endm +ENDM enum givecoins_command ; $25 givecoins: MACRO db givecoins_command dw \1 ; coins - endm +ENDM enum takecoins_command ; $26 takecoins: MACRO db takecoins_command dw \1 ; coins - endm +ENDM enum checkcoins_command ; $27 checkcoins: MACRO db checkcoins_command dw \1 ; coins - endm +ENDM enum addcellnum_command ; $28 addcellnum: MACRO db addcellnum_command db \1 ; person - endm +ENDM enum delcellnum_command ; $29 delcellnum: MACRO db delcellnum_command db \1 ; person - endm +ENDM enum checkcellnum_command ; $2a checkcellnum: MACRO db checkcellnum_command db \1 ; person - endm +ENDM enum checktime_command ; $2b checktime: MACRO db checktime_command db \1 ; time - endm +ENDM checkmorn EQUS "checktime MORN" checkday EQUS "checktime DAY" @@ -296,7 +296,7 @@ checknite EQUS "checktime NITE" checkpoke: MACRO db checkpoke_command db \1 ; pkmn - endm +ENDM enum givepoke_command ; $2d givepoke: MACRO @@ -317,91 +317,91 @@ givepoke: MACRO else db 0, 0 endc - endm +ENDM enum giveegg_command ; $2e giveegg: MACRO db giveegg_command db \1 ; pkmn db \2 ; level - endm +ENDM enum givepokeitem_command ; $2f givepokeitem: MACRO db givepokeitem_command dw \1 ; pointer - endm +ENDM enum checkpokeitem_command ; $30 checkpokeitem: MACRO db checkpokeitem_command dw \1 ; pointer - endm +ENDM enum checkevent_command ; $31 checkevent: MACRO db checkevent_command dw \1 ; event_flag - endm +ENDM enum clearevent_command ; $32 clearevent: MACRO db clearevent_command dw \1 ; event_flag - endm +ENDM enum setevent_command ; $33 setevent: MACRO db setevent_command dw \1 ; event_flag - endm +ENDM enum checkflag_command ; $34 checkflag: MACRO db checkflag_command dw \1 ; engine_flag - endm +ENDM enum clearflag_command ; $35 clearflag: MACRO db clearflag_command dw \1 ; engine_flag - endm +ENDM enum setflag_command ; $36 setflag: MACRO db setflag_command dw \1 ; engine_flag - endm +ENDM enum wildon_command ; $37 wildon: MACRO db wildon_command - endm +ENDM enum wildoff_command ; $38 wildoff: MACRO db wildoff_command - endm +ENDM enum xycompare_command ; $39 xycompare: MACRO db xycompare_command dw \1 ; pointer - endm +ENDM enum warpmod_command ; $3a warpmod: MACRO db warpmod_command db \1 ; warp_id map \2 ; map - endm +ENDM enum blackoutmod_command ; $3b blackoutmod: MACRO db blackoutmod_command map \1 ; map - endm +ENDM enum warp_command ; $3c warp: MACRO @@ -409,46 +409,46 @@ warp: MACRO map \1 ; map db \2 ; x db \3 ; y - endm +ENDM enum readmoney_command ; $3d readmoney: MACRO db readmoney_command db \1 ; account db \2 ; memory - endm +ENDM enum readcoins_command ; $3e readcoins: MACRO db readcoins_command db \1 ; memory - endm +ENDM enum RAM2MEM_command ; $3f RAM2MEM: MACRO db RAM2MEM_command db \1 ; memory - endm +ENDM enum pokenamemem_command ; $40 pokenamemem: MACRO db pokenamemem_command db \1 ; pokemon db \2 ; memory - endm +ENDM enum itemtotext_command ; $41 itemtotext: MACRO db itemtotext_command db \1 ; item db \2 ; memory - endm +ENDM enum mapnametotext_command ; $42 mapnametotext: MACRO db mapnametotext_command db \1 ; memory - endm +ENDM enum trainertotext_command ; $43 trainertotext: MACRO @@ -456,273 +456,273 @@ trainertotext: MACRO db \1 ; trainer_id db \2 ; trainer_group db \3 ; memory - endm +ENDM enum stringtotext_command ; $44 stringtotext: MACRO db stringtotext_command dw \1 ; text_pointer db \2 ; memory - endm +ENDM enum itemnotify_command ; $45 itemnotify: MACRO db itemnotify_command - endm +ENDM enum pocketisfull_command ; $46 pocketisfull: MACRO db pocketisfull_command - endm +ENDM enum opentext_command ; $47 opentext: MACRO db opentext_command - endm +ENDM enum refreshscreen_command ; $48 refreshscreen: MACRO db refreshscreen_command db \1 ; dummy - endm +ENDM enum closetext_command ; $49 closetext: MACRO db closetext_command - endm +ENDM enum loadbytec2cf_command ; $4a loadbytec2cf: MACRO db loadbytec2cf_command db \1 ; byte - endm +ENDM enum farwritetext_command ; $4b farwritetext: MACRO db farwritetext_command dba \1 - endm +ENDM enum writetext_command ; $4c writetext: MACRO db writetext_command dw \1 ; text_pointer - endm +ENDM enum repeattext_command ; $4d repeattext: MACRO db repeattext_command db \1 ; byte db \2 ; byte - endm +ENDM enum yesorno_command ; $4e yesorno: MACRO db yesorno_command - endm +ENDM enum loadmenudata_command ; $4f loadmenudata: MACRO db loadmenudata_command dw \1 ; data - endm +ENDM enum closewindow_command ; $50 closewindow: MACRO db closewindow_command - endm +ENDM enum jumptextfaceplayer_command ; $51 jumptextfaceplayer: MACRO db jumptextfaceplayer_command dw \1 ; text_pointer - endm +ENDM ; IF _CRYSTAL enum farjumptext_command ; $52 farjumptext: MACRO db farjumptext_command dba \1 - endm +ENDM ; ENDC enum jumptext_command ; $53 jumptext: MACRO db jumptext_command dw \1 ; text_pointer - endm +ENDM enum waitbutton_command ; $54 waitbutton: MACRO db waitbutton_command - endm +ENDM enum buttonsound_command ; $55 buttonsound: MACRO db buttonsound_command - endm +ENDM enum pokepic_command ; $56 pokepic: MACRO db pokepic_command db \1 ; pokemon - endm +ENDM enum closepokepic_command ; $57 closepokepic: MACRO db closepokepic_command - endm +ENDM enum _2dmenu_command ; $58 _2dmenu: MACRO db _2dmenu_command - endm +ENDM enum verticalmenu_command ; $59 verticalmenu: MACRO db verticalmenu_command - endm +ENDM enum loadpikachudata_command ; $5a loadpikachudata: MACRO db loadpikachudata_command - endm +ENDM enum randomwildmon_command ; $5b randomwildmon: MACRO db randomwildmon_command - endm +ENDM enum loadmemtrainer_command ; $5c loadmemtrainer: MACRO db loadmemtrainer_command - endm +ENDM enum loadwildmon_command ; $5d loadwildmon: MACRO db loadwildmon_command db \1 ; pokemon db \2 ; level - endm +ENDM enum loadtrainer_command ; $5e loadtrainer: MACRO db loadtrainer_command db \1 ; trainer_group db \2 ; trainer_id - endm +ENDM enum startbattle_command ; $5f startbattle: MACRO db startbattle_command - endm +ENDM enum reloadmapafterbattle_command ; $60 reloadmapafterbattle: MACRO db reloadmapafterbattle_command - endm +ENDM enum catchtutorial_command ; $61 catchtutorial: MACRO db catchtutorial_command db \1 ; byte - endm +ENDM enum trainertext_command ; $62 trainertext: MACRO db trainertext_command db \1 ; which_text - endm +ENDM enum trainerflagaction_command ; $63 trainerflagaction: MACRO db trainerflagaction_command db \1 ; action - endm +ENDM enum winlosstext_command ; $64 winlosstext: MACRO db winlosstext_command dw \1 ; win_text_pointer dw \2 ; loss_text_pointer - endm +ENDM enum scripttalkafter_command ; $65 scripttalkafter: MACRO db scripttalkafter_command - endm +ENDM enum end_if_just_battled_command ; $66 end_if_just_battled: MACRO db end_if_just_battled_command - endm +ENDM enum check_just_battled_command ; $67 check_just_battled: MACRO db check_just_battled_command - endm +ENDM enum setlasttalked_command ; $68 setlasttalked: MACRO db setlasttalked_command db \1 ; object id - endm +ENDM enum applymovement_command ; $69 applymovement: MACRO db applymovement_command db \1 ; object id dw \2 ; data - endm +ENDM enum applymovement2_command ; $6a applymovement2: MACRO db applymovement2_command dw \1 ; data - endm +ENDM enum faceplayer_command ; $6b faceplayer: MACRO db faceplayer_command - endm +ENDM enum faceobject_command ; $6c faceobject: MACRO db faceobject_command db \1 ; object1 db \2 ; object2 - endm +ENDM enum variablesprite_command ; $6d variablesprite: MACRO db variablesprite_command db \1 - SPRITE_VARS ; byte db \2 ; sprite - endm +ENDM enum disappear_command ; $6e disappear: MACRO db disappear_command db \1 ; object id - endm +ENDM enum appear_command ; $6f appear: MACRO db appear_command db \1 ; object id - endm +ENDM enum follow_command ; $70 follow: MACRO db follow_command db \1 ; object2 db \2 ; object1 - endm +ENDM enum stopfollow_command ; $71 stopfollow: MACRO db stopfollow_command - endm +ENDM enum moveobject_command ; $72 moveobject: MACRO @@ -730,19 +730,19 @@ moveobject: MACRO db \1 ; object id db \2 ; x db \3 ; y - endm +ENDM enum writeobjectxy_command ; $73 writeobjectxy: MACRO db writeobjectxy_command db \1 ; object id - endm +ENDM enum loademote_command ; $74 loademote: MACRO db loademote_command db \1 ; bubble - endm +ENDM enum showemote_command ; $75 showemote: MACRO @@ -750,34 +750,34 @@ showemote: MACRO db \1 ; bubble db \2 ; object id db \3 ; time - endm +ENDM enum spriteface_command ; $76 spriteface: MACRO db spriteface_command db \1 ; object id db \2 ; facing - endm +ENDM enum follownotexact_command ; $77 follownotexact: MACRO db follownotexact_command db \1 ; object2 db \2 ; object1 - endm +ENDM enum earthquake_command ; $78 earthquake: MACRO db earthquake_command db \1 ; param - endm +ENDM enum changemap_command ; $79 changemap: MACRO db changemap_command db \1 ; map_bank dw \2 ; map_data_pointer - endm +ENDM enum changeblock_command ; $7a changeblock: MACRO @@ -785,205 +785,205 @@ changeblock: MACRO db \1 ; x db \2 ; y db \3 ; block - endm +ENDM enum reloadmap_command ; $7b reloadmap: MACRO db reloadmap_command - endm +ENDM enum reloadmappart_command ; $7c reloadmappart: MACRO db reloadmappart_command - endm +ENDM enum writecmdqueue_command ; $7d writecmdqueue: MACRO db writecmdqueue_command dw \1 ; queue_pointer - endm +ENDM enum delcmdqueue_command ; $7e delcmdqueue: MACRO db delcmdqueue_command db \1 ; byte - endm +ENDM enum playmusic_command ; $7f playmusic: MACRO db playmusic_command dw \1 ; music_pointer - endm +ENDM enum encountermusic_command ; $80 encountermusic: MACRO db encountermusic_command - endm +ENDM enum musicfadeout_command ; $81 musicfadeout: MACRO db musicfadeout_command dw \1 ; music db \2 ; fadetime - endm +ENDM enum playmapmusic_command ; $82 playmapmusic: MACRO db playmapmusic_command - endm +ENDM enum dontrestartmapmusic_command ; $83 dontrestartmapmusic: MACRO db dontrestartmapmusic_command - endm +ENDM enum cry_command ; $84 cry: MACRO db cry_command dw \1 ; cry_id - endm +ENDM enum playsound_command ; $85 playsound: MACRO db playsound_command dw \1 ; sound_pointer - endm +ENDM enum waitsfx_command ; $86 waitsfx: MACRO db waitsfx_command - endm +ENDM enum warpsound_command ; $87 warpsound: MACRO db warpsound_command - endm +ENDM enum specialsound_command ; $88 specialsound: MACRO db specialsound_command - endm +ENDM enum passtoengine_command ; $89 passtoengine: MACRO db passtoengine_command db \1 ; data_pointer - endm +ENDM enum newloadmap_command ; $8a newloadmap: MACRO db newloadmap_command db \1 ; which_method - endm +ENDM enum pause_command ; $8b pause: MACRO db pause_command db \1 ; length - endm +ENDM enum deactivatefacing_command ; $8c deactivatefacing: MACRO db deactivatefacing_command db \1 ; time - endm +ENDM enum priorityjump_command ; $8d priorityjump: MACRO db priorityjump_command dw \1 ; pointer - endm +ENDM enum warpcheck_command ; $8e warpcheck: MACRO db warpcheck_command - endm +ENDM enum ptpriorityjump_command ; $8f ptpriorityjump: MACRO db ptpriorityjump_command dw \1 ; pointer - endm +ENDM enum return_command ; $90 return: MACRO db return_command - endm +ENDM enum end_command ; $91 end: MACRO db end_command - endm +ENDM enum reloadandreturn_command ; $92 reloadandreturn: MACRO db reloadandreturn_command db \1 ; which_method - endm +ENDM enum end_all_command ; $93 end_all: MACRO db end_all_command - endm +ENDM enum pokemart_command ; $94 pokemart: MACRO db pokemart_command db \1 ; dialog_id dw \2 ; mart_id - endm +ENDM enum elevator_command ; $95 elevator: MACRO db elevator_command dw \1 ; floor_list_pointer - endm +ENDM enum trade_command ; $96 trade: MACRO db trade_command db \1 ; trade_id - endm +ENDM enum askforphonenumber_command ; $97 askforphonenumber: MACRO db askforphonenumber_command db \1 ; number - endm +ENDM enum phonecall_command ; $98 phonecall: MACRO db phonecall_command dw \1 ; caller_name - endm +ENDM enum hangup_command ; $99 hangup: MACRO db hangup_command - endm +ENDM enum describedecoration_command ; $9a describedecoration: MACRO db describedecoration_command db \1 ; byte - endm +ENDM enum fruittree_command ; $9b fruittree: MACRO db fruittree_command db \1 ; tree_id - endm +ENDM enum specialphonecall_command ; $9c specialphonecall: MACRO db specialphonecall_command dw \1 ; call_id - endm +ENDM enum checkphonecall_command ; $9d checkphonecall: MACRO db checkphonecall_command - endm +ENDM enum verbosegiveitem_command ; $9e verbosegiveitem: MACRO @@ -994,31 +994,31 @@ if _NARG == 2 else db 1 endc - endm +ENDM enum verbosegiveitem2_command ; $9f verbosegiveitem2: MACRO db verbosegiveitem2_command db \1 ; item db \2 ; var - endm +ENDM enum swarm_command ; $a0 swarm: MACRO db swarm_command db \1 ; flag map \2 ; map - endm +ENDM enum halloffame_command ; $a1 halloffame: MACRO db halloffame_command - endm +ENDM enum credits_command ; $a2 credits: MACRO db credits_command - endm +ENDM enum warpfacing_command ; $a3 warpfacing: MACRO @@ -1027,27 +1027,27 @@ warpfacing: MACRO map \2 ; map db \3 ; x db \4 ; y - endm +ENDM enum battletowertext_command ; $a4 battletowertext: MACRO db battletowertext_command db \1 ; memory - endm +ENDM enum landmarktotext_command ; $a5 landmarktotext: MACRO db landmarktotext_command db \1 ; id db \2 ; memory - endm +ENDM enum trainerclassname_command ; $a6 trainerclassname: MACRO db trainerclassname_command db \1 ; id db \2 ; memory - endm +ENDM enum name_command ; $a7 name: MACRO @@ -1055,15 +1055,15 @@ name: MACRO db \1 ; type db \2 ; id db \3 ; memory - endm +ENDM enum wait_command ; $a8 wait: MACRO db wait_command db \1 ; duration - endm +ENDM enum check_save_command ; $a9 check_save: MACRO db check_save_command - endm +ENDM diff --git a/macros/scripts/gfx_anims.asm b/macros/scripts/gfx_anims.asm index dddc43082..943a000a9 100644 --- a/macros/scripts/gfx_anims.asm +++ b/macros/scripts/gfx_anims.asm @@ -10,35 +10,35 @@ x = x | (1 << (\3 + 1)) endr endc db x - endm +ENDM enum_start $fc enum delanim_command ; $fc delanim: MACRO ; used for oam db delanim_command - endm +ENDM enum dorepeat_command ; $fd dorepeat: MACRO db dorepeat_command db \1 ; # - endm +ENDM enum setrepeat_command ; $fe setrepeat: MACRO db setrepeat_command db \1 ; # - endm +ENDM enum endanim_command ; $ff endanim: MACRO db endanim_command - endm +ENDM __enum__ = $fe enum dorestart_command ; $fe dorestart: MACRO ; used for oam db dorestart_command - endm +ENDM diff --git a/macros/scripts/maps.asm b/macros/scripts/maps.asm index 4d3744a38..6ab4a3f61 100644 --- a/macros/scripts/maps.asm +++ b/macros/scripts/maps.asm @@ -1,13 +1,13 @@ map: MACRO ;\1: map id db GROUP_\1, MAP_\1 -endm +ENDM scene_script: MACRO ;\1: script pointer dw \1, 0 -endm +ENDM warp_def: MACRO ;\1: y: top to bottom, starts at 0 @@ -16,7 +16,7 @@ warp_def: MACRO ;\4: map id: from constants/map_constants.asm db \1, \2, \3 map \4 -endm +ENDM coord_event: MACRO ;\1: scene id: controlled by setscene/setmapscene @@ -26,7 +26,7 @@ coord_event: MACRO db \1, \2, \3, $0 dw \4 db $0, $0 -endm +ENDM bg_event: MACRO ;\1: y: top to bottom, starts at 0 @@ -35,7 +35,7 @@ bg_event: MACRO ;\4: script pointer db \1, \2, \3 dw \4 -endm +ENDM object_event: MACRO ;\1: sprite: a SPRITE_* constant @@ -65,7 +65,7 @@ object_event: MACRO dw \9 shift dw \9 -endm +ENDM trainer: MACRO @@ -79,7 +79,7 @@ trainer: MACRO dw \1 db \2, \3 dw \4, \5, \6, \7 -endm +ENDM itemball: MACRO ;\1: item: from constants/item_constants.asm @@ -89,7 +89,7 @@ if _NARG == 2 else db \1, 1 endc -endm +ENDM elevfloor: MACRO ;\1: floor: a FLOOR_* constant @@ -105,4 +105,4 @@ stonetable: MACRO ;\3: script pointer db \1, \2 dw \3 -endm +ENDM diff --git a/macros/scripts/movement.asm b/macros/scripts/movement.asm index b78477739..451608723 100644 --- a/macros/scripts/movement.asm +++ b/macros/scripts/movement.asm @@ -6,98 +6,98 @@ enum movement_turn_head ; $00 turn_head: MACRO db movement_turn_head | \1 - endm +ENDM __enum__ = __enum__ + 3 enum movement_turn_step ; $04 turn_step: MACRO db movement_turn_step | \1 - endm +ENDM __enum__ = __enum__ + 3 enum movement_slow_step ; $08 slow_step: MACRO db movement_slow_step | \1 - endm +ENDM __enum__ = __enum__ + 3 enum movement_step ; $0c step: MACRO db movement_step | \1 - endm +ENDM __enum__ = __enum__ + 3 enum movement_big_step ; $10 big_step: MACRO db movement_big_step | \1 - endm +ENDM __enum__ = __enum__ + 3 enum movement_slow_slide_step ; $14 slow_slide_step: MACRO db movement_slow_slide_step | \1 - endm +ENDM __enum__ = __enum__ + 3 enum movement_slide_step ; $18 slide_step: MACRO db movement_slide_step | \1 - endm +ENDM __enum__ = __enum__ + 3 enum movement_fast_slide_step ; $1c fast_slide_step: MACRO db movement_fast_slide_step | \1 - endm +ENDM __enum__ = __enum__ + 3 enum movement_turn_away ; $20 turn_away: MACRO db movement_turn_away | \1 - endm +ENDM __enum__ = __enum__ + 3 enum movement_turn_in ; $24 turn_in: MACRO db movement_turn_in | \1 - endm +ENDM __enum__ = __enum__ + 3 enum movement_turn_waterfall ; $28 turn_waterfall: MACRO db movement_turn_waterfall | \1 - endm +ENDM __enum__ = __enum__ + 3 enum movement_slow_jump_step ; $2c slow_jump_step: MACRO db movement_slow_jump_step | \1 - endm +ENDM __enum__ = __enum__ + 3 enum movement_jump_step ; $30 jump_step: MACRO db movement_jump_step | \1 - endm +ENDM __enum__ = __enum__ + 3 enum movement_fast_jump_step ; $34 fast_jump_step: MACRO db movement_fast_jump_step | \1 - endm +ENDM __enum__ = __enum__ + 3 @@ -105,32 +105,32 @@ __enum__ = __enum__ + 3 enum movement_remove_sliding ; $38 remove_sliding: MACRO db movement_remove_sliding - endm +ENDM enum movement_set_sliding ; $39 set_sliding: MACRO db movement_set_sliding - endm +ENDM enum movement_remove_fixed_facing ; $3a remove_fixed_facing: MACRO db movement_remove_fixed_facing - endm +ENDM enum movement_fix_facing ; $3b fix_facing: MACRO db movement_fix_facing - endm +ENDM enum movement_show_object ; $3c show_object: MACRO db movement_show_object - endm +ENDM enum movement_hide_object ; $3d hide_object: MACRO db movement_hide_object - endm +ENDM ; Sleep @@ -141,106 +141,106 @@ if \1 <= 8 else db movement_step_sleep + 8, \1 endc -endm +ENDM __enum__ = __enum__ + 8 enum movement_step_end ; $47 step_end: MACRO db movement_step_end - endm +ENDM enum movement_step_48 ; $48 step_48: MACRO db movement_step_48 db \1 ; ??? - endm +ENDM enum movement_remove_object ; $49 remove_object: MACRO db movement_remove_object - endm +ENDM enum movement_step_loop ; $4a step_loop: MACRO db movement_step_loop - endm +ENDM enum movement_step_4b ; $4b step_4b: MACRO db movement_step_4b - endm +ENDM enum movement_teleport_from ; $4c teleport_from: MACRO db movement_teleport_from - endm +ENDM enum movement_teleport_to ; $4d teleport_to: MACRO db movement_teleport_to - endm +ENDM enum movement_skyfall ; $4e skyfall: MACRO db movement_skyfall - endm +ENDM enum movement_step_dig ; $4f step_dig: MACRO db movement_step_dig db \1 ; length - endm +ENDM enum movement_step_bump ; $50 step_bump: MACRO db movement_step_bump - endm +ENDM enum movement_fish_got_bite ; $51 fish_got_bite: MACRO db movement_fish_got_bite - endm +ENDM enum movement_fish_cast_rod ; $52 fish_cast_rod: MACRO db movement_fish_cast_rod - endm +ENDM enum movement_hide_emote ; $53 hide_emote: MACRO db movement_hide_emote - endm +ENDM enum movement_show_emote ; $54 show_emote: MACRO db movement_show_emote - endm +ENDM enum movement_step_shake ; $55 step_shake: MACRO db movement_step_shake db \1 ; displacement - endm +ENDM enum movement_tree_shake ; $56 tree_shake: MACRO db movement_tree_shake - endm +ENDM enum movement_rock_smash ; $57 rock_smash: MACRO db movement_rock_smash db \1 ; length - endm +ENDM enum movement_return_dig ; $58 return_dig: MACRO db movement_return_dig db \1 ; length - endm +ENDM enum movement_skyfall_top ; $59 skyfall_top: MACRO db movement_skyfall_top - endm +ENDM diff --git a/macros/scripts/text.asm b/macros/scripts/text.asm index d84b5fcbc..f22f83551 100644 --- a/macros/scripts/text.asm +++ b/macros/scripts/text.asm @@ -14,120 +14,120 @@ prompt EQUS "db \"<PROMPT>\"" ; Prompt the player to end a text box (initiating text_from_ram: MACRO db TX_RAM dw \1 - ENDM +ENDM enum TX_BCD ; $02 text_bcd: MACRO db TX_BCD dw \1 db \2 - ENDM +ENDM enum TX_MOVE ; $03 text_move: MACRO db TX_MOVE dw \1 - ENDM +ENDM enum TX_BOX ; $04 text_box: MACRO db TX_BOX dw \1 db \2, \3 - ENDM +ENDM enum TX_LOW ; $05 text_low: MACRO db TX_LOW - endm +ENDM enum WAIT_BUTTON ; $06 text_waitbutton: MACRO db WAIT_BUTTON - endm +ENDM enum TX_SCROLL ; $07 text_scroll: MACRO db TX_SCROLL - endm +ENDM enum START_ASM ; $08 start_asm: MACRO db START_ASM - endm +ENDM enum TX_NUM ; $09 deciram: MACRO db TX_NUM dw \1 ; address dn \2, \3 ; bytes, digits - endm +ENDM enum TX_EXIT ; $0a interpret_data: MACRO db TX_EXIT - endm +ENDM enum TX_SOUND_0B ; $0b sound_dex_fanfare_50_79: MACRO db TX_SOUND_0B - endm +ENDM enum TX_DOTS ; $0c limited_interpret_data: MACRO db TX_DOTS db \1 - endm +ENDM enum TX_LINK_WAIT_BUTTON ; $0d link_wait_button: MACRO db TX_LINK_WAIT_BUTTON - endm +ENDM enum TX_SOUND_0E ; $0e sound_dex_fanfare_20_49: MACRO db TX_SOUND_0E - endm +ENDM enum TX_SOUND_0F ; $0f sound_item: MACRO db TX_SOUND_0F - endm +ENDM enum TX_SOUND_10 ; $10 sound_caught_mon: MACRO db TX_SOUND_10 - endm +ENDM enum TX_SOUND_11 ; $11 sound_dex_fanfare_80_109: MACRO db TX_SOUND_11 - endm +ENDM enum TX_SOUND_12 ; $12 sound_fanfare: MACRO db TX_SOUND_12 - endm +ENDM enum TX_SOUND_13 ; $13 sound_slot_machine_start: MACRO db TX_SOUND_13 - endm +ENDM enum TX_STRINGBUFFER ; $14 text_buffer: MACRO db TX_STRINGBUFFER db \1 - endm +ENDM enum TX_DAY ; $15 current_day: MACRO db TX_DAY - endm +ENDM enum TX_FAR ; $16 text_jump: MACRO db TX_FAR dw \1 db BANK(\1) - ENDM +ENDM diff --git a/macros/scripts/trade_anims.asm b/macros/scripts/trade_anims.asm index a292d6df5..94c9070aa 100644 --- a/macros/scripts/trade_anims.asm +++ b/macros/scripts/trade_anims.asm @@ -4,167 +4,167 @@ enum tradeanim_next_command ; $00 tradeanim_next: MACRO db tradeanim_next_command -endm +ENDM enum tradeanim_show_givemon_data_command ; $01 tradeanim_show_givemon_data: MACRO db tradeanim_show_givemon_data_command -endm +ENDM enum tradeanim_show_getmon_data_command ; $02 tradeanim_show_getmon_data: MACRO db tradeanim_show_getmon_data_command -endm +ENDM enum tradeanim_enter_link_tube_command ; $03 tradeanim_enter_link_tube: MACRO db tradeanim_enter_link_tube_command -endm +ENDM __enum__ set $5 enum tradeanim_exit_link_tube_command ; $05 tradeanim_exit_link_tube: MACRO db tradeanim_exit_link_tube_command -endm +ENDM enum tradeanim_tube_to_ot_command ; $06 tradeanim_tube_to_ot: MACRO db tradeanim_tube_to_ot_command -endm +ENDM __enum__ set $0e enum tradeanim_tube_to_player_command ; $0e tradeanim_tube_to_player: MACRO db tradeanim_tube_to_player_command -endm +ENDM __enum__ set $16 enum tradeanim_sent_to_ot_text_command ; $16 tradeanim_sent_to_ot_text: MACRO db tradeanim_sent_to_ot_text_command -endm +ENDM enum tradeanim_ot_bids_farewell_command ; $17 tradeanim_ot_bids_farewell: MACRO db tradeanim_ot_bids_farewell_command -endm +ENDM enum tradeanim_take_care_of_text_command ; $18 tradeanim_take_care_of_text: MACRO db tradeanim_take_care_of_text_command -endm +ENDM enum tradeanim_ot_sends_text_1_command ; $19 tradeanim_ot_sends_text_1: MACRO db tradeanim_ot_sends_text_1_command -endm +ENDM enum tradeanim_ot_sends_text_2_command ; $1a tradeanim_ot_sends_text_2: MACRO db tradeanim_ot_sends_text_2_command -endm +ENDM enum tradeanim_setup_givemon_scroll_command ; $1b tradeanim_setup_givemon_scroll: MACRO db tradeanim_setup_givemon_scroll_command -endm +ENDM enum tradeanim_do_givemon_scroll_command ; $1c tradeanim_do_givemon_scroll: MACRO db tradeanim_do_givemon_scroll_command -endm +ENDM enum tradeanim_frontpic_scroll_command ; $1d tradeanim_frontpic_scroll: MACRO db tradeanim_frontpic_scroll_command -endm +ENDM enum tradeanim_textbox_scroll_command ; $1e tradeanim_textbox_scroll: MACRO db tradeanim_textbox_scroll_command -endm +ENDM enum tradeanim_scroll_out_right_command ; $1f tradeanim_scroll_out_right: MACRO db tradeanim_scroll_out_right_command -endm +ENDM __enum__ set $21 enum tradeanim_wait_80_command ; $21 tradeanim_wait_80: MACRO db tradeanim_wait_80_command -endm +ENDM enum tradeanim_wait_40_command ; $22 tradeanim_wait_40: MACRO db tradeanim_wait_40_command -endm +ENDM enum tradeanim_rocking_ball_command ; $23 tradeanim_rocking_ball: MACRO db tradeanim_rocking_ball_command -endm +ENDM enum tradeanim_drop_ball_command ; $24 tradeanim_drop_ball: MACRO db tradeanim_drop_ball_command -endm +ENDM enum tradeanim_wait_anim_command ; $25 tradeanim_wait_anim: MACRO db tradeanim_wait_anim_command -endm +ENDM __enum__ set $27 enum tradeanim_poof_command ; $27 tradeanim_poof: MACRO db tradeanim_poof_command -endm +ENDM enum tradeanim_bulge_through_tube_command ; $28 tradeanim_bulge_through_tube: MACRO db tradeanim_bulge_through_tube_command -endm +ENDM enum tradeanim_give_trademon_sfx_command ; $29 tradeanim_give_trademon_sfx: MACRO db tradeanim_give_trademon_sfx_command -endm +ENDM enum tradeanim_get_trademon_sfx_command ; $2a tradeanim_get_trademon_sfx: MACRO db tradeanim_get_trademon_sfx_command -endm +ENDM enum tradeanim_end_command ; $2b tradeanim_end: MACRO db tradeanim_end_command -endm +ENDM enum tradeanim_animate_frontpic_command ; $2c tradeanim_animate_frontpic: MACRO db tradeanim_animate_frontpic_command -endm +ENDM enum tradeanim_wait_96_command ; $2d tradeanim_wait_96: MACRO db tradeanim_wait_96_command -endm +ENDM enum tradeanim_wait_80_if_ot_egg_command ; $2e tradeanim_wait_80_if_ot_egg: MACRO db tradeanim_wait_80_if_ot_egg_command -endm +ENDM enum tradeanim_wait_180_if_ot_egg_command ; $2f tradeanim_wait_180_if_ot_egg: MACRO db tradeanim_wait_180_if_ot_egg_command -endm +ENDM ; Mobile @@ -173,83 +173,83 @@ endm enum mobiletradeanim_showgivemon_command ; $01 mobiletradeanim_showgivemon: MACRO db mobiletradeanim_showgivemon_command -endm +ENDM enum mobiletradeanim_02_command ; $02 mobiletradeanim_02: MACRO db mobiletradeanim_02_command -endm +ENDM enum mobiletradeanim_sendmon_command ; $03 mobiletradeanim_sendmon: MACRO db mobiletradeanim_sendmon_command -endm +ENDM __enum__ set $05 enum mobiletradeanim_05_command ; $05 mobiletradeanim_05: MACRO db mobiletradeanim_05_command -endm +ENDM enum mobiletradeanim_06_command ; $06 mobiletradeanim_06: MACRO db mobiletradeanim_06_command -endm +ENDM enum mobiletradeanim_07_command ; $07 mobiletradeanim_07: MACRO db mobiletradeanim_07_command -endm +ENDM enum mobiletradeanim_receivemon_command ; $08 mobiletradeanim_receivemon: MACRO db mobiletradeanim_receivemon_command -endm +ENDM __enum__ set $0b enum mobiletradeanim_showgetmon_command ; $0b mobiletradeanim_showgetmon: MACRO db mobiletradeanim_showgetmon_command -endm +ENDM enum mobiletradeanim_end_command ; $0c mobiletradeanim_end: MACRO db mobiletradeanim_end_command -endm +ENDM enum mobiletradeanim_showgtsgivemon_command ; $0d mobiletradeanim_showgtsgivemon: MACRO db mobiletradeanim_showgtsgivemon_command -endm +ENDM enum mobiletradeanim_showgtsgetmon_command ; $0e mobiletradeanim_showgtsgetmon: MACRO db mobiletradeanim_showgtsgetmon_command -endm +ENDM enum mobiletradeanim_0f_command ; $0f mobiletradeanim_0f: MACRO db mobiletradeanim_0f_command -endm +ENDM enum mobiletradeanim_10_command ; $10 mobiletradeanim_10: MACRO db mobiletradeanim_10_command -endm +ENDM enum mobiletradeanim_11_command ; $11 mobiletradeanim_11: MACRO db mobiletradeanim_11_command -endm +ENDM enum mobiletradeanim_12_command ; $12 mobiletradeanim_12: MACRO db mobiletradeanim_12_command -endm +ENDM enum mobiletradeanim_showoddegg_command ; $13 mobiletradeanim_showoddegg: MACRO db mobiletradeanim_showoddegg_command -endm +ENDM diff --git a/macros/tilesets.asm b/macros/tilesets.asm index aeb1d8174..4aeb38dc5 100755 --- a/macros/tilesets.asm +++ b/macros/tilesets.asm @@ -8,8 +8,8 @@ rept (_NARG +- 1) / 2 shift shift endr -endm +ENDM tilecoll: MACRO db COLL_\1, COLL_\2, COLL_\3, COLL_\4 -endm +ENDM diff --git a/macros/wram.asm b/macros/wram.asm index 90cd8cff0..f4a08c3a3 100755 --- a/macros/wram.asm +++ b/macros/wram.asm @@ -189,7 +189,7 @@ battle_tower_struct: MACRO \1Pkmn3NameEnd:: \1TrainerData:: ds BATTLETOWER_TRAINERDATALENGTH \1TrainerEnd:: -endm +ENDM mailmsg: MACRO \1Message:: ds MAIL_MSG_LENGTH @@ -200,7 +200,7 @@ mailmsg: MACRO \1Species:: db \1Type:: db \1End:: -endm +ENDM roam_struct: MACRO \1Species:: db @@ -215,7 +215,7 @@ bugcontestwinner: MACRO \1WinnerID:: db \1Mon:: db \1Score:: dw -endm +ENDM hof_mon: MACRO \1Species:: db @@ -224,7 +224,7 @@ hof_mon: MACRO \1Level:: db \1Nickname:: ds PKMN_NAME_LENGTH +- 1 \1End:: -endm +ENDM hall_of_fame: MACRO \1WinCount:: db @@ -265,7 +265,7 @@ move_struct: MACRO \1Accuracy:: db \1PP:: db \1EffectChance:: db -endm +ENDM slot_reel: MACRO \1ReelAction:: db @@ -282,7 +282,7 @@ slot_reel: MACRO \1Slot0d:: ds 1 \1Slot0e:: ds 1 \1StopDelay:: db -endm +ENDM object_struct: MACRO \1Struct:: @@ -337,7 +337,7 @@ map_object: MACRO \1ObjectScript:: dw \1ObjectEventFlag:: dw ds 2 -endm +ENDM sprite_anim_struct: MACRO \1Index:: db @@ -384,11 +384,11 @@ battle_anim_struct: MACRO \1_Anim15:: ds 1 \1_Anim16:: ds 1 \1_Anim17:: ds 1 -endm +ENDM battle_bg_effect: MACRO \1_Function:: db \1_01:: ds 1 \1_02:: ds 1 \1_03:: ds 1 -endm +ENDM diff --git a/maps/GoldenrodUndergroundSwitchRoomEntrances.asm b/maps/GoldenrodUndergroundSwitchRoomEntrances.asm index 747d86a3f..56213e6a8 100644 --- a/maps/GoldenrodUndergroundSwitchRoomEntrances.asm +++ b/maps/GoldenrodUndergroundSwitchRoomEntrances.asm @@ -7,7 +7,7 @@ UNDERGROUND_DOOR_OPEN2 EQU $3d ugdoor: MACRO \1_YCOORD EQU \2 \1_XCOORD EQU \3 -endm +ENDM ugdoor UGDOOR_1, $10, $06 ugdoor UGDOOR_2, $0a, $06 @@ -28,7 +28,7 @@ endm doorstate: MACRO changeblock UGDOOR_\1_YCOORD, UGDOOR_\1_XCOORD, UNDERGROUND_DOOR_\2 -endm +ENDM const_value set 2 const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_PHARMACIST1 diff --git a/maps/map_headers.asm b/maps/map_headers.asm index 62df15ec5..ac4b20ece 100644 --- a/maps/map_headers.asm +++ b/maps/map_headers.asm @@ -13,7 +13,7 @@ map_header: MACRO db \4, \5 dn \6, \7 db \8 -endm +ENDM MapGroupPointers:: ; pointers to the first map header of each map group diff --git a/maps/second_map_headers.asm b/maps/second_map_headers.asm index 03702b4bb..3628babd2 100644 --- a/maps/second_map_headers.asm +++ b/maps/second_map_headers.asm @@ -12,7 +12,7 @@ map_header_2: MACRO dw \1_MapScriptHeader dw \1_MapEventHeader db \4 -endm +ENDM connection: MACRO if "\1" == "north" @@ -82,7 +82,7 @@ if "\1" == "east" db 0 dw OverworldMap + \2_WIDTH + 7 endc -endm +ENDM map_header_2 NewBarkTown, NEW_BARK_TOWN, $5, WEST | EAST diff --git a/mobile/fixed_words.asm b/mobile/fixed_words.asm index 9dabb6ae3..b3f33fafe 100755 --- a/mobile/fixed_words.asm +++ b/mobile/fixed_words.asm @@ -4218,7 +4218,7 @@ if \1 % 12 == 0 x = x +- 1 endc db x -endm +ENDM macro_11f220 18 ; 01: Types macro_11f220 36 ; 02: Greetings macro_11f220 69 ; 03: People @@ -4243,7 +4243,7 @@ EZChat_SortedWords: macro_11f23c: MACRO dw x - w3_d000, \1 x = x + 2 * \1 -endm +ENDM x = $d012 macro_11f23c $2f ; a macro_11f23c $1e ; i diff --git a/tilesets/tilesets.asm b/tilesets/tilesets.asm index f71b71baa..06cbdb05d 100644 --- a/tilesets/tilesets.asm +++ b/tilesets/tilesets.asm @@ -3,7 +3,7 @@ tileset: MACRO dw \1Anim dw NULL dw \1PalMap -endm +ENDM Tilesets:: ; 4d596 ; entries correspond to TILESET_* constants |