2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2016-04-10 21:22:59 +00:00
|
|
|
|
2019-09-28 02:53:03 +00:00
|
|
|
#include <memory>
|
|
|
|
#include <string_view>
|
|
|
|
|
|
|
|
#include "Runtime/rstl.hpp"
|
|
|
|
#include "Runtime/Character/CAnimTreeNode.hpp"
|
2016-04-11 03:59:54 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace urde {
|
2016-04-10 21:22:59 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CAnimTreeDoubleChild : public CAnimTreeNode {
|
2016-09-14 05:45:46 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
class CDoubleChildAdvancementResult {
|
|
|
|
CCharAnimTime x0_trueAdvancement;
|
|
|
|
SAdvancementDeltas x8_leftDeltas;
|
|
|
|
SAdvancementDeltas x24_rightDeltas;
|
|
|
|
|
|
|
|
public:
|
|
|
|
CDoubleChildAdvancementResult(const CCharAnimTime& trueAdvancement, const SAdvancementDeltas& leftDeltas,
|
|
|
|
const SAdvancementDeltas& rightDeltas)
|
|
|
|
: x0_trueAdvancement(trueAdvancement), x8_leftDeltas(leftDeltas), x24_rightDeltas(rightDeltas) {}
|
|
|
|
const SAdvancementDeltas& GetLeftAdvancementDeltas() const { return x8_leftDeltas; }
|
|
|
|
const SAdvancementDeltas& GetRightAdvancementDeltas() const { return x24_rightDeltas; }
|
|
|
|
const CCharAnimTime& GetTrueAdvancement() const { return x0_trueAdvancement; }
|
|
|
|
};
|
|
|
|
|
2016-09-10 04:50:00 +00:00
|
|
|
protected:
|
2018-12-08 05:30:43 +00:00
|
|
|
std::shared_ptr<CAnimTreeNode> x14_a;
|
|
|
|
std::shared_ptr<CAnimTreeNode> x18_b;
|
2016-09-11 18:40:33 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
CDoubleChildAdvancementResult AdvanceViewBothChildren(const CCharAnimTime& time, bool runLeft, bool loopLeft);
|
2018-01-04 04:17:44 +00:00
|
|
|
|
2016-04-11 03:59:54 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CAnimTreeDoubleChild(const std::weak_ptr<CAnimTreeNode>& a, const std::weak_ptr<CAnimTreeNode>& b,
|
|
|
|
std::string_view name);
|
2019-08-09 19:46:49 +00:00
|
|
|
SAdvancementResults VAdvanceView(const CCharAnimTime& a) override;
|
|
|
|
u32 VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32 capacity, u32 iterator, u32) const override;
|
|
|
|
u32 VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32 capacity, u32 iterator,
|
|
|
|
u32) const override;
|
|
|
|
u32 VGetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32 capacity, u32 iterator,
|
|
|
|
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;
|
|
|
|
void VSetPhase(float) override;
|
|
|
|
SAdvancementResults VGetAdvancementResults(const CCharAnimTime& a, const CCharAnimTime& b) const override;
|
|
|
|
u32 Depth() const override;
|
|
|
|
CAnimTreeEffectiveContribution VGetContributionOfHighestInfluence() const override;
|
|
|
|
u32 VGetNumChildren() const override;
|
|
|
|
std::shared_ptr<IAnimReader> VGetBestUnblendedChild() const override;
|
|
|
|
void VGetWeightedReaders(rstl::reserved_vector<std::pair<float, std::weak_ptr<IAnimReader>>, 16>& out,
|
|
|
|
float w) const override;
|
2018-12-08 05:30:43 +00:00
|
|
|
|
|
|
|
virtual float VGetRightChildWeight() const = 0;
|
|
|
|
float GetRightChildWeight() const { return VGetRightChildWeight(); }
|
|
|
|
|
|
|
|
const std::shared_ptr<CAnimTreeNode>& GetLeftChild() const { return x14_a; }
|
|
|
|
const std::shared_ptr<CAnimTreeNode>& GetRightChild() const { return x18_b; }
|
2016-04-10 21:22:59 +00:00
|
|
|
};
|
2018-12-08 05:30:43 +00:00
|
|
|
} // namespace urde
|