2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 22:27: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,8 +11,8 @@ class CAnimTreeTweenBase : public CAnimTreeDoubleChild
static s32 sAdvancementDepth;
protected:
int x1c_flags;
bool x20_31_b1;
bool x20_30_b2 = false;
bool x20_24_b1 : 1;
u8 x20_25_ : 2;
public:
CAnimTreeTweenBase(bool,
const std::weak_ptr<CAnimTreeNode>& a,
@@ -24,7 +24,7 @@ public:
float GetBlendingWeight() const { return VGetBlendingWeight(); }
//void VGetTotalChildWeight(float) const;
void VGetWeightedReaders(rstl::reserved_vector<std::pair<float, std::weak_ptr<IAnimReader>>, 16>& out, float w) const;
float VGetRightChildWeight() const { return GetBlendingWeight(); }
void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut) const;
@@ -33,9 +33,9 @@ public:
zeus::CVector3f VGetOffset(const CSegId& seg) const;
zeus::CQuaternion VGetRotation(const CSegId& seg) const;
std::pair<std::unique_ptr<IAnimReader>, bool> VSimplified();
bool ShouldCullTree() const { return false; }
std::experimental::optional<std::unique_ptr<IAnimReader>> VSimplified();
static bool ShouldCullTree() { return 3 <= sAdvancementDepth; }
static void IncAdvancementDepth() { sAdvancementDepth++; }
static void DecAdvancementDepth() { sAdvancementDepth--; }
};