summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2021-05-09 12:26:28 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2021-05-09 12:26:28 -0400
commitb1dbadbdd397cb8c9e85fa48d9184949c921a8f3 (patch)
treea14477529739a4c5262cc5fbfa08a0ac4bb8122d /data
parentefd1006917b438ff683e8f702adbe6b4d0733a0f (diff)
Require rgbds 0.5.1
Use some new features: \<10> macro args, SECTION UNION, SIZEOF/STARTOF, and CHARLEN/CHARSUB
Diffstat (limited to 'data')
-rw-r--r--data/events/npc_trades.asm5
-rw-r--r--data/events/unown_walls.asm39
-rw-r--r--data/pokemon/unown_words.asm4
3 files changed, 23 insertions, 25 deletions
diff --git a/data/events/npc_trades.asm b/data/events/npc_trades.asm
index 543a50b1e..c97e4ea4a 100644
--- a/data/events/npc_trades.asm
+++ b/data/events/npc_trades.asm
@@ -1,9 +1,8 @@
npctrade: MACRO
; dialog set, requested mon, offered mon, nickname, dvs, item, OT ID, OT name, gender requested
db \1, \2, \3, \4, \5, \6, \7
- shift
- dw \7
- db \8, \9, 0
+ dw \8
+ db \9, \<10>, 0
ENDM
NPCTrades:
diff --git a/data/events/unown_walls.asm b/data/events/unown_walls.asm
index 624b1e678..e19765831 100644
--- a/data/events/unown_walls.asm
+++ b/data/events/unown_walls.asm
@@ -1,35 +1,34 @@
unownwall: MACRO
-rept _NARG
-if \1 == "-"
-x = $64
-elif \1 >= "Y"
-x = 2 * (\1 - "Y") + $60
-elif \1 >= "Q"
-x = 2 * (\1 - "Q") + $40
-elif \1 >= "I"
-x = 2 * (\1 - "I") + $20
+for n, CHARLEN(\1)
+x = CHARSUB(\1, n + 1)
+if x == "-"
+ db $64
+elif x >= "Y"
+ db 2 * (x - "Y") + $60
+elif x >= "Q"
+ db 2 * (x - "Q") + $40
+elif x >= "I"
+ db 2 * (x - "I") + $20
else
-x = 2 * (\1 - "A")
+ db 2 * (x - "A")
endc
- db x
- shift
endr
db -1 ; end
ENDM
UnownWalls:
; UNOWNWORDS_ESCAPE
- ; db $08, $44, $04, $00, $2e, $08, -1
- unownwall "E", "S", "C", "A", "P", "E"
+ ; db $08, $44, $04, $00, $2e, $08, -1
+ unownwall "ESCAPE"
; UNOWNWORDS_LIGHT
- ; db $26, $20, $0c, $0e, $46, -1
- unownwall "L", "I", "G", "H", "T"
+ ; db $26, $20, $0c, $0e, $46, -1
+ unownwall "LIGHT"
; UNOWNWORDS_WATER
- ; db $4c, $00, $46, $08, $42, -1
- unownwall "W", "A", "T", "E", "R"
+ ; db $4c, $00, $46, $08, $42, -1
+ unownwall "WATER"
; UNOWNWORDS_HO_OH
- ; db $0e, $2c, $64, $2c, $0e, -1
- unownwall "H", "O", "-", "O", "H"
+ ; db $0e, $2c, $64, $2c, $0e, -1
+ unownwall "HO-OH"
MenuHeaders_UnownWalls:
; UNOWNWORDS_ESCAPE
diff --git a/data/pokemon/unown_words.asm b/data/pokemon/unown_words.asm
index 7c41e19a3..11ddd46b0 100644
--- a/data/pokemon/unown_words.asm
+++ b/data/pokemon/unown_words.asm
@@ -1,6 +1,6 @@
unownword: MACRO
-for x, STRLEN(\1)
- db STRSUB(\1, x + 1, 1) - "A" + FIRST_UNOWN_CHAR
+for n, CHARLEN(\1)
+ db CHARSUB(\1, n + 1) - "A" + FIRST_UNOWN_CHAR
endr
db -1
ENDM