diff options
Diffstat (limited to 'include/text.h')
-rw-r--r-- | include/text.h | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/include/text.h b/include/text.h index fc8ffa82f..217de0687 100644 --- a/include/text.h +++ b/include/text.h @@ -65,13 +65,20 @@ #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 @@ -94,7 +101,8 @@ struct TextPrinterSubStruct u8 active; }; -struct TextSubPrinter { // TODO: Better name +struct TextSubPrinter // TODO: Better name +{ u8* current_text_offset; u8 windowId; u8 fontId; @@ -145,12 +153,14 @@ struct FontInfo extern const struct FontInfo *gFonts; -struct GlyphWidthFunc{ +struct GlyphWidthFunc +{ u32 font_id; u32 (*func)(u16 glyphId, bool32 isJapanese); }; -struct KeypadIcon { +struct KeypadIcon +{ u16 tile_offset; u8 width; u8 height; @@ -164,6 +174,13 @@ typedef struct { extern TextFlags gTextFlags; +struct __attribute__((packed)) TextColor +{ + u8 fgColor; + u8 bgColor; + u8 shadowColor; +}; + extern u8 gStringVar1[]; extern u8 gStringVar2[]; extern u8 gStringVar3[]; @@ -177,11 +194,11 @@ u8 gUnknown_03002FF0[0x20]; u8 gGlyphDimensions[0x2]; void SetFontsPointer(const struct FontInfo *fonts); -void DeactivateAllTextPrinters (void); +void DeactivateAllTextPrinters(void); u16 PrintTextOnWindow(u8 windowId, u8 fontId, u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextSubPrinter *, u16)); bool16 AddTextPrinter(struct TextSubPrinter *textSubPrinter, u8 speed, void (*callback)(struct TextSubPrinter *, u16)); void RunTextPrinters(void); -bool8 IsTextPrinterActive(u8 id); +bool16 IsTextPrinterActive(u8 id); u32 RenderFont(struct TextPrinter *textPrinter); void GenerateFontHalfRowLookupTable(u8 fgColor, u8 bgColor, u8 shadowColor); void SaveTextColors(u8 *fgColor, u8 *bgColor, u8 *shadowColor); |