diff --git a/CMakeLists.txt b/CMakeLists.txt index 3ac12a2a..d30020a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,6 +64,7 @@ add_executable(uking src/KingSystem/MessageSystem/mesTransceiver.h src/KingSystem/Resource/GeneralParamList/resGParamListObject.h + src/KingSystem/Resource/GeneralParamList/resGParamListObjectAttackInterval.h src/KingSystem/Resource/GeneralParamList/resGParamListObjectEnemy.h src/KingSystem/Resource/GeneralParamList/resGParamListObjectEnemyLevel.h src/KingSystem/Resource/GeneralParamList/resGParamListObjectEnemyRace.h diff --git a/data/uking_functions.csv b/data/uking_functions.csv index 072dd00b..12b87eb7 100644 --- a/data/uking_functions.csv +++ b/data/uking_functions.csv @@ -89062,7 +89062,7 @@ 0x000000710118bf54,BgparamlistObjectEnemy::ctor,1440,_ZN4ksys3res21GParamListObjectEnemyC2Ev 0x000000710118c4f4,BgparamlistObjectEnemyLevel::ctor,936,_ZN4ksys3res26GParamListObjectEnemyLevelC2Ev 0x000000710118c89c,BgparamlistObjectEnemyRace::ctor,2780,_ZN4ksys3res25GParamListObjectEnemyRaceC2Ev -0x000000710118d378,BgparamlistObjectAttackInterval::ctor,564, +0x000000710118d378,BgparamlistObjectAttackInterval::ctor,564,_ZN4ksys3res30GParamListObjectAttackIntervalC2Ev 0x000000710118d5ac,BgparamlistObjectEnemyShown::ctor,404, 0x000000710118d740,BgparamlistObjectBindBone::ctor,392, 0x000000710118d8c8,BgparamlistObjectAttack::ctor,900, @@ -89150,7 +89150,7 @@ 0x00000071011a7bb4,sub_71011A7BB4,12,_ZNK4ksys3res21GParamListObjectEnemy7getNameEv 0x00000071011a7bc0,sub_71011A7BC0,12,_ZNK4ksys3res26GParamListObjectEnemyLevel7getNameEv 0x00000071011a7bcc,sub_71011A7BCC,12,_ZNK4ksys3res25GParamListObjectEnemyRace7getNameEv -0x00000071011a7bd8,sub_71011A7BD8,12, +0x00000071011a7bd8,sub_71011A7BD8,12,_ZNK4ksys3res30GParamListObjectAttackInterval7getNameEv 0x00000071011a7be4,sub_71011A7BE4,12, 0x00000071011a7bf0,sub_71011A7BF0,12, 0x00000071011a7bfc,sub_71011A7BFC,12, diff --git a/src/KingSystem/Resource/GeneralParamList/resGParamListObjectAttackInterval.h b/src/KingSystem/Resource/GeneralParamList/resGParamListObjectAttackInterval.h new file mode 100644 index 00000000..0ac34c34 --- /dev/null +++ b/src/KingSystem/Resource/GeneralParamList/resGParamListObjectAttackInterval.h @@ -0,0 +1,34 @@ +#pragma once + +#include +#include "KingSystem/Resource/GeneralParamList/resGParamListObject.h" +#include "KingSystem/Utils/Types.h" + +namespace ksys::res { + +class GParamListObjectAttackInterval : public GParamListObject { +public: + GParamListObjectAttackInterval(); + const char* getName() const override { return "AttackInterval"; } + + agl::utl::Parameter mShortAttackTimeMin; + agl::utl::Parameter mShortAttackTimeMax; + agl::utl::Parameter mMiddleAttackTimeMin; + agl::utl::Parameter mMiddleAttackTimeMax; + agl::utl::Parameter mLongAttackTimeMin; + agl::utl::Parameter mLongAttackTimeMax; +}; +KSYS_CHECK_SIZE_NX150(GParamListObjectAttackInterval, 0xf8); + +inline GParamListObjectAttackInterval::GParamListObjectAttackInterval() { + auto* const obj = &mObj; + + mShortAttackTimeMin.init(10, "ShortAttackTimeMin", "", obj); + mShortAttackTimeMax.init(30, "ShortAttackTimeMax", "", obj); + mMiddleAttackTimeMin.init(40, "MiddleAttackTimeMin", "", obj); + mMiddleAttackTimeMax.init(60, "MiddleAttackTimeMax", "", obj); + mLongAttackTimeMin.init(80, "LongAttackTimeMin", "", obj); + mLongAttackTimeMax.init(110, "LongAttackTimeMax", "", obj); +} + +} // namespace ksys::res diff --git a/src/KingSystem/Resource/resResourceGParamList.cpp b/src/KingSystem/Resource/resResourceGParamList.cpp index 1c57644b..be1f14d2 100644 --- a/src/KingSystem/Resource/resResourceGParamList.cpp +++ b/src/KingSystem/Resource/resResourceGParamList.cpp @@ -3,6 +3,7 @@ #include #include "KingSystem/ActorSystem/actActorParamMgr.h" #include "KingSystem/Resource/GeneralParamList/resGParamListObject.h" +#include "KingSystem/Resource/GeneralParamList/resGParamListObjectAttackInterval.h" #include "KingSystem/Resource/GeneralParamList/resGParamListObjectEnemy.h" #include "KingSystem/Resource/GeneralParamList/resGParamListObjectEnemyLevel.h" #include "KingSystem/Resource/GeneralParamList/resGParamListObjectEnemyRace.h" @@ -47,6 +48,8 @@ bool GParamList::parse_(u8* data, size_t, sead::Heap* heap) { add(archive.getRootList(), "Enemy", heap, dummy_list); add(archive.getRootList(), "EnemyLevel", heap, dummy_list); add(archive.getRootList(), "EnemyRace", heap, dummy_list); + add(archive.getRootList(), "AttackInterval", heap, + dummy_list); // TODO: the rest