summaryrefslogtreecommitdiff
path: root/home/text.asm
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2021-05-09 12:47:43 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2021-05-09 12:47:43 -0400
commit65d1e12d6ac15937977d28651a656ff255ea0d5d (patch)
tree53cecd90548df6957851b2341cdaf2a060d68255 /home/text.asm
parent2a9ae6ecefe12e798c15e7a37a77005f5373aa9d (diff)
Require rgbds 0.5.1
Use some new features: \<10> macro args, SECTION UNION, SIZEOF/STARTOF, and CHARLEN/CHARSUB
Diffstat (limited to 'home/text.asm')
-rw-r--r--home/text.asm14
1 files changed, 6 insertions, 8 deletions
diff --git a/home/text.asm b/home/text.asm
index 47881803..26f73c11 100644
--- a/home/text.asm
+++ b/home/text.asm
@@ -176,24 +176,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