ksys/res: Implement GParamList EnemyLevel

This commit is contained in:
Léo Lam 2020-09-19 22:24:39 +02:00
parent b3be87fe4f
commit 643efc3104
No known key found for this signature in database
GPG Key ID: 0DF30F9081000741
4 changed files with 51 additions and 2 deletions

View File

@ -65,6 +65,7 @@ add_executable(uking
src/KingSystem/Resource/GeneralParamList/resGParamListObject.h
src/KingSystem/Resource/GeneralParamList/resGParamListObjectEnemy.h
src/KingSystem/Resource/GeneralParamList/resGParamListObjectEnemyLevel.h
src/KingSystem/Resource/GeneralParamList/resGParamListObjectGeneral.h
src/KingSystem/Resource/GeneralParamList/resGParamListObjectSystem.h
src/KingSystem/Resource/GeneralParamList/resGParamListObjectTraveler.cpp

View File

@ -89060,7 +89060,7 @@
0x000000710118bc3c,sub_710118BC3C,28,_ZThn632_N4ksys3res15DummyGParamList6parse_EPhmPN4sead4HeapE
0x000000710118bc58,BgparamlistObjectGeneral::ctor,764,_ZN4ksys3res23GParamListObjectGeneralC2Ev
0x000000710118bf54,BgparamlistObjectEnemy::ctor,1440,_ZN4ksys3res21GParamListObjectEnemyC2Ev
0x000000710118c4f4,BgparamlistObjectEnemyLevel::ctor,936,
0x000000710118c4f4,BgparamlistObjectEnemyLevel::ctor,936,_ZN4ksys3res26GParamListObjectEnemyLevelC2Ev
0x000000710118c89c,BgparamlistObjectEnemyRace::ctor,2780,
0x000000710118d378,BgparamlistObjectAttackInterval::ctor,564,
0x000000710118d5ac,BgparamlistObjectEnemyShown::ctor,404,
@ -89148,7 +89148,7 @@
0x00000071011a7b9c,sub_71011A7B9C,12,_ZNK4ksys3res22GParamListObjectSystem7getNameEv
0x00000071011a7ba8,sub_71011A7BA8,12,_ZNK4ksys3res23GParamListObjectGeneral7getNameEv
0x00000071011a7bb4,sub_71011A7BB4,12,_ZNK4ksys3res21GParamListObjectEnemy7getNameEv
0x00000071011a7bc0,sub_71011A7BC0,12,
0x00000071011a7bc0,sub_71011A7BC0,12,_ZNK4ksys3res26GParamListObjectEnemyLevel7getNameEv
0x00000071011a7bcc,sub_71011A7BCC,12,
0x00000071011a7bd8,sub_71011A7BD8,12,
0x00000071011a7be4,sub_71011A7BE4,12,

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

View File

@ -0,0 +1,46 @@
#pragma once
#include <agl/Utils/aglParameter.h>
#include "KingSystem/Resource/GeneralParamList/resGParamListObject.h"
#include "KingSystem/Utils/Types.h"
namespace ksys::res {
class GParamListObjectEnemyLevel : public GParamListObject {
public:
GParamListObjectEnemyLevel();
const char* getName() const override { return "EnemyLevel"; }
agl::utl::Parameter<bool> mIsAvoidDanger;
agl::utl::Parameter<bool> mIsGuardArrow;
agl::utl::Parameter<bool> mIsHideArrowAttack;
agl::utl::Parameter<bool> mIsSwiftAttack;
agl::utl::Parameter<bool> mIsBackSwiftAttack;
agl::utl::Parameter<bool> mIsCounterAttack;
agl::utl::Parameter<bool> mIsEscapeBomb;
agl::utl::Parameter<bool> mIsKickBomb;
agl::utl::Parameter<bool> mIsShootBomb;
agl::utl::Parameter<bool> mIsThrowWeapon;
agl::utl::Parameter<s32> mGuardPer;
agl::utl::Parameter<bool> mIsJustGuard;
};
KSYS_CHECK_SIZE_NX150(GParamListObjectEnemyLevel, 0x1b8);
inline GParamListObjectEnemyLevel::GParamListObjectEnemyLevel() {
auto* const obj = &mObj;
mIsAvoidDanger.init(false, "IsAvoidDanger", "", obj);
mIsGuardArrow.init(false, "IsGuardArrow", "", obj);
mIsHideArrowAttack.init(false, "IsHideArrowAttack", "", obj);
mIsSwiftAttack.init(false, "IsSwiftAttack", "", obj);
mIsBackSwiftAttack.init(false, "IsBackSwiftAttack", "", obj);
mIsCounterAttack.init(false, "IsCounterAttack", "", obj);
mIsEscapeBomb.init(false, "IsEscapeBomb", "", obj);
mIsKickBomb.init(false, "IsKickBomb", "", obj);
mIsShootBomb.init(false, "IsShootBomb", "", obj);
mIsThrowWeapon.init(false, "IsThrowWeapon", "", obj);
mGuardPer.init(0, "GuardPer", "", obj);
mIsJustGuard.init(false, "IsJustGuard", "", 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/resGParamListObjectEnemy.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectEnemyLevel.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectGeneral.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListObjectSystem.h"
#include "KingSystem/Resource/GeneralParamList/resGParamListTraits.h"
@ -43,6 +44,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);
add<GParamListObjType::EnemyLevel>(archive.getRootList(), "EnemyLevel", heap, dummy_list);
// TODO: the rest