diff --git a/Runtime/Character/CAnimTreeDoubleChild.hpp b/Runtime/Character/CAnimTreeDoubleChild.hpp index d37f2a4e6..e363309f7 100644 --- a/Runtime/Character/CAnimTreeDoubleChild.hpp +++ b/Runtime/Character/CAnimTreeDoubleChild.hpp @@ -10,10 +10,10 @@ class CAnimTreeDoubleChild : public CAnimTreeNode { public: SAdvancementResults VAdvanceView(const CCharAnimTime& a); - void VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32, u32, u32) const; - void VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32, u32, u32) const; - void VGetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32, u32, u32) const; - void VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32, u32, u32) const; + u32 VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32 capacity, u32 iterator, u32) const; + u32 VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32 capacity, u32 iterator, u32) const; + u32 VGetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32 capacity, u32 iterator, u32) const; + u32 VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity, u32 iterator, u32) const; void VGetBoolPOIState(const char*) const; void VGetInt32POIState(const char*) const; void VGetParticlePOIState(const char*) const; diff --git a/Runtime/Character/CAnimTreeSingleChild.cpp b/Runtime/Character/CAnimTreeSingleChild.cpp index dc4e12268..5e275b69f 100644 --- a/Runtime/Character/CAnimTreeSingleChild.cpp +++ b/Runtime/Character/CAnimTreeSingleChild.cpp @@ -13,7 +13,7 @@ SAdvancementResults CAnimTreeSingleChild::VAdvanceView(const CCharAnimTime& a) { } -void CAnimTreeSingleChild::VGetTimeRemaining() const +CCharAnimTime CAnimTreeSingleChild::VGetTimeRemaining() const { } @@ -29,27 +29,27 @@ void CAnimTreeSingleChild::VGetRotation(const CSegId& seg) const { } -void CAnimTreeSingleChild::VGetBoolPOIList(const CCharAnimTime& time, - CBoolPOINode* listOut, - u32, u32, u32) const +u32 CAnimTreeSingleChild::VGetBoolPOIList(const CCharAnimTime& time, + CBoolPOINode* listOut, + u32 capacity, u32 iterator, u32) const { } -void CAnimTreeSingleChild::VGetInt32POIList(const CCharAnimTime& time, - CInt32POINode* listOut, - u32, u32, u32) const +u32 CAnimTreeSingleChild::VGetInt32POIList(const CCharAnimTime& time, + CInt32POINode* listOut, + u32 capacity, u32 iterator, u32) const { } -void CAnimTreeSingleChild::VGetParticlePOIList(const CCharAnimTime& time, - CParticlePOINode* listOut, - u32, u32, u32) const +u32 CAnimTreeSingleChild::VGetParticlePOIList(const CCharAnimTime& time, + CParticlePOINode* listOut, + u32 capacity, u32 iterator, u32) const { } -void CAnimTreeSingleChild::VGetSoundPOIList(const CCharAnimTime& time, - CSoundPOINode* listOut, - u32, u32, u32) const +u32 CAnimTreeSingleChild::VGetSoundPOIList(const CCharAnimTime& time, + CSoundPOINode* listOut, + u32 capacity, u32 iterator, u32) const { } diff --git a/Runtime/Character/CAnimTreeSingleChild.hpp b/Runtime/Character/CAnimTreeSingleChild.hpp index 0f9d3547f..dc92ce848 100644 --- a/Runtime/Character/CAnimTreeSingleChild.hpp +++ b/Runtime/Character/CAnimTreeSingleChild.hpp @@ -13,14 +13,14 @@ public: CAnimTreeSingleChild(const std::weak_ptr& node, const std::string& name); SAdvancementResults VAdvanceView(const CCharAnimTime& a); - void VGetTimeRemaining() const; + CCharAnimTime VGetTimeRemaining() const; bool VHasOffset(const CSegId& seg) const; void VGetOffset(const CSegId& seg) const; void VGetRotation(const CSegId& seg) const; - void VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32, u32, u32) const; - void VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32, u32, u32) const; - void VGetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32, u32, u32) const; - void VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32, u32, u32) const; + u32 VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32 capacity, u32 iterator, u32) const; + u32 VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32 capacity, u32 iterator, u32) const; + u32 VGetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32 capacity, u32 iterator, u32) const; + u32 VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity, u32 iterator, u32) const; void VGetBoolPOIState(const char*) const; void VGetInt32POIState(const char*) const; void VGetParticlePOIState(const char*) const; diff --git a/Runtime/Character/CBoolPOINode.hpp b/Runtime/Character/CBoolPOINode.hpp index 671fc187f..1b71d0509 100644 --- a/Runtime/Character/CBoolPOINode.hpp +++ b/Runtime/Character/CBoolPOINode.hpp @@ -12,6 +12,7 @@ class CBoolPOINode : public CPOINode public: CBoolPOINode(); CBoolPOINode(CInputStream& in); + bool GetValue() const {return x38_val;} }; } diff --git a/Runtime/Character/CPOINode.hpp b/Runtime/Character/CPOINode.hpp index 9a599243d..f6ed92823 100644 --- a/Runtime/Character/CPOINode.hpp +++ b/Runtime/Character/CPOINode.hpp @@ -22,6 +22,9 @@ public: CPOINode(const std::string& name, u16, const CCharAnimTime& time, u32 index, bool, float, u32, u32); CPOINode(CInputStream& in); virtual ~CPOINode() = default; + + const std::string& GetName() const {return x8_name;} + const CCharAnimTime& GetTime() const {return x1c_time;} }; } diff --git a/Runtime/Character/IAnimReader.cpp b/Runtime/Character/IAnimReader.cpp index 028d7647d..6cba4bc21 100644 --- a/Runtime/Character/IAnimReader.cpp +++ b/Runtime/Character/IAnimReader.cpp @@ -4,27 +4,44 @@ namespace urde { -SAdvancementResults IAnimReader::VGetAdvancementResults(const CCharAnimTime& a, const CCharAnimTime& b) const +SAdvancementResults +IAnimReader::VGetAdvancementResults(const CCharAnimTime& a, const CCharAnimTime& b) const { SAdvancementResults ret; ret.x0_remTime = a; return ret; } -void IAnimReader::GetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32, u32, u32) const +u32 IAnimReader::GetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, + u32 capacity, u32 iterator, u32 unk) const { + if (time.GreaterThanZero()) + return VGetBoolPOIList(time, listOut, capacity, iterator, unk); + return 0; } -void IAnimReader::GetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32, u32, u32) const +u32 IAnimReader::GetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, + u32 capacity, u32 iterator, u32 unk) const { + if (time.GreaterThanZero()) + return VGetInt32POIList(time, listOut, capacity, iterator, unk); + return 0; } -void IAnimReader::GetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32, u32, u32) const +u32 IAnimReader::GetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, + u32 capacity, u32 iterator, u32 unk) const { + if (time.GreaterThanZero()) + return VGetParticlePOIList(time, listOut, capacity, iterator, unk); + return 0; } -void IAnimReader::GetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32, u32, u32) const +u32 IAnimReader::GetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, + u32 capacity, u32 iterator, u32 unk) const { + if (time.GreaterThanZero()) + return VGetSoundPOIList(time, listOut, capacity, iterator, unk); + return 0; } } diff --git a/Runtime/Character/IAnimReader.hpp b/Runtime/Character/IAnimReader.hpp index e3ce70d08..019621255 100644 --- a/Runtime/Character/IAnimReader.hpp +++ b/Runtime/Character/IAnimReader.hpp @@ -29,15 +29,15 @@ public: virtual ~IAnimReader() = default; virtual bool IsCAnimTreeNode() const {return false;} virtual SAdvancementResults VAdvanceView(const CCharAnimTime& a)=0; - virtual void VGetTimeRemaining() const=0; + virtual CCharAnimTime VGetTimeRemaining() const=0; virtual void VGetSteadyStateAnimInfo() const=0; virtual bool VHasOffset(const CSegId& seg) const=0; virtual void VGetOffset(const CSegId& seg) const=0; virtual void VGetRotation(const CSegId& seg) const=0; - virtual void VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32, u32, u32) const=0; - virtual void VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32, u32, u32) const=0; - virtual void VGetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32, u32, u32) const=0; - virtual void VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32, u32, u32) const=0; + virtual u32 VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32 capacity, u32 iterator, u32) const=0; + virtual u32 VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32 capacity, u32 iterator, u32) const=0; + virtual u32 VGetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32 capacity, u32 iterator, u32) const=0; + virtual u32 VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity, u32 iterator, u32) const=0; virtual void VGetBoolPOIState(const char*) const=0; virtual void VGetInt32POIState(const char*) const=0; virtual void VGetParticlePOIState(const char*) const=0; @@ -52,10 +52,10 @@ public: virtual void VGetNumChildren() const=0; virtual void VGetBestUnblendedChild() const=0; - void GetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32, u32, u32) const; - void GetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32, u32, u32) const; - void GetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32, u32, u32) const; - void GetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32, u32, u32) const; + u32 GetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32 capacity, u32 iterator, u32) const; + u32 GetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32 capacity, u32 iterator, u32) const; + u32 GetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32 capacity, u32 iterator, u32) const; + u32 GetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity, u32 iterator, u32) const; }; } diff --git a/Runtime/Character/IMetaAnim.cpp b/Runtime/Character/IMetaAnim.cpp index d3705aad0..921c1e3ff 100644 --- a/Runtime/Character/IMetaAnim.cpp +++ b/Runtime/Character/IMetaAnim.cpp @@ -29,7 +29,18 @@ CCharAnimTime IMetaAnim::GetTime(const CPreAdvanceIndicator& ind, const IAnimRea return ind.GetTime(); CBoolPOINode nodes[64]; + CCharAnimTime rem = anim.VGetTimeRemaining(); + u32 count = anim.VGetBoolPOIList(rem, nodes, 64, 0, 0); + const char* cmpStr = ind.GetString(); + for (u32 i=0 ; i