diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/menu.h | 6 | ||||
-rw-r--r-- | include/text.h | 24 |
2 files changed, 15 insertions, 15 deletions
diff --git a/include/menu.h b/include/menu.h index d105eb5ec..9becfc582 100644 --- a/include/menu.h +++ b/include/menu.h @@ -27,7 +27,7 @@ void sub_81973A4(void); void NewMenuHelpers_DrawDialogueFrame(u8, u8); void sub_819746C(u8 windowId, bool8 copyToVram); void NewMenuHelpers_DrawStdWindowFrame(u8, u8); -u16 AddTextPrinterParameterized2(u8 windowId, u8 fontId, const u8 *str, u8 speed, void (*callback)(struct TextSubPrinter *, u16), u8 fgColor, u8 bgColor, u8 shadowColor); +u16 AddTextPrinterParameterized2(u8 windowId, u8 fontId, const u8 *str, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16), u8 fgColor, u8 bgColor, u8 shadowColor); void PrintPlayerNameOnWindow(u8, const u8*, u16, u16); void DisplayItemMessageOnField(u8 taskId, const u8 *src, TaskFunc callback); void sub_8197434(u8 windowId, bool8 copyToVram); @@ -35,7 +35,7 @@ void SetStandardWindowBorderStyle(u8 a0, u8 a1); void sub_8197930(void); u8 GetPlayerTextSpeed(void); void sub_81978B0(u16 arg0); -void AddTextPrinterWithCallbackForMessage(bool8 a1, void (*callback)(struct TextSubPrinter *, u16)); +void AddTextPrinterWithCallbackForMessage(bool8 a1, void (*callback)(struct TextPrinterTemplate *, u16)); void AddTextPrinterParameterized3(u8 windowId, u8 fontId, u8 left, u8 top, const u8 *color, s8 speed, const u8 *str); void sub_8198070(u8 windowId, bool8 copyToVram); void SetWindowTemplateFields(struct WindowTemplate* template, u8 priority, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 palNum, u16 baseBlock); @@ -83,7 +83,7 @@ void sub_819A344(u8 a0, u8 *dest, u8 color); void RemoveMapNamePopUpWindow(void); u8 GetMapNamePopUpWindowId(void); u8 AddMapNamePopUpWindow(void); -void AddTextPrinterParameterized5(u8 windowId, u8 fontId, const u8 *str, u8 left, u8 top, u8 speed, void (*callback)(struct TextSubPrinter *, u16), u8 letterSpacing, u8 lineSpacing); +void AddTextPrinterParameterized5(u8 windowId, u8 fontId, const u8 *str, u8 left, u8 top, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16), u8 letterSpacing, u8 lineSpacing); void sub_8199C30(u8 bgId, u8 left, u8 top, u8 width, u8 height, u8 palette); void sub_8199D3C(void *ptr, int delta, int width, int height, bool32 is8BPP); void sub_8198204(const u8 *string, const u8 *string2, u8 a3, u8 a4, bool8 copyToVram); diff --git a/include/text.h b/include/text.h index db0d48bfc..658a32147 100644 --- a/include/text.h +++ b/include/text.h @@ -122,18 +122,18 @@ enum { struct TextPrinterSubStruct { - u8 font_type:4; // 0x14 - u8 font_type_upper:1; + u8 glyphId:4; // 0x14 + bool8 hasPrintBeenSpedUp:1; u8 font_type_5:3; - u8 field_1:5; - u8 field_1_upmid:2; - u8 field_1_top:1; + u8 downArrowDelay:5; + u8 downArrowYPosIdx:2; + bool8 hasGlyphIdBeenSet:1; u8 frames_visible_counter; }; -struct TextSubPrinter // TODO: Better name +struct TextPrinterTemplate { - const u8* current_text_offset; + const u8* currentChar; u8 windowId; u8 fontId; u8 x; @@ -150,9 +150,9 @@ struct TextSubPrinter // TODO: Better name struct TextPrinter { - struct TextSubPrinter subPrinter; + struct TextPrinterTemplate printerTemplate; - void (*callback)(struct TextSubPrinter *, u16); // 0x10 + void (*callback)(struct TextPrinterTemplate *, u16); // 0x10 union __attribute__((packed)) { struct TextPrinterSubStruct sub; @@ -197,7 +197,7 @@ struct KeypadIcon }; typedef struct { - u8 flag_0:1; + u8 canABSpeedUpPrint:1; u8 flag_1:1; u8 flag_2:1; u8 flag_3:1; @@ -225,8 +225,8 @@ extern struct Struct_03002F90 gUnknown_03002F90; 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 *template, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16)); void RunTextPrinters(void); bool16 IsTextPrinterActive(u8 id); u32 RenderFont(struct TextPrinter *textPrinter); |