mirror of https://github.com/zeldaret/oot.git
more T() in debug_malloc.c graph.c z_actor.c malloc.c
This commit is contained in:
parent
a4182086ee
commit
a67662a9f1
|
@ -34,7 +34,7 @@ void DebugArena_CheckPointer(void* ptr, u32 size, const char* name, const char*
|
||||||
void* DebugArena_Malloc(u32 size) {
|
void* DebugArena_Malloc(u32 size) {
|
||||||
void* ptr = __osMalloc(&sDebugArena, 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;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ void* DebugArena_Malloc(u32 size) {
|
||||||
void* DebugArena_MallocDebug(u32 size, const char* file, int line) {
|
void* DebugArena_MallocDebug(u32 size, const char* file, int line) {
|
||||||
void* ptr = __osMallocDebug(&sDebugArena, size, file, 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;
|
return ptr;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -50,7 +50,7 @@ void* DebugArena_MallocDebug(u32 size, const char* file, int line) {
|
||||||
void* DebugArena_MallocR(u32 size) {
|
void* DebugArena_MallocR(u32 size) {
|
||||||
void* ptr = __osMallocR(&sDebugArena, 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;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,21 +58,21 @@ void* DebugArena_MallocR(u32 size) {
|
||||||
void* DebugArena_MallocRDebug(u32 size, const char* file, int line) {
|
void* DebugArena_MallocRDebug(u32 size, const char* file, int line) {
|
||||||
void* ptr = __osMallocRDebug(&sDebugArena, size, file, 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;
|
return ptr;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void* DebugArena_Realloc(void* ptr, u32 newSize) {
|
void* DebugArena_Realloc(void* ptr, u32 newSize) {
|
||||||
ptr = __osRealloc(&sDebugArena, ptr, 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;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG_FEATURES
|
#if DEBUG_FEATURES
|
||||||
void* DebugArena_ReallocDebug(void* ptr, u32 newSize, const char* file, int line) {
|
void* DebugArena_ReallocDebug(void* ptr, u32 newSize, const char* file, int line) {
|
||||||
ptr = __osReallocDebug(&sDebugArena, ptr, newSize, file, 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;
|
return ptr;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -96,7 +96,7 @@ void* DebugArena_Calloc(u32 num, u32 size) {
|
||||||
bzero(ret, n);
|
bzero(ret, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG_ARENA_CHECK_POINTER(ret, n, "debug_calloc", "確保");
|
DEBUG_ARENA_CHECK_POINTER(ret, n, "debug_calloc", T("確保", "Secure"));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -331,10 +331,10 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
|
||||||
#if DEBUG_FEATURES
|
#if DEBUG_FEATURES
|
||||||
OPEN_DISPS(gfxCtx, "../graph.c", 966);
|
OPEN_DISPS(gfxCtx, "../graph.c", 966);
|
||||||
|
|
||||||
gDPNoOpString(WORK_DISP++, "WORK_DISP 開始", 0);
|
gDPNoOpString(WORK_DISP++, T("WORK_DISP 開始", "WORK_DISP start"), 0);
|
||||||
gDPNoOpString(POLY_OPA_DISP++, "POLY_OPA_DISP 開始", 0);
|
gDPNoOpString(POLY_OPA_DISP++, T("POLY_OPA_DISP 開始", "POLY_OPA_DISP start"), 0);
|
||||||
gDPNoOpString(POLY_XLU_DISP++, "POLY_XLU_DISP 開始", 0);
|
gDPNoOpString(POLY_XLU_DISP++, T("POLY_XLU_DISP 開始", "POLY_XLU_DISP start"), 0);
|
||||||
gDPNoOpString(OVERLAY_DISP++, "OVERLAY_DISP 開始", 0);
|
gDPNoOpString(OVERLAY_DISP++, T("OVERLAY_DISP 開始", "OVERLAY_DISP start"), 0);
|
||||||
|
|
||||||
CLOSE_DISPS(gfxCtx, "../graph.c", 975);
|
CLOSE_DISPS(gfxCtx, "../graph.c", 975);
|
||||||
#endif
|
#endif
|
||||||
|
@ -345,10 +345,10 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
|
||||||
#if DEBUG_FEATURES
|
#if DEBUG_FEATURES
|
||||||
OPEN_DISPS(gfxCtx, "../graph.c", 987);
|
OPEN_DISPS(gfxCtx, "../graph.c", 987);
|
||||||
|
|
||||||
gDPNoOpString(WORK_DISP++, "WORK_DISP 終了", 0);
|
gDPNoOpString(WORK_DISP++, T("WORK_DISP 終了", "WORK_DISP end"), 0);
|
||||||
gDPNoOpString(POLY_OPA_DISP++, "POLY_OPA_DISP 終了", 0);
|
gDPNoOpString(POLY_OPA_DISP++, T("POLY_OPA_DISP 終了", "POLY_OPA_DISP end"), 0);
|
||||||
gDPNoOpString(POLY_XLU_DISP++, "POLY_XLU_DISP 終了", 0);
|
gDPNoOpString(POLY_XLU_DISP++, T("POLY_XLU_DISP 終了", "POLY_XLU_DISP end"), 0);
|
||||||
gDPNoOpString(OVERLAY_DISP++, "OVERLAY_DISP 終了", 0);
|
gDPNoOpString(OVERLAY_DISP++, T("OVERLAY_DISP 終了", "OVERLAY_DISP end"), 0);
|
||||||
|
|
||||||
CLOSE_DISPS(gfxCtx, "../graph.c", 996);
|
CLOSE_DISPS(gfxCtx, "../graph.c", 996);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2688,7 +2688,7 @@ void Actor_DrawLensActors(PlayState* play, s32 numInvisibleActors, Actor** invis
|
||||||
|
|
||||||
OPEN_DISPS(gfxCtx, "../z_actor.c", 6197);
|
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++);
|
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.
|
// The z-buffer will be updated where the mask is not fully transparent.
|
||||||
Actor_DrawLensOverlay(gfxCtx);
|
Actor_DrawLensOverlay(gfxCtx);
|
||||||
|
|
||||||
// "Magic lens invisible Actor display START"
|
gDPNoOpString(POLY_OPA_DISP++,
|
||||||
gDPNoOpString(POLY_OPA_DISP++, "魔法のメガネ 見えないActor表示 START", numInvisibleActors);
|
T("魔法のメガネ 見えないActor表示 START", "Magic lens invisible Actor display START"),
|
||||||
|
numInvisibleActors);
|
||||||
|
|
||||||
invisibleActor = &invisibleActors[0];
|
invisibleActor = &invisibleActors[0];
|
||||||
for (i = 0; i < numInvisibleActors; i++) {
|
for (i = 0; i < numInvisibleActors; i++) {
|
||||||
// "Magic lens invisible Actor display"
|
gDPNoOpString(POLY_OPA_DISP++, T("魔法のメガネ 見えないActor表示", "Magic lens invisible Actor display"),
|
||||||
gDPNoOpString(POLY_OPA_DISP++, "魔法のメガネ 見えないActor表示", i);
|
i);
|
||||||
Actor_Draw(play, *(invisibleActor++));
|
Actor_Draw(play, *(invisibleActor++));
|
||||||
}
|
}
|
||||||
|
|
||||||
// "Magic lens invisible Actor display END"
|
gDPNoOpString(POLY_OPA_DISP++,
|
||||||
gDPNoOpString(POLY_OPA_DISP++, "魔法のメガネ 見えないActor表示 END", numInvisibleActors);
|
T("魔法のメガネ 見えないActor表示 END", "Magic lens invisible Actor display END"),
|
||||||
|
numInvisibleActors);
|
||||||
|
|
||||||
if (play->roomCtx.curRoom.lensMode != LENS_MODE_SHOW_ACTORS) {
|
if (play->roomCtx.curRoom.lensMode != LENS_MODE_SHOW_ACTORS) {
|
||||||
// Draw the lens overlay to the color frame buffer
|
// 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++);
|
gDPPipeSync(POLY_XLU_DISP++);
|
||||||
|
|
||||||
|
@ -2757,10 +2759,10 @@ void Actor_DrawLensActors(PlayState* play, s32 numInvisibleActors, Actor** invis
|
||||||
|
|
||||||
Actor_DrawLensOverlay(gfxCtx);
|
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);
|
CLOSE_DISPS(gfxCtx, "../z_actor.c", 6284);
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ void* SystemArena_Malloc(u32 size) {
|
||||||
ptr = __osMalloc(&gSystemArena, size);
|
ptr = __osMalloc(&gSystemArena, size);
|
||||||
RESTORE_INTERRUPTS();
|
RESTORE_INTERRUPTS();
|
||||||
|
|
||||||
SYSTEM_ARENA_CHECK_POINTER(ptr, size, "malloc", "確保"); // "Secure"
|
SYSTEM_ARENA_CHECK_POINTER(ptr, size, "malloc", T("確保", "Secure"));
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ void* SystemArena_MallocDebug(u32 size, const char* file, int line) {
|
||||||
ptr = __osMallocDebug(&gSystemArena, size, file, line);
|
ptr = __osMallocDebug(&gSystemArena, size, file, line);
|
||||||
RESTORE_INTERRUPTS();
|
RESTORE_INTERRUPTS();
|
||||||
|
|
||||||
SYSTEM_ARENA_CHECK_POINTER(ptr, size, "malloc_DEBUG", "確保"); // "Secure"
|
SYSTEM_ARENA_CHECK_POINTER(ptr, size, "malloc_DEBUG", T("確保", "Secure"));
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -67,7 +67,7 @@ void* SystemArena_MallocR(u32 size) {
|
||||||
ptr = __osMallocR(&gSystemArena, size);
|
ptr = __osMallocR(&gSystemArena, size);
|
||||||
RESTORE_INTERRUPTS();
|
RESTORE_INTERRUPTS();
|
||||||
|
|
||||||
SYSTEM_ARENA_CHECK_POINTER(ptr, size, "malloc_r", "確保"); // "Secure"
|
SYSTEM_ARENA_CHECK_POINTER(ptr, size, "malloc_r", T("確保", "Secure"));
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ void* SystemArena_MallocRDebug(u32 size, const char* file, int line) {
|
||||||
ptr = __osMallocRDebug(&gSystemArena, size, file, line);
|
ptr = __osMallocRDebug(&gSystemArena, size, file, line);
|
||||||
RESTORE_INTERRUPTS();
|
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;
|
return ptr;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -92,7 +92,7 @@ void* SystemArena_Realloc(void* ptr, u32 newSize) {
|
||||||
ptr = __osRealloc(&gSystemArena, ptr, newSize);
|
ptr = __osRealloc(&gSystemArena, ptr, newSize);
|
||||||
RESTORE_INTERRUPTS();
|
RESTORE_INTERRUPTS();
|
||||||
|
|
||||||
SYSTEM_ARENA_CHECK_POINTER(ptr, newSize, "realloc", "再確保"); // "Re-securing"
|
SYSTEM_ARENA_CHECK_POINTER(ptr, newSize, "realloc", T("再確保", "Re-secure"));
|
||||||
return ptr;
|
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);
|
ptr = __osReallocDebug(&gSystemArena, ptr, newSize, file, line);
|
||||||
RESTORE_INTERRUPTS();
|
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;
|
return ptr;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -140,7 +140,7 @@ void* SystemArena_Calloc(u32 num, u32 size) {
|
||||||
bzero(ret, n);
|
bzero(ret, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
SYSTEM_ARENA_CHECK_POINTER(ret, n, "calloc", "確保");
|
SYSTEM_ARENA_CHECK_POINTER(ret, n, "calloc", T("確保", "Secure"));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue