diff options
| author | coco875 <pereira.jannin@gmail.com> | 2025-05-25 19:51:35 +0200 |
|---|---|---|
| committer | coco875 <pereira.jannin@gmail.com> | 2025-05-25 19:51:35 +0200 |
| commit | 5313309a0003c47f34eec2e840827a039952a712 (patch) | |
| tree | f9b11c4260257a3cf5058f48f0c4f5d3e6fd5b40 /src/engine/Matrix.cpp | |
| parent | a67fbb6442d76016397c67f2cb7831687cdda91a (diff) | |
| parent | 2a0c0939c780babc45c8c22dfd6f94563485bae5 (diff) | |
Merge branch 'transformfuncsforint' into particle-boat-and-train-
Diffstat (limited to 'src/engine/Matrix.cpp')
| -rw-r--r-- | src/engine/Matrix.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/engine/Matrix.cpp b/src/engine/Matrix.cpp index 1f2301258..e01df8954 100644 --- a/src/engine/Matrix.cpp +++ b/src/engine/Matrix.cpp @@ -1,6 +1,7 @@ #include <libultraship.h> #include <libultra/gbi.h> #include "engine/World.h" +#include "src/port/interpolation/FrameInterpolation.h" extern "C" { #include "common_structs.h" @@ -9,13 +10,11 @@ extern "C" { } void AddMatrix(std::vector<Mtx>& stack, Mat4 mtx, s32 flags) { - // Reserve space if needed to avoid reallocation overhead - stack.reserve(1000); - // Push a new matrix to the stack stack.emplace_back(); // Convert to a fixed-point matrix + FrameInterpolation_RecordMatrixMtxFToMtx((MtxF*)mtx, &stack.back()); guMtxF2L(mtx, &stack.back()); // Load the matrix @@ -137,6 +136,14 @@ extern "C" { AddMatrix(gWorldInstance.Mtx.Hud, mtx, flags); } + void AddPerspMatrix(Mat4 mtx, s32 flags) { + AddMatrix(gWorldInstance.Mtx.Persp, mtx, flags); + } + + void AddLookAtMatrix(Mat4 mtx, s32 flags) { + AddMatrix(gWorldInstance.Mtx.LookAt, mtx, flags); + } + void AddObjectMatrix(Mat4 mtx, s32 flags) { AddMatrix(gWorldInstance.Mtx.Objects, mtx, flags); } |
