summaryrefslogtreecommitdiff
path: root/src/constants/text_constants.asm
diff options
context:
space:
mode:
authorxCrystal <rgr.crystal@gmail.com>2018-07-10 23:14:39 +0200
committerxCrystal <rgr.crystal@gmail.com>2018-07-10 23:14:39 +0200
commit1cb35e7d97933f146ad9ab7966bb496536aa3d93 (patch)
treedb984b49773cc45106335a47e3344bb07c78afcf /src/constants/text_constants.asm
parent1ef94a8af1a7232bf6e54911b16e0dd63c4f602f (diff)
More text engine
TODO: update charmaps and text/
Diffstat (limited to 'src/constants/text_constants.asm')
-rw-r--r--src/constants/text_constants.asm42
1 files changed, 32 insertions, 10 deletions
diff --git a/src/constants/text_constants.asm b/src/constants/text_constants.asm
index 70e0ab7..ed0938b 100644
--- a/src/constants/text_constants.asm
+++ b/src/constants/text_constants.asm
@@ -1,14 +1,36 @@
-TX_END EQU $00
-TX_SYMBOL EQU $05
-TX_START EQU $06
-TX_RAM1 EQU $09
-TX_LINE EQU "\n" ; $0a
-TX_RAM2 EQU $0B
-TX_RAM3 EQU $0C
+TX_END EQU $00
-text EQUS "db TX_START, "
-line EQUS "db TX_LINE, "
-done EQUS "db TX_END"
+; TX_FULLWIDTH*, char1, TX_FULLWIDTH*, char2, ...
+TX_FULLWIDTH1 EQU $01
+TX_FULLWIDTH2 EQU $02
+TX_FULLWIDTH3 EQU $03
+TX_FULLWIDTH4 EQU $04
+
+TX_CTRL_BEGIN EQU $05
+
+; TX_SYMBOL, char1, TX_SYMBOL, char2, ...
+TX_SYMBOL EQU $05
+
+; TX_HALFWIDTH, char1, char2, ...
+TX_HALFWIDTH EQU $06 ; sets wFontWidth to HALF_WIDTH
+
+TX_HALF2FULL EQU $07 ; sets wFontWidth to FULL_WIDTH, and hDefaultFont to TX_FULLWIDTH6
+TX_RAM1 EQU $09
+TX_LINE EQU "\n" ; $0a
+TX_RAM2 EQU $0b
+TX_RAM3 EQU $0c
+
+; usage: TX_FULLWIDTH*, char1, char2, ...
+; db char1, char2, ... defaults to the value at hDefaultFont, unless
+; wFontWidth was set to HALF_WIDTH by TX_HALFWIDTH (it is FULL_WIDTH by default)
+TX_FULLWIDTH5 EQU $0e ; sets hDefaultFont to TX_FULLWIDTH5
+TX_FULLWIDTH6 EQU $0f ; sets hDefaultFont to TX_FULLWIDTH6
+
+TX_CTRL_END EQU $10
+
+text EQUS "db TX_HALFWIDTH, "
+line EQUS "db TX_LINE, "
+done EQUS "db TX_END"
charmap "é", "`"
charmap "♂", "$"