diff --git a/CMakeLists.txt b/CMakeLists.txt index 025c8790..02d9b56e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,6 +79,7 @@ add_executable(uking src/KingSystem/Resource/GeneralParamList/resGParamListObjectCamera.h src/KingSystem/Resource/GeneralParamList/resGParamListObjectCookSpice.h src/KingSystem/Resource/GeneralParamList/resGParamListObjectCureItem.h + src/KingSystem/Resource/GeneralParamList/resGParamListObjectEatTarget.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 4b3354fb..11e7569e 100644 --- a/data/uking_functions.csv +++ b/data/uking_functions.csv @@ -89097,7 +89097,7 @@ 0x00000071011981a0,BgparamlistObjectZora::ctor,508,_ZN4ksys3res20GParamListObjectZoraC2Ev 0x000000710119839c,BgparamlistObjectTraveler::ctor,29996,_ZN4ksys3res24GParamListObjectTravelerC1Ev 0x000000710119f8c8,BgparamlistObjectPrey::ctor,508,_ZN4ksys3res20GParamListObjectPreyC2Ev -0x000000710119fac4,BgparamlistObjectEatTarget::ctor,684, +0x000000710119fac4,BgparamlistObjectEatTarget::ctor,684,_ZN4ksys3res25GParamListObjectEatTargetC2Ev 0x000000710119fd70,BgparamlistObjectAnimalUnit::ctor,1380, 0x00000071011a02d4,BgparamlistObjectFish::ctor,500, 0x00000071011a04c8,BgparamlistObjectRope::ctor,820, @@ -89191,7 +89191,7 @@ 0x00000071011a7da0,sub_71011A7DA0,12,_ZNK4ksys3res34GParamListObjectAnimalFollowOffset7getNameEv 0x00000071011a7dac,sub_71011A7DAC,12,_ZNK4ksys3res30GParamListObjectExtendedEntity7getNameEv 0x00000071011a7db8,sub_71011A7DB8,12,_ZNK4ksys3res25GParamListObjectBindActor7getNameEv -0x00000071011a7dc4,sub_71011A7DC4,12, +0x00000071011a7dc4,sub_71011A7DC4,12,_ZNK4ksys3res25GParamListObjectEatTarget7getNameEv 0x00000071011a7dd0,sub_71011A7DD0,12, 0x00000071011a7ddc,sub_71011A7DDC,12, 0x00000071011a7de8,sub_71011A7DE8,12, diff --git a/src/KingSystem/Resource/GeneralParamList/resGParamListObjectEatTarget.h b/src/KingSystem/Resource/GeneralParamList/resGParamListObjectEatTarget.h new file mode 100644 index 00000000..9ae0e3ec --- /dev/null +++ b/src/KingSystem/Resource/GeneralParamList/resGParamListObjectEatTarget.h @@ -0,0 +1,34 @@ +#pragma once + +#include +#include "KingSystem/Resource/GeneralParamList/resGParamListObject.h" +#include "KingSystem/Utils/Types.h" + +namespace ksys::res { + +class GParamListObjectEatTarget : public GParamListObject { +public: + GParamListObjectEatTarget(); + const char* getName() const override { return "EatTarget"; } + + agl::utl::Parameter mFavoriteEatActorNames; + agl::utl::Parameter mFavoriteEatActorTags; + agl::utl::Parameter mEatActorNames; + agl::utl::Parameter mEatActorNames2; + agl::utl::Parameter mEatActorNames3; + agl::utl::Parameter mEatActorTags; +}; +KSYS_CHECK_SIZE_NX150(GParamListObjectEatTarget, 0x128); + +inline GParamListObjectEatTarget::GParamListObjectEatTarget() { + auto* const obj = &mObj; + + mFavoriteEatActorNames.init("", "FavoriteEatActorNames", "", obj); + mFavoriteEatActorTags.init("", "FavoriteEatActorTags", "", obj); + mEatActorNames.init("", "EatActorNames", "", obj); + mEatActorNames2.init("", "EatActorNames2", "", obj); + mEatActorNames3.init("", "EatActorNames3", "", obj); + mEatActorTags.init("", "EatActorTags", "", obj); +} + +} // namespace ksys::res diff --git a/src/KingSystem/Resource/resResourceGParamList.cpp b/src/KingSystem/Resource/resResourceGParamList.cpp index a252c628..ea863236 100644 --- a/src/KingSystem/Resource/resResourceGParamList.cpp +++ b/src/KingSystem/Resource/resResourceGParamList.cpp @@ -18,6 +18,7 @@ #include "KingSystem/Resource/GeneralParamList/resGParamListObjectCamera.h" #include "KingSystem/Resource/GeneralParamList/resGParamListObjectCookSpice.h" #include "KingSystem/Resource/GeneralParamList/resGParamListObjectCureItem.h" +#include "KingSystem/Resource/GeneralParamList/resGParamListObjectEatTarget.h" #include "KingSystem/Resource/GeneralParamList/resGParamListObjectEnemy.h" #include "KingSystem/Resource/GeneralParamList/resGParamListObjectEnemyLevel.h" #include "KingSystem/Resource/GeneralParamList/resGParamListObjectEnemyRace.h" @@ -134,6 +135,7 @@ bool GParamList::parse_(u8* data, size_t, sead::Heap* heap) { add(archive.getRootList(), "ExtendedEntity", heap, dummy_list); add(archive.getRootList(), "BindActor", heap, dummy_list); + add(archive.getRootList(), "EatTarget", heap, dummy_list); // TODO: the rest