mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-15 04:14:34 +00:00
Replace most osSyncPrintf calls with PRINTF macro (#1598)
* Replace most osSyncPrintf calls with PRINTF macro * DEBUG -> OOT_DEBUG
This commit is contained in:
parent
6eb3bf401c
commit
324db1d578
297 changed files with 2642 additions and 2679 deletions
|
@ -408,24 +408,24 @@ void func_800B44E0(DebugCam* debugCam, Camera* cam) {
|
|||
void DebugCamera_PrintPoints(const char* name, s16 count, CutsceneCameraPoint* points) {
|
||||
s32 i;
|
||||
|
||||
osSyncPrintf("@@@static SplinedatZ %s[] = {\n", name);
|
||||
PRINTF("@@@static SplinedatZ %s[] = {\n", name);
|
||||
for (i = 0; i < count; i++) {
|
||||
osSyncPrintf("@@@ /* key frame %2d */ {\n", i);
|
||||
osSyncPrintf("@@@ /* code */ %d,\n", points[i].continueFlag);
|
||||
osSyncPrintf("@@@ /* z */ %d,\n", points[i].cameraRoll);
|
||||
osSyncPrintf("@@@ /* T */ %d,\n", points[i].nextPointFrame);
|
||||
osSyncPrintf("@@@ /* zoom */ %f,\n", points[i].viewAngle);
|
||||
osSyncPrintf("@@@ /* pos */ { %d, %d, %d }\n", points[i].pos.x, points[i].pos.y, points[i].pos.z);
|
||||
osSyncPrintf("@@@ },\n");
|
||||
PRINTF("@@@ /* key frame %2d */ {\n", i);
|
||||
PRINTF("@@@ /* code */ %d,\n", points[i].continueFlag);
|
||||
PRINTF("@@@ /* z */ %d,\n", points[i].cameraRoll);
|
||||
PRINTF("@@@ /* T */ %d,\n", points[i].nextPointFrame);
|
||||
PRINTF("@@@ /* zoom */ %f,\n", points[i].viewAngle);
|
||||
PRINTF("@@@ /* pos */ { %d, %d, %d }\n", points[i].pos.x, points[i].pos.y, points[i].pos.z);
|
||||
PRINTF("@@@ },\n");
|
||||
}
|
||||
osSyncPrintf("@@@};\n@@@\n");
|
||||
PRINTF("@@@};\n@@@\n");
|
||||
}
|
||||
|
||||
void DebugCamera_PrintF32Bytes(f32 value) {
|
||||
f32 b = value;
|
||||
char* a = (char*)&b;
|
||||
|
||||
osSyncPrintf("\n@@@%d,%d,%d,%d,", a[0], a[1], a[2], a[3]);
|
||||
PRINTF("\n@@@%d,%d,%d,%d,", a[0], a[1], a[2], a[3]);
|
||||
}
|
||||
|
||||
void DebugCamera_PrintU16Bytes(u16 value) {
|
||||
|
@ -433,7 +433,7 @@ void DebugCamera_PrintU16Bytes(u16 value) {
|
|||
u16 b = value;
|
||||
char* a = (char*)&b;
|
||||
|
||||
osSyncPrintf("\n@@@%d,%d,", a[0], a[1]);
|
||||
PRINTF("\n@@@%d,%d,", a[0], a[1]);
|
||||
}
|
||||
|
||||
void DebugCamera_PrintS16Bytes(s16 value) {
|
||||
|
@ -441,7 +441,7 @@ void DebugCamera_PrintS16Bytes(s16 value) {
|
|||
s16 b = value;
|
||||
char* a = (char*)&b;
|
||||
|
||||
osSyncPrintf("\n@@@%d,%d,", a[0], a[1]);
|
||||
PRINTF("\n@@@%d,%d,", a[0], a[1]);
|
||||
}
|
||||
|
||||
void DebugCamera_PrintCutBytes(DebugCamCut* cut) {
|
||||
|
@ -450,55 +450,55 @@ void DebugCamera_PrintCutBytes(DebugCamCut* cut) {
|
|||
s32 i;
|
||||
|
||||
points = cut->lookAt;
|
||||
osSyncPrintf("\n@@@ 0,0,0,2,\t/* Look Camera\t*/");
|
||||
osSyncPrintf("\n@@@ 0,1,\t/* dousa\t*/");
|
||||
PRINTF("\n@@@ 0,0,0,2,\t/* Look Camera\t*/");
|
||||
PRINTF("\n@@@ 0,1,\t/* dousa\t*/");
|
||||
|
||||
osSyncPrintf("\n@@@ 0,0,\t/* Start Flame\t*/");
|
||||
PRINTF("\n@@@ 0,0,\t/* Start Flame\t*/");
|
||||
DebugCamera_PrintU16Bytes(cut->nFrames);
|
||||
osSyncPrintf("\t/* End Flame\t*/");
|
||||
PRINTF("\t/* End Flame\t*/");
|
||||
|
||||
osSyncPrintf("\n@@@0,0,\t/* Dammy\t*/\n@@@ ");
|
||||
PRINTF("\n@@@0,0,\t/* Dammy\t*/\n@@@ ");
|
||||
for (i = 0; i < cut->nPoints; i++) {
|
||||
point = points + i;
|
||||
osSyncPrintf("\n@@@ %d, /* code */", point->continueFlag);
|
||||
osSyncPrintf("\n@@@ %d, /* z */", point->cameraRoll);
|
||||
PRINTF("\n@@@ %d, /* code */", point->continueFlag);
|
||||
PRINTF("\n@@@ %d, /* z */", point->cameraRoll);
|
||||
DebugCamera_PrintU16Bytes(point->nextPointFrame);
|
||||
osSyncPrintf("\t/* sokudo\t*/");
|
||||
PRINTF("\t/* sokudo\t*/");
|
||||
DebugCamera_PrintF32Bytes(point->viewAngle);
|
||||
osSyncPrintf("\t/* zoom\t*/");
|
||||
PRINTF("\t/* zoom\t*/");
|
||||
DebugCamera_PrintS16Bytes(point->pos.x);
|
||||
osSyncPrintf("\t/* x pos\t*/");
|
||||
PRINTF("\t/* x pos\t*/");
|
||||
DebugCamera_PrintS16Bytes(point->pos.y);
|
||||
osSyncPrintf("\t/* y pos\t*/");
|
||||
PRINTF("\t/* y pos\t*/");
|
||||
DebugCamera_PrintS16Bytes(point->pos.z);
|
||||
osSyncPrintf("\t/* z pos\t*/\n");
|
||||
osSyncPrintf("\n@@@0,0,\t/* Dammy\t*/\n@@@ ");
|
||||
PRINTF("\t/* z pos\t*/\n");
|
||||
PRINTF("\n@@@0,0,\t/* Dammy\t*/\n@@@ ");
|
||||
}
|
||||
|
||||
points = cut->position;
|
||||
osSyncPrintf("\n@@@ 0,0,0,1,\t/* Position Camera */");
|
||||
osSyncPrintf("\n@@@ 0,1,\t/* dousa\t*/");
|
||||
PRINTF("\n@@@ 0,0,0,1,\t/* Position Camera */");
|
||||
PRINTF("\n@@@ 0,1,\t/* dousa\t*/");
|
||||
|
||||
osSyncPrintf("\n@@@ 0,0,\t/* Start Flame\t*/");
|
||||
PRINTF("\n@@@ 0,0,\t/* Start Flame\t*/");
|
||||
DebugCamera_PrintU16Bytes(cut->nFrames);
|
||||
osSyncPrintf("\t/* End Flame\t*/");
|
||||
PRINTF("\t/* End Flame\t*/");
|
||||
|
||||
osSyncPrintf("\n@@@0,0,\t/* Dammy\t*/\n@@@ ");
|
||||
PRINTF("\n@@@0,0,\t/* Dammy\t*/\n@@@ ");
|
||||
for (i = 0; i < cut->nPoints; i++) {
|
||||
point = points + i;
|
||||
osSyncPrintf("\n@@@ %d, /* code */", point->continueFlag);
|
||||
osSyncPrintf("\n@@@ %d, /* z */", point->cameraRoll);
|
||||
PRINTF("\n@@@ %d, /* code */", point->continueFlag);
|
||||
PRINTF("\n@@@ %d, /* z */", point->cameraRoll);
|
||||
DebugCamera_PrintU16Bytes(point->nextPointFrame);
|
||||
osSyncPrintf("\t/* sokudo\t*/");
|
||||
PRINTF("\t/* sokudo\t*/");
|
||||
DebugCamera_PrintF32Bytes(point->viewAngle);
|
||||
osSyncPrintf("\t/* zoom\t*/");
|
||||
PRINTF("\t/* zoom\t*/");
|
||||
DebugCamera_PrintS16Bytes(point->pos.x);
|
||||
osSyncPrintf("\t/* x pos\t*/");
|
||||
PRINTF("\t/* x pos\t*/");
|
||||
DebugCamera_PrintS16Bytes(point->pos.y);
|
||||
osSyncPrintf("\t/* y pos\t*/");
|
||||
PRINTF("\t/* y pos\t*/");
|
||||
DebugCamera_PrintS16Bytes(point->pos.z);
|
||||
osSyncPrintf("\t/* z pos\t*/");
|
||||
osSyncPrintf("\n@@@0,0,\t/* Dammy\t*/\n@@@ ");
|
||||
PRINTF("\t/* z pos\t*/");
|
||||
PRINTF("\n@@@0,0,\t/* Dammy\t*/\n@@@ ");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -992,13 +992,13 @@ void DebugCamera_Update(DebugCam* debugCam, Camera* cam) {
|
|||
CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].cur.button, BTN_L)) {
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
osSyncPrintf("@@@\n@@@\n@@@/* *** spline point data ** start here *** */\n@@@\n");
|
||||
PRINTF("@@@\n@@@\n@@@/* *** spline point data ** start here *** */\n@@@\n");
|
||||
DebugCamera_PrintPoints("Lookat", debugCam->sub.nPoints, debugCam->sub.lookAt);
|
||||
DebugCamera_PrintPoints("Position", debugCam->sub.nPoints, debugCam->sub.position);
|
||||
osSyncPrintf("@@@static short nPoints = %d;\n@@@\n", debugCam->sub.nPoints);
|
||||
osSyncPrintf("@@@static short nFrames = %d;\n@@@\n", debugCam->sub.nFrames);
|
||||
osSyncPrintf("@@@static short Mode = %d;\n@@@\n", debugCam->sub.mode);
|
||||
osSyncPrintf("@@@\n@@@\n@@@/* *** spline point data ** finish! *** */\n@@@\n");
|
||||
PRINTF("@@@static short nPoints = %d;\n@@@\n", debugCam->sub.nPoints);
|
||||
PRINTF("@@@static short nFrames = %d;\n@@@\n", debugCam->sub.nFrames);
|
||||
PRINTF("@@@static short Mode = %d;\n@@@\n", debugCam->sub.mode);
|
||||
PRINTF("@@@\n@@@\n@@@/* *** spline point data ** finish! *** */\n@@@\n");
|
||||
} else if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_CLEFT)) {
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
@ -1541,14 +1541,14 @@ char DebugCamera_InitCut(s32 idx, DebugCamSub* sub) {
|
|||
sDebugCamCuts[idx].lookAt = DebugArena_MallocDebug(i, "../db_camera.c", 2748);
|
||||
if (sDebugCamCuts[idx].lookAt == NULL) {
|
||||
// "Debug camera memory allocation failure"
|
||||
osSyncPrintf("%s: %d: デバッグカメラ メモリ確保失敗!!\n", "../db_camera.c", 2751);
|
||||
PRINTF("%s: %d: デバッグカメラ メモリ確保失敗!!\n", "../db_camera.c", 2751);
|
||||
return '?';
|
||||
}
|
||||
|
||||
sDebugCamCuts[idx].position = DebugArena_MallocDebug(i, "../db_camera.c", 2754);
|
||||
if (sDebugCamCuts[idx].position == NULL) {
|
||||
// "Debug camera memory allocation failure"
|
||||
osSyncPrintf("%s: %d: デバッグカメラ メモリ確保失敗!!\n", "../db_camera.c", 2757);
|
||||
PRINTF("%s: %d: デバッグカメラ メモリ確保失敗!!\n", "../db_camera.c", 2757);
|
||||
DebugArena_FreeDebug(sDebugCamCuts[idx].lookAt, "../db_camera.c", 2758);
|
||||
sDebugCamCuts[idx].lookAt = NULL;
|
||||
return '?';
|
||||
|
@ -1626,7 +1626,7 @@ s32 DebugCamera_LoadCallback(char* c) {
|
|||
sDebugCamCuts[i].lookAt = DebugArena_MallocDebug(ALIGN32(size), "../db_camera.c", 2844);
|
||||
if (sDebugCamCuts[i].lookAt == NULL) {
|
||||
// "Debug camera memory allocation failure"
|
||||
osSyncPrintf("%s: %d: デバッグカメラ メモリ確保失敗!!\n", "../db_camera.c", 2847);
|
||||
PRINTF("%s: %d: デバッグカメラ メモリ確保失敗!!\n", "../db_camera.c", 2847);
|
||||
return false;
|
||||
}
|
||||
if (!Mempak_Read(DEBUG_CAM_CONTROLLER_PORT, *c, sDebugCamCuts[i].lookAt, off, ALIGN32(size))) {
|
||||
|
@ -1637,7 +1637,7 @@ s32 DebugCamera_LoadCallback(char* c) {
|
|||
sDebugCamCuts[i].position = DebugArena_MallocDebug(ALIGN32(size), "../db_camera.c", 2855);
|
||||
if (sDebugCamCuts[i].position == NULL) {
|
||||
// "Debug camera memory allocation failure"
|
||||
osSyncPrintf("%s: %d: デバッグカメラ メモリ確保失敗!!\n", "../db_camera.c", 2858);
|
||||
PRINTF("%s: %d: デバッグカメラ メモリ確保失敗!!\n", "../db_camera.c", 2858);
|
||||
return false;
|
||||
}
|
||||
if (!Mempak_Read(DEBUG_CAM_CONTROLLER_PORT, *c, sDebugCamCuts[i].position, off, ALIGN32(size))) {
|
||||
|
@ -1728,24 +1728,24 @@ void DebugCamera_PrintAllCuts(Camera* cam) {
|
|||
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
osSyncPrintf("@@@\n@@@\n@@@/* ****** spline point data ** start here ***** */\n@@@\n");
|
||||
PRINTF("@@@\n@@@\n@@@/* ****** spline point data ** start here ***** */\n@@@\n");
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sDebugCamCuts) - 1; i++) {
|
||||
DebugCamCut* cut = &sDebugCamCuts[i];
|
||||
if (cut->nPoints != 0) {
|
||||
if (i != 0) {
|
||||
osSyncPrintf("@@@\n@@@/* ** %d ** */\n@@@\n", i);
|
||||
PRINTF("@@@\n@@@/* ** %d ** */\n@@@\n", i);
|
||||
}
|
||||
|
||||
DebugCamera_PrintPoints("Lookat", cut->nPoints, cut->lookAt);
|
||||
DebugCamera_PrintPoints("Position", cut->nPoints, cut->position);
|
||||
osSyncPrintf("@@@static short nPoints = %d;\n@@@\n", cut->nPoints);
|
||||
osSyncPrintf("@@@static short nFrames = %d;\n@@@\n", cut->nFrames);
|
||||
osSyncPrintf("@@@static short Mode = %d;\n@@@\n", cut->mode);
|
||||
PRINTF("@@@static short nPoints = %d;\n@@@\n", cut->nPoints);
|
||||
PRINTF("@@@static short nFrames = %d;\n@@@\n", cut->nFrames);
|
||||
PRINTF("@@@static short Mode = %d;\n@@@\n", cut->mode);
|
||||
}
|
||||
}
|
||||
|
||||
osSyncPrintf("@@@\n@@@\n@@@/* ****** spline point data ** finish! ***** */\n@@@\n");
|
||||
PRINTF("@@@\n@@@\n@@@/* ****** spline point data ** finish! ***** */\n@@@\n");
|
||||
}
|
||||
|
||||
char D_8012D114[] = GFXP_KATAKANA "フレ-ム ";
|
||||
|
@ -2310,9 +2310,9 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
|
|||
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].cur.button, BTN_L) &&
|
||||
CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_CRIGHT)) {
|
||||
for (i = 0; i < ARRAY_COUNT(sDebugCamCuts) - 1; i++) {
|
||||
osSyncPrintf("###%2d:(%c) (%d %d) %d %d %d\n", i, sDebugCamCuts[i].letter,
|
||||
sDebugCamCuts[i].position, sDebugCamCuts[i].lookAt, sDebugCamCuts[i].nFrames,
|
||||
sDebugCamCuts[i].nPoints, sDebugCamCuts[i].mode);
|
||||
PRINTF("###%2d:(%c) (%d %d) %d %d %d\n", i, sDebugCamCuts[i].letter, sDebugCamCuts[i].position,
|
||||
sDebugCamCuts[i].lookAt, sDebugCamCuts[i].nFrames, sDebugCamCuts[i].nPoints,
|
||||
sDebugCamCuts[i].mode);
|
||||
}
|
||||
DebugCamera_PrintAllCuts(cam);
|
||||
} else if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].cur.button, BTN_L) &&
|
||||
|
@ -2321,7 +2321,7 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
|
|||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
for (i = 0; i < ARRAY_COUNT(sDebugCamCuts) - 1; i++) {
|
||||
if (sDebugCamCuts[i].nPoints != 0) {
|
||||
osSyncPrintf("\n@@@ /* CUT [%d]\t*/", i);
|
||||
PRINTF("\n@@@ /* CUT [%d]\t*/", i);
|
||||
DebugCamera_PrintCutBytes(&sDebugCamCuts[i]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue