ksys/res: Implement GParamList Enemy

This commit is contained in:
Léo Lam 2020-09-19 22:18:54 +02:00
parent 62e675b9f4
commit b3be87fe4f
No known key found for this signature in database
GPG Key ID: 0DF30F9081000741
4 changed files with 63 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/resGParamListObjectEnemy.h
src/KingSystem/Resource/GeneralParamList/resGParamListObjectGeneral.h
src/KingSystem/Resource/GeneralParamList/resGParamListObjectSystem.h
src/KingSystem/Resource/GeneralParamList/resGParamListObjectTraveler.cpp

View File

@ -89059,7 +89059,7 @@
0x000000710118bc24,sub_710118BC24,24,_ZN4ksys3res15DummyGParamList6parse_EPhmPN4sead4HeapE
0x000000710118bc3c,sub_710118BC3C,28,_ZThn632_N4ksys3res15DummyGParamList6parse_EPhmPN4sead4HeapE
0x000000710118bc58,BgparamlistObjectGeneral::ctor,764,_ZN4ksys3res23GParamListObjectGeneralC2Ev
0x000000710118bf54,BgparamlistObjectEnemy::ctor,1440,
0x000000710118bf54,BgparamlistObjectEnemy::ctor,1440,_ZN4ksys3res21GParamListObjectEnemyC2Ev
0x000000710118c4f4,BgparamlistObjectEnemyLevel::ctor,936,
0x000000710118c89c,BgparamlistObjectEnemyRace::ctor,2780,
0x000000710118d378,BgparamlistObjectAttackInterval::ctor,564,
@ -89147,7 +89147,7 @@
0x00000071011a7b74,sub_71011A7B74,40,_ZThn664_N4ksys3res15DummyGParamListD0Ev
0x00000071011a7b9c,sub_71011A7B9C,12,_ZNK4ksys3res22GParamListObjectSystem7getNameEv
0x00000071011a7ba8,sub_71011A7BA8,12,_ZNK4ksys3res23GParamListObjectGeneral7getNameEv
0x00000071011a7bb4,sub_71011A7BB4,12,
0x00000071011a7bb4,sub_71011A7BB4,12,_ZNK4ksys3res21GParamListObjectEnemy7getNameEv
0x00000071011a7bc0,sub_71011A7BC0,12,
0x00000071011a7bcc,sub_71011A7BCC,12,
0x00000071011a7bd8,sub_71011A7BD8,12,

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

View File

@ -0,0 +1,58 @@
#pragma once
#include <agl/Utils/aglParameter.h>
#include "KingSystem/Resource/GeneralParamList/resGParamListObject.h"
#include "KingSystem/Utils/Types.h"
namespace ksys::res {
class GParamListObjectEnemy : public GParamListObject {
public:
GParamListObjectEnemy();
const char* getName() const override { return "Enemy"; }
agl::utl::Parameter<s32> mRank;
agl::utl::Parameter<s32> mPower;
agl::utl::Parameter<s32> mDropLife;
agl::utl::Parameter<s32> mDyingLife;
agl::utl::Parameter<f32> mLostDist;
agl::utl::Parameter<f32> mLostHeightMax;
agl::utl::Parameter<f32> mLostHeightMin;
agl::utl::Parameter<f32> mLostRayLength;
agl::utl::Parameter<f32> mLODLostDist;
agl::utl::Parameter<f32> mLODLostHeightMax;
agl::utl::Parameter<f32> mLODLostHeightMin;
agl::utl::Parameter<f32> mIntelligenceLevel;
agl::utl::Parameter<f32> mEmotionalLevel;
agl::utl::Parameter<f32> mHeroismLevel;
agl::utl::Parameter<sead::SafeString> mPartActorName;
agl::utl::Parameter<bool> mIsMindFriend;
agl::utl::Parameter<sead::SafeString> mStatusChangeFlag;
agl::utl::Parameter<f32> mChangeLife;
};
KSYS_CHECK_SIZE_NX150(GParamListObjectEnemy, 0x288);
inline GParamListObjectEnemy::GParamListObjectEnemy() {
auto* const obj = &mObj;
mRank.init(0, "Rank", "", obj);
mPower.init(0, "Power", "", obj);
mDropLife.init(100, "DropLife", "", obj);
mDyingLife.init(20, "DyingLife", "", obj);
mLostDist.init(100.0, "LostDist", "", obj);
mLostHeightMax.init(30.0, "LostHeightMax", "", obj);
mLostHeightMin.init(-30.0, "LostHeightMin", "", obj);
mLostRayLength.init(-1.0, "LostRayLength", "", obj);
mLODLostDist.init(40.0, "LODLostDist", "", obj);
mLODLostHeightMax.init(30.0, "LODLostHeightMax", "", obj);
mLODLostHeightMin.init(-30.0, "LODLostHeightMin", "", obj);
mIntelligenceLevel.init(0.0, "IntelligenceLevel", "", obj);
mEmotionalLevel.init(0.0, "EmotionalLevel", "", obj);
mHeroismLevel.init(0.0, "HeroismLevel", "", obj);
mPartActorName.init("", "PartActorName", "", obj);
mIsMindFriend.init(true, "IsMindFriend", "", obj);
mStatusChangeFlag.init("", "StatusChangeFlag", "", obj);
mChangeLife.init(-1.0, "ChangeLife", "", 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/resGParamListObjectEnemy.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectGeneral.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectSystem.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListTraits.h"
@ -41,6 +42,7 @@ bool GParamList::parse_(u8* data, size_t, sead::Heap* heap) {
add<GParamListObjType::System>(archive.getRootList(), "System", heap, dummy_list);
add<GParamListObjType::General>(archive.getRootList(), "General", heap, dummy_list);
add<GParamListObjType::Enemy>(archive.getRootList(), "Enemy", heap, dummy_list);
// TODO: the rest