summaryrefslogtreecommitdiff
path: root/include/JSystem/J3DGraphBase
diff options
context:
space:
mode:
authorhatal175 <hatal175@users.noreply.github.com>2023-09-19 13:45:39 +0300
committerGitHub <noreply@github.com>2023-09-19 03:45:39 -0700
commite5cb9ce472674fbb385bb909005dacbd3576e681 (patch)
tree45cf88e27de779d1bb80b3692d0af30b80947368 /include/JSystem/J3DGraphBase
parent6726d1cf475c2ea193b5c2a63938e6869b21e10d (diff)
JAUSeqCollection, JAUSoundTable OK (#1932)
Diffstat (limited to 'include/JSystem/J3DGraphBase')
-rw-r--r--include/JSystem/J3DGraphBase/J3DStruct.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/JSystem/J3DGraphBase/J3DStruct.h b/include/JSystem/J3DGraphBase/J3DStruct.h
index 9063658da9..2e2eef1b2b 100644
--- a/include/JSystem/J3DGraphBase/J3DStruct.h
+++ b/include/JSystem/J3DGraphBase/J3DStruct.h
@@ -40,6 +40,24 @@ struct J3DTextureSRTInfo {
/* 0x08 */ s16 mRotation;
/* 0x0C */ f32 mTranslationX;
/* 0x10 */ f32 mTranslationY;
+
+ inline void operator=(J3DTextureSRTInfo const& other) {
+ register const f32* src = &other.mScaleX;
+ register f32* dst = &mScaleX;
+ register f32 xy;
+ asm {
+ psq_l xy, 0(src), 0, 0
+ psq_st xy, 0(dst), 0, 0
+ };
+ // Unclear why there's a 4 byte copy here.
+ *(u32*)&mRotation = *(u32*)&other.mRotation;
+ src = &other.mTranslationX;
+ dst = &mTranslationX;
+ asm {
+ psq_l xy, 0(src), 0, 0
+ psq_st xy, 0(dst), 0, 0
+ };
+ }
}; // Size: 0x14
struct J3DTexMtxInfo {