summaryrefslogtreecommitdiff
path: root/macros/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'macros/scripts')
-rw-r--r--macros/scripts/battle_commands.asm3
-rw-r--r--macros/scripts/events.asm96
-rw-r--r--macros/scripts/gfx_anims.asm2
-rw-r--r--macros/scripts/maps.asm35
-rw-r--r--macros/scripts/trade_anims.asm14
5 files changed, 73 insertions, 77 deletions
diff --git a/macros/scripts/battle_commands.asm b/macros/scripts/battle_commands.asm
index 4ae8dbaf4..33d7dc611 100644
--- a/macros/scripts/battle_commands.asm
+++ b/macros/scripts/battle_commands.asm
@@ -181,7 +181,6 @@ ENDM
command startloop ; ae
command curl ; af
-__enum__ set $fe
-
+ enum_start $fe
command endturn ; fe
command endmove ; ff
diff --git a/macros/scripts/events.asm b/macros/scripts/events.asm
index 9bca1c004..6f6d1992d 100644
--- a/macros/scripts/events.asm
+++ b/macros/scripts/events.asm
@@ -37,16 +37,16 @@ ptjump: MACRO
dw \1 ; pointer
ENDM
- enum if_equal_command ; $06
-if_equal: MACRO
- db if_equal_command
+ enum ifequal_command ; $06
+ifequal: MACRO
+ db ifequal_command
db \1 ; byte
dw \2 ; pointer
ENDM
- enum if_not_equal_command ; $07
-if_not_equal: MACRO
- db if_not_equal_command
+ enum ifnotequal_command ; $07
+ifnotequal: MACRO
+ db ifnotequal_command
db \1 ; byte
dw \2 ; pointer
ENDM
@@ -63,16 +63,16 @@ iftrue: MACRO
dw \1 ; pointer
ENDM
- enum if_greater_than_command ; $0a
-if_greater_than: MACRO
- db if_greater_than_command
+ enum ifgreater_command ; $0a
+ifgreater: MACRO
+ db ifgreater_command
db \1 ; byte
dw \2 ; pointer
ENDM
- enum if_less_than_command ; $0b
-if_less_than: MACRO
- db if_less_than_command
+ enum ifless_command ; $0b
+ifless: MACRO
+ db ifless_command
db \1 ; byte
dw \2 ; pointer
ENDM
@@ -110,13 +110,13 @@ ENDM
enum checkmapscene_command ; $11
checkmapscene: MACRO
db checkmapscene_command
- map \1 ; map
+ map_id \1 ; map
ENDM
enum setmapscene_command ; $12
setmapscene: MACRO
db setmapscene_command
- map \1 ; map
+ map_id \1 ; map
db \2 ; scene_id
ENDM
@@ -283,10 +283,6 @@ checktime: MACRO
db \1 ; time
ENDM
-checkmorn EQUS "checktime MORN"
-checkday EQUS "checktime DAY"
-checknite EQUS "checktime NITE"
-
enum checkpoke_command ; $2c
checkpoke: MACRO
db checkpoke_command
@@ -298,20 +294,20 @@ givepoke: MACRO
db givepoke_command
db \1 ; pokemon
db \2 ; level
- if _NARG >= 3
+if _NARG >= 3
db \3 ; item
- if _NARG >= 4
+if _NARG >= 4
db \4 ; trainer
- if \4
+if \4
dw \5 ; trainer_name_pointer
dw \6 ; pkmn_nickname
- endc
- else
+endc
+else
db 0
- endc
- else
+endc
+else
db 0, 0
- endc
+endc
ENDM
enum giveegg_command ; $2e
@@ -389,19 +385,19 @@ ENDM
warpmod: MACRO
db warpmod_command
db \1 ; warp_id
- map \2 ; map
+ map_id \2 ; map
ENDM
enum blackoutmod_command ; $3b
blackoutmod: MACRO
db blackoutmod_command
- map \1 ; map
+ map_id \1 ; map
ENDM
enum warp_command ; $3c
warp: MACRO
db warp_command
- map \1 ; map
+ map_id \1 ; map
db \2 ; x
db \3 ; y
ENDM
@@ -520,10 +516,10 @@ yesorno: MACRO
db yesorno_command
ENDM
- enum loadmenudata_command ; $4f
-loadmenudata: MACRO
- db loadmenudata_command
- dw \1 ; data
+ enum loadmenuheader_command ; $4f
+loadmenuheader: MACRO
+ db loadmenuheader_command
+ dw \1 ; menu_header
ENDM
enum closewindow_command ; $50
@@ -651,14 +647,14 @@ scripttalkafter: MACRO
db scripttalkafter_command
ENDM
- enum end_if_just_battled_command ; $66
-end_if_just_battled: MACRO
- db end_if_just_battled_command
+ enum endifjustbattled_command ; $66
+endifjustbattled: MACRO
+ db endifjustbattled_command
ENDM
- enum check_just_battled_command ; $67
-check_just_battled: MACRO
- db check_just_battled_command
+ enum checkjustbattled_command ; $67
+checkjustbattled: MACRO
+ db checkjustbattled_command
ENDM
enum setlasttalked_command ; $68
@@ -751,9 +747,9 @@ showemote: MACRO
db \3 ; time
ENDM
- enum spriteface_command ; $76
-spriteface: MACRO
- db spriteface_command
+ enum objectface_command ; $76
+objectface: MACRO
+ db objectface_command
db \1 ; object id
db \2 ; facing
ENDM
@@ -920,9 +916,9 @@ reloadandreturn: MACRO
db \1 ; which_method
ENDM
- enum end_all_command ; $93
-end_all: MACRO
- db end_all_command
+ enum endall_command ; $93
+endall: MACRO
+ db endall_command
ENDM
enum pokemart_command ; $94
@@ -1006,7 +1002,7 @@ ENDM
swarm: MACRO
db swarm_command
db \1 ; flag
- map \2 ; map
+ map_id \2 ; map
ENDM
enum halloffame_command ; $a1
@@ -1023,7 +1019,7 @@ ENDM
warpfacing: MACRO
db warpfacing_command
db \1 ; facing
- map \2 ; map
+ map_id \2 ; map
db \3 ; x
db \4 ; y
ENDM
@@ -1062,7 +1058,7 @@ wait: MACRO
db \1 ; duration
ENDM
- enum check_save_command ; $a9
-check_save: MACRO
- db check_save_command
+ enum checksave_command ; $a9
+checksave: MACRO
+ db checksave_command
ENDM
diff --git a/macros/scripts/gfx_anims.asm b/macros/scripts/gfx_anims.asm
index 943a000a9..8f33512ec 100644
--- a/macros/scripts/gfx_anims.asm
+++ b/macros/scripts/gfx_anims.asm
@@ -4,7 +4,7 @@ frame: MACRO
db \1
x = \2
if _NARG > 2
-rept _NARG +- 2
+rept _NARG + -2
x = x | (1 << (\3 + 1))
shift
endr
diff --git a/macros/scripts/maps.asm b/macros/scripts/maps.asm
index 31a1f16d9..3be893a6f 100644
--- a/macros/scripts/maps.asm
+++ b/macros/scripts/maps.asm
@@ -1,4 +1,4 @@
-map: MACRO
+map_id: MACRO
;\1: map id
db GROUP_\1, MAP_\1
ENDM
@@ -6,7 +6,8 @@ ENDM
scene_script: MACRO
;\1: script pointer
- dw \1, 0
+ dw \1
+ dw 0 ; filler
ENDM
callback: MACRO
@@ -15,19 +16,19 @@ callback: MACRO
dbw \1, \2
ENDM
-warp_def: MACRO
+warp_event: MACRO
;\1: x: left to right, starts at 0
;\2: y: top to bottom, starts at 0
-;\3: warp destination: starts at 1
-;\4: map id: from constants/map_constants.asm
- db \2, \1, \3
- map \4
+;\3: map id: from constants/map_constants.asm
+;\4: warp destination: starts at 1
+ db \2, \1, \4
+ map_id \3
ENDM
coord_event: MACRO
;\1: x: left to right, starts at 0
;\2: y: top to bottom, starts at 0
-;\3: scene id: controlled by setscene/setmapscene
+;\3: scene id: a SCENE_* constant; controlled by setscene/setmapscene
;\4: script pointer
db \3, \2, \1
db 0 ; filler
@@ -76,15 +77,15 @@ ENDM
trainer: MACRO
-;\1: flag: an EVENT_BEAT_* constant
-;\2: trainer group
-;\3: trainer id
+;\1: trainer group
+;\2: trainer id
+;\3: flag: an EVENT_BEAT_* constant
;\4: seen text
;\5: win text
;\6: loss text
;\7: after-battle text
- dw \1
- db \2, \3
+ dw \3
+ db \1, \2
dw \4, \5, \6, \7
ENDM
@@ -99,9 +100,9 @@ endc
ENDM
hiddenitem: MACRO
-;\1: flag: an EVENT_* constant
-;\2: item: from constants/item_constants.asm
- dwb \1, \2
+;\1: item: from constants/item_constants.asm
+;\2: flag: an EVENT_* constant
+ dwb \2, \1
ENDM
elevfloor: MACRO
@@ -109,7 +110,7 @@ elevfloor: MACRO
;\2: warp destination: starts at 1
;\3: map id
db \1, \2
- map \3
+ map_id \3
ENDM
conditional_event: MACRO
diff --git a/macros/scripts/trade_anims.asm b/macros/scripts/trade_anims.asm
index 94c9070aa..633047b82 100644
--- a/macros/scripts/trade_anims.asm
+++ b/macros/scripts/trade_anims.asm
@@ -21,7 +21,7 @@ tradeanim_enter_link_tube: MACRO
db tradeanim_enter_link_tube_command
ENDM
-__enum__ set $5
+ enum_start $05
enum tradeanim_exit_link_tube_command ; $05
tradeanim_exit_link_tube: MACRO
@@ -33,14 +33,14 @@ tradeanim_tube_to_ot: MACRO
db tradeanim_tube_to_ot_command
ENDM
-__enum__ set $0e
+ enum_start $0e
enum tradeanim_tube_to_player_command ; $0e
tradeanim_tube_to_player: MACRO
db tradeanim_tube_to_player_command
ENDM
-__enum__ set $16
+ enum_start $16
enum tradeanim_sent_to_ot_text_command ; $16
tradeanim_sent_to_ot_text: MACRO
@@ -92,7 +92,7 @@ tradeanim_scroll_out_right: MACRO
db tradeanim_scroll_out_right_command
ENDM
-__enum__ set $21
+ enum_start $21
enum tradeanim_wait_80_command ; $21
tradeanim_wait_80: MACRO
@@ -119,7 +119,7 @@ tradeanim_wait_anim: MACRO
db tradeanim_wait_anim_command
ENDM
-__enum__ set $27
+ enum_start $27
enum tradeanim_poof_command ; $27
tradeanim_poof: MACRO
@@ -185,7 +185,7 @@ mobiletradeanim_sendmon: MACRO
db mobiletradeanim_sendmon_command
ENDM
-__enum__ set $05
+ enum_start $05
enum mobiletradeanim_05_command ; $05
mobiletradeanim_05: MACRO
@@ -207,7 +207,7 @@ mobiletradeanim_receivemon: MACRO
db mobiletradeanim_receivemon_command
ENDM
-__enum__ set $0b
+ enum_start $0b
enum mobiletradeanim_showgetmon_command ; $0b
mobiletradeanim_showgetmon: MACRO