ksys/res: Implement GParamList Bow

This commit is contained in:
Léo Lam 2020-09-20 00:24:09 +02:00
parent 8b6e95939d
commit 5a2ff7cedf
No known key found for this signature in database
GPG Key ID: 0DF30F9081000741
4 changed files with 99 additions and 2 deletions

View File

@ -67,6 +67,7 @@ add_executable(uking
src/KingSystem/Resource/GeneralParamList/resGParamListObjectAttack.h
src/KingSystem/Resource/GeneralParamList/resGParamListObjectAttackInterval.h
src/KingSystem/Resource/GeneralParamList/resGParamListObjectBindBone.h
src/KingSystem/Resource/GeneralParamList/resGParamListObjectBow.h
src/KingSystem/Resource/GeneralParamList/resGParamListObjectEnemy.h
src/KingSystem/Resource/GeneralParamList/resGParamListObjectEnemyLevel.h
src/KingSystem/Resource/GeneralParamList/resGParamListObjectEnemyRace.h

View File

@ -89074,7 +89074,7 @@
0x000000710118fe20,BgparamlistObjectLargeSword::ctor,1760,_ZN4ksys3res26GParamListObjectLargeSwordC2Ev
0x0000007101190500,BgparamlistObjectSpear::ctor,2080,_ZN4ksys3res21GParamListObjectSpearC2Ev
0x0000007101190d20,BgparamlistObjectShield::ctor,1484,_ZN4ksys3res22GParamListObjectShieldC2Ev
0x00000071011912ec,BgparamlistObjectBow::ctor,2724,
0x00000071011912ec,BgparamlistObjectBow::ctor,2724,_ZN4ksys3res19GParamListObjectBowC2Ev
0x0000007101191d90,BgparamlistObjectWeaponOption::ctor,596,
0x0000007101191fe4,BgparamlistObjectMasterSword::ctor,772,
0x00000071011922e8,BgparamlistObjectGuardianMiniWeapon::ctor,608,
@ -89162,7 +89162,7 @@
0x00000071011a7c44,sub_71011A7C44,12,_ZNK4ksys3res26GParamListObjectLargeSword7getNameEv
0x00000071011a7c50,sub_71011A7C50,12,_ZNK4ksys3res21GParamListObjectSpear7getNameEv
0x00000071011a7c5c,sub_71011A7C5C,12,_ZNK4ksys3res22GParamListObjectShield7getNameEv
0x00000071011a7c68,sub_71011A7C68,12,
0x00000071011a7c68,sub_71011A7C68,12,_ZNK4ksys3res19GParamListObjectBow7getNameEv
0x00000071011a7c74,sub_71011A7C74,12,
0x00000071011a7c80,sub_71011A7C80,12,
0x00000071011a7c8c,sub_71011A7C8C,12,

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

View File

@ -0,0 +1,94 @@
#pragma once
#include <agl/Utils/aglParameter.h>
#include "KingSystem/Resource/GeneralParamList/resGParamListObject.h"
#include "KingSystem/Utils/Types.h"
namespace ksys::res {
class GParamListObjectBow : public GParamListObject {
public:
GParamListObjectBow();
const char* getName() const override { return "Bow"; }
agl::utl::Parameter<sead::SafeString> mQuiverName;
agl::utl::Parameter<sead::SafeString> mArrowName;
agl::utl::Parameter<bool> mIsGuardPierce;
agl::utl::Parameter<f32> mExtraDamageRatio;
agl::utl::Parameter<f32> mBaseAttackPowerRatio;
agl::utl::Parameter<bool> mIsLeadShot;
agl::utl::Parameter<s32> mLeadShotNum;
agl::utl::Parameter<f32> mLeadShotAng;
agl::utl::Parameter<s32> mLeadShotInterval;
agl::utl::Parameter<bool> mIsRapidFire;
agl::utl::Parameter<s32> mRapidFireNum;
agl::utl::Parameter<s32> mRapidFireInterval;
agl::utl::Parameter<bool> mIsLongRange;
agl::utl::Parameter<f32> mArrowFirstSpeed;
agl::utl::Parameter<f32> mArrowAcceleration;
agl::utl::Parameter<f32> mArrowStabilitySpeed;
agl::utl::Parameter<f32> mArrowFallAcceleration;
agl::utl::Parameter<f32> mArrowFallStabilitySpeed;
agl::utl::Parameter<f32> mArrowGravity;
agl::utl::Parameter<sead::Vector3f> mPlayerHoldTransOffset;
agl::utl::Parameter<sead::Vector3f> mPlayerHoldRotOffset;
agl::utl::Parameter<sead::Vector3f> mPlayerEquipTransOffset;
agl::utl::Parameter<sead::Vector3f> mPlayerEquipRotOffset;
agl::utl::Parameter<sead::Vector3f> mSquatPlayerHoldTransAddOffset;
agl::utl::Parameter<sead::Vector3f> mSquatPlayerHoldRotAddOffset;
agl::utl::Parameter<sead::Vector3f> mNPCHoldTransOffset;
agl::utl::Parameter<sead::Vector3f> mNPCHoldRotOffset;
agl::utl::Parameter<sead::Vector3f> mNPCEquipTransOffset;
agl::utl::Parameter<sead::Vector3f> mNPCEquipRotOffset;
agl::utl::Parameter<sead::Vector3f> mEnemyEquipTransOffset;
agl::utl::Parameter<sead::Vector3f> mEnemyEquipRotOffset;
agl::utl::Parameter<sead::Vector3f> mStandEquipTransOffset;
agl::utl::Parameter<sead::Vector3f> mStandEquipRotOffset;
agl::utl::Parameter<f32> mArrowChargeRate;
agl::utl::Parameter<f32> mArrowReloadRate;
agl::utl::Parameter<sead::SafeString> mWeaponSubType;
};
KSYS_CHECK_SIZE_NX150(GParamListObjectBow, 0x540);
inline GParamListObjectBow::GParamListObjectBow() {
auto* const obj = &mObj;
mQuiverName.init("", "QuiverName", "", obj);
mArrowName.init("", "ArrowName", "", obj);
mIsGuardPierce.init(false, "IsGuardPierce", "", obj);
mExtraDamageRatio.init(1.0, "ExtraDamageRatio", "", obj);
mBaseAttackPowerRatio.init(1.0, "BaseAttackPowerRatio", "", obj);
mIsLeadShot.init(false, "IsLeadShot", "", obj);
mLeadShotNum.init(0, "LeadShotNum", "", obj);
mLeadShotAng.init(45.0, "LeadShotAng", "", obj);
mLeadShotInterval.init(0, "LeadShotInterval", "", obj);
mIsRapidFire.init(false, "IsRapidFire", "", obj);
mRapidFireNum.init(0, "RapidFireNum", "", obj);
mRapidFireInterval.init(0, "RapidFireInterval", "", obj);
mIsLongRange.init(false, "IsLongRange", "", obj);
mArrowFirstSpeed.init(4.5, "ArrowFirstSpeed", "", obj);
mArrowAcceleration.init(-0.1, "ArrowAcceleration", "", obj);
mArrowStabilitySpeed.init(3.0, "ArrowStabilitySpeed", "", obj);
mArrowFallAcceleration.init(-0.2, "ArrowFallAcceleration", "", obj);
mArrowFallStabilitySpeed.init(1.0, "ArrowFallStabilitySpeed", "", obj);
mArrowGravity.init(-9.8, "ArrowGravity", "", obj);
mPlayerHoldTransOffset.init({-0.2, -0.01, 0.0}, "PlayerHoldTransOffset", "", obj);
mPlayerHoldRotOffset.init({12.0, -60.0, -22.0}, "PlayerHoldRotOffset", "", obj);
mPlayerEquipTransOffset.init({0.0, 0.0, 0.0}, "PlayerEquipTransOffset", "", obj);
mPlayerEquipRotOffset.init({0.0, 0.0, 0.0}, "PlayerEquipRotOffset", "", obj);
mSquatPlayerHoldTransAddOffset.init({0.0, 0.0, 0.0}, "SquatPlayerHoldTransAddOffset", "", obj);
mSquatPlayerHoldRotAddOffset.init({0.0, 0.0, 0.0}, "SquatPlayerHoldRotAddOffset", "", obj);
mNPCHoldTransOffset.init({0.0, 0.0, 0.0}, "NPCHoldTransOffset", "", obj);
mNPCHoldRotOffset.init({0.0, 0.0, 0.0}, "NPCHoldRotOffset", "", obj);
mNPCEquipTransOffset.init({0.0, 0.0, 0.0}, "NPCEquipTransOffset", "", obj);
mNPCEquipRotOffset.init({0.0, 0.0, 0.0}, "NPCEquipRotOffset", "", obj);
mEnemyEquipTransOffset.init({0.0, 0.0, 0.0}, "EnemyEquipTransOffset", "", obj);
mEnemyEquipRotOffset.init({0.0, 0.0, 0.0}, "EnemyEquipRotOffset", "", obj);
mStandEquipTransOffset.init({0.0, 0.0, 0.0}, "StandEquipTransOffset", "", obj);
mStandEquipRotOffset.init({0.0, 0.0, 0.0}, "StandEquipRotOffset", "", obj);
mArrowChargeRate.init(1.0, "ArrowChargeRate", "", obj);
mArrowReloadRate.init(1.0, "ArrowReloadRate", "", obj);
mWeaponSubType.init("", "WeaponSubType", "", obj);
}
} // namespace ksys::res

View File

@ -6,6 +6,7 @@
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectAttack.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectAttackInterval.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectBindBone.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectBow.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectEnemy.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectEnemyLevel.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectEnemyRace.h"
@ -72,6 +73,7 @@ bool GParamList::parse_(u8* data, size_t, sead::Heap* heap) {
add<GParamListObjType::LargeSword>(archive.getRootList(), "LargeSword", heap, dummy_list);
add<GParamListObjType::Spear>(archive.getRootList(), "Spear", heap, dummy_list);
add<GParamListObjType::Shield>(archive.getRootList(), "Shield", heap, dummy_list);
add<GParamListObjType::Bow>(archive.getRootList(), "Bow", heap, dummy_list);
// TODO: the rest