From 5c0f33cb5350d3e11bd75cc04d943549667ecd4c Mon Sep 17 00:00:00 2001 From: Rangi Date: Tue, 14 Jul 2020 15:45:36 -0400 Subject: Use a 'trainer' macro for trainers in scripts/ --- macros/scripts/maps.asm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'macros/scripts') 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 -- cgit v1.2.3