ksys/res: Implement GParamList ArmorEffect

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

View File

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

View File

@ -89082,7 +89082,7 @@
0x000000710119512c,BgparamlistObjectCamera::ctor,884,_ZN4ksys3res22GParamListObjectCameraC2Ev
0x00000071011954a0,BgparamlistObjectGrab::ctor,1188,_ZN4ksys3res20GParamListObjectGrabC2Ev
0x0000007101195944,BgparamlistObjectArmor::ctor,700,_ZN4ksys3res21GParamListObjectArmorC2Ev
0x0000007101195c00,BgparamlistObjectArmorEffect::ctor,540,
0x0000007101195c00,BgparamlistObjectArmorEffect::ctor,540,_ZN4ksys3res27GParamListObjectArmorEffectC2Ev
0x0000007101195e1c,BgparamlistObjectArmorHead::ctor,400,
0x0000007101195fac,BgparamlistObjectArmorUpper::ctor,508,
0x00000071011961a8,BgparamlistObjectShiekerStone::ctor,672,
@ -89170,7 +89170,7 @@
0x00000071011a7ca4,sub_71011A7CA4,12,_ZNK4ksys3res22GParamListObjectCamera7getNameEv
0x00000071011a7cb0,sub_71011A7CB0,12,_ZNK4ksys3res20GParamListObjectGrab7getNameEv
0x00000071011a7cbc,sub_71011A7CBC,12,_ZNK4ksys3res21GParamListObjectArmor7getNameEv
0x00000071011a7cc8,sub_71011A7CC8,12,
0x00000071011a7cc8,sub_71011A7CC8,12,_ZNK4ksys3res27GParamListObjectArmorEffect7getNameEv
0x00000071011a7cd4,sub_71011A7CD4,12,
0x00000071011a7ce0,sub_71011A7CE0,12,
0x00000071011a7cec,sub_71011A7CEC,12,

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

View File

@ -0,0 +1,32 @@
#pragma once
#include <agl/Utils/aglParameter.h>
#include "KingSystem/Resource/GeneralParamList/resGParamListObject.h"
#include "KingSystem/Utils/Types.h"
namespace ksys::res {
class GParamListObjectArmorEffect : public GParamListObject {
public:
GParamListObjectArmorEffect();
const char* getName() const override { return "ArmorEffect"; }
agl::utl::Parameter<sead::SafeString> mEffectType;
agl::utl::Parameter<s32> mEffectLevel;
agl::utl::Parameter<bool> mAncientPowUp;
agl::utl::Parameter<bool> mEnableClimbWaterfall;
agl::utl::Parameter<bool> mEnableSpinAttack;
};
KSYS_CHECK_SIZE_NX150(GParamListObjectArmorEffect, 0xe0);
inline GParamListObjectArmorEffect::GParamListObjectArmorEffect() {
auto* const obj = &mObj;
mEffectType.init("None", "EffectType", "", obj);
mEffectLevel.init(0, "EffectLevel", "", obj);
mAncientPowUp.init(false, "AncientPowUp", "", obj);
mEnableClimbWaterfall.init(false, "EnableClimbWaterfall", "", obj);
mEnableSpinAttack.init(false, "EnableSpinAttack", "", obj);
}
} // namespace ksys::res

View File

@ -4,6 +4,7 @@
#include "KingSystem/ActorSystem/actActorParamMgr.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListObject.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectArmor.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectArmorEffect.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectAttack.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectAttackInterval.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectBindBone.h"
@ -89,6 +90,7 @@ bool GParamList::parse_(u8* data, size_t, sead::Heap* heap) {
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);
add<GParamListObjType::ArmorEffect>(archive.getRootList(), "ArmorEffect", heap, dummy_list);
// TODO: the rest