diff options
author | Rangi <remy.oukaour+rangi@gmail.com> | 2020-09-22 14:32:37 -0400 |
---|---|---|
committer | Rangi <remy.oukaour+rangi@gmail.com> | 2020-09-22 14:44:22 -0400 |
commit | e6a99b8f9e20f7058a140fe7f0668b17ce49c6eb (patch) | |
tree | 2081afd14167056953c8140699d35532d236938d /macros/maps.asm | |
parent | 5e70f4cb51843ce2d40579ff272d375b9fa9aa26 (diff) |
Port updated map event macros
Diffstat (limited to 'macros/maps.asm')
-rw-r--r-- | macros/maps.asm | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/macros/maps.asm b/macros/maps.asm index 135b8a3..ca661f6 100644 --- a/macros/maps.asm +++ b/macros/maps.asm @@ -108,17 +108,46 @@ map: MACRO db 0, 0 ; ??? ENDM +def_warp_events: MACRO +if DEF(_NUM_WARP_EVENTS) + PURGE _NUM_WARP_EVENTS +endc +_NUM_WARP_EVENTS EQUS "_NUM_WARP_EVENTS_\@" + db _NUM_WARP_EVENTS +_NUM_WARP_EVENTS = 0 +ENDM + warp_event: MACRO db \2, \1 ; y, x - db \3 ; index - map_id \4 - dw \5 ; unused wOverworldMap offset + db \4 ; index + map_id \3 + dw wOverworldMapBlocks + \5 ; unused +_NUM_WARP_EVENTS = _NUM_WARP_EVENTS + 1 +ENDM + +def_bg_events: MACRO +if DEF(_NUM_BG_EVENTS) + PURGE _NUM_BG_EVENTS +endc +_NUM_BG_EVENTS EQUS "_NUM_BG_EVENTS_\@" + db _NUM_BG_EVENTS +_NUM_BG_EVENTS = 0 ENDM bg_event: MACRO db \2, \1 ; y, x db \3 ; function (unused?) db \4 ; text index +_NUM_BG_EVENTS = _NUM_BG_EVENTS + 1 +ENDM + +def_object_events: MACRO +if DEF(_NUM_OBJECT_EVENTS) + PURGE _NUM_OBJECT_EVENTS +endc +_NUM_OBJECT_EVENTS EQUS "_NUM_OBJECT_EVENTS_\@" + db _NUM_OBJECT_EVENTS +_NUM_OBJECT_EVENTS = 0 ENDM object_event: MACRO @@ -137,4 +166,5 @@ object_event: MACRO db \9 ; unknown 3 shift db \9 ; unknown 4 +_NUM_OBJECT_EVENTS = _NUM_OBJECT_EVENTS + 1 ENDM |