diff options
Diffstat (limited to 'macros/scripts')
-rw-r--r-- | macros/scripts/maps.asm | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/macros/scripts/maps.asm b/macros/scripts/maps.asm index efe82dc8..381fe7f5 100644 --- a/macros/scripts/maps.asm +++ b/macros/scripts/maps.asm @@ -42,6 +42,10 @@ endc _NUM_WARPS EQUS "_NUM_WARPS_\@" db _NUM_WARPS _NUM_WARPS = 0 + IF DEF(_WARP_TO_BUFFER) + PURGE _WARP_TO_BUFFER + ENDC +_WARP_TO_BUFFER EQUS "" ENDM ;\1 x position @@ -51,6 +55,10 @@ ENDM warp: MACRO db \2, \1, \3, \4 _NUM_WARPS = _NUM_WARPS + 1 +_TMP EQUS "{_WARP_TO_BUFFER}\1,\2; " + PURGE _WARP_TO_BUFFER +_WARP_TO_BUFFER EQUS "{_TMP}" + PURGE _TMP ENDM def_signs: MACRO @@ -70,6 +78,21 @@ sign: MACRO _NUM_SIGNS = _NUM_SIGNS + 1 ENDM +def_warps_to: MACRO +_WARP_TO_WIDTH EQU \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 +_WARP_TO_BUFFER EQUS "{_TMP}" + PURGE _TMP + _WARP_TO_NTH +PURGE _WARP_TO_NTH + ENDR +PURGE _WARP_TO_WIDTH +ENDM + ;\1 x position ;\2 y position ;\3 map width |