2020-01-15 12:07:48 +00:00
|
|
|
#include "Runtime/Character/CAnimTreeAnimReaderContainer.hpp"
|
|
|
|
|
|
|
|
#include "Runtime/Character/CFBStreamedAnimReader.hpp"
|
2016-08-27 04:54:53 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace urde {
|
2016-08-27 04:54:53 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
CAnimTreeAnimReaderContainer::CAnimTreeAnimReaderContainer(std::string_view name, std::shared_ptr<IAnimReader> reader,
|
2016-08-27 04:54:53 +00:00
|
|
|
u32 dbIdx)
|
2020-03-09 15:06:17 +00:00
|
|
|
: CAnimTreeNode(name), x14_reader(std::move(reader)), x1c_animDbIdx(dbIdx) {}
|
2016-08-27 04:54:53 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
u32 CAnimTreeAnimReaderContainer::Depth() const { return 1; }
|
2016-08-27 21:16:44 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
CAnimTreeEffectiveContribution CAnimTreeAnimReaderContainer::VGetContributionOfHighestInfluence() const {
|
|
|
|
return {1.f, x4_name, VGetSteadyStateAnimInfo(), VGetTimeRemaining(), x1c_animDbIdx};
|
2016-08-27 04:54:53 +00:00
|
|
|
}
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
u32 CAnimTreeAnimReaderContainer::VGetNumChildren() const { return 0; }
|
2016-08-27 21:16:44 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
std::shared_ptr<IAnimReader> CAnimTreeAnimReaderContainer::VGetBestUnblendedChild() const { return {}; }
|
2016-08-27 21:16:44 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
SAdvancementResults CAnimTreeAnimReaderContainer::VAdvanceView(const CCharAnimTime& dt) {
|
|
|
|
return x14_reader->VAdvanceView(dt);
|
2016-08-27 04:54:53 +00:00
|
|
|
}
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
CCharAnimTime CAnimTreeAnimReaderContainer::VGetTimeRemaining() const { return x14_reader->VGetTimeRemaining(); }
|
2016-08-27 04:54:53 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
CSteadyStateAnimInfo CAnimTreeAnimReaderContainer::VGetSteadyStateAnimInfo() const {
|
|
|
|
return x14_reader->VGetSteadyStateAnimInfo();
|
2016-08-27 04:54:53 +00:00
|
|
|
}
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
bool CAnimTreeAnimReaderContainer::VHasOffset(const CSegId& seg) const { return x14_reader->VHasOffset(seg); }
|
2016-08-27 04:54:53 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
zeus::CVector3f CAnimTreeAnimReaderContainer::VGetOffset(const CSegId& seg) const {
|
|
|
|
return x14_reader->VGetOffset(seg);
|
2016-08-27 04:54:53 +00:00
|
|
|
}
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
zeus::CQuaternion CAnimTreeAnimReaderContainer::VGetRotation(const CSegId& seg) const {
|
|
|
|
return x14_reader->VGetRotation(seg);
|
2016-08-27 04:54:53 +00:00
|
|
|
}
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
u32 CAnimTreeAnimReaderContainer::VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32 capacity,
|
|
|
|
u32 iterator, u32 unk) const {
|
|
|
|
return x14_reader->GetBoolPOIList(time, listOut, capacity, iterator, unk);
|
2016-08-27 04:54:53 +00:00
|
|
|
}
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
u32 CAnimTreeAnimReaderContainer::VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32 capacity,
|
|
|
|
u32 iterator, u32 unk) const {
|
|
|
|
return x14_reader->GetInt32POIList(time, listOut, capacity, iterator, unk);
|
2016-08-27 04:54:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
u32 CAnimTreeAnimReaderContainer::VGetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut,
|
2018-12-08 05:30:43 +00:00
|
|
|
u32 capacity, u32 iterator, u32 unk) const {
|
|
|
|
return x14_reader->GetParticlePOIList(time, listOut, capacity, iterator, unk);
|
2016-08-27 04:54:53 +00:00
|
|
|
}
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
u32 CAnimTreeAnimReaderContainer::VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity,
|
|
|
|
u32 iterator, u32 unk) const {
|
|
|
|
return x14_reader->GetSoundPOIList(time, listOut, capacity, iterator, unk);
|
2016-08-27 04:54:53 +00:00
|
|
|
}
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
bool CAnimTreeAnimReaderContainer::VGetBoolPOIState(const char* name) const {
|
|
|
|
return x14_reader->VGetBoolPOIState(name);
|
2016-08-27 04:54:53 +00:00
|
|
|
}
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
s32 CAnimTreeAnimReaderContainer::VGetInt32POIState(const char* name) const {
|
|
|
|
return x14_reader->VGetBoolPOIState(name);
|
2016-08-27 04:54:53 +00:00
|
|
|
}
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
CParticleData::EParentedMode CAnimTreeAnimReaderContainer::VGetParticlePOIState(const char* name) const {
|
|
|
|
return x14_reader->VGetParticlePOIState(name);
|
2016-08-27 04:54:53 +00:00
|
|
|
}
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
void CAnimTreeAnimReaderContainer::VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut) const {
|
|
|
|
return x14_reader->VGetSegStatementSet(list, setOut);
|
2016-08-27 04:54:53 +00:00
|
|
|
}
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
void CAnimTreeAnimReaderContainer::VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut,
|
|
|
|
const CCharAnimTime& time) const {
|
|
|
|
return x14_reader->VGetSegStatementSet(list, setOut, time);
|
2016-08-27 04:54:53 +00:00
|
|
|
}
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
std::unique_ptr<IAnimReader> CAnimTreeAnimReaderContainer::VClone() const {
|
|
|
|
return std::make_unique<CAnimTreeAnimReaderContainer>(x4_name, x14_reader->Clone(), x1c_animDbIdx);
|
2016-08-27 04:54:53 +00:00
|
|
|
}
|
|
|
|
|
2019-06-12 02:05:17 +00:00
|
|
|
std::optional<std::unique_ptr<IAnimReader>> CAnimTreeAnimReaderContainer::VSimplified() { return {}; }
|
2016-08-27 21:16:44 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
void CAnimTreeAnimReaderContainer::VSetPhase(float ph) { x14_reader->VSetPhase(ph); }
|
2016-08-27 04:54:53 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
SAdvancementResults CAnimTreeAnimReaderContainer::VGetAdvancementResults(const CCharAnimTime& a,
|
|
|
|
const CCharAnimTime& b) const {
|
|
|
|
return x14_reader->VGetAdvancementResults(a, b);
|
2016-08-27 04:54:53 +00:00
|
|
|
}
|
|
|
|
|
2018-01-04 04:17:44 +00:00
|
|
|
void CAnimTreeAnimReaderContainer::VGetWeightedReaders(
|
2018-12-08 05:30:43 +00:00
|
|
|
rstl::reserved_vector<std::pair<float, std::weak_ptr<IAnimReader>>, 16>& out, float w) const {
|
|
|
|
out.emplace_back(std::make_pair(w, x14_reader));
|
2018-01-04 04:17:44 +00:00
|
|
|
}
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
} // namespace urde
|