From d972c8fe945c96197931a274be6de7f8d58cf02b Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 12 Nov 2026 11:46:43 +0000 Subject: [PATCH] Decompile 2 functions in Source/Resource/Models/AnimatedModelResource.cpp, Source/Resource/Models/AnimatedModelResource.h Batch #18207 by ragnarok-clanker: 2 byte-identical, 0 confirmed by peer review. - fn_07956 C3dAnimModelRes::Create: byte-identical (already on main) - fn_07979 C3dAnimModelRes::C3dAnimModelRes: byte-identical Merged automatically: every function is byte-identical to the original. --- Source/Resource/Models/AnimatedModelResource.cpp | 10 +++++----- Source/Resource/Models/AnimatedModelResource.h | 10 +++++++--- 2 files changed, 12 insertions(+), 8 deletions(-) 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; };