summaryrefslogtreecommitdiff
path: root/src/KingSystem/ActorSystem/actActorUtil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/KingSystem/ActorSystem/actActorUtil.cpp')
-rw-r--r--src/KingSystem/ActorSystem/actActorUtil.cpp20
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