ksys/res: Implement GParamList LumberjackTree

This commit is contained in:
Léo Lam
2020-09-20 01:38:26 +02:00
parent 91ced88d4e
commit c0eec2b1c8
4 changed files with 40 additions and 2 deletions
@@ -0,0 +1,34 @@
#pragma once
#include <agl/Utils/aglParameter.h>
#include "KingSystem/Resource/GeneralParamList/resGParamListObject.h"
#include "KingSystem/Utils/Types.h"
namespace ksys::res {
class GParamListObjectLumberjackTree : public GParamListObject {
public:
GParamListObjectLumberjackTree();
const char* getName() const override { return "LumberjackTree"; }
agl::utl::Parameter<f32> mImpulseThreshold;
agl::utl::Parameter<bool> mIsValid;
agl::utl::Parameter<sead::SafeString> mStumpName;
agl::utl::Parameter<sead::SafeString> mTrunkName;
agl::utl::Parameter<sead::SafeString> mWeaponWoodName;
agl::utl::Parameter<sead::SafeString> mBranchName;
};
KSYS_CHECK_SIZE_NX150(GParamListObjectLumberjackTree, 0x118);
inline GParamListObjectLumberjackTree::GParamListObjectLumberjackTree() {
auto* const obj = &mObj;
mImpulseThreshold.init(100.0, "ImpulseThreshold", "", obj);
mIsValid.init(false, "IsValid", "", obj);
mStumpName.init("", "StumpName", "", obj);
mTrunkName.init("", "TrunkName", "", obj);
mWeaponWoodName.init("", "WeaponWoodName", "", obj);
mBranchName.init("", "BranchName", "", obj);
}
} // namespace ksys::res
@@ -26,6 +26,7 @@
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectItem.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectLargeSword.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectLiftable.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectLumberjackTree.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectMasterSword.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectPlayer.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectRod.h"
@@ -113,6 +114,8 @@ bool GParamList::parse_(u8* data, size_t, sead::Heap* heap) {
add<GParamListObjType::Bullet>(archive.getRootList(), "Bullet", heap, dummy_list);
add<GParamListObjType::CureItem>(archive.getRootList(), "CureItem", heap, dummy_list);
add<GParamListObjType::CookSpice>(archive.getRootList(), "CookSpice", heap, dummy_list);
add<GParamListObjType::LumberjackTree>(archive.getRootList(), "LumberjackTree", heap,
dummy_list);
// TODO: the rest