summaryrefslogtreecommitdiff
path: root/include/text.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/text.h')
-rw-r--r--include/text.h42
1 files changed, 26 insertions, 16 deletions
diff --git a/include/text.h b/include/text.h
index dba409f37..88f2cc0e2 100644
--- a/include/text.h
+++ b/include/text.h
@@ -65,36 +65,46 @@
#define CHAR_x 0xEC
#define CHAR_y 0xED
#define CHAR_z 0xEE
+#define CHAR_SPECIAL_F9 0xF9
#define CHAR_COLON 0xF0
#define CHAR_PROMPT_SCROLL 0xFA // waits for button press and scrolls dialog
#define CHAR_PROMPT_CLEAR 0xFB // waits for button press and clears dialog
#define EXT_CTRL_CODE_BEGIN 0xFC // extended control code
#define PLACEHOLDER_BEGIN 0xFD // string placeholder
#define CHAR_NEWLINE 0xFE
-#define EOS 0xFF // end of string
+#define EOS 0xFF // end of string
+
+#define TEXT_COLOR_TRANSPARENT 0x0
+#define TEXT_COLOR_WHITE 0x1
+#define TEXT_COLOR_DARK_GREY 0x2
+
+// battle placeholders are located in battle_message.h
#define EXT_CTRL_CODE_JPN 0x15
#define EXT_CTRL_CODE_ENG 0x16
#define NUM_TEXT_PRINTERS 32
+struct TextSubPrinter // TODO: Better name
+{
+ u8* current_text_offset;
+ u8 windowId;
+ u8 fontId;
+ u8 x;
+ u8 y;
+ u8 currentX; // 0x8
+ u8 currentY;
+ u8 letterSpacing;
+ u8 lineSpacing;
+ u8 fontColor_l:4; // 0xC
+ u8 fontColor_h:4;
+ u8 bgColor:4;
+ u8 shadowColor:4;
+};
+
struct TextPrinter
{
- struct TextSubPrinter { // TODO: Better name
- u8* current_text_offset;
- u8 windowId;
- u8 fontId;
- u8 x;
- u8 y;
- u8 currentX; // 0x8
- u8 currentY;
- u8 letterSpacing;
- u8 lineSpacing;
- u8 fontColor_l:4; // 0xC
- u8 fontColor_h:4;
- u8 bgColor:4;
- u8 shadowColor:4;
- } subPrinter;
+ struct TextSubPrinter subPrinter;
void (*callback)(struct TextSubPrinter *, u16); // 0x10