diff --git a/src/KingSystem/Resource/resResourceRagdollConfigList.cpp b/src/KingSystem/Resource/resResourceRagdollConfigList.cpp new file mode 100644 index 00000000..218c20b8 --- /dev/null +++ b/src/KingSystem/Resource/resResourceRagdollConfigList.cpp @@ -0,0 +1 @@ +#include "KingSystem/Resource/resResourceRagdollConfigList.h" diff --git a/src/KingSystem/Resource/resResourceRagdollConfigList.h b/src/KingSystem/Resource/resResourceRagdollConfigList.h new file mode 100644 index 00000000..8f203be8 --- /dev/null +++ b/src/KingSystem/Resource/resResourceRagdollConfigList.h @@ -0,0 +1,57 @@ +#pragma once + +#include +#include +#include +#include +#include "KingSystem/Resource/resResource.h" +#include "KingSystem/Utils/ParamIO.h" +#include "KingSystem/Utils/Types.h" + +namespace ksys::res { + +class RagdollConfigList : public ParamIO, public Resource { + SEAD_RTTI_OVERRIDE(RagdollConfigList, Resource) +public: + struct ImpulseParam { + agl::utl::Parameter file_name; + agl::utl::ParameterObj obj; + void* _58; + }; + KSYS_CHECK_SIZE_NX150(ImpulseParam, 0x60); + + struct BodyParam : agl::utl::ParameterObj { + agl::utl::Parameter rigid_name; + agl::utl::Parameter friction_scale; + agl::utl::Parameter buoyancy_scale; + }; + KSYS_CHECK_SIZE_NX150(BodyParam, 0x98); + + RagdollConfigList(); + ~RagdollConfigList() override; + + void doCreate_(u8*, u32, sead::Heap*) override {} + bool needsParse() const override { return true; } + bool parse_(u8* data, size_t size, sead::Heap* heap) override; + bool finishParsing_() override; + bool m7_() override; + + const sead::Buffer& getImpulseParams() const { return mImpulseParams; } + f32 getUpperLimitHeight() const { return mUpperLimitHeight.ref(); } + f32 getLowerLimitHeight() const { return mLowerLimitHeight.ref(); } + const sead::Buffer& getMBodyParams() const { return mBodyParams; } + +private: + agl::utl::ParameterList mImpulseParamList; + sead::Buffer mImpulseParams; + + agl::utl::ParameterObj mCommonData; + agl::utl::Parameter mUpperLimitHeight; + agl::utl::Parameter mLowerLimitHeight; + + agl::utl::ParameterList mBodyParamList; + sead::Buffer mBodyParams; +}; +KSYS_CHECK_SIZE_NX150(RagdollConfigList, 0x3d0); + +} // namespace ksys::res