1
0
mirror of https://github.com/zeldaret/oot.git synced 2024-09-21 04:24:43 +00:00

Match sys_matrix.c (#1682)

This commit is contained in:
cadmic 2024-02-01 06:13:24 -08:00 committed by GitHub
parent 593a86014c
commit 99fd784bc2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View File

@ -1455,7 +1455,9 @@ void Matrix_ReplaceRotation(MtxF* mf);
void Matrix_MtxFToYXZRotS(MtxF* mf, Vec3s* rotDest, s32 flag); void Matrix_MtxFToYXZRotS(MtxF* mf, Vec3s* rotDest, s32 flag);
void Matrix_MtxFToZYXRotS(MtxF* mf, Vec3s* rotDest, s32 flag); void Matrix_MtxFToZYXRotS(MtxF* mf, Vec3s* rotDest, s32 flag);
void Matrix_RotateAxis(f32 angle, Vec3f* axis, u8 mode); void Matrix_RotateAxis(f32 angle, Vec3f* axis, u8 mode);
#if OOT_DEBUG
MtxF* Matrix_CheckFloats(MtxF* mf, char* file, s32 line); MtxF* Matrix_CheckFloats(MtxF* mf, char* file, s32 line);
#endif
void Matrix_SetTranslateScaleMtx2(Mtx* mtx, f32 scaleX, f32 scaleY, f32 scaleZ, f32 translateX, f32 translateY, void Matrix_SetTranslateScaleMtx2(Mtx* mtx, f32 scaleX, f32 scaleY, f32 scaleZ, f32 translateX, f32 translateY,
f32 translateZ); f32 translateZ);
u64* SysUcode_GetUCodeBoot(void); u64* SysUcode_GetUCodeBoot(void);

View File

@ -969,6 +969,7 @@ void Matrix_RotateAxis(f32 angle, Vec3f* axis, u8 mode) {
} }
} }
#if OOT_DEBUG
MtxF* Matrix_CheckFloats(MtxF* mf, char* file, s32 line) { MtxF* Matrix_CheckFloats(MtxF* mf, char* file, s32 line) {
s32 i, j; s32 i, j;
@ -989,20 +990,21 @@ MtxF* Matrix_CheckFloats(MtxF* mf, char* file, s32 line) {
return mf; return mf;
} }
#endif
void Matrix_SetTranslateUniformScaleMtxF(MtxF* mf, f32 scale, f32 translateX, f32 translateY, f32 translateZ) { void Matrix_SetTranslateUniformScaleMtxF(MtxF* mf, f32 scale, f32 translateX, f32 translateY, f32 translateZ) {
mf->xx = scale;
mf->yx = 0.0f; mf->yx = 0.0f;
mf->zx = 0.0f; mf->zx = 0.0f;
mf->wx = 0.0f; mf->wx = 0.0f;
mf->xy = 0.0f; mf->xy = 0.0f;
mf->yy = scale;
mf->zy = 0.0f; mf->zy = 0.0f;
mf->wy = 0.0f; mf->wy = 0.0f;
mf->xz = 0.0f; mf->xz = 0.0f;
mf->yz = 0.0f; mf->yz = 0.0f;
mf->wz = 0.0f;
mf->xx = scale;
mf->yy = scale;
mf->zz = scale; mf->zz = scale;
mf->wz = 0.0f;
mf->xw = translateX; mf->xw = translateX;
mf->yw = translateY; mf->yw = translateY;
mf->zw = translateZ; mf->zw = translateZ;