diff --git a/Makefile b/Makefile index bbd9b63137..2229a5247e 100755 --- a/Makefile +++ b/Makefile @@ -13,6 +13,12 @@ else RGBDS_DIR = endif +ifeq ($(filter $(shell echo 'print __RGBDS_MAJOR__ || (!__RGBDS_MAJOR__ && __RGBDS_MINOR__ < 6)' | $(RGBDS_DIR)rgbasm -),$$0),) +RGBGFX_FLAGS := -h +else +RGBGFX_FLAGS := -Z +endif + RGBASM_FLAGS = -E -Weverything -Wnumeric-string=2 -Wtruncation=1 RGBLINK_FLAGS = -n $(ROM_NAME).sym -m $(ROM_NAME).map -l layout.link -p $(FILLER) RGBFIX_FLAGS = -csjv -t $(TITLE) -i $(MCODE) -n $(ROMVERSION) -p $(FILLER) -k 01 -l 0x33 -m 0x10 -r 3 @@ -119,7 +125,7 @@ endif cd bsp; ../tools/bspcomp patch.txt ../$@; cd .. -gfx/battle/lyra_back.2bpp: rgbgfx += -h +gfx/battle/lyra_back.2bpp: rgbgfx += $(RGBGFX_FLAGS) gfx/battle_anims/angels.2bpp: tools/gfx += --trim-whitespace gfx/battle_anims/beam.2bpp: tools/gfx += --remove-xflip --remove-yflip --remove-whitespace @@ -150,27 +156,27 @@ gfx/mail/surf_mail_border.1bpp: tools/gfx += --remove-whitespace gfx/music_player/music_player.2bpp: tools/gfx += --trim-whitespace gfx/music_player/note_lines.2bpp: tools/gfx += --interleave --png=$< -gfx/new_game/shrink1.2bpp: rgbgfx += -h -gfx/new_game/shrink2.2bpp: rgbgfx += -h +gfx/new_game/shrink1.2bpp: rgbgfx += $(RGBGFX_FLAGS) +gfx/new_game/shrink2.2bpp: rgbgfx += $(RGBGFX_FLAGS) gfx/overworld/overworld.2bpp: gfx/overworld/puddle_splash.2bpp gfx/overworld/cut_grass.2bpp gfx/overworld/cut_tree.2bpp gfx/overworld/heal_machine.2bpp gfx/overworld/fishing_rod.2bpp gfx/overworld/shadow.2bpp gfx/overworld/shaking_grass.2bpp gfx/overworld/boulder_dust.2bpp ; cat $^ > $@ gfx/pack/pack_left.2bpp: tools/gfx += --trim-whitespace gfx/pack/pack_top_left.2bpp: gfx/pack/pack_top.2bpp gfx/pack/pack_left.2bpp ; cat $^ > $@ -gfx/paintings/%.2bpp: rgbgfx += -h +gfx/paintings/%.2bpp: rgbgfx += $(RGBGFX_FLAGS) -gfx/player/chris_back.2bpp: rgbgfx += -h -gfx/player/kris_back.2bpp: rgbgfx += -h +gfx/player/chris_back.2bpp: rgbgfx += $(RGBGFX_FLAGS) +gfx/player/kris_back.2bpp: rgbgfx += $(RGBGFX_FLAGS) gfx/pokedex/pokedex.2bpp: tools/gfx += --trim-whitespace -gfx/pokedex/question_mark.2bpp: rgbgfx += -h +gfx/pokedex/question_mark.2bpp: rgbgfx += $(RGBGFX_FLAGS) gfx/pokedex/slowpoke.2bpp: tools/gfx += --trim-whitespace gfx/pokegear/pokegear.2bpp: tools/gfx += --trim-whitespace gfx/pokegear/pokegear_sprites.2bpp: tools/gfx += --trim-whitespace -gfx/pokemon/%/back.2bpp: rgbgfx += -h +gfx/pokemon/%/back.2bpp: rgbgfx += $(RGBGFX_FLAGS) gfx/pc/obj.2bpp: gfx/pc/modes.2bpp gfx/pc/bags.2bpp ; cat $^ > $@ @@ -190,10 +196,10 @@ gfx/trade/ball_poof_cable.2bpp: gfx/trade/ball.2bpp gfx/trade/poof.2bpp gfx/trad gfx/trade/game_boy_cable.2bpp: gfx/trade/game_boy.2bpp gfx/trade/link_cable.2bpp ; cat $^ > $@ gfx/trade/trade_screen.2bpp: gfx/trade/border.2bpp gfx/trade/textbox.2bpp ; cat $^ > $@ -gfx/trainer_card/chris_card.2bpp: rgbgfx += -h -gfx/trainer_card/kris_card.2bpp: rgbgfx += -h +gfx/trainer_card/chris_card.2bpp: rgbgfx += $(RGBGFX_FLAGS) +gfx/trainer_card/kris_card.2bpp: rgbgfx += $(RGBGFX_FLAGS) -gfx/trainers/%.2bpp: rgbgfx += -h +gfx/trainers/%.2bpp: rgbgfx += $(RGBGFX_FLAGS) gfx/type_chart/bg.2bpp: tools/gfx += --remove-duplicates --remove-xflip --remove-yflip gfx/type_chart/bg0.2bpp: gfx/type_chart/bg.2bpp.vram1p gfx/type_chart/bg.2bpp.vram0p ; cat $^ > $@ diff --git a/audio/alternate_music.asm b/audio/alternate_music.asm index 44340bffbd..4b74c2eaac 100644 --- a/audio/alternate_music.asm +++ b/audio/alternate_music.asm @@ -1,4 +1,4 @@ -alternate_music: MACRO +MACRO alternate_music ; pointer, bitmask, unset music id, set music id dw \1 db \2, \3, \4 diff --git a/audio/music_player.asm b/audio/music_player.asm index 6ab6d98088..97c8d396d7 100644 --- a/audio/music_player.asm +++ b/audio/music_player.asm @@ -19,21 +19,21 @@ INCBIN "gfx/music_player/note_lines.2bpp.lz" SECTION "Music Player", ROMX -jrbutton: MACRO +MACRO jrbutton ; assumes hl == hJoyPressed ld a, [hl] and \1 jr nz, \2 ENDM -jpbutton: MACRO +MACRO jpbutton ; assumes hl == hJoyPressed ld a, [hl] and \1 jmp nz, \2 ENDM -jrheldbutton: MACRO +MACRO jrheldbutton ; assumes hl == hJoyDown ld a, [wTextDelayFrames] and a @@ -47,7 +47,7 @@ jrheldbutton: MACRO .no\@: ENDM -jpheldbutton: MACRO +MACRO jpheldbutton ; assumes hl == hJoyDown ld a, [wTextDelayFrames] and a diff --git a/charmap.asm b/charmap.asm index 432b1d1a8f..9d474544a2 100644 --- a/charmap.asm +++ b/charmap.asm @@ -300,7 +300,7 @@ NGRAMS_END EQU $52 setcharmap default -rawchar: MACRO +MACRO rawchar setcharmap no_ngrams db \# setcharmap default diff --git a/constants/deco_constants.asm b/constants/deco_constants.asm index 259869b8d8..f9eb1904ca 100644 --- a/constants/deco_constants.asm +++ b/constants/deco_constants.asm @@ -68,7 +68,7 @@ NUM_DECO_ACTIONS EQU const_value - 1 __deco_value__ = 0 -deco: MACRO +MACRO deco const DECO_\1 DECOFLAG_\1 EQU __deco_value__ __deco_value__ += 1 diff --git a/constants/map_constants.asm b/constants/map_constants.asm index 330422c36d..fc8e081de8 100644 --- a/constants/map_constants.asm +++ b/constants/map_constants.asm @@ -1,9 +1,9 @@ -newgroup: MACRO +MACRO newgroup const_value += 1 __map_value__ = 1 ENDM -map_const: MACRO +MACRO map_const ;\1: map id ;\2: width: in blocks ;\3: height: in blocks diff --git a/constants/pokemon_constants.asm b/constants/pokemon_constants.asm index 277d3f483f..8067b216f8 100644 --- a/constants/pokemon_constants.asm +++ b/constants/pokemon_constants.asm @@ -285,7 +285,7 @@ CANCEL EQU -1 ; - CosmeticSpeciesAndFormTable (see data/pokemon/variant_forms.asm) ; - ValidVariantRanges (see data/pokemon/valid_variants.asm) -ext_const_def: MACRO +MACRO ext_const_def if _NARG >= 1 def ext_const_value = \1 else @@ -297,7 +297,7 @@ ext_const_def: MACRO endc ENDM -ext_const: MACRO +MACRO ext_const const_skip DEF \1 EQU ext_const_value redef ext_const_value += const_inc diff --git a/constants/tmhm_constants.asm b/constants/tmhm_constants.asm index 85e688055f..defa54714f 100644 --- a/constants/tmhm_constants.asm +++ b/constants/tmhm_constants.asm @@ -5,12 +5,12 @@ __tmhm_value__ = 1 -add_tmnum: MACRO +MACRO add_tmnum \1_TMNUM EQU __tmhm_value__ __tmhm_value__ += 1 ENDM -add_tm: MACRO +MACRO add_tm if !DEF(TM01) TM01 = const_value endc @@ -99,7 +99,7 @@ endc add_tm SWORDS_DANCE ; $4a NUM_TMS = __tmhm_value__ - 1 -add_hm: MACRO +MACRO add_hm if !DEF(HM01) HM01 = const_value endc @@ -115,7 +115,7 @@ ENDM add_hm WATERFALL ; $50 NUM_HMS = __tmhm_value__ - NUM_TMS - 1 -add_mt: MACRO +MACRO add_mt if !DEF(MT01) MT01 = const_value endc diff --git a/constants/trainer_constants.asm b/constants/trainer_constants.asm index 837737b784..c02f8c5a43 100644 --- a/constants/trainer_constants.asm +++ b/constants/trainer_constants.asm @@ -1,6 +1,6 @@ __trainer_class__ = 0 -trainerclass: MACRO +MACRO trainerclass \1 EQU __trainer_class__ __trainer_class__ += 1 const_def 1 diff --git a/data/battle/effect_command_pointers.asm b/data/battle/effect_command_pointers.asm index 1db6509df9..7f2e450019 100644 --- a/data/battle/effect_command_pointers.asm +++ b/data/battle/effect_command_pointers.asm @@ -1,16 +1,16 @@ -command: MACRO +MACRO command const \1_command \1 EQUS "db \1_command" dw BattleCommand_\1 ENDM -commandx: MACRO +MACRO commandx const \1_command \1 EQUS "db \1_command," dw BattleCommand_\1 ENDM -commandonly: MACRO +MACRO commandonly const \1_command \1 EQUS "db \1_command" ENDM diff --git a/data/battle_anims/oam.asm b/data/battle_anims/oam.asm index 513d7012f4..b5af3a8c13 100755 --- a/data/battle_anims/oam.asm +++ b/data/battle_anims/oam.asm @@ -1,4 +1,4 @@ -battleanimoam: MACRO +MACRO battleanimoam db \1 ; vtile offset db \2 ; data length dw \3 ; data pointer diff --git a/data/battle_anims/object_gfx.asm b/data/battle_anims/object_gfx.asm index 740c29a666..8770d85bf6 100755 --- a/data/battle_anims/object_gfx.asm +++ b/data/battle_anims/object_gfx.asm @@ -1,4 +1,4 @@ -anim_obj_gfx: MACRO +MACRO anim_obj_gfx ; # tiles, label db \1 dba \2 diff --git a/data/battle_anims/objects.asm b/data/battle_anims/objects.asm index 3b3c9be295..545099544e 100755 --- a/data/battle_anims/objects.asm +++ b/data/battle_anims/objects.asm @@ -1,7 +1,7 @@ ABSOLUTE_X EQU $00 RELATIVE_X EQU $01 -battleanimobj: MACRO +MACRO battleanimobj db \1 ; flags ; bit 7: priority ; bit 6: y flip (for enemy) diff --git a/data/decorations/attributes.asm b/data/decorations/attributes.asm index b8ce32021d..8b656ee151 100644 --- a/data/decorations/attributes.asm +++ b/data/decorations/attributes.asm @@ -1,4 +1,4 @@ -decoration: MACRO +MACRO decoration ; type, name, command, event flag, tile/sprite db \1, \2, \3 dw \4 diff --git a/data/events/engine_flags.asm b/data/events/engine_flags.asm index c2c510f491..5392f49ebb 100644 --- a/data/events/engine_flags.asm +++ b/data/events/engine_flags.asm @@ -1,4 +1,4 @@ -engine_flag: MACRO +MACRO engine_flag ; location, bit ; (all locations are in WRAM bank 1) dwb \1 + (\2 / 8), 1 << (\2 % 8) diff --git a/data/events/odd_eggs.asm b/data/events/odd_eggs.asm index 0e09a611ee..f48b81cd2f 100644 --- a/data/events/odd_eggs.asm +++ b/data/events/odd_eggs.asm @@ -1,7 +1,7 @@ NUM_ODD_EGGS EQU 5 ODD_EGG_LENGTH EQU 10 -prob: MACRO +MACRO prob prob_total += \1 dw prob_total * $ffff / 100 ENDM diff --git a/data/events/special_pointers.asm b/data/events/special_pointers.asm index 0532b8eeb2..d8da41b0b8 100644 --- a/data/events/special_pointers.asm +++ b/data/events/special_pointers.asm @@ -1,4 +1,4 @@ -add_special: MACRO +MACRO add_special \1Special:: dba \1 ENDM diff --git a/data/growth_rates.asm b/data/growth_rates.asm index 2765176f42..4c1e1155c5 100644 --- a/data/growth_rates.asm +++ b/data/growth_rates.asm @@ -1,4 +1,4 @@ -growth_rate: MACRO +MACRO growth_rate ; [1]/[2]*n**3 + [3]*n**2 + [4]*n - [5] dn \1, \2 if \3 < 0 diff --git a/data/items/attributes.asm b/data/items/attributes.asm index 1bace67f92..4721e442c3 100644 --- a/data/items/attributes.asm +++ b/data/items/attributes.asm @@ -1,4 +1,4 @@ -item_attribute: MACRO +MACRO item_attribute ; price, held effect, parameter, pocket, field menu, battle menu dw \1 db \2, \3, \4 @@ -517,7 +517,7 @@ ItemAttributes: item_attribute 50, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE assert_table_length NUM_ITEMS -key_item_attribute: MACRO +MACRO key_item_attribute ; selectable, field menu, battle menu db \1 dn \2, \3 diff --git a/data/items/mom_phone.asm b/data/items/mom_phone.asm index b1a314b701..9288f2b8f0 100644 --- a/data/items/mom_phone.asm +++ b/data/items/mom_phone.asm @@ -1,4 +1,4 @@ -momitem: MACRO +MACRO momitem ; money to trigger, cost, kind, item dt \1 dt \2 diff --git a/data/maps/attributes.asm b/data/maps/attributes.asm index c95a07e6b4..53a480fc75 100644 --- a/data/maps/attributes.asm +++ b/data/maps/attributes.asm @@ -1,4 +1,4 @@ -map_attributes: MACRO +MACRO map_attributes ; label, map, border block, connections CURRENT_MAP_WIDTH = \2_WIDTH CURRENT_MAP_HEIGHT = \2_HEIGHT @@ -13,7 +13,7 @@ CURRENT_MAP_HEIGHT = \2_HEIGHT ENDM ; Connections go in order: north, south, west, east -connection: MACRO +MACRO connection ;\1: direction ;\2: map name ;\3: map id diff --git a/data/maps/landmarks.asm b/data/maps/landmarks.asm index a29de89c18..8f12caff35 100644 --- a/data/maps/landmarks.asm +++ b/data/maps/landmarks.asm @@ -1,4 +1,4 @@ -landmark: MACRO +MACRO landmark db \1, \2 dw \3 ENDM diff --git a/data/maps/maps.asm b/data/maps/maps.asm index fb33eba7c0..20b636af6c 100644 --- a/data/maps/maps.asm +++ b/data/maps/maps.asm @@ -1,4 +1,4 @@ -map: MACRO +MACRO map ;\1: map name: for the MapAttributes pointer (see data/maps/attributes.asm) ;\2: tileset: a TILESET_* constant ;\3: environment: TOWN, ROUTE, INDOOR, CAVE, ENVIRONMENT_5, GATE, or DUNGEON diff --git a/data/maps/palettes.asm b/data/maps/palettes.asm index afab44ab34..18801e24c9 100644 --- a/data/maps/palettes.asm +++ b/data/maps/palettes.asm @@ -1,4 +1,4 @@ -special_pal_for: MACRO +MACRO special_pal_for if !STRCMP("\1", "map") db PAL_FOR_MAP map_id \2 ; map id @@ -16,7 +16,7 @@ endc ENDM SpecialBGPalettes: -special_bg_pal: MACRO +MACRO special_bg_pal special_pal_for \1, \2 db \3 ; type dw \4 ; source @@ -94,7 +94,7 @@ ENDM db 0 ; end SpecialOBPalettes: -special_ob_pal: MACRO +MACRO special_ob_pal special_pal_for \1, \2 dw \3 ; source if _NARG == 6 diff --git a/data/maps/scenes.asm b/data/maps/scenes.asm index 6b7020d77b..ac54a9d77a 100644 --- a/data/maps/scenes.asm +++ b/data/maps/scenes.asm @@ -1,4 +1,4 @@ -scene_var: MACRO +MACRO scene_var ; db group, map ; dw address map_id \1 diff --git a/data/maps/setup_script_pointers.asm b/data/maps/setup_script_pointers.asm index 7f64cb743f..db7223410b 100644 --- a/data/maps/setup_script_pointers.asm +++ b/data/maps/setup_script_pointers.asm @@ -1,4 +1,4 @@ -add_mapsetup: MACRO +MACRO add_mapsetup \1_MapSetupCmd: dba \1 ENDM diff --git a/data/maps/setup_scripts.asm b/data/maps/setup_scripts.asm index defc217f1e..43e318a4e5 100644 --- a/data/maps/setup_scripts.asm +++ b/data/maps/setup_scripts.asm @@ -16,7 +16,7 @@ MapSetupScripts: assert_table_length NUM_MAPSETUP_SCRIPTS ; valid commands are listed in MapSetupCommands (see data/maps/setup_script_pointers.asm) -mapsetup: MACRO +MACRO mapsetup db (\1_MapSetupCmd - MapSetupCommands) / 3 ENDM diff --git a/data/maps/spawn_points.asm b/data/maps/spawn_points.asm index 99a1051f11..6263e7f649 100644 --- a/data/maps/spawn_points.asm +++ b/data/maps/spawn_points.asm @@ -1,4 +1,4 @@ -spawn: MACRO +MACRO spawn ; map, y, x map_id \1 db \2, \3 diff --git a/data/maps/special_music.asm b/data/maps/special_music.asm index 82e6afd386..907d5ebd66 100644 --- a/data/maps/special_music.asm +++ b/data/maps/special_music.asm @@ -1,7 +1,7 @@ ; Functions are defined in home/audio.asm. ; Specifying GetMapMusic makes the Bicycle music not play. -music_map: MACRO +MACRO music_map map_id \1 dw \2 ENDM diff --git a/data/moves/moves.asm b/data/moves/moves.asm index 02f9927acf..03b4ce1168 100644 --- a/data/moves/moves.asm +++ b/data/moves/moves.asm @@ -1,4 +1,4 @@ -move: MACRO +MACRO move db \1 ; animation db \2 ; effect db \3 ; power diff --git a/data/music_player/song_info.asm b/data/music_player/song_info.asm index 49de1a24fe..5ea4bdb4ed 100644 --- a/data/music_player/song_info.asm +++ b/data/music_player/song_info.asm @@ -1,4 +1,4 @@ -song_info: MACRO +MACRO song_info li \1 db \2, \3, \4 ENDM diff --git a/data/party_menu_qualities.asm b/data/party_menu_qualities.asm index b62aec3ca9..28a3615d12 100644 --- a/data/party_menu_qualities.asm +++ b/data/party_menu_qualities.asm @@ -10,7 +10,7 @@ const PLACE_PARTYMON_RELEARNER const PLACE_PARTYMON_BATTLETOWER -partymenuqualities: MACRO +MACRO partymenuqualities for i, 1, _NARG + 1 db PLACE_PARTYMON_\ endr diff --git a/data/phone/phone_contacts.asm b/data/phone/phone_contacts.asm index b43c80d201..70ee905b76 100644 --- a/data/phone/phone_contacts.asm +++ b/data/phone/phone_contacts.asm @@ -1,4 +1,4 @@ -phone: MACRO +MACRO phone db \1, \2 ; trainer map_id \3 ; map db \4 diff --git a/data/phone/special_calls.asm b/data/phone/special_calls.asm index 9224f06315..b4c05630e9 100644 --- a/data/phone/special_calls.asm +++ b/data/phone/special_calls.asm @@ -1,4 +1,4 @@ -specialcall: MACRO +MACRO specialcall ; condition, contact, script dw \1 db \2 diff --git a/data/pokemon/base_stats.asm b/data/pokemon/base_stats.asm index 3dbe860d14..6c61f5d7ad 100644 --- a/data/pokemon/base_stats.asm +++ b/data/pokemon/base_stats.asm @@ -1,10 +1,10 @@ -ev_yield: MACRO +MACRO ev_yield ; hp, atk, def, spd, sat, sdf db (\1 << 6) | (\2 << 4) | (\3 << 2) | \4 db (\5 << 6) | (\6 << 4) ENDM -abilities_for: MACRO +MACRO abilities_for ; mon, ability1, ability2, hiddenability db \2, \3, \4 def ABIL_\1_\4 = HIDDEN_ABILITY @@ -12,7 +12,7 @@ abilities_for: MACRO def ABIL_\1_\2 = ABILITY_1 ENDM -tmhm: MACRO +MACRO tmhm ; initialize bytes to 0 for n, (NUM_TM_HM_TUTOR + 7) / 8 def _tm{d:n} = 0 diff --git a/data/pokemon/cries.asm b/data/pokemon/cries.asm index db1245f7c2..fab66a7c24 100644 --- a/data/pokemon/cries.asm +++ b/data/pokemon/cries.asm @@ -1,4 +1,4 @@ -mon_cry: MACRO +MACRO mon_cry ; index, pitch, length dw \1, \2, \3 ENDM diff --git a/data/pokemon/menu_icon_pals.asm b/data/pokemon/menu_icon_pals.asm index 728de41679..fc16be3242 100644 --- a/data/pokemon/menu_icon_pals.asm +++ b/data/pokemon/menu_icon_pals.asm @@ -1,4 +1,4 @@ -iconpal: MACRO +MACRO iconpal dn PAL_OW_\1, PAL_OW_\2 ENDM diff --git a/data/sprites/map_objects.asm b/data/sprites/map_objects.asm index 44a25bd7f3..e8f27b011e 100755 --- a/data/sprites/map_objects.asm +++ b/data/sprites/map_objects.asm @@ -1,4 +1,4 @@ -sprite_movement_data: MACRO +MACRO sprite_movement_data db \1, \2, \3, \4, \5 dn \6, 0 ENDM diff --git a/data/sprites/sprites.asm b/data/sprites/sprites.asm index 789b1a3e2c..b9464d09db 100644 --- a/data/sprites/sprites.asm +++ b/data/sprites/sprites.asm @@ -1,4 +1,4 @@ -overworld_sprite: MACRO +MACRO overworld_sprite ; pointer, bank, type, palette dab \1 db \2, \3 diff --git a/data/tilesets.asm b/data/tilesets.asm index cb84c659aa..aad49fad39 100644 --- a/data/tilesets.asm +++ b/data/tilesets.asm @@ -3,7 +3,7 @@ INCLUDE "constants.asm" SECTION "Tileset Headers", ROMX -tileset: MACRO +MACRO tileset dba \1GFX0, \1GFX1, \1GFX2 dba \1Meta, \1Coll, \1Attr dw \1Anim diff --git a/data/wild/fish.asm b/data/wild/fish.asm index ac5e65f819..b0a86a7b6a 100644 --- a/data/wild/fish.asm +++ b/data/wild/fish.asm @@ -1,4 +1,4 @@ -fishgroup: MACRO +MACRO fishgroup ; mon chance, mon/item chance, old rod, good rod, super rod db \1, \2 dw \3, \4, \5 diff --git a/data/wild/roammon_maps.asm b/data/wild/roammon_maps.asm index 18d6967925..8c542dc59a 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 +MACRO roam_map map_id \1 db _NARG - 1 for i, 2, _NARG + 1 diff --git a/data/wild/treemon_maps.asm b/data/wild/treemon_maps.asm index be6135e40c..1ce8b1d28e 100644 --- a/data/wild/treemon_maps.asm +++ b/data/wild/treemon_maps.asm @@ -1,4 +1,4 @@ -treemon_map: MACRO +MACRO treemon_map map_id \1 db \2 ; treemon set ENDM diff --git a/data/wild/unlocked_unowns.asm b/data/wild/unlocked_unowns.asm index 1ea92ee4db..3a1ede1945 100644 --- a/data/wild/unlocked_unowns.asm +++ b/data/wild/unlocked_unowns.asm @@ -1,4 +1,4 @@ -unown_set: MACRO +MACRO unown_set for i, 1, _NARG + 1 db UNOWN_\_FORM endr diff --git a/engine/battle/battle_transition.asm b/engine/battle/battle_transition.asm index fa8082bed0..b0dfe639e5 100644 --- a/engine/battle/battle_transition.asm +++ b/engine/battle/battle_transition.asm @@ -283,7 +283,7 @@ StartTrainerBattle_SetUpForSpinOutro: ld [wBattleTransitionCounter], a ret -spintable_entry: MACRO +MACRO spintable_entry db \1 dw .wedge\2 dw \4 * SCREEN_WIDTH + \3 + wAttrMap @@ -850,7 +850,7 @@ WipeLYOverrides: jr nz, .loop ret -zoombox: MACRO +MACRO zoombox ; width, height, start y, start x db \1, \2 dw \4 * SCREEN_WIDTH + \3 + wAttrMap diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 79e71bea79..593fa032a4 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -5883,7 +5883,7 @@ GenerateWildForm: ld [wCurForm], a jmp PopBCDEHL -random_wild_form: MACRO +MACRO random_wild_form if _NARG == 3 dp \1, \2 dw \3 diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm index dadc57f712..d6bdd4843a 100644 --- a/engine/battle/effect_commands.asm +++ b/engine/battle/effect_commands.asm @@ -5042,7 +5042,7 @@ DisplayStatusProblem: ld l, a jmp StdBattleTextbox -status_problem: MACRO +MACRO status_problem db \1 ; status mask dw \2 ; animation dw \3 ; text diff --git a/engine/battle_anims/bg_effects.asm b/engine/battle_anims/bg_effects.asm index e3bdf79e5f..92c1b5d675 100644 --- a/engine/battle_anims/bg_effects.asm +++ b/engine/battle_anims/bg_effects.asm @@ -778,7 +778,7 @@ BattleBGEffect_RunPicResizeScript: dwcoord 14, 4 .BGSquares: -bgsquare: MACRO +MACRO bgsquare dn \1,\2 dw \3 ENDM diff --git a/engine/events/judge_machine.asm b/engine/events/judge_machine.asm index 820dd124d4..b45e7ea83b 100644 --- a/engine/events/judge_machine.asm +++ b/engine/events/judge_machine.asm @@ -1038,22 +1038,22 @@ DrawRadarPointBC: ldh [hBitwiseOpcode], a jmp hBitwiseOperation -atk_y_coords: MACRO +MACRO atk_y_coords db 47, 46, 46, 45, 45, 44, 43, 43, 42, 42, 41, 40, 40, 39, 39, 38, 37, 37, 36, 36 db 35, 34, 34, 33, 33, 32, 31, 31, 30, 30, 29, 29, 28, 27, 27, 26, 26, 25, 25, 24 ENDM -def_y_coords: MACRO +MACRO def_y_coords db 48, 48, 49, 49, 50, 51, 51, 52, 52, 53, 53, 54, 55, 55, 56, 56, 57, 58, 58, 59 db 59, 60, 61, 61, 62, 62, 63, 64, 64, 65, 65, 66, 67, 67, 68, 68, 69, 70, 70, 71 ENDM -spcl_atk_y_coords: MACRO +MACRO spcl_atk_y_coords db 24, 25, 25, 26, 26, 27, 27, 28, 29, 29, 30, 30, 31, 31, 32, 33, 33, 34, 34, 35 db 36, 36, 37, 37, 38, 39, 39, 40, 40, 41, 42, 42, 43, 43, 44, 45, 45, 46, 46, 47 ENDM -spcl_def_y_coords: MACRO +MACRO spcl_def_y_coords db 71, 70, 70, 69, 68, 68, 67, 67, 66, 65, 65, 64, 64, 63, 62, 62, 61, 61, 60, 59 db 59, 58, 58, 57, 56, 56, 55, 55, 54, 53, 53, 52, 52, 51, 51, 50, 49, 49, 48, 48 ENDM diff --git a/engine/events/prof_oaks_pc.asm b/engine/events/prof_oaks_pc.asm index 09dbf898de..f977652c83 100755 --- a/engine/events/prof_oaks_pc.asm +++ b/engine/events/prof_oaks_pc.asm @@ -92,7 +92,7 @@ endr ret OakRatings: -oakrating: MACRO +MACRO oakrating db \1 dw \2, \3 ENDM diff --git a/engine/games/card_flip.asm b/engine/games/card_flip.asm index 79603bded1..83b89db25a 100755 --- a/engine/games/card_flip.asm +++ b/engine/games/card_flip.asm @@ -1257,7 +1257,7 @@ CardFlip_UpdateCursorOAM: jmp CardFlip_CopyOAM .OAMData: -cardflip_cursor: MACRO +MACRO cardflip_cursor if _NARG >= 5 dbpixel \1, \2, \3, \4 dw \5 diff --git a/engine/games/unown_puzzle.asm b/engine/games/unown_puzzle.asm index 1d65658b84..1d64c60c4c 100755 --- a/engine/games/unown_puzzle.asm +++ b/engine/games/unown_puzzle.asm @@ -110,7 +110,7 @@ InitUnownPuzzlePiecePositions: ret .PuzzlePieceInitialPositions: -initpuzcoord: MACRO +MACRO initpuzcoord rept _NARG / 2 db \1 puzcoord \2 shift 2 @@ -539,7 +539,7 @@ RedrawUnownPuzzlePieces: UnownPuzzleCoordData: -puzzle_coords: MACRO +MACRO puzzle_coords dbpixel \1, \2, \3, \4 dwcoord \5, \6 db \7 diff --git a/engine/gfx/pic_animation.asm b/engine/gfx/pic_animation.asm index 7f116abb00..70a6d68795 100644 --- a/engine/gfx/pic_animation.asm +++ b/engine/gfx/pic_animation.asm @@ -1,6 +1,6 @@ ; Pic animation arrangement. -POKEANIM: MACRO +MACRO POKEANIM for i, 1, _NARG + 1 db (PokeAnim_\_ - PokeAnim_SetupCommands) / 2 endr @@ -126,7 +126,7 @@ SetUpPokeAnim: ret PokeAnim_SetupCommands: -setup_command: MACRO +MACRO setup_command \1_: dw \1 ENDM setup_command PokeAnim_Finish @@ -605,7 +605,7 @@ PokeAnim_ConvertAndApplyBitmask: add 13 ret -poke_anim_box: MACRO +MACRO poke_anim_box for y, 7, 7 * (\1 + 1), 7 for x, 7 - \1, 7 db x + y diff --git a/engine/items/type_chart.asm b/engine/items/type_chart.asm index def3bd5eb2..5be3d4863a 100644 --- a/engine/items/type_chart.asm +++ b/engine/items/type_chart.asm @@ -175,7 +175,7 @@ TypeChartAttrmap: INCBIN "gfx/type_chart/type_chart.attrmap" TypeChartOAMData: -oamdata: MACRO +MACRO oamdata ; x, y, tile id, attributes db (\2) + 16, (\1) + 8, (\3), (\4) ENDM diff --git a/engine/overworld/load_map_part.asm b/engine/overworld/load_map_part.asm index 21f6bee377..c3fc9a0735 100644 --- a/engine/overworld/load_map_part.asm +++ b/engine/overworld/load_map_part.asm @@ -1,4 +1,4 @@ -loadmapblock: MACRO +MACRO loadmapblock ld a, [de] inc de and a @@ -7,7 +7,7 @@ loadmapblock: MACRO .notMapBorderBlock\@ ENDM -addmapwidthoffset: MACRO +MACRO addmapwidthoffset ldh a, [hMapWidthPlus6] ; de += a add e @@ -17,7 +17,7 @@ addmapwidthoffset: MACRO ld d, a ENDM -subtractfromhl: MACRO +MACRO subtractfromhl ; hl -= \1 ld a, l sub \1 @@ -62,7 +62,7 @@ _LoadMapPart:: ldh [rSVBK], a ret -loadmappart_function_macro: MACRO +MACRO loadmappart_function_macro ld a, b and a jmp z, .BlockY0BlockX0\@ diff --git a/engine/pokegear/pokegear.asm b/engine/pokegear/pokegear.asm index 841557b27f..39393f45c3 100755 --- a/engine/pokegear/pokegear.asm +++ b/engine/pokegear/pokegear.asm @@ -2624,7 +2624,7 @@ GetNextTownMapTilePalette: ret .PalMap: -townmappals: MACRO +MACRO townmappals rept _NARG / 2 dn \2, \1 shift 2 diff --git a/engine/tilesets/timeofday_pals.asm b/engine/tilesets/timeofday_pals.asm index 4375038f1e..1f62338bcb 100644 --- a/engine/tilesets/timeofday_pals.asm +++ b/engine/tilesets/timeofday_pals.asm @@ -155,7 +155,7 @@ endr ldh [rSVBK], a ret -brightlevel: MACRO +MACRO brightlevel db (\1 << 6) | (\2 << 4) | (\3 << 2) | \4 ENDM diff --git a/macros/asserts.asm b/macros/asserts.asm index ee84a7e42c..e70082b985 100644 --- a/macros/asserts.asm +++ b/macros/asserts.asm @@ -1,6 +1,6 @@ ; Macros to verify assumptions about the data or code -table_width: MACRO +MACRO table_width def CURRENT_TABLE_WIDTH = \1 if _NARG == 2 REDEF CURRENT_TABLE_START EQUS "\2" @@ -10,13 +10,13 @@ table_width: MACRO endc ENDM -assert_table_length: MACRO +MACRO assert_table_length def x = \1 assert x * CURRENT_TABLE_WIDTH == @ - {CURRENT_TABLE_START}, \ "{CURRENT_TABLE_START}: expected {d:x} entries, each {d:CURRENT_TABLE_WIDTH} bytes" ENDM -list_start: MACRO +MACRO list_start def list_index = 0 if _NARG == 1 REDEF CURRENT_LIST_START EQUS "\1" @@ -26,19 +26,19 @@ list_start: MACRO endc ENDM -li: MACRO +MACRO li assert !STRIN(\1, "@"), STRCAT("String terminator \"@\" in list entry: ", \1) db \1, "@" redef list_index += 1 ENDM -assert_list_length: MACRO +MACRO assert_list_length def x = \1 assert x == list_index, \ "{CURRENT_LIST_START}: expected {d:x} entries, got {d:list_index}" ENDM -def_grass_wildmons: MACRO +MACRO def_grass_wildmons ;\1: map id REDEF CURRENT_GRASS_WILDMONS_MAP EQUS "\1" REDEF CURRENT_GRASS_WILDMONS_LABEL EQUS "._def_grass_wildmons_\1" @@ -46,12 +46,12 @@ def_grass_wildmons: MACRO map_id \1 ENDM -end_grass_wildmons: MACRO +MACRO end_grass_wildmons assert GRASS_WILDDATA_LENGTH == @ - {CURRENT_GRASS_WILDMONS_LABEL}, \ "def_grass_wildmons {CURRENT_GRASS_WILDMONS_MAP}: expected {d:GRASS_WILDDATA_LENGTH} bytes" ENDM -def_water_wildmons: MACRO +MACRO def_water_wildmons ;\1: map id REDEF CURRENT_WATER_WILDMONS_MAP EQUS "\1" REDEF CURRENT_WATER_WILDMONS_LABEL EQUS "._def_water_wildmons_\1" @@ -59,12 +59,12 @@ def_water_wildmons: MACRO map_id \1 ENDM -end_water_wildmons: MACRO +MACRO end_water_wildmons assert WATER_WILDDATA_LENGTH == @ - CURRENT_WATER_WILDMONS_LABEL, \ "def_water_wildmons {CURRENT_WATER_WILDMONS_MAP}: expected {d:WATER_WILDDATA_LENGTH} bytes" ENDM -wildmon: MACRO +MACRO wildmon if _NARG == 3 db \1 dp \2, \3 @@ -74,7 +74,7 @@ wildmon: MACRO endc ENDM -jmp: MACRO +MACRO jmp if _NARG == 1 jp \1 else diff --git a/macros/code.asm b/macros/code.asm index 8509f87191..744dc8ebc4 100644 --- a/macros/code.asm +++ b/macros/code.asm @@ -1,10 +1,10 @@ ; Syntactic sugar MACROs -lb: MACRO ; r, hi, lo +MACRO lb ; r, hi, lo ld \1, LOW(\2) << 8 | LOW(\3) ENDM -ln: MACRO ; r, hi, lo[, hi, lo] +MACRO ln ; r, hi, lo[, hi, lo] if _NARG == 3 ld \1, ((\2) & $f) << 4 | ((\3) & $f) else @@ -12,7 +12,7 @@ ln: MACRO ; r, hi, lo[, hi, lo] endc ENDM -maskbits: MACRO +MACRO maskbits ; masks just enough bits to cover the first argument ; the second argument is an optional shift amount ; e.g. "maskbits 26" becomes "and %00011111" (since 26 - 1 = %00011001) @@ -36,7 +36,7 @@ maskbits: MACRO endc ENDM -ldpixel: MACRO +MACRO ldpixel if _NARG >= 5 lb \1, \2 * 8 + \4, \3 * 8 + \5 else @@ -54,22 +54,22 @@ eventflagset EQUS "flagset wEventFlags," eventflagreset EQUS "flagreset wEventFlags," eventflagcheck EQUS "flagcheck wEventFlags," -flagset: MACRO +MACRO flagset ld hl, \1 + (\2 >> 3) set (\2 & $7), [hl] ENDM -flagreset: MACRO +MACRO flagreset ld hl, \1 + (\2 >> 3) res (\2 & $7), [hl] ENDM -flagcheck: MACRO +MACRO flagcheck ld hl, \1 + (\2 >> 3) bit (\2 & $7), [hl] ENDM -changebridgeblock: MACRO +MACRO changebridgeblock ; lb de, \1 + 4, \2 + 4 ; call GetBlockLocation ld hl, wOverworldMapBlocks + (\2 / 2 + 3) * (\4_WIDTH + 6) + \1 / 2 + 3 diff --git a/macros/collision.asm b/macros/collision.asm index 31d4aa9f43..2520da7aba 100644 --- a/macros/collision.asm +++ b/macros/collision.asm @@ -1,3 +1,3 @@ -tilecoll: MACRO +MACRO tilecoll db COLL_\1, COLL_\2, COLL_\3, COLL_\4 ENDM diff --git a/macros/const.asm b/macros/const.asm index 9d82c06e5a..623a53763b 100644 --- a/macros/const.asm +++ b/macros/const.asm @@ -1,6 +1,6 @@ ; Enumerate constants -const_def: MACRO +MACRO const_def if _NARG >= 1 def const_value = \1 else @@ -13,17 +13,17 @@ const_def: MACRO endc ENDM -const: MACRO +MACRO const DEF \1 EQU const_value redef const_value += const_inc ENDM -shift_const: MACRO +MACRO shift_const DEF \1 EQU 1 << const_value const \1_F ENDM -const_skip: MACRO +MACRO const_skip if _NARG >= 1 redef const_value += const_inc * (\1) else @@ -31,7 +31,7 @@ const_skip: MACRO endc ENDM -const_next: MACRO +MACRO const_next if (const_value > 0 && \1 < const_value) || (const_value < 0 && \1 > const_value) fail "const_next cannot go backwards from {const_value} to \1" else @@ -39,7 +39,7 @@ const_next: MACRO endc ENDM -rb_skip: MACRO +MACRO rb_skip if _NARG == 1 rsset _RS + \1 else diff --git a/macros/coords.asm b/macros/coords.asm index 0465d2be5a..b627f5437a 100644 --- a/macros/coords.asm +++ b/macros/coords.asm @@ -2,7 +2,7 @@ hlcoord EQUS "coord hl," bccoord EQUS "coord bc," decoord EQUS "coord de," -coord: MACRO +MACRO coord ; register, x, y[, origin] if _NARG < 4 ld \1, (\3) * SCREEN_WIDTH + (\2) + wTileMap @@ -15,7 +15,7 @@ hlbgcoord EQUS "bgcoord hl," bcbgcoord EQUS "bgcoord bc," debgcoord EQUS "bgcoord de," -bgcoord: MACRO +MACRO bgcoord ; register, x, y[, origin] if _NARG < 4 ld \1, (\3) * BG_MAP_WIDTH + (\2) + vBGMap0 @@ -24,7 +24,7 @@ bgcoord: MACRO endc ENDM -dwcoord: MACRO +MACRO dwcoord ; x, y rept _NARG / 2 dw (\2) * SCREEN_WIDTH + (\1) + wTileMap @@ -32,7 +32,7 @@ dwcoord: MACRO endr ENDM -ldcoord_a: MACRO +MACRO ldcoord_a ; x, y[, origin] if _NARG < 3 ld [(\2) * SCREEN_WIDTH + (\1) + wTileMap], a @@ -41,7 +41,7 @@ ldcoord_a: MACRO endc ENDM -lda_coord: MACRO +MACRO lda_coord ; x, y[, origin] if _NARG < 3 ld a, [(\2) * SCREEN_WIDTH + (\1) + wTileMap] @@ -50,7 +50,7 @@ lda_coord: MACRO endc ENDM -menu_coords: MACRO +MACRO menu_coords ; x1, y1, x2, y2 db \2, \1 ; start coords db \4, \3 ; end coords diff --git a/macros/data.asm b/macros/data.asm index 0a71fc70c9..c0bddfb4cf 100644 --- a/macros/data.asm +++ b/macros/data.asm @@ -5,61 +5,61 @@ percent EQUS "* $ff / 100" ; Constant data (db, dw, dl) macros -dwb: MACRO +MACRO dwb dw \1 db \2 ENDM -dbw: MACRO +MACRO dbw db \1 dw \2 ENDM -dn: MACRO ; "nybbles" +MACRO dn ; "nybbles" rept _NARG / 2 db (\1) << 4 + (\2) shift 2 endr ENDM -dc: MACRO ; "crumbs" +MACRO dc ; "crumbs" rept _NARG / 4 db ((\1) << 6) | ((\2) << 4) | ((\3) << 2) | (\4) shift 4 endr ENDM -dx: MACRO ; x-byte (big-endian) +MACRO dx ; x-byte (big-endian) for x, 8 * ((\1) - 1), -1, -8 db LOW((\2) >> x) endr ENDM -dt: MACRO ; three-byte (big-endian) +MACRO dt ; three-byte (big-endian) dx 3, \1 ENDM -dd: MACRO ; four-byte (big-endian) +MACRO dd ; four-byte (big-endian) dx 4, \1 ENDM -bigdw: MACRO ; big-endian word +MACRO bigdw ; big-endian word dx 2, \1 ENDM -dba: MACRO ; dbw bank, address +MACRO dba ; dbw bank, address for i, 1, _NARG + 1 dbw BANK(\), \ endr ENDM -dab: MACRO ; dwb address, bank +MACRO dab ; dwb address, bank for i, 1, _NARG + 1 dwb \, BANK(\) endr ENDM -dbpixel: MACRO +MACRO dbpixel if _NARG >= 4 db \1 * 8 + \3, \2 * 8 + \4 else @@ -67,17 +67,17 @@ dbpixel: MACRO endc ENDM -dsprite: MACRO +MACRO dsprite db LOW(\1 * 8) + \2, LOW(\3 * 8) + \4, \5, \6 ENDM -bcd: MACRO +MACRO bcd for i, 1, _NARG + 1 dn ((\) % 100) / 10, (\) % 10 endr ENDM -dp: MACRO ; db species, extspecies | form +MACRO dp ; db species, extspecies | form if _NARG == 2 db LOW(\1), HIGH(\1) << MON_EXTSPECIES_F | \2 else @@ -85,7 +85,7 @@ dp: MACRO ; db species, extspecies | form endc ENDM -genders: MACRO +MACRO genders ; eight arguments, all MALE or FEMALE def x = 0 def y = 1 diff --git a/macros/gfx.asm b/macros/gfx.asm index 1ebb4940a3..966976813d 100644 --- a/macros/gfx.asm +++ b/macros/gfx.asm @@ -1,4 +1,4 @@ -RGB: MACRO +MACRO RGB rept _NARG / 3 if DEF(NOIR) && !DEF(LITERAL_NOIR_RGB_COLORS) def x = (299 * \1 + 587 * \2 + 114 * \3) / 1000 diff --git a/macros/monochrome.asm b/macros/monochrome.asm index 92618934f5..3fb77a931c 100644 --- a/macros/monochrome.asm +++ b/macros/monochrome.asm @@ -9,66 +9,66 @@ PAL_MONOCHROME_DARK EQU (palred 06 + palgreen 13 + palblue 10) PAL_MONOCHROME_BLACK EQU (palred 01 + palgreen 03 + palblue 04) -MONOCHROME_RGB_FOUR: MACRO +MACRO MONOCHROME_RGB_FOUR RGB_MONOCHROME_WHITE RGB_MONOCHROME_LIGHT RGB_MONOCHROME_DARK RGB_MONOCHROME_BLACK ENDM -MONOCHROME_RGB_FOUR_EVE: MACRO +MACRO MONOCHROME_RGB_FOUR_EVE RGB_MONOCHROME_LIGHT RGB_MONOCHROME_LIGHT RGB_MONOCHROME_DARK RGB_MONOCHROME_BLACK ENDM -MONOCHROME_RGB_FOUR_NIGHT: MACRO +MACRO MONOCHROME_RGB_FOUR_NIGHT RGB_MONOCHROME_LIGHT RGB_MONOCHROME_DARK RGB_MONOCHROME_DARK RGB_MONOCHROME_BLACK ENDM -MONOCHROME_RGB_FOUR_DARKNESS: MACRO +MACRO MONOCHROME_RGB_FOUR_DARKNESS RGB_MONOCHROME_BLACK RGB_MONOCHROME_BLACK RGB_MONOCHROME_BLACK RGB_MONOCHROME_BLACK ENDM -MONOCHROME_RGB_FOUR_OW: MACRO +MACRO MONOCHROME_RGB_FOUR_OW RGB_MONOCHROME_WHITE RGB_MONOCHROME_WHITE RGB_MONOCHROME_LIGHT RGB_MONOCHROME_BLACK ENDM -MONOCHROME_RGB_FOUR_OW_NIGHT: MACRO +MACRO MONOCHROME_RGB_FOUR_OW_NIGHT RGB_MONOCHROME_LIGHT RGB_MONOCHROME_LIGHT RGB_MONOCHROME_DARK RGB_MONOCHROME_BLACK ENDM -MONOCHROME_RGB_FOUR_OW_DARKNESS: MACRO +MACRO MONOCHROME_RGB_FOUR_OW_DARKNESS RGB_MONOCHROME_DARK RGB_MONOCHROME_DARK RGB_MONOCHROME_BLACK RGB_MONOCHROME_BLACK ENDM -MONOCHROME_RGB_TWO: MACRO +MACRO MONOCHROME_RGB_TWO RGB_MONOCHROME_LIGHT RGB_MONOCHROME_DARK ENDM -MONOCHROME_RGB_TWO_NIGHT: MACRO +MACRO MONOCHROME_RGB_TWO_NIGHT RGB_MONOCHROME_DARK RGB_MONOCHROME_DARK ENDM -MONOCHROME_RGB_TWO_EVE: MACRO +MACRO MONOCHROME_RGB_TWO_EVE RGB_MONOCHROME_LIGHT RGB_MONOCHROME_DARK ENDM diff --git a/macros/predef.asm b/macros/predef.asm index d7081b2930..2355d9a574 100644 --- a/macros/predef.asm +++ b/macros/predef.asm @@ -1,14 +1,14 @@ -add_predef: MACRO +MACRO add_predef \1Predef:: dbw BANK(\1), \1 ENDM -predef: MACRO +MACRO predef rst Predef db (\1Predef - PredefPointers) / 3 ENDM -predef_jump: MACRO +MACRO predef_jump rst Predef db ((\1Predef - PredefPointers) / 3) | $80 ENDM diff --git a/macros/rst.asm b/macros/rst.asm index 2a72175eed..b9da53b9a9 100644 --- a/macros/rst.asm +++ b/macros/rst.asm @@ -1,19 +1,19 @@ -anonbankpush: MACRO +MACRO anonbankpush call AnonBankPush db BANK(\1) ENDM -farcall: MACRO ; bank, address +MACRO farcall ; bank, address rst FarCall dbw BANK(\1), \1 ENDM -farjp: MACRO ; bank, address +MACRO farjp ; bank, address rst FarCall dbw BANK(\1) | $80, \1 ENDM -homecall: MACRO ; bank, address +MACRO homecall ; bank, address ldh a, [hROMBank] push af if _NARG == 2 diff --git a/macros/scripts/audio.asm b/macros/scripts/audio.asm index d9f689ae5f..821ae318c6 100644 --- a/macros/scripts/audio.asm +++ b/macros/scripts/audio.asm @@ -1,19 +1,19 @@ -musicheader: MACRO +MACRO musicheader ; number of tracks, track idx, address dbw ((\1 - 1) << 6) + (\2 - 1), \3 ENDM -note: MACRO +MACRO note dn (\1), (\2) - 1 ENDM -sound: MACRO +MACRO sound note \1, \2 db \3 ; intensity dw \4 ; frequency ENDM -noise: MACRO +MACRO noise note \1, \2 ; duration db \3 ; intensity db \4 ; frequency @@ -23,7 +23,7 @@ ENDM FIRST_MUSIC_CMD EQU const_value const octave_cmd -octave: MACRO +MACRO octave assert 1 <= (\1) && (\1) <= 8, "octave must be 1-8" db octave_cmd + 8 - (\1) ENDM @@ -31,7 +31,7 @@ ENDM const_skip 7 ; all octave values const notetype_cmd -notetype: MACRO +MACRO notetype db notetype_cmd db \1 ; note_length if _NARG >= 2 @@ -40,37 +40,37 @@ notetype: MACRO ENDM const pitchoffset_cmd -pitchoffset: MACRO +MACRO pitchoffset db pitchoffset_cmd dn \1, \2 - 1 ; octave, key ENDM const tempo_cmd -tempo: MACRO +MACRO tempo db tempo_cmd bigdw \1 ; tempo ENDM const dutycycle_cmd -dutycycle: MACRO +MACRO dutycycle db dutycycle_cmd db \1 ; duty_cycle ENDM const intensity_cmd -intensity: MACRO +MACRO intensity db intensity_cmd db \1 ; intensity ENDM const soundinput_cmd -soundinput: MACRO +MACRO soundinput db soundinput_cmd db \1 ; input ENDM const sound_duty_cmd -sound_duty: MACRO +MACRO sound_duty db sound_duty_cmd if _NARG == 4 db \1 | (\2 << 2) | (\3 << 4) | (\4 << 6) ; duty sequence @@ -80,191 +80,191 @@ sound_duty: MACRO ENDM const togglesfx_cmd -togglesfx: MACRO +MACRO togglesfx db togglesfx_cmd ENDM const slidepitchto_cmd -slidepitchto: MACRO +MACRO slidepitchto db slidepitchto_cmd db \1 - 1 ; duration dn \2, \3 ; octave, pitch ENDM const vibrato_cmd -vibrato: MACRO +MACRO vibrato db vibrato_cmd db \1 ; delay db \2 ; extent ENDM const unknownmusic0xe2_cmd -unknownmusic0xe2: MACRO +MACRO unknownmusic0xe2 db unknownmusic0xe2_cmd db \1 ; unknown ENDM const togglenoise_cmd -togglenoise: MACRO +MACRO togglenoise db togglenoise_cmd db \1 ; id ENDM const panning_cmd -panning: MACRO +MACRO panning db panning_cmd db \1 ; tracks ENDM const volume_cmd -volume: MACRO +MACRO volume db volume_cmd db \1 ; volume ENDM const tone_cmd -tone: MACRO +MACRO tone db tone_cmd bigdw \1 ; tone ENDM const unknownmusic0xe7_cmd -unknownmusic0xe7: MACRO +MACRO unknownmusic0xe7 db unknownmusic0xe7_cmd db \1 ; unknown ENDM const unknownmusic0xe8_cmd -unknownmusic0xe8: MACRO +MACRO unknownmusic0xe8 db unknownmusic0xe8_cmd db \1 ; unknown ENDM const tempo_relative_cmd -tempo_relative: MACRO +MACRO tempo_relative db tempo_relative_cmd bigdw \1 ; value ENDM const restartchannel_cmd -restartchannel: MACRO +MACRO restartchannel db restartchannel_cmd dw \1 ; address ENDM const newsong_cmd -newsong: MACRO +MACRO newsong db newsong_cmd bigdw \1 ; id ENDM const sfxpriorityon_cmd -sfxpriorityon: MACRO +MACRO sfxpriorityon db sfxpriorityon_cmd ENDM const sfxpriorityoff_cmd -sfxpriorityoff: MACRO +MACRO sfxpriorityoff db sfxpriorityoff_cmd ENDM const unknownmusic0xee_cmd -unknownmusic0xee: MACRO +MACRO unknownmusic0xee db unknownmusic0xee_cmd dw \1 ; address ENDM const stereopanning_cmd -stereopanning: MACRO +MACRO stereopanning db stereopanning_cmd db \1 ; tracks ENDM const sfxtogglenoise_cmd -sfxtogglenoise: MACRO +MACRO sfxtogglenoise db sfxtogglenoise_cmd db \1 ; id ENDM const music0xf1_cmd -music0xf1: MACRO +MACRO music0xf1 db music0xf1_cmd ENDM const music0xf2_cmd -music0xf2: MACRO +MACRO music0xf2 db music0xf2_cmd ENDM const music0xf3_cmd -music0xf3: MACRO +MACRO music0xf3 db music0xf3_cmd ENDM const music0xf4_cmd -music0xf4: MACRO +MACRO music0xf4 db music0xf4_cmd ENDM const music0xf5_cmd -music0xf5: MACRO +MACRO music0xf5 db music0xf5_cmd ENDM const music0xf6_cmd -music0xf6: MACRO +MACRO music0xf6 db music0xf6_cmd ENDM const music0xf7_cmd -music0xf7: MACRO +MACRO music0xf7 db music0xf7_cmd ENDM const music0xf8_cmd -music0xf8: MACRO +MACRO music0xf8 db music0xf8_cmd ENDM const noisesampleset_cmd -noisesampleset: MACRO +MACRO noisesampleset db noisesampleset_cmd db \1 ; noise ENDM const setcondition_cmd -setcondition: MACRO +MACRO setcondition db setcondition_cmd db \1 ; condition ENDM const jumpif_cmd -jumpif: MACRO +MACRO jumpif db jumpif_cmd db \1 ; condition dw \2 ; address ENDM const jumpchannel_cmd -jumpchannel: MACRO +MACRO jumpchannel db jumpchannel_cmd dw \1 ; address ENDM const loopchannel_cmd -loopchannel: MACRO +MACRO loopchannel db loopchannel_cmd db \1 ; count dw \2 ; address ENDM const callchannel_cmd -callchannel: MACRO +MACRO callchannel db callchannel_cmd dw \1 ; address ENDM const endchannel_cmd -endchannel: MACRO +MACRO endchannel db endchannel_cmd ENDM diff --git a/macros/scripts/battle_anims.asm b/macros/scripts/battle_anims.asm index 2ffa2c0224..f62c144d1e 100644 --- a/macros/scripts/battle_anims.asm +++ b/macros/scripts/battle_anims.asm @@ -2,19 +2,19 @@ const_def $cf FIRST_BATTLE_ANIM_CMD EQU const_value -anim_wait: MACRO +MACRO anim_wait assert (\1) < FIRST_BATTLE_ANIM_CMD, "anim_wait argument must be less than {FIRST_BATTLE_ANIM_CMD}" db \1 ENDM const anim_statloop_command ; cf -anim_statloop: MACRO +MACRO anim_statloop db anim_statloop_command dw \1 ; address ENDM const anim_obj_command ; d0 -anim_obj: MACRO +MACRO anim_obj db anim_obj_command db \1 ; object if _NARG == 4 @@ -29,20 +29,20 @@ anim_obj: MACRO ENDM const anim_1gfx_command ; d1 -anim_1gfx: MACRO +MACRO anim_1gfx db anim_1gfx_command db \1 ; gfx1 ENDM const anim_2gfx_command ; d2 -anim_2gfx: MACRO +MACRO anim_2gfx db anim_2gfx_command db \1 ; gfx1 db \2 ; gfx2 ENDM const anim_3gfx_command ; d3 -anim_3gfx: MACRO +MACRO anim_3gfx db anim_3gfx_command db \1 ; gfx1 db \2 ; gfx2 @@ -50,7 +50,7 @@ anim_3gfx: MACRO ENDM const anim_4gfx_command ; d4 -anim_4gfx: MACRO +MACRO anim_4gfx db anim_4gfx_command db \1 ; gfx1 db \2 ; gfx2 @@ -59,7 +59,7 @@ anim_4gfx: MACRO ENDM const anim_5gfx_command ; d5 -anim_5gfx: MACRO +MACRO anim_5gfx db anim_5gfx_command db \1 ; gfx1 db \2 ; gfx2 @@ -69,147 +69,147 @@ anim_5gfx: MACRO ENDM const anim_incobj_command ; d6 -anim_incobj: MACRO +MACRO anim_incobj db anim_incobj_command db \1 ; id ENDM const anim_setobj_command ; d7 -anim_setobj: MACRO +MACRO anim_setobj db anim_setobj_command db \1 ; id db \2 ; obj ENDM const anim_incbgeffect_command ; d8 -anim_incbgeffect: MACRO +MACRO anim_incbgeffect db anim_incbgeffect_command db \1 ; effect ENDM const anim_enemyfeetobj_command ; d9 -anim_enemyfeetobj: MACRO +MACRO anim_enemyfeetobj db anim_enemyfeetobj_command ENDM const anim_playerheadobj_command ; da -anim_playerheadobj: MACRO +MACRO anim_playerheadobj db anim_playerheadobj_command ENDM const anim_checkpokeball_command ; db -anim_checkpokeball: MACRO +MACRO anim_checkpokeball db anim_checkpokeball_command ENDM const anim_transform_command ; dc -anim_transform: MACRO +MACRO anim_transform db anim_transform_command ENDM const anim_raisesub_command ; dd -anim_raisesub: MACRO +MACRO anim_raisesub db anim_raisesub_command ENDM const anim_dropsub_command ; de -anim_dropsub: MACRO +MACRO anim_dropsub db anim_dropsub_command ENDM const anim_resetobp0_command ; df -anim_resetobp0: MACRO +MACRO anim_resetobp0 db anim_resetobp0_command ENDM const anim_sound_command ; e0 -anim_sound: MACRO +MACRO anim_sound db anim_sound_command db (\1 << 2) | \2 ; duration, tracks db \3 ; id ENDM const anim_cry_command ; e1 -anim_cry: MACRO +MACRO anim_cry db anim_cry_command db \1 ; pitch ENDM const anim_minimizeopp_command ; e2 -anim_minimizeopp: MACRO +MACRO anim_minimizeopp db anim_minimizeopp_command ENDM const anim_oamon_command ; e3 -anim_oamon: MACRO +MACRO anim_oamon db anim_oamon_command ENDM const anim_oamoff_command ; e4 -anim_oamoff: MACRO +MACRO anim_oamoff db anim_oamoff_command ENDM const anim_clearobjs_command ; e5 -anim_clearobjs: MACRO +MACRO anim_clearobjs db anim_clearobjs_command ENDM const anim_beatup_command ; e6 -anim_beatup: MACRO +MACRO anim_beatup db anim_beatup_command ENDM const anim_0xe7_command ; e7 -anim_0xe7: MACRO +MACRO anim_0xe7 db anim_0xe7_command ENDM const anim_updateactorpic_command ; e8 -anim_updateactorpic: MACRO +MACRO anim_updateactorpic db anim_updateactorpic_command ENDM const anim_minimize_command ; e9 -anim_minimize: MACRO +MACRO anim_minimize db anim_minimize_command ENDM const anim_0xea_command ; ea -anim_0xea: MACRO +MACRO anim_0xea db anim_0xea_command ENDM const anim_0xeb_command ; eb -anim_0xeb: MACRO +MACRO anim_0xeb db anim_0xeb_command ENDM const anim_0xec_command ; ec -anim_0xec: MACRO +MACRO anim_0xec db anim_0xec_command ENDM const anim_0xed_command ; ed -anim_0xed: MACRO +MACRO anim_0xed db anim_0xed_command ENDM const anim_jumpand_command ; ee -anim_jumpand: MACRO +MACRO anim_jumpand db anim_jumpand_command db \1 ; value dw \2 ; address ENDM const anim_jumpuntil_command ; ef -anim_jumpuntil: MACRO +MACRO anim_jumpuntil db anim_jumpuntil_command dw \1 ; address ENDM const anim_bgeffect_command ; f0 -anim_bgeffect: MACRO +MACRO anim_bgeffect db anim_bgeffect_command db \1 ; effect db \2 ; unknown @@ -218,88 +218,88 @@ anim_bgeffect: MACRO ENDM const anim_bgp_command ; f1 -anim_bgp: MACRO +MACRO anim_bgp db anim_bgp_command db \1 ; colors ENDM const anim_obp0_command ; f2 -anim_obp0: MACRO +MACRO anim_obp0 db anim_obp0_command db \1 ; colors ENDM const anim_obp1_command ; f3 -anim_obp1: MACRO +MACRO anim_obp1 db anim_obp1_command db \1 ; colors ENDM const anim_clearsprites_command ; f4 -anim_clearsprites: MACRO +MACRO anim_clearsprites db anim_clearsprites_command ENDM const anim_0xf5_command ; f5 -anim_0xf5: MACRO +MACRO anim_0xf5 db anim_0xf5_command ENDM const anim_0xf6_command ; f6 -anim_0xf6: MACRO +MACRO anim_0xf6 db anim_0xf6_command ENDM const anim_0xf7_command ; f7 -anim_0xf7: MACRO +MACRO anim_0xf7 db anim_0xf7_command ENDM const anim_jumpif_command ; f8 -anim_jumpif: MACRO +MACRO anim_jumpif db anim_jumpif_command db \1 ; value dw \2 ; address ENDM const anim_setvar_command ; f9 -anim_setvar: MACRO +MACRO anim_setvar db anim_setvar_command db \1 ; value ENDM const anim_incvar_command ; fa -anim_incvar: MACRO +MACRO anim_incvar db anim_incvar_command ENDM const anim_jumpvar_command ; fb -anim_jumpvar: MACRO +MACRO anim_jumpvar db anim_jumpvar_command db \1 ; value dw \2 ; address ENDM const anim_jump_command ; fc -anim_jump: MACRO +MACRO anim_jump db anim_jump_command dw \1 ; address ENDM const anim_loop_command ; fd -anim_loop: MACRO +MACRO anim_loop db anim_loop_command db \1 ; count dw \2 ; address ENDM const anim_call_command ; fe -anim_call: MACRO +MACRO anim_call db anim_call_command dw \1 ; address ENDM const anim_ret_command ; ff -anim_ret: MACRO +MACRO anim_ret db anim_ret_command ENDM diff --git a/macros/scripts/events.asm b/macros/scripts/events.asm index 4a61406ead..740a5e4870 100644 --- a/macros/scripts/events.asm +++ b/macros/scripts/events.asm @@ -2,193 +2,193 @@ const_def const scall_command -scall: MACRO +MACRO scall db scall_command dw \1 ; pointer ENDM const farscall_command -farscall: MACRO +MACRO farscall db farscall_command dba \1 ENDM const memcall_command -memcall: MACRO +MACRO memcall db memcall_command dw \1 ; pointer ENDM const sjump_command -sjump: MACRO +MACRO sjump db sjump_command dw \1 ; pointer ENDM const farsjump_command -farsjump: MACRO +MACRO farsjump db farsjump_command dba \1 ENDM const memjump_command -memjump: MACRO +MACRO memjump db memjump_command dw \1 ; pointer ENDM const ifequal_command -ifequal: MACRO +MACRO ifequal db ifequal_command db \1 ; byte dw \2 ; pointer ENDM const ifnotequal_command -ifnotequal: MACRO +MACRO ifnotequal db ifnotequal_command db \1 ; byte dw \2 ; pointer ENDM const iffalse_command -iffalse: MACRO +MACRO iffalse db iffalse_command dw \1 ; pointer ENDM const iftrue_command -iftrue: MACRO +MACRO iftrue db iftrue_command dw \1 ; pointer ENDM const ifgreater_command -ifgreater: MACRO +MACRO ifgreater db ifgreater_command db \1 ; byte dw \2 ; pointer ENDM const ifless_command -ifless: MACRO +MACRO ifless db ifless_command db \1 ; byte dw \2 ; pointer ENDM const jumpstd_command -jumpstd: MACRO +MACRO jumpstd db jumpstd_command db \1 ; predefined_script ENDM const callstd_command -callstd: MACRO +MACRO callstd db callstd_command db \1 ; predefined_script ENDM const callasm_command -callasm: MACRO +MACRO callasm db callasm_command dba \1 ENDM const special_command -special: MACRO +MACRO special db special_command db (\1Special - SpecialsPointers) / 3 ENDM const memcallasm_command -memcallasm: MACRO +MACRO memcallasm db memcallasm_command dw \1 ; asm ENDM const checkmapscene_command -checkmapscene: MACRO +MACRO checkmapscene db checkmapscene_command map_id \1 ; map ENDM const setmapscene_command -setmapscene: MACRO +MACRO setmapscene db setmapscene_command map_id \1 ; map db \2 ; trigger_id ENDM const checkscene_command -checkscene: MACRO +MACRO checkscene db checkscene_command ENDM const setscene_command -setscene: MACRO +MACRO setscene db setscene_command db \1 ; trigger_id ENDM const setval_command -setval: MACRO +MACRO setval db setval_command db \1 ; value ENDM const addval_command -addval: MACRO +MACRO addval db addval_command db \1 ; value ENDM const random_command -random: MACRO +MACRO random db random_command db \1 ; input ENDM const readmem_command -readmem: MACRO +MACRO readmem db readmem_command dw \1 ; address ENDM const writemem_command -writemem: MACRO +MACRO writemem db writemem_command dw \1 ; address ENDM const loadmem_command -loadmem: MACRO +MACRO loadmem db loadmem_command dw \1 ; address db \2 ; value ENDM const readvar_command -readvar: MACRO +MACRO readvar db readvar_command db \1 ; variable_id ENDM const writevar_command -writevar: MACRO +MACRO writevar db writevar_command db \1 ; variable_id ENDM const loadvar_command -loadvar: MACRO +MACRO loadvar db loadvar_command db \1 ; variable_id db \2 ; value ENDM const giveitem_command -giveitem: MACRO +MACRO giveitem db giveitem_command db \1 ; item if _NARG == 2 @@ -199,7 +199,7 @@ giveitem: MACRO ENDM const takeitem_command -takeitem: MACRO +MACRO takeitem db takeitem_command db \1 ; item if _NARG == 2 @@ -210,82 +210,82 @@ takeitem: MACRO ENDM const checkitem_command -checkitem: MACRO +MACRO checkitem db checkitem_command db \1 ; item ENDM const givemoney_command -givemoney: MACRO +MACRO givemoney db givemoney_command db \1 ; account dt \2 ; money ENDM const takemoney_command -takemoney: MACRO +MACRO takemoney db takemoney_command db \1 ; account dt \2 ; money ENDM const checkmoney_command -checkmoney: MACRO +MACRO checkmoney db checkmoney_command db \1 ; account dt \2 ; money ENDM const givecoins_command -givecoins: MACRO +MACRO givecoins db givecoins_command dw \1 ; coins ENDM const takecoins_command -takecoins: MACRO +MACRO takecoins db takecoins_command dw \1 ; coins ENDM const checkcoins_command -checkcoins: MACRO +MACRO checkcoins db checkcoins_command dw \1 ; coins ENDM const addcellnum_command -addcellnum: MACRO +MACRO addcellnum db addcellnum_command db \1 ; person ENDM const delcellnum_command -delcellnum: MACRO +MACRO delcellnum db delcellnum_command db \1 ; person ENDM const checkcellnum_command -checkcellnum: MACRO +MACRO checkcellnum db checkcellnum_command db \1 ; person ENDM const checktime_command -checktime: MACRO +MACRO checktime db checktime_command db \1 ; time ENDM const checkpoke_command -checkpoke: MACRO +MACRO checkpoke db checkpoke_command db \1 ; pkmn ENDM const givepoke_command -givepoke: MACRO +MACRO givepoke db givepoke_command if _NARG >= 3 dp \1, \2 ; pokemon @@ -322,7 +322,7 @@ givepoke: MACRO ENDM const giveegg_command -giveegg: MACRO +MACRO giveegg db giveegg_command if _NARG >= 2 dp \1, \2 | IS_EGG_MASK @@ -332,78 +332,78 @@ giveegg: MACRO ENDM const givepokemail_command -givepokemail: MACRO +MACRO givepokemail db givepokemail_command dw \1 ; pointer ENDM const checkpokemail_command -checkpokemail: MACRO +MACRO checkpokemail db checkpokemail_command dw \1 ; pointer ENDM const checkevent_command -checkevent: MACRO +MACRO checkevent db checkevent_command dw \1 ; event_flag ENDM const clearevent_command -clearevent: MACRO +MACRO clearevent db clearevent_command dw \1 ; event_flag ENDM const setevent_command -setevent: MACRO +MACRO setevent db setevent_command dw \1 ; event_flag ENDM const checkflag_command -checkflag: MACRO +MACRO checkflag db checkflag_command dw \1 ; engine_flag ENDM const clearflag_command -clearflag: MACRO +MACRO clearflag db clearflag_command dw \1 ; engine_flag ENDM const setflag_command -setflag: MACRO +MACRO setflag db setflag_command dw \1 ; engine_flag ENDM const wildon_command -wildon: MACRO +MACRO wildon db wildon_command ENDM const wildoff_command -wildoff: MACRO +MACRO wildoff db wildoff_command ENDM const warpmod_command -warpmod: MACRO +MACRO warpmod db warpmod_command db \1 ; warp_id map_id \2 ; map ENDM const blackoutmod_command -blackoutmod: MACRO +MACRO blackoutmod db blackoutmod_command map_id \1 ; map ENDM const warp_command -warp: MACRO +MACRO warp db warp_command map_id \1 ; map db \2 ; x @@ -411,46 +411,46 @@ warp: MACRO ENDM const getmoney_command -getmoney: MACRO +MACRO getmoney db getmoney_command db \1 ; account db \2 ; memory ENDM const getcoins_command -getcoins: MACRO +MACRO getcoins db getcoins_command db \1 ; memory ENDM const getnum_command -getnum: MACRO +MACRO getnum db getnum_command db \1 ; memory ENDM const getmonname_command -getmonname: MACRO +MACRO getmonname db getmonname_command db \1 ; pokemon db \2 ; memory ENDM const getitemname_command -getitemname: MACRO +MACRO getitemname db getitemname_command db \1 ; item db \2 ; memory ENDM const getcurlandmarkname_command -getcurlandmarkname: MACRO +MACRO getcurlandmarkname db getcurlandmarkname_command db \1 ; memory ENDM const gettrainername_command -gettrainername: MACRO +MACRO gettrainername db gettrainername_command db \1 ; trainer_id db \2 ; trainer_group @@ -458,102 +458,102 @@ gettrainername: MACRO ENDM const getstring_command -getstring: MACRO +MACRO getstring db getstring_command dw \1 ; text_pointer db \2 ; memory ENDM const itemnotify_command -itemnotify: MACRO +MACRO itemnotify db itemnotify_command ENDM const pocketisfull_command -pocketisfull: MACRO +MACRO pocketisfull db pocketisfull_command ENDM const opentext_command -opentext: MACRO +MACRO opentext db opentext_command ENDM const refreshscreen_command -refreshscreen: MACRO +MACRO refreshscreen db refreshscreen_command ENDM const closetext_command -closetext: MACRO +MACRO closetext db closetext_command ENDM const farwritetext_command -farwritetext: MACRO +MACRO farwritetext db farwritetext_command dba \1 ENDM const writetext_command -writetext: MACRO +MACRO writetext db writetext_command dw \1 ; text_pointer ENDM const repeattext_command -repeattext: MACRO +MACRO repeattext db repeattext_command db \1 ; byte db \2 ; byte ENDM const yesorno_command -yesorno: MACRO +MACRO yesorno db yesorno_command ENDM const loadmenu_command -loadmenu: MACRO +MACRO loadmenu db loadmenu_command dw \1 ; data ENDM const closewindow_command -closewindow: MACRO +MACRO closewindow db closewindow_command ENDM const jumptextfaceplayer_command -jumptextfaceplayer: MACRO +MACRO jumptextfaceplayer db jumptextfaceplayer_command dw \1 ; text_pointer ENDM const farjumptext_command -farjumptext: MACRO +MACRO farjumptext db farjumptext_command dba \1 ENDM const jumptext_command -jumptext: MACRO +MACRO jumptext db jumptext_command dw \1 ; text_pointer ENDM const waitbutton_command -waitbutton: MACRO +MACRO waitbutton db waitbutton_command ENDM const promptbutton_command -promptbutton: MACRO +MACRO promptbutton db promptbutton_command ENDM const pokepic_command -pokepic: MACRO +MACRO pokepic db pokepic_command db \1 ; pokemon if \1 == 0 @@ -566,32 +566,32 @@ pokepic: MACRO ENDM const closepokepic_command -closepokepic: MACRO +MACRO closepokepic db closepokepic_command ENDM const _2dmenu_command -_2dmenu: MACRO +MACRO _2dmenu db _2dmenu_command ENDM const verticalmenu_command -verticalmenu: MACRO +MACRO verticalmenu db verticalmenu_command ENDM const randomwildmon_command -randomwildmon: MACRO +MACRO randomwildmon db randomwildmon_command ENDM const loadtemptrainer_command -loadtemptrainer: MACRO +MACRO loadtemptrainer db loadtemptrainer_command ENDM const loadwildmon_command -loadwildmon: MACRO +MACRO loadwildmon db loadwildmon_command db \1 ; pokemon if _NARG == 3 @@ -604,126 +604,126 @@ loadwildmon: MACRO ENDM const loadtrainer_command -loadtrainer: MACRO +MACRO loadtrainer db loadtrainer_command db \1 ; trainer_group db \2 ; trainer_id ENDM const startbattle_command -startbattle: MACRO +MACRO startbattle db startbattle_command ENDM const reloadmapafterbattle_command -reloadmapafterbattle: MACRO +MACRO reloadmapafterbattle db reloadmapafterbattle_command ENDM const catchtutorial_command -catchtutorial: MACRO +MACRO catchtutorial db catchtutorial_command db \1 ; byte ENDM const trainertext_command -trainertext: MACRO +MACRO trainertext db trainertext_command db \1 ; which_text ENDM const trainerflagaction_command -trainerflagaction: MACRO +MACRO trainerflagaction db trainerflagaction_command db \1 ; action ENDM const winlosstext_command -winlosstext: MACRO +MACRO winlosstext db winlosstext_command dw \1 ; win_text_pointer dw \2 ; loss_text_pointer ENDM const scripttalkafter_command -scripttalkafter: MACRO +MACRO scripttalkafter db scripttalkafter_command ENDM const endifjustbattled_command -endifjustbattled: MACRO +MACRO endifjustbattled db endifjustbattled_command ENDM const checkjustbattled_command -checkjustbattled: MACRO +MACRO checkjustbattled db checkjustbattled_command ENDM const setlasttalked_command -setlasttalked: MACRO +MACRO setlasttalked db setlasttalked_command db \1 ; person ENDM const applymovement_command -applymovement: MACRO +MACRO applymovement db applymovement_command db \1 ; person dw \2 ; data ENDM const applymovementlasttalked_command -applymovementlasttalked: MACRO +MACRO applymovementlasttalked db applymovementlasttalked_command dw \1 ; data ENDM const faceplayer_command -faceplayer: MACRO +MACRO faceplayer db faceplayer_command ENDM const faceobject_command -faceobject: MACRO +MACRO faceobject db faceobject_command db \1 ; person1 db \2 ; person2 ENDM const variablesprite_command -variablesprite: MACRO +MACRO variablesprite db variablesprite_command db \1 - SPRITE_VARS ; byte db \2 ; sprite ENDM const disappear_command -disappear: MACRO +MACRO disappear db disappear_command db \1 ; person ENDM const appear_command -appear: MACRO +MACRO appear db appear_command db \1 ; person ENDM const follow_command -follow: MACRO +MACRO follow db follow_command db \1 ; person2 db \2 ; person1 ENDM const stopfollow_command -stopfollow: MACRO +MACRO stopfollow db stopfollow_command ENDM const moveobject_command -moveobject: MACRO +MACRO moveobject db moveobject_command db \1 ; person db \2 ; x @@ -731,19 +731,19 @@ moveobject: MACRO ENDM const writeobjectxy_command -writeobjectxy: MACRO +MACRO writeobjectxy db writeobjectxy_command db \1 ; person ENDM const loademote_command -loademote: MACRO +MACRO loademote db loademote_command db \1 ; bubble ENDM const showemote_command -showemote: MACRO +MACRO showemote db showemote_command db \1 ; bubble db \2 ; person @@ -751,33 +751,33 @@ showemote: MACRO ENDM const turnobject_command -turnobject: MACRO +MACRO turnobject db turnobject_command db \1 ; person db \2 ; facing ENDM const follownotexact_command -follownotexact: MACRO +MACRO follownotexact db follownotexact_command db \1 ; person2 db \2 ; person1 ENDM const earthquake_command -earthquake: MACRO +MACRO earthquake db earthquake_command db \1 ; param ENDM const changemapblocks_command -changemapblocks: MACRO +MACRO changemapblocks db changemapblocks_command dba \1 ; map_data ENDM const changeblock_command -changeblock: MACRO +MACRO changeblock db changeblock_command db \1 ; x db \2 ; y @@ -785,194 +785,194 @@ changeblock: MACRO ENDM const reloadmap_command -reloadmap: MACRO +MACRO reloadmap db reloadmap_command ENDM const reloadmappart_command -reloadmappart: MACRO +MACRO reloadmappart db reloadmappart_command ENDM const usestonetable_command -usestonetable: MACRO +MACRO usestonetable db usestonetable_command dw \1 ; stonetable_pointer ENDM const playmusic_command -playmusic: MACRO +MACRO playmusic db playmusic_command db \1 ; music_id ENDM const encountermusic_command -encountermusic: MACRO +MACRO encountermusic db encountermusic_command ENDM const musicfadeout_command -musicfadeout: MACRO +MACRO musicfadeout db musicfadeout_command db \1 ; music db \2 ; fadetime ENDM const playmapmusic_command -playmapmusic: MACRO +MACRO playmapmusic db playmapmusic_command ENDM const dontrestartmapmusic_command -dontrestartmapmusic: MACRO +MACRO dontrestartmapmusic db dontrestartmapmusic_command ENDM const cry_command -cry: MACRO +MACRO cry db cry_command db \1 ; cry_id ENDM const playsound_command -playsound: MACRO +MACRO playsound db playsound_command db \1 ; sound_id ENDM const waitsfx_command -waitsfx: MACRO +MACRO waitsfx db waitsfx_command ENDM const warpsound_command -warpsound: MACRO +MACRO warpsound db warpsound_command ENDM const specialsound_command -specialsound: MACRO +MACRO specialsound db specialsound_command ENDM const autoinput_command -autoinput: MACRO +MACRO autoinput db autoinput_command db \1 ; data_pointer ENDM const newloadmap_command -newloadmap: MACRO +MACRO newloadmap db newloadmap_command db \1 ; which_method ENDM const pause_command -pause: MACRO +MACRO pause db pause_command db \1 ; length ENDM const deactivatefacing_command -deactivatefacing: MACRO +MACRO deactivatefacing db deactivatefacing_command db \1 ; time ENDM const sdefer_command -sdefer: MACRO +MACRO sdefer db sdefer_command dw \1 ; pointer ENDM const warpcheck_command -warpcheck: MACRO +MACRO warpcheck db warpcheck_command ENDM const stopandsjump_command -stopandsjump: MACRO +MACRO stopandsjump db stopandsjump_command dw \1 ; pointer ENDM const endcallback_command -endcallback: MACRO +MACRO endcallback db endcallback_command ENDM const end_command -end: MACRO +MACRO end db end_command ENDM const reloadend_command -reloadend: MACRO +MACRO reloadend db reloadend_command db \1 ; which_method ENDM const endall_command -endall: MACRO +MACRO endall db endall_command ENDM const pokemart_command -pokemart: MACRO +MACRO pokemart db pokemart_command db \1 ; dialog_id db \2 ; mart_id ENDM const elevator_command -elevator: MACRO +MACRO elevator db elevator_command dw \1 ; floor_list_pointer ENDM const trade_command -trade: MACRO +MACRO trade db trade_command db \1 ; trade_id ENDM const askforphonenumber_command -askforphonenumber: MACRO +MACRO askforphonenumber db askforphonenumber_command db \1 ; number ENDM const hangup_command -hangup: MACRO +MACRO hangup db hangup_command ENDM const describedecoration_command -describedecoration: MACRO +MACRO describedecoration db describedecoration_command db \1 ; byte ENDM const fruittree_command -fruittree: MACRO +MACRO fruittree db fruittree_command db \1 ; tree_id db \2 ; fruit_id ENDM const specialphonecall_command -specialphonecall: MACRO +MACRO specialphonecall db specialphonecall_command db \1 ; call_id ENDM const checkphonecall_command -checkphonecall: MACRO +MACRO checkphonecall db checkphonecall_command ENDM const verbosegiveitem_command -verbosegiveitem: MACRO +MACRO verbosegiveitem db verbosegiveitem_command db \1 ; item if _NARG == 2 @@ -983,31 +983,31 @@ verbosegiveitem: MACRO ENDM const verbosegiveitemvar_command -verbosegiveitemvar: MACRO +MACRO verbosegiveitemvar db verbosegiveitemvar_command db \1 ; item db \2 ; var ENDM const swarm_command -swarm: MACRO +MACRO swarm db swarm_command db \1 ; flag map_id \2 ; map ENDM const halloffame_command -halloffame: MACRO +MACRO halloffame db halloffame_command ENDM const credits_command -credits: MACRO +MACRO credits db credits_command ENDM const warpfacing_command -warpfacing: MACRO +MACRO warpfacing db warpfacing_command db \1 ; facing map_id \2 ; map @@ -1016,27 +1016,27 @@ warpfacing: MACRO ENDM const battletowertext_command -battletowertext: MACRO +MACRO battletowertext db battletowertext_command db \1 ; memory ENDM const getlandmarkname_command -getlandmarkname: MACRO +MACRO getlandmarkname db getlandmarkname_command db \1 ; id db \2 ; memory ENDM const gettrainerclassname_command -gettrainerclassname: MACRO +MACRO gettrainerclassname db gettrainerclassname_command db \1 ; id db \2 ; memory ENDM const getname_command -getname: MACRO +MACRO getname db getname_command db \1 ; type db \2 ; id @@ -1044,158 +1044,158 @@ getname: MACRO ENDM const wait_command -wait: MACRO +MACRO wait db wait_command db \1 ; duration ENDM const checksave_command -checksave: MACRO +MACRO checksave db checksave_command ENDM const countseencaught_command -countseencaught: MACRO +MACRO countseencaught db countseencaught_command ENDM const trainerpic_command -trainerpic: MACRO +MACRO trainerpic db trainerpic_command db \1 ; trainer ENDM const givetmhm_command -givetmhm: MACRO +MACRO givetmhm db givetmhm_command db \1 ; tmhm ENDM const checktmhm_command -checktmhm: MACRO +MACRO checktmhm db checktmhm_command db \1 ; tmhm ENDM const verbosegivetmhm_command -verbosegivetmhm: MACRO +MACRO verbosegivetmhm db verbosegivetmhm_command db \1 ; tmhm ENDM const tmhmnotify_command -tmhmnotify: MACRO +MACRO tmhmnotify db tmhmnotify_command ENDM const gettmhmname_command -gettmhmname: MACRO +MACRO gettmhmname db gettmhmname_command db \1 ; tmhm db \2 ; memory ENDM const checkdarkness_command -checkdarkness: MACRO +MACRO checkdarkness db checkdarkness_command ENDM const checkunits_command -checkunits: MACRO +MACRO checkunits db checkunits_command ENDM const unowntypeface_command -unowntypeface: MACRO +MACRO unowntypeface db unowntypeface_command ENDM const restoretypeface_command -restoretypeface: MACRO +MACRO restoretypeface db restoretypeface_command ENDM const jumpstashedtext_command -jumpstashedtext: MACRO +MACRO jumpstashedtext db jumpstashedtext_command ENDM const jumpopenedtext_command -jumpopenedtext: MACRO +MACRO jumpopenedtext db jumpopenedtext_command dw \1 ; text_pointer ENDM const iftrue_jumptext_command -iftrue_jumptext: MACRO +MACRO iftrue_jumptext db iftrue_jumptext_command dw \1 ; text_pointer ENDM const iffalse_jumptext_command -iffalse_jumptext: MACRO +MACRO iffalse_jumptext db iffalse_jumptext_command dw \1 ; text_pointer ENDM const iftrue_jumptextfaceplayer_command -iftrue_jumptextfaceplayer: MACRO +MACRO iftrue_jumptextfaceplayer db iftrue_jumptextfaceplayer_command dw \1 ; text_pointer ENDM const iffalse_jumptextfaceplayer_command -iffalse_jumptextfaceplayer: MACRO +MACRO iffalse_jumptextfaceplayer db iffalse_jumptextfaceplayer_command dw \1 ; text_pointer ENDM const iftrue_jumpopenedtext_command -iftrue_jumpopenedtext: MACRO +MACRO iftrue_jumpopenedtext db iftrue_jumpopenedtext_command dw \1 ; text_pointer ENDM const iffalse_jumpopenedtext_command -iffalse_jumpopenedtext: MACRO +MACRO iffalse_jumpopenedtext db iffalse_jumpopenedtext_command dw \1 ; text_pointer ENDM const writethistext_command -writethistext: MACRO +MACRO writethistext db writethistext_command ENDM const jumpthistext_command -jumpthistext: MACRO +MACRO jumpthistext db jumpthistext_command ENDM const jumpthistextfaceplayer_command -jumpthistextfaceplayer: MACRO +MACRO jumpthistextfaceplayer db jumpthistextfaceplayer_command ENDM const jumpthisopenedtext_command -jumpthisopenedtext: MACRO +MACRO jumpthisopenedtext db jumpthisopenedtext_command ENDM const showtext_command -showtext: MACRO +MACRO showtext db showtext_command dw \1 ; text_pointer ENDM const showtextfaceplayer_command -showtextfaceplayer: MACRO +MACRO showtextfaceplayer db showtextfaceplayer_command dw \1 ; text_pointer ENDM const applyonemovement_command -applyonemovement: MACRO +MACRO applyonemovement db applyonemovement_command db \1 ; person db movement_\2 ; movement data @@ -1203,39 +1203,39 @@ applyonemovement: MACRO ENDM const showcrytext_command -showcrytext: MACRO +MACRO showcrytext db showcrytext_command dw \1 ; text_pointer db \2 ; cry_id ENDM const endtext_command -endtext: MACRO +MACRO endtext db endtext_command ENDM const waitendtext_command -waitendtext: MACRO +MACRO waitendtext db waitendtext_command ENDM const iftrue_endtext_command -iftrue_endtext: MACRO +MACRO iftrue_endtext db iftrue_endtext_command ENDM const iffalse_endtext_command -iffalse_endtext: MACRO +MACRO iffalse_endtext db iffalse_endtext_command ENDM const loadgrottomon_command -loadgrottomon: MACRO +MACRO loadgrottomon db loadgrottomon_command ENDM const giveapricorn_command -giveapricorn: MACRO +MACRO giveapricorn db giveapricorn_command db \1 ; apricorn if _NARG == 2 @@ -1246,17 +1246,17 @@ giveapricorn: MACRO ENDM const paintingpic_command -paintingpic: MACRO +MACRO paintingpic db paintingpic_command db \1 ; painting ENDM const checkegg_command -checkegg: MACRO +MACRO checkegg db checkegg_command ENDM -callthisasm: MACRO +MACRO callthisasm ; "callasm .asm\@" causes a "File stack dump too long, got truncated" ; error due to the long filename:linenumber trace of nested macros. db callasm_command @@ -1266,48 +1266,48 @@ callthisasm: MACRO ENDM const givekeyitem_command -givekeyitem: MACRO +MACRO givekeyitem db givekeyitem_command db \1 ; key item ENDM const checkkeyitem_command -checkkeyitem: MACRO +MACRO checkkeyitem db checkkeyitem_command db \1 ; key item ENDM const takekeyitem_command -takekeyitem: MACRO +MACRO takekeyitem db takekeyitem_command db \1 ; key item ENDM const verbosegivekeyitem_command -verbosegivekeyitem: MACRO +MACRO verbosegivekeyitem db verbosegivekeyitem_command db \1 ; key item ENDM const keyitemnotify_command -keyitemnotify: MACRO +MACRO keyitemnotify db keyitemnotify_command ENDM const givebp_command -givebp: MACRO +MACRO givebp db givebp_command dw \1 ; bp ENDM const takebp_command -takebp: MACRO +MACRO takebp db takebp_command dw \1 ; bp ENDM const checkbp_command -checkbp: MACRO +MACRO checkbp db checkbp_command dw \1 ; bp ENDM diff --git a/macros/scripts/gfx_anims.asm b/macros/scripts/gfx_anims.asm index 97807338c4..414bde6b62 100644 --- a/macros/scripts/gfx_anims.asm +++ b/macros/scripts/gfx_anims.asm @@ -1,6 +1,6 @@ ; pic + oam animations -frame: MACRO +MACRO frame db \1 def x = \2 for i, 3, _NARG + 1 @@ -12,30 +12,30 @@ ENDM const_def $fc const delanim_command ; $fc -delanim: MACRO ; used for oam +MACRO delanim ; used for oam db delanim_command ENDM const dorepeat_command ; $fd -dorepeat: MACRO +MACRO dorepeat db dorepeat_command db \1 ; # ENDM const setrepeat_command ; $fe -setrepeat: MACRO +MACRO setrepeat db setrepeat_command db \1 ; # ENDM const endanim_command ; $ff -endanim: MACRO +MACRO endanim db endanim_command ENDM const_value = $fe const dorestart_command ; $fe -dorestart: MACRO ; used for oam +MACRO dorestart ; used for oam db dorestart_command ENDM diff --git a/macros/scripts/maps.asm b/macros/scripts/maps.asm index 977b19ef4c..e733ba04cf 100644 --- a/macros/scripts/maps.asm +++ b/macros/scripts/maps.asm @@ -1,39 +1,39 @@ -map_id: MACRO +MACRO map_id db GROUP_\1, MAP_\1 ENDM object_const_def EQUS "const_def 1" -def_scene_scripts: MACRO +MACRO def_scene_scripts REDEF _NUM_SCENE_SCRIPTS EQUS "_NUM_SCENE_SCRIPTS_\@" db {_NUM_SCENE_SCRIPTS} def {_NUM_SCENE_SCRIPTS} = 0 ENDM -scene_script: MACRO +MACRO scene_script dw \1 ; script redef {_NUM_SCENE_SCRIPTS} += 1 ENDM -def_callbacks: MACRO +MACRO def_callbacks REDEF _NUM_CALLBACKS EQUS "_NUM_CALLBACKS_\@" db {_NUM_CALLBACKS} def {_NUM_CALLBACKS} = 0 ENDM -callback: MACRO +MACRO callback db \1 ; type dw \2 ; script redef {_NUM_CALLBACKS} += 1 ENDM -def_warp_events: MACRO +MACRO def_warp_events REDEF _NUM_WARP_EVENTS EQUS "_NUM_WARP_EVENTS_\@" db {_NUM_WARP_EVENTS} def {_NUM_WARP_EVENTS} = 0 ENDM -warp_event: MACRO +MACRO warp_event db \2 ; y db \1 ; x db \4 ; warp_to @@ -41,13 +41,13 @@ warp_event: MACRO redef {_NUM_WARP_EVENTS} += 1 ENDM -def_coord_events: MACRO +MACRO def_coord_events REDEF _NUM_COORD_EVENTS EQUS "_NUM_COORD_EVENTS_\@" db {_NUM_COORD_EVENTS} def {_NUM_COORD_EVENTS} = 0 ENDM -coord_event: MACRO +MACRO coord_event db \3 ; scene_id db \2 ; y db \1 ; x @@ -55,13 +55,13 @@ coord_event: MACRO redef {_NUM_COORD_EVENTS} += 1 ENDM -def_bg_events: MACRO +MACRO def_bg_events REDEF _NUM_BG_EVENTS EQUS "_NUM_BG_EVENTS_\@" db {_NUM_BG_EVENTS} def {_NUM_BG_EVENTS} = 0 ENDM -bg_event: MACRO +MACRO bg_event db \2 ; y db \1 ; x db \3 ; function @@ -77,7 +77,7 @@ bg_event: MACRO redef {_NUM_BG_EVENTS} += 1 ENDM -def_object_events: MACRO +MACRO def_object_events REDEF _NUM_OBJECT_EVENTS EQUS "_NUM_OBJECT_EVENTS_\@" if !_NARG db {_NUM_OBJECT_EVENTS} @@ -85,7 +85,7 @@ def_object_events: MACRO def {_NUM_OBJECT_EVENTS} = 0 ENDM -object_event: MACRO +MACRO object_event db \3 ; sprite db \2 + 4 ; y db \1 + 4 ; x @@ -110,23 +110,23 @@ object_event: MACRO redef {_NUM_OBJECT_EVENTS} += 1 ENDM -itemball_event: MACRO +MACRO itemball_event object_event \1, \2, SPRITE_BALL_CUT_FRUIT, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_ITEMBALL, PLAYEREVENT_ITEMBALL, \3, \4, \5 ENDM -keyitemball_event: MACRO +MACRO keyitemball_event object_event \1, \2, SPRITE_BALL_CUT_FRUIT, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_ITEMBALL, PLAYEREVENT_KEYITEMBALL, \3, \4 ENDM -tmhmball_event: MACRO +MACRO tmhmball_event object_event \1, \2, SPRITE_BALL_CUT_FRUIT, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_ITEMBALL, PLAYEREVENT_TMHMBALL, \3, \4 ENDM -cuttree_event: MACRO +MACRO cuttree_event object_event \1, \2, SPRITE_BALL_CUT_FRUIT, SPRITEMOVEDATA_CUTTABLE_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_COMMAND, jumpstd, cuttree, \3 ENDM -fruittree_event: MACRO +MACRO fruittree_event if _NARG == 5 object_event \1, \2, SPRITE_BALL_CUT_FRUIT, SPRITEMOVEDATA_FRUIT, 0, \3 - 1, -1, -1, \5, OBJECTTYPE_COMMAND, fruittree, \3, \4, -1 else @@ -134,7 +134,7 @@ fruittree_event: MACRO endc ENDM -strengthboulder_event: MACRO +MACRO strengthboulder_event if _NARG == 2 object_event \1, \2, SPRITE_BOULDER_ROCK_FOSSIL, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_COMMAND, jumpstd, strengthboulder, -1 else @@ -142,7 +142,7 @@ strengthboulder_event: MACRO endc ENDM -smashrock_event: MACRO +MACRO smashrock_event if _NARG == 2 object_event \1, \2, SPRITE_BOULDER_ROCK_FOSSIL, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_COMMAND, jumpstd, smashrock, 0, -1 else @@ -150,27 +150,27 @@ smashrock_event: MACRO endc ENDM -pokemon_event: MACRO +MACRO pokemon_event object_event \1, \2, SPRITE_MON_ICON, SPRITEMOVEDATA_POKEMON, 0, \3, \4, \5, \6, OBJECTTYPE_POKEMON, \3, \7, \8 ENDM -pc_nurse_event: MACRO +MACRO pc_nurse_event object_event \1, \2, SPRITE_BOWING_NURSE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_COMMAND, jumpstd, pokecenternurse, -1 ENDM -mart_clerk_event: MACRO +MACRO mart_clerk_event object_event \1, \2, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_COMMAND, pokemart, \3, \4, -1 ENDM -trainer: MACRO +MACRO trainer ; flag, group, id, seen text, win text, lost text, talk-again text dw \3 db \1, \2 dw \4, \5, \6, \7 ENDM -generictrainer: MACRO +MACRO generictrainer ; flag, group, id, seen text, win text dw \3 db \1, \2 @@ -178,12 +178,12 @@ generictrainer: MACRO ENDM -elevfloor: MACRO +MACRO elevfloor db \1, \2 map_id \3 ENDM -stonetable: MACRO +MACRO stonetable db \1, \2 dw \3 ENDM diff --git a/macros/scripts/movement.asm b/macros/scripts/movement.asm index 17fac48c40..6accda2e9d 100644 --- a/macros/scripts/movement.asm +++ b/macros/scripts/movement.asm @@ -1,517 +1,517 @@ const_def const movement_turn_head_down -turn_head_down: MACRO +MACRO turn_head_down db movement_turn_head_down ; $00 ENDM const movement_turn_head_up -turn_head_up: MACRO +MACRO turn_head_up db movement_turn_head_up ; $01 ENDM const movement_turn_head_left -turn_head_left: MACRO +MACRO turn_head_left db movement_turn_head_left ; $02 ENDM const movement_turn_head_right -turn_head_right: MACRO +MACRO turn_head_right db movement_turn_head_right ; $03 ENDM const movement_turn_step_down -turn_step_down: MACRO +MACRO turn_step_down db movement_turn_step_down ; $04 ENDM const movement_turn_step_up -turn_step_up: MACRO +MACRO turn_step_up db movement_turn_step_up ; $05 ENDM const movement_turn_step_left -turn_step_left: MACRO +MACRO turn_step_left db movement_turn_step_left ; $06 ENDM const movement_turn_step_right -turn_step_right: MACRO +MACRO turn_step_right db movement_turn_step_right ; $07 ENDM const movement_slow_step_down -slow_step_down: MACRO +MACRO slow_step_down db movement_slow_step_down ; $08 ENDM const movement_slow_step_up -slow_step_up: MACRO +MACRO slow_step_up db movement_slow_step_up ; $09 ENDM const movement_slow_step_left -slow_step_left: MACRO +MACRO slow_step_left db movement_slow_step_left ; $0a ENDM const movement_slow_step_right -slow_step_right: MACRO +MACRO slow_step_right db movement_slow_step_right ; $0b ENDM const movement_step_down -step_down: MACRO +MACRO step_down db movement_step_down ; $0c ENDM const movement_step_up -step_up: MACRO +MACRO step_up db movement_step_up ; $0d ENDM const movement_step_left -step_left: MACRO +MACRO step_left db movement_step_left ; $0e ENDM const movement_step_right -step_right: MACRO +MACRO step_right db movement_step_right ; $0f ENDM const movement_big_step_down -big_step_down: MACRO +MACRO big_step_down db movement_big_step_down ; $10 ENDM const movement_big_step_up -big_step_up: MACRO +MACRO big_step_up db movement_big_step_up ; $11 ENDM const movement_big_step_left -big_step_left: MACRO +MACRO big_step_left db movement_big_step_left ; $12 ENDM const movement_big_step_right -big_step_right: MACRO +MACRO big_step_right db movement_big_step_right ; $13 ENDM const movement_slow_slide_step_down -slow_slide_step_down: MACRO +MACRO slow_slide_step_down db movement_slow_slide_step_down ; $14 ENDM const movement_slow_slide_step_up -slow_slide_step_up: MACRO +MACRO slow_slide_step_up db movement_slow_slide_step_up ; $15 ENDM const movement_slow_slide_step_left -slow_slide_step_left: MACRO +MACRO slow_slide_step_left db movement_slow_slide_step_left ; $16 ENDM const movement_slow_slide_step_right -slow_slide_step_right: MACRO +MACRO slow_slide_step_right db movement_slow_slide_step_right ; $17 ENDM const movement_slide_step_down -slide_step_down: MACRO +MACRO slide_step_down db movement_slide_step_down ; $18 ENDM const movement_slide_step_up -slide_step_up: MACRO +MACRO slide_step_up db movement_slide_step_up ; $19 ENDM const movement_slide_step_left -slide_step_left: MACRO +MACRO slide_step_left db movement_slide_step_left ; $1a ENDM const movement_slide_step_right -slide_step_right: MACRO +MACRO slide_step_right db movement_slide_step_right ; $1b ENDM const movement_fast_slide_step_down -fast_slide_step_down: MACRO +MACRO fast_slide_step_down db movement_fast_slide_step_down ; $1c ENDM const movement_fast_slide_step_up -fast_slide_step_up: MACRO +MACRO fast_slide_step_up db movement_fast_slide_step_up ; $1d ENDM const movement_fast_slide_step_left -fast_slide_step_left: MACRO +MACRO fast_slide_step_left db movement_fast_slide_step_left ; $1e ENDM const movement_fast_slide_step_right -fast_slide_step_right: MACRO +MACRO fast_slide_step_right db movement_fast_slide_step_right ; $1f ENDM const movement_turn_away_down -turn_away_down: MACRO +MACRO turn_away_down db movement_turn_away_down ; $20 ENDM const movement_turn_away_up -turn_away_up: MACRO +MACRO turn_away_up db movement_turn_away_up ; $21 ENDM const movement_turn_away_left -turn_away_left: MACRO +MACRO turn_away_left db movement_turn_away_left ; $22 ENDM const movement_turn_away_right -turn_away_right: MACRO +MACRO turn_away_right db movement_turn_away_right ; $23 ENDM const movement_turn_in_down -turn_in_down: MACRO +MACRO turn_in_down db movement_turn_in_down ; $24 ENDM const movement_turn_in_up -turn_in_up: MACRO +MACRO turn_in_up db movement_turn_in_up ; $25 ENDM const movement_turn_in_left -turn_in_left: MACRO +MACRO turn_in_left db movement_turn_in_left ; $26 ENDM const movement_turn_in_right -turn_in_right: MACRO +MACRO turn_in_right db movement_turn_in_right ; $27 ENDM const movement_turn_waterfall_down -turn_waterfall_down: MACRO +MACRO turn_waterfall_down db movement_turn_waterfall_down ; $28 ENDM const movement_turn_waterfall_up -turn_waterfall_up: MACRO +MACRO turn_waterfall_up db movement_turn_waterfall_up ; $29 ENDM const movement_turn_waterfall_left -turn_waterfall_left: MACRO +MACRO turn_waterfall_left db movement_turn_waterfall_left ; $2a ENDM const movement_turn_waterfall_right -turn_waterfall_right: MACRO +MACRO turn_waterfall_right db movement_turn_waterfall_right ; $2b ENDM const movement_slow_jump_step_down -slow_jump_step_down: MACRO +MACRO slow_jump_step_down db movement_slow_jump_step_down ; $2c ENDM const movement_slow_jump_step_up -slow_jump_step_up: MACRO +MACRO slow_jump_step_up db movement_slow_jump_step_up ; $2d ENDM const movement_slow_jump_step_left -slow_jump_step_left: MACRO +MACRO slow_jump_step_left db movement_slow_jump_step_left ; $2e ENDM const movement_slow_jump_step_right -slow_jump_step_right: MACRO +MACRO slow_jump_step_right db movement_slow_jump_step_right ; $2f ENDM const movement_jump_step_down -jump_step_down: MACRO +MACRO jump_step_down db movement_jump_step_down ; $30 ENDM const movement_jump_step_up -jump_step_up: MACRO +MACRO jump_step_up db movement_jump_step_up ; $31 ENDM const movement_jump_step_left -jump_step_left: MACRO +MACRO jump_step_left db movement_jump_step_left ; $32 ENDM const movement_jump_step_right -jump_step_right: MACRO +MACRO jump_step_right db movement_jump_step_right ; $33 ENDM const movement_fast_jump_step_down -fast_jump_step_down: MACRO +MACRO fast_jump_step_down db movement_fast_jump_step_down ; $34 ENDM const movement_fast_jump_step_up -fast_jump_step_up: MACRO +MACRO fast_jump_step_up db movement_fast_jump_step_up ; $35 ENDM const movement_fast_jump_step_left -fast_jump_step_left: MACRO +MACRO fast_jump_step_left db movement_fast_jump_step_left ; $36 ENDM const movement_fast_jump_step_right -fast_jump_step_right: MACRO +MACRO fast_jump_step_right db movement_fast_jump_step_right ; $37 ENDM const movement_remove_sliding -remove_sliding: MACRO +MACRO remove_sliding db movement_remove_sliding ; $38 ENDM const movement_set_sliding -set_sliding: MACRO +MACRO set_sliding db movement_set_sliding ; $39 ENDM const movement_remove_fixed_facing -remove_fixed_facing: MACRO +MACRO remove_fixed_facing db movement_remove_fixed_facing ; $3a ENDM const movement_fix_facing -fix_facing: MACRO +MACRO fix_facing db movement_fix_facing ; $3b ENDM const movement_show_object -show_object: MACRO +MACRO show_object db movement_show_object ; $3c ENDM const movement_hide_object -hide_object: MACRO +MACRO hide_object db movement_hide_object ; $3d ENDM const movement_step_sleep_1 -step_sleep_1: MACRO +MACRO step_sleep_1 db movement_step_sleep_1 ; $3e ENDM const movement_step_sleep_2 -step_sleep_2: MACRO +MACRO step_sleep_2 db movement_step_sleep_2 ; $3f ENDM const movement_step_sleep_3 -step_sleep_3: MACRO +MACRO step_sleep_3 db movement_step_sleep_3 ; $40 ENDM const movement_step_sleep_4 -step_sleep_4: MACRO +MACRO step_sleep_4 db movement_step_sleep_4 ; $41 ENDM const movement_step_sleep_5 -step_sleep_5: MACRO +MACRO step_sleep_5 db movement_step_sleep_5 ; $42 ENDM const movement_step_sleep_6 -step_sleep_6: MACRO +MACRO step_sleep_6 db movement_step_sleep_6 ; $43 ENDM const movement_step_sleep_7 -step_sleep_7: MACRO +MACRO step_sleep_7 db movement_step_sleep_7 ; $44 ENDM const movement_step_sleep_8 -step_sleep_8: MACRO +MACRO step_sleep_8 db movement_step_sleep_8 ; $45 ENDM const movement_step_sleep -step_sleep: MACRO +MACRO step_sleep db movement_step_sleep ; $46 db \1 ; duration ENDM const movement_step_end -step_end: MACRO +MACRO step_end db movement_step_end ; $47 ENDM const movement_step_resume -step_resume: MACRO +MACRO step_resume db movement_step_resume ; $48 ENDM const movement_remove_object -remove_object: MACRO +MACRO remove_object db movement_remove_object ; $49 ENDM const movement_step_loop -step_loop: MACRO +MACRO step_loop db movement_step_loop ; $4a ENDM const movement_step_4b -step_4b: MACRO +MACRO step_4b db movement_step_4b ; $4b ENDM const movement_teleport_from -teleport_from: MACRO +MACRO teleport_from db movement_teleport_from ; $4c ENDM const movement_teleport_to -teleport_to: MACRO +MACRO teleport_to db movement_teleport_to ; $4d ENDM const movement_skyfall -skyfall: MACRO +MACRO skyfall db movement_skyfall ; $4e ENDM const movement_step_dig -step_dig: MACRO +MACRO step_dig db movement_step_dig ; $4f db \1 ENDM const movement_step_bump -step_bump: MACRO +MACRO step_bump db movement_step_bump ; $50 ENDM const movement_fish_got_bite -fish_got_bite: MACRO +MACRO fish_got_bite db movement_fish_got_bite ; $51 ENDM const movement_fish_cast_rod -fish_cast_rod: MACRO +MACRO fish_cast_rod db movement_fish_cast_rod ; $52 ENDM const movement_hide_emote -hide_emote: MACRO +MACRO hide_emote db movement_hide_emote ; $53 ENDM const movement_show_emote -show_emote: MACRO +MACRO show_emote db movement_show_emote ; $54 ENDM const movement_step_shake -step_shake: MACRO +MACRO step_shake db movement_step_shake ; $55 db \1 ; displacement ENDM const movement_tree_shake -tree_shake: MACRO +MACRO tree_shake db movement_tree_shake ENDM const movement_rock_smash -rock_smash: MACRO +MACRO rock_smash db movement_rock_smash ; $57 db \1 ENDM const movement_return_dig -return_dig: MACRO +MACRO return_dig db movement_return_dig ; $58 db \1 ENDM const movement_skyfall_top -skyfall_top: MACRO +MACRO skyfall_top db movement_skyfall_top ; $59 ENDM const movement_run_step_down -run_step_down: MACRO +MACRO run_step_down db movement_run_step_down ; $5a ENDM const movement_run_step_up -run_step_up: MACRO +MACRO run_step_up db movement_run_step_up ; $5b ENDM const movement_run_step_left -run_step_left: MACRO +MACRO run_step_left db movement_run_step_left ; $5c ENDM const movement_run_step_right -run_step_right: MACRO +MACRO run_step_right db movement_run_step_right ; $5d ENDM const movement_fast_step_down -fast_step_down: MACRO +MACRO fast_step_down db movement_fast_step_down ; $5e ENDM const movement_fast_step_up -fast_step_up: MACRO +MACRO fast_step_up db movement_fast_step_up ; $5f ENDM const movement_fast_step_left -fast_step_left: MACRO +MACRO fast_step_left db movement_fast_step_left ; $60 ENDM const movement_fast_step_right -fast_step_right: MACRO +MACRO fast_step_right db movement_fast_step_right ; $61 ENDM const movement_stairs_step_down -stairs_step_down: MACRO +MACRO stairs_step_down db movement_stairs_step_down ; $62 ENDM const movement_stairs_step_up -stairs_step_up: MACRO +MACRO stairs_step_up db movement_stairs_step_up ; $63 ENDM const movement_stairs_step_left -stairs_step_left: MACRO +MACRO stairs_step_left db movement_stairs_step_left ; $64 ENDM const movement_stairs_step_right -stairs_step_right: MACRO +MACRO stairs_step_right db movement_stairs_step_right ; $65 ENDM diff --git a/macros/scripts/text.asm b/macros/scripts/text.asm index 4d3830a6ba..d972e391c6 100644 --- a/macros/scripts/text.asm +++ b/macros/scripts/text.asm @@ -9,44 +9,44 @@ done EQUS "db \"\"" ; End a text box. prompt EQUS "db \"\"" ; Prompt the player to end a text box (initiating some other event). page EQUS "db \"@\"," ; Start a new Pokedex page. -text_ram: MACRO +MACRO text_ram db "" dw \1 ENDM -text_promptbutton: MACRO +MACRO text_promptbutton db "" ENDM -text_asm: MACRO +MACRO text_asm db "" ENDM -text_decimal: MACRO +MACRO text_decimal db "" dw \1 ; address dn \2, \3 ; bytes, digits ENDM -text_pause: MACRO +MACRO text_pause db "" ENDM -text_sound: MACRO +MACRO text_sound db "" db \1 ; sfx ENDM -text_today: MACRO +MACRO text_today db "" ENDM -text_far: MACRO +MACRO text_far db "" dw \1 db BANK(\1) ENDM -text_end: MACRO +MACRO text_end db "@" ENDM diff --git a/macros/scripts/trade_anims.asm b/macros/scripts/trade_anims.asm index dab4deb940..b18becefb0 100755 --- a/macros/scripts/trade_anims.asm +++ b/macros/scripts/trade_anims.asm @@ -1,166 +1,166 @@ const_def const tradeanim_next_command -tradeanim_next: MACRO +MACRO tradeanim_next db tradeanim_next_command ; 00 ENDM const tradeanim_show_givemon_data_command -tradeanim_show_givemon_data: MACRO +MACRO tradeanim_show_givemon_data db tradeanim_show_givemon_data_command ; 01 ENDM const tradeanim_show_getmon_data_command -tradeanim_show_getmon_data: MACRO +MACRO tradeanim_show_getmon_data db tradeanim_show_getmon_data_command ; 02 ENDM const tradeanim_enter_link_tube_command -tradeanim_enter_link_tube: MACRO +MACRO tradeanim_enter_link_tube db tradeanim_enter_link_tube_command ; 03 ENDM const_skip const tradeanim_exit_link_tube_command -tradeanim_exit_link_tube: MACRO +MACRO tradeanim_exit_link_tube db tradeanim_exit_link_tube_command ; 05 ENDM const tradeanim_tube_to_ot_command -tradeanim_tube_to_ot: MACRO +MACRO tradeanim_tube_to_ot db tradeanim_tube_to_ot_command ; 06 ENDM const_skip 7 const tradeanim_tube_to_player_command -tradeanim_tube_to_player: MACRO +MACRO tradeanim_tube_to_player db tradeanim_tube_to_player_command ; 0e ENDM const_skip 7 const tradeanim_sent_to_ot_text_command -tradeanim_sent_to_ot_text: MACRO +MACRO tradeanim_sent_to_ot_text db tradeanim_sent_to_ot_text_command ; 16 ENDM const tradeanim_ot_bids_farewell_command -tradeanim_ot_bids_farewell: MACRO +MACRO tradeanim_ot_bids_farewell db tradeanim_ot_bids_farewell_command ; 17 ENDM const tradeanim_take_care_of_text_command -tradeanim_take_care_of_text: MACRO +MACRO tradeanim_take_care_of_text db tradeanim_take_care_of_text_command ; 18 ENDM const tradeanim_ot_sends_text_1_command -tradeanim_ot_sends_text_1: MACRO +MACRO tradeanim_ot_sends_text_1 db tradeanim_ot_sends_text_1_command ; 19 ENDM const tradeanim_ot_sends_text_2_command -tradeanim_ot_sends_text_2: MACRO +MACRO tradeanim_ot_sends_text_2 db tradeanim_ot_sends_text_2_command ; 1a ENDM const tradeanim_setup_givemon_scroll_command -tradeanim_setup_givemon_scroll: MACRO +MACRO tradeanim_setup_givemon_scroll db tradeanim_setup_givemon_scroll_command ; 1b ENDM const tradeanim_do_givemon_scroll_command -tradeanim_do_givemon_scroll: MACRO +MACRO tradeanim_do_givemon_scroll db tradeanim_do_givemon_scroll_command ; 1c ENDM const tradeanim_frontpic_scroll_command -tradeanim_frontpic_scroll: MACRO +MACRO tradeanim_frontpic_scroll db tradeanim_frontpic_scroll_command ; 1d ENDM const tradeanim_textbox_scroll_command -tradeanim_textbox_scroll: MACRO +MACRO tradeanim_textbox_scroll db tradeanim_textbox_scroll_command ; 1e ENDM const tradeanim_scroll_out_right_command -tradeanim_scroll_out_right: MACRO +MACRO tradeanim_scroll_out_right db tradeanim_scroll_out_right_command ; 1f ENDM const_skip const tradeanim_wait_80_command -tradeanim_wait_80: MACRO +MACRO tradeanim_wait_80 db tradeanim_wait_80_command ; 21 ENDM const tradeanim_wait_40_command -tradeanim_wait_40: MACRO +MACRO tradeanim_wait_40 db tradeanim_wait_40_command ; 22 ENDM const tradeanim_rocking_ball_command -tradeanim_rocking_ball: MACRO +MACRO tradeanim_rocking_ball db tradeanim_rocking_ball_command ; 23 ENDM const tradeanim_drop_ball_command -tradeanim_drop_ball: MACRO +MACRO tradeanim_drop_ball db tradeanim_drop_ball_command ; 24 ENDM const tradeanim_wait_anim_command -tradeanim_wait_anim: MACRO +MACRO tradeanim_wait_anim db tradeanim_wait_anim_command ; 25 ENDM const_skip const tradeanim_poof_command -tradeanim_poof: MACRO +MACRO tradeanim_poof db tradeanim_poof_command ; 27 ENDM const tradeanim_bulge_through_tube_command -tradeanim_bulge_through_tube: MACRO +MACRO tradeanim_bulge_through_tube db tradeanim_bulge_through_tube_command ; 28 ENDM const tradeanim_give_trademon_sfx_command -tradeanim_give_trademon_sfx: MACRO +MACRO tradeanim_give_trademon_sfx db tradeanim_give_trademon_sfx_command ; 29 ENDM const tradeanim_get_trademon_sfx_command -tradeanim_get_trademon_sfx: MACRO +MACRO tradeanim_get_trademon_sfx db tradeanim_get_trademon_sfx_command ; 2a ENDM const tradeanim_end_command -tradeanim_end: MACRO +MACRO tradeanim_end db tradeanim_end_command ; 2b ENDM const tradeanim_animate_frontpic_command -tradeanim_animate_frontpic: MACRO +MACRO tradeanim_animate_frontpic db tradeanim_animate_frontpic_command ; 2c ENDM const tradeanim_wait_96_command -tradeanim_wait_96: MACRO +MACRO tradeanim_wait_96 db tradeanim_wait_96_command ; 2d ENDM const tradeanim_wait_80_if_ot_egg_command -tradeanim_wait_80_if_ot_egg: MACRO +MACRO tradeanim_wait_80_if_ot_egg db tradeanim_wait_80_if_ot_egg_command ; 2e ENDM const tradeanim_wait_180_if_ot_egg_command -tradeanim_wait_180_if_ot_egg: MACRO +MACRO tradeanim_wait_180_if_ot_egg db tradeanim_wait_180_if_ot_egg_command ; 2f ENDM diff --git a/macros/wram.asm b/macros/wram.asm index f59322b376..2a12516c15 100755 --- a/macros/wram.asm +++ b/macros/wram.asm @@ -1,8 +1,8 @@ -flag_array: MACRO +MACRO flag_array ds ((\1) + 7) / 8 ENDM -breed_struct: MACRO +MACRO breed_struct \1Species:: db \1Item:: db \1Moves:: ds NUM_MOVES @@ -39,7 +39,7 @@ breed_struct: MACRO \1Level:: db ENDM -party_struct: MACRO +MACRO party_struct breed_struct \1 \1Status:: db \1Unused:: db @@ -54,7 +54,7 @@ party_struct: MACRO \1End:: ENDM -battle_struct: MACRO +MACRO battle_struct \1Species:: db \1Item:: db \1Moves:: ds NUM_MOVES @@ -91,7 +91,7 @@ battle_struct: MACRO \1StructEnd:: ENDM -savemon_struct: MACRO +MACRO savemon_struct \1Species:: db \1Item:: db \1Moves:: ds NUM_MOVES @@ -132,21 +132,21 @@ savemon_struct: MACRO \1End:: ENDM -pokedb: MACRO +MACRO pokedb \1Mons:: \1Mon1:: savemon_struct \1Mon1 \1Mon2:: ds SAVEMON_STRUCT_LENGTH * (MONDB_ENTRIES - 1) \1End:: ENDM -newbox: MACRO +MACRO newbox \1Entries:: ds MONS_PER_BOX \1Banks:: flag_array MONS_PER_BOX \1Name:: ds BOX_NAME_LENGTH \1Theme:: db ENDM -map_connection_struct: MACRO +MACRO map_connection_struct \1ConnectedMapGroup:: db \1ConnectedMapNumber:: db \1ConnectionStripPointer:: dw @@ -158,7 +158,7 @@ map_connection_struct: MACRO \1ConnectionWindow:: dw ENDM -channel_struct: MACRO +MACRO channel_struct \1MusicID:: dw \1MusicBank:: db \1Flags:: db ; 0:on/off 1:subroutine 3:sfx 4:noise 5:rest @@ -201,7 +201,7 @@ channel_struct: MACRO \1Field0x30:: dw ENDM -mailmsg: MACRO +MACRO mailmsg \1Message:: ds MAIL_MSG_LENGTH \1MessageEnd:: db \1Author:: ds PLAYER_NAME_LENGTH @@ -212,7 +212,7 @@ mailmsg: MACRO \1End:: ENDM -hof_mon: MACRO +MACRO hof_mon \1Species:: db \1ID:: dw \1Personality:: dw @@ -221,7 +221,7 @@ hof_mon: MACRO \1End:: ENDM -roam_struct: MACRO +MACRO roam_struct \1Species:: db \1Level:: db \1MapGroup:: db @@ -234,13 +234,13 @@ roam_struct: MACRO \1End:: ENDM -bugcontestwinner: MACRO +MACRO bugcontestwinner \1PersonID:: db \1Mon:: db \1Score:: dw ENDM -hall_of_fame: MACRO +MACRO hall_of_fame \1WinCount:: db \1Mon1:: hof_mon \1Mon1 \1Mon2:: hof_mon \1Mon2 @@ -251,7 +251,7 @@ hall_of_fame: MACRO \1End:: db ENDM -link_battle_record: MACRO +MACRO link_battle_record \1Name:: ds NAME_LENGTH - 1 \1ID:: dw \1Wins:: dw @@ -259,7 +259,7 @@ link_battle_record: MACRO \1Draws:: dw ENDM -trademon: MACRO +MACRO trademon \1Species:: db \1SpeciesName:: ds MON_NAME_LENGTH \1Nickname:: ds MON_NAME_LENGTH @@ -282,7 +282,7 @@ trademon: MACRO \1End:: ENDM -move_struct: MACRO +MACRO move_struct \1Animation:: db \1Effect:: db \1Power:: db @@ -294,7 +294,7 @@ move_struct: MACRO \1End:: ENDM -slot_reel: MACRO +MACRO slot_reel \1ReelAction:: db \1TilemapAddr:: dw \1Position:: db @@ -311,7 +311,7 @@ slot_reel: MACRO \1Slot0f:: db ENDM -object_struct: MACRO +MACRO object_struct \1Sprite:: db \1MapObjectIndex:: db \1SpriteTile:: db @@ -347,7 +347,7 @@ object_struct: MACRO \1StructEnd:: ENDM -map_object: MACRO +MACRO map_object \1ObjectStructID:: db \1ObjectSprite:: db \1ObjectYCoord:: db @@ -362,7 +362,7 @@ map_object: MACRO \1ObjectEventFlag:: dw ENDM -sprite_oam_struct: MACRO +MACRO sprite_oam_struct \1YCoord:: db \1XCoord:: db \1TileID:: db @@ -375,7 +375,7 @@ sprite_oam_struct: MACRO ; bit 2-0: pal # (cgb only) ENDM -sprite_anim_struct: MACRO +MACRO sprite_anim_struct \1Index:: db \1FramesetID:: db \1AnimSeqID:: db @@ -394,7 +394,7 @@ sprite_anim_struct: MACRO \1Var4:: ds 1 ENDM -battle_anim_struct: MACRO +MACRO battle_anim_struct \1_Index:: db \1_Anim01:: db \1_Anim02:: db @@ -421,7 +421,7 @@ battle_anim_struct: MACRO \1_Anim17:: db ENDM -battle_bg_effect: MACRO +MACRO battle_bg_effect \1_Function:: db \1_01:: db \1_02:: db diff --git a/maps/FightingDojo.asm b/maps/FightingDojo.asm index 43e338be44..0abd33caed 100644 --- a/maps/FightingDojo.asm +++ b/maps/FightingDojo.asm @@ -43,7 +43,7 @@ FightingDojoSetupRematchesCallback: iftrue .SetupDailyRematches endcallback -rematch: MACRO +MACRO rematch ; rematch person, varsprite, sprite, y, x, face moveobject \1, \5, \4 turnobject \1, \6 @@ -51,12 +51,12 @@ rematch: MACRO variablesprite \2, \3 ENDM -rematch_left: MACRO +MACRO rematch_left ; rematch_left person, varsprite, sprite rematch \1, \2, \3, 6, 3, RIGHT ENDM -rematch_right: MACRO +MACRO rematch_right ; rematch_right person, varsprite, sprite rematch \1, \2, \3, 6, 6, LEFT ENDM @@ -355,7 +355,7 @@ FightingDojoSign2Text: line "side!" done -rematch_script: MACRO +MACRO rematch_script ; rematch_script name, trainer, flag faceplayer opentext diff --git a/maps/UndergroundPathSwitchRoomEntrances.asm b/maps/UndergroundPathSwitchRoomEntrances.asm index cd1a73c37b..2c94fb666c 100644 --- a/maps/UndergroundPathSwitchRoomEntrances.asm +++ b/maps/UndergroundPathSwitchRoomEntrances.asm @@ -50,7 +50,7 @@ UNDERGROUND_DOOR_CLOSED3 EQU $3f UNDERGROUND_DOOR_OPEN1 EQU $2d UNDERGROUND_DOOR_OPEN2 EQU $3d -ugdoor: MACRO +MACRO ugdoor \1_YCOORD EQU \2 \1_XCOORD EQU \3 ENDM @@ -72,7 +72,7 @@ ENDM ugdoor UGDOOR_15, $12, $0a ugdoor UGDOOR_16, $12, $0c -doorstate: MACRO +MACRO doorstate changeblock UGDOOR_\1_YCOORD, UGDOOR_\1_XCOORD, UNDERGROUND_DOOR_\2 ENDM diff --git a/rgbdscheck.asm b/rgbdscheck.asm index 88be2aff3f..11c56f1a5f 100644 --- a/rgbdscheck.asm +++ b/rgbdscheck.asm @@ -3,7 +3,7 @@ MINOR EQU 5 PATCH EQU 2 RC EQU 0 -wrong_rgbds: MACRO +MACRO wrong_rgbds fail "polishedcrystal requires rgbds v0.5.2 or newer." ENDM