mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-01-23 21:45:00 +03:00
fix venom andross background
This commit is contained in:
parent
390a3c9975
commit
59e0fda2d1
@ -538,9 +538,21 @@ void Background_DrawBackdrop(void) {
|
|||||||
|
|
||||||
case LEVEL_VENOM_ANDROSS: // WIP
|
case LEVEL_VENOM_ANDROSS: // WIP
|
||||||
if (gDrawBackdrop != 6) {
|
if (gDrawBackdrop != 6) {
|
||||||
// @port: Tag the transform.
|
sp134 = (gPlayer[gPlayerNum].camPitch * -6000.0f) - (gPlayer[gPlayerNum].cam.eye.y * 0.4f);
|
||||||
FrameInterpolation_RecordOpenChild("Backdrop", 0);
|
sp13C =
|
||||||
FrameInterpolation_RecordMarker(__FILE__, __LINE__);
|
Math_ModF(Math_RadToDeg(gPlayer[gPlayerNum].camYaw) * (-7280.0f / 360.0f) * 5.0f, 7280.0f);
|
||||||
|
|
||||||
|
static f32 bgPrevPosX = 0.0f;
|
||||||
|
u8 skipInterpolation = (fabsf(sp13C - bgPrevPosX) > 7280.0f / 2.0f);
|
||||||
|
|
||||||
|
if (skipInterpolation) {
|
||||||
|
// @port Skip interpolation
|
||||||
|
FrameInterpolation_ShouldInterpolateFrame(false);
|
||||||
|
} else {
|
||||||
|
// @port: Tag the transform.
|
||||||
|
FrameInterpolation_RecordOpenChild("Backdrop", 0);
|
||||||
|
FrameInterpolation_RecordMarker(__FILE__, __LINE__);
|
||||||
|
}
|
||||||
|
|
||||||
if ((gDrawBackdrop == 2) || (gDrawBackdrop == 7)) {
|
if ((gDrawBackdrop == 2) || (gDrawBackdrop == 7)) {
|
||||||
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY);
|
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY);
|
||||||
@ -563,10 +575,6 @@ void Background_DrawBackdrop(void) {
|
|||||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, (s32) gAndrossUnkBrightness,
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, (s32) gAndrossUnkBrightness,
|
||||||
(s32) gAndrossUnkBrightness, (s32) gAndrossUnkAlpha);
|
(s32) gAndrossUnkBrightness, (s32) gAndrossUnkAlpha);
|
||||||
|
|
||||||
sp134 = (gPlayer[gPlayerNum].camPitch * -6000.0f) - (gPlayer[gPlayerNum].cam.eye.y * 0.4f);
|
|
||||||
sp13C = Math_ModF(Math_RadToDeg(gPlayer[gPlayerNum].camYaw) * (-7280.0f / 360.0f) * 5.0f,
|
|
||||||
7280.0f);
|
|
||||||
|
|
||||||
// Leftmost DL (-2x translation)
|
// Leftmost DL (-2x translation)
|
||||||
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY);
|
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY);
|
||||||
Matrix_Translate(gGfxMatrix, sp13C - 2 * 7280.0f, -2000.0f + sp134, -6000.0f, MTXF_APPLY);
|
Matrix_Translate(gGfxMatrix, sp13C - 2 * 7280.0f, -2000.0f + sp134, -6000.0f, MTXF_APPLY);
|
||||||
@ -618,8 +626,14 @@ void Background_DrawBackdrop(void) {
|
|||||||
Matrix_Pop(&gGfxMatrix);
|
Matrix_Pop(&gGfxMatrix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// @port Pop the transform id.
|
if (skipInterpolation) {
|
||||||
FrameInterpolation_RecordCloseChild();
|
// @port Skip interpolation
|
||||||
|
FrameInterpolation_ShouldInterpolateFrame(false);
|
||||||
|
} else {
|
||||||
|
// @port Pop the transform id.
|
||||||
|
FrameInterpolation_RecordCloseChild();
|
||||||
|
}
|
||||||
|
bgPrevPosX = sp13C;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user