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
No known key found for this signature in database
GPG Key ID: 0DF30F9081000741
4 changed files with 40 additions and 2 deletions

View File

@ -87,6 +87,7 @@ add_executable(uking
src/KingSystem/Resource/GeneralParamList/resGParamListObjectItem.h
src/KingSystem/Resource/GeneralParamList/resGParamListObjectLargeSword.h
src/KingSystem/Resource/GeneralParamList/resGParamListObjectLiftable.h
src/KingSystem/Resource/GeneralParamList/resGParamListObjectLumberjackTree.h
src/KingSystem/Resource/GeneralParamList/resGParamListObjectMasterSword.h
src/KingSystem/Resource/GeneralParamList/resGParamListObjectPlayer.h
src/KingSystem/Resource/GeneralParamList/resGParamListObjectRod.h

View File

@ -89091,7 +89091,7 @@
0x0000007101196cd0,BgparamlistObjectArrow::ctor,540,_ZN4ksys3res21GParamListObjectArrowC2Ev
0x0000007101196eec,BgparamlistObjectCureItem::ctor,456,_ZN4ksys3res24GParamListObjectCureItemC2Ev
0x00000071011970b4,BgparamlistObjectCookSpice::ctor,476,_ZN4ksys3res25GParamListObjectCookSpiceC2Ev
0x0000007101197290,BgparamlistObjectLumberjackTree::ctor,664,
0x0000007101197290,BgparamlistObjectLumberjackTree::ctor,664,_ZN4ksys3res30GParamListObjectLumberjackTreeC2Ev
0x0000007101197528,BgparamlistObjectNpc::ctor,1232,
0x00000071011979f8,BgparamlistObjectNpcEquipment::ctor,1960,
0x00000071011981a0,BgparamlistObjectZora::ctor,508,
@ -89182,7 +89182,7 @@
0x00000071011a7d34,sub_71011A7D34,12,_ZNK4ksys3res22GParamListObjectBullet7getNameEv
0x00000071011a7d40,sub_71011A7D40,12,_ZNK4ksys3res24GParamListObjectCureItem7getNameEv
0x00000071011a7d4c,sub_71011A7D4C,12,_ZNK4ksys3res25GParamListObjectCookSpice7getNameEv
0x00000071011a7d58,sub_71011A7D58,12,
0x00000071011a7d58,sub_71011A7D58,12,_ZNK4ksys3res30GParamListObjectLumberjackTree7getNameEv
0x00000071011a7d64,sub_71011A7D64,12,
0x00000071011a7d70,sub_71011A7D70,12,
0x00000071011a7d7c,sub_71011A7D7C,12,

Can't render this file because it is too large.

View File

@ -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

View File

@ -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