diff options
author | Diegoisawesome <diego@domoreaweso.me> | 2017-03-27 19:30:49 -0500 |
---|---|---|
committer | Diegoisawesome <diego@domoreaweso.me> | 2017-03-27 19:30:49 -0500 |
commit | 5a8eeb353d505af656d2f7efff7b2c73e1bd6e07 (patch) | |
tree | 6220519d3fa937638b27ffd3e2801316d5acc007 /include/text.h | |
parent | 1d95689766932d2b8f1ecc5d992ec8ece0b4b2ed (diff) |
Mostly decompile text.s
Diffstat (limited to 'include/text.h')
-rw-r--r-- | include/text.h | 78 |
1 files changed, 58 insertions, 20 deletions
diff --git a/include/text.h b/include/text.h index b977b429f..3e5a76a33 100644 --- a/include/text.h +++ b/include/text.h @@ -12,41 +12,56 @@ #define EOS 0xFF // end of string #define NUM_TEXT_PRINTERS 32 +#define NUM_WINDOWS 20 -struct TextWindow { - 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 Window +{ + u8 priority; + u8 tilemapLeft; + u8 tilemapTop; + u8 width; + u8 height; + u8 paletteNum; + u16 baseBlock; + u8 *tileData; }; struct TextPrinter { - struct TextWindow window; + 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; - void (*callback)(struct TextWindow *, u16); // 0x10 + void (*callback)(struct TextSubPrinter *, u16); // 0x10 union { - struct + struct TextPrinterSubStruct { - u8 field_0; // 0x14 - u8 field_1; - u8 field_2; + u8 font_type:4; // 0x14 + u8 font_type_upper:4; + u8 field_1:5; + u8 field_1_upmid:2; + u8 field_1_top:1; + u8 frames_visible_counter; u8 field_3; u8 field_4; // 0x18 u8 field_5; u8 field_6; u8 active; } sub; + u8 sub_fields[8]; } sub_union; @@ -71,4 +86,27 @@ struct FontInfo u8 shadowColor:4; }; +struct Bitmap // TODO: Find a better spot for this +{ + u8* pixels; + u32 width:16; + u32 height:16; +}; + +struct GlyphWidthFunc{ + u32 font_id; + u32 (*func)(u16 glyphId, bool32 isJapanese); +}; + +struct KeypadIcon { + u16 tile_offset; + u8 width; + u8 height; +}; + +extern u8 gStringVar1[]; +extern u8 gStringVar2[]; +extern u8 gStringVar3[]; +extern u8 gStringVar4[]; + #endif // GUARD_TEXT_H |