summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-07-02 11:46:30 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-07-02 11:46:30 -0400
commit26d764de5d3c7cd48ecae95f0cbfb9f368388162 (patch)
treeaef0bd70a7483411c18cd1f602466d7b8608c8fa
parentfce6243b432d1df1b4ab244023be738a54dbe8f3 (diff)
Use STRCMP, not ==, to compare multi-character strings
-rw-r--r--data/maps/attributes.asm8
-rw-r--r--macros/code.asm2
-rw-r--r--wram.asm1
3 files changed, 6 insertions, 5 deletions
diff --git a/data/maps/attributes.asm b/data/maps/attributes.asm
index d149f59ce..e67eb3742 100644
--- a/data/maps/attributes.asm
+++ b/data/maps/attributes.asm
@@ -37,7 +37,7 @@ _src = -_tgt
_tgt = 0
endc
-if "\1" == "north"
+if !STRCMP("\1", "north")
_blk = \3_WIDTH * (\3_HEIGHT - 3) + _src
_map = _tgt
_win = (\3_WIDTH + 6) * \3_HEIGHT + 1
@@ -48,7 +48,7 @@ if _len > \3_WIDTH
_len = \3_WIDTH
endc
-elif "\1" == "south"
+elif !STRCMP("\1", "south")
_blk = _src
_map = (CURRENT_MAP_WIDTH + 6) * (CURRENT_MAP_HEIGHT + 3) + _tgt
_win = \3_WIDTH + 7
@@ -59,7 +59,7 @@ if _len > \3_WIDTH
_len = \3_WIDTH
endc
-elif "\1" == "west"
+elif !STRCMP("\1", "west")
_blk = (\3_WIDTH * _src) + \3_WIDTH - 3
_map = (CURRENT_MAP_WIDTH + 6) * _tgt
_win = (\3_WIDTH + 6) * 2 - 6
@@ -70,7 +70,7 @@ if _len > \3_HEIGHT
_len = \3_HEIGHT
endc
-elif "\1" == "east"
+elif !STRCMP("\1", "east")
_blk = (\3_WIDTH * _src)
_map = (CURRENT_MAP_WIDTH + 6) * _tgt + CURRENT_MAP_WIDTH + 3
_win = \3_WIDTH + 7
diff --git a/macros/code.asm b/macros/code.asm
index 9de3dd1ec..e393d4951 100644
--- a/macros/code.asm
+++ b/macros/code.asm
@@ -11,7 +11,7 @@ ENDM
; Design patterns
jumptable: MACRO
-if "\2" == "hl"
+if !STRCMP("\2", "hl")
ld a, [hl]
else
ld a, [\2]
diff --git a/wram.asm b/wram.asm
index 3308a2fc4..92ace7aac 100644
--- a/wram.asm
+++ b/wram.asm
@@ -1664,6 +1664,7 @@ SECTION "WRAM 1", WRAMX
wGBCOnlyDecompressBuffer:: ; a $540-byte buffer that continues past this SECTION
wd000:: db
+
wDefaultSpawnpoint:: db
UNION