diff --git a/data/uking_functions.csv b/data/uking_functions.csv index 6d7b1280..c2b7c933 100644 --- a/data/uking_functions.csv +++ b/data/uking_functions.csv @@ -96779,24 +96779,24 @@ 0x00000071012fbd10,sub_71012FBD10,44, 0x00000071012fbd3c,j__ZdlPv_1322,4, 0x00000071012fbd40,sub_71012FBD40,304, -0x00000071012fbe70,sub_71012FBE70,236, -0x00000071012fbf5c,sub_71012FBF5C,104, -0x00000071012fbfc4,sub_71012FBFC4,104, -0x00000071012fc02c,sub_71012FC02C,100, -0x00000071012fc090,sub_71012FC090,92, -0x00000071012fc0ec,sub_71012FC0EC,92, -0x00000071012fc148,sub_71012FC148,88, -0x00000071012fc1a0,nullsub_4843,4, -0x00000071012fc1a4,nullsub_4844,4, -0x00000071012fc1a8,sub_71012FC1A8,132, -0x00000071012fc22c,sub_71012FC22C,132, -0x00000071012fc2b0,sub_71012FC2B0,8, -0x00000071012fc2b8,sub_71012FC2B8,92, -0x00000071012fc314,sub_71012FC314,8, -0x00000071012fc31c,sub_71012FC31C,8, -0x00000071012fc324,sub_71012FC324,92, -0x00000071012fc380,sub_71012FC380,8, -0x00000071012fc388,sub_71012FC388,372, +0x00000071012fbe70,sub_71012FBE70,236,_ZN4ksys3res13RagdollConfigC1Ev +0x00000071012fbf5c,sub_71012FBF5C,104,_ZN4ksys3res13RagdollConfigD1Ev +0x00000071012fbfc4,sub_71012FBFC4,104,_ZThn632_N4ksys3res13RagdollConfigD1Ev +0x00000071012fc02c,sub_71012FC02C,100,_ZThn664_N4ksys3res13RagdollConfigD1Ev +0x00000071012fc090,sub_71012FC090,92,_ZN4ksys3res13RagdollConfigD0Ev +0x00000071012fc0ec,sub_71012FC0EC,92,_ZThn632_N4ksys3res13RagdollConfigD0Ev +0x00000071012fc148,sub_71012FC148,88,_ZThn664_N4ksys3res13RagdollConfigD0Ev +0x00000071012fc1a0,nullsub_4843,4,_ZN4ksys3res13RagdollConfig9doCreate_EPhjPN4sead4HeapE +0x00000071012fc1a4,nullsub_4844,4,_ZThn632_N4ksys3res13RagdollConfig9doCreate_EPhjPN4sead4HeapE +0x00000071012fc1a8,sub_71012FC1A8,132,_ZN4ksys3res13RagdollConfig6parse_EPhmPN4sead4HeapE +0x00000071012fc22c,sub_71012FC22C,132,_ZThn632_N4ksys3res13RagdollConfig6parse_EPhmPN4sead4HeapE +0x00000071012fc2b0,sub_71012FC2B0,8,_ZNK4ksys3res13RagdollConfig27checkDerivedRuntimeTypeInfoEPKN4sead15RuntimeTypeInfo9InterfaceE +0x00000071012fc2b8,sub_71012FC2B8,92,_ZNK4ksys3res13RagdollConfig18getRuntimeTypeInfoEv +0x00000071012fc314,sub_71012FC314,8,_ZNK4ksys3res13RagdollConfig10needsParseEv +0x00000071012fc31c,sub_71012FC31C,8,_ZThn632_NK4ksys3res13RagdollConfig27checkDerivedRuntimeTypeInfoEPKN4sead15RuntimeTypeInfo9InterfaceE +0x00000071012fc324,sub_71012FC324,92,_ZThn632_NK4ksys3res13RagdollConfig18getRuntimeTypeInfoEv +0x00000071012fc380,sub_71012FC380,8,_ZThn632_NK4ksys3res13RagdollConfig10needsParseEv +0x00000071012fc388,sub_71012FC388,372,_ZN4ksys3res13RagdollConfig33checkDerivedRuntimeTypeInfoStaticEPKN4sead15RuntimeTypeInfo9InterfaceE 0x00000071012fc4fc,nullsub_4845,4,_ZN4ksys3res6Recipe9doCreate_EPhjPN4sead4HeapE 0x00000071012fc500,nullsub_4846,4,_ZThn632_N4ksys3res6Recipe9doCreate_EPhjPN4sead4HeapE 0x00000071012fc504,Brecipe::parse,1328,_ZN4ksys3res6Recipe6parse_EPhmPN4sead4HeapE diff --git a/src/KingSystem/Resource/resResourceRagdollConfig.cpp b/src/KingSystem/Resource/resResourceRagdollConfig.cpp index e5c27c33..56be5211 100644 --- a/src/KingSystem/Resource/resResourceRagdollConfig.cpp +++ b/src/KingSystem/Resource/resResourceRagdollConfig.cpp @@ -1 +1,22 @@ #include "KingSystem/Resource/resResourceRagdollConfig.h" + +namespace ksys::res { + +RagdollConfig::RagdollConfig() : ParamIO("rgconfig", 0) {} + +RagdollConfig::~RagdollConfig() = default; + +void RagdollConfig::doCreate_(u8* buffer, u32 buffer_size, sead::Heap* heap) {} + +bool RagdollConfig::parse_(u8* data, size_t size, sead::Heap* heap) { + if (!data) + return false; + + addList(&mConfig, "ConfigRoot"); + + agl::utl::ResParameterArchive archive{data}; + applyResParameterArchive(archive); + return true; +} + +} // namespace ksys::res diff --git a/src/KingSystem/Resource/resResourceRagdollConfig.h b/src/KingSystem/Resource/resResourceRagdollConfig.h index d9768b22..a97fa3a4 100644 --- a/src/KingSystem/Resource/resResourceRagdollConfig.h +++ b/src/KingSystem/Resource/resResourceRagdollConfig.h @@ -1,13 +1,25 @@ #pragma once +#include "KingSystem/Physics/Ragdoll/physRagdollConfig.h" #include "KingSystem/Resource/resResource.h" #include "KingSystem/Utils/ParamIO.h" namespace ksys::res { -// TODO class RagdollConfig : public ParamIO, public Resource { SEAD_RTTI_OVERRIDE(RagdollConfig, Resource) +public: + RagdollConfig(); + ~RagdollConfig() override; + + void doCreate_(u8* buffer, u32 buffer_size, sead::Heap* heap) override; + bool needsParse() const override { return true; } + bool parse_(u8* data, size_t size, sead::Heap* heap) override; + + const phys::RagdollConfig& getConfig() const { return mConfig; } + +private: + phys::RagdollConfig mConfig; }; } // namespace ksys::res