summaryrefslogtreecommitdiff
path: root/include/text.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/text.h')
-rw-r--r--include/text.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/include/text.h b/include/text.h
index 7853598f8..e127f103a 100644
--- a/include/text.h
+++ b/include/text.h
@@ -1,6 +1,8 @@
#ifndef GUARD_TEXT_H
#define GUARD_TEXT_H
+#include "global.h"
+
#define CHAR_SPACE 0x00
#define CHAR_0 0xA1
#define CHAR_QUESTION_MARK 0xAC
@@ -159,7 +161,7 @@ extern const struct FontInfo *gFonts;
struct GlyphWidthFunc
{
u32 font_id;
- u32 (*func)(u16 glyphId, bool32 isJapanese);
+ s32 (*func)(u16 glyphId, bool32 isJapanese);
};
struct KeypadIcon
@@ -222,9 +224,9 @@ bool16 TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter);
bool16 TextPrinterWait(struct TextPrinter *textPrinter);
void DrawDownArrow(u8 windowId, u16 x, u16 y, u8 bgColor, bool8 drawArrow, u8 *counter, u8 *yCoordIndex);
u16 RenderText(struct TextPrinter *textPrinter);
-u32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpacing);
-u32 (*GetFontWidthFunc(u8 glyphId))(u16, bool32);
-u32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing);
+s32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpacing);
+s32 (*GetFontWidthFunc(u8 glyphId))(u16, bool32);
+s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing);
u8 RenderTextFont9(u8 *pixels, u8 fontId, u8 *str);
u8 DrawKeypadIcon(u8 windowId, u8 keypadIconId, u16 x, u16 y);
u8 GetKeypadIconTileOffset(u8 keypadIconId);
@@ -234,19 +236,19 @@ void SetDefaultFontsPointer(void);
u8 GetFontAttribute(u8 fontId, u8 attributeId);
u8 GetMenuCursorDimensionByFont(u8 fontId, u8 whichDimension);
void DecompressGlyphFont0(u16 glyphId, bool32 isJapanese);
-u32 GetGlyphWidthFont0(u16 glyphId, bool32 isJapanese);
+s32 GetGlyphWidthFont0(u16 glyphId, bool32 isJapanese);
void DecompressGlyphFont7(u16 glyphId, bool32 isJapanese);
-u32 GetGlyphWidthFont7(u16 glyphId, bool32 isJapanese);
+s32 GetGlyphWidthFont7(u16 glyphId, bool32 isJapanese);
void DecompressGlyphFont8(u16 glyphId, bool32 isJapanese);
-u32 GetGlyphWidthFont8(u16 glyphId, bool32 isJapanese);
+s32 GetGlyphWidthFont8(u16 glyphId, bool32 isJapanese);
void DecompressGlyphFont2(u16 glyphId, bool32 isJapanese);
-u32 GetGlyphWidthFont2(u16 glyphId, bool32 isJapanese);
+s32 GetGlyphWidthFont2(u16 glyphId, bool32 isJapanese);
void DecompressGlyphFont1(u16 glyphId, bool32 isJapanese);
-u32 GetGlyphWidthFont1(u16 glyphId, bool32 isJapanese);
+s32 GetGlyphWidthFont1(u16 glyphId, bool32 isJapanese);
void DecompressGlyphFont9(u16 glyphId);
-u32 GetGlyphWidthFont3(u16 glyphId, bool32 isJapanese);
-u32 GetGlyphWidthFont4(u16 glyphId, bool32 isJapanese);
-u32 GetGlyphWidthFont5(u16 glyphId, bool32 isJapanese);
+s32 GetGlyphWidthFont3(u16 glyphId, bool32 isJapanese);
+s32 GetGlyphWidthFont4(u16 glyphId, bool32 isJapanese);
+s32 GetGlyphWidthFont5(u16 glyphId, bool32 isJapanese);
void sub_80062B0(struct Sprite *sprite);
#endif // GUARD_TEXT_H