summaryrefslogtreecommitdiff
path: root/src/KingSystem/ActorSystem
diff options
context:
space:
mode:
authorLéo Lam <leo@leolam.fr>2021-11-24 01:59:32 +0100
committerLéo Lam <leo@leolam.fr>2021-11-24 02:00:49 +0100
commitc0a79e67eeb8bc7f41889cc0fc9ea1808cf6341e (patch)
tree48dce368a923554d507f6179cb1a14cc875e633f /src/KingSystem/ActorSystem
parent022f029db1ef03d900fb54bad0807939c9695720 (diff)
ksys: Merge EcoUtil into ActorUtil
The "is in Satori mountain area" function actually appears to be part of ActorUtil (which contains a bunch of actor-related helper functions)
Diffstat (limited to 'src/KingSystem/ActorSystem')
-rw-r--r--src/KingSystem/ActorSystem/actActorUtil.cpp5
-rw-r--r--src/KingSystem/ActorSystem/actActorUtil.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/src/KingSystem/ActorSystem/actActorUtil.cpp b/src/KingSystem/ActorSystem/actActorUtil.cpp
index 75de3637..95062d8e 100644
--- a/src/KingSystem/ActorSystem/actActorUtil.cpp
+++ b/src/KingSystem/ActorSystem/actActorUtil.cpp
@@ -8,6 +8,7 @@
#include "KingSystem/ActorSystem/actBaseProcLink.h"
#include "KingSystem/ActorSystem/actInfoData.h"
#include "KingSystem/ActorSystem/actTag.h"
+#include "KingSystem/Ecosystem/ecoSystem.h"
#include "KingSystem/GameData/gdtManager.h"
#include "KingSystem/Map/mapObject.h"
#include "KingSystem/Map/mapPlacementMgr.h"
@@ -585,4 +586,8 @@ bool getSameGroupActorName(sead::SafeString* name, const sead::SafeString& actor
return true;
}
+bool isInSatoriMountainArea(const sead::Vector3f& pos) {
+ return eco::Ecosystem::instance()->getFieldMapArea(pos.x, pos.z) == 64;
+}
+
} // namespace ksys::act
diff --git a/src/KingSystem/ActorSystem/actActorUtil.h b/src/KingSystem/ActorSystem/actActorUtil.h
index cc642e99..e940f301 100644
--- a/src/KingSystem/ActorSystem/actActorUtil.h
+++ b/src/KingSystem/ActorSystem/actActorUtil.h
@@ -167,4 +167,6 @@ bool getSameGroupActorName(sead::SafeString* name, const sead::SafeString& actor
s32 getSelectedChoiceIdx(s32 max, const char* query_name);
+bool isInSatoriMountainArea(const sead::Vector3f& pos);
+
} // namespace ksys::act