ksys/res: Add RagdollConfigList header

This commit is contained in:
Léo Lam 2020-11-14 12:13:10 +01:00
parent 272926a797
commit 7b813bdddf
No known key found for this signature in database
GPG Key ID: 0DF30F9081000741
2 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1 @@
#include "KingSystem/Resource/resResourceRagdollConfigList.h"

View File

@ -0,0 +1,57 @@
#pragma once
#include <agl/Utils/aglParameter.h>
#include <agl/Utils/aglParameterList.h>
#include <agl/Utils/aglParameterObj.h>
#include <container/seadBuffer.h>
#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<sead::SafeString> file_name;
agl::utl::ParameterObj obj;
void* _58;
};
KSYS_CHECK_SIZE_NX150(ImpulseParam, 0x60);
struct BodyParam : agl::utl::ParameterObj {
agl::utl::Parameter<sead::SafeString> rigid_name;
agl::utl::Parameter<f32> friction_scale;
agl::utl::Parameter<f32> 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<ImpulseParam>& getImpulseParams() const { return mImpulseParams; }
f32 getUpperLimitHeight() const { return mUpperLimitHeight.ref(); }
f32 getLowerLimitHeight() const { return mLowerLimitHeight.ref(); }
const sead::Buffer<BodyParam>& getMBodyParams() const { return mBodyParams; }
private:
agl::utl::ParameterList mImpulseParamList;
sead::Buffer<ImpulseParam> mImpulseParams;
agl::utl::ParameterObj mCommonData;
agl::utl::Parameter<f32> mUpperLimitHeight;
agl::utl::Parameter<f32> mLowerLimitHeight;
agl::utl::ParameterList mBodyParamList;
sead::Buffer<BodyParam> mBodyParams;
};
KSYS_CHECK_SIZE_NX150(RagdollConfigList, 0x3d0);
} // namespace ksys::res