summaryrefslogtreecommitdiff
path: root/src/code
diff options
context:
space:
mode:
authorDragorn421 <Dragorn421@users.noreply.github.com>2024-08-28 20:01:41 +0200
committerGitHub <noreply@github.com>2024-08-28 14:01:41 -0400
commit16ec9b1e13abca7ef2a978bd1b99935f2dd3b2ab (patch)
treeb81baa5deb652e6a45b81dff3288a37d180c90ea /src/code
parent7592bf1e42a888c0a1974b019b18a13c520727ee (diff)
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
Diffstat (limited to 'src/code')
-rw-r--r--src/code/code_800430A0.c9
-rw-r--r--src/code/debug_malloc.c4
-rw-r--r--src/code/sched.c9
-rw-r--r--src/code/z_eff_shield_particle.c3
-rw-r--r--src/code/z_jpeg.c31
-rw-r--r--src/code/z_kanfont.c2
-rw-r--r--src/code/z_map_mark.c4
-rw-r--r--src/code/z_skin_matrix.c6
8 files changed, 35 insertions, 33 deletions
diff --git a/src/code/code_800430A0.c b/src/code/code_800430A0.c
index a13ecce7e..64c1eee81 100644
--- a/src/code/code_800430A0.c
+++ b/src/code/code_800430A0.c
@@ -42,10 +42,11 @@ void DynaPolyActor_UpdateCarriedActorPos(CollisionContext* colCtx, s32 bgId, Act
PRINTF(VT_FGCOL(RED));
//! @bug file and line are not passed to PRINTF
- // "Position is not valid"
- PRINTF(
- "BGCheckCollection_typicalActorPos():位置が妥当ではありません。\npos (%f,%f,%f) file:%s line:%d\n",
- pos.x, pos.y, pos.z);
+ PRINTF(T("BGCheckCollection_typicalActorPos():位置が妥当ではありません。\n"
+ "pos (%f,%f,%f) file:%s line:%d\n",
+ "BGCheckCollection_typicalActorPos(): Position is not valid. \n"
+ "pos (%f,%f,%f) file:%s line:%d\n"),
+ pos.x, pos.y, pos.z);
PRINTF(VT_RST);
}
#endif
diff --git a/src/code/debug_malloc.c b/src/code/debug_malloc.c
index ccccbb154..3e31f7845 100644
--- a/src/code/debug_malloc.c
+++ b/src/code/debug_malloc.c
@@ -97,8 +97,8 @@ void* DebugArena_Calloc(u32 num, u32 size) {
#if OOT_DEBUG
void DebugArena_Display(void) {
- // "Zelda heap display" ("Zelda" should probably have been changed to "Debug")
- PRINTF("ゼルダヒープ表示\n");
+ // Likely copypasted from ZeldaArena_Display, should say "Debug"
+ PRINTF(T("ゼルダヒープ表示\n", "Zelda heap display\n"));
__osDisplayArena(&sDebugArena);
}
#endif
diff --git a/src/code/sched.c b/src/code/sched.c
index 1deaa74b2..77860aa51 100644
--- a/src/code/sched.c
+++ b/src/code/sched.c
@@ -176,8 +176,7 @@ void Sched_QueueTask(Scheduler* sc, OSScTask* task) {
463);
if (type == M_AUDTASK) {
- // "You have entered an audio task"
- SCHED_DEBUG_PRINTF("オーディオタスクをエントリしました\n");
+ SCHED_DEBUG_PRINTF(T("オーディオタスクをエントリしました\n", "You have entered an audio task\n"));
// Add to audio queue
if (sc->audioListTail != NULL) {
@@ -191,8 +190,7 @@ void Sched_QueueTask(Scheduler* sc, OSScTask* task) {
sc->doAudio = true;
} else {
- // "Entered graph task"
- SCHED_DEBUG_PRINTF("グラフタスクをエントリしました\n");
+ SCHED_DEBUG_PRINTF(T("グラフタスクをエントリしました\n", "Entered graph task\n"));
// Add to graphics queue
if (sc->gfxListTail != NULL) {
@@ -606,8 +604,7 @@ void Sched_ThreadEntry(void* arg) {
Scheduler* sc = (Scheduler*)arg;
while (true) {
- // "%08d: standby"
- SCHED_DEBUG_PRINTF("%08d:待機中\n", (u32)OS_CYCLES_TO_USEC(osGetTime()));
+ SCHED_DEBUG_PRINTF(T("%08d:待機中\n", "%08d: standby\n"), (u32)OS_CYCLES_TO_USEC(osGetTime()));
// Await interrupt messages, either from the OS, IrqMgr, or another thread
osRecvMesg(&sc->interruptQueue, &msg, OS_MESG_BLOCK);
diff --git a/src/code/z_eff_shield_particle.c b/src/code/z_eff_shield_particle.c
index b1e46cadd..c66934a4f 100644
--- a/src/code/z_eff_shield_particle.c
+++ b/src/code/z_eff_shield_particle.c
@@ -19,7 +19,8 @@ void EffectShieldParticle_Init(void* thisx, void* initParamsx) {
this->numElements = initParams->numElements;
if (this->numElements > ARRAY_COUNT(this->elements)) {
PRINTF(VT_FGCOL(RED));
- PRINTF("EffectShieldParticle_ct():パーティクル数がオーバしてます。\n");
+ PRINTF(T("EffectShieldParticle_ct():パーティクル数がオーバしてます。\n",
+ "EffectShieldParticle_ct(): Number of particles exceeded.\n"));
PRINTF(VT_RST);
return;
}
diff --git a/src/code/z_jpeg.c b/src/code/z_jpeg.c
index 38aec2478..deee31dfd 100644
--- a/src/code/z_jpeg.c
+++ b/src/code/z_jpeg.c
@@ -178,22 +178,23 @@ void Jpeg_ParseMarkers(u8* ptr, JpegContext* ctx) {
case MARKER_SOF: {
// Start of Frame, stores important metadata of the image.
// Only used for extracting the sampling factors (ctx->mode).
- PRINTF("MARKER_SOF %d "
- "精度%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 "
- "(3:Cr)%d (H2=1,V2=1)%02x (量子化テーブル)%02x\n",
+ PRINTF(T("MARKER_SOF %d "
+ "精度%02x 垂直%d 水平%d compo%02x "
+ "(1:Y)%d (H0=2,V0=1(422) or 2(420))%02x (量子化テーブル)%02x "
+ "(2:Cb)%d (H1=1,V1=1)%02x (量子化テーブル)%02x "
+ "(3:Cr)%d (H2=1,V2=1)%02x (量子化テーブル)%02x\n",
+ "MARKER_SOF %d "
+ "accuracy%02x vertical%d horizontal%d compo%02x "
+ "(1:Y)%d (H0=2,V0=1(422) or 2(420))%02x (quantization tables)%02x "
+ "(2:Cb)%d (H1=1,V1=1)%02x (quantization tables)%02x "
+ "(3:Cr)%d (H2=1,V2=1)%02x (quantization tables)%02x\n"),
Jpeg_GetUnalignedU16(ptr),
- ptr[2], // precision
- Jpeg_GetUnalignedU16(ptr + 3), // height
- Jpeg_GetUnalignedU16(ptr + 5), // width
- ptr[7], // component count (assumed to be 3)
- ptr[8], ptr[9], ptr[10], // Y component
- ptr[11], ptr[12], ptr[13], // Cb component
- ptr[14], ptr[15], ptr[16] // Cr component
+ // precision, height, width, component count (assumed to be 3)
+ ptr[2], Jpeg_GetUnalignedU16(ptr + 3), Jpeg_GetUnalignedU16(ptr + 5), ptr[7],
+ //
+ ptr[8], ptr[9], ptr[10], // Y component
+ ptr[11], ptr[12], ptr[13], // Cb component
+ ptr[14], ptr[15], ptr[16] // Cr component
);
if (ptr[9] == 0x21) {
diff --git a/src/code/z_kanfont.c b/src/code/z_kanfont.c
index 30fa15d41..81c83ce34 100644
--- a/src/code/z_kanfont.c
+++ b/src/code/z_kanfont.c
@@ -77,7 +77,7 @@ void Font_LoadOrderedFont(Font* font) {
fontBufIndex = 0;
for (codePointIndex = 0; font->msgBuf[codePointIndex] != MESSAGE_END; codePointIndex++) {
if (codePointIndex > (len * 1)) {
- PRINTF("ERROR!! エラー!!! error───!!!!\n");
+ PRINTF(T("ERROR!! エラー!!! error───!!!!\n", "ERROR!! Error!!! error───!!!!\n"));
return;
}
diff --git a/src/code/z_map_mark.c b/src/code/z_map_mark.c
index eaaf4c1e7..4fc7d7cfa 100644
--- a/src/code/z_map_mark.c
+++ b/src/code/z_map_mark.c
@@ -72,8 +72,8 @@ void MapMark_DrawForDungeon(PlayState* play) {
interfaceCtx = &play->interfaceCtx;
if ((gMapData != NULL) && (play->interfaceCtx.mapRoomNum >= gMapData->dgnMinimapCount[dungeon])) {
- // "Room number exceeded, yikes %d/%d MapMarkDraw processing interrupted"
- PRINTF(VT_COL(RED, WHITE) "部屋番号がオーバーしてるで,ヤバイで %d/%d \nMapMarkDraw の処理を中断します\n",
+ PRINTF(VT_COL(RED, WHITE) T("部屋番号がオーバーしてるで,ヤバイで %d/%d \nMapMarkDraw の処理を中断します\n",
+ "Room number exceeded, yikes %d/%d \nMapMarkDraw processing interrupted\n"),
VT_RST, play->interfaceCtx.mapRoomNum, gMapData->dgnMinimapCount[dungeon]);
return;
}
diff --git a/src/code/z_skin_matrix.c b/src/code/z_skin_matrix.c
index 98f8fc4d2..e5d0dfe99 100644
--- a/src/code/z_skin_matrix.c
+++ b/src/code/z_skin_matrix.c
@@ -253,7 +253,8 @@ s32 SkinMatrix_Invert(MtxF* src, MtxF* dest) {
// Therefore src is a singular matrix (0 determinant).
PRINTF(VT_COL(YELLOW, BLACK));
- PRINTF("Skin_Matrix_InverseMatrix():逆行列つくれません\n");
+ PRINTF(T("Skin_Matrix_InverseMatrix():逆行列つくれません\n",
+ "Skin_Matrix_InverseMatrix(): Cannot create inverse matrix\n"));
PRINTF(VT_RST);
return 2;
}
@@ -589,7 +590,8 @@ Mtx* SkinMatrix_MtxFToNewMtx(GraphicsContext* gfxCtx, MtxF* src) {
Mtx* mtx = GRAPH_ALLOC(gfxCtx, sizeof(Mtx));
if (mtx == NULL) {
- PRINTF("Skin_Matrix_to_Mtx_new() 確保失敗:NULLを返して終了\n");
+ PRINTF(T("Skin_Matrix_to_Mtx_new() 確保失敗:NULLを返して終了\n",
+ "Skin_Matrix_to_Mtx_new() allocation failed: Return NULL and exit\n"));
return NULL;
}
SkinMatrix_MtxFToMtx(src, mtx);