Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assetify crash font #1140

Merged
merged 7 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/crash_screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "PR/os_internal_thread.h"
#include "libc/xstdio.h"
#include "gcc/string.h"
#include "include_asset.h"

typedef struct {
/* 0x000 */ OSThread thread;
Expand All @@ -25,7 +26,9 @@ u8 gCrashScreencharToGlyph[128] = {
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1,
};

// TODO extract?
#if VERSION_US
INCLUDE_IMG("crash_screen/font.png", gCrashScreenFont);
#else
u32 gCrashScreenFont[] = {
0x70871C30, 0x8988A250, 0x88808290, 0x88831C90, 0x888402F8, 0x88882210, 0x71CF9C10, 0xF9CF9C70, 0x8228A288,
0xF200A288, 0x0BC11C78, 0x0A222208, 0x8A222288, 0x71C21C70, 0x23C738F8, 0x5228A480, 0x8A282280, 0x8BC822F0,
Expand All @@ -36,6 +39,7 @@ u32 gCrashScreenFont[] = {
0x80020800, 0xF8011000, 0x70800000, 0x88822200, 0x08820400, 0x108F8800, 0x20821000, 0x00022200, 0x20800020,
0x00000000,
};
#endif

const char* gFaultCauses[18] = {
"Interrupt",
Expand Down Expand Up @@ -104,7 +108,7 @@ void crash_screen_draw_rect(s32 x, s32 y, s32 width, s32 height) {
void crash_screen_draw_glyph(s32 x, s32 y, s32 glyph) {
s32 shift = ((glyph % 5) * 6);
u16 width = gCrashScreen.width;
const u32* data = &gCrashScreenFont[glyph / 5 * 7];
const u32* data = &((u32*)gCrashScreenFont)[glyph / 5 * 7];
s32 i;
s32 j;

Expand Down
2 changes: 1 addition & 1 deletion tools/build/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
CRC_TOOL = f"{BUILD_TOOLS}/rom/n64crc"

PIGMENT = "pigment64"
PIGMENT_REQ_VERSION = "0.3.0"
PIGMENT_REQ_VERSION = "0.4.2"


def exec_shell(command: List[str]) -> str:
Expand Down
7 changes: 6 additions & 1 deletion ver/us/splat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,12 @@ segments:
- [0x511E0, vtx, theater/wall_shadows_vtx]
- [0x51260]
- [0x51540, ia8, ui/no_controller, 128, 32]
- [auto, .data, crash_screen]
- start: auto
type: .data
name: crash_screen
subsegments:
- [0x52690, i1, crash_screen/font, 32, 64]
- [0x52790]
- [auto, .data, os/nusys/nugfxtaskmgr]
- [auto, .data, os/nusys/nusimgr]
- [auto, .data, cam_math]
Expand Down
Loading