summaryrefslogtreecommitdiff
path: root/src/macros
diff options
context:
space:
mode:
Diffstat (limited to 'src/macros')
-rw-r--r--src/macros/data.asm4
-rw-r--r--src/macros/text.asm84
-rw-r--r--src/macros/wram.asm7
3 files changed, 95 insertions, 0 deletions
diff --git a/src/macros/data.asm b/src/macros/data.asm
index ddb7443..80c4ba2 100644
--- a/src/macros/data.asm
+++ b/src/macros/data.asm
@@ -90,6 +90,10 @@ txsymbol: MACRO
charmap "\1>", const_value + -1
ENDM
+fwcharmap: MACRO
+ charmap STRCAT("FW\1_", \2), \3
+ENDM
+
textitem: MACRO
db \1, \2
tx \3
diff --git a/src/macros/text.asm b/src/macros/text.asm
new file mode 100644
index 0000000..dd47c02
--- /dev/null
+++ b/src/macros/text.asm
@@ -0,0 +1,84 @@
+text EQUS "db TX_HALFWIDTH, "
+line EQUS "db TX_LINE, "
+done EQUS "db TX_END"
+
+half2full EQUS "db TX_HALF2FULL"
+
+katakana: MACRO
+ db TX_KATAKANA
+ rept _NARG
+ db STRCAT("FW0_", \1)
+ shift
+ endr
+ENDM
+
+hiragana: MACRO
+ db TX_HIRAGANA
+ rept _NARG
+ db STRCAT("FW0_", \1)
+ shift
+ endr
+ENDM
+
+textfw0: MACRO
+ rept _NARG
+if STRSUB(\1, 1, 1) == "<" && STRLEN(\1) > 1
+ db \1
+else
+ db STRCAT("FW0_", \1)
+endc
+ shift
+ endr
+ENDM
+
+textfw1: MACRO
+ rept _NARG
+if (\1) == " "
+ db STRCAT("FW0_", \1)
+elif STRSUB(\1, 1, 1) == "<" && STRLEN(\1) > 1
+ db \1
+else
+ db TX_FULLWIDTH1, STRCAT("FW1_", \1)
+endc
+ shift
+ endr
+ENDM
+
+textfw2: MACRO
+ rept _NARG
+if (\1) == " "
+ db STRCAT("FW0_", \1)
+elif STRSUB(\1, 1, 1) == "<" && STRLEN(\1) > 1
+ db \1
+else
+ db TX_FULLWIDTH2, STRCAT("FW2_", \1)
+endc
+ shift
+ endr
+ENDM
+
+textfw3: MACRO
+ rept _NARG
+if (\1) == " "
+ db STRCAT("FW0_", \1)
+elif STRSUB(\1, 1, 1) == "<" && STRLEN(\1) > 1
+ db \1
+else
+ db TX_FULLWIDTH3, STRCAT("FW3_", \1)
+endc
+ shift
+ endr
+ENDM
+
+textfw4: MACRO
+ rept _NARG
+if (\1) == " "
+ db STRCAT("FW0_", \1)
+elif STRSUB(\1, 1, 1) == "<" && STRLEN(\1) > 1
+ db \1
+else
+ db TX_FULLWIDTH4, STRCAT("FW4_", \1)
+endc
+ shift
+ endr
+ENDM
diff --git a/src/macros/wram.asm b/src/macros/wram.asm
index cedb0dd..ad6075f 100644
--- a/src/macros/wram.asm
+++ b/src/macros/wram.asm
@@ -39,6 +39,13 @@ move_data_struct: MACRO
\1Animation:: ds 1
ENDM
+text_header: MACRO
+\1DefaultFont:: ds 1
+\1FontWidth:: ds 1
+\1Address:: ds 2
+\1RomBank:: ds 1
+ENDM
+
; TODO: Figure out what the rest are for
sprite_anim_struct: MACRO
\1Field0x00:: ds 1