summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-07-14 15:45:36 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-07-14 15:53:25 -0400
commit5c0f33cb5350d3e11bd75cc04d943549667ecd4c (patch)
tree2d5927ab83072b0673793269eacd14e6b5fd5ad2 /macros
parentbe326c65652d5e87e353172a4471458822ffd3da (diff)
Use a 'trainer' macro for trainers in scripts/
Diffstat (limited to 'macros')
-rw-r--r--macros/scripts/maps.asm21
1 files changed, 21 insertions, 0 deletions
diff --git a/macros/scripts/maps.asm b/macros/scripts/maps.asm
index a097fb88..6f643672 100644
--- a/macros/scripts/maps.asm
+++ b/macros/scripts/maps.asm
@@ -47,6 +47,27 @@ warp_to: MACRO
event_displacement \3, \1, \2
ENDM
+
+;\1 event flag
+;\2 view range
+;\3 TextBeforeBattle
+;\4 TextAfterBattle
+;\5 TextEndBattle
+trainer: MACRO
+ IF _NARG > 5
+ dbEventFlagBit \1, \2
+ db (\3 << 4)
+ dwEventFlagAddress \1, \2
+ SHIFT
+ ELSE
+ dbEventFlagBit \1
+ db (\2 << 4)
+ dwEventFlagAddress \1
+ ENDC
+ dw \3, \5, \4, \4
+ENDM
+
+
;\1 map name
;\2 map id
;\3 tileset