intro passageway interpolation

This commit is contained in:
Sonic Dreamcaster 2024-11-20 20:17:51 -03:00
parent 32b97549fa
commit 009d8eef7c

View File

@ -2844,6 +2844,8 @@ bool Title_Team_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f*
return false;
}
f32 prevPassageWayOffset = 0.0f;
void Title_Passage_Draw(void) {
f32 sZoffsetScale;
@ -2858,10 +2860,21 @@ void Title_Passage_Draw(void) {
sPassageWayZoffset += 70.0f;
sPassageWayZoffset = Math_ModF(sPassageWayZoffset, 4101.6f);
s8 skipInterpolation = (fabsf(sPassageWayZoffset - prevPassageWayOffset) > 4101.6f / 2.0f);
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, 255, 995, 1000);
Matrix_Push(&gGfxMatrix);
if (skipInterpolation) {
// @port Skip interpolation
FrameInterpolation_ShouldInterpolateFrame(false);
} else {
// @port: Tag the transform.
FrameInterpolation_RecordOpenChild("Title_Passage_Draw", 0);
}
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, (3079.2002f * sZoffsetScale) - sPassageWayZoffset, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, 0.6f, 0.6f, 0.6f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
@ -2879,6 +2892,16 @@ void Title_Passage_Draw(void) {
gSPDisplayList(gMasterDisp++, aTitleCsPassageWayDL);
Matrix_Pop(&gGfxMatrix);
if (skipInterpolation) {
// @port Skip interpolation
FrameInterpolation_ShouldInterpolateFrame(true);
} else {
// @port Pop the transform id.
FrameInterpolation_RecordCloseChild();
}
prevPassageWayOffset = sPassageWayZoffset;
}
void Title_StarfoxLogo_Draw(void) {