Convert fonts.s to C

This commit is contained in:
GriffinR
2021-10-31 01:44:18 -04:00
parent fdaf436960
commit 36039e1b86
28 changed files with 336 additions and 384 deletions
+3 -17
View File
@@ -11,6 +11,7 @@
#include "blit.h"
#include "menu.h"
#include "dynamic_placeholder_text_util.h"
#include "fonts.h"
static u16 FontFunc_Small(struct TextPrinter *);
static u16 FontFunc_Normal(struct TextPrinter *);
@@ -222,22 +223,7 @@ static const u8 sMenuCursorDimensions[][2] =
[FONT_BOLD] = {}
};
const u16 gFontBoldJapaneseGlyphs[] = INCBIN_U16("graphics/fonts/bold_glyphs.hwjpnfont");
extern const u16 gFontNormalLatinGlyphs[];
extern const u8 gFontNormalLatinGlyphWidths[];
extern const u16 gFontNormalJapaneseGlyphs[];
extern const u16 gFontSmallLatinGlyphs[];
extern const u8 gFontSmallLatinGlyphWidths[];
extern const u16 gFontSmallJapaneseGlyphs[];
extern const u16 gFontShortLatinGlyphs[];
extern const u8 gFontShortLatinGlyphWidths[];
extern const u16 gFontShortJapaneseGlyphs[];
extern const u8 gFontShortJapaneseGlyphWidths[];
extern const u16 gFontNarrowLatinGlyphs[];
extern const u8 gFontNarrowLatinGlyphWidths[];
extern const u16 gFontSmallNarrowLatinGlyphs[];
extern const u8 gFontSmallNarrowLatinGlyphWidths[];
const u16 gFontBoldJapaneseGlyphs[] = INCBIN_U16("graphics/fonts/bold.hwjpnfont");
static void SetFontsPointer(const struct FontInfo *fonts)
{
@@ -1510,7 +1496,7 @@ s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing)
return width;
}
u8 RenderTextFont9(u8 *pixels, u8 fontId, u8 *str)
u8 RenderTextHandleBold(u8 *pixels, u8 fontId, u8 *str)
{
u8 shadowColor;
u8 *strLocal;
+1 -1
View File
@@ -147,7 +147,7 @@ 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);
s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing);
u8 RenderTextFont9(u8 *pixels, u8 fontId, u8 *str);
u8 RenderTextHandleBold(u8 *pixels, u8 fontId, u8 *str);
u8 DrawKeypadIcon(u8 windowId, u8 keypadIconId, u16 x, u16 y);
u8 GetKeypadIconTileOffset(u8 keypadIconId);
u8 GetKeypadIconWidth(u8 keypadIconId);