From e982c44721a76972de0e16a971e6447fc68f3f67 Mon Sep 17 00:00:00 2001 From: Derek Hensley Date: Sat, 7 Sep 2024 16:03:00 -0600 Subject: Import data + bss (#1676) * extract gfxprint font data as blobs * Remove font from fault_drawer out name * audio heap bss * audio sequence bss * audio session config bss * Move code_801D1E80 down in the spec * Gfxprint don't just include generated c file --- src/boot/O2/gfxprint.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'src/boot/O2') diff --git a/src/boot/O2/gfxprint.c b/src/boot/O2/gfxprint.c index 735514e45..38acfb952 100644 --- a/src/boot/O2/gfxprint.c +++ b/src/boot/O2/gfxprint.c @@ -7,11 +7,21 @@ #define GFXP_FLAG_ENLARGE (1 << 6) #define GFXP_FLAG_OPEN (1 << 7) -//! TODO: Need to extract -extern u16 sGfxPrintFontTLUT[64]; -extern u16 sGfxPrintRainbowTLUT[16]; -extern u8 sGfxPrintRainbowData[8]; -extern u8 sGfxPrintFontData[2048]; +u64 sGfxPrintFontTLUT[] = { +#include "assets/boot/gfxprint/gfx_print_font_tlut.rgba16.inc.c" +}; + +u64 sGfxPrintRainbowTLUT[] = { +#include "assets/boot/gfxprint/gfx_print_rainbow_tlut.rgba16.inc.c" +}; + +u8 sGfxPrintRainbowFont[] = { +#include "assets/boot/gfxprint/sGfxPrintRainbowFont.bin.inc.c" +}; + +u8 sGfxPrintFont[] = { +#include "assets/boot/gfxprint/sGfxPrintFont.bin.inc.c" +}; void GfxPrint_Setup(GfxPrint* this) { s32 width = 16; @@ -24,7 +34,7 @@ void GfxPrint_Setup(GfxPrint* this) { G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE, G_AC_NONE | G_ZS_PRIM | G_RM_XLU_SURF | G_RM_XLU_SURF2); gDPSetCombineMode(this->dList++, G_CC_DECALRGBA, G_CC_DECALRGBA); - gDPLoadTextureBlock_4b(this->dList++, sGfxPrintFontData, G_IM_FMT_CI, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, + gDPLoadTextureBlock_4b(this->dList++, sGfxPrintFont, G_IM_FMT_CI, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gDPLoadTLUT(this->dList++, 64, 256, sGfxPrintFontTLUT); @@ -36,7 +46,7 @@ void GfxPrint_Setup(GfxPrint* this) { gDPSetColor(this->dList++, G_SETPRIMCOLOR, this->color.rgba); - gDPLoadMultiTile_4b(this->dList++, sGfxPrintRainbowData, 0, 1, G_IM_FMT_CI, 2, 8, 0, 0, 1, 7, 4, + gDPLoadMultiTile_4b(this->dList++, sGfxPrintRainbowFont, 0, 1, G_IM_FMT_CI, 2, 8, 0, 0, 1, 7, 4, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 1, 3, G_TX_NOLOD, G_TX_NOLOD); gDPLoadTLUT(this->dList++, 16, 320, sGfxPrintRainbowTLUT); -- cgit v1.2.3