1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-14 21:40:03 +00:00

T() macro 2 (#2073)

* T() in idle.c, irqmgr.c, padmgr.c, z_locale.c

* T() in  z_sram.c

* T() in z_bgcheck.c, z_scene.c

* format
This commit is contained in:
Dragorn421 2024-08-23 20:53:32 +02:00 committed by GitHub
parent 1f2e82c39e
commit 37f0774778
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 125 additions and 137 deletions

View file

@ -21,34 +21,38 @@ f32 gViConfigYScale = 1.0;
void Main_ThreadEntry(void* arg) {
OSTime time;
PRINTF("mainx 実行開始\n");
PRINTF(T("mainx 実行開始\n", "mainx execution started\n"));
DmaMgr_Init();
PRINTF("codeセグメントロード中...");
PRINTF(T("codeセグメントロード中...", "code segment loading..."));
time = osGetTime();
DMA_REQUEST_SYNC(_codeSegmentStart, (uintptr_t)_codeSegmentRomStart, _codeSegmentRomEnd - _codeSegmentRomStart,
"../idle.c", 238);
time -= osGetTime();
PRINTF("\rcodeセグメントロード中...完了\n");
PRINTF("転送時間 %6.3f\n");
PRINTF(T("\rcodeセグメントロード中...完了\n", "\rcode segment loading... Done\n"));
PRINTF(T("転送時間 %6.3f\n", "Transfer time %6.3f\n"));
bzero(_codeSegmentBssStart, _codeSegmentBssEnd - _codeSegmentBssStart);
PRINTF("codeセグメントBSSクリア完了\n");
PRINTF(T("codeセグメントBSSクリア完了\n", "code segment BSS cleared\n"));
Main(arg);
PRINTF("mainx 実行終了\n");
PRINTF(T("mainx 実行終了\n", "mainx execution finished\n"));
}
void Idle_ThreadEntry(void* arg) {
PRINTF("アイドルスレッド(idleproc)実行開始\n");
PRINTF("作製者 : %s\n", gBuildTeam);
PRINTF("作成日時 : %s\n", gBuildDate);
PRINTF(T("アイドルスレッド(idleproc)実行開始\n", "Idle thread (idleproc) execution started\n"));
PRINTF(T("作製者 : %s\n", "Created by: %s\n"), gBuildTeam);
PRINTF(T("作成日時 : %s\n", "Created : %s\n"), gBuildDate);
PRINTF("MAKEOPTION: %s\n", gBuildMakeOption);
PRINTF(VT_FGCOL(GREEN));
PRINTF("RAMサイズは %d キロバイトです(osMemSize/osGetMemSize)\n", (s32)osMemSize / 1024);
PRINTF("_bootSegmentEnd(%08x) 以降のRAM領域はクリアされました(boot)\n", _bootSegmentEnd);
PRINTF("Zバッファのサイズは %d キロバイトです\n", 0x96);
PRINTF("ダイナミックバッファのサイズは %d キロバイトです\n", 0x92);
PRINTF("FIFOバッファのサイズは %d キロバイトです\n", 0x60);
PRINTF("YIELDバッファのサイズは %d キロバイトです\n", 3);
PRINTF("オーディオヒープのサイズは %d キロバイトです\n",
PRINTF(T("RAMサイズは %d キロバイトです(osMemSize/osGetMemSize)\n",
"RAM size is %d kilobytes (osMemSize/osGetMemSize)\n"),
(s32)osMemSize / 1024);
PRINTF(T("_bootSegmentEnd(%08x) 以降のRAM領域はクリアされました(boot)\n",
"The RAM area after _bootSegmentEnd(%08x) has been cleared (boot)\n"),
_bootSegmentEnd);
PRINTF(T("Zバッファのサイズは %d キロバイトです\n", "Z buffer size is %d kilobytes\n"), 0x96);
PRINTF(T("ダイナミックバッファのサイズは %d キロバイトです\n", "The dynamic buffer size is %d kilobytes\n"), 0x92);
PRINTF(T("FIFOバッファのサイズは %d キロバイトです\n", "FIFO buffer size is %d kilobytes\n"), 0x60);
PRINTF(T("YIELDバッファのサイズは %d キロバイトです\n", "YIELD buffer size is %d kilobytes\n"), 3);
PRINTF(T("オーディオヒープのサイズは %d キロバイトです\n", "Audio heap size is %d kilobytes\n"),
((intptr_t)&gAudioHeap[ARRAY_COUNT(gAudioHeap)] - (intptr_t)gAudioHeap) / 1024);
PRINTF(VT_RST);

View file

@ -34,7 +34,8 @@ void Locale_Init(void) {
break;
default:
PRINTF(VT_COL(RED, WHITE));
PRINTF("z_locale_init: 日本用かアメリカ用か判別できません\n");
PRINTF(T("z_locale_init: 日本用かアメリカ用か判別できません\n",
"z_locale_init: Can't tell if it's for Japan or America\n"));
#if PLATFORM_N64
LogUtils_HungupThread("../z_locale.c", 101);
#else
@ -44,7 +45,8 @@ void Locale_Init(void) {
break;
}
PRINTF("z_locale_init:日本用かアメリカ用か3コンで判断させる\n");
PRINTF(T("z_locale_init:日本用かアメリカ用か3コンで判断させる\n",
"z_locale_init: Determine whether it is for Japan or America using 3 controls\n"));
}
void Locale_ResetRegion(void) {

View file

@ -117,10 +117,10 @@ void IrqMgr_SendMesgToClients(IrqMgr* irqMgr, OSMesg msg) {
for (client = irqMgr->clients; client != NULL; client = client->prev) {
if (MQ_IS_FULL(client->queue)) {
// "irqmgr_SendMesgForClient: Message queue is overflowing mq=%08x cnt=%d"
PRINTF(
VT_COL(RED, WHITE) "irqmgr_SendMesgForClient:メッセージキューがあふれています mq=%08x cnt=%d\n" VT_RST,
client->queue, MQ_GET_COUNT(client->queue));
PRINTF(VT_COL(RED, WHITE) T("irqmgr_SendMesgForClient:メッセージキューがあふれています mq=%08x cnt=%d\n",
"irqmgr_SendMesgForClient: Message queue is overflowing mq=%08x cnt=%d\n")
VT_RST,
client->queue, MQ_GET_COUNT(client->queue));
} else {
osSendMesg(client->queue, msg, OS_MESG_NOBLOCK);
}
@ -140,10 +140,9 @@ void IrqMgr_JamMesgToClients(IrqMgr* irqMgr, OSMesg msg) {
for (client = irqMgr->clients; client != NULL; client = client->prev) {
if (MQ_IS_FULL(client->queue)) {
// "irqmgr_JamMesgForClient: Message queue is overflowing mq=%08x cnt=%d"
PRINTF(
VT_COL(RED, WHITE) "irqmgr_JamMesgForClient:メッセージキューがあふれています mq=%08x cnt=%d\n" VT_RST,
client->queue, MQ_GET_COUNT(client->queue));
PRINTF(VT_COL(RED, WHITE) T("irqmgr_JamMesgForClient:メッセージキューがあふれています mq=%08x cnt=%d\n",
"irqmgr_JamMesgForClient: Message queue is overflowing mq=%08x cnt=%d") VT_RST,
client->queue, MQ_GET_COUNT(client->queue));
} else {
//! @bug The function's name suggests this would use osJamMesg rather than osSendMesg, using the
//! latter makes this function no different than IrqMgr_SendMesgToClients.
@ -170,19 +169,16 @@ void IrqMgr_HandlePreNMI(IrqMgr* irqMgr) {
}
void IrqMgr_CheckStacks(void) {
// "0.5 seconds after PRENMI"
PRINTF("irqmgr.c: PRENMIから0.5秒経過\n");
PRINTF(T("irqmgr.c: PRENMIから0.5秒経過\n", "irqmgr.c: 0.5 seconds after PRENMI\n"));
if (StackCheck_Check(NULL) == STACK_STATUS_OK) {
// "The stack looks ok"
PRINTF("スタックは大丈夫みたいです\n");
PRINTF(T("スタックは大丈夫みたいです\n", "The stack looks ok\n"));
} else {
PRINTF("%c", BEL);
PRINTF(VT_FGCOL(RED));
// "Stack overflow or dangerous"
PRINTF("スタックがオーバーフローしたか危険な状態です\n");
// "Increase stack size early or don't consume stack"
PRINTF("早々にスタックサイズを増やすか、スタックを消費しないようにしてください\n");
PRINTF(T("スタックがオーバーフローしたか危険な状態です\n", "Stack overflow or dangerous\n"));
PRINTF(T("早々にスタックサイズを増やすか、スタックを消費しないようにしてください\n",
"Increase stack size early or don't consume stack\n"));
PRINTF(VT_RST);
}
}
@ -207,8 +203,7 @@ void IrqMgr_HandlePreNMI480(IrqMgr* irqMgr) {
result = osAfterPreNMI();
if (result != 0) {
// "osAfterPreNMI returned %d !?"
PRINTF("osAfterPreNMIが %d を返しました!?\n", result);
PRINTF(T("osAfterPreNMIが %d を返しました!?\n", "osAfterPreNMI returned %d !?\n"), result);
// osAfterPreNMI failed, try again in 1ms
//! @bug setting the same timer for a second time without letting the first one complete breaks
//! the timer linked list
@ -243,8 +238,7 @@ void IrqMgr_ThreadEntry(void* arg) {
IrqMgr* irqMgr = (IrqMgr*)arg;
u8 exit;
// "Start IRQ manager thread execution"
PRINTF("IRQマネージャスレッド実行開始\n");
PRINTF(T("IRQマネージャスレッド実行開始\n", "Start IRQ manager thread execution\n"));
exit = false;
while (!exit) {
@ -256,42 +250,38 @@ void IrqMgr_ThreadEntry(void* arg) {
case IRQ_PRENMI_MSG:
PRINTF("PRE_NMI_MSG\n");
// "Scheduler: Receives PRE_NMI message"
PRINTF("スケジューラPRE_NMIメッセージを受信\n");
PRINTF(T("スケジューラPRE_NMIメッセージを受信\n", "Scheduler: Receives PRE_NMI message\n"));
IrqMgr_HandlePreNMI(irqMgr);
break;
case IRQ_PRENMI450_MSG:
PRINTF("PRENMI450_MSG\n");
// "Scheduler: Receives PRENMI450 message"
PRINTF("スケジューラPRENMI450メッセージを受信\n");
PRINTF(T("スケジューラPRENMI450メッセージを受信\n", "Scheduler: Receives PRENMI450 message\n"));
IrqMgr_HandlePreNMI450(irqMgr);
break;
case IRQ_PRENMI480_MSG:
PRINTF("PRENMI480_MSG\n");
// "Scheduler: Receives PRENMI480 message"
PRINTF("スケジューラPRENMI480メッセージを受信\n");
PRINTF(T("スケジューラPRENMI480メッセージを受信\n", "Scheduler: Receives PRENMI480 message\n"));
IrqMgr_HandlePreNMI480(irqMgr);
break;
case IRQ_PRENMI500_MSG:
PRINTF("PRENMI500_MSG\n");
// "Scheduler: Receives PRENMI500 message"
PRINTF("スケジューラPRENMI500メッセージを受信\n");
PRINTF(T("スケジューラPRENMI500メッセージを受信\n", "Scheduler: Receives PRENMI500 message\n"));
IrqMgr_HandlePreNMI500(irqMgr);
exit = true;
break;
default:
// "Unexpected message received"
PRINTF("irqmgr.c:予期しないメッセージを受け取りました(%08x)\n", msg);
PRINTF(T("irqmgr.c:予期しないメッセージを受け取りました(%08x)\n",
"irqmgr.c: Unexpected message received (%08x)\n"),
msg);
break;
}
}
// "End of IRQ manager thread execution"
PRINTF("IRQマネージャスレッド実行終了\n");
PRINTF(T("IRQマネージャスレッド実行終了\n", "End of IRQ manager thread execution\n"));
}
void IrqMgr_Init(IrqMgr* irqMgr, void* stack, OSPri pri, u8 retraceCount) {

View file

@ -151,14 +151,13 @@ void PadMgr_UpdateRumble(PadMgr* padMgr) {
if (padMgr->pakType[i] == CONT_PAK_RUMBLE) {
if (padMgr->rumbleEnable[i]) {
if (padMgr->rumbleTimer[i] < 3) {
// "Rumble pack brrr"
PADMGR_LOG(i, "振動パック ぶるぶるぶるぶる");
PADMGR_LOG(i, T("振動パック ぶるぶるぶるぶる", "Rumble pak brrr"));
if (osMotorStart(&padMgr->rumblePfs[i]) != 0) {
padMgr->pakType[i] = CONT_PAK_NONE;
// "A communication error has occurred with the vibration pack"
PADMGR_LOG(i, "振動パックで通信エラーが発生しました");
PADMGR_LOG(i, T("振動パックで通信エラーが発生しました",
"A communication error has occurred with the rumble pak"));
} else {
padMgr->rumbleTimer[i] = 3;
}
@ -167,14 +166,13 @@ void PadMgr_UpdateRumble(PadMgr* padMgr) {
}
} else {
if (padMgr->rumbleTimer[i] != 0) {
// "Stop vibration pack"
PADMGR_LOG(i, "振動パック 停止");
PADMGR_LOG(i, T("振動パック 停止", "Stop rumble pak"));
if (osMotorStop(&padMgr->rumblePfs[i]) != 0) {
padMgr->pakType[i] = CONT_PAK_NONE;
// "A communication error has occurred with the vibration pack"
PADMGR_LOG(i, "振動パックで通信エラーが発生しました");
PADMGR_LOG(i, T("振動パックで通信エラーが発生しました",
"A communication error has occurred with the rumble pak"));
} else {
padMgr->rumbleTimer[i]--;
}
@ -186,12 +184,11 @@ void PadMgr_UpdateRumble(PadMgr* padMgr) {
} else {
if (padMgr->pakType[i] != CONT_PAK_NONE) {
if (padMgr->pakType[i] == CONT_PAK_RUMBLE || !OOT_DEBUG) {
// "It seems that a vibration pack was pulled out"
PADMGR_LOG(i, "振動パックが抜かれたようです");
PADMGR_LOG(i, T("振動パックが抜かれたようです", "It seems that a rumble pak was pulled out"));
padMgr->pakType[i] = CONT_PAK_NONE;
} else {
// "It seems that a controller pack that is not a vibration pack was pulled out"
PADMGR_LOG(i, "振動パックではないコントローラパックが抜かれたようです");
PADMGR_LOG(i, T("振動パックではないコントローラパックが抜かれたようです",
"It seems that a controller pak that is not a rumble pak was pulled out"));
padMgr->pakType[i] = CONT_PAK_NONE;
}
}
@ -213,15 +210,13 @@ void PadMgr_UpdateRumble(PadMgr* padMgr) {
osMotorStart(&padMgr->rumblePfs[i]);
osMotorStop(&padMgr->rumblePfs[i]);
// "Recognized vibration pack"
PADMGR_LOG(i, "振動パックを認識しました");
PADMGR_LOG(i, T("振動パックを認識しました", "Recognized rumble pak"));
} else if (ret == PFS_ERR_DEVICE) {
padMgr->pakType[i] = CONT_PAK_OTHER;
} else if (ret == PFS_ERR_CONTRFAIL) {
LOG_NUM("++errcnt", ++sRumbleErrorCount, "../padmgr.c", 282);
// "Controller pack communication error"
PADMGR_LOG(i, "コントローラパックの通信エラー");
PADMGR_LOG(i, T("コントローラパックの通信エラー", "Controller pak communication error"));
}
}
}
@ -242,8 +237,7 @@ void PadMgr_RumbleStop(PadMgr* padMgr) {
// If there is a rumble pak attached to this controller, stop it
if (gFaultMgr.msgId == 0 && padMgr->rumbleOnTimer != 0) {
// "Stop rumble pak"
PADMGR_LOG(i, "振動パック 停止");
PADMGR_LOG(i, T("振動パック 停止", "Stop rumble pak"));
}
osMotorStop(&padMgr->rumblePfs[i]);
}
@ -305,16 +299,14 @@ void PadMgr_UpdateInputs(PadMgr* padMgr) {
input->cur = *pad;
if (!padMgr->ctrlrIsConnected[i]) {
padMgr->ctrlrIsConnected[i] = true;
// "Recognized"
PADMGR_LOG(i, "認識しました");
PADMGR_LOG(i, T("認識しました", "Recognized"));
}
break;
case (CHNL_ERR_OVERRUN >> 4):
// Overrun error, reuse previous inputs
input->cur = input->prev;
LOG_NUM("this->Key_switch[i]", padMgr->ctrlrIsConnected[i], "../padmgr.c", 380);
// "Overrun error occurred"
PADMGR_LOG(i, "オーバーランエラーが発生");
PADMGR_LOG(i, T("オーバーランエラーが発生", "Overrun error occurred"));
break;
case (CHNL_ERR_NORESP >> 4):
// No response error, take inputs as 0
@ -327,8 +319,7 @@ void PadMgr_UpdateInputs(PadMgr* padMgr) {
padMgr->ctrlrIsConnected[i] = false;
padMgr->pakType[i] = CONT_PAK_NONE;
padMgr->rumbleTimer[i] = UINT8_MAX;
// "Not responding"
PADMGR_LOG(i, "応答しません");
PADMGR_LOG(i, T("応答しません", "Not responding"));
}
break;
default:

View file

@ -87,9 +87,9 @@ s32 BgCheck_PosErrorCheck(Vec3f* pos, const char* file, int line) {
if (pos->x >= BGCHECK_XYZ_ABSMAX || pos->x <= -BGCHECK_XYZ_ABSMAX || pos->y >= BGCHECK_XYZ_ABSMAX ||
pos->y <= -BGCHECK_XYZ_ABSMAX || pos->z >= BGCHECK_XYZ_ABSMAX || pos->z <= -BGCHECK_XYZ_ABSMAX) {
PRINTF(VT_FGCOL(RED));
// "Position is invalid."
PRINTF("T_BGCheck_PosErrorCheck():位置が妥当ではありません。pos (%f,%f,%f) file:%s line:%d\n", pos->x, pos->y,
pos->z, file, line);
PRINTF(T("T_BGCheck_PosErrorCheck():位置が妥当ではありません。pos (%f,%f,%f) file:%s line:%d\n",
"T_BGCheck_PosErrorCheck(): Position is invalid. pos (%f,%f,%f) file:%s line:%d\n"),
pos->x, pos->y, pos->z, file, line);
PRINTF(VT_RST);
return true;
}
@ -305,8 +305,8 @@ void CollisionPoly_GetVerticesByBgId(CollisionPoly* poly, s32 bgId, CollisionCon
if (poly == NULL || bgId > BG_ACTOR_MAX || dest == NULL) {
PRINTF(VT_COL(RED, WHITE));
// "Argument not appropriate. Processing terminated."
PRINTF("T_Polygon_GetVertex_bg_ai(): Error %d %d %d 引数が適切ではありません。処理を終了します。\n",
PRINTF(T("T_Polygon_GetVertex_bg_ai(): Error %d %d %d 引数が適切ではありません。処理を終了します。\n",
"T_Polygon_GetVertex_bg_ai(): Error %d %d %d Argument not appropriate. Processing terminated.\n"),
poly == NULL, bgId > BG_ACTOR_MAX, dest == NULL);
PRINTF(VT_RST);
@ -1549,19 +1549,17 @@ void BgCheck_Allocate(CollisionContext* colCtx, PlayState* play, CollisionHeader
colCtx->colHeader = colHeader;
customNodeListMax = -1;
// "/*---------------- BGCheck Buffer Memory Size -------------*/\n"
PRINTF("/*---------------- BGCheck バッファーメモリサイズ -------------*/\n");
PRINTF(T("/*---------------- BGCheck バッファーメモリサイズ -------------*/\n",
"/*---------------- BGCheck Buffer Memory Size -------------*/\n"));
if ((R_SCENE_CAM_TYPE == SCENE_CAM_TYPE_FIXED_SHOP_VIEWPOINT) ||
(R_SCENE_CAM_TYPE == SCENE_CAM_TYPE_FIXED_TOGGLE_VIEWPOINT) || (R_SCENE_CAM_TYPE == SCENE_CAM_TYPE_FIXED) ||
(R_SCENE_CAM_TYPE == SCENE_CAM_TYPE_FIXED_MARKET)) {
if (play->sceneId == SCENE_STABLE) {
// "/* BGCheck LonLon Size %dbyte */\n"
PRINTF("/* BGCheck LonLonサイズ %dbyte */\n", 0x3520);
PRINTF(T("/* BGCheck LonLonサイズ %dbyte */\n", "/* BGCheck LonLon Size %dbyte */\n"), 0x3520);
colCtx->memSize = 0x3520;
} else {
// "/* BGCheck Mini Size %dbyte */\n"
PRINTF("/* BGCheck ミニサイズ %dbyte */\n", 0x4E20);
PRINTF(T("/* BGCheck ミニサイズ %dbyte */\n", "/* BGCheck Mini Size %dbyte */\n"), 0x4E20);
colCtx->memSize = 0x4E20;
}
colCtx->dyna.polyNodesMax = 500;
@ -1572,8 +1570,7 @@ void BgCheck_Allocate(CollisionContext* colCtx, PlayState* play, CollisionHeader
colCtx->subdivAmount.z = 2;
} else if (BgCheck_IsSpotScene(play) == true) {
colCtx->memSize = 0xF000;
// "/* BGCheck Spot Size %dbyte */\n"
PRINTF("/* BGCheck Spot用サイズ %dbyte */\n", 0xF000);
PRINTF(T("/* BGCheck Spot用サイズ %dbyte */\n", "/* BGCheck Spot Size %dbyte */\n"), 0xF000);
colCtx->dyna.polyNodesMax = 1000;
colCtx->dyna.polyListMax = 512;
colCtx->dyna.vtxListMax = 512;
@ -1586,8 +1583,7 @@ void BgCheck_Allocate(CollisionContext* colCtx, PlayState* play, CollisionHeader
} else {
colCtx->memSize = 0x1CC00;
}
// "/* BGCheck Normal Size %dbyte */\n"
PRINTF("/* BGCheck ノーマルサイズ %dbyte */\n", colCtx->memSize);
PRINTF(T("/* BGCheck ノーマルサイズ %dbyte */\n", "/* BGCheck Normal Size %dbyte */\n"), colCtx->memSize);
colCtx->dyna.polyNodesMax = 1000;
colCtx->dyna.polyListMax = 512;
colCtx->dyna.vtxListMax = 512;
@ -1647,7 +1643,8 @@ void BgCheck_Allocate(CollisionContext* colCtx, PlayState* play, CollisionHeader
lookupTblMemSize = BgCheck_InitializeStaticLookup(colCtx, play, colCtx->lookupTbl);
PRINTF(VT_FGCOL(GREEN));
PRINTF("/*---結局 BG使用サイズ %dbyte---*/\n", memSize + lookupTblMemSize);
PRINTF(T("/*---結局 BG使用サイズ %dbyte---*/\n", "/*---BG size used in the end %dbyte---*/\n"),
memSize + lookupTblMemSize);
PRINTF(VT_RST);
DynaPoly_Init(play, &colCtx->dyna);
@ -1667,7 +1664,8 @@ CollisionHeader* BgCheck_GetCollisionHeader(CollisionContext* colCtx, s32 bgId)
}
if (!(colCtx->dyna.bgActorFlags[bgId] & BGACTOR_IN_USE)) {
PRINTF(VT_COL(YELLOW, BLACK));
PRINTF("T_BGCheck_getBGDataInfo():そのbg_actor_indexは使われておりません。index=%d\n");
PRINTF(T("T_BGCheck_getBGDataInfo():そのbg_actor_indexは使われておりません。index=%d\n",
"T_BGCheck_getBGDataInfo(): That bg_actor_index is not in use. index=%d\n"));
PRINTF(VT_RST);
return NULL;
}
@ -1719,7 +1717,7 @@ f32 BgCheck_RaycastDownImpl(PlayState* play, CollisionContext* colCtx, u16 xpFla
#if OOT_DEBUG
if (BgCheck_PosErrorCheck(&checkPos, "../z_bgcheck.c", 4410)) {
if (actor != NULL) {
PRINTF("こいつ,pself_actor->name %d\n", actor->id);
PRINTF(T("こいつ,pself_actor->name %d\n", "This guy, pself_actor->name %d\n"), actor->id);
}
}
#endif
@ -1972,7 +1970,7 @@ s32 BgCheck_CheckWallImpl(CollisionContext* colCtx, u16 xpFlags, Vec3f* posResul
if (BgCheck_PosErrorCheck(posNext, "../z_bgcheck.c", 4831) == true ||
BgCheck_PosErrorCheck(posPrev, "../z_bgcheck.c", 4832) == true) {
if (actor != NULL) {
PRINTF("こいつ,pself_actor->name %d\n", actor->id);
PRINTF(T("こいつ,pself_actor->name %d\n", "This guy, pself_actor->name %d\n"), actor->id);
}
}
#endif
@ -2165,7 +2163,7 @@ s32 BgCheck_CheckCeilingImpl(CollisionContext* colCtx, u16 xpFlags, f32* outY, V
#if OOT_DEBUG
if (BgCheck_PosErrorCheck(pos, "../z_bgcheck.c", 5206) == true) {
if (actor != NULL) {
PRINTF("こいつ,pself_actor->name %d\n", actor->id);
PRINTF(T("こいつ,pself_actor->name %d\n", "This guy, pself_actor->name %d\n"), actor->id);
}
}
#endif
@ -2239,9 +2237,9 @@ s32 BgCheck_CheckLineImpl(CollisionContext* colCtx, u16 xpFlags1, u16 xpFlags2,
if (BgCheck_PosErrorCheck(posA, "../z_bgcheck.c", 5334) == true ||
BgCheck_PosErrorCheck(posB, "../z_bgcheck.c", 5335) == true) {
if (actor != NULL) {
PRINTF("こいつ,pself_actor->name %d\n", actor->id);
PRINTF(T("こいつ,pself_actor->name %d\n", "This guy, pself_actor->name %d\n"), actor->id);
} else {
PRINTF("pself_actor == NULLで犯人不明\n");
PRINTF(T("pself_actor == NULLで犯人不明\n", "pself_actor == NULL culprit unknown\n"));
}
}
#endif
@ -2461,7 +2459,7 @@ s32 BgCheck_SphVsFirstPolyImpl(CollisionContext* colCtx, u16 xpFlags, CollisionP
#if OOT_DEBUG
if (BgCheck_PosErrorCheck(center, "../z_bgcheck.c", 5852) == true) {
if (actor != NULL) {
PRINTF("こいつ,pself_actor->name %d\n", actor->id);
PRINTF(T("こいつ,pself_actor->name %d\n", "This guy, pself_actor->name %d\n"), actor->id);
}
}
#endif
@ -2735,7 +2733,8 @@ s32 DynaPoly_SetBgActor(PlayState* play, DynaCollisionContext* dyna, Actor* acto
if (!foundSlot) {
PRINTF(VT_FGCOL(RED));
PRINTF("DynaPolyInfo_setActor():ダイナミックポリゴン 空きインデックスはありません\n");
PRINTF(T("DynaPolyInfo_setActor():ダイナミックポリゴン 空きインデックスはありません\n",
"DynaPolyInfo_setActor(): Dynamic polygon no free indexes\n"));
PRINTF(VT_RST);
return BG_ACTOR_MAX;
}
@ -2804,14 +2803,17 @@ void DynaPoly_DeleteBgActor(PlayState* play, DynaCollisionContext* dyna, s32 bgI
#if OOT_DEBUG
if (bgId == -1) {
PRINTF(VT_FGCOL(GREEN));
// "The index that should have been deleted(? ) was(== -1), processing aborted."
PRINTF("DynaPolyInfo_delReserve():削除されているはずの(?)\nインデックス(== -1)のため,処理を中止します。\n");
PRINTF(T("DynaPolyInfo_delReserve():削除されているはずの(?)\n"
"インデックス(== -1)のため,処理を中止します。\n",
"DynaPolyInfo_delReserve():The index that should have been deleted(?)\n"
" was(== -1), processing aborted.\n"));
PRINTF(VT_RST);
} else {
PRINTF(VT_FGCOL(RED));
// "Unable to deallocate index / index unallocated, processing aborted."
PRINTF("DynaPolyInfo_delReserve():"
"確保していない出来なかったインデックスの解放のため、処理を中止します。index == %d\n",
PRINTF(T("DynaPolyInfo_delReserve():"
"確保していない出来なかったインデックスの解放のため、処理を中止します。index == %d\n",
"DynaPolyInfo_delReserve():"
" Unable to deallocate index / index unallocated, processing aborted. index == %d\n"),
bgId);
PRINTF(VT_RST);
}
@ -2873,16 +2875,16 @@ void DynaPoly_AddBgActorToLookup(PlayState* play, DynaCollisionContext* dyna, s3
#if OOT_DEBUG
if (!(dyna->polyListMax >= *polyStartIndex + pbgdata->numPolygons)) {
PRINTF(VT_FGCOL(RED));
// "do not use if %d exceeds %d"
PRINTF("DynaPolyInfo_expandSRT():polygon over %dが%dを越えるとダメ\n", *polyStartIndex + pbgdata->numPolygons,
dyna->polyListMax);
PRINTF(T("DynaPolyInfo_expandSRT():polygon over %dが%dを越えるとダメ\n",
"DynaPolyInfo_expandSRT():polygon over do not use if %d exceeds %d\n"),
*polyStartIndex + pbgdata->numPolygons, dyna->polyListMax);
}
if (!(dyna->vtxListMax >= *vtxStartIndex + pbgdata->numVertices)) {
PRINTF(VT_FGCOL(RED));
// "do not use if %d exceeds %d"
PRINTF("DynaPolyInfo_expandSRT():vertex over %dが%dを越えるとダメ\n", *vtxStartIndex + pbgdata->numVertices,
dyna->vtxListMax);
PRINTF(T("DynaPolyInfo_expandSRT():vertex over %dが%dを越えるとダメ\n",
"DynaPolyInfo_expandSRT():vertex over do not use if %d exceeds %d\n"),
*vtxStartIndex + pbgdata->numVertices, dyna->vtxListMax);
}
ASSERT(dyna->polyListMax >= *polyStartIndex + pbgdata->numPolygons,
@ -3060,7 +3062,7 @@ void DynaPoly_UpdateContext(PlayState* play, DynaCollisionContext* dyna) {
if (dyna->bgActorFlags[i] & BGACTOR_1) {
// Initialize BgActor
PRINTF(VT_FGCOL(GREEN));
PRINTF("DynaPolyInfo_setup():削除 index=%d\n", i);
PRINTF(T("DynaPolyInfo_setup():削除 index=%d\n", "DynaPolyInfo_setup(): Delete index=%d\n"), i);
PRINTF(VT_RST);
dyna->bgActorFlags[i] = 0;
@ -3070,7 +3072,7 @@ void DynaPoly_UpdateContext(PlayState* play, DynaCollisionContext* dyna) {
if (dyna->bgActors[i].actor != NULL && dyna->bgActors[i].actor->update == NULL) {
// Delete BgActor
PRINTF(VT_FGCOL(GREEN));
PRINTF("DynaPolyInfo_setup():削除 index=%d\n", i);
PRINTF(T("DynaPolyInfo_setup():削除 index=%d\n", "DynaPolyInfo_setup(): Delete index=%d\n"), i);
PRINTF(VT_RST);
actor = DynaPoly_GetActor(&play->colCtx, i);
if (actor == NULL) {

View file

@ -77,8 +77,7 @@ void Object_InitContext(PlayState* play, ObjectContext* objectCtx) {
}
PRINTF(VT_FGCOL(GREEN));
// "Object exchange bank data %8.3fKB"
PRINTF("オブジェクト入れ替えバンク情報 %8.3fKB\n", spaceSize / 1024.0f);
PRINTF(T("オブジェクト入れ替えバンク情報 %8.3fKB\n", "Object exchange bank data %8.3fKB\n"), spaceSize / 1024.0f);
PRINTF(VT_RST);
objectCtx->spaceStart = objectCtx->slots[0].segment =
@ -165,8 +164,8 @@ void* func_800982FC(ObjectContext* objectCtx, s32 slot, s16 objectId) {
ASSERT(nextPtr < objectCtx->spaceEnd, "nextptr < this->endSegment", "../z_scene.c", 381);
// "Object exchange free size=%08x"
PRINTF("オブジェクト入れ替え空きサイズ=%08x\n", (uintptr_t)objectCtx->spaceEnd - (uintptr_t)nextPtr);
PRINTF(T("オブジェクト入れ替え空きサイズ=%08x\n", "Object exchange free size=%08x\n"),
(uintptr_t)objectCtx->spaceEnd - (uintptr_t)nextPtr);
return nextPtr;
}
@ -186,7 +185,7 @@ s32 Scene_ExecuteCommands(PlayState* play, SceneCmd* sceneCmd) {
gSceneCmdHandlers[cmdCode](play, sceneCmd);
} else {
PRINTF(VT_FGCOL(RED));
PRINTF("code の値が異常です\n"); // "code variable is abnormal"
PRINTF(T("code の値が異常です\n", "code variable is abnormal\n"));
PRINTF(VT_RST);
}
@ -433,8 +432,7 @@ BAD_RETURN(s32) Scene_CommandAlternateHeaderList(PlayState* play, SceneCmd* cmd)
Scene_ExecuteCommands(play, SEGMENTED_TO_VIRTUAL(altHeader));
(cmd + 1)->base.code = SCENE_CMD_ID_END;
} else {
// "Coughh! There is no specified dataaaaa!"
PRINTF("\nげぼはっ! 指定されたデータがないでええっす!");
PRINTF(T("\nげぼはっ! 指定されたデータがないでええっす!", "\nCoughh! There is no specified dataaaaa!"));
if (gSaveContext.sceneLayer == SCENE_LAYER_ADULT_NIGHT) {
// Due to the condition above, this is equivalent to accessing altHeaders[SCENE_LAYER_ADULT_DAY - 1]
@ -442,8 +440,7 @@ BAD_RETURN(s32) Scene_CommandAlternateHeaderList(PlayState* play, SceneCmd* cmd)
cmd->altHeaders
.data))[(gSaveContext.sceneLayer - SCENE_LAYER_ADULT_NIGHT) + SCENE_LAYER_ADULT_DAY - 1];
// "Using adult day data there!"
PRINTF("\nそこで、大人の昼データを使用するでええっす!!");
PRINTF(T("\nそこで、大人の昼データを使用するでええっす!!", "\nUsing adult day data there!!"));
if (altHeader != NULL) {
Scene_ExecuteCommands(play, SEGMENTED_TO_VIRTUAL(altHeader));

View file

@ -365,9 +365,9 @@ void Sram_OpenSave(SramContext* sramCtx) {
u16 j;
u8* ptr;
PRINTF("個人File作成\n"); // "Create personal file"
PRINTF(T("個人File作成\n", "Create personal file\n"));
i = gSramSlotOffsets[gSaveContext.fileNum];
PRINTF("ぽいんと=%x(%d)\n", i, gSaveContext.fileNum); // "Point="
PRINTF(T("ぽいんと=%x(%d)\n", "Point=%x(%d)\n"), i, gSaveContext.fileNum);
MemCpy(&gSaveContext, sramCtx->readBuff + i, sizeof(Save));
@ -605,8 +605,8 @@ void Sram_VerifyAndLoadAllSaves(FileSelectState* fileSelect, SramContext* sramCt
newChecksum += *ptr++;
}
// "SAVE checksum calculation"
PRINTF("\nSAVEチェックサム計算 j=%x mmm=%x ", newChecksum, oldChecksum);
PRINTF(T("\nSAVEチェックサム計算 j=%x mmm=%x ", "\nSAVE checksum calculation j=%x mmm=%x "),
newChecksum, oldChecksum);
if (newChecksum != oldChecksum) {
// checksum didnt match, try backup save
@ -622,8 +622,9 @@ void Sram_VerifyAndLoadAllSaves(FileSelectState* fileSelect, SramContext* sramCt
for (i = newChecksum = j = 0; i < CHECKSUM_SIZE; i++, offset += 2) {
newChecksum += *ptr++;
}
// "(B) SAVE checksum calculation"
PRINTF("\n(B)SAVEチェックサム計算 j=%x mmm=%x ", newChecksum, oldChecksum);
PRINTF(T("\n(B)SAVEチェックサム計算 j=%x mmm=%x ",
"\n(B) SAVE checksum calculation j=%x mmm=%x "),
newChecksum, oldChecksum);
if (newChecksum != oldChecksum) {
// backup save didnt work, make new save
@ -681,16 +682,17 @@ void Sram_VerifyAndLoadAllSaves(FileSelectState* fileSelect, SramContext* sramCt
gSaveContext.save.info.playerData.newf[1], gSaveContext.save.info.playerData.newf[2],
gSaveContext.save.info.playerData.newf[3], gSaveContext.save.info.playerData.newf[4],
gSaveContext.save.info.playerData.newf[5]);
PRINTF("\nぽいんと=%x(%d+3) check_sum=%x(%x)\n", i, slotNum, gSaveContext.save.info.checksum,
newChecksum);
PRINTF(T("\nぽいんと=%x(%d+3) check_sum=%x(%x)\n", "\npoints=%x(%d+3) check_sum=%x(%x)\n"), i,
slotNum, gSaveContext.save.info.checksum, newChecksum);
}
i = gSramSlotOffsets[slotNum];
SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000) + i, &gSaveContext, SLOT_SIZE, OS_WRITE);
PRINTF("ぽいんと=%x(%d) check_sum=%x(%x)\n", i, slotNum, gSaveContext.save.info.checksum, newChecksum);
PRINTF(T("ぽいんと=%x(%d) check_sum=%x(%x)\n", "point=%x(%d) check_sum=%x(%x)\n"), i, slotNum,
gSaveContext.save.info.checksum, newChecksum);
} else {
PRINTF("\nSAVEデータ \n"); // "SAVE data OK! ! ! !"
PRINTF(T("\nSAVEデータ \n", "\nSAVE data OK!!!!\n"));
}
}
@ -799,7 +801,7 @@ void Sram_InitSave(FileSelectState* fileSelect, SramContext* sramCtx) {
}
gSaveContext.save.info.checksum = checksum;
PRINTF("\nチェックサム=%x\n", gSaveContext.save.info.checksum); // "Checksum = %x"
PRINTF(T("\nチェックサム=%x\n", "\nChecksum = %x\n"), gSaveContext.save.info.checksum);
offset = gSramSlotOffsets[gSaveContext.fileNum];
PRINTF("I=%x no=%d\n", offset, gSaveContext.fileNum);
@ -811,7 +813,7 @@ void Sram_InitSave(FileSelectState* fileSelect, SramContext* sramCtx) {
SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, SRAM_SIZE, OS_WRITE);
PRINTF("SAVE終了\n"); // "SAVE end"
PRINTF(T("SAVE終了\n", "SAVE end\n"));
PRINTF("z_common_data.file_no = %d\n", gSaveContext.fileNum);
PRINTF("SAVECT=%x, NAME=%x, LIFE=%x, ITEM=%x, SAVE_64DD=%x\n", DEATHS, NAME, HEALTH_CAP, QUEST, N64DD);
@ -896,7 +898,7 @@ void Sram_CopySave(FileSelectState* fileSelect, SramContext* sramCtx) {
PRINTF("f_64dd[%d]=%d\n", gSaveContext.fileNum, fileSelect->n64ddFlags[gSaveContext.fileNum]);
PRINTF("heart_status[%d]=%d\n", gSaveContext.fileNum, fileSelect->defense[gSaveContext.fileNum]);
PRINTF("COPY終了\n"); // "Copy end"
PRINTF(T("COPY終了\n", "Copy end\n"));
}
/**
@ -914,7 +916,7 @@ void Sram_InitSram(GameState* gameState, SramContext* sramCtx) {
for (i = 0; i < ARRAY_COUNTU(sZeldaMagic) - 3; i++) {
if (sZeldaMagic[i + SRAM_HEADER_MAGIC] != sramCtx->readBuff[i + SRAM_HEADER_MAGIC]) {
PRINTF("SRAM破壊!!!!!!\n"); // "SRAM destruction! ! ! ! ! !"
PRINTF(T("SRAM破壊!!!!!!\n", "SRAM destruction!!!!!!\n"));
#if OOT_PAL
gSaveContext.language = sramCtx->readBuff[SRAM_HEADER_LANGUAGE];
#endif
@ -947,12 +949,12 @@ void Sram_InitSram(GameState* gameState, SramContext* sramCtx) {
sramCtx->readBuff[i] = i;
}
SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, SRAM_SIZE, OS_WRITE);
PRINTF("SRAM破壊!!!!!!\n"); // "SRAM destruction! ! ! ! ! !"
PRINTF(T("SRAM破壊!!!!!!\n", "SRAM destruction!!!!!!\n"));
}
#endif
// "GOOD! GOOD! Size = %d + %d = %d"
PRINTF(" サイズ=%d + %d %d\n", sizeof(SaveInfo), 4, sizeof(SaveInfo) + 4);
PRINTF(T(" サイズ=%d + %d %d\n", "GOOD! GOOD! Size = %d + %d = %d\n"), sizeof(SaveInfo), 4,
sizeof(SaveInfo) + 4);
PRINTF(VT_FGCOL(BLUE));
PRINTF("Na_SetSoundOutputMode = %d\n", gSaveContext.audioSetting);
PRINTF("Na_SetSoundOutputMode = %d\n", gSaveContext.audioSetting);