diff --git a/Runtime/Character/CAnimSourceReader.cpp b/Runtime/Character/CAnimSourceReader.cpp index e9c194da7..29c01fb9e 100644 --- a/Runtime/Character/CAnimSourceReader.cpp +++ b/Runtime/Character/CAnimSourceReader.cpp @@ -172,7 +172,7 @@ u32 CAnimSourceReaderBase::VGetSoundPOIList(const CCharAnimTime& time, CSoundPOI return 0; } -bool CAnimSourceReaderBase::VGetBoolPOIState(const char* name) const { +bool CAnimSourceReaderBase::VGetBoolPOIState(std::string_view name) const { const auto iter = std::find_if(x24_boolStates.cbegin(), x24_boolStates.cend(), [name](const auto& entry) { return entry.first == name; }); @@ -183,7 +183,7 @@ bool CAnimSourceReaderBase::VGetBoolPOIState(const char* name) const { return iter->second; } -s32 CAnimSourceReaderBase::VGetInt32POIState(const char* name) const { +s32 CAnimSourceReaderBase::VGetInt32POIState(std::string_view name) const { const auto iter = std::find_if(x34_int32States.cbegin(), x34_int32States.cend(), [name](const auto& entry) { return entry.first == name; }); @@ -194,7 +194,7 @@ s32 CAnimSourceReaderBase::VGetInt32POIState(const char* name) const { return iter->second; } -CParticleData::EParentedMode CAnimSourceReaderBase::VGetParticlePOIState(const char* name) const { +CParticleData::EParentedMode CAnimSourceReaderBase::VGetParticlePOIState(std::string_view name) const { const auto iter = std::find_if(x44_particleStates.cbegin(), x44_particleStates.cend(), [name](const auto& entry) { return entry.first == name; }); diff --git a/Runtime/Character/CAnimSourceReader.hpp b/Runtime/Character/CAnimSourceReader.hpp index 5b55e5fb7..2628f3655 100644 --- a/Runtime/Character/CAnimSourceReader.hpp +++ b/Runtime/Character/CAnimSourceReader.hpp @@ -68,9 +68,9 @@ public: u32) const override; u32 VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity, u32 iterator, u32) const override; - bool VGetBoolPOIState(const char* name) const override; - s32 VGetInt32POIState(const char* name) const override; - CParticleData::EParentedMode VGetParticlePOIState(const char* name) const override; + bool VGetBoolPOIState(std::string_view name) const override; + s32 VGetInt32POIState(std::string_view name) const override; + CParticleData::EParentedMode VGetParticlePOIState(std::string_view name) const override; using IAnimReader::VGetOffset; virtual zeus::CVector3f VGetOffset(const CSegId& seg, const CCharAnimTime& b) const = 0; diff --git a/Runtime/Character/CAnimTreeAnimReaderContainer.cpp b/Runtime/Character/CAnimTreeAnimReaderContainer.cpp index d624dcda5..f508095a8 100644 --- a/Runtime/Character/CAnimTreeAnimReaderContainer.cpp +++ b/Runtime/Character/CAnimTreeAnimReaderContainer.cpp @@ -58,15 +58,15 @@ u32 CAnimTreeAnimReaderContainer::VGetSoundPOIList(const CCharAnimTime& time, CS return x14_reader->GetSoundPOIList(time, listOut, capacity, iterator, unk); } -bool CAnimTreeAnimReaderContainer::VGetBoolPOIState(const char* name) const { +bool CAnimTreeAnimReaderContainer::VGetBoolPOIState(std::string_view name) const { return x14_reader->VGetBoolPOIState(name); } -s32 CAnimTreeAnimReaderContainer::VGetInt32POIState(const char* name) const { +s32 CAnimTreeAnimReaderContainer::VGetInt32POIState(std::string_view name) const { return x14_reader->VGetInt32POIState(name); } -CParticleData::EParentedMode CAnimTreeAnimReaderContainer::VGetParticlePOIState(const char* name) const { +CParticleData::EParentedMode CAnimTreeAnimReaderContainer::VGetParticlePOIState(std::string_view name) const { return x14_reader->VGetParticlePOIState(name); } diff --git a/Runtime/Character/CAnimTreeAnimReaderContainer.hpp b/Runtime/Character/CAnimTreeAnimReaderContainer.hpp index aec904573..5df66319e 100644 --- a/Runtime/Character/CAnimTreeAnimReaderContainer.hpp +++ b/Runtime/Character/CAnimTreeAnimReaderContainer.hpp @@ -37,9 +37,9 @@ public: u32) const override; u32 VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity, u32 iterator, u32) const override; - bool VGetBoolPOIState(const char*) const override; - s32 VGetInt32POIState(const char*) const override; - CParticleData::EParentedMode VGetParticlePOIState(const char*) const override; + bool VGetBoolPOIState(std::string_view name) const override; + s32 VGetInt32POIState(std::string_view name) const override; + CParticleData::EParentedMode VGetParticlePOIState(std::string_view name) const override; void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut) const override; void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut, const CCharAnimTime& time) const override; std::unique_ptr<IAnimReader> VClone() const override; diff --git a/Runtime/Character/CAnimTreeDoubleChild.cpp b/Runtime/Character/CAnimTreeDoubleChild.cpp index 2780b1b07..bd401390a 100644 --- a/Runtime/Character/CAnimTreeDoubleChild.cpp +++ b/Runtime/Character/CAnimTreeDoubleChild.cpp @@ -101,11 +101,11 @@ u32 CAnimTreeDoubleChild::VGetSoundPOIList(const CCharAnimTime& time, CSoundPOIN return newCapacity; } -bool CAnimTreeDoubleChild::VGetBoolPOIState(const char* name) const { return x18_b->VGetBoolPOIState(name); } +bool CAnimTreeDoubleChild::VGetBoolPOIState(std::string_view name) const { return x18_b->VGetBoolPOIState(name); } -s32 CAnimTreeDoubleChild::VGetInt32POIState(const char* name) const { return x18_b->VGetInt32POIState(name); } +s32 CAnimTreeDoubleChild::VGetInt32POIState(std::string_view name) const { return x18_b->VGetInt32POIState(name); } -CParticleData::EParentedMode CAnimTreeDoubleChild::VGetParticlePOIState(const char* name) const { +CParticleData::EParentedMode CAnimTreeDoubleChild::VGetParticlePOIState(std::string_view name) const { return x18_b->VGetParticlePOIState(name); } diff --git a/Runtime/Character/CAnimTreeDoubleChild.hpp b/Runtime/Character/CAnimTreeDoubleChild.hpp index 22c4b36e2..aa54957c9 100644 --- a/Runtime/Character/CAnimTreeDoubleChild.hpp +++ b/Runtime/Character/CAnimTreeDoubleChild.hpp @@ -41,9 +41,9 @@ public: u32) const override; u32 VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity, u32 iterator, u32) const override; - bool VGetBoolPOIState(const char* name) const override; - s32 VGetInt32POIState(const char* name) const override; - CParticleData::EParentedMode VGetParticlePOIState(const char* name) const override; + bool VGetBoolPOIState(std::string_view name) const override; + s32 VGetInt32POIState(std::string_view name) const override; + CParticleData::EParentedMode VGetParticlePOIState(std::string_view name) const override; void VSetPhase(float) override; SAdvancementResults VGetAdvancementResults(const CCharAnimTime& a, const CCharAnimTime& b) const override; u32 Depth() const override; diff --git a/Runtime/Character/CAnimTreeSingleChild.cpp b/Runtime/Character/CAnimTreeSingleChild.cpp index a7c9bf851..258225459 100644 --- a/Runtime/Character/CAnimTreeSingleChild.cpp +++ b/Runtime/Character/CAnimTreeSingleChild.cpp @@ -35,11 +35,11 @@ u32 CAnimTreeSingleChild::VGetSoundPOIList(const CCharAnimTime& time, CSoundPOIN return x14_child->GetSoundPOIList(time, listOut, capacity, iterator, unk); } -bool CAnimTreeSingleChild::VGetBoolPOIState(const char* name) const { return x14_child->VGetBoolPOIState(name); } +bool CAnimTreeSingleChild::VGetBoolPOIState(std::string_view name) const { return x14_child->VGetBoolPOIState(name); } -s32 CAnimTreeSingleChild::VGetInt32POIState(const char* name) const { return x14_child->VGetInt32POIState(name); } +s32 CAnimTreeSingleChild::VGetInt32POIState(std::string_view name) const { return x14_child->VGetInt32POIState(name); } -CParticleData::EParentedMode CAnimTreeSingleChild::VGetParticlePOIState(const char* name) const { +CParticleData::EParentedMode CAnimTreeSingleChild::VGetParticlePOIState(std::string_view name) const { return x14_child->VGetParticlePOIState(name); } diff --git a/Runtime/Character/CAnimTreeSingleChild.hpp b/Runtime/Character/CAnimTreeSingleChild.hpp index 1158de80e..801ef9e97 100644 --- a/Runtime/Character/CAnimTreeSingleChild.hpp +++ b/Runtime/Character/CAnimTreeSingleChild.hpp @@ -27,9 +27,9 @@ public: u32) const override; u32 VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity, u32 iterator, u32) const override; - bool VGetBoolPOIState(const char* name) const override; - s32 VGetInt32POIState(const char* name) const override; - CParticleData::EParentedMode VGetParticlePOIState(const char* name) const override; + bool VGetBoolPOIState(std::string_view name) const override; + s32 VGetInt32POIState(std::string_view name) const override; + CParticleData::EParentedMode VGetParticlePOIState(std::string_view name) const override; void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut) const override; void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut, const CCharAnimTime& time) const override; void VSetPhase(float) override; diff --git a/Runtime/Character/CAnimTreeTimeScale.cpp b/Runtime/Character/CAnimTreeTimeScale.cpp index dbf5a754f..c1651e289 100644 --- a/Runtime/Character/CAnimTreeTimeScale.cpp +++ b/Runtime/Character/CAnimTreeTimeScale.cpp @@ -99,11 +99,11 @@ u32 CAnimTreeTimeScale::VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINod return ret; } -bool CAnimTreeTimeScale::VGetBoolPOIState(const char* name) const { return x14_child->VGetBoolPOIState(name); } +bool CAnimTreeTimeScale::VGetBoolPOIState(std::string_view name) const { return x14_child->VGetBoolPOIState(name); } -s32 CAnimTreeTimeScale::VGetInt32POIState(const char* name) const { return x14_child->VGetInt32POIState(name); } +s32 CAnimTreeTimeScale::VGetInt32POIState(std::string_view name) const { return x14_child->VGetInt32POIState(name); } -CParticleData::EParentedMode CAnimTreeTimeScale::VGetParticlePOIState(const char* name) const { +CParticleData::EParentedMode CAnimTreeTimeScale::VGetParticlePOIState(std::string_view name) const { return x14_child->VGetParticlePOIState(name); } diff --git a/Runtime/Character/CAnimTreeTimeScale.hpp b/Runtime/Character/CAnimTreeTimeScale.hpp index a4ba6d016..7439b55de 100644 --- a/Runtime/Character/CAnimTreeTimeScale.hpp +++ b/Runtime/Character/CAnimTreeTimeScale.hpp @@ -34,9 +34,9 @@ public: u32) const override; u32 VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity, u32 iterator, u32) const override; - bool VGetBoolPOIState(const char* name) const override; - s32 VGetInt32POIState(const char* name) const override; - CParticleData::EParentedMode VGetParticlePOIState(const char* name) const override; + bool VGetBoolPOIState(std::string_view name) const override; + s32 VGetInt32POIState(std::string_view name) const override; + CParticleData::EParentedMode VGetParticlePOIState(std::string_view name) const override; CAnimTreeEffectiveContribution VGetContributionOfHighestInfluence() const override; std::shared_ptr<IAnimReader> VGetBestUnblendedChild() const override; diff --git a/Runtime/Character/IAnimReader.hpp b/Runtime/Character/IAnimReader.hpp index 1f4962182..6b419f064 100644 --- a/Runtime/Character/IAnimReader.hpp +++ b/Runtime/Character/IAnimReader.hpp @@ -2,6 +2,7 @@ #include <memory> #include <optional> +#include <string_view> #include "Runtime/CToken.hpp" #include "Runtime/RetroTypes.hpp" @@ -120,9 +121,9 @@ public: u32) const = 0; virtual u32 VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity, u32 iterator, u32) const = 0; - virtual bool VGetBoolPOIState(const char*) const = 0; - virtual s32 VGetInt32POIState(const char*) const = 0; - virtual CParticleData::EParentedMode VGetParticlePOIState(const char*) const = 0; + virtual bool VGetBoolPOIState(std::string_view name) const = 0; + virtual s32 VGetInt32POIState(std::string_view name) const = 0; + virtual CParticleData::EParentedMode VGetParticlePOIState(std::string_view name) const = 0; virtual void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut) const = 0; virtual void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut, const CCharAnimTime& time) const = 0;