summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDragorn421 <Dragorn421@users.noreply.github.com>2024-08-27 14:32:33 +0200
committerGitHub <noreply@github.com>2024-08-27 14:32:33 +0200
commitfd14ddcbf1577bcaeac1e51b5e452819c243df73 (patch)
treee2d7ef7ca631cbe37aa2b2585c474301ca4a0161 /src
parentd2aca2239fb2a814ffe9bfad8f2a100445e11ce8 (diff)
T() macro 5 (#2089)
* T() in __osMalloc.c * T() in code_80097A00.c * T() in debug_malloc.c * T() in code/load.c * T() in sys_math3d.c * T() in z_collision_btltbls.c, z_fbdemo_fade.c, z_fcurve_data_skelanime.c, z_view.c * T() in z_collision_check.c * remaining T() in __osMalloc.c * __osMalloc consistency * format
Diffstat (limited to 'src')
-rw-r--r--src/code/__osMalloc.c71
-rw-r--r--src/code/code_80097A00.c3
-rw-r--r--src/code/debug_malloc.c6
-rw-r--r--src/code/load.c23
-rw-r--r--src/code/sys_math3d.c16
-rw-r--r--src/code/z_collision_btltbls.c2
-rw-r--r--src/code/z_collision_check.c62
-rw-r--r--src/code/z_fbdemo_fade.c4
-rw-r--r--src/code/z_fcurve_data_skelanime.c3
-rw-r--r--src/code/z_view.c5
10 files changed, 104 insertions, 91 deletions
diff --git a/src/code/__osMalloc.c b/src/code/__osMalloc.c
index c70b5ce77..951a4b077 100644
--- a/src/code/__osMalloc.c
+++ b/src/code/__osMalloc.c
@@ -126,7 +126,9 @@ ArenaNode* ArenaImpl_GetNextBlock(ArenaNode* node) {
ArenaNode* next = node->next;
if (next != NULL && (next == NULL || (next->magic != NODE_MAGIC))) {
- osSyncPrintf(VT_COL(RED, WHITE) "緊急事態!メモリリーク発見! (block=%08x)\n" VT_RST, next);
+ osSyncPrintf(VT_COL(RED, WHITE) T("緊急事態!メモリリーク発見! (block=%08x)\n",
+ "Emergency! Memory leak detected! (block=%08x)\n") VT_RST,
+ next);
next = NULL;
node->next = NULL;
}
@@ -137,7 +139,9 @@ ArenaNode* ArenaImpl_GetPrevBlock(ArenaNode* node) {
ArenaNode* prev = node->prev;
if (prev != NULL && (prev == NULL || (prev->magic != NODE_MAGIC))) {
- osSyncPrintf(VT_COL(RED, WHITE) "緊急事態!メモリリーク発見! (block=%08x)\n" VT_RST, prev);
+ osSyncPrintf(VT_COL(RED, WHITE) T("緊急事態!メモリリーク発見! (block=%08x)\n",
+ "Emergency! Memory leak detected! (block=%08x)\n") VT_RST,
+ prev);
prev = NULL;
node->prev = NULL;
}
@@ -243,9 +247,10 @@ void __osMalloc_FreeBlockTest(Arena* arena, ArenaNode* node) {
while (iter < end) {
if (*iter != BLOCK_UNINIT_MAGIC_32 && *iter != BLOCK_FREE_MAGIC_32) {
- osSyncPrintf(
- VT_COL(RED, WHITE) "緊急事態!メモリリーク検出! (block=%08x s=%08x e=%08x p=%08x)\n" VT_RST, node,
- start, end, iter);
+ osSyncPrintf(VT_COL(RED, WHITE)
+ T("緊急事態!メモリリーク検出! (block=%08x s=%08x e=%08x p=%08x)\n",
+ "Emergency! Memory leak detected! (block=%08x s=%08x e=%08x p=%08x)\n") VT_RST,
+ node, start, end, iter);
__osDisplayArena(arena);
return;
}
@@ -475,19 +480,20 @@ void __osFree_NoLock(Arena* arena, void* ptr) {
node = (ArenaNode*)((u32)ptr - sizeof(ArenaNode));
if (node == NULL || node->magic != NODE_MAGIC) {
- // "__osFree: Unauthorized release (%08x)"
- PRINTF(VT_COL(RED, WHITE) "__osFree:不正解放(%08x)\n" VT_RST, ptr);
+ PRINTF(VT_COL(RED, WHITE) T("__osFree:不正解放(%08x)\n", "__osFree: Unauthorized release (%08x)\n") VT_RST,
+ ptr);
return;
}
if (node->isFree) {
- PRINTF(VT_COL(RED, WHITE) "__osFree:二重解放(%08x)\n" VT_RST, ptr); // "__osFree: Double release (%08x)"
+ PRINTF(VT_COL(RED, WHITE) T("__osFree:二重解放(%08x)\n", "__osFree: Double release (%08x)\n") VT_RST, ptr);
return;
}
#if OOT_DEBUG
if (arena != node->arena && arena != NULL) {
- // "__osFree:Tried to release in a different way than when it was secured (%08x:%08x)"
- PRINTF(VT_COL(RED, WHITE) "__osFree:確保時と違う方法で解放しようとした (%08x:%08x)\n" VT_RST, arena,
- node->arena);
+ PRINTF(VT_COL(RED, WHITE)
+ T("__osFree:確保時と違う方法で解放しようとした (%08x:%08x)\n",
+ "__osFree:Tried to release in a different way than when it was secured (%08x:%08x)\n") VT_RST,
+ arena, node->arena);
return;
}
#endif
@@ -540,19 +546,22 @@ void __osFree_NoLockDebug(Arena* arena, void* ptr, const char* file, int line) {
node = (ArenaNode*)((u32)ptr - sizeof(ArenaNode));
if (node == NULL || node->magic != NODE_MAGIC) {
- // "__osFree: Unauthorized release (%08x)"
- PRINTF(VT_COL(RED, WHITE) "__osFree:不正解放(%08x) [%s:%d ]\n" VT_RST, ptr, file, line);
+ PRINTF(VT_COL(RED, WHITE)
+ T("__osFree:不正解放(%08x) [%s:%d ]\n", "__osFree: Unauthorized release (%08x) [%s:%d ]\n") VT_RST,
+ ptr, file, line);
return;
}
if (node->isFree) {
- // "__osFree: Double release (%08x)"
- PRINTF(VT_COL(RED, WHITE) "__osFree:二重解放(%08x) [%s:%d ]\n" VT_RST, ptr, file, line);
+ PRINTF(VT_COL(RED, WHITE) T("__osFree:二重解放(%08x) [%s:%d ]\n", "__osFree: Double release (%08x) [%s:%d ]\n")
+ VT_RST,
+ ptr, file, line);
return;
}
if (arena != node->arena && arena != NULL) {
- // "__osFree:Tried to release in a different way than when it was secured (%08x:%08x)"
- PRINTF(VT_COL(RED, WHITE) "__osFree:確保時と違う方法で解放しようとした (%08x:%08x)\n" VT_RST, arena,
- node->arena);
+ PRINTF(VT_COL(RED, WHITE)
+ T("__osFree:確保時と違う方法で解放しようとした (%08x:%08x)\n",
+ "__osFree:Tried to release in a different way than when it was secured (%08x:%08x)\n") VT_RST,
+ arena, node->arena);
return;
}
@@ -619,14 +628,14 @@ void* __osRealloc(Arena* arena, void* ptr, u32 newSize) {
} else {
node = (ArenaNode*)((u32)ptr - sizeof(ArenaNode));
if (newSize == node->size) {
- // "Does nothing because the memory block size does not change"
- osSyncPrintf("メモリブロックサイズが変わらないためなにもしません\n");
+ osSyncPrintf(T("メモリブロックサイズが変わらないためなにもしません\n",
+ "Does nothing because the memory block size does not change\n"));
} else if (node->size < newSize) {
next = NODE_GET_NEXT(node);
sizeDiff = newSize - node->size;
if ((u32)next == ((u32)node + node->size + sizeof(ArenaNode)) && next->isFree && next->size >= sizeDiff) {
- // "Merge because there is a free block after the current memory block"
- osSyncPrintf("現メモリブロックの後ろにフリーブロックがあるので結合します\n");
+ osSyncPrintf(T("現メモリブロックの後ろにフリーブロックがあるので結合します\n",
+ "Merge because there is a free block after the current memory block\n"));
next->size -= sizeDiff;
overNext = NODE_GET_NEXT(next);
newNext = (ArenaNode*)((u32)next + sizeDiff);
@@ -637,8 +646,8 @@ void* __osRealloc(Arena* arena, void* ptr, u32 newSize) {
node->size = newSize;
memmove(node->next, next, sizeof(ArenaNode));
} else {
- // "Allocate a new memory block and move the contents"
- osSyncPrintf("新たにメモリブロックを確保して内容を移動します\n");
+ osSyncPrintf(T("新たにメモリブロックを確保して内容を移動します\n",
+ "Allocate a new memory block and move the contents\n"));
newAlloc = __osMalloc_NoLock(arena, newSize);
if (newAlloc != NULL) {
bcopy(ptr, newAlloc, node->size);
@@ -651,8 +660,8 @@ void* __osRealloc(Arena* arena, void* ptr, u32 newSize) {
if (next2 != NULL && next2->isFree) {
blockSize = ALIGN16(newSize) + sizeof(ArenaNode);
- // "Increased free block behind current memory block"
- osSyncPrintf("現メモリブロックの後ろのフリーブロックを大きくしました\n");
+ osSyncPrintf(T("現メモリブロックの後ろのフリーブロックを大きくしました\n",
+ "Increased free block behind current memory block\n"));
newNext2 = (ArenaNode*)((u32)node + blockSize);
localCopy = *next2;
*newNext2 = localCopy;
@@ -666,8 +675,8 @@ void* __osRealloc(Arena* arena, void* ptr, u32 newSize) {
} else if (newSize + sizeof(ArenaNode) < node->size) {
blockSize = ALIGN16(newSize) + sizeof(ArenaNode);
- // "Generated because there is no free block after the current memory block"
- osSyncPrintf("現メモリブロックの後ろにフリーブロックがないので生成します\n");
+ osSyncPrintf(T("現メモリブロックの後ろにフリーブロックがないので生成します\n",
+ "Generated because there is no free block after the current memory block\n"));
newNext2 = (ArenaNode*)((u32)node + blockSize);
newNext2->next = NODE_GET_NEXT(node);
newNext2->prev = node;
@@ -681,8 +690,8 @@ void* __osRealloc(Arena* arena, void* ptr, u32 newSize) {
overNext2->prev = newNext2;
}
} else {
- // "There is no room to generate free blocks"
- osSyncPrintf("フリーブロック生成するだけの空きがありません\n");
+ osSyncPrintf(
+ T("フリーブロック生成するだけの空きがありません\n", "There is no room to generate free blocks\n"));
ptr = NULL;
}
}
@@ -735,7 +744,7 @@ void __osDisplayArena(Arena* arena) {
ArenaNode* next;
if (!__osMallocIsInitialized(arena)) {
- osSyncPrintf("アリーナは初期化されていません\n"); // "Arena is not initialized"
+ osSyncPrintf(T("アリーナは初期化されていません\n", "Arena is not initialized\n"));
return;
}
diff --git a/src/code/code_80097A00.c b/src/code/code_80097A00.c
index eecf74099..b452a92e1 100644
--- a/src/code/code_80097A00.c
+++ b/src/code/code_80097A00.c
@@ -285,8 +285,7 @@ u8 Inventory_DeleteEquipment(PlayState* play, s16 equipment) {
s32 pad;
u16 equipValue = gSaveContext.save.info.equips.equipment & gEquipMasks[equipment];
- // "Erasing equipment item = %d zzz=%d"
- PRINTF("装備アイテム抹消 = %d zzz=%d\n", equipment, equipValue);
+ PRINTF(T("装備アイテム抹消 = %d zzz=%d\n", "Erasing equipment item = %d zzz=%d\n"), equipment, equipValue);
if (equipValue) {
equipValue >>= gEquipShifts[equipment];
diff --git a/src/code/debug_malloc.c b/src/code/debug_malloc.c
index 3ca092bd3..ccccbb154 100644
--- a/src/code/debug_malloc.c
+++ b/src/code/debug_malloc.c
@@ -12,14 +12,12 @@ s32 gDebugArenaLogSeverity = LOG_SEVERITY_ERROR;
void DebugArena_CheckPointer(void* ptr, u32 size, const char* name, const char* action) {
if (ptr == NULL) {
if (gDebugArenaLogSeverity >= LOG_SEVERITY_ERROR) {
- // "%s: %u bytes %s failed\n"
- PRINTF("%s: %u バイトの%sに失敗しました\n", name, size, action);
+ PRINTF(T("%s: %u バイトの%sに失敗しました\n", "%s: %u bytes %s failed\n"), name, size, action);
__osDisplayArena(&sDebugArena);
return;
}
} else if (gDebugArenaLogSeverity >= LOG_SEVERITY_VERBOSE) {
- // "%s: %u bytes %s succeeded\n"
- PRINTF("%s: %u バイトの%sに成功しました\n", name, size, action);
+ PRINTF(T("%s: %u バイトの%sに成功しました\n", "%s: %u bytes %s succeeded\n"), name, size, action);
}
}
diff --git a/src/code/load.c b/src/code/load.c
index 27e687ff5..39662cbce 100644
--- a/src/code/load.c
+++ b/src/code/load.c
@@ -8,16 +8,17 @@ size_t Overlay_Load(uintptr_t vromStart, uintptr_t vromEnd, void* vramStart, voi
s32 size = vromEnd - vromStart;
if (gOverlayLogSeverity >= 3) {
- // "Start loading dynamic link function"
- PRINTF("\nダイナミックリンクファンクションのロードを開始します\n");
+ PRINTF(
+ T("\nダイナミックリンクファンクションのロードを開始します\n", "\nStart loading dynamic link function\n"));
}
size = vromEnd - vromStart;
end = (uintptr_t)allocatedRamAddr + size;
if (gOverlayLogSeverity >= 3) {
- // "DMA transfer of TEXT, DATA, RODATA + rel (%08x-%08x)"
- PRINTF("TEXT,DATA,RODATA+relをDMA転送します(%08x-%08x)\n", allocatedRamAddr, end);
+ PRINTF(T("TEXT,DATA,RODATA+relをDMA転送します(%08x-%08x)\n",
+ "DMA transfer of TEXT, DATA, RODATA + rel (%08x-%08x)\n"),
+ allocatedRamAddr, end);
}
// DMA the overlay, wait until transfer completes
@@ -34,7 +35,7 @@ size_t Overlay_Load(uintptr_t vromStart, uintptr_t vromEnd, void* vramStart, voi
}
if (gOverlayLogSeverity >= 3) {
- PRINTF("リロケーションします\n"); // "Relocate"
+ PRINTF(T("リロケーションします\n", "Relocate\n"));
}
// Relocate pointers in overlay code and data
@@ -43,8 +44,8 @@ size_t Overlay_Load(uintptr_t vromStart, uintptr_t vromEnd, void* vramStart, voi
// Clear bss if present, bss is located immediately following the relocations
if (ovlRelocs->bssSize != 0) {
if (gOverlayLogSeverity >= 3) {
- // "Clear BSS area (% 08x-% 08x)"
- PRINTF("BSS領域をクリアします(%08x-%08x)\n", end, end + ovlRelocs->bssSize);
+ PRINTF(T("BSS領域をクリアします(%08x-%08x)\n", "Clear BSS area (%08x-%08x)\n"), end,
+ end + ovlRelocs->bssSize);
}
bzero((void*)end, ovlRelocs->bssSize);
}
@@ -52,8 +53,8 @@ size_t Overlay_Load(uintptr_t vromStart, uintptr_t vromEnd, void* vramStart, voi
size = (uintptr_t)(ovlRelocs->relocations + ovlRelocs->nRelocations) - (uintptr_t)ovlRelocs;
if (gOverlayLogSeverity >= 3) {
- // "Clear REL area (%08x-%08x)"
- PRINTF("REL領域をクリアします(%08x-%08x)\n", ovlRelocs, (uintptr_t)ovlRelocs + size);
+ PRINTF(T("REL領域をクリアします(%08x-%08x)\n", "Clear REL area (%08x-%08x)\n"), ovlRelocs,
+ (uintptr_t)ovlRelocs + size);
}
// Clear relocations, this space remains allocated and goes unused
@@ -65,8 +66,8 @@ size_t Overlay_Load(uintptr_t vromStart, uintptr_t vromEnd, void* vramStart, voi
osInvalICache(allocatedRamAddr, size);
if (gOverlayLogSeverity >= 3) {
- // "Finish loading dynamic link function"
- PRINTF("ダイナミックリンクファンクションのロードを終了します\n\n");
+ PRINTF(
+ T("ダイナミックリンクファンクションのロードを終了します\n\n", "Finish loading dynamic link function\n\n"));
}
return size;
diff --git a/src/code/sys_math3d.c b/src/code/sys_math3d.c
index 6ac7482da..9d2759601 100644
--- a/src/code/sys_math3d.c
+++ b/src/code/sys_math3d.c
@@ -127,9 +127,9 @@ void Math3D_LineClosestToPoint(InfiniteLine* line, Vec3f* pos, Vec3f* closestPoi
dirVectorLengthSq = Math3D_Vec3fMagnitudeSq(&line->dir);
if (IS_ZERO(dirVectorLengthSq)) {
PRINTF(VT_COL(YELLOW, BLACK));
- // "Math3D_lineVsPosSuisenCross(): No straight line length"
- PRINTF("Math3D_lineVsPosSuisenCross():直線の長さがありません\n");
- PRINTF("cross = pos を返します。\n"); // "Returns cross = pos."
+ PRINTF(T("Math3D_lineVsPosSuisenCross():直線の長さがありません\n",
+ "Math3D_lineVsPosSuisenCross(): No straight line length\n"));
+ PRINTF(T("cross = pos を返します。\n", "Returns cross = pos.\n"));
PRINTF(VT_RST);
Math_Vec3f_Copy(closestPoint, pos);
//! @bug Missing early return
@@ -930,8 +930,9 @@ f32 Math3D_Plane(Plane* plane, Vec3f* pointOnPlane) {
f32 Math3D_UDistPlaneToPos(f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* p) {
if (OOT_DEBUG && IS_ZERO(sqrtf(SQ(nx) + SQ(ny) + SQ(nz)))) {
PRINTF(VT_COL(YELLOW, BLACK));
- // "Math3DLengthPlaneAndPos(): Normal size is near zero %f %f %f"
- PRINTF("Math3DLengthPlaneAndPos():法線size がゼロ近いです%f %f %f\n", nx, ny, nz);
+ PRINTF(T("Math3DLengthPlaneAndPos():法線size がゼロ近いです%f %f %f\n",
+ "Math3DLengthPlaneAndPos(): Normal size is near zero %f %f %f\n"),
+ nx, ny, nz);
PRINTF(VT_RST);
return 0.0f;
}
@@ -948,8 +949,9 @@ f32 Math3D_DistPlaneToPos(f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* p) {
normMagnitude = sqrtf(SQ(nx) + SQ(ny) + SQ(nz));
if (IS_ZERO(normMagnitude)) {
PRINTF(VT_COL(YELLOW, BLACK));
- // "Math3DSignedLengthPlaneAndPos(): Normal size is close to zero %f %f %f"
- PRINTF("Math3DSignedLengthPlaneAndPos():法線size がゼロ近いです%f %f %f\n", nx, ny, nz);
+ PRINTF(T("Math3DSignedLengthPlaneAndPos():法線size がゼロ近いです%f %f %f\n",
+ "Math3DSignedLengthPlaneAndPos(): Normal size is close to zero %f %f %f\n"),
+ nx, ny, nz);
PRINTF(VT_RST);
return 0.0f;
}
diff --git a/src/code/z_collision_btltbls.c b/src/code/z_collision_btltbls.c
index 3873cce0d..1039371f7 100644
--- a/src/code/z_collision_btltbls.c
+++ b/src/code/z_collision_btltbls.c
@@ -811,7 +811,7 @@ static DamageTable sDamageTablePresets[] = {
// Gets the pointer to one of the 23 preset damage tables. Returns NULL if index is out of range.
DamageTable* DamageTable_Get(s32 index) {
if (!(0 <= index && index < ARRAY_COUNT(sDamageTablePresets))) {
- PRINTF("CollisionBtlTbl_get():インデックスオーバー\n"); // "Index over"
+ PRINTF(T("CollisionBtlTbl_get():インデックスオーバー\n", "CollisionBtlTbl_get(): Index over\n"));
return NULL;
}
return &sDamageTablePresets[index];
diff --git a/src/code/z_collision_check.c b/src/code/z_collision_check.c
index 22f266ca1..a475a0912 100644
--- a/src/code/z_collision_check.c
+++ b/src/code/z_collision_check.c
@@ -352,7 +352,7 @@ s32 Collider_SetJntSphToActor(PlayState* play, ColliderJntSph* dest, ColliderJnt
if (dest->elements == NULL) {
dest->count = 0;
PRINTF(VT_FGCOL(RED));
- PRINTF("ClObjJntSph_set():zelda_malloc()出来ません。\n"); // "Can not."
+ PRINTF(T("ClObjJntSph_set():zelda_malloc()出来ません。\n", "ClObjJntSph_set():zelda_malloc() Can not.\n"));
PRINTF(VT_RST);
return false;
}
@@ -380,7 +380,7 @@ s32 Collider_SetJntSphAllocType1(PlayState* play, ColliderJntSph* dest, Actor* a
if (dest->elements == NULL) {
dest->count = 0;
PRINTF(VT_FGCOL(RED));
- PRINTF("ClObjJntSph_set3():zelda_malloc_出来ません。\n"); // "Can not."
+ PRINTF(T("ClObjJntSph_set3():zelda_malloc_出来ません。\n", "ClObjJntSph_set3():zelda_malloc_ Can not.\n"));
PRINTF(VT_RST);
return false;
}
@@ -408,7 +408,7 @@ s32 Collider_SetJntSphAlloc(PlayState* play, ColliderJntSph* dest, Actor* actor,
if (dest->elements == NULL) {
dest->count = 0;
PRINTF(VT_FGCOL(RED));
- PRINTF("ClObjJntSph_set5():zelda_malloc出来ません\n"); // "Can not."
+ PRINTF(T("ClObjJntSph_set5():zelda_malloc出来ません\n", "ClObjJntSph_set5():zelda_malloc Can not\n"));
PRINTF(VT_RST);
return false;
}
@@ -714,7 +714,7 @@ s32 Collider_SetTrisAllocType1(PlayState* play, ColliderTris* dest, Actor* actor
if (dest->elements == NULL) {
dest->count = 0;
PRINTF(VT_FGCOL(RED));
- PRINTF("ClObjTris_set3():zelda_malloc()出来ません\n"); // "Can not."
+ PRINTF(T("ClObjTris_set3():zelda_malloc()出来ません\n", "ClObjTris_set3():zelda_malloc() Can not\n"));
PRINTF(VT_RST);
return false;
}
@@ -740,7 +740,7 @@ s32 Collider_SetTrisAlloc(PlayState* play, ColliderTris* dest, Actor* actor, Col
if (dest->elements == NULL) {
PRINTF(VT_FGCOL(RED));
- PRINTF("ClObjTris_set5():zelda_malloc出来ません\n"); // "Can not."
+ PRINTF(T("ClObjTris_set5():zelda_malloc出来ません\n", "ClObjTris_set5():zelda_malloc Can not\n"));
PRINTF(VT_RST);
dest->count = 0;
return false;
@@ -1170,8 +1170,8 @@ s32 CollisionCheck_SetAT(PlayState* play, CollisionCheckContext* colChkCtx, Coll
return -1;
}
if (colChkCtx->colATCount >= COLLISION_CHECK_AT_MAX) {
- // "Index exceeded and cannot add more"
- PRINTF("CollisionCheck_setAT():インデックスがオーバーして追加不能\n");
+ PRINTF(T("CollisionCheck_setAT():インデックスがオーバーして追加不能\n",
+ "CollisionCheck_setAT(): Index exceeded and cannot add more\n"));
return -1;
}
if (colChkCtx->sacFlags & SAC_ENABLE) {
@@ -1198,15 +1198,16 @@ s32 CollisionCheck_SetAT_SAC(PlayState* play, CollisionCheckContext* colChkCtx,
}
if (colChkCtx->sacFlags & SAC_ENABLE) {
if (!(index < colChkCtx->colATCount)) {
- // "You are trying to register a location that is larger than the total number of data."
- PRINTF("CollisionCheck_setAT_SAC():全データ数より大きいところに登録しようとしている。\n");
+ PRINTF(T("CollisionCheck_setAT_SAC():全データ数より大きいところに登録しようとしている。\n",
+ "CollisionCheck_setAT_SAC(): You are trying to register a location that is larger than the total "
+ "number of data.\n"));
return -1;
}
colChkCtx->colAT[index] = collider;
} else {
if (!(colChkCtx->colATCount < COLLISION_CHECK_AT_MAX)) {
- // "Index exceeded and cannot add more"
- PRINTF("CollisionCheck_setAT():インデックスがオーバーして追加不能\n");
+ PRINTF(T("CollisionCheck_setAT():インデックスがオーバーして追加不能\n",
+ "CollisionCheck_setAT(): Index exceeded and cannot add more\n"));
return -1;
}
index = colChkCtx->colATCount;
@@ -1238,8 +1239,8 @@ s32 CollisionCheck_SetAC(PlayState* play, CollisionCheckContext* colChkCtx, Coll
return -1;
}
if (colChkCtx->colACCount >= COLLISION_CHECK_AC_MAX) {
- // "Index exceeded and cannot add more"
- PRINTF("CollisionCheck_setAC():インデックスがオーバして追加不能\n");
+ PRINTF(T("CollisionCheck_setAC():インデックスがオーバして追加不能\n",
+ "CollisionCheck_setAC(): Index exceeded and cannot add more\n"));
return -1;
}
if (colChkCtx->sacFlags & SAC_ENABLE) {
@@ -1266,15 +1267,16 @@ s32 CollisionCheck_SetAC_SAC(PlayState* play, CollisionCheckContext* colChkCtx,
}
if (colChkCtx->sacFlags & SAC_ENABLE) {
if (!(index < colChkCtx->colACCount)) {
- // "You are trying to register a location that is larger than the total number of data."
- PRINTF("CollisionCheck_setAC_SAC():全データ数より大きいところに登録しようとしている。\n");
+ PRINTF(T("CollisionCheck_setAC_SAC():全データ数より大きいところに登録しようとしている。\n",
+ "CollisionCheck_setAC_SAC(): You are trying to register a location that is larger than the total "
+ "number of data.\n"));
return -1;
}
colChkCtx->colAC[index] = collider;
} else {
if (!(colChkCtx->colACCount < COLLISION_CHECK_AC_MAX)) {
- // "Index exceeded and cannot add more"
- PRINTF("CollisionCheck_setAC():インデックスがオーバして追加不能\n");
+ PRINTF(T("CollisionCheck_setAC():インデックスがオーバして追加不能\n",
+ "CollisionCheck_setAC(): Index exceeded and cannot add more\n"));
return -1;
}
index = colChkCtx->colACCount;
@@ -1308,8 +1310,8 @@ s32 CollisionCheck_SetOC(PlayState* play, CollisionCheckContext* colChkCtx, Coll
return -1;
}
if (colChkCtx->colOCCount >= COLLISION_CHECK_OC_MAX) {
- // "Index exceeded and cannot add more"
- PRINTF("CollisionCheck_setOC():インデックスがオーバして追加不能\n");
+ PRINTF(T("CollisionCheck_setOC():インデックスがオーバして追加不能\n",
+ "CollisionCheck_setOC(): Index exceeded and cannot add more\n"));
return -1;
}
if (colChkCtx->sacFlags & SAC_ENABLE) {
@@ -1336,16 +1338,17 @@ s32 CollisionCheck_SetOC_SAC(PlayState* play, CollisionCheckContext* colChkCtx,
}
if (colChkCtx->sacFlags & SAC_ENABLE) {
if (!(index < colChkCtx->colOCCount)) {
- // "You are trying to register a location that is larger than the total number of data."
- PRINTF("CollisionCheck_setOC_SAC():全データ数より大きいところに登録しようとしている。\n");
+ PRINTF(T("CollisionCheck_setOC_SAC():全データ数より大きいところに登録しようとしている。\n",
+ "CollisionCheck_setOC_SAC(): You are trying to register a location that is larger than the total "
+ "number of data.\n"));
return -1;
}
//! @bug Should be colOC
colChkCtx->colAT[index] = collider;
} else {
if (!(colChkCtx->colOCCount < COLLISION_CHECK_OC_MAX)) {
- // "Index exceeded and cannot add more"
- PRINTF("CollisionCheck_setOC():インデックスがオーバして追加不能\n");
+ PRINTF(T("CollisionCheck_setOC():インデックスがオーバして追加不能\n",
+ "CollisionCheck_setOC(): Index exceeded and cannot add more\n"));
return -1;
}
index = colChkCtx->colOCCount;
@@ -1366,8 +1369,8 @@ s32 CollisionCheck_SetOCLine(PlayState* play, CollisionCheckContext* colChkCtx,
}
Collider_ResetLineOC(play, collider);
if (!(colChkCtx->colLineCount < COLLISION_CHECK_OC_LINE_MAX)) {
- // "Index exceeded and cannot add more"
- PRINTF("CollisionCheck_setOCLine():インデックスがオーバして追加不能\n");
+ PRINTF(T("CollisionCheck_setOCLine():インデックスがオーバして追加不能\n",
+ "CollisionCheck_setOCLine(): Index exceeded and cannot add more\n"));
return -1;
}
index = colChkCtx->colLineCount;
@@ -2975,8 +2978,8 @@ void CollisionCheck_OC(PlayState* play, CollisionCheckContext* colChkCtx) {
}
vsFunc = sOCVsFuncs[(*leftColP)->shape][(*rightColP)->shape];
if (vsFunc == NULL) {
- // "Not compatible"
- PRINTF("CollisionCheck_OC():未対応 %d, %d\n", (*leftColP)->shape, (*rightColP)->shape);
+ PRINTF(T("CollisionCheck_OC():未対応 %d, %d\n", "CollisionCheck_OC(): Not compatible %d, %d\n"),
+ (*leftColP)->shape, (*rightColP)->shape);
continue;
}
vsFunc(play, colChkCtx, *leftColP, *rightColP);
@@ -3237,8 +3240,9 @@ s32 CollisionCheck_LineOC(PlayState* play, CollisionCheckContext* colChkCtx, Vec
}
lineCheck = sOCLineCheckFuncs[(*col)->shape];
if (lineCheck == NULL) {
- // "type %d not supported"
- PRINTF("CollisionCheck_generalLineOcCheck():未対応 %dタイプ\n", (*col)->shape);
+ PRINTF(T("CollisionCheck_generalLineOcCheck():未対応 %dタイプ\n",
+ "CollisionCheck_generalLineOcCheck(): type %d not supported\n"),
+ (*col)->shape);
} else {
result = lineCheck(play, colChkCtx, (*col), a, b);
if (result) {
diff --git a/src/code/z_fbdemo_fade.c b/src/code/z_fbdemo_fade.c
index a63e3dbbd..d2cb382f0 100644
--- a/src/code/z_fbdemo_fade.c
+++ b/src/code/z_fbdemo_fade.c
@@ -68,8 +68,8 @@ void TransitionFade_Update(void* thisx, s32 updateRate) {
this->isDone = true;
}
if ((u32)gSaveContext.transFadeDuration == 0) {
- // "Divide by 0! Zero is included in ZCommonGet fade_speed"
- PRINTF(VT_COL(RED, WHITE) "0除算! ZCommonGet fade_speed に0がはいってる" VT_RST);
+ PRINTF(VT_COL(RED, WHITE) T("0除算! ZCommonGet fade_speed に0がはいってる",
+ "Divide by 0! Zero is included in ZCommonGet fade_speed") VT_RST);
}
alpha = (255.0f * this->timer) / ((void)0, gSaveContext.transFadeDuration);
diff --git a/src/code/z_fcurve_data_skelanime.c b/src/code/z_fcurve_data_skelanime.c
index 37ac91818..600db1979 100644
--- a/src/code/z_fcurve_data_skelanime.c
+++ b/src/code/z_fcurve_data_skelanime.c
@@ -212,8 +212,7 @@ void SkelCurve_DrawLimb(PlayState* play, s32 limbIndex, SkelCurve* skelCurve, Ov
gSPDisplayList(POLY_XLU_DISP++, dList);
}
} else {
- // "FcSkeletonInfo_draw_child (): Not supported"
- PRINTF("FcSkeletonInfo_draw_child():未対応\n");
+ PRINTF(T("FcSkeletonInfo_draw_child():未対応\n", "FcSkeletonInfo_draw_child(): Not supported\n"));
}
}
diff --git a/src/code/z_view.c b/src/code/z_view.c
index 780fd7f40..1c27679e2 100644
--- a/src/code/z_view.c
+++ b/src/code/z_view.c
@@ -648,8 +648,9 @@ s32 View_ErrorCheckEyePosition(f32 eyeX, f32 eyeY, f32 eyeZ) {
if (error != 0) {
PRINTF(VT_FGCOL(RED));
- // "Is too large"
- PRINTF("eye が大きすぎます eye=[%8.3f %8.3f %8.3f] error=%d\n", eyeX, eyeY, eyeZ, error);
+ PRINTF(T("eye が大きすぎます eye=[%8.3f %8.3f %8.3f] error=%d\n",
+ "eye is too large eye=[%8.3f %8.3f %8.3f] error=%d\n"),
+ eyeX, eyeY, eyeZ, error);
PRINTF(VT_RST);
}