diff --git a/src/overlays/ovl_ending/fox_end1.c b/src/overlays/ovl_ending/fox_end1.c index cc2c40be..95176060 100644 --- a/src/overlays/ovl_ending/fox_end1.c +++ b/src/overlays/ovl_ending/fox_end1.c @@ -420,7 +420,7 @@ void Ending_801886F4(void) { return; } - RCP_SetupDL(&gMasterDisp, SETUPDL_78); + RCP_SetupDL(&gMasterDisp, SETUPDL_78_POINT); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); switch ((D_ending_80196F90 % 8) / 2) { @@ -1139,8 +1139,10 @@ void Ending_Draw(void) { if ((D_ending_80192E70 >= 0) && (D_ending_80192E70 < 10000)) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - Graphics_DisplaySmallText(10, 220, 1.0f, 1.0f, "TIMER"); - Graphics_DisplaySmallNumber(80, 220, D_ending_80192E70); + Graphics_DisplaySmallText(10, 210, 1.0f, 1.0f, "TIMER"); + Graphics_DisplaySmallNumber(80, 210, D_ending_80192E70); + Graphics_DisplaySmallText(10, 220, 1.0f, 1.0f, "CSFRM"); + Graphics_DisplaySmallNumber(80, 220, gCsFrameCount); } #endif @@ -1545,9 +1547,13 @@ void Ending_8018B860(void) { Play_ClearObjectData(); Ending_8018B3E8(&gActors[0], 0); - Ending_8018B52C(&gActors[1], 0); - Ending_8018B52C(&gActors[2], 1); - Ending_8018B52C(&gActors[3], 2); + + // Buildings + Ending_8018B52C(&gActors[1], 0); // left + Ending_8018B52C(&gActors[2], 1); // right near + Ending_8018B52C(&gActors[3], 2); // right far + + // Cornerian fighters Ending_8018B6D8(&gActors[4], 0); Ending_8018B6D8(&gActors[5], 1); Ending_8018B6D8(&gActors[6], 2); @@ -1774,6 +1780,7 @@ void Ending_8018C21C(void) { f32 spE4; s32 i; + // Clouds if (gCsFrameCount < 780) { Matrix_Push(&gGfxMatrix); RCP_SetupDL(&gMasterDisp, SETUPDL_17); @@ -1793,6 +1800,13 @@ void Ending_8018C21C(void) { Matrix_Push(&gGfxMatrix); + // Actors + // 0 Great Fox + // 1 Building on the left + // 2 building on the right near + // 3 building on the right far + // 4 5 6 7 8 9 cornerian ships + for (i = ARRAY_COUNT(gActors) - 1; i >= 0; i--) { if (gActors[i].obj.status != OBJ_FREE) { Matrix_Push(&gGfxMatrix); @@ -1876,7 +1890,11 @@ void Ending_8018C21C(void) { gSPDisplayList(gMasterDisp++, D_END_700F320); break; - case 3: + case 3: // Cornerian ships + + // @port: Tag the transform. + FrameInterpolation_RecordOpenChild(&gActors, i); + RCP_SetupDL(&gMasterDisp, SETUPDL_23); Matrix_Translate(gGfxMatrix, gActors[i].obj.pos.x, gActors[i].obj.pos.y, gActors[i].obj.pos.z, MTXF_APPLY); @@ -1935,6 +1953,9 @@ void Ending_8018C21C(void) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_END_700C620); Matrix_Pop(&gGfxMatrix); + + // @port Pop the transform id. + FrameInterpolation_RecordCloseChild(); break; } Matrix_Pop(&gGfxMatrix); diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index e4006d21..bf152e06 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -9,6 +9,8 @@ Vec3f D_ending_801985E0; Vec3f D_ending_801985F0; Vec3f D_ending_80198600[300]; +bool sTagged = false; + #include "fox_end2_data.c" void Ending_8018CE20(u32 arg0) { @@ -167,7 +169,7 @@ void Ending_8018D814(u32 arg0, AssetInfo* asset) { alpha = (asset->unk_0C + asset->unk_10 - arg0) * 255 / asset->fogFar; } - RCP_SetupDL(&gMasterDisp, asset->unk_08); + RCP_SetupDL(&gMasterDisp, SETUPDL_76_POINT); gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, alpha); @@ -187,7 +189,7 @@ void Ending_8018DA0C(u32 arg0, AssetInfo* asset) { alpha = (arg0 - asset->unk_0C) * 255 / asset->fogNear; } - RCP_SetupDL(&gMasterDisp, asset->unk_08); + RCP_SetupDL(&gMasterDisp, SETUPDL_76_POINT); gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, alpha); Graphics_DisplaySmallText((s16) asset->unk_18.x, (s16) asset->unk_18.y, asset->unk_30.x, asset->unk_30.y, @@ -421,6 +423,9 @@ void Ending_8018E7B8(u32 arg0, AssetInfo* asset) { void Ending_8018EDB8(u32 arg0, AssetInfo* asset) { f32 temp; + // @port: Tag the transform. + FrameInterpolation_RecordOpenChild("Running Scene Floor", 0); + gStarCount = 0; RCP_SetupDL(&gMasterDisp, asset->unk_08); @@ -456,6 +461,7 @@ void Ending_8018EDB8(u32 arg0, AssetInfo* asset) { gSPDisplayList(gMasterDisp++, D_END_700E9E0); } +// Draw Great Fox void Ending_8018F2A8(u32 arg0, AssetInfo* asset) { f32 temp; @@ -493,7 +499,8 @@ void Ending_8018F2A8(u32 arg0, AssetInfo* asset) { void Ending_8018F64C(u32 arg0, AssetInfo* asset) { f32 temp; - if (gLeveLClearStatus[LEVEL_ZONESS] == 0) { + // @port: Avoid drawing Katt after 1800 ending frames to avoid interpolation issues + if ((gLeveLClearStatus[LEVEL_ZONESS] == 0) || (D_ending_80192E70 >= 1800)) { return; } @@ -560,7 +567,8 @@ void Ending_8018F64C(u32 arg0, AssetInfo* asset) { void Ending_8018FC60(u32 arg0, AssetInfo* asset) { f32 temp; - if (gLeveLClearStatus[LEVEL_KATINA] == 0) { + // @port: Avoid drawing Bill after 1800 ending frames to avoid interpolation issues + if ((gLeveLClearStatus[LEVEL_KATINA] == 0) || (D_ending_80192E70 >= 1800)) { return; } @@ -627,6 +635,9 @@ void Ending_8018FC60(u32 arg0, AssetInfo* asset) { void Ending_80190274(u32 arg0, AssetInfo* asset) { f32 temp; + // @port: Tag the transform. + FrameInterpolation_RecordOpenChild("Corneria_Planet", 0); + RCP_SetupDL(&gMasterDisp, asset->unk_08); gSPFogPosition(gMasterDisp++, asset->fogNear, asset->fogFar); @@ -667,7 +678,11 @@ void Ending_80190648(s32 arg0, AssetInfo* asset) { Matrix_Scale(gGfxMatrix, asset->unk_30.x, asset->unk_30.y, asset->unk_30.z, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_END_7002120); + + // @port: Hide Venom under 1700 frames + if (D_ending_80192E70 < 1700) { + gSPDisplayList(gMasterDisp++, D_END_7002120); + } } void Ending_80190778(u32 arg0, AssetInfo* asset) { @@ -859,9 +874,11 @@ void Ending_80191294(u32 arg0, AssetInfo* asset) { Display_ArwingWings(&D_ending_80198590); } +// Stubbed void Ending_80191700(u32 arg0, AssetInfo* asset) { } +// Draws obj displaylist void Ending_80191710(u32 arg0, AssetInfo* asset) { f32 temp; @@ -917,10 +934,12 @@ void Ending_80191710(u32 arg0, AssetInfo* asset) { gSPDisplayList(gMasterDisp++, asset->unk_00); } +// Function pointer execution void Ending_80191C58(u32 arg0, AssetInfo* asset) { ((void (*)(u32, AssetInfo*)) asset->unk_04)(arg0, asset); } +// Draws skeleton void Ending_80191C7C(u32 arg0, AssetInfo* asset) { f32 temp; @@ -967,6 +986,9 @@ void Ending_80192164(u32 arg0) { if ((D_ending_801934B4[i].unk_00 == NULL) && (D_ending_801934B4[i].unk_04 == NULL)) { Ending_80191700(arg0, &D_ending_801934B4[i]); } else if ((D_ending_801934B4[i].unk_00 != NULL) && (D_ending_801934B4[i].unk_04 == NULL)) { + // @port: Tag the transform. + FrameInterpolation_RecordOpenChild(&D_ending_801934B4[i], arg0); + sTagged = true; Ending_80191710(arg0, &D_ending_801934B4[i]); } else if ((D_ending_801934B4[i].unk_00 == NULL) && (D_ending_801934B4[i].unk_04 != NULL)) { Ending_80191C58(arg0, &D_ending_801934B4[i]); @@ -974,6 +996,11 @@ void Ending_80192164(u32 arg0) { Ending_80191C7C(arg0, &D_ending_801934B4[i]); } Matrix_Pop(&gGfxMatrix); + if (sTagged) { + // @port Pop the transform id. + FrameInterpolation_RecordCloseChild(); + sTagged = false; + } } } }