summaryrefslogtreecommitdiff
path: root/src/code
diff options
context:
space:
mode:
authorDragorn421 <Dragorn421@users.noreply.github.com>2021-09-29 01:53:56 +0200
committerGitHub <noreply@github.com>2021-09-28 19:53:56 -0400
commitc57c0f13fcd2d83d412641e71de05153c20fd6d3 (patch)
tree7adb5722bdab340812f14c562c0d8be8b5d9e87e /src/code
parent063b4aed0ce33473d0ba79f8dcdda5c2db47a9ce (diff)
Format all translation comments like `// "..."` (hopefully all of them) (#986)
* Format all translation comments like `// "..."` (hopefully all of them) * Move translation comments to before on long lines Located them with `grep -r src -e '^[^(]*);[ ]*//'` Regex `osSyncPrintf\([^;]*\n.*//` didn't find more * Format two more
Diffstat (limited to 'src/code')
-rw-r--r--src/code/__osMalloc.c18
-rw-r--r--src/code/code_800430A0.c2
-rw-r--r--src/code/db_camera.c16
-rw-r--r--src/code/debug_malloc.c12
-rw-r--r--src/code/graph.c12
-rw-r--r--src/code/irqmgr.c4
-rw-r--r--src/code/padmgr.c2
-rw-r--r--src/code/sched.c2
-rw-r--r--src/code/system_malloc.c12
-rw-r--r--src/code/z_camera.c2
-rw-r--r--src/code/z_fbdemo_fade.c2
-rw-r--r--src/code/z_jpeg.c6
12 files changed, 45 insertions, 45 deletions
diff --git a/src/code/__osMalloc.c b/src/code/__osMalloc.c
index b42effe08..113e1444f 100644
--- a/src/code/__osMalloc.c
+++ b/src/code/__osMalloc.c
@@ -421,16 +421,16 @@ void __osFree_NoLock(Arena* arena, void* ptr) {
node = (ArenaNode*)((u32)ptr - sizeof(ArenaNode));
if (node == NULL || node->magic != NODE_MAGIC) {
- osSyncPrintf(VT_COL(RED, WHITE) "__osFree:不正解放(%08x)\n" VT_RST,
- ptr); // __osFree: Unauthorized release (%08x)
+ // "__osFree: Unauthorized release (%08x)"
+ osSyncPrintf(VT_COL(RED, WHITE) "__osFree:不正解放(%08x)\n" VT_RST, ptr);
return;
}
if (node->isFree) {
- osSyncPrintf(VT_COL(RED, WHITE) "__osFree:二重解放(%08x)\n" VT_RST, ptr); // __osFree: Double release (%08x)
+ osSyncPrintf(VT_COL(RED, WHITE) "__osFree:二重解放(%08x)\n" VT_RST, ptr); // "__osFree: Double release (%08x)"
return;
}
if (arena != node->arena && arena != NULL) {
- // __osFree:Tried to release in a different way than when it was secured (%08x:%08x)
+ // "__osFree:Tried to release in a different way than when it was secured (%08x:%08x)"
osSyncPrintf(VT_COL(RED, WHITE) "__osFree:確保時と違う方法で解放しようとした (%08x:%08x)\n" VT_RST, arena,
node->arena);
return;
@@ -490,17 +490,17 @@ void __osFree_NoLockDebug(Arena* arena, void* ptr, const char* file, s32 line) {
node = (ArenaNode*)((u32)ptr - sizeof(ArenaNode));
if (node == NULL || node->magic != NODE_MAGIC) {
- osSyncPrintf(VT_COL(RED, WHITE) "__osFree:不正解放(%08x) [%s:%d ]\n" VT_RST, ptr, file,
- line); // __osFree: Unauthorized release (%08x)
+ // "__osFree: Unauthorized release (%08x)"
+ osSyncPrintf(VT_COL(RED, WHITE) "__osFree:不正解放(%08x) [%s:%d ]\n" VT_RST, ptr, file, line);
return;
}
if (node->isFree) {
- osSyncPrintf(VT_COL(RED, WHITE) "__osFree:二重解放(%08x) [%s:%d ]\n" VT_RST, ptr, file,
- line); // __osFree: Double release (%08x)
+ // "__osFree: Double release (%08x)"
+ osSyncPrintf(VT_COL(RED, WHITE) "__osFree:二重解放(%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)
+ // "__osFree:Tried to release in a different way than when it was secured (%08x:%08x)"
osSyncPrintf(VT_COL(RED, WHITE) "__osFree:確保時と違う方法で解放しようとした (%08x:%08x)\n" VT_RST, arena,
node->arena);
return;
diff --git a/src/code/code_800430A0.c b/src/code/code_800430A0.c
index 742aa2ea0..b571297f5 100644
--- a/src/code/code_800430A0.c
+++ b/src/code/code_800430A0.c
@@ -30,7 +30,7 @@ void func_800430A0(CollisionContext* colCtx, s32 bgId, Actor* actor) {
osSyncPrintf(VT_FGCOL(RED));
//! @bug file and line are not passed to osSyncPrintf
- // Position is not valid
+ // "Position is not valid"
osSyncPrintf(
"BGCheckCollection_typicalActorPos():位置が妥当ではありません。\npos (%f,%f,%f) file:%s line:%d\n",
pos.x, pos.y, pos.z);
diff --git a/src/code/db_camera.c b/src/code/db_camera.c
index d81b0267e..57a20191e 100644
--- a/src/code/db_camera.c
+++ b/src/code/db_camera.c
@@ -27,10 +27,10 @@ const char* D_8012CF48 = "\x8Cメモリ\x8Dガタリマセン";
const char* D_8012CF4C = "p";
const char* D_8012CF50[] = { "e", "s", "l", "c" };
-const char* D_8012CF60[] = { "\x8Cメモリパック" }; // Mempak
-const char* D_8012CF64 = "\x8Cセーブ"; // Save
-const char* D_8012CF68 = "\x8Cロード"; // Load
-const char* D_8012CF6C = "\x8Cクリア-"; // Clear
+const char* D_8012CF60[] = { "\x8Cメモリパック" }; // "Mempak"
+const char* D_8012CF64 = "\x8Cセーブ"; // "Save"
+const char* D_8012CF68 = "\x8Cロード"; // "Load"
+const char* D_8012CF6C = "\x8Cクリア-"; // "Clear"
const char* D_8012CF70 = "\x8Dヲヌカナイデネ";
const char* D_8012CF74 = "FREE BYTE";
@@ -1519,14 +1519,14 @@ char DbCamera_InitCut(s32 idx, DbCameraSub* sub) {
i = sub->nPoints * sizeof(CutsceneCameraPoint);
sDbCameraCuts[idx].lookAt = DebugArena_MallocDebug(i, "../db_camera.c", 2748);
if (sDbCameraCuts[idx].lookAt == NULL) {
- // Debug camera memory allocation failure
+ // "Debug camera memory allocation failure"
osSyncPrintf("%s: %d: デバッグカメラ メモリ確保失敗!!\n", "../db_camera.c", 2751);
return '?';
}
sDbCameraCuts[idx].position = DebugArena_MallocDebug(i, "../db_camera.c", 2754);
if (sDbCameraCuts[idx].position == NULL) {
- // Debug camera memory allocation failure
+ // "Debug camera memory allocation failure"
osSyncPrintf("%s: %d: デバッグカメラ メモリ確保失敗!!\n", "../db_camera.c", 2757);
DebugArena_FreeDebug(sDbCameraCuts[idx].lookAt, "../db_camera.c", 2758);
sDbCameraCuts[idx].lookAt = NULL;
@@ -1604,7 +1604,7 @@ s32 DbCamera_LoadCallback(char* c) {
sDbCameraCuts[i].lookAt = DebugArena_MallocDebug(ALIGN32(size), "../db_camera.c", 2844);
if (sDbCameraCuts[i].lookAt == NULL) {
- // Debug camera memory allocation failure
+ // "Debug camera memory allocation failure"
osSyncPrintf("%s: %d: デバッグカメラ メモリ確保失敗!!\n", "../db_camera.c", 2847);
return false;
}
@@ -1615,7 +1615,7 @@ s32 DbCamera_LoadCallback(char* c) {
sDbCameraCuts[i].position = DebugArena_MallocDebug(ALIGN32(size), "../db_camera.c", 2855);
if (sDbCameraCuts[i].position == NULL) {
- // Debug camera memory allocation failure
+ // "Debug camera memory allocation failure"
osSyncPrintf("%s: %d: デバッグカメラ メモリ確保失敗!!\n", "../db_camera.c", 2858);
return false;
}
diff --git a/src/code/debug_malloc.c b/src/code/debug_malloc.c
index 73ae71321..ac67e507b 100644
--- a/src/code/debug_malloc.c
+++ b/src/code/debug_malloc.c
@@ -24,40 +24,40 @@ void DebugArena_CheckPointer(void* ptr, u32 size, const char* name, const char*
void* DebugArena_Malloc(u32 size) {
void* ptr = __osMalloc(&sDebugArena, size);
- DebugArena_CheckPointer(ptr, size, "debug_malloc", "確保"); // Secure
+ DebugArena_CheckPointer(ptr, size, "debug_malloc", "確保"); // "Secure"
return ptr;
}
void* DebugArena_MallocDebug(u32 size, const char* file, s32 line) {
void* ptr = __osMallocDebug(&sDebugArena, size, file, line);
- DebugArena_CheckPointer(ptr, size, "debug_malloc_DEBUG", "確保"); // Secure
+ DebugArena_CheckPointer(ptr, size, "debug_malloc_DEBUG", "確保"); // "Secure"
return ptr;
}
void* DebugArena_MallocR(u32 size) {
void* ptr = __osMallocR(&sDebugArena, size);
- DebugArena_CheckPointer(ptr, size, "debug_malloc_r", "確保"); // Secure
+ DebugArena_CheckPointer(ptr, size, "debug_malloc_r", "確保"); // "Secure"
return ptr;
}
void* DebugArena_MallocRDebug(u32 size, const char* file, s32 line) {
void* ptr = __osMallocRDebug(&sDebugArena, size, file, line);
- DebugArena_CheckPointer(ptr, size, "debug_malloc_r_DEBUG", "確保"); // Secure
+ DebugArena_CheckPointer(ptr, size, "debug_malloc_r_DEBUG", "確保"); // "Secure"
return ptr;
}
void* DebugArena_Realloc(void* ptr, u32 newSize) {
ptr = __osRealloc(&sDebugArena, ptr, newSize);
- DebugArena_CheckPointer(ptr, newSize, "debug_realloc", "再確保"); // Re-securing
+ DebugArena_CheckPointer(ptr, newSize, "debug_realloc", "再確保"); // "Re-securing"
return ptr;
}
void* DebugArena_ReallocDebug(void* ptr, u32 newSize, const char* file, s32 line) {
ptr = __osReallocDebug(&sDebugArena, ptr, newSize, file, line);
- DebugArena_CheckPointer(ptr, newSize, "debug_realloc_DEBUG", "再確保"); // Re-securing
+ DebugArena_CheckPointer(ptr, newSize, "debug_realloc_DEBUG", "再確保"); // "Re-securing"
return ptr;
}
diff --git a/src/code/graph.c b/src/code/graph.c
index ad960cf06..aa35b5287 100644
--- a/src/code/graph.c
+++ b/src/code/graph.c
@@ -324,14 +324,14 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
if (pool->headMagic != GFXPOOL_HEAD_MAGIC) {
//! @bug (?) : devs might've forgotten "problem = true;"
osSyncPrintf("%c", 7);
- // Dynamic area head is destroyed
+ // "Dynamic area head is destroyed"
osSyncPrintf(VT_COL(RED, WHITE) "ダイナミック領域先頭が破壊されています\n" VT_RST);
Fault_AddHungupAndCrash("../graph.c", 1070);
}
if (pool->tailMagic != GFXPOOL_TAIL_MAGIC) {
problem = true;
osSyncPrintf("%c", 7);
- // Dynamic region tail is destroyed
+ // "Dynamic region tail is destroyed"
osSyncPrintf(VT_COL(RED, WHITE) "ダイナミック領域末尾が破壊されています\n" VT_RST);
Fault_AddHungupAndCrash("../graph.c", 1076);
}
@@ -340,19 +340,19 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
if (THGA_IsCrash(&gfxCtx->polyOpa)) {
problem = true;
osSyncPrintf("%c", 7);
- // Zelda 0 is dead
+ // "Zelda 0 is dead"
osSyncPrintf(VT_COL(RED, WHITE) "ゼルダ0は死んでしまった(graph_alloc is empty)\n" VT_RST);
}
if (THGA_IsCrash(&gfxCtx->polyXlu)) {
problem = true;
osSyncPrintf("%c", 7);
- // Zelda 1 is dead
+ // "Zelda 1 is dead"
osSyncPrintf(VT_COL(RED, WHITE) "ゼルダ1は死んでしまった(graph_alloc is empty)\n" VT_RST);
}
if (THGA_IsCrash(&gfxCtx->overlay)) {
problem = true;
osSyncPrintf("%c", 7);
- // Zelda 4 is dead
+ // "Zelda 4 is dead"
osSyncPrintf(VT_COL(RED, WHITE) "ゼルダ4は死んでしまった(graph_alloc is empty)\n" VT_RST);
}
@@ -389,7 +389,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
}
if (D_8012DBC0 && PreNmiBuff_IsResetting(gAppNmiBufferPtr) && !gameState->unk_A0) {
- // To reset mode
+ // "To reset mode"
osSyncPrintf(VT_COL(YELLOW, BLACK) "PRE-NMIによりリセットモードに移行します\n" VT_RST);
SET_NEXT_GAMESTATE(gameState, PreNMI_Init, PreNMIContext);
gameState->running = false;
diff --git a/src/code/irqmgr.c b/src/code/irqmgr.c
index 782a24778..6f5fe105b 100644
--- a/src/code/irqmgr.c
+++ b/src/code/irqmgr.c
@@ -71,7 +71,7 @@ void IrqMgr_SendMesgForClient(IrqMgr* this, OSMesg msg) {
while (iter != NULL) {
if (iter->queue->validCount >= iter->queue->msgCount) {
- // irqmgr_SendMesgForClient: Message queue is overflowing mq=%08x cnt=%d
+ // "irqmgr_SendMesgForClient: Message queue is overflowing mq=%08x cnt=%d"
osSyncPrintf(
VT_COL(RED, WHITE) "irqmgr_SendMesgForClient:メッセージキューがあふれています mq=%08x cnt=%d\n" VT_RST,
iter->queue, iter->queue->validCount);
@@ -88,7 +88,7 @@ void IrqMgr_JamMesgForClient(IrqMgr* this, OSMesg msg) {
while (iter != NULL) {
if (iter->queue->validCount >= iter->queue->msgCount) {
- // irqmgr_JamMesgForClient: Message queue is overflowing mq=%08x cnt=%d
+ // "irqmgr_JamMesgForClient: Message queue is overflowing mq=%08x cnt=%d"
osSyncPrintf(
VT_COL(RED, WHITE) "irqmgr_JamMesgForClient:メッセージキューがあふれています mq=%08x cnt=%d\n" VT_RST,
iter->queue, iter->queue->validCount);
diff --git a/src/code/padmgr.c b/src/code/padmgr.c
index e7303e830..02477e205 100644
--- a/src/code/padmgr.c
+++ b/src/code/padmgr.c
@@ -75,7 +75,7 @@ void PadMgr_RumbleControl(PadMgr* padMgr) {
if (osSetRumble(&padMgr->pfs[i], temp) != 0) {
padMgr->pakType[i] = 0;
osSyncPrintf(VT_FGCOL(YELLOW));
- // "A communication error has occurred with the vibraton pack"
+ // "A communication error has occurred with the vibration pack"
osSyncPrintf("padmgr: %dコン: %s\n", i + 1, "振動パックで通信エラーが発生しました");
osSyncPrintf(VT_RST);
} else {
diff --git a/src/code/sched.c b/src/code/sched.c
index 95385f127..c478114f6 100644
--- a/src/code/sched.c
+++ b/src/code/sched.c
@@ -436,7 +436,7 @@ void Sched_ThreadEntry(void* arg) {
while (true) {
if (sLogScheduler) {
- // %08d: standby
+ // "%08d: standby"
osSyncPrintf("%08d:待機中\n", (u32)OS_CYCLES_TO_USEC(osGetTime()));
}
diff --git a/src/code/system_malloc.c b/src/code/system_malloc.c
index c0fb70bc2..d9085c12f 100644
--- a/src/code/system_malloc.c
+++ b/src/code/system_malloc.c
@@ -24,40 +24,40 @@ void SystemArena_CheckPointer(void* ptr, u32 size, const char* name, const char*
void* SystemArena_Malloc(u32 size) {
void* ptr = __osMalloc(&gSystemArena, size);
- SystemArena_CheckPointer(ptr, size, "malloc", "確保"); // Secure
+ SystemArena_CheckPointer(ptr, size, "malloc", "確保"); // "Secure"
return ptr;
}
void* SystemArena_MallocDebug(u32 size, const char* file, s32 line) {
void* ptr = __osMallocDebug(&gSystemArena, size, file, line);
- SystemArena_CheckPointer(ptr, size, "malloc_DEBUG", "確保"); // Secure
+ SystemArena_CheckPointer(ptr, size, "malloc_DEBUG", "確保"); // "Secure"
return ptr;
}
void* SystemArena_MallocR(u32 size) {
void* ptr = __osMallocR(&gSystemArena, size);
- SystemArena_CheckPointer(ptr, size, "malloc_r", "確保"); // Secure
+ SystemArena_CheckPointer(ptr, size, "malloc_r", "確保"); // "Secure"
return ptr;
}
void* SystemArena_MallocRDebug(u32 size, const char* file, s32 line) {
void* ptr = __osMallocRDebug(&gSystemArena, size, file, line);
- SystemArena_CheckPointer(ptr, size, "malloc_r_DEBUG", "確保"); // Secure
+ SystemArena_CheckPointer(ptr, size, "malloc_r_DEBUG", "確保"); // "Secure"
return ptr;
}
void* SystemArena_Realloc(void* ptr, u32 newSize) {
ptr = __osRealloc(&gSystemArena, ptr, newSize);
- SystemArena_CheckPointer(ptr, newSize, "realloc", "再確保"); // Re-securing
+ SystemArena_CheckPointer(ptr, newSize, "realloc", "再確保"); // "Re-securing"
return ptr;
}
void* SystemArena_ReallocDebug(void* ptr, u32 newSize, const char* file, s32 line) {
ptr = __osReallocDebug(&gSystemArena, ptr, newSize, file, line);
- SystemArena_CheckPointer(ptr, newSize, "realloc_DEBUG", "再確保"); // Re-securing
+ SystemArena_CheckPointer(ptr, newSize, "realloc_DEBUG", "再確保"); // "Re-securing"
return ptr;
}
diff --git a/src/code/z_camera.c b/src/code/z_camera.c
index ece32d45a..9f6483186 100644
--- a/src/code/z_camera.c
+++ b/src/code/z_camera.c
@@ -5529,7 +5529,7 @@ s32 Camera_Demo1(Camera* camera) {
anim->keyframe = 0;
anim->curFrame = 0.0f;
camera->animState++;
- // absolute / relative
+ // "absolute" : "relative"
osSyncPrintf(VT_SGR("1") "%06u:" VT_RST " camera: spline demo: start %s \n",
camera->globalCtx->state.frames, *relativeToPlayer == 0 ? "絶対" : "相対");
diff --git a/src/code/z_fbdemo_fade.c b/src/code/z_fbdemo_fade.c
index 79c922c73..518c31c33 100644
--- a/src/code/z_fbdemo_fade.c
+++ b/src/code/z_fbdemo_fade.c
@@ -56,7 +56,7 @@ void TransitionFade_Update(void* thisx, s32 updateRate) {
this->isDone = 1;
}
if (!gSaveContext.fadeDuration) {
- // Divide by 0! Zero is included in ZCommonGet fade_speed
+ // "Divide by 0! Zero is included in ZCommonGet fade_speed"
osSyncPrintf(VT_COL(RED, WHITE) "0除算! ZCommonGet fade_speed に0がはいってる" VT_RST);
}
diff --git a/src/code/z_jpeg.c b/src/code/z_jpeg.c
index 8dd991a15..6f57e12ac 100644
--- a/src/code/z_jpeg.c
+++ b/src/code/z_jpeg.c
@@ -179,9 +179,9 @@ void Jpeg_ParseMarkers(u8* ptr, JpegContext* ctx) {
// Start of Frame, stores important metadata of the image.
// Only used for extracting the sampling factors (ctx->mode).
osSyncPrintf("MARKER_SOF %d "
- "精度%02x " // accuracy
- "垂直%d " // vertical
- "水平%d " // horizontal
+ "精度%02x " // "accuracy"
+ "垂直%d " // "vertical"
+ "水平%d " // "horizontal"
"compo%02x "
"(1:Y)%d (H0=2,V0=1(422) or 2(420))%02x (量子化テーブル)%02x "
"(2:Cb)%d (H1=1,V1=1)%02x (量子化テーブル)%02x "