Map macros because maps are bananas

This commit is contained in:
yenatch 2014-02-24 04:42:42 -05:00
parent 3e830ab884
commit 2d6f644cdf
1 changed files with 36 additions and 0 deletions

View File

@ -138,3 +138,39 @@ endanim: MACRO
db $ff
ENDM
; maps
map: MACRO
; This is a really silly hack to get around an rgbds bug.
; Ideally:
; db GROUP_\1, MAP_\1
\1\@ EQUS "GROUP_\1"
\1\@2 EQUS "MAP_\1"
db \1\@, \1\@2
ENDM
roam_map: MACRO
; A map and an arbitrary number of some more maps.
map \1
db \2
IF \2 > 0
map \3
ENDC
IF \2 > 1
map \4
ENDC
IF \2 > 2
map \5
ENDC
IF \2 > 3
map \6
ENDC
db 0
ENDM