summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2025-11-26 16:41:10 -0500
committerGitHub <noreply@github.com>2025-11-26 14:41:10 -0700
commit5d0da9be7c486a1907a9f4ced12afa87ddafb515 (patch)
treee80d6a18c068207e598c8c1886152d9a1a103a9d /include
parentdf1ae6898ef296ada6fc38eb7424c5b8bf5567cb (diff)
Match J3DTransformInfo::operator=, fixing several regalloc issues (#2873)
Diffstat (limited to 'include')
-rw-r--r--include/JSystem/J3DGraphBase/J3DTransform.h25
1 files changed, 10 insertions, 15 deletions
diff --git a/include/JSystem/J3DGraphBase/J3DTransform.h b/include/JSystem/J3DGraphBase/J3DTransform.h
index f08925eac2..242b3b03f6 100644
--- a/include/JSystem/J3DGraphBase/J3DTransform.h
+++ b/include/JSystem/J3DGraphBase/J3DTransform.h
@@ -26,24 +26,19 @@ struct J3DTransformInfo {
inline J3DTransformInfo& operator=(const register J3DTransformInfo& b) {
register const J3DTransformInfo& var_r31 = b;
register J3DTransformInfo& var_r30 = *this;
-
register f32 var_f31;
- register f32 var_f0;
- register int var_r0;
asm {
- psq_l var_f31, 0x0(var_r31), 0, 0
- psq_st var_f31, 0x0(var_r30), 0, 0
- lfs var_f31, 0x8(var_r31)
- stfs var_f31, 0x8(var_r30)
- lwz var_r0, 0xc(var_r31)
- stw var_r0, 0xc(var_r30)
- lha var_r0, 0x10(var_r31)
- sth var_r0, 0x10(var_r30)
- psq_l var_f31, 0x14(var_r31), 0, 0
- psq_st var_f31, 0x14(var_r30), 0, 0
- lfs var_f0, 0x1c(var_r31)
- stfs var_f0, 0x1c(var_r30)
+ psq_l var_f31, J3DTransformInfo.mScale(var_r31), 0, 0
+ psq_st var_f31, J3DTransformInfo.mScale(var_r30), 0, 0
+ }
+ mScale.z = b.mScale.z;
+ *(u32*)&mRotation = *(u32*)&b.mRotation;
+ mRotation.z = b.mRotation.z;
+ asm {
+ psq_l var_f31, J3DTransformInfo.mTranslate(var_r31), 0, 0
+ psq_st var_f31, J3DTransformInfo.mTranslate(var_r30), 0, 0
}
+ mTranslate.z = b.mTranslate.z;
return *this;
}
#endif