diff --git a/data/uking_functions.csv b/data/uking_functions.csv index f2bdc4a4..67a2f8fb 100644 --- a/data/uking_functions.csv +++ b/data/uking_functions.csv @@ -80407,7 +80407,7 @@ Address,Quality,Size,Name 0x0000007100ee788c,U,000036,Actor::createDrops 0x0000007100ee78b0,U,001192,eco::getEcosystemActorName 0x0000007100ee7d58,U,000344,eco::sub_7100EE7D58 -0x0000007100ee7eb0,O,000056,_ZN4ksys3eco18currentAreaNumIs64ERKN4sead7Vector3IfEE +0x0000007100ee7eb0,O,000056,_ZN4ksys3act22isInSatoriMountainAreaERKN4sead7Vector3IfEE 0x0000007100ee7ee8,U,002112, 0x0000007100ee8728,U,000388, 0x0000007100ee88ac,U,000200,wm::isRainingOrSnowingOrThunderStorm 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 diff --git a/src/KingSystem/Ecosystem/CMakeLists.txt b/src/KingSystem/Ecosystem/CMakeLists.txt index f45f7d24..5da05cec 100644 --- a/src/KingSystem/Ecosystem/CMakeLists.txt +++ b/src/KingSystem/Ecosystem/CMakeLists.txt @@ -3,6 +3,4 @@ target_sources(uking PRIVATE ecoLevelSensor.h ecoSystem.cpp ecoSystem.h - ecoUtil.cpp - ecoUtil.h ) diff --git a/src/KingSystem/Ecosystem/ecoUtil.cpp b/src/KingSystem/Ecosystem/ecoUtil.cpp deleted file mode 100644 index 6ee2731e..00000000 --- a/src/KingSystem/Ecosystem/ecoUtil.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include "KingSystem/Ecosystem/ecoUtil.h" - -namespace ksys::eco { - -bool currentAreaNumIs64(const sead::Vector3f& pos) { - return Ecosystem::instance()->getFieldMapArea(pos.x, pos.z) == 64; -} - -} // namespace ksys::eco diff --git a/src/KingSystem/Ecosystem/ecoUtil.h b/src/KingSystem/Ecosystem/ecoUtil.h deleted file mode 100644 index 225e2de4..00000000 --- a/src/KingSystem/Ecosystem/ecoUtil.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include -#include "KingSystem/Ecosystem/ecoSystem.h" - -namespace ksys::eco { - -bool currentAreaNumIs64(const sead::Vector3f& pos); - -} // namespace ksys::eco diff --git a/src/KingSystem/World/worldTimeMgr.cpp b/src/KingSystem/World/worldTimeMgr.cpp index 0deb6fb6..1c2b5a40 100644 --- a/src/KingSystem/World/worldTimeMgr.cpp +++ b/src/KingSystem/World/worldTimeMgr.cpp @@ -2,7 +2,7 @@ #include #include "KingSystem/ActorSystem/actActorConstDataAccess.h" #include "KingSystem/ActorSystem/actActorSystem.h" -#include "KingSystem/Ecosystem/ecoUtil.h" +#include "KingSystem/ActorSystem/actActorUtil.h" #include "KingSystem/Event/evtManager.h" #include "KingSystem/Event/evtMetadata.h" #include "KingSystem/GameData/gdtManager.h" @@ -590,7 +590,7 @@ void TimeMgr::AnimalMasterController::calc() { if (!player_accessor.hasProc()) break; - if (eco::currentAreaNumIs64(player_accessor.getPreviousPos())) + if (act::isInSatoriMountainArea(player_accessor.getPreviousPos())) break; appearance_hour = sead::GlobalRandom::instance()->getU32(23); @@ -602,7 +602,7 @@ void TimeMgr::AnimalMasterController::calc() { if (!player_accessor.hasProc()) break; - if (eco::currentAreaNumIs64(player_accessor.getPreviousPos())) { + if (act::isInSatoriMountainArea(player_accessor.getPreviousPos())) { state = 0; break; }