diff options
| author | Léo Lam <leo@leolam.fr> | 2020-12-02 18:28:58 +0100 |
|---|---|---|
| committer | Léo Lam <leo@leolam.fr> | 2020-12-02 18:34:18 +0100 |
| commit | 581b3ef144554b7046c21a5b3ab7a4542f3efe77 (patch) | |
| tree | 894de04fe059b2c8629f6caf8634620715d3de5e /src/KingSystem/ActorSystem/actActorUtil.cpp | |
| parent | e6a46d8300821c630e3fa60dccfa5ce38ecde4b4 (diff) | |
ksys/act: Add ActorUtil header (and one function implementation)
Diffstat (limited to 'src/KingSystem/ActorSystem/actActorUtil.cpp')
| -rw-r--r-- | src/KingSystem/ActorSystem/actActorUtil.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/KingSystem/ActorSystem/actActorUtil.cpp b/src/KingSystem/ActorSystem/actActorUtil.cpp new file mode 100644 index 00000000..69f6f51f --- /dev/null +++ b/src/KingSystem/ActorSystem/actActorUtil.cpp @@ -0,0 +1,20 @@ +#include "KingSystem/ActorSystem/actActorUtil.h" +#include "KingSystem/ActorSystem/actActor.h" +#include "KingSystem/ActorSystem/actActorParam.h" +#include "KingSystem/ActorSystem/actInfoData.h" +#include "KingSystem/Resource/resResourceActorLink.h" + +namespace ksys::act { + +bool hasTag(Actor* actor, const sead::SafeString& tag) { + if (!actor) + return false; + return actor->getParam()->getRes().mActorLink->hasTag(tag.cstr()); +} + +bool hasTag(const sead::SafeString& actor, const sead::SafeString& tag) { + auto* data = InfoData::instance(); + return data && data->hasTag(actor.cstr(), tag.cstr()); +} + +} // namespace ksys::act |
