Merge pull request #16 from ProjectRevoTPP/text

finish decompiling text.c
This commit is contained in:
Marcus Huderle
2018-10-07 00:09:17 -05:00
committed by GitHub
27 changed files with 806 additions and 1229 deletions
+2
View File
@@ -89,6 +89,8 @@ tidy:
rm -f $(ROM) $(ELF) $(MAP)
rm -r build/*
include graphics_file_rules.mk
%.s: ;
%.png: ;
%.pal: ;
+2 -2
View File
@@ -1322,7 +1322,7 @@ _0813C2D4:
bl GetKeypadIconTileOffset
lsls r0, 24
lsrs r0, 19
ldr r1, _0813C344 @ =gUnknown_81EA700
ldr r1, _0813C344 @ =gKeypadIconTiles
adds r0, r1
str r0, [sp, 0x14]
add r1, sp, 0x14
@@ -1365,7 +1365,7 @@ _0813C2D4:
bl GetKeypadIconWidth
b _0813C38E
.align 2, 0
_0813C344: .4byte gUnknown_81EA700
_0813C344: .4byte gKeypadIconTiles
_0813C348:
mov r0, r9
ldrb r1, [r0]
-1108
View File
File diff suppressed because it is too large Load Diff
+4 -1
View File
@@ -1554,7 +1554,10 @@ gUnknown_83AC970:: @ 83AC970
.incbin "baserom.gba", 0x3AC970, 0x20
sFanfares:: @ 83AC990
.incbin "baserom.gba", 0x3AC990, 0x278
.incbin "baserom.gba", 0x3AC990, 0x40
gUnknown_83AC9D0:: @ 83AC9D0
.incbin "baserom.gba", 0x3AC9D0, 0x238
gUnknown_83ACC08:: @ 83ACC08
.incbin "baserom.gba", 0x3ACC08, 0x440
Binary file not shown.

After

Width:  |  Height:  |  Size: 162 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 B

-88
View File
@@ -1,88 +0,0 @@
.section .rodata
gDownArrowTiles:: @ 81EA14C
.incbin "baserom.gba", 0x1EA14C, 0x100
gDarkDownArrowTiles:: @ 81EA24C
.incbin "baserom.gba", 0x1EA24C, 0x400
gDownArrowYCoords:: @ 81EA64C
.incbin "baserom.gba", 0x1EA64C, 0x4
gUnknown_81EA650:: @ 81EA650
.incbin "baserom.gba", 0x1EA650, 0x4
gGlyphWidthFuncs:: @ 81EA654
.incbin "baserom.gba", 0x1EA654, 0x38
gUnknown_81EA68C:: @ 81EA68C
.incbin "baserom.gba", 0x1EA68C, 0x18
gUnknown_81EA6A4:: @ 81EA6A4
.incbin "baserom.gba", 0x1EA6A4, 0x10
gUnknown_81EA6B4:: @ 81EA6B4
.incbin "baserom.gba", 0x1EA6B4, 0x18
gUnknown_81EA6CC:: @ 81EA6CC
.incbin "baserom.gba", 0x1EA6CC, 0x34
gUnknown_81EA700:: @ 81EA700
.incbin "baserom.gba", 0x1EA700, 0x800
gUnknown_81EAF00:: @ 81EAF00
.incbin "baserom.gba", 0x1EAF00, 0x4000
gUnknown_81EEF00:: @ 81EEF00
.incbin "baserom.gba", 0x1EEF00, 0x200
gUnknown_81EF100:: @ 81EF100
.incbin "baserom.gba", 0x1EF100, 0x4000
gUnknown_81F3100:: @ 81F3100
.incbin "baserom.gba", 0x1F3100, 0x8000
gUnknown_81FB100:: @ 81FB100
.incbin "baserom.gba", 0x1FB100, 0x200
gUnknown_81FB300:: @ 81FB300
.incbin "baserom.gba", 0x1FB300, 0x4000
gUnknown_81FF300:: @ 81FF300
.incbin "baserom.gba", 0x1FF300, 0x8000
gUnknown_8207300:: @ 8207300
.incbin "baserom.gba", 0x207300, 0x200
gUnknown_8207500:: @ 8207500
.incbin "baserom.gba", 0x207500, 0x8000
gUnknown_820F500:: @ 820F500
.incbin "baserom.gba", 0x20F500, 0x118
gUnknown_820F618:: @ 820F618
.incbin "baserom.gba", 0x20F618, 0x8000
gUnknown_8217618:: @ 8217618
.incbin "baserom.gba", 0x217618, 0x200
gUnknown_8217818:: @ 8217818
.incbin "baserom.gba", 0x217818, 0x8000
gUnknown_821F818:: @ 821F818
.incbin "baserom.gba", 0x21F818, 0x118
gUnknown_821F930:: @ 821F930
.incbin "baserom.gba", 0x21F930, 0x8000
gUnknown_8227930:: @ 8227930
.incbin "baserom.gba", 0x227930, 0x200
gUnknown_8227B30:: @ 8227B30
.incbin "baserom.gba", 0x227B30, 0x8000
gUnknown_822FB30:: @ 822FB30
.incbin "baserom.gba", 0x22FB30, 0x118
gUnknown_822FC48:: @ 822FC48
.incbin "baserom.gba", 0x22FC48, 0x2000
+34
View File
@@ -0,0 +1,34 @@
FONTGFXDIR := data/graphics/fonts
$(FONTGFXDIR)/font0_latin.latfont: $(FONTGFXDIR)/font0_latin.png
$(GFX) $< $@
$(FONTGFXDIR)/font0_jap.fwjpnfont: $(FONTGFXDIR)/font0_jap.png
$(GFX) $< $@
$(FONTGFXDIR)/font1_latin.latfont: $(FONTGFXDIR)/font1_latin.png
$(GFX) $< $@
$(FONTGFXDIR)/font1_jap.fwjpnfont: $(FONTGFXDIR)/font1_jap.png
$(GFX) $< $@
$(FONTGFXDIR)/font2_latin.latfont: $(FONTGFXDIR)/font2_latin.png
$(GFX) $< $@
$(FONTGFXDIR)/font2_jap.fwjpnfont: $(FONTGFXDIR)/font2_jap.png
$(GFX) $< $@
$(FONTGFXDIR)/font4_latin.latfont: $(FONTGFXDIR)/font4_latin.png
$(GFX) $< $@
$(FONTGFXDIR)/font4_jap.fwjpnfont: $(FONTGFXDIR)/font4_jap.png
$(GFX) $< $@
$(FONTGFXDIR)/font5_latin.latfont: $(FONTGFXDIR)/font5_latin.png
$(GFX) $< $@
$(FONTGFXDIR)/font5_jap.fwjpnfont: $(FONTGFXDIR)/font5_jap.png
$(GFX) $< $@
$(FONTGFXDIR)/font9_jap.fwjpnfont: $(FONTGFXDIR)/font9_jap.png
$(GFX) $< $@
+4
View File
@@ -244,5 +244,9 @@ u32 GetGlyphWidthFont2(u16 glyphId, bool32 isJapanese);
void DecompressGlyphFont1(u16 glyphId, bool32 isJapanese);
u32 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);
void sub_80062B0(struct Sprite *sprite);
#endif // GUARD_TEXT_H
-2
View File
@@ -58,7 +58,6 @@ SECTIONS {
asm/blit.o(.text);
src/window_8bpp.o(.text);
src/text.o(.text);
asm/text.o(.text);
src/sprite.o(.text);
src/string_util.o(.text);
asm/link.o(.text);
@@ -364,7 +363,6 @@ SECTIONS {
src/text_printer.o(.rodata);
src/window.o(.rodata);
src/text.o(.rodata);
data/text.o(.rodata);
src/sprite.o(.rodata);
src/bg_regs.o(.rodata);
src/string_util.o(.rodata);
+760 -28
View File
@@ -4,9 +4,12 @@
#include "string_util.h"
#include "window.h"
#include "text.h"
#include "sprite.h"
extern u8 gGlyphInfo[0x90];
extern u8 gUnknown_203ADFA;
extern u16 gUnknown_841F408[];
extern const struct OamData gUnknown_83AC9D0;
extern void FillBitmapRect4Bit(struct Bitmap *surface, u16 x, u16 y, u16 width, u16 height, u8 fillValue);
extern void FillWindowPixelRect(u8 windowId, u8 fillValue, u16 x, u16 y, u16 width, u16 height);
@@ -20,39 +23,359 @@ extern u8* UnkTextUtil_GetPtrI(u8 a1);
TextFlags gTextFlags;
extern const u8 gDownArrowTiles[];
extern const u8 gDarkDownArrowTiles[];
extern const u8 gUnusedFRLGBlankedDownArrow[];
extern const u8 gUnusedFRLGDownArrow[];
extern const u8 gDownArrowYCoords[];
extern const u8 gWindowVerticalScrollSpeeds[];
const u8 gDownArrowTiles[] = INCBIN_U8("data/graphics/fonts/down_arrow.4bpp");
const u8 gDarkDownArrowTiles[] = INCBIN_U8("data/graphics/fonts/down_arrow_RS.4bpp");
const u8 gTinyArrowTiles[] = INCBIN_U8("data/graphics/fonts/down_arrow_2.4bpp");
const u8 gTinyDarkDownArrowTiles[] = INCBIN_U8("data/graphics/fonts/down_arrow_RS_2.4bpp");
const u8 gDoubleArrowTiles1[] = INCBIN_U8("data/graphics/fonts/down_arrow_3.4bpp");
const u8 gDoubleArrowTiles2[] = INCBIN_U8("data/graphics/fonts/down_arrow_4.4bpp");
extern const struct GlyphWidthFunc gGlyphWidthFuncs[];
const u8 gDownArrowYCoords[] = { 0x0, 0x10, 0x20, 0x10 };
const u8 gWindowVerticalScrollSpeeds[] = { 0x1, 0x2 , 0x4 , 0x0 };
extern const struct KeypadIcon gKeypadIcons[];
const struct GlyphWidthFunc gGlyphWidthFuncs[] = {
{ 0x0, GetGlyphWidthFont0 },
{ 0x1, GetGlyphWidthFont1 },
{ 0x2, GetGlyphWidthFont2 },
{ 0x3, GetGlyphWidthFont3 },
{ 0x4, GetGlyphWidthFont4 },
{ 0x5, GetGlyphWidthFont5 },
{ 0x6, GetGlyphWidthFont6 }
};
extern const u8 gKeypadIconTiles[];
const struct SpriteSheet gUnknown_81EA68C[] =
{
{gDoubleArrowTiles1, sizeof(gDoubleArrowTiles1), 0x8000},
{gDoubleArrowTiles2, sizeof(gDoubleArrowTiles2), 0x8000},
{NULL}
};
extern const struct FontInfo gFontInfos[];
const struct SpritePalette gUnknown_81EA6A4[] =
{
{gUnknown_841F408, 0x8000},
{NULL}
};
extern const u8 gMenuCursorDimensions[][2];
const struct SpriteTemplate gUnknown_81EA6B4 =
{
.tileTag = 0x8000,
.paletteTag = 0x8000,
.oam = &gUnknown_83AC9D0,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_80062B0,
};
extern const u16 gFont9JapaneseGlyphs[];
const struct KeypadIcon gKeypadIcons[] = {
{ 0x0, 0x8, 0xC },
{ 0x1, 0x8, 0xC },
{ 0x2, 0x10, 0xC },
{ 0x4, 0x10, 0xC },
{ 0x6, 0x18, 0xC },
{ 0x9, 0x18, 0xC },
{ 0xC, 0x8, 0xC },
{ 0xD, 0x8, 0xC },
{ 0xE, 0x8, 0xC },
{ 0xF, 0x8, 0xC },
{ 0x20, 0x8, 0xC },
{ 0x21, 0x8, 0xC },
{ 0x22, 0x8, 0xC },
};
extern const u16 gFont8LatinGlyphs[];
extern const u8 gFont8LatinGlyphWidths[];
extern const u16 gFont0LatinGlyphs[];
extern const u8 gFont0LatinGlyphWidths[];
extern const u16 gFont7LatinGlyphs[];
extern const u8 gFont7LatinGlyphWidths[];
extern const u16 gFont2LatinGlyphs[];
extern const u8 gFont2LatinGlyphWidths[];
extern const u16 gFont1LatinGlyphs[];
extern const u8 gFont1LatinGlyphWidths[];
extern const u16 gFont0JapaneseGlyphs[];
extern const u16 gFont1JapaneseGlyphs[];
extern const u16 gFont2JapaneseGlyphs[];
extern const u8 gFont2JapaneseGlyphWidths[];
const u8 gKeypadIconTiles[] = INCBIN_U8("data/graphics/fonts/keypad_icons.4bpp");
// Font 0
const u16 gFont0LatinGlyphs[] = INCBIN_U16("data/graphics/fonts/font0_latin.latfont");
const u8 gFont0LatinGlyphWidths[] =
{
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x05, 0x04, 0x04, 0x05,
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
0x05, 0x05, 0x04, 0x05, 0x04, 0x04, 0x05, 0x05, 0x05, 0x06, 0x05, 0x05, 0x05, 0x05,
0x05, 0x05, 0x08, 0x07, 0x08, 0x05, 0x05, 0x05, 0x05, 0x05, 0x08, 0x08, 0x07, 0x05,
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x08,
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x07, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04,
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x08, 0x08, 0x08, 0x08, 0x05,
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x07, 0x07, 0x05, 0x05, 0x05, 0x05, 0x05,
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x08, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
0x05, 0x05, 0x05, 0x04, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
0x05, 0x08, 0x05, 0x08, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04,
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x05, 0x05, 0x05,
0x05, 0x04, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x05, 0x05,
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
0x05, 0x08, 0x07, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
0x05, 0x05, 0x05, 0x05, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
0x05, 0x05, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x05
};
const u16 gFont0JapaneseGlyphs[] = INCBIN_U16("data/graphics/fonts/font0_jap.fwjpnfont");
// Font 1
const u16 gFont1LatinGlyphs[] = INCBIN_U16("data/graphics/fonts/font1_latin.latfont");
const u8 gFont1LatinGlyphWidths[] =
{
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x09, 0x08, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x0A, 0x08, 0x05, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08,
0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x06, 0x08, 0x05, 0x05, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x0C, 0x0C, 0x0C, 0x0C, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08, 0x08, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x05, 0x06, 0x06, 0x06, 0x03, 0x03, 0x06,
0x06, 0x08, 0x05, 0x09, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x06, 0x04, 0x06, 0x05,
0x05, 0x06, 0x05, 0x06, 0x06, 0x06, 0x05, 0x05, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x08, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x0C, 0x0C, 0x0C, 0x0C, 0x08, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A,
0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x06
};
const u16 gFont1JapaneseGlyphs[] = INCBIN_U16("data/graphics/fonts/font1_jap.fwjpnfont");
// Font 2
const u16 gFont2LatinGlyphs[] = INCBIN_U16("data/graphics/fonts/font2_latin.latfont");
const u8 gFont2LatinGlyphWidths[] =
{
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x09, 0x08, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x0A, 0x08, 0x05, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08,
0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x06, 0x08, 0x05, 0x05, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x0C, 0x0C, 0x0C, 0x0C, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08, 0x08, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x05, 0x06, 0x06, 0x06, 0x03, 0x03, 0x06,
0x06, 0x08, 0x05, 0x09, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x06, 0x04, 0x06, 0x05,
0x05, 0x06, 0x05, 0x06, 0x06, 0x06, 0x05, 0x05, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x08, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x0C, 0x0C, 0x0C, 0x0C, 0x08, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A,
0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x06
};
const u16 gFont2JapaneseGlyphs[] = INCBIN_U16("data/graphics/fonts/font2_jap.fwjpnfont");
const u8 gFont2JapaneseGlyphWidths[] =
{
0x00, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A,
0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A,
0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0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0x06, 0x05, 0x06, 0x06, 0x02, 0x04, 0x06,
0x03, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A,
0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x00
};
// Font 4
const u16 gFont4LatinGlyphs[] = INCBIN_U16("data/graphics/fonts/font4_latin.latfont");
const u8 gFont4LatinGlyphWidths[] =
{
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x09, 0x08, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x0A, 0x08, 0x05, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08,
0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x06, 0x08, 0x05, 0x05, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x0C, 0x0C, 0x0C, 0x0C, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08, 0x08, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x05, 0x06, 0x06, 0x06, 0x03, 0x03, 0x06,
0x06, 0x08, 0x05, 0x09, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x06, 0x04, 0x06, 0x05,
0x05, 0x06, 0x05, 0x06, 0x06, 0x06, 0x05, 0x05, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x08, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x0C, 0x0C, 0x0C, 0x0C, 0x08, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A,
0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x06
};
const u16 gFont4JapaneseGlyphs[] = INCBIN_U16("data/graphics/fonts/font4_jap.fwjpnfont");
const u8 gFont4Jap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0x0A, 0x0A, 0x0A, 0x08, 0x0A, 0x0A, 0x0A, 0x0A, 0x08,
0x08, 0x08, 0x0A, 0x0A, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x06, 0x02, 0x04, 0x06,
0x03, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A,
0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x00
};
// Font 5
const u16 gFont5LatinGlyphs[] = INCBIN_U16("data/graphics/fonts/font5_latin.latfont");
const u8 gFont5LatinGlyphWidths[] =
{
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x09, 0x08, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x0A, 0x08, 0x05, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08,
0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x06, 0x08, 0x05, 0x05, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x0C, 0x0C, 0x0C, 0x0C, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08, 0x08, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x05, 0x06, 0x06, 0x06, 0x03, 0x03, 0x06,
0x06, 0x08, 0x05, 0x09, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x06, 0x04, 0x06, 0x05,
0x05, 0x06, 0x05, 0x06, 0x06, 0x06, 0x05, 0x05, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x08, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x0C, 0x0C, 0x0C, 0x0C, 0x08, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A,
0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
0x08, 0x08, 0x08, 0x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09, 0x09, 0x08, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A,
0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A,
0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x09, 0x08, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08,
0x08, 0x08, 0x08, 0x05, 0x09, 0x0A, 0x0A, 0x0A, 0x08, 0x0A, 0x0A, 0x0A, 0x0A, 0x08,
0x08, 0x08, 0x0A, 0x0A, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x06, 0x02, 0x04, 0x06,
0x03, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
0x06, 0x06, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A,
0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x00
};
// Font 9
const u16 gFont9JapaneseGlyphs[] = INCBIN_U16("data/graphics/fonts/font9_jap.fwjpnfont");
u16 Font0Func(struct TextPrinter *textPrinter)
{
@@ -982,7 +1305,7 @@ _08005CD0:\n\
ldrb r2, [r6, 0x1F]\n\
cmp r2, 0\n\
beq _08005D40\n\
ldr r4, _08005D04 @ =gUnknown_81EA650\n\
ldr r4, _08005D04 @ =gWindowVerticalScrollSpeeds\n\
ldr r5, _08005D08 @ =gSaveBlock2Ptr\n\
ldr r0, [r5]\n\
ldrb r0, [r0, 0x14]\n\
@@ -1004,7 +1327,7 @@ _08005CD0:\n\
strb r0, [r6, 0x1F]\n\
b _08005D36\n\
.align 2, 0\n\
_08005D04: .4byte gUnknown_81EA650\n\
_08005D04: .4byte gWindowVerticalScrollSpeeds\n\
_08005D08: .4byte gSaveBlock2Ptr\n\
_08005D0C:\n\
ldrb r0, [r6, 0x4]\n\
@@ -1438,3 +1761,412 @@ u8 RenderTextFont9(u8 *pixels, u8 fontId, u8 *str)
RestoreTextColors(&colorBackup[0], &colorBackup[1], &colorBackup[2]);
return 1;
}
void sub_80062B0(struct Sprite *sprite)
{
if(sprite->data[0])
{
sprite->data[0]--;
}
else
{
sprite->data[0] = 8;
switch(sprite->data[1])
{
case 0:
sprite->pos2.y = 0;
break;
case 1:
sprite->pos2.y = 1;
break;
case 2:
sprite->pos2.y = 2;
break;
case 3:
sprite->pos2.y = 1;
sprite->data[1] = 0;
return;
}
sprite->data[1]++;
}
}
u8 sub_8006300(u8 sheetId, u16 x, u16 y, u8 priority, u8 subpriority)
{
u8 spriteId;
LoadSpriteSheet(&gUnknown_81EA68C[sheetId & 1]);
LoadSpritePalette(gUnknown_81EA6A4);
spriteId = CreateSprite(&gUnknown_81EA6B4, x + 3, y + 4, subpriority);
gSprites[spriteId].oam.priority = (priority & 3);
gSprites[spriteId].oam.matrixNum = 0;
gSprites[spriteId].data[0] = 8;
return spriteId;
}
void sub_8006398(u8 spriteId)
{
DestroySprite(&gSprites[spriteId]);
FreeSpriteTilesByTag(0x8000);
FreeSpritePaletteByTag(0x8000);
}
u8 DrawKeypadIcon(u8 windowId, u8 keypadIconId, u16 x, u16 y)
{
BlitBitmapRectToWindow(
windowId,
gKeypadIconTiles + (gKeypadIcons[keypadIconId].tile_offset * 0x20),
0,
0,
0x80,
0x80,
x,
y,
gKeypadIcons[keypadIconId].width,
gKeypadIcons[keypadIconId].height);
return gKeypadIcons[keypadIconId].width;
}
u8 GetKeypadIconTileOffset(u8 keypadIconId)
{
return gKeypadIcons[keypadIconId].tile_offset;
}
u8 GetKeypadIconWidth(u8 keypadIconId)
{
return gKeypadIcons[keypadIconId].width;
}
u8 GetKeypadIconHeight(u8 keypadIconId)
{
return gKeypadIcons[keypadIconId].height;
}
void DecompressGlyphFont0(u16 glyphId, bool32 isJapanese)
{
const u16* glyphs;
if (isJapanese == 1)
{
glyphs = gFont0JapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId & 0xF));
DecompressGlyphTile(glyphs, (u16 *)gGlyphInfo);
DecompressGlyphTile(glyphs + 0x80, (u16 *)(gGlyphInfo + 0x40));
gGlyphInfo[0x80] = 8;
gGlyphInfo[0x81] = 12;
}
else
{
glyphs = gFont0LatinGlyphs + (0x10 * glyphId);
DecompressGlyphTile(glyphs, (u16 *)gGlyphInfo);
DecompressGlyphTile(glyphs + 0x8, (u16 *)(gGlyphInfo + 0x40));
gGlyphInfo[0x80] = gFont0LatinGlyphWidths[glyphId];
gGlyphInfo[0x81] = 13;
}
}
u32 GetGlyphWidthFont0(u16 glyphId, bool32 isJapanese)
{
if (isJapanese == TRUE)
return 8;
else
return gFont0LatinGlyphWidths[glyphId];
}
void DecompressGlyphFont1(u16 glyphId, bool32 isJapanese)
{
const u16* glyphs;
if (isJapanese == TRUE)
{
int eff;
glyphs = gFont1JapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId & (eff = 0xF))); // shh, no questions, only matching now
DecompressGlyphTile(glyphs, (u16 *)gGlyphInfo);
DecompressGlyphTile(glyphs + 0x80, (u16 *)(gGlyphInfo + 0x40));
gGlyphInfo[0x80] = 8;
gGlyphInfo[0x81] = 16;
}
else
{
glyphs = gFont1LatinGlyphs + (0x20 * glyphId);
DecompressGlyphTile(glyphs, (u16 *)gGlyphInfo);
DecompressGlyphTile(glyphs + 0x8, (u16 *)(gGlyphInfo + 0x20));
DecompressGlyphTile(glyphs + 0x10, (u16 *)(gGlyphInfo + 0x40));
DecompressGlyphTile(glyphs + 0x18, (u16 *)(gGlyphInfo + 0x60));
gGlyphInfo[0x80] = gFont1LatinGlyphWidths[glyphId];
gGlyphInfo[0x81] = 14;
}
}
u32 GetGlyphWidthFont1(u16 glyphId, bool32 isJapanese)
{
if (isJapanese == TRUE)
return 8;
else
return gFont1LatinGlyphWidths[glyphId];
}
void DecompressGlyphFont2(u16 glyphId, bool32 isJapanese)
{
const u16* glyphs;
int i;
u8 lastColor;
if(isJapanese == TRUE)
{
if(glyphId == 0)
{
lastColor = GetLastTextColor(2);
for(i = 0; i < 0x80; i++)
{
gGlyphInfo[i] = lastColor | lastColor << 4;
// Game Freak, please. writing the same values over and over...
gGlyphInfo[0x80] = 10;
gGlyphInfo[0x81] = 12;
}
}
else
{
glyphs = gFont2JapaneseGlyphs + (0x100 * (glyphId >> 0x3)) + (0x10 * (glyphId & 0x7));
DecompressGlyphTile(glyphs, (u16 *)gGlyphInfo);
DecompressGlyphTile(glyphs + 0x8, (u16 *)(gGlyphInfo + 0x20));
DecompressGlyphTile(glyphs + 0x80, (u16 *)(gGlyphInfo + 0x40));
DecompressGlyphTile(glyphs + 0x88, (u16 *)(gGlyphInfo + 0x60));
gGlyphInfo[0x80] = gFont2JapaneseGlyphWidths[glyphId];
gGlyphInfo[0x81] = 12;
}
}
else
{
if(glyphId == 0)
{
lastColor = GetLastTextColor(2);
for(i = 0; i < 0x80; i++)
{
gGlyphInfo[i] = lastColor | lastColor << 4;
// but why
gGlyphInfo[0x80] = gFont2LatinGlyphWidths[0];
gGlyphInfo[0x81] = 14;
}
}
else
{
glyphs = gFont2LatinGlyphs + (0x20 * glyphId);
DecompressGlyphTile(glyphs, (u16 *)gGlyphInfo);
DecompressGlyphTile(glyphs + 0x8, (u16 *)(gGlyphInfo + 0x20));
DecompressGlyphTile(glyphs + 0x10, (u16 *)(gGlyphInfo + 0x40));
DecompressGlyphTile(glyphs + 0x18, (u16 *)(gGlyphInfo + 0x60));
gGlyphInfo[0x80] = gFont2LatinGlyphWidths[glyphId];
gGlyphInfo[0x81] = 14;
}
}
}
u32 GetGlyphWidthFont2(u16 glyphId, bool32 isJapanese)
{
if (isJapanese == TRUE)
{
if(glyphId == 0)
return 10;
return gFont2JapaneseGlyphWidths[glyphId];
}
else
{
return gFont2LatinGlyphWidths[glyphId];
}
}
void DecompressGlyphFont3(u16 glyphId, bool32 isJapanese)
{
const u16* glyphs;
int i;
u8 lastColor;
if(isJapanese == TRUE)
{
if(glyphId == 0)
{
lastColor = GetLastTextColor(2);
for(i = 0; i < 0x80; i++)
{
gGlyphInfo[i] = lastColor | lastColor << 4;
// Game Freak, please. writing the same values over and over...
gGlyphInfo[0x80] = 10;
gGlyphInfo[0x81] = 12;
}
}
else
{
glyphs = gFont2JapaneseGlyphs + (0x100 * (glyphId >> 0x3)) + (0x10 * (glyphId & 0x7));
DecompressGlyphTile(glyphs, (u16 *)gGlyphInfo);
DecompressGlyphTile(glyphs + 0x8, (u16 *)(gGlyphInfo + 0x20));
DecompressGlyphTile(glyphs + 0x80, (u16 *)(gGlyphInfo + 0x40));
DecompressGlyphTile(glyphs + 0x88, (u16 *)(gGlyphInfo + 0x60));
gGlyphInfo[0x80] = 10;
gGlyphInfo[0x81] = 12;
}
}
else
DecompressGlyphFont2(glyphId, isJapanese);
}
u32 GetGlyphWidthFont3(u16 glyphId, bool32 isJapanese)
{
if(isJapanese == TRUE)
return 10;
else
return gFont2LatinGlyphWidths[glyphId];
}
void DecompressGlyphFont4(u16 glyphId, bool32 isJapanese)
{
const u16* glyphs;
int i;
u8 lastColor;
if(isJapanese == TRUE)
{
if(glyphId == 0)
{
lastColor = GetLastTextColor(2);
for(i = 0; i < 0x80; i++)
{
gGlyphInfo[i] = lastColor | lastColor << 4;
// Game Freak, please. writing the same values over and over...
gGlyphInfo[0x80] = 10;
gGlyphInfo[0x81] = 12;
}
}
else
{
glyphs = gFont4JapaneseGlyphs + (0x100 * (glyphId >> 0x3)) + (0x10 * (glyphId & 0x7));
DecompressGlyphTile(glyphs, (u16 *)gGlyphInfo);
DecompressGlyphTile(glyphs + 0x8, (u16 *)(gGlyphInfo + 0x20));
DecompressGlyphTile(glyphs + 0x80, (u16 *)(gGlyphInfo + 0x40));
DecompressGlyphTile(glyphs + 0x88, (u16 *)(gGlyphInfo + 0x60));
gGlyphInfo[0x80] = gFont4JapaneseGlyphWidths[glyphId];
gGlyphInfo[0x81] = 12;
}
}
else
{
if(glyphId == 0)
{
lastColor = GetLastTextColor(2);
for(i = 0; i < 0x80; i++)
{
gGlyphInfo[i] = lastColor | lastColor << 4;
// but why
gGlyphInfo[0x80] = gFont4LatinGlyphWidths[0];
gGlyphInfo[0x81] = 14;
}
}
else
{
glyphs = gFont4LatinGlyphs + (0x20 * glyphId);
DecompressGlyphTile(glyphs, (u16 *)gGlyphInfo);
DecompressGlyphTile(glyphs + 0x8, (u16 *)(gGlyphInfo + 0x20));
DecompressGlyphTile(glyphs + 0x10, (u16 *)(gGlyphInfo + 0x40));
DecompressGlyphTile(glyphs + 0x18, (u16 *)(gGlyphInfo + 0x60));
gGlyphInfo[0x80] = gFont4LatinGlyphWidths[glyphId];
gGlyphInfo[0x81] = 14;
}
}
}
u32 GetGlyphWidthFont4(u16 glyphId, bool32 isJapanese)
{
if(isJapanese == TRUE)
{
if(glyphId == 0)
return 10;
return gFont4JapaneseGlyphWidths[glyphId];
}
else
return gFont4LatinGlyphWidths[glyphId];
}
void DecompressGlyphFont5(u16 glyphId, bool32 isJapanese)
{
const u16* glyphs;
int i;
u8 lastColor;
if(isJapanese == TRUE)
{
if(glyphId == 0)
{
lastColor = GetLastTextColor(2);
for(i = 0; i < 0x80; i++)
{
gGlyphInfo[i] = lastColor | lastColor << 4;
// Game Freak, please. writing the same values over and over...
gGlyphInfo[0x80] = 10;
gGlyphInfo[0x81] = 12;
}
}
else
{
glyphs = gFont5JapaneseGlyphs + (0x100 * (glyphId >> 0x3)) + (0x10 * (glyphId & 0x7));
DecompressGlyphTile(glyphs, (u16 *)gGlyphInfo);
DecompressGlyphTile(glyphs + 0x8, (u16 *)(gGlyphInfo + 0x20));
DecompressGlyphTile(glyphs + 0x80, (u16 *)(gGlyphInfo + 0x40));
DecompressGlyphTile(glyphs + 0x88, (u16 *)(gGlyphInfo + 0x60));
gGlyphInfo[0x80] = gFont5JapaneseGlyphWidths[glyphId];
gGlyphInfo[0x81] = 12;
}
}
else
{
if(glyphId == 0)
{
lastColor = GetLastTextColor(2);
for(i = 0; i < 0x80; i++)
{
gGlyphInfo[i] = lastColor | lastColor << 4;
// but why
gGlyphInfo[0x80] = gFont5LatinGlyphWidths[0];
gGlyphInfo[0x81] = 14;
}
}
else
{
glyphs = gFont5LatinGlyphs + (0x20 * glyphId);
DecompressGlyphTile(glyphs, (u16 *)gGlyphInfo);
DecompressGlyphTile(glyphs + 0x8, (u16 *)(gGlyphInfo + 0x20));
DecompressGlyphTile(glyphs + 0x10, (u16 *)(gGlyphInfo + 0x40));
DecompressGlyphTile(glyphs + 0x18, (u16 *)(gGlyphInfo + 0x60));
gGlyphInfo[0x80] = gFont5LatinGlyphWidths[glyphId];
gGlyphInfo[0x81] = 14;
}
}
}
u32 GetGlyphWidthFont5(u16 glyphId, bool32 isJapanese)
{
if(isJapanese == TRUE)
{
if(glyphId == 0)
return 10;
return gFont5JapaneseGlyphWidths[glyphId];
}
else
return gFont5LatinGlyphWidths[glyphId];
}
void DecompressGlyphFont9(u16 glyphId)
{
const u16* glyphs = gFont9JapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId & 0xF));
DecompressGlyphTile(glyphs, (u16 *)gGlyphInfo);
DecompressGlyphTile(glyphs + 0x80, (u16 *)(gGlyphInfo + 0x40));
gGlyphInfo[0x80] = 8;
gGlyphInfo[0x81] = 12;
}