Require rgbds 0.5.1

Use some new features: \<10> macro args, SECTION UNION, SIZEOF/STARTOF, and CHARLEN/CHARSUB
This commit is contained in:
Rangi
2021-05-09 12:26:28 -04:00
parent efd1006917
commit b1dbadbdd3
14 changed files with 224 additions and 148 deletions

View File

@@ -187,24 +187,22 @@ NextChar::
CheckDict::
dict: MACRO
assert CHARLEN(\1) == 1
if \1 == 0
and a
else
cp \1
endc
if ISCONST(\2)
; Replace a character with another one
jr nz, ._\@
; Replace a character with another one
jr nz, .not\@
ld a, \2
._\@:
else
if STRSUB("\2", 1, 1) == "."
.not\@:
elif STRSUB("\2", 1, 1) == "."
; Locals can use a short jump
jr z, \2
else
else
jp z, \2
endc
endc
ENDM