summaryrefslogtreecommitdiff
path: root/include/JSystem/J3DGraphBase
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2024-10-17 21:35:18 -0400
committerLagoLunatic <LagoLunatic@users.noreply.github.com>2024-10-17 21:35:18 -0400
commit34afbd84db8d66dd634fa19e94a737d40dfe7995 (patch)
treefb950a75f3928b8283874b277a9ab9baf1345392 /include/JSystem/J3DGraphBase
parentf1d73f7fc721e957303d4e6541ec165c3ad9aea5 (diff)
clangd: Started fixing warnings and errors, code cleanup
Diffstat (limited to 'include/JSystem/J3DGraphBase')
-rw-r--r--include/JSystem/J3DGraphBase/J3DTransform.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/include/JSystem/J3DGraphBase/J3DTransform.h b/include/JSystem/J3DGraphBase/J3DTransform.h
index 24103714..51871ad7 100644
--- a/include/JSystem/J3DGraphBase/J3DTransform.h
+++ b/include/JSystem/J3DGraphBase/J3DTransform.h
@@ -6,17 +6,11 @@
struct J3DTextureSRTInfo;
-// struct J3DTransformInfo {
-// /* 0x00 */ JGeometry::TVec3<f32> mScale;
-// /* 0x0C */ JGeometry::TVec3<s16> mRotation;
-// /* 0x14 */ JGeometry::TVec3<f32> mTranslate;
-// }; // Size: 0x20
-
-// I doubt this is right but it seems like the only way to prevent an empty ctor being added on array construction
struct J3DTransformInfo {
/* 0x00 */ Vec mScale;
/* 0x0C */ SVec mRotation;
/* 0x14 */ Vec mTranslate;
+
inline J3DTransformInfo& operator=(const J3DTransformInfo& b) {
mScale = b.mScale;
mRotation = b.mRotation;
@@ -65,6 +59,7 @@ inline void J3DPSMulMtxVec(register MtxP mtx, register Vec* vec, register Vec* d
register f32 fra2;
register f32 fr01;
register f32 fr00;
+#ifdef __MWERKS__
asm {
psq_l fr00, 0(vec), 0, 0
psq_l fr2, 0(mtx), 0, 0
@@ -87,6 +82,7 @@ inline void J3DPSMulMtxVec(register MtxP mtx, register Vec* vec, register Vec* d
ps_sum0 fra6, fra5, fra6, fra5
psq_st fra6, 8(dst), 1, 0
}
+#endif
}
// regalloc issues
@@ -107,6 +103,7 @@ inline void J3DPSMulMtxVec(register MtxP mtx, register SVec* vec, register SVec*
register f32 fra2;
register f32 fr01;
register f32 fr00;
+#ifdef __MWERKS__
asm {
psq_l fr00, 0(vec), 0, 7
psq_l fr2, 0(mtx), 0, 0
@@ -129,6 +126,7 @@ inline void J3DPSMulMtxVec(register MtxP mtx, register SVec* vec, register SVec*
ps_sum0 fra6, fra5, fra6, fra5
psq_st fra6, 4(dst), 1, 7
}
+#endif
}
// regalloc issues
@@ -147,6 +145,7 @@ inline void J3DPSMulMtxVec(register Mtx3P mtx, register Vec* vec, register Vec*
register f32 fr2;
register f32 fr01;
register f32 fr00;
+#ifdef __MWERKS__
asm {
lis punit, PSMulUnit01@ha
psq_l fr00, 0(vec), 0, 0
@@ -173,6 +172,7 @@ inline void J3DPSMulMtxVec(register Mtx3P mtx, register Vec* vec, register Vec*
ps_sum0 fr6, fr5, fr6, fr5
psq_st fr6, 8(dst), 1, 0
}
+#endif
}
// regalloc issues
@@ -186,6 +186,7 @@ inline void J3DPSMulMtxVec(register Mtx3P mtx, register SVec* vec, register SVec
register f32 fr2;
register f32 fr01;
register f32 fr00;
+#ifdef __MWERKS__
asm {
lis punit, PSMulUnit01@ha
psq_l fr00, 0(vec), 0, 7
@@ -212,6 +213,7 @@ inline void J3DPSMulMtxVec(register Mtx3P mtx, register SVec* vec, register SVec
ps_sum0 fr6, fr5, fr6, fr5
psq_st fr6, 4(dst), 1, 7
}
+#endif
}
#endif /* J3DTRANSFORM_H */