From e8cd6e622f5032d156c45677de61c36a05f7bd9b Mon Sep 17 00:00:00 2001 From: Derek Hensley Date: Wed, 14 Aug 2024 14:08:40 -0700 Subject: [PATCH] Extract sFaultDrawerFont as blob (#1673) --- assets/xml/boot/fault_drawer.xml | 6 ++++++ src/boot/fault_drawer.c | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 assets/xml/boot/fault_drawer.xml diff --git a/assets/xml/boot/fault_drawer.xml b/assets/xml/boot/fault_drawer.xml new file mode 100644 index 0000000000..95386a353b --- /dev/null +++ b/assets/xml/boot/fault_drawer.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/boot/fault_drawer.c b/src/boot/fault_drawer.c index 1917e16641..4c94cc7ad3 100644 --- a/src/boot/fault_drawer.c +++ b/src/boot/fault_drawer.c @@ -34,7 +34,10 @@ typedef struct { /* 0x38 */ FaultDrawerCallback inputCallback; } FaultDrawer; // size = 0x3C -extern const u32 sFaultDrawerFont[]; +//! TODO: Extract the font data properly so we don't have to cast in sFaultDrawerDefault below +const u8 sFaultDrawerFont[] = { +#include "assets/boot/fault_drawer/sFaultDrawerFont.bin.inc.c" +}; FaultDrawer sFaultDrawer; @@ -55,7 +58,7 @@ FaultDrawer sFaultDrawerDefault = { GPACK_RGBA5551(0, 0, 0, 0), // backColor FAULT_DRAWER_CURSOR_X, // cursorX FAULT_DRAWER_CURSOR_Y, // cursorY - sFaultDrawerFont, // fontData + (const u32*)sFaultDrawerFont, // fontData 8, // charW 8, // charH 0, // charWPad @@ -78,9 +81,6 @@ FaultDrawer sFaultDrawerDefault = { NULL, // inputCallback }; -//! TODO: Needs to be extracted -#pragma GLOBAL_ASM("asm/non_matchings/boot/fault_drawer/sFaultDrawerFont.s") - void FaultDrawer_SetOsSyncPrintfEnabled(u32 enabled) { sFaultDrawerInstance->osSyncPrintfEnabled = enabled; }