diff options
Diffstat (limited to 'src/debug.c')
-rw-r--r-- | src/debug.c | 94 |
1 files changed, 46 insertions, 48 deletions
diff --git a/src/debug.c b/src/debug.c index 6b9e8e8..0716330 100644 --- a/src/debug.c +++ b/src/debug.c @@ -10,49 +10,47 @@ static void FatalErrorHang(void) __attribute__((noreturn)); extern bool32 gNDS_DebugEnabled; extern u8 gUnknown_203B150; -extern const char gFuncFileLineString[]; - -ALIGNED(4) const char gNotEntryText[] = _("--- not entry ---"); -ALIGNED(4) const char gFuncFileLineStringWPrefix[] = _("%sfunc = '%s'\n" - "file = '%s' line = %5d\n"); - -ALIGNED(4) const char gFuncFileLineString2[] = _("func = '%s'\n" - "file = '%s' line = %5d\n"); - -ALIGNED(4) const char debug_fill14[] = _("pksdir0"); -ALIGNED(4) const char gUnknown_80D421C[] = _(" Print "); -ALIGNED(4) const char debug_fill13[] = _("pksdir0"); - -ALIGNED(4) const char Performance_Text[] = _("Performance"); -ALIGNED(4) const char MemoryCard_Text[] = _("Memory Card"); -ALIGNED(4) const char Memory_Text[] = _("Memory"); -ALIGNED(4) const char Flag_Text[] = _("Flag"); -ALIGNED(4) const char Se_Text[] = _("Se"); -ALIGNED(4) const char Bgm_Text[] = _("Bgm"); -ALIGNED(4) const char Sound_Text[] = _("Sound"); -ALIGNED(4) const char Dungeon_Text[] = _("Dungeon"); -ALIGNED(4) const char GroundScript_Text[] = _("GroundScript"); -ALIGNED(4) const char Ground_Text[] = _("Ground"); - - -ALIGNED(4) const char gNotMountText[] = _("not mount log system"); -ALIGNED(4) const char debug_fill9[] = _("pksdir0"); -ALIGNED(4) const char debug_fill10[] = _("pksdir0"); -ALIGNED(4) const char debug_fill11[] = _("pksdir0"); -ALIGNED(4) const char debug_fill12[] = _("pksdir0"); - -ALIGNED(4) const char gFatalText[] = _("!!!!! Fatal !!!!!\n"); -ALIGNED(4) const char gUnknown_80D42D4[] = _("%s\n"); - -ALIGNED(4) const char debug_fill0[] = _("pksdir0"); -ALIGNED(4) const char debug_fill1[] = _("pksdir0"); -ALIGNED(4) const char debug_fill2[] = _("pksdir0"); -ALIGNED(4) const char debug_fill3[] = _("pksdir0"); -ALIGNED(4) const char debug_fill4[] = _("pksdir0"); -ALIGNED(4) const char debug_fill5[] = _("pksdir0"); -ALIGNED(4) const char debug_fill6[] = _("pksdir0"); -ALIGNED(4) const char debug_fill7[] = _("pksdir0"); -ALIGNED(4) const char debug_fill8[] = _("pksdir0"); +ALIGNED(4) const char gFuncFileLineString[] = "func = '%s'\nfile = '%s' line = %5d"; + +ALIGNED(4) const char gNotEntryText[] = "--- not entry ---"; +ALIGNED(4) const char gFuncFileLineStringWPrefix[] = "%sfunc = '%s'\nfile = '%s' line = %5d\n"; + +ALIGNED(4) const char gFuncFileLineString2[] = "func = '%s'\nfile = '%s' line = %5d\n"; + +ALIGNED(4) const char debug_fill14[] = "pksdir0"; +ALIGNED(4) const char gDebugPrintPrefix[] = " Print "; +ALIGNED(4) const char debug_fill13[] = "pksdir0"; + +ALIGNED(4) const char Performance_Text[] = "Performance"; +ALIGNED(4) const char MemoryCard_Text[] = "Memory Card"; +ALIGNED(4) const char Memory_Text[] = "Memory"; +ALIGNED(4) const char Flag_Text[] = "Flag"; +ALIGNED(4) const char Se_Text[] = "Se"; +ALIGNED(4) const char Bgm_Text[] = "Bgm"; +ALIGNED(4) const char Sound_Text[] = "Sound"; +ALIGNED(4) const char Dungeon_Text[] = "Dungeon"; +ALIGNED(4) const char GroundScript_Text[] = "GroundScript"; +ALIGNED(4) const char Ground_Text[] = "Ground"; + + +ALIGNED(4) const char gNotMountText[] = "not mount log system"; +ALIGNED(4) const char debug_fill9[] = "pksdir0"; +ALIGNED(4) const char debug_fill10[] = "pksdir0"; +ALIGNED(4) const char debug_fill11[] = "pksdir0"; +ALIGNED(4) const char debug_fill12[] = "pksdir0"; + +ALIGNED(4) const char gFatalText[] = "!!!!! Fatal !!!!!\n"; +ALIGNED(4) const char gFatalErrorBufferPlaceholder[] = "%s\n"; + +ALIGNED(4) const char debug_fill0[] = "pksdir0"; +ALIGNED(4) const char debug_fill1[] = "pksdir0"; +ALIGNED(4) const char debug_fill2[] = "pksdir0"; +ALIGNED(4) const char debug_fill3[] = "pksdir0"; +ALIGNED(4) const char debug_fill4[] = "pksdir0"; +ALIGNED(4) const char debug_fill5[] = "pksdir0"; +ALIGNED(4) const char debug_fill6[] = "pksdir0"; +ALIGNED(4) const char debug_fill7[] = "pksdir0"; +ALIGNED(4) const char debug_fill8[] = "pksdir0"; void NDS_DebugInit(void) { @@ -143,15 +141,15 @@ void nullsub_137(void) } -static void FatalErrorPrintFuncFileLine(const char *r0, struct DebugLocation *debug) +static void FatalErrorPrintFuncFileLine(const char *prefix, struct DebugLocation *debug) { char buf[0x100]; - if(r0 != NULL){ - PrintFuncFileLine(buf, debug, r0); + if(prefix != NULL){ + PrintFuncFileLine(buf, debug, prefix); } else { - PrintFuncFileLine(buf, debug, gUnknown_80D421C); + PrintFuncFileLine(buf, debug, gDebugPrintPrefix); } } @@ -246,6 +244,6 @@ void FatalError(struct DebugLocation *debug, const char *text, ...) va_start(vArgv, text); vsprintf(buf, text, vArgv); va_end(vArgv); - FatalErrorFormatMessage(gUnknown_80D42D4, buf); + FatalErrorFormatMessage(gFatalErrorBufferPlaceholder, buf); FatalErrorHang(); } |