more T() in debug_malloc.c graph.c z_actor.c malloc.c

This commit is contained in:
Dragorn421 2025-06-01 18:13:04 +02:00
parent a4182086ee
commit a67662a9f1
No known key found for this signature in database
GPG Key ID: 381AEBAF3D429335
4 changed files with 34 additions and 32 deletions

View File

@ -34,7 +34,7 @@ void DebugArena_CheckPointer(void* ptr, u32 size, const char* name, const char*
void* DebugArena_Malloc(u32 size) {
void* ptr = __osMalloc(&sDebugArena, size);
DEBUG_ARENA_CHECK_POINTER(ptr, size, "debug_malloc", "確保"); // "Secure"
DEBUG_ARENA_CHECK_POINTER(ptr, size, "debug_malloc", T("確保", "Secure"));
return ptr;
}
@ -42,7 +42,7 @@ void* DebugArena_Malloc(u32 size) {
void* DebugArena_MallocDebug(u32 size, const char* file, int line) {
void* ptr = __osMallocDebug(&sDebugArena, size, file, line);
DEBUG_ARENA_CHECK_POINTER(ptr, size, "debug_malloc_DEBUG", "確保"); // "Secure"
DEBUG_ARENA_CHECK_POINTER(ptr, size, "debug_malloc_DEBUG", T("確保", "Secure"));
return ptr;
}
#endif
@ -50,7 +50,7 @@ void* DebugArena_MallocDebug(u32 size, const char* file, int line) {
void* DebugArena_MallocR(u32 size) {
void* ptr = __osMallocR(&sDebugArena, size);
DEBUG_ARENA_CHECK_POINTER(ptr, size, "debug_malloc_r", "確保"); // "Secure"
DEBUG_ARENA_CHECK_POINTER(ptr, size, "debug_malloc_r", T("確保", "Secure"));
return ptr;
}
@ -58,21 +58,21 @@ void* DebugArena_MallocR(u32 size) {
void* DebugArena_MallocRDebug(u32 size, const char* file, int line) {
void* ptr = __osMallocRDebug(&sDebugArena, size, file, line);
DEBUG_ARENA_CHECK_POINTER(ptr, size, "debug_malloc_r_DEBUG", "確保"); // "Secure"
DEBUG_ARENA_CHECK_POINTER(ptr, size, "debug_malloc_r_DEBUG", T("確保", "Secure"));
return ptr;
}
#endif
void* DebugArena_Realloc(void* ptr, u32 newSize) {
ptr = __osRealloc(&sDebugArena, ptr, newSize);
DEBUG_ARENA_CHECK_POINTER(ptr, newSize, "debug_realloc", "再確保"); // "Re-securing"
DEBUG_ARENA_CHECK_POINTER(ptr, newSize, "debug_realloc", T("再確保", "Re-secure"));
return ptr;
}
#if DEBUG_FEATURES
void* DebugArena_ReallocDebug(void* ptr, u32 newSize, const char* file, int line) {
ptr = __osReallocDebug(&sDebugArena, ptr, newSize, file, line);
DEBUG_ARENA_CHECK_POINTER(ptr, newSize, "debug_realloc_DEBUG", "再確保"); // "Re-securing"
DEBUG_ARENA_CHECK_POINTER(ptr, newSize, "debug_realloc_DEBUG", T("再確保", "Re-secure"));
return ptr;
}
#endif
@ -96,7 +96,7 @@ void* DebugArena_Calloc(u32 num, u32 size) {
bzero(ret, n);
}
DEBUG_ARENA_CHECK_POINTER(ret, n, "debug_calloc", "確保");
DEBUG_ARENA_CHECK_POINTER(ret, n, "debug_calloc", T("確保", "Secure"));
return ret;
}

View File

@ -331,10 +331,10 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
#if DEBUG_FEATURES
OPEN_DISPS(gfxCtx, "../graph.c", 966);
gDPNoOpString(WORK_DISP++, "WORK_DISP 開始", 0);
gDPNoOpString(POLY_OPA_DISP++, "POLY_OPA_DISP 開始", 0);
gDPNoOpString(POLY_XLU_DISP++, "POLY_XLU_DISP 開始", 0);
gDPNoOpString(OVERLAY_DISP++, "OVERLAY_DISP 開始", 0);
gDPNoOpString(WORK_DISP++, T("WORK_DISP 開始", "WORK_DISP start"), 0);
gDPNoOpString(POLY_OPA_DISP++, T("POLY_OPA_DISP 開始", "POLY_OPA_DISP start"), 0);
gDPNoOpString(POLY_XLU_DISP++, T("POLY_XLU_DISP 開始", "POLY_XLU_DISP start"), 0);
gDPNoOpString(OVERLAY_DISP++, T("OVERLAY_DISP 開始", "OVERLAY_DISP start"), 0);
CLOSE_DISPS(gfxCtx, "../graph.c", 975);
#endif
@ -345,10 +345,10 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
#if DEBUG_FEATURES
OPEN_DISPS(gfxCtx, "../graph.c", 987);
gDPNoOpString(WORK_DISP++, "WORK_DISP 終了", 0);
gDPNoOpString(POLY_OPA_DISP++, "POLY_OPA_DISP 終了", 0);
gDPNoOpString(POLY_XLU_DISP++, "POLY_XLU_DISP 終了", 0);
gDPNoOpString(OVERLAY_DISP++, "OVERLAY_DISP 終了", 0);
gDPNoOpString(WORK_DISP++, T("WORK_DISP 終了", "WORK_DISP end"), 0);
gDPNoOpString(POLY_OPA_DISP++, T("POLY_OPA_DISP 終了", "POLY_OPA_DISP end"), 0);
gDPNoOpString(POLY_XLU_DISP++, T("POLY_XLU_DISP 終了", "POLY_XLU_DISP end"), 0);
gDPNoOpString(OVERLAY_DISP++, T("OVERLAY_DISP 終了", "OVERLAY_DISP end"), 0);
CLOSE_DISPS(gfxCtx, "../graph.c", 996);
#endif

View File

@ -2688,7 +2688,7 @@ void Actor_DrawLensActors(PlayState* play, s32 numInvisibleActors, Actor** invis
OPEN_DISPS(gfxCtx, "../z_actor.c", 6197);
gDPNoOpString(POLY_OPA_DISP++, "魔法のメガネ START", 0); // "Magic lens START"
gDPNoOpString(POLY_OPA_DISP++, T("魔法のメガネ START", "Magic lens START"), 0);
gDPPipeSync(POLY_XLU_DISP++);
@ -2728,23 +2728,25 @@ void Actor_DrawLensActors(PlayState* play, s32 numInvisibleActors, Actor** invis
// The z-buffer will be updated where the mask is not fully transparent.
Actor_DrawLensOverlay(gfxCtx);
// "Magic lens invisible Actor display START"
gDPNoOpString(POLY_OPA_DISP++, "魔法のメガネ 見えないc表示 START", numInvisibleActors);
gDPNoOpString(POLY_OPA_DISP++,
T("魔法のメガネ 見えないc表示 START", "Magic lens invisible Actor display START"),
numInvisibleActors);
invisibleActor = &invisibleActors[0];
for (i = 0; i < numInvisibleActors; i++) {
// "Magic lens invisible Actor display"
gDPNoOpString(POLY_OPA_DISP++, "魔法のメガネ 見えないc表示", i);
gDPNoOpString(POLY_OPA_DISP++, T("魔法のメガネ 見えないc表示", "Magic lens invisible Actor display"),
i);
Actor_Draw(play, *(invisibleActor++));
}
// "Magic lens invisible Actor display END"
gDPNoOpString(POLY_OPA_DISP++, "魔法のメガネ 見えないc表示 END", numInvisibleActors);
gDPNoOpString(POLY_OPA_DISP++,
T("魔法のメガネ 見えないc表示 END", "Magic lens invisible Actor display END"),
numInvisibleActors);
if (play->roomCtx.curRoom.lensMode != LENS_MODE_SHOW_ACTORS) {
// Draw the lens overlay to the color frame buffer
gDPNoOpString(POLY_OPA_DISP++, "青い眼鏡(外側)", 0); // "Blue spectacles (exterior)"
gDPNoOpString(POLY_OPA_DISP++, T("青い眼鏡(外側)", "Blue glasses (outside)"), 0);
gDPPipeSync(POLY_XLU_DISP++);
@ -2757,10 +2759,10 @@ void Actor_DrawLensActors(PlayState* play, s32 numInvisibleActors, Actor** invis
Actor_DrawLensOverlay(gfxCtx);
gDPNoOpString(POLY_OPA_DISP++, "青い眼鏡(外側)", 1); // "Blue spectacles (exterior)"
gDPNoOpString(POLY_OPA_DISP++, T("青い眼鏡(外側)", "Blue glasses (outside)"), 1);
}
gDPNoOpString(POLY_OPA_DISP++, "魔法のメガネ END", 0); // "Magic lens END"
gDPNoOpString(POLY_OPA_DISP++, T("魔法のメガネ END", "Magic lens END"), 0);
CLOSE_DISPS(gfxCtx, "../z_actor.c", 6284);
}

View File

@ -41,7 +41,7 @@ void* SystemArena_Malloc(u32 size) {
ptr = __osMalloc(&gSystemArena, size);
RESTORE_INTERRUPTS();
SYSTEM_ARENA_CHECK_POINTER(ptr, size, "malloc", "確保"); // "Secure"
SYSTEM_ARENA_CHECK_POINTER(ptr, size, "malloc", T("確保", "Secure"));
return ptr;
}
@ -54,7 +54,7 @@ void* SystemArena_MallocDebug(u32 size, const char* file, int line) {
ptr = __osMallocDebug(&gSystemArena, size, file, line);
RESTORE_INTERRUPTS();
SYSTEM_ARENA_CHECK_POINTER(ptr, size, "malloc_DEBUG", "確保"); // "Secure"
SYSTEM_ARENA_CHECK_POINTER(ptr, size, "malloc_DEBUG", T("確保", "Secure"));
return ptr;
}
#endif
@ -67,7 +67,7 @@ void* SystemArena_MallocR(u32 size) {
ptr = __osMallocR(&gSystemArena, size);
RESTORE_INTERRUPTS();
SYSTEM_ARENA_CHECK_POINTER(ptr, size, "malloc_r", "確保"); // "Secure"
SYSTEM_ARENA_CHECK_POINTER(ptr, size, "malloc_r", T("確保", "Secure"));
return ptr;
}
@ -80,7 +80,7 @@ void* SystemArena_MallocRDebug(u32 size, const char* file, int line) {
ptr = __osMallocRDebug(&gSystemArena, size, file, line);
RESTORE_INTERRUPTS();
SYSTEM_ARENA_CHECK_POINTER(ptr, size, "malloc_r_DEBUG", "確保"); // "Secure"
SYSTEM_ARENA_CHECK_POINTER(ptr, size, "malloc_r_DEBUG", T("確保", "Secure"));
return ptr;
}
#endif
@ -92,7 +92,7 @@ void* SystemArena_Realloc(void* ptr, u32 newSize) {
ptr = __osRealloc(&gSystemArena, ptr, newSize);
RESTORE_INTERRUPTS();
SYSTEM_ARENA_CHECK_POINTER(ptr, newSize, "realloc", "再確保"); // "Re-securing"
SYSTEM_ARENA_CHECK_POINTER(ptr, newSize, "realloc", T("再確保", "Re-secure"));
return ptr;
}
@ -104,7 +104,7 @@ void* SystemArena_ReallocDebug(void* ptr, u32 newSize, const char* file, int lin
ptr = __osReallocDebug(&gSystemArena, ptr, newSize, file, line);
RESTORE_INTERRUPTS();
SYSTEM_ARENA_CHECK_POINTER(ptr, newSize, "realloc_DEBUG", "再確保"); // "Re-securing"
SYSTEM_ARENA_CHECK_POINTER(ptr, newSize, "realloc_DEBUG", T("再確保", "Re-secure"));
return ptr;
}
#endif
@ -140,7 +140,7 @@ void* SystemArena_Calloc(u32 num, u32 size) {
bzero(ret, n);
}
SYSTEM_ARENA_CHECK_POINTER(ret, n, "calloc", "確保");
SYSTEM_ARENA_CHECK_POINTER(ret, n, "calloc", T("確保", "Secure"));
return ret;
}