summaryrefslogtreecommitdiff
path: root/src/engine/Matrix.cpp
diff options
context:
space:
mode:
authorMegaMech <7255464+MegaMech@users.noreply.github.com>2025-05-23 20:56:36 -0600
committerMegaMech <7255464+MegaMech@users.noreply.github.com>2025-05-23 20:56:36 -0600
commit5418951e1fcf9cd3c5bafce0ccf629b8e75467bf (patch)
treea1e3f2a84e2859189f9479d918a56954bb29b9f3 /src/engine/Matrix.cpp
parent96c8c80c9c832db3cd327728d36f5042b769647f (diff)
Interpolate guScale, guRotate, SetTextMatrix
Diffstat (limited to 'src/engine/Matrix.cpp')
-rw-r--r--src/engine/Matrix.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/engine/Matrix.cpp b/src/engine/Matrix.cpp
index e01df8954..2586d1614 100644
--- a/src/engine/Matrix.cpp
+++ b/src/engine/Matrix.cpp
@@ -35,8 +35,8 @@ void AddMatrixFixed(std::vector<Mtx>& stack, s32 flags) {
}
// Used in func_80095BD0
-Mtx* SetTextMatrix(f32 arg1, f32 arg2, f32 arg3, f32 arg4) {
- Mat4 matrix;
+Mtx* SetTextMatrix(Mat4 matrix, f32 x, f32 y, f32 arg3, f32 arg4) {
+ FrameInterpolation_Record_SetTextMatrix((Mat4*)&matrix, x, y, arg3, arg4);
matrix[0][0] = arg3;
matrix[0][1] = 0.0f;
matrix[0][2] = 0.0f;
@@ -49,11 +49,12 @@ Mtx* SetTextMatrix(f32 arg1, f32 arg2, f32 arg3, f32 arg4) {
matrix[2][1] = 0.0f;
matrix[2][2] = 1.0f;
matrix[2][3] = 0.0f;
- matrix[3][0] = arg1;
- matrix[3][1] = arg2;
+ matrix[3][0] = x;
+ matrix[3][1] = y;
matrix[3][2] = 0.0f;
matrix[3][3] = 1.0f;
Mtx* mtx = GetMatrix(gWorldInstance.Mtx.Effects);
+ FrameInterpolation_RecordMatrixMtxFToMtx((MtxF*)mtx, &stack.back());
guMtxF2L(matrix, mtx);
return mtx;
@@ -177,6 +178,10 @@ extern "C" {
return GetMatrix(gWorldInstance.Mtx.Effects);
}
+ Mtx* GetObjectMatrix(void) {
+ return GetMatrix(gWorldInstance.Mtx.Objects);
+ }
+
/**
* Note that the game doesn't seem to clear all of these at the beginning of a new frame.