diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2021-02-23 12:08:15 -0500 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2021-02-23 12:09:25 -0500 |
commit | d07a66662728225c1422fed1072281dee71a2c9e (patch) | |
tree | fbfb6b6abdb1918eac1c7b7f603f30cad4e4eea7 /macros/scripts | |
parent | 780931886d20291747e0553904d321cbdf8b60ad (diff) | |
parent | e1ef02430d463878ca6e48b4aa2e7d41aa3e0165 (diff) |
Merge remote-tracking branch 'remotes/pokered/master'
Diffstat (limited to 'macros/scripts')
-rw-r--r-- | macros/scripts/maps.asm | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/macros/scripts/maps.asm b/macros/scripts/maps.asm index 2032629b..a282acba 100644 --- a/macros/scripts/maps.asm +++ b/macros/scripts/maps.asm @@ -50,11 +50,10 @@ ENDM ;\4 destination map (-1 = wLastMap) warp: MACRO db \2, \1, \3, \4 +_TMP EQUS "\n_WARP_{d:{_NUM_WARPS}}_X = \1\n_WARP_{d:{_NUM_WARPS}}_Y = \2" + _TMP + PURGE _TMP _NUM_WARPS = _NUM_WARPS + 1 -; the Nth warp defines a corresponding Nth warp_to, stored in _WARP_TO_NUM_<N> -_WARP_TO_NAME EQUS "_WARP_TO_NUM_{d:{_NUM_WARPS}}" -_WARP_TO_NAME EQUS "warp_to \1, \2, _WARP_TO_WIDTH" - PURGE _WARP_TO_NAME ENDM def_signs: MACRO @@ -76,17 +75,12 @@ ENDM ;\1 source map def_warps_to: MACRO -; output and purge each _WARP_TO_NUM_<N> warp_to, from N=1 to _NUM_WARPS -_WARP_TO_WIDTH = \1_WIDTH -_WARP_TO_N = 1 +N = 0 REPT _NUM_WARPS -_WARP_TO_NAME EQUS "_WARP_TO_NUM_{d:_WARP_TO_N}" - _WARP_TO_NAME -_WARP_TO_N = _WARP_TO_N + 1 -_PURGE_WARP_TO_NUM EQUS "PURGE {_WARP_TO_NAME}" - _PURGE_WARP_TO_NUM - PURGE _PURGE_WARP_TO_NUM - PURGE _WARP_TO_NAME +_TMP EQUS "warp_to _WARP_{d:N}_X, _WARP_{d:N}_Y, \1_WIDTH" + _TMP + PURGE _TMP +N = N + 1 ENDR ENDM |