diff options
author | PikalaxALT <PikalaxALT@users.noreply.github.com> | 2017-10-02 22:09:29 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-02 22:09:29 -0400 |
commit | 2701191a769784640d6a4fb819ae48272d01eb75 (patch) | |
tree | 6e6ebcf4bc02c2528e58ddcbe699b1d0601a50e1 /include/text.h | |
parent | 4cf115000289d10de3408e752b37128446dd261c (diff) | |
parent | 0fe97e838eab14723a4a38a773e2bc4d1494241e (diff) |
Merge branch 'master' into unk_text_util_2
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); |