From e5cb9ce472674fbb385bb909005dacbd3576e681 Mon Sep 17 00:00:00 2001 From: hatal175 Date: Tue, 19 Sep 2023 13:45:39 +0300 Subject: JAUSeqCollection, JAUSoundTable OK (#1932) --- include/JSystem/J3DGraphBase/J3DStruct.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'include/JSystem/J3DGraphBase') 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 { -- cgit v1.2.3