ksys/res: Implement GParamList Armor

This commit is contained in:
Léo Lam 2020-09-20 01:08:46 +02:00
parent e28d742e27
commit 3bed1f3360
No known key found for this signature in database
GPG Key ID: 0DF30F9081000741
4 changed files with 41 additions and 2 deletions

View File

@ -64,6 +64,7 @@ add_executable(uking
src/KingSystem/MessageSystem/mesTransceiver.h
src/KingSystem/Resource/GeneralParamList/resGParamListObject.h
src/KingSystem/Resource/GeneralParamList/resGParamListObjectArmor.h
src/KingSystem/Resource/GeneralParamList/resGParamListObjectAttack.h
src/KingSystem/Resource/GeneralParamList/resGParamListObjectAttackInterval.h
src/KingSystem/Resource/GeneralParamList/resGParamListObjectBindBone.h

View File

@ -89081,7 +89081,7 @@
0x0000007101192548,BgparamlistObjectPlayer::ctor,11236,_ZN4ksys3res22GParamListObjectPlayerC2Ev
0x000000710119512c,BgparamlistObjectCamera::ctor,884,_ZN4ksys3res22GParamListObjectCameraC2Ev
0x00000071011954a0,BgparamlistObjectGrab::ctor,1188,_ZN4ksys3res20GParamListObjectGrabC2Ev
0x0000007101195944,BgparamlistObjectArmor::ctor,700,
0x0000007101195944,BgparamlistObjectArmor::ctor,700,_ZN4ksys3res21GParamListObjectArmorC2Ev
0x0000007101195c00,BgparamlistObjectArmorEffect::ctor,540,
0x0000007101195e1c,BgparamlistObjectArmorHead::ctor,400,
0x0000007101195fac,BgparamlistObjectArmorUpper::ctor,508,
@ -89169,7 +89169,7 @@
0x00000071011a7c98,sub_71011A7C98,12,_ZNK4ksys3res22GParamListObjectPlayer7getNameEv
0x00000071011a7ca4,sub_71011A7CA4,12,_ZNK4ksys3res22GParamListObjectCamera7getNameEv
0x00000071011a7cb0,sub_71011A7CB0,12,_ZNK4ksys3res20GParamListObjectGrab7getNameEv
0x00000071011a7cbc,sub_71011A7CBC,12,
0x00000071011a7cbc,sub_71011A7CBC,12,_ZNK4ksys3res21GParamListObjectArmor7getNameEv
0x00000071011a7cc8,sub_71011A7CC8,12,
0x00000071011a7cd4,sub_71011A7CD4,12,
0x00000071011a7ce0,sub_71011A7CE0,12,

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

View File

@ -0,0 +1,36 @@
#pragma once
#include <agl/Utils/aglParameter.h>
#include "KingSystem/Resource/GeneralParamList/resGParamListObject.h"
#include "KingSystem/Utils/Types.h"
namespace ksys::res {
class GParamListObjectArmor : public GParamListObject {
public:
GParamListObjectArmor();
const char* getName() const override { return "Armor"; }
agl::utl::Parameter<s32> mStarNum;
agl::utl::Parameter<s32> mDefenceAddLevel;
agl::utl::Parameter<sead::SafeString> mWindScaleMesh;
agl::utl::Parameter<f32> mWindScale;
agl::utl::Parameter<sead::SafeString> mNextRankName;
agl::utl::Parameter<sead::Vector3f> mAffectTransOffsetShield;
agl::utl::Parameter<sead::Vector3f> mAffectRotOffsetShield;
};
KSYS_CHECK_SIZE_NX150(GParamListObjectArmor, 0x138);
inline GParamListObjectArmor::GParamListObjectArmor() {
auto* const obj = &mObj;
mStarNum.init(0, "StarNum", "", obj);
mDefenceAddLevel.init(0, "DefenceAddLevel", "", obj);
mWindScaleMesh.init("", "WindScaleMesh", "", obj);
mWindScale.init(0.0, "WindScale", "", obj);
mNextRankName.init("", "NextRankName", "", obj);
mAffectTransOffsetShield.init({0.0, 0.0, 0.0}, "AffectTransOffsetShield", "", obj);
mAffectRotOffsetShield.init({0.0, 0.0, 0.0}, "AffectRotOffsetShield", "", obj);
}
} // namespace ksys::res

View File

@ -3,6 +3,7 @@
#include <prim/seadRuntimeTypeInfo.h>
#include "KingSystem/ActorSystem/actActorParamMgr.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListObject.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectArmor.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectAttack.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectAttackInterval.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectBindBone.h"
@ -87,6 +88,7 @@ bool GParamList::parse_(u8* data, size_t, sead::Heap* heap) {
add<GParamListObjType::Player>(archive.getRootList(), "Player", heap, dummy_list);
add<GParamListObjType::Camera>(archive.getRootList(), "Camera", heap, dummy_list);
add<GParamListObjType::Grab>(archive.getRootList(), "Grab", heap, dummy_list);
add<GParamListObjType::Armor>(archive.getRootList(), "Armor", heap, dummy_list);
// TODO: the rest