2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 09:47:43 +00:00

Various bug fixes and CAnimTree implementations

This commit is contained in:
Jack Andersen
2018-01-03 18:17:44 -10:00
parent 53bb9f1ba0
commit 99fc9e3598
38 changed files with 339 additions and 140 deletions

View File

@@ -11,19 +11,23 @@ class CAnimTreeDoubleChild : public CAnimTreeNode
public:
class CDoubleChildAdvancementResult
{
CCharAnimTime x0_;
SAdvancementDeltas x8_;
SAdvancementDeltas x24_;
CCharAnimTime x0_trueAdvancement;
SAdvancementDeltas x8_leftDeltas;
SAdvancementDeltas x24_rightDeltas;
public:
CDoubleChildAdvancementResult(const CCharAnimTime&, const SAdvancementDeltas&, const SAdvancementDeltas);
void GetLeftAdvancementDeltas() const;
void GetRightAdvancementDeltas() const;
void GetTrueAdvancement() const;
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; }
};
protected:
std::shared_ptr<CAnimTreeNode> x14_a;
std::shared_ptr<CAnimTreeNode> x18_b;
CDoubleChildAdvancementResult AdvanceViewBothChildren(const CCharAnimTime& time, bool runLeft, bool loopLeft);
public:
CAnimTreeDoubleChild(const std::weak_ptr<CAnimTreeNode>& a, const std::weak_ptr<CAnimTreeNode>& b,
std::string_view name);
@@ -42,10 +46,8 @@ public:
CAnimTreeEffectiveContribution VGetContributionOfHighestInfluence() const;
u32 VGetNumChildren() const;
std::shared_ptr<IAnimReader> VGetBestUnblendedChild() const;
void VGetWeightedReaders(std::vector<std::pair<float, std::weak_ptr<IAnimReader>>>& out, float w) const;
void VGetWeightedReaders(rstl::reserved_vector<std::pair<float, std::weak_ptr<IAnimReader>>, 16>& out, float w) const;
//virtual float VGetTotalChildWeight(float) const = 0;
//float GetTotalChildWeight(float f) const { return VGetTotalChildWeight(f); }
virtual float VGetRightChildWeight() const = 0;
float GetRightChildWeight() const { return VGetRightChildWeight(); }