T() macro 7 (#2102)

* T() macro in most of the rest of code (except z_message, z_actor, ucode_disas, gfxprint, game, fault, db_camera)

* remaining T() macro in boot

* format

* review
This commit is contained in:
Dragorn421
2024-08-28 20:01:41 +02:00
committed by GitHub
parent 7592bf1e42
commit 16ec9b1e13
10 changed files with 49 additions and 38 deletions
+8 -3
View File
@@ -84,19 +84,24 @@ void LogUtils_CheckBoundary(const char* name, s32 value, s32 unk, const char* fi
u32 mask = (unk - 1);
if (value & mask) {
PRINTF(VT_COL(RED, WHITE) "%s %d:%s(%08x) は バウンダリ(%d)違反です\n" VT_RST, file, line, name, value, unk);
PRINTF(VT_COL(RED, WHITE) T("%s %d:%s(%08x) は バウンダリ(%d)違反です\n",
"%s %d:%s(%08x) is a boundary (%d) violation\n") VT_RST,
file, line, name, value, unk);
}
}
void LogUtils_CheckNullPointer(const char* exp, void* ptr, const char* file, int line) {
if (ptr == NULL) {
PRINTF(VT_COL(RED, WHITE) "%s %d:%s は はヌルポインタです\n" VT_RST, file, line, exp);
PRINTF(VT_COL(RED, WHITE) T("%s %d:%s は はヌルポインタです\n", "%s %d:%s is a null pointer\n") VT_RST, file,
line, exp);
}
}
void LogUtils_CheckValidPointer(const char* exp, void* ptr, const char* file, int line) {
if (ptr == NULL || (u32)ptr < 0x80000000 || (0x80000000 + osMemSize) <= (u32)ptr) {
PRINTF(VT_COL(RED, WHITE) "%s %d:ポインタ %s(%08x) が異常です\n" VT_RST, file, line, exp, ptr);
PRINTF(VT_COL(RED, WHITE) T("%s %d:ポインタ %s(%08x) が異常です\n", "%s %d: Pointer %s(%08x) is invalid\n")
VT_RST,
file, line, exp, ptr);
}
}
+6 -2
View File
@@ -20,7 +20,9 @@ void StackCheck_Init(StackEntry* entry, void* stackBottom, void* stackTop, u32 i
iter = sStackInfoListStart;
while (iter) {
if (iter == entry) {
PRINTF(VT_COL(RED, WHITE) "stackcheck_init: %08x は既にリスト中にある\n" VT_RST, entry);
PRINTF(VT_COL(RED, WHITE) T("stackcheck_init: %08x は既にリスト中にある\n",
"stackcheck_init: %08x is already in the list\n") VT_RST,
entry);
return;
}
iter = iter->next;
@@ -68,7 +70,9 @@ void StackCheck_Cleanup(StackEntry* entry) {
}
}
if (inconsistency) {
PRINTF(VT_COL(RED, WHITE) "stackcheck_cleanup: %08x リスト不整合です\n" VT_RST, entry);
PRINTF(VT_COL(RED, WHITE) T("stackcheck_cleanup: %08x リスト不整合です\n",
"stackcheck_cleanup: %08x list inconsistent\n") VT_RST,
entry);
}
}