From b6f3a624af10da1de56afa525f8d97f4d8a2d13c Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Mon, 26 May 2025 11:11:56 +0200 Subject: [PATCH] T() fish, fr, g_switch --- src/overlays/actors/ovl_En_Fish/z_en_fish.c | 18 +++---- src/overlays/actors/ovl_En_Fr/z_en_fr.c | 14 +++--- .../actors/ovl_En_G_Switch/z_en_g_switch.c | 50 +++++++++---------- 3 files changed, 40 insertions(+), 42 deletions(-) diff --git a/src/overlays/actors/ovl_En_Fish/z_en_fish.c b/src/overlays/actors/ovl_En_Fish/z_en_fish.c index 9de3dbe4f8..e335ea391a 100644 --- a/src/overlays/actors/ovl_En_Fish/z_en_fish.c +++ b/src/overlays/actors/ovl_En_Fish/z_en_fish.c @@ -13,6 +13,7 @@ #include "printf.h" #include "sfx.h" #include "terminal.h" +#include "translation.h" #include "z_lib.h" #include "z64item.h" #include "z64play.h" @@ -396,8 +397,8 @@ void EnFish_Dropped_Fall(EnFish* this, PlayState* play) { } else if ((this->timer <= 0) && (this->actor.params == FISH_DROPPED) && (this->actor.floorHeight < BGCHECK_Y_MIN + 10.0f)) { PRINTF_COLOR_WARNING(); - // "BG missing? Running Actor_delete" - PRINTF("BG 抜け? Actor_delete します(%s %d)\n", "../z_en_sakana.c", 822); + PRINTF(T("BG 抜け? Actor_delete します(%s %d)\n", "BG missing? Running Actor_delete (%s %d)\n"), + "../z_en_sakana.c", 822); PRINTF_RST(); Actor_Kill(&this->actor); } @@ -639,9 +640,9 @@ void EnFish_UpdateCutscene(EnFish* this, PlayState* play) { if (play) {} if (cue == NULL) { - // "Warning : DEMO ended without dousa (action) 3 termination being called" - PRINTF("Warning : dousa 3 消滅 が呼ばれずにデモが終了した(%s %d)(arg_data 0x%04x)\n", "../z_en_sakana.c", 1169, - this->actor.params); + PRINTF(T("Warning : dousa 3 消滅 が呼ばれずにデモが終了した(%s %d)(arg_data 0x%04x)\n", + "Warning : Demo ended without calling action 3 termination (%s %d)(arg_data 0x%04x)\n"), + "../z_en_sakana.c", 1169, this->actor.params); EnFish_ClearCutsceneData(this); Actor_Kill(&this->actor); return; @@ -658,14 +659,13 @@ void EnFish_UpdateCutscene(EnFish* this, PlayState* play) { EnFish_Cutscene_WiggleFlyingThroughAir(this, play); break; case 3: - // "DEMO fish termination" - PRINTF("デモ魚消滅\n"); + PRINTF(T("デモ魚消滅\n", "Demo fish disappearance\n")); EnFish_ClearCutsceneData(this); Actor_Kill(&this->actor); return; default: - // "Improper DEMO action" - PRINTF("不正なデモ動作(%s %d)(arg_data 0x%04x)\n", "../z_en_sakana.c", 1200, this->actor.params); + PRINTF(T("不正なデモ動作(%s %d)(arg_data 0x%04x)\n", "Incorrect demo behavior (%s %d)(arg_data 0x%04x)\n"), + "../z_en_sakana.c", 1200, this->actor.params); break; } diff --git a/src/overlays/actors/ovl_En_Fr/z_en_fr.c b/src/overlays/actors/ovl_En_Fr/z_en_fr.c index 2d741172b2..00d29dcc6f 100644 --- a/src/overlays/actors/ovl_En_Fr/z_en_fr.c +++ b/src/overlays/actors/ovl_En_Fr/z_en_fr.c @@ -13,6 +13,7 @@ #include "sfx.h" #include "sys_matrix.h" #include "terminal.h" +#include "translation.h" #include "z_lib.h" #include "z64audio.h" #include "z64debug_display.h" @@ -269,8 +270,8 @@ void EnFr_Init(Actor* thisx, PlayState* play) { } else { if ((this->actor.params >= 6) || (this->actor.params < 0)) { PRINTF_COLOR_ERROR(); - // "The argument is wrong!!" - PRINTF("%s[%d] : 引数が間違っている!!(%d)\n", "../z_en_fr.c", 370, this->actor.params); + PRINTF(T("%s[%d] : 引数が間違っている!!(%d)\n", "%s[%d] : The argument is wrong!! (%d)\n"), + "../z_en_fr.c", 370, this->actor.params); PRINTF_RST(); ASSERT(0, "0", "../z_en_fr.c", 372); } @@ -279,8 +280,7 @@ void EnFr_Init(Actor* thisx, PlayState* play) { if (this->requiredObjectSlot < 0) { Actor_Kill(&this->actor); PRINTF_COLOR_ERROR(); - // "There is no bank!!" - PRINTF("%s[%d] : バンクが無いよ!!\n", "../z_en_fr.c", 380); + PRINTF(T("%s[%d] : バンクが無いよ!!\n", "%s[%d] : There is no bank!!\n"), "../z_en_fr.c", 380); PRINTF_RST(); ASSERT(0, "0", "../z_en_fr.c", 382); } @@ -1004,8 +1004,7 @@ void EnFr_Deactivate(EnFr* this, PlayState* play) { if (frog == NULL) { PRINTF_COLOR_ERROR(); - // "There are no frogs!?" - PRINTF("%s[%d]カエルがいない!?\n", "../z_en_fr.c", 1604); + PRINTF(T("%s[%d]カエルがいない!?\n", "%s[%d] There are no frogs!?\n"), "../z_en_fr.c", 1604); PRINTF_RST(); return; } else if (frog->isDeactivating != true) { @@ -1018,8 +1017,7 @@ void EnFr_Deactivate(EnFr* this, PlayState* play) { if (frog == NULL) { PRINTF_COLOR_ERROR(); - // "There are no frogs!?" - PRINTF("%s[%d]カエルがいない!?\n", "../z_en_fr.c", 1618); + PRINTF(T("%s[%d]カエルがいない!?\n", "%s[%d] There are no frogs!?\n"), "../z_en_fr.c", 1618); PRINTF_RST(); return; } diff --git a/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c b/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c index 8bca3e607a..5a6ad4a323 100644 --- a/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c +++ b/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c @@ -19,6 +19,7 @@ #include "sfx.h" #include "sys_matrix.h" #include "terminal.h" +#include "translation.h" #include "z_en_item00.h" #include "z_lib.h" #include "z64audio.h" @@ -104,22 +105,21 @@ void EnGSwitch_Init(Actor* thisx, PlayState* play) { this->type = PARAMS_GET_U(this->actor.params, 12, 4); this->switchFlag = PARAMS_GET_U(this->actor.params, 0, 6); this->numEffects = EN_GSWITCH_EFFECT_COUNT; - // "index" - PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ インデックス ☆☆☆☆☆ %x\n" VT_RST, this->type); - // "save" - PRINTF(VT_FGCOL(YELLOW) "☆☆☆☆☆ セーブ\t ☆☆☆☆☆ %x\n" VT_RST, this->switchFlag); + PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ インデックス ☆☆☆☆☆ %x\n", "☆☆☆☆☆ Index ☆☆☆☆☆ %x\n") VT_RST, this->type); + PRINTF(VT_FGCOL(YELLOW) T("☆☆☆☆☆ セーブ\t ☆☆☆☆☆ %x\n", "☆☆☆☆☆ Save\t ☆☆☆☆☆ %x\n") VT_RST, this->switchFlag); switch (this->type) { case ENGSWITCH_SILVER_TRACKER: PRINTF("\n\n"); - // "parent switch spawn" - PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 親スイッチ発生 ☆☆☆☆☆ %x\n" VT_RST, this->actor.params); + PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 親スイッチ発生 ☆☆☆☆☆ %x\n", "☆☆☆☆☆ Parent switch spawn ☆☆☆☆☆ %x\n") VT_RST, + this->actor.params); sCollectedCount = 0; // Ideally the following two lines would be // this->silverCount = PARAMS_GET_U(this->actor.params, 6, 6); this->silverCount = PARAMS_GET_NOMASK(this->actor.params, 6); this->silverCount &= 0x3F; - // "maximum number of checks" - PRINTF(VT_FGCOL(MAGENTA) "☆☆☆☆☆ 最大チェック数 ☆☆☆☆☆ %d\n" VT_RST, this->silverCount); + PRINTF(VT_FGCOL(MAGENTA) T("☆☆☆☆☆ 最大チェック数 ☆☆☆☆☆ %d\n", "☆☆☆☆☆ Maximum number of checks ☆☆☆☆☆ %d\n") + VT_RST, + this->silverCount); PRINTF("\n\n"); if (Flags_GetSwitch(play, this->switchFlag)) { // This is a reference to Hokuto no Ken @@ -131,8 +131,8 @@ void EnGSwitch_Init(Actor* thisx, PlayState* play) { break; case ENGSWITCH_SILVER_RUPEE: PRINTF("\n\n"); - // "child switch spawn" - PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 子スイッチ発生 ☆☆☆☆☆ %x\n" VT_RST, this->actor.params); + PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 子スイッチ発生 ☆☆☆☆☆ %x\n", "☆☆☆☆☆ Child switch spawn ☆☆☆☆☆ %x\n") VT_RST, + this->actor.params); this->colorIdx = 5; this->numEffects = 20; Collider_InitCylinder(play, &this->collider); @@ -149,8 +149,8 @@ void EnGSwitch_Init(Actor* thisx, PlayState* play) { break; case ENGSWITCH_ARCHERY_POT: PRINTF("\n\n"); - // "Horseback archery destructible pot" - PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ やぶさめぶち抜き壷 ☆☆☆☆☆ \n" VT_RST); + PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ やぶさめぶち抜き壷 ☆☆☆☆☆ \n", + "☆☆☆☆☆ Horseback archery destructible pot ☆☆☆☆☆ \n") VT_RST); this->actor.gravity = -3.0f; this->colorIdx = Rand_ZeroFloat(2.99f); Collider_InitCylinder(play, &this->collider); @@ -163,10 +163,9 @@ void EnGSwitch_Init(Actor* thisx, PlayState* play) { this->requiredObjectSlot = Object_GetSlot(&play->objectCtx, this->objectId); if (this->requiredObjectSlot < 0) { Actor_Kill(&this->actor); - // "what?" - PRINTF(VT_FGCOL(MAGENTA) " なにみの? %d\n" VT_RST "\n", this->requiredObjectSlot); - // "bank is funny" - PRINTF(VT_FGCOL(CYAN) " バンクおかしいしぞ!%d\n" VT_RST "\n", this->actor.params); + PRINTF(VT_FGCOL(MAGENTA) T(" なにみの? %d\n", " What? %d\n") VT_RST "\n", this->requiredObjectSlot); + PRINTF(VT_FGCOL(CYAN) T(" バンクおかしいしぞ!%d\n", " Bank is weird! %d\n") VT_RST "\n", + this->actor.params); } this->collider.dim.radius = 24; this->collider.dim.height = 74; @@ -233,18 +232,18 @@ void EnGSwitch_SilverRupeeTracker(EnGSwitch* this, PlayState* play) { if (this->noteIndex < sCollectedCount) { if (sCollectedCount < 5) { - // "sound?" - PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 音? ☆☆☆☆☆ %d\n" VT_RST, this->noteIndex); + PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 音? ☆☆☆☆☆ %d\n", "sound?") VT_RST, this->noteIndex); Audio_PlaySfxTransposed(&gSfxDefaultPos, NA_SE_EV_FIVE_COUNT_LUPY, majorScale[this->noteIndex]); this->noteIndex = sCollectedCount; } } if (sCollectedCount >= this->silverCount) { - // "It is now the end of the century." - // This another reference to Hokuto no Ken. - PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 時はまさに世紀末〜 ☆☆☆☆☆ %d\n" VT_RST, this->switchFlag); - // "Last!" - PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ らすとぉ! ☆☆☆☆☆ \n" VT_RST); + // This is another reference to Hokuto no Ken. + PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 時はまさに世紀末〜 ☆☆☆☆☆ %d\n", + "☆☆☆☆☆ It is now the end of the century. ☆☆☆☆☆ %d\n") VT_RST, + this->switchFlag); + PRINTF(VT_FGCOL(GREEN) + T("☆☆☆☆☆ らすとぉ! ☆☆☆☆☆ \n", "☆☆☆☆☆ Last! ☆☆☆☆☆ \n") VT_RST); if ((play->sceneId == SCENE_GERUDO_TRAINING_GROUND) && (this->actor.room == 2)) { Flags_SetTempClear(play, this->actor.room); } else { @@ -367,8 +366,9 @@ void EnGSwitch_GalleryRupee(EnGSwitch* this, PlayState* play) { gallery->targetState[this->index] = ENSYATEKIHIT_HIT; Sfx_PlaySfxCentered(NA_SE_EV_HIT_SOUND); Sfx_PlaySfxCentered(NA_SE_SY_GET_RUPY); - // "Yeah !" - PRINTF(VT_FGCOL(YELLOW) "☆☆☆☆☆ いぇぇーす!HIT!! ☆☆☆☆☆ %d\n" VT_RST, gallery->hitCount); + PRINTF(VT_FGCOL(YELLOW) T("☆☆☆☆☆ いぇぇーす!HIT!! ☆☆☆☆☆ %d\n", "☆☆☆☆☆ Yeah! HIT!! ☆☆☆☆☆ %d\n") + VT_RST, + gallery->hitCount); EnGSwitch_Break(this, play); this->killTimer = 50; this->broken = true;