diff --git a/data/uking_functions.csv b/data/uking_functions.csv index e1e814c2..e059db8e 100644 --- a/data/uking_functions.csv +++ b/data/uking_functions.csv @@ -80336,10 +80336,10 @@ 0x0000007100ee428c,callGetDemoHandler,36, 0x0000007100ee42b0,callGetDemoHandler2,24, 0x0000007100ee42c8,getStr_AtvKeyActorSaveDataIndex,12, -0x0000007100ee42d4,sub_7100EE42D4,92, -0x0000007100ee4330,act::getSameGroupActorName,84, -0x0000007100ee4384,sub_7100EE4384,144, -0x0000007100ee4414,getSameGroupActorName,172, +0x0000007100ee42d4,sub_7100EE42D4,92,_ZN4ksys3act21getSameGroupActorNameEPN4sead14SafeStringBaseIcEEPNS0_12BaseProcLinkE +0x0000007100ee4330,act::getSameGroupActorName,84,_ZN4ksys3act21getSameGroupActorNameEPN4sead14SafeStringBaseIcEEPNS0_5ActorE +0x0000007100ee4384,sub_7100EE4384,144,_ZN4ksys3act21getSameGroupActorNameEPN4sead14SafeStringBaseIcEERKS3_PN2al9ByamlIterE +0x0000007100ee4414,getSameGroupActorName,172,_ZN4ksys3act21getSameGroupActorNameEPN4sead14SafeStringBaseIcEERKS3_ 0x0000007100ee44c0,setCheckWeaponFreeSlotHandlerB,16, 0x0000007100ee44d0,setCheckWeaponFreeSlotHandlerA,16, 0x0000007100ee44e0,callCheckWeaponFreeSlotHandler,40, diff --git a/lib/sead b/lib/sead index d0635a9d..f25b28df 160000 --- a/lib/sead +++ b/lib/sead @@ -1 +1 @@ -Subproject commit d0635a9d2fdcaa6b5b9446de22c6691f05b4adef +Subproject commit f25b28df0aa6d8b7be5f66d697511306d8866545 diff --git a/src/KingSystem/ActorSystem/actActorUtil.cpp b/src/KingSystem/ActorSystem/actActorUtil.cpp index 61b97fef..16ab1640 100644 --- a/src/KingSystem/ActorSystem/actActorUtil.cpp +++ b/src/KingSystem/ActorSystem/actActorUtil.cpp @@ -525,4 +525,33 @@ bool isAirOctaWoodPlatformDlc(const sead::SafeString& name) { name == "FldObj_DLC_FlyShield_Wood_A_Snow_02"; } +bool getSameGroupActorName(sead::SafeString* name, BaseProcLink* link) { + return getAccessor(link).getSameGroupActorName(name); +} + +bool getSameGroupActorName(sead::SafeString* name, Actor* actor) { + return getAccessor(actor).getSameGroupActorName(name); +} + +bool getSameGroupActorName(sead::SafeString* name, const sead::SafeString& default_value, + al::ByamlIter* actor_info) { + const sead::SafeString value = InfoData::instance()->getSameGroupActorName(*actor_info); + if (value.isEmpty()) { + *name = default_value; + return false; + } + *name = value; + return true; +} + +bool getSameGroupActorName(sead::SafeString* name, const sead::SafeString& actor_name) { + const sead::SafeString value = InfoData::instance()->getSameGroupActorName(actor_name.cstr()); + if (value.isEmpty()) { + *name = actor_name; + return false; + } + *name = value; + return true; +} + } // namespace ksys::act diff --git a/src/KingSystem/ActorSystem/actActorUtil.h b/src/KingSystem/ActorSystem/actActorUtil.h index ab71fe3c..cbc51e5a 100644 --- a/src/KingSystem/ActorSystem/actActorUtil.h +++ b/src/KingSystem/ActorSystem/actActorUtil.h @@ -156,4 +156,10 @@ bool isAirOctaWoodPlatformDlc(const sead::SafeString& name); const sead::SafeString& getDefaultDropActor(); +bool getSameGroupActorName(sead::SafeString* name, BaseProcLink* link); +bool getSameGroupActorName(sead::SafeString* name, Actor* actor); +bool getSameGroupActorName(sead::SafeString* name, const sead::SafeString& default_value, + al::ByamlIter* actor_info); +bool getSameGroupActorName(sead::SafeString* name, const sead::SafeString& actor_name); + } // namespace ksys::act