From fb423f957dc8944edf0b822a7aaa1949434ac65e Mon Sep 17 00:00:00 2001 From: scnorton Date: Tue, 9 Apr 2019 14:30:54 -0400 Subject: sub_812EB58; port scanline_effect --- include/text.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/text.h') diff --git a/include/text.h b/include/text.h index e127f103a..1956de52b 100644 --- a/include/text.h +++ b/include/text.h @@ -250,5 +250,6 @@ s32 GetGlyphWidthFont3(u16 glyphId, bool32 isJapanese); s32 GetGlyphWidthFont4(u16 glyphId, bool32 isJapanese); s32 GetGlyphWidthFont5(u16 glyphId, bool32 isJapanese); void sub_80062B0(struct Sprite *sprite); +u8 sub_8006300(u8 sheetId, u16 x, u16 y, u8 priority, u8 subpriority); #endif // GUARD_TEXT_H -- cgit v1.2.3 From bf7084cb60f0375973d8caf1005fb8b02653ade2 Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 10 Apr 2019 10:16:20 -0400 Subject: through sub_812F33C --- include/text.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/text.h') diff --git a/include/text.h b/include/text.h index 1956de52b..c8835fbde 100644 --- a/include/text.h +++ b/include/text.h @@ -251,5 +251,6 @@ s32 GetGlyphWidthFont4(u16 glyphId, bool32 isJapanese); s32 GetGlyphWidthFont5(u16 glyphId, bool32 isJapanese); void sub_80062B0(struct Sprite *sprite); u8 sub_8006300(u8 sheetId, u16 x, u16 y, u8 priority, u8 subpriority); +void sub_8006398(u8 spriteId); #endif // GUARD_TEXT_H -- cgit v1.2.3 From 915694e8a7a5967d76bcbe544d671bb2f962f608 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 11 Apr 2019 18:26:02 -0400 Subject: Documentation of oak_speech --- include/text.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/text.h') diff --git a/include/text.h b/include/text.h index c8835fbde..d2c2ecf42 100644 --- a/include/text.h +++ b/include/text.h @@ -250,7 +250,7 @@ s32 GetGlyphWidthFont3(u16 glyphId, bool32 isJapanese); s32 GetGlyphWidthFont4(u16 glyphId, bool32 isJapanese); s32 GetGlyphWidthFont5(u16 glyphId, bool32 isJapanese); void sub_80062B0(struct Sprite *sprite); -u8 sub_8006300(u8 sheetId, u16 x, u16 y, u8 priority, u8 subpriority); +u8 CreateTextCursorSpriteForOakSpeech(u8 sheetId, u16 x, u16 y, u8 priority, u8 subpriority); void sub_8006398(u8 spriteId); #endif // GUARD_TEXT_H -- cgit v1.2.3 From a37da53f206a190ef54fa9477e16f3e24b541f38 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 5 May 2019 14:56:59 -0400 Subject: Daycare --- include/text.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'include/text.h') diff --git a/include/text.h b/include/text.h index d2c2ecf42..e0533cc98 100644 --- a/include/text.h +++ b/include/text.h @@ -106,9 +106,9 @@ struct TextPrinterSubStruct u8 active; }; -struct TextSubPrinter // TODO: Better name +struct TextPrinterTemplate // TODO: Better name { - const u8* current_text_offset; + const u8* currentChar; u8 windowId; u8 fontId; u8 x; @@ -117,17 +117,17 @@ struct TextSubPrinter // TODO: Better name u8 currentY; u8 letterSpacing; u8 lineSpacing; - u8 fontColor_l:4; // 0xC - u8 fontColor_h:4; + u8 unk:4; // 0xC + u8 fgColor:4; u8 bgColor:4; u8 shadowColor:4; }; struct TextPrinter { - struct TextSubPrinter subPrinter; + struct TextPrinterTemplate subPrinter; - void (*callback)(struct TextSubPrinter *, u16); // 0x10 + void (*callback)(struct TextPrinterTemplate *, u16); // 0x10 union { struct TextPrinterSubStruct sub; @@ -150,8 +150,8 @@ struct FontInfo u8 maxLetterHeight; u8 letterSpacing; u8 lineSpacing; - u8 fontColor_l:4; - u8 fontColor_h:4; + u8 unk:4; + u8 fgColor:4; u8 bgColor:4; u8 shadowColor:4; }; @@ -172,10 +172,10 @@ struct KeypadIcon }; typedef struct { - u8 flag_0:1; - u8 flag_1:1; - u8 flag_2:1; - u8 flag_3:1; + u8 canABSpeedUpPrint:1; + u8 useAlternateDownArrow:1; + u8 autoScroll:1; + u8 forceMidTextSpeed:1; } TextFlags; extern TextFlags gTextFlags; @@ -194,8 +194,8 @@ extern u8 gStringVar4[]; void SetFontsPointer(const struct FontInfo *fonts); void DeactivateAllTextPrinters(void); -u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const 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)); +u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16)); +bool16 AddTextPrinter(struct TextPrinterTemplate *textSubPrinter, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16)); void RunTextPrinters(void); bool16 IsTextPrinterActive(u8 id); u32 RenderFont(struct TextPrinter *textPrinter); -- cgit v1.2.3 From e30052e271c649ae2ca08cbbbdf2dc2052e6ae38 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 13 Jun 2019 13:45:46 -0400 Subject: help_system: through sub_813C3AC --- include/text.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/text.h') diff --git a/include/text.h b/include/text.h index e0533cc98..dc53b4845 100644 --- a/include/text.h +++ b/include/text.h @@ -68,7 +68,8 @@ #define CHAR_y 0xED #define CHAR_z 0xEE #define CHAR_SPECIAL_F7 0xF7 -#define CHAR_SPECIAL_F9 0xF9 +#define CHAR_KEYPAD_ICON 0xF8 +#define CHAR_EXTRA_EMOJI 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 @@ -192,6 +193,8 @@ extern u8 gStringVar2[]; extern u8 gStringVar3[]; extern u8 gStringVar4[]; +extern const u8 gKeypadIconTiles[]; + void SetFontsPointer(const struct FontInfo *fonts); void DeactivateAllTextPrinters(void); u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16)); @@ -248,6 +251,7 @@ s32 GetGlyphWidthFont1(u16 glyphId, bool32 isJapanese); void DecompressGlyphFont9(u16 glyphId); s32 GetGlyphWidthFont3(u16 glyphId, bool32 isJapanese); s32 GetGlyphWidthFont4(u16 glyphId, bool32 isJapanese); +void DecompressGlyphFont5(u16 glyphId, bool32 isJapanese); s32 GetGlyphWidthFont5(u16 glyphId, bool32 isJapanese); void sub_80062B0(struct Sprite *sprite); u8 CreateTextCursorSpriteForOakSpeech(u8 sheetId, u16 x, u16 y, u8 priority, u8 subpriority); -- cgit v1.2.3 From d0633593e8446d6985967d4859c5100067c7d779 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 16 Jun 2019 15:14:57 -0400 Subject: item_pc: through sub_810DBD0 --- include/text.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/text.h') diff --git a/include/text.h b/include/text.h index dc53b4845..2e6a8c837 100644 --- a/include/text.h +++ b/include/text.h @@ -91,6 +91,18 @@ #define TEXT_SPEED_FF 0xFF +enum +{ + FONTATTR_MAX_LETTER_WIDTH, + FONTATTR_MAX_LETTER_HEIGHT, + FONTATTR_LETTER_SPACING, + FONTATTR_LINE_SPACING, + FONTATTR_UNKNOWN, // dunno what this is yet + FONTATTR_COLOR_FOREGROUND, + FONTATTR_COLOR_BACKGROUND, + FONTATTR_COLOR_SHADOW +}; + struct TextPrinterSubStruct { u8 font_type:4; // 0x14 -- cgit v1.2.3