diff --git a/CMakeLists.txt b/CMakeLists.txt index 4866a424..c2ea6c30 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,6 +64,8 @@ add_executable(uking src/KingSystem/MessageSystem/mesTransceiver.h src/KingSystem/Resource/GeneralParamList/resGParamListObject.h + src/KingSystem/Resource/GeneralParamList/resGParamListObjectGeneral.h + src/KingSystem/Resource/GeneralParamList/resGParamListObjectSystem.h src/KingSystem/Resource/GeneralParamList/resGParamListObjectTraveler.cpp src/KingSystem/Resource/GeneralParamList/resGParamListObjectTraveler.h src/KingSystem/Resource/GeneralParamList/resGParamListTraits.h diff --git a/data/uking_functions.csv b/data/uking_functions.csv index ed3c0bf2..5fb32daa 100644 --- a/data/uking_functions.csv +++ b/data/uking_functions.csv @@ -89058,7 +89058,7 @@ 0x000000710118bc20,nullsub_4619,4,_ZThn632_N4ksys3res15DummyGParamList9doCreate_EPhjPN4sead4HeapE 0x000000710118bc24,sub_710118BC24,24,_ZN4ksys3res15DummyGParamList6parse_EPhmPN4sead4HeapE 0x000000710118bc3c,sub_710118BC3C,28,_ZThn632_N4ksys3res15DummyGParamList6parse_EPhmPN4sead4HeapE -0x000000710118bc58,BgparamlistObjectGeneral::ctor,764, +0x000000710118bc58,BgparamlistObjectGeneral::ctor,764,_ZN4ksys3res23GParamListObjectGeneralC2Ev 0x000000710118bf54,BgparamlistObjectEnemy::ctor,1440, 0x000000710118c4f4,BgparamlistObjectEnemyLevel::ctor,936, 0x000000710118c89c,BgparamlistObjectEnemyRace::ctor,2780, @@ -89145,8 +89145,8 @@ 0x00000071011a7b1c,sub_71011A7B1C,36,_ZThn632_N4ksys3res15DummyGParamListD0Ev 0x00000071011a7b40,sub_71011A7B40,52,_ZThn664_N4ksys3res15DummyGParamListD1Ev 0x00000071011a7b74,sub_71011A7B74,40,_ZThn664_N4ksys3res15DummyGParamListD0Ev -0x00000071011a7b9c,sub_71011A7B9C,12, -0x00000071011a7ba8,sub_71011A7BA8,12, +0x00000071011a7b9c,sub_71011A7B9C,12,_ZNK4ksys3res22GParamListObjectSystem7getNameEv +0x00000071011a7ba8,sub_71011A7BA8,12,_ZNK4ksys3res23GParamListObjectGeneral7getNameEv 0x00000071011a7bb4,sub_71011A7BB4,12, 0x00000071011a7bc0,sub_71011A7BC0,12, 0x00000071011a7bcc,sub_71011A7BCC,12, diff --git a/src/KingSystem/Resource/GeneralParamList/resGParamListObjectGeneral.h b/src/KingSystem/Resource/GeneralParamList/resGParamListObjectGeneral.h new file mode 100644 index 00000000..60fe0160 --- /dev/null +++ b/src/KingSystem/Resource/GeneralParamList/resGParamListObjectGeneral.h @@ -0,0 +1,38 @@ +#pragma once + +#include +#include "KingSystem/Resource/GeneralParamList/resGParamListObject.h" +#include "KingSystem/Utils/Types.h" + +namespace ksys::res { + +class GParamListObjectGeneral : public GParamListObject { +public: + GParamListObjectGeneral(); + const char* getName() const override { return "General"; } + + agl::utl::Parameter mSpeed; + agl::utl::Parameter mLife; + agl::utl::Parameter mIsLifeInfinite; + agl::utl::Parameter mElectricalDischarge; + agl::utl::Parameter mIsBurnOutBorn; + agl::utl::Parameter mBurnOutBornName; + agl::utl::Parameter mIsBurnOutBornIdent; + agl::utl::Parameter mChangeDropTableName; +}; +KSYS_CHECK_SIZE_NX150(GParamListObjectGeneral, 0x148); + +inline GParamListObjectGeneral::GParamListObjectGeneral() { + auto* const obj = &mObj; + + mSpeed.init(1.0, "Speed", "", obj); + mLife.init(100, "Life", "", obj); + mIsLifeInfinite.init(false, "IsLifeInfinite", "", obj); + mElectricalDischarge.init(1.0, "ElectricalDischarge", "", obj); + mIsBurnOutBorn.init(false, "IsBurnOutBorn", "", obj); + mBurnOutBornName.init("", "BurnOutBornName", "", obj); + mIsBurnOutBornIdent.init(false, "IsBurnOutBornIdent", "", obj); + mChangeDropTableName.init("", "ChangeDropTableName", "", obj); +} + +} // namespace ksys::res diff --git a/src/KingSystem/Resource/GeneralParamList/resGParamListObjectSystem.h b/src/KingSystem/Resource/GeneralParamList/resGParamListObjectSystem.h new file mode 100644 index 00000000..fcfaee37 --- /dev/null +++ b/src/KingSystem/Resource/GeneralParamList/resGParamListObjectSystem.h @@ -0,0 +1,26 @@ +#pragma once + +#include +#include "KingSystem/Resource/GeneralParamList/resGParamListObject.h" +#include "KingSystem/Utils/Types.h" + +namespace ksys::res { + +class GParamListObjectSystem : public GParamListObject { +public: + GParamListObjectSystem(); + const char* getName() const override { return "System"; } + + agl::utl::Parameter mSameGroupActorName; + agl::utl::Parameter mIsGetItemSelf; +}; +KSYS_CHECK_SIZE_NX150(GParamListObjectSystem, 0x80); + +inline GParamListObjectSystem::GParamListObjectSystem() { + auto* const obj = &mObj; + + mSameGroupActorName.init("", "SameGroupActorName", "", obj); + mIsGetItemSelf.init(false, "IsGetItemSelf", "", obj); +} + +} // namespace ksys::res diff --git a/src/KingSystem/Resource/resResourceGParamList.cpp b/src/KingSystem/Resource/resResourceGParamList.cpp index 42d1fa36..26c61f9c 100644 --- a/src/KingSystem/Resource/resResourceGParamList.cpp +++ b/src/KingSystem/Resource/resResourceGParamList.cpp @@ -3,6 +3,8 @@ #include #include #include "KingSystem/Resource/GeneralParamList/resGParamListObject.h" +#include "KingSystem/Resource/GeneralParamList/resGParamListObjectGeneral.h" +#include "KingSystem/Resource/GeneralParamList/resGParamListObjectSystem.h" #include "KingSystem/Resource/GeneralParamList/resGParamListTraits.h" namespace ksys::res { @@ -37,7 +39,10 @@ bool GParamList::parse_(u8* data, size_t, sead::Heap* heap) { const agl::utl::ResParameterArchive archive{data}; - // TODO: System, etc. + add(archive.getRootList(), "System", heap, dummy_list); + add(archive.getRootList(), "General", heap, dummy_list); + + // TODO: the rest if (data) applyResParameterArchive(archive);