Skip to content

Commit

Permalink
Convert fonts.s to C
Browse files Browse the repository at this point in the history
  • Loading branch information
GriffinRichards committed Oct 31, 2021
1 parent fdaf436 commit 36039e1
Show file tree
Hide file tree
Showing 28 changed files with 336 additions and 384 deletions.
76 changes: 0 additions & 76 deletions data/fonts.s

This file was deleted.

20 changes: 3 additions & 17 deletions gflib/text.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion gflib/text.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
32 changes: 0 additions & 32 deletions graphics/fonts/narrow/latin_widths.inc

This file was deleted.

32 changes: 0 additions & 32 deletions graphics/fonts/normal/latin_widths.inc

This file was deleted.

32 changes: 0 additions & 32 deletions graphics/fonts/short/japanese_widths.inc

This file was deleted.

32 changes: 0 additions & 32 deletions graphics/fonts/short/latin_widths.inc

This file was deleted.

32 changes: 0 additions & 32 deletions graphics/fonts/small/latin_widths.inc

This file was deleted.

32 changes: 0 additions & 32 deletions graphics/fonts/small_narrow/latin_widths.inc

This file was deleted.

32 changes: 0 additions & 32 deletions graphics/fonts/unused_japanese_frlg_female_font_widths.inc

This file was deleted.

Loading

0 comments on commit 36039e1

Please sign in to comment.