diff options
Diffstat (limited to 'macros/scripts/maps.asm')
-rw-r--r-- | macros/scripts/maps.asm | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/macros/scripts/maps.asm b/macros/scripts/maps.asm index 381fe7f5..f5f913a2 100644 --- a/macros/scripts/maps.asm +++ b/macros/scripts/maps.asm @@ -1,7 +1,7 @@ def_objects: MACRO -if DEF(_NUM_OBJECTS) - PURGE _NUM_OBJECTS -endc + IF DEF(_NUM_OBJECTS) + PURGE _NUM_OBJECTS + ENDC _NUM_OBJECTS EQUS "_NUM_OBJECTS_\@" db _NUM_OBJECTS _NUM_OBJECTS = 0 @@ -36,9 +36,9 @@ _NUM_OBJECTS = _NUM_OBJECTS + 1 ENDM def_warps: MACRO -if DEF(_NUM_WARPS) - PURGE _NUM_WARPS -endc + IF DEF(_NUM_WARPS) + PURGE _NUM_WARPS + ENDC _NUM_WARPS EQUS "_NUM_WARPS_\@" db _NUM_WARPS _NUM_WARPS = 0 @@ -62,9 +62,9 @@ _WARP_TO_BUFFER EQUS "{_TMP}" ENDM def_signs: MACRO -if DEF(_NUM_SIGNS) - PURGE _NUM_SIGNS -endc + IF DEF(_NUM_SIGNS) + PURGE _NUM_SIGNS + ENDC _NUM_SIGNS EQUS "_NUM_SIGNS_\@" db _NUM_SIGNS _NUM_SIGNS = 0 @@ -79,18 +79,17 @@ _NUM_SIGNS = _NUM_SIGNS + 1 ENDM def_warps_to: MACRO -_WARP_TO_WIDTH EQU \1_WIDTH +_WARP_TO_WIDTH = \1_WIDTH REPT _NUM_WARPS _SEP = STRIN("{_WARP_TO_BUFFER}", ";") _WARP_TO_NTH EQUS STRCAT(STRCAT("warp_to ", STRSUB("{_WARP_TO_BUFFER}", 1, _SEP - 1)), ", _WARP_TO_WIDTH") _TMP EQUS STRSUB("{_WARP_TO_BUFFER}", _SEP + 1, STRLEN("{_WARP_TO_BUFFER}") - _SEP) - PURGE _WARP_TO_BUFFER + PURGE _WARP_TO_BUFFER _WARP_TO_BUFFER EQUS "{_TMP}" - PURGE _TMP - _WARP_TO_NTH -PURGE _WARP_TO_NTH + PURGE _TMP + _WARP_TO_NTH + PURGE _WARP_TO_NTH ENDR -PURGE _WARP_TO_WIDTH ENDM ;\1 x position @@ -149,9 +148,9 @@ ENDM ; Comes after map_header and connection macros end_map_header: MACRO dw CURRENT_MAP_OBJECT -PURGE CURRENT_MAP_WIDTH -PURGE CURRENT_MAP_HEIGHT -PURGE CURRENT_MAP_OBJECT + PURGE CURRENT_MAP_WIDTH + PURGE CURRENT_MAP_HEIGHT + PURGE CURRENT_MAP_OBJECT ENDM ; Connections go in order: north, south, west, east |