diff --git a/Source/Resource/Models/AnimatedModelResource.cpp b/Source/Resource/Models/AnimatedModelResource.cpp index 16ba43fe4..9c2576d2e 100644 --- a/Source/Resource/Models/AnimatedModelResource.cpp +++ b/Source/Resource/Models/AnimatedModelResource.cpp @@ -67,16 +67,16 @@ AnimatedModelNode::~AnimatedModelNode() { // OFFSET: 0x007550E0 // FUNCTION: fn_07979 -C3dAnimModelRes::C3dAnimModelRes() : originX(0.0f) { +C3dAnimModelRes::C3dAnimModelRes() { this->recordCount = 0; this->records = nullptr; this->frameCount = 0; this->animationLength = 0; this->speed = 1.0f; this->shade = 2; - this->originX = 0.0f; - this->originY = 0.0f; - this->originZ = 0.0f; + this->origin.x = 0.0f; + this->origin.y = 0.0f; + this->origin.z = 0.0f; this->padding_0150 = 0; this->alpha = 255; } @@ -129,7 +129,7 @@ bool C3dAnimModelRes::Load(const char* name) { if (major == 1 && minor >= 2) { file.Read(&this->speed, 4); - file.Read(&this->originX, 12); + file.Read(&this->origin, 12); } if (major == 1 && minor == 3) { diff --git a/Source/Resource/Models/AnimatedModelResource.h b/Source/Resource/Models/AnimatedModelResource.h index 093e0afd7..9032c0daa 100644 --- a/Source/Resource/Models/AnimatedModelResource.h +++ b/Source/Resource/Models/AnimatedModelResource.h @@ -55,6 +55,12 @@ struct AnimatedModelNode { private: }; +struct AnimatedModelOrigin { + float x = 0.0f; + float y; + float z; +}; + class C3dAnimModelRes : public CRes { public: C3dAnimModelRes(); @@ -74,9 +80,7 @@ public: /* 0148 */ int animationLength; /* 014C */ float speed; /* 0150 */ std::uint32_t padding_0150; - /* 0154 */ float originX; - /* 0158 */ float originY; - /* 015C */ float originZ; + /* 0154 */ AnimatedModelOrigin origin; /* 0160 */ std::uint32_t alpha; };