From e991255a45b628d75a7b378726415414215aa814 Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Tue, 27 May 2025 19:04:48 +0200 Subject: [PATCH] T() macro in overlays 7 (#2545) * T() fish, fr, g_switch * T() ge1, ge2, gm, goroiwa * T() heishi1-3 * review --- 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 | 46 +++++++-------- src/overlays/actors/ovl_En_Ge1/z_en_ge1.c | 9 +-- src/overlays/actors/ovl_En_Ge2/z_en_ge2.c | 7 +-- src/overlays/actors/ovl_En_Gm/z_en_gm.c | 8 +-- .../actors/ovl_En_Goroiwa/z_en_goroiwa.c | 21 +++---- .../actors/ovl_En_Heishi1/z_en_heishi1.c | 50 +++++++++------- .../actors/ovl_En_Heishi2/z_en_heishi2.c | 58 ++++++++++--------- .../actors/ovl_En_Heishi3/z_en_heishi3.c | 9 +-- 10 files changed, 124 insertions(+), 116 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..f5964ebaea 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 action 3 being called (%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 b87b8af66e..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 @@ -105,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 @@ -132,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); @@ -150,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); @@ -165,8 +164,8 @@ void EnGSwitch_Init(Actor* thisx, PlayState* play) { if (this->requiredObjectSlot < 0) { Actor_Kill(&this->actor); PRINTF(VT_FGCOL(MAGENTA) T(" なにみの? %d\n", " What? %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(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; diff --git a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c index c47c8271e5..8b6d821346 100644 --- a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c +++ b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c @@ -14,6 +14,7 @@ #include "sfx.h" #include "sys_matrix.h" #include "terminal.h" +#include "translation.h" #include "z_lib.h" #include "z64face_reaction.h" #include "z64horse.h" @@ -147,8 +148,7 @@ void EnGe1_Init(Actor* thisx, PlayState* play) { case GE1_TYPE_VALLEY_FLOOR: if (LINK_IS_ADULT) { - // "Valley floor Gerudo withdrawal" - PRINTF(VT_FGCOL(CYAN) "谷底 ゲルド 撤退 \n" VT_RST); + PRINTF(VT_FGCOL(CYAN) T("谷底 ゲルド 撤退 \n", "Valley floor Gerudo withdrawal \n") VT_RST); Actor_Kill(&this->actor); return; } @@ -163,8 +163,9 @@ void EnGe1_Init(Actor* thisx, PlayState* play) { } this->actor.attentionRangeType = ATTENTION_RANGE_3; this->hairstyle = GE1_HAIR_BOB; - // "Horseback archery Gerudo EVENT_INF(0) =" - PRINTF(VT_FGCOL(CYAN) "やぶさめ ゲルド EVENT_INF(0) = %x\n" VT_RST, gSaveContext.eventInf[0]); + PRINTF(VT_FGCOL(CYAN) + T("やぶさめ ゲルド EVENT_INF(0) = %x\n", "Horseback archery Gerudo EVENT_INF(0) = %x\n") VT_RST, + gSaveContext.eventInf[0]); if (GET_EVENTINF(EVENTINF_HORSES_08)) { this->actionFunc = EnGe1_TalkAfterGame_Archery; diff --git a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c index cae8d14bf1..704ca69543 100644 --- a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c +++ b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c @@ -13,6 +13,7 @@ #include "sfx.h" #include "sys_matrix.h" #include "terminal.h" +#include "translation.h" #include "z_lib.h" #include "z64effect.h" #include "z64horse.h" @@ -585,14 +586,12 @@ void EnGe2_Update(Actor* thisx, PlayState* play) { this->actionFunc(this, play); if (Ge2_DetectPlayerInUpdate(play, this, &this->actor.focus.pos, this->actor.shape.rot.y, this->yDetectRange)) { - // "Discovered!" - PRINTF(VT_FGCOL(GREEN) "発見!!!!!!!!!!!!\n" VT_RST); + PRINTF(VT_FGCOL(GREEN) T("発見!!!!!!!!!!!!\n", "Discovered!!!!!!!!!!!!\n") VT_RST); EnGe2_SetupCapturePlayer(this, play); } if ((PARAMS_GET_S(this->actor.params, 0, 8) == GE2_TYPE_STATIONARY) && (this->actor.xzDistToPlayer < 100.0f)) { - // "Discovered!" - PRINTF(VT_FGCOL(GREEN) "発見!!!!!!!!!!!!\n" VT_RST); + PRINTF(VT_FGCOL(GREEN) T("発見!!!!!!!!!!!!\n", "Discovered!!!!!!!!!!!!\n") VT_RST); EnGe2_SetupCapturePlayer(this, play); } } diff --git a/src/overlays/actors/ovl_En_Gm/z_en_gm.c b/src/overlays/actors/ovl_En_Gm/z_en_gm.c index 4b6a979b58..0c904a8808 100644 --- a/src/overlays/actors/ovl_En_Gm/z_en_gm.c +++ b/src/overlays/actors/ovl_En_Gm/z_en_gm.c @@ -15,6 +15,7 @@ #include "segmented_address.h" #include "sys_matrix.h" #include "terminal.h" +#include "translation.h" #include "z64play.h" #include "z64player.h" #include "z64save.h" @@ -80,15 +81,14 @@ void EnGm_Init(Actor* thisx, PlayState* play) { Actor_ProcessInitChain(&this->actor, sInitChain); - // "Medi Goron" - PRINTF(VT_FGCOL(GREEN) "%s[%d] : 中ゴロン[%d]" VT_RST "\n", "../z_en_gm.c", 133, this->actor.params); + PRINTF(VT_FGCOL(GREEN) T("%s[%d] : 中ゴロン[%d]", "%s[%d] : Medi Goron [%d]") VT_RST "\n", "../z_en_gm.c", 133, + this->actor.params); this->gmObjectSlot = Object_GetSlot(&play->objectCtx, OBJECT_GM); if (this->gmObjectSlot < 0) { PRINTF_COLOR_ERROR(); - // "There is no model bank! !! (Medi Goron)" - PRINTF("モデル バンクが無いよ!!(中ゴロン)\n"); + PRINTF(T("モデル バンクが無いよ!!(中ゴロン)\n", "There is no model bank!! (Medi Goron)\n")); PRINTF_RST(); ASSERT(0, "0", "../z_en_gm.c", 145); } diff --git a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c index 10ba10d18d..dfd8130d8d 100644 --- a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c +++ b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c @@ -17,6 +17,7 @@ #include "sys_math3d.h" #include "sys_matrix.h" #include "terminal.h" +#include "translation.h" #include "z_lib.h" #include "z64effect.h" #include "z64play.h" @@ -268,8 +269,7 @@ s32 EnGoroiwa_GetAscendDirection(EnGoroiwa* this, PlayState* play) { if (nextPointPos->x == currentPointPos->x && nextPointPos->z == currentPointPos->z) { #if DEBUG_FEATURES if (nextPointPos->y == currentPointPos->y) { - // "Error: Invalid path data (points overlap)" - PRINTF("Error : レールデータ不正(点が重なっている)"); + PRINTF(T("Error : レールデータ不正(点が重なっている)", "Error : Rail data is incorrect (dots overlap)")); PRINTF("(%s %d)(arg_data 0x%04x)\n", "../z_en_gr.c", 559, this->actor.params); } #endif @@ -564,14 +564,15 @@ void EnGoroiwa_Init(Actor* thisx, PlayState* play) { EnGoroiwa_InitCollider(this, play); pathIdx = PARAMS_GET_U(this->actor.params, 0, 8); if (pathIdx == 0xFF) { - // "Error: Invalid arg_data" - PRINTF("Error : arg_data が不正(%s %d)(arg_data 0x%04x)\n", "../z_en_gr.c", 1033, this->actor.params); + PRINTF(T("Error : arg_data が不正(%s %d)(arg_data 0x%04x)\n", + "Error : Invalid arg_data (%s %d)(arg_data 0x%04x)\n"), + "../z_en_gr.c", 1033, this->actor.params); Actor_Kill(&this->actor); return; } if (play->pathList[pathIdx].count < 2) { - // "Error: Invalid Path Data" - PRINTF("Error : レールデータ が不正(%s %d)\n", "../z_en_gr.c", 1043); + PRINTF(T("Error : レールデータ が不正(%s %d)\n", "Error : Rail data is invalid (%s %d)\n"), "../z_en_gr.c", + 1043); Actor_Kill(&this->actor); return; } @@ -585,9 +586,9 @@ void EnGoroiwa_Init(Actor* thisx, PlayState* play) { EnGoroiwa_InitRotation(this); EnGoroiwa_FaceNextWaypoint(this, play); EnGoroiwa_SetupRoll(this); - // "(Goroiwa)" - PRINTF("(ごろ岩)(arg 0x%04x)(rail %d)(end %d)(bgc %d)(hit %d)\n", this->actor.params, - PARAMS_GET_U(this->actor.params, 0, 8), PARAMS_GET_U(this->actor.params, 8, 2), + PRINTF(T("(ごろ岩)(arg 0x%04x)(rail %d)(end %d)(bgc %d)(hit %d)\n", + "(Goroiwa)(arg 0x%04x)(rail %d)(end %d)(bgc %d)(hit %d)\n"), + this->actor.params, PARAMS_GET_U(this->actor.params, 0, 8), PARAMS_GET_U(this->actor.params, 8, 2), PARAMS_GET_U(this->actor.params, 10, 1), this->actor.home.rot.z & 1); } @@ -625,7 +626,7 @@ void EnGoroiwa_Roll(EnGoroiwa* this, PlayState* play) { } Actor_SetPlayerKnockbackLarge(play, &this->actor, 2.0f, this->actor.yawTowardsPlayer, 0.0f, 0); PRINTF_COLOR_CYAN(); - PRINTF("Player ぶっ飛ばし\n"); // "Player knocked down" + PRINTF(T("Player ぶっ飛ばし\n", "Player knocked down\n")); PRINTF_RST(); onHitSetupFuncs[PARAMS_GET_U(this->actor.params, 10, 1)](this); Player_PlaySfx(GET_PLAYER(play), NA_SE_PL_BODY_HIT); diff --git a/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c b/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c index 0736896895..4236fe05bd 100644 --- a/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c +++ b/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c @@ -17,6 +17,7 @@ #include "sfx.h" #include "sys_matrix.h" #include "terminal.h" +#include "translation.h" #include "z_lib.h" #include "z64debug_display.h" #include "z64effect.h" @@ -97,27 +98,32 @@ void EnHeishi1_Init(Actor* thisx, PlayState* play2) { this->animParams[i] = sAnimParamsInit[this->type][i]; } - // "type" - PRINTF(VT_FGCOL(GREEN) " 種類☆☆☆☆☆☆☆☆☆☆☆☆☆ %d\n" VT_RST, this->type); - // "path data" + PRINTF(VT_FGCOL(GREEN) T(" 種類☆☆☆☆☆☆☆☆☆☆☆☆☆ %d\n", " type ☆☆☆☆☆☆☆☆☆☆☆☆☆ %d\n") VT_RST, + this->type); PRINTF(VT_FGCOL(YELLOW) " れえるでぇたぁ☆☆☆☆☆☆☆☆ %d\n" VT_RST, this->path); PRINTF(VT_FGCOL(MAGENTA) " anime_frame_speed ☆☆☆☆☆☆ %f\n" VT_RST, this->animSpeed); - // "interpolation frame" - PRINTF(VT_FGCOL(MAGENTA) " 補間フレーム☆☆☆☆☆☆☆☆☆ %f\n" VT_RST, this->animMorphFrames); - // "targeted movement speed value between points" - PRINTF(VT_FGCOL(MAGENTA) " point間の移動スピード目標値 ☆ %f\n" VT_RST, this->moveSpeedTarget); - // "maximum movement speed value between points" - PRINTF(VT_FGCOL(MAGENTA) " point間の移動スピード最大 ☆☆ %f\n" VT_RST, this->moveSpeedMax); - // "(body) targeted turning angle speed value" - PRINTF(VT_FGCOL(MAGENTA) " (体)反転アングルスピード目標値 %f\n" VT_RST, this->bodyTurnSpeedTarget); - // "(body) maximum turning angle speed" - PRINTF(VT_FGCOL(MAGENTA) " (体)反転アングルスピード最大☆ %f\n" VT_RST, this->bodyTurnSpeedMax); - // "(head) targeted turning angle speed value" - PRINTF(VT_FGCOL(MAGENTA) " (頭)反転アングルスピード加算値 %f\n" VT_RST, this->headTurnSpeedScale); - // "(head) maximum turning angle speed" - PRINTF(VT_FGCOL(MAGENTA) " (頭)反転アングルスピード最大☆ %f\n" VT_RST, this->headTurnSpeedMax); - PRINTF(VT_FGCOL(GREEN) " 今時間 %d\n" VT_RST, ((void)0, gSaveContext.save.dayTime)); // "current time" - PRINTF(VT_FGCOL(YELLOW) " チェック時間 %d\n" VT_RST, CLOCK_TIME(17, 30) - 1); // "check time" + PRINTF(VT_FGCOL(MAGENTA) T(" 補間フレーム☆☆☆☆☆☆☆☆☆ %f\n", " interpolation frame ☆☆☆☆☆☆☆☆☆ %f\n") VT_RST, + this->animMorphFrames); + PRINTF(VT_FGCOL(MAGENTA) + T(" point間の移動スピード目標値 ☆ %f\n", " target speed of movement between points ☆ %f\n") VT_RST, + this->moveSpeedTarget); + PRINTF(VT_FGCOL(MAGENTA) + T(" point間の移動スピード最大 ☆☆ %f\n", " maximum speed of movement between points ☆☆ %f\n") VT_RST, + this->moveSpeedMax); + PRINTF(VT_FGCOL(MAGENTA) + T(" (体)反転アングルスピード目標値 %f\n", " (body) reversing angle speed target value %f\n") VT_RST, + this->bodyTurnSpeedTarget); + PRINTF(VT_FGCOL(MAGENTA) + T(" (体)反転アングルスピード最大☆ %f\n", " (body) maximum turning angle speed ☆ %f\n") VT_RST, + this->bodyTurnSpeedMax); + PRINTF(VT_FGCOL(MAGENTA) + T(" (頭)反転アングルスピード加算値 %f\n", " (head) reverse angle speed additional value %f\n") VT_RST, + this->headTurnSpeedScale); + PRINTF(VT_FGCOL(MAGENTA) + T(" (頭)反転アングルスピード最大☆ %f\n", " (head) maximum turning angle speed ☆ %f\n") VT_RST, + this->headTurnSpeedMax); + PRINTF(VT_FGCOL(GREEN) T(" 今時間 %d\n", " Current time %d\n") VT_RST, ((void)0, gSaveContext.save.dayTime)); + PRINTF(VT_FGCOL(YELLOW) T(" チェック時間 %d\n", " Check time %d\n") VT_RST, CLOCK_TIME(17, 30) - 1); PRINTF("\n\n"); if (this->path == 3) { @@ -389,7 +395,7 @@ void EnHeishi1_WaitNight(EnHeishi1* this, PlayState* play) { if (this->actor.xzDistToPlayer < 100.0f) { Message_StartTextbox(play, 0x702D, &this->actor); Sfx_PlaySfxCentered(NA_SE_SY_FOUND); - PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); // "Discovered!" + PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 発見! ☆☆☆☆☆ \n", "☆☆☆☆☆ Discovered! ☆☆☆☆☆ \n") VT_RST); Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); this->actionFunc = EnHeishi1_SetupKick; } @@ -472,8 +478,8 @@ void EnHeishi1_Update(Actor* thisx, PlayState* play) { // this 60 unit height check is so the player doesn't get caught when on the upper path if (fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < 60.0f) { Sfx_PlaySfxCentered(NA_SE_SY_FOUND); - // "Discovered!" - PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); + PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 発見! ☆☆☆☆☆ \n", "☆☆☆☆☆ Discovered! ☆☆☆☆☆ \n") + VT_RST); Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); sPlayerIsCaught = true; this->actionFunc = EnHeishi1_SetupMoveToLink; diff --git a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c index c071d40c53..f9d5999c88 100644 --- a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c +++ b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c @@ -16,6 +16,7 @@ #include "sfx.h" #include "sys_matrix.h" #include "terminal.h" +#include "translation.h" #include "z_lib.h" #include "z64face_reaction.h" #include "z64play.h" @@ -153,8 +154,8 @@ void EnHeishi2_Init(Actor* thisx, PlayState* play) { break; case 6: PRINTF("\n\n"); - // "Peep hole soldier!" - PRINTF(VT_FGCOL(GREEN) " ☆☆☆☆☆ 覗き穴奥兵士ふぃ〜 ☆☆☆☆☆ \n" VT_RST); + PRINTF(VT_FGCOL(GREEN) T(" ☆☆☆☆☆ 覗き穴奥兵士ふぃ〜 ☆☆☆☆☆ \n", " ☆☆☆☆☆ Peep hole soldier ☆☆☆☆☆ \n") + VT_RST); Collider_DestroyCylinder(play, collider); this->actor.flags &= ~(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY); this->actionFunc = EnHeishi_DoNothing2; @@ -163,12 +164,14 @@ void EnHeishi2_Init(Actor* thisx, PlayState* play) { this->unk_2F0 = PARAMS_GET_U(this->actor.params, 8, 8); PRINTF("\n\n"); - // "Soldier Set 2 Completed!" - PRINTF(VT_FGCOL(GREEN) " ☆☆☆☆☆ 兵士2セット完了! ☆☆☆☆☆ %d\n" VT_RST, this->actor.params); - // "Identification Completed!" - PRINTF(VT_FGCOL(YELLOW) " ☆☆☆☆☆ 識別完了! ☆☆☆☆☆ %d\n" VT_RST, this->type); - // "Message completed!" - PRINTF(VT_FGCOL(MAGENTA) " ☆☆☆☆☆ メッセージ完了! ☆☆☆☆☆ %x\n\n" VT_RST, + PRINTF(VT_FGCOL(GREEN) T(" ☆☆☆☆☆ 兵士2セット完了! ☆☆☆☆☆ %d\n", " ☆☆☆☆☆ Soldier Set 2 Completed! ☆☆☆☆☆ %d\n") + VT_RST, + this->actor.params); + PRINTF(VT_FGCOL(YELLOW) T(" ☆☆☆☆☆ 識別完了! ☆☆☆☆☆ %d\n", " ☆☆☆☆☆ Identification Completed! ☆☆☆☆☆ %d\n") + VT_RST, + this->type); + PRINTF(VT_FGCOL(MAGENTA) + T(" ☆☆☆☆☆ メッセージ完了! ☆☆☆☆☆ %x\n\n", " ☆☆☆☆☆ Message completed! ☆☆☆☆☆ %x\n\n") VT_RST, PARAMS_GET_U(this->actor.params, 8, 4)); } } @@ -203,41 +206,39 @@ void func_80A53278(EnHeishi2* this, PlayState* play) { this->unk_300 = TEXT_STATE_DONE; this->actionFunc = func_80A5475C; } else if (GET_EVENTCHKINF(EVENTCHKINF_09) && GET_EVENTCHKINF(EVENTCHKINF_25) && GET_EVENTCHKINF(EVENTCHKINF_37)) { - // "Get all spiritual stones!" - PRINTF(VT_FGCOL(GREEN) " ☆☆☆☆☆ 全部の精霊石GET! ☆☆☆☆☆ \n" VT_RST); + PRINTF(VT_FGCOL(GREEN) T(" ☆☆☆☆☆ 全部の精霊石GET! ☆☆☆☆☆ \n", " ☆☆☆☆☆ All the spirit stones GET! ☆☆☆☆☆ \n") + VT_RST); this->unk_300 = TEXT_STATE_DONE; this->actor.textId = 0x7006; this->actionFunc = func_80A5475C; } else if (!IS_DAY) { - // "Sleep early for children!" - PRINTF(VT_FGCOL(YELLOW) " ☆☆☆☆☆ 子供ははやくネロ! ☆☆☆☆☆ \n" VT_RST); + PRINTF(VT_FGCOL(YELLOW) T(" ☆☆☆☆☆ 子供ははやくネロ! ☆☆☆☆☆ \n", " ☆☆☆☆☆ Sleep early for children! ☆☆☆☆☆ \n") + VT_RST); this->unk_300 = TEXT_STATE_DONE; this->actor.textId = 0x7002; this->actionFunc = func_80A5475C; } else if (this->unk_30C != 0) { - // "Anything passes" - PRINTF(VT_FGCOL(BLUE) " ☆☆☆☆☆ なんでも通るよ ☆☆☆☆☆ \n" VT_RST); + PRINTF(VT_FGCOL(BLUE) T(" ☆☆☆☆☆ なんでも通るよ ☆☆☆☆☆ \n", " ☆☆☆☆☆ Anything passes ☆☆☆☆☆ \n") VT_RST); this->unk_300 = TEXT_STATE_DONE; this->actor.textId = 0x7099; this->actionFunc = func_80A5475C; } else if (GET_EVENTCHKINF(EVENTCHKINF_RECEIVED_WEIRD_EGG)) { if (this->unk_30E == 0) { - // "Start under the first sleeve!" - PRINTF(VT_FGCOL(MAGENTA) " ☆☆☆☆☆ 1回目袖の下開始! ☆☆☆☆☆ \n" VT_RST); + PRINTF(VT_FGCOL(MAGENTA) + T(" ☆☆☆☆☆ 1回目袖の下開始! ☆☆☆☆☆ \n", " ☆☆☆☆☆ Start under the first sleeve! ☆☆☆☆☆ \n") VT_RST); this->actor.textId = 0x7071; this->unk_30E = 1; } else { - // "Start under the second sleeve!" - PRINTF(VT_FGCOL(MAGENTA) " ☆☆☆☆☆ 2回目袖の下開始! ☆☆☆☆☆ \n" VT_RST); + PRINTF(VT_FGCOL(MAGENTA) T(" ☆☆☆☆☆ 2回目袖の下開始! ☆☆☆☆☆ \n", + " ☆☆☆☆☆ Start under the second sleeve! ☆☆☆☆☆ \n") VT_RST); this->actor.textId = 0x7072; } this->unk_300 = TEXT_STATE_CHOICE; this->actionFunc = func_80A5475C; } else { - // "That's okay" - PRINTF(VT_FGCOL(CYAN) " ☆☆☆☆☆ それはとおらんよぉ ☆☆☆☆☆ \n" VT_RST); + PRINTF(VT_FGCOL(CYAN) T(" ☆☆☆☆☆ それはとおらんよぉ ☆☆☆☆☆ \n", " ☆☆☆☆☆ That won't work ☆☆☆☆☆ \n") VT_RST); this->unk_300 = TEXT_STATE_DONE; this->actor.textId = 0x7029; this->actionFunc = func_80A5475C; @@ -310,8 +311,9 @@ void func_80A53638(EnHeishi2* this, PlayState* play) { break; } } - // "I've come!" - PRINTF(VT_FGCOL(MAGENTA) "☆☆☆ きたきたきたぁ! ☆☆☆ %x\n" VT_RST, actor->dyna.actor.next); + PRINTF(VT_FGCOL(MAGENTA) T("☆☆☆ きたきたきたぁ! ☆☆☆ %x\n", "☆☆☆ It's here, it's here, it's here! ☆☆☆ %x\n") + VT_RST, + actor->dyna.actor.next); this->actionFunc = func_80A5372C; } } @@ -395,8 +397,8 @@ void func_80A5399C(EnHeishi2* this, PlayState* play) { } this->actionFunc = func_80A5475C; } else { - // "I don't know" - PRINTF(VT_FGCOL(MAGENTA) " ☆☆☆☆☆ とおしゃしねぇちゅーの ☆☆☆☆☆ \n" VT_RST); + PRINTF(VT_FGCOL(MAGENTA) T(" ☆☆☆☆☆ とおしゃしねぇちゅーの ☆☆☆☆☆ \n", " ☆☆☆☆☆ There is no way out ☆☆☆☆☆ \n") + VT_RST); this->actionFunc = func_80A53AD4; } } @@ -477,8 +479,9 @@ void func_80A53D0C(EnHeishi2* this, PlayState* play) { break; } } - // "I've come!" - PRINTF(VT_FGCOL(MAGENTA) "☆☆☆ きたきたきたぁ! ☆☆☆ %x\n" VT_RST, gate->dyna.actor.next); + PRINTF(VT_FGCOL(MAGENTA) T("☆☆☆ きたきたきたぁ! ☆☆☆ %x\n", "☆☆☆ It's here, it's here, it's here! ☆☆☆ %x\n") + VT_RST, + gate->dyna.actor.next); this->actionFunc = func_80A53DF8; } } @@ -679,8 +682,7 @@ void func_80A5455C(EnHeishi2* this, PlayState* play) { bomb->actor.velocity.y = Rand_CenteredFloat(5.0f) + 10.0f; } - // "This is down!" - PRINTF(VT_FGCOL(YELLOW) " ☆☆☆☆☆ これでダウンだ! ☆☆☆☆☆ \n" VT_RST); + PRINTF(VT_FGCOL(YELLOW) T(" ☆☆☆☆☆ これでダウンだ! ☆☆☆☆☆ \n", " ☆☆☆☆☆ This is down! ☆☆☆☆☆ \n") VT_RST); this->actionFunc = func_80A546DC; } } diff --git a/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c b/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c index 354c3f3058..8e03fe3e62 100644 --- a/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c +++ b/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c @@ -11,6 +11,7 @@ #include "printf.h" #include "sfx.h" #include "terminal.h" +#include "translation.h" #include "versions.h" #include "z_lib.h" #include "z64play.h" @@ -87,8 +88,8 @@ void EnHeishi3_Init(Actor* thisx, PlayState* play) { this->actor.attentionRangeType = ATTENTION_RANGE_6; Collider_InitCylinder(play, &this->collider); Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); - // "Castle Gate Soldier - Power Up" - PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 城門兵パワーアップ ☆☆☆☆☆ \n" VT_RST); + PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 城門兵パワーアップ ☆☆☆☆☆ \n", "☆☆☆☆☆ Castle gate soldier power-up ☆☆☆☆☆ \n") + VT_RST); this->actor.gravity = -3.0f; this->actor.focus.pos = this->actor.world.pos; @@ -143,7 +144,7 @@ void EnHeishi3_StandSentinelInGrounds(EnHeishi3* this, PlayState* play) { sPlayerCaught = 1; Message_StartTextbox(play, 0x702D, &this->actor); Sfx_PlaySfxCentered(NA_SE_SY_FOUND); - PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); // "Discovered!" + PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 発見! ☆☆☆☆☆ \n", "☆☆☆☆☆ Discovered! ☆☆☆☆☆ \n") VT_RST); Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); #if OOT_PAL_N64 this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_UPDATE_CULLING_DISABLED; @@ -174,7 +175,7 @@ void EnHeishi3_StandSentinelInCastle(EnHeishi3* this, PlayState* play) { sPlayerCaught = 1; Message_StartTextbox(play, 0x702D, &this->actor); Sfx_PlaySfxCentered(NA_SE_SY_FOUND); - PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); // "Discovered!" + PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 発見! ☆☆☆☆☆ \n", "☆☆☆☆☆ Discovered! ☆☆☆☆☆ \n") VT_RST); Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1); #if OOT_PAL_N64 this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_UPDATE_CULLING_DISABLED;