diff options
Diffstat (limited to 'src/KingSystem/ActorSystem/actInfoData.cpp')
| -rw-r--r-- | src/KingSystem/ActorSystem/actInfoData.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/KingSystem/ActorSystem/actInfoData.cpp b/src/KingSystem/ActorSystem/actInfoData.cpp index 028cb26e..a36aeb30 100644 --- a/src/KingSystem/ActorSystem/actInfoData.cpp +++ b/src/KingSystem/ActorSystem/actInfoData.cpp @@ -6,6 +6,7 @@ #include "KingSystem/ActorSystem/actDebug.h" #include "KingSystem/Event/evtEvent.h" #include "KingSystem/Event/evtManager.h" +#include "KingSystem/Resource/resResourceModelList.h" #include "KingSystem/Utils/Byaml/Byaml.h" #include "KingSystem/Utils/Byaml/ByamlArrayIter.h" #include "KingSystem/Utils/Byaml/ByamlData.h" @@ -215,17 +216,6 @@ const char* InfoData::getStringByKey(const al::ByamlIter& iter, const char* key, return iter.tryGetStringByKey(&value, key) ? value : default_.cstr(); } -[[gnu::noinline]] static InfoData::Locator::Type -getLocatorTypeFromStr(const sead::SafeString& type) { - static constexpr const char* types[] = {"Trunk", "Branch", "GlowStone", - "OnTree", "MagnePos", "StopTimerPos"}; - for (s32 i = 0; i < s32(std::size(types)); ++i) { - if (type == types[i]) - return InfoData::Locator::Type(i); - } - return InfoData::Locator::Type::Invalid; -} - void InfoData::getLocators(const char* actor, Locators& info) const { info.num = 0; @@ -255,7 +245,8 @@ void InfoData::getLocators(const char* actor, Locators& info) const { it.tryGetFloatByKey(&locator.rot.z, "rot_z"); it.tryGetStringByKey(&type_str, "type"); - locator.type = type_str ? getLocatorTypeFromStr(type_str) : Locator::Type::Invalid; + locator.type = + type_str ? res::ModelList::getLocatorTypeFromStr(type_str) : Locator::Type::Invalid; locator.rot *= 2 * sead::numbers::pi / 360.0; } |
