diff --git a/src/actors/item_box/render.inc.c b/src/actors/item_box/render.inc.c index d4a96a0e3..0d02c3979 100644 --- a/src/actors/item_box/render.inc.c +++ b/src/actors/item_box/render.inc.c @@ -1,6 +1,7 @@ #include #include #include +#include "port/interpolation/FrameInterpolation.h" /** * @brief Renders the item box actor. @@ -26,6 +27,9 @@ void render_actor_item_box(Camera* camera, struct ItemBox* item_box) { f32 temp_f2_2; f32 someMultiplier; + FrameInterpolation_RecordMatrixPush(someMatrix1); + FrameInterpolation_RecordMatrixPush(someMatrix2); + temp_f0 = is_within_render_distance(camera->pos, item_box->pos, camera->rot[1], 0.0f, gCameraZoom[camera - camera1], 4000000.0f); if (CVarGetInteger("gNoCulling", 0) == 1) { @@ -179,4 +183,7 @@ void render_actor_item_box(Camera* camera, struct ItemBox* item_box) { } gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); } + + FrameInterpolation_RecordMatrixPop(someMatrix1); + FrameInterpolation_RecordMatrixPop(someMatrix2); } diff --git a/src/engine/Matrix.cpp b/src/engine/Matrix.cpp index e46804ad5..0104de47c 100644 --- a/src/engine/Matrix.cpp +++ b/src/engine/Matrix.cpp @@ -14,7 +14,6 @@ void AddMatrix(std::vector& stack, Mat4 mtx, s32 flags) { stack.emplace_back(); // Convert to a fixed-point matrix - FrameInterpolation_RecordMatrixMtxFToMtx((MtxF*)mtx, &stack.back()); guMtxF2L(mtx, &stack.back()); // Load the matrix diff --git a/src/port/interpolation/FrameInterpolation.h b/src/port/interpolation/FrameInterpolation.h index 93f4dd0a9..87012f66b 100644 --- a/src/port/interpolation/FrameInterpolation.h +++ b/src/port/interpolation/FrameInterpolation.h @@ -35,9 +35,9 @@ void FrameInterpolation_RecordActorPosRotMatrix(void); void FrameInterpolation_RecordMatrixPosRotXYZ(Mat4 out, Vec3f pos, Vec3s orientation); -void FrameInterpolation_RecordMatrixPush(Mat4* mtx); +void FrameInterpolation_RecordMatrixPush(Mat4* matrix); -void FrameInterpolation_RecordMatrixPop(Mat4* mtx); +void FrameInterpolation_RecordMatrixPop(Mat4* matrix); //void FrameInterpolation_RecordMatrixMult(Matrix* matrix, MtxF* mf, u8 mode);