diff options
| author | Léo Lam <leo@leolam.fr> | 2021-01-05 19:31:28 +0100 |
|---|---|---|
| committer | Léo Lam <leo@leolam.fr> | 2021-01-07 15:32:59 +0100 |
| commit | b9d37afa1c7b9aecfc4132fcf8e0d0cb236a20f2 (patch) | |
| tree | 4ccfd22fc1a16f845ea12bd755f2d50ac369539d /src/KingSystem/ActorSystem/actActorUtil.cpp | |
| parent | b3fa7ae23025439180094ed42935043709f6461f (diff) | |
ksys/act: Add SameGroupActorName getters
Diffstat (limited to 'src/KingSystem/ActorSystem/actActorUtil.cpp')
| -rw-r--r-- | src/KingSystem/ActorSystem/actActorUtil.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
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 |
