mirror of https://github.com/AxioDL/metaforce.git
Few more character imps
This commit is contained in:
parent
7e61fb3c15
commit
b10bd229e6
|
@ -10,10 +10,10 @@ class CAnimTreeDoubleChild : public CAnimTreeNode
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SAdvancementResults VAdvanceView(const CCharAnimTime& a);
|
SAdvancementResults VAdvanceView(const CCharAnimTime& a);
|
||||||
void VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32, u32, u32) const;
|
u32 VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32 capacity, u32 iterator, u32) const;
|
||||||
void VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32, u32, u32) const;
|
u32 VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32 capacity, u32 iterator, u32) const;
|
||||||
void VGetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32, u32, u32) const;
|
u32 VGetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32 capacity, u32 iterator, u32) const;
|
||||||
void VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32, u32, u32) const;
|
u32 VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity, u32 iterator, u32) const;
|
||||||
void VGetBoolPOIState(const char*) const;
|
void VGetBoolPOIState(const char*) const;
|
||||||
void VGetInt32POIState(const char*) const;
|
void VGetInt32POIState(const char*) const;
|
||||||
void VGetParticlePOIState(const char*) const;
|
void VGetParticlePOIState(const char*) const;
|
||||||
|
|
|
@ -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,
|
u32 CAnimTreeSingleChild::VGetBoolPOIList(const CCharAnimTime& time,
|
||||||
CBoolPOINode* listOut,
|
CBoolPOINode* listOut,
|
||||||
u32, u32, u32) const
|
u32 capacity, u32 iterator, u32) const
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void CAnimTreeSingleChild::VGetInt32POIList(const CCharAnimTime& time,
|
u32 CAnimTreeSingleChild::VGetInt32POIList(const CCharAnimTime& time,
|
||||||
CInt32POINode* listOut,
|
CInt32POINode* listOut,
|
||||||
u32, u32, u32) const
|
u32 capacity, u32 iterator, u32) const
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void CAnimTreeSingleChild::VGetParticlePOIList(const CCharAnimTime& time,
|
u32 CAnimTreeSingleChild::VGetParticlePOIList(const CCharAnimTime& time,
|
||||||
CParticlePOINode* listOut,
|
CParticlePOINode* listOut,
|
||||||
u32, u32, u32) const
|
u32 capacity, u32 iterator, u32) const
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void CAnimTreeSingleChild::VGetSoundPOIList(const CCharAnimTime& time,
|
u32 CAnimTreeSingleChild::VGetSoundPOIList(const CCharAnimTime& time,
|
||||||
CSoundPOINode* listOut,
|
CSoundPOINode* listOut,
|
||||||
u32, u32, u32) const
|
u32 capacity, u32 iterator, u32) const
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,14 +13,14 @@ public:
|
||||||
CAnimTreeSingleChild(const std::weak_ptr<CAnimTreeNode>& node, const std::string& name);
|
CAnimTreeSingleChild(const std::weak_ptr<CAnimTreeNode>& node, const std::string& name);
|
||||||
|
|
||||||
SAdvancementResults VAdvanceView(const CCharAnimTime& a);
|
SAdvancementResults VAdvanceView(const CCharAnimTime& a);
|
||||||
void VGetTimeRemaining() const;
|
CCharAnimTime VGetTimeRemaining() const;
|
||||||
bool VHasOffset(const CSegId& seg) const;
|
bool VHasOffset(const CSegId& seg) const;
|
||||||
void VGetOffset(const CSegId& seg) const;
|
void VGetOffset(const CSegId& seg) const;
|
||||||
void VGetRotation(const CSegId& seg) const;
|
void VGetRotation(const CSegId& seg) const;
|
||||||
void VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32, u32, u32) const;
|
u32 VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32 capacity, u32 iterator, u32) const;
|
||||||
void VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32, u32, u32) const;
|
u32 VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32 capacity, u32 iterator, u32) const;
|
||||||
void VGetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32, u32, u32) const;
|
u32 VGetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32 capacity, u32 iterator, u32) const;
|
||||||
void VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32, u32, u32) const;
|
u32 VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity, u32 iterator, u32) const;
|
||||||
void VGetBoolPOIState(const char*) const;
|
void VGetBoolPOIState(const char*) const;
|
||||||
void VGetInt32POIState(const char*) const;
|
void VGetInt32POIState(const char*) const;
|
||||||
void VGetParticlePOIState(const char*) const;
|
void VGetParticlePOIState(const char*) const;
|
||||||
|
|
|
@ -12,6 +12,7 @@ class CBoolPOINode : public CPOINode
|
||||||
public:
|
public:
|
||||||
CBoolPOINode();
|
CBoolPOINode();
|
||||||
CBoolPOINode(CInputStream& in);
|
CBoolPOINode(CInputStream& in);
|
||||||
|
bool GetValue() const {return x38_val;}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,9 @@ public:
|
||||||
CPOINode(const std::string& name, u16, const CCharAnimTime& time, u32 index, bool, float, u32, u32);
|
CPOINode(const std::string& name, u16, const CCharAnimTime& time, u32 index, bool, float, u32, u32);
|
||||||
CPOINode(CInputStream& in);
|
CPOINode(CInputStream& in);
|
||||||
virtual ~CPOINode() = default;
|
virtual ~CPOINode() = default;
|
||||||
|
|
||||||
|
const std::string& GetName() const {return x8_name;}
|
||||||
|
const CCharAnimTime& GetTime() const {return x1c_time;}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,27 +4,44 @@
|
||||||
namespace urde
|
namespace urde
|
||||||
{
|
{
|
||||||
|
|
||||||
SAdvancementResults IAnimReader::VGetAdvancementResults(const CCharAnimTime& a, const CCharAnimTime& b) const
|
SAdvancementResults
|
||||||
|
IAnimReader::VGetAdvancementResults(const CCharAnimTime& a, const CCharAnimTime& b) const
|
||||||
{
|
{
|
||||||
SAdvancementResults ret;
|
SAdvancementResults ret;
|
||||||
ret.x0_remTime = a;
|
ret.x0_remTime = a;
|
||||||
return ret;
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,15 +29,15 @@ public:
|
||||||
virtual ~IAnimReader() = default;
|
virtual ~IAnimReader() = default;
|
||||||
virtual bool IsCAnimTreeNode() const {return false;}
|
virtual bool IsCAnimTreeNode() const {return false;}
|
||||||
virtual SAdvancementResults VAdvanceView(const CCharAnimTime& a)=0;
|
virtual SAdvancementResults VAdvanceView(const CCharAnimTime& a)=0;
|
||||||
virtual void VGetTimeRemaining() const=0;
|
virtual CCharAnimTime VGetTimeRemaining() const=0;
|
||||||
virtual void VGetSteadyStateAnimInfo() const=0;
|
virtual void VGetSteadyStateAnimInfo() const=0;
|
||||||
virtual bool VHasOffset(const CSegId& seg) const=0;
|
virtual bool VHasOffset(const CSegId& seg) const=0;
|
||||||
virtual void VGetOffset(const CSegId& seg) const=0;
|
virtual void VGetOffset(const CSegId& seg) const=0;
|
||||||
virtual void VGetRotation(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 u32 VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32 capacity, u32 iterator, u32) const=0;
|
||||||
virtual void VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32, u32, u32) const=0;
|
virtual u32 VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32 capacity, u32 iterator, u32) const=0;
|
||||||
virtual void VGetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32, u32, u32) const=0;
|
virtual u32 VGetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32 capacity, u32 iterator, u32) const=0;
|
||||||
virtual void VGetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32, u32, 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 VGetBoolPOIState(const char*) const=0;
|
||||||
virtual void VGetInt32POIState(const char*) const=0;
|
virtual void VGetInt32POIState(const char*) const=0;
|
||||||
virtual void VGetParticlePOIState(const char*) const=0;
|
virtual void VGetParticlePOIState(const char*) const=0;
|
||||||
|
@ -52,10 +52,10 @@ public:
|
||||||
virtual void VGetNumChildren() const=0;
|
virtual void VGetNumChildren() const=0;
|
||||||
virtual void VGetBestUnblendedChild() const=0;
|
virtual void VGetBestUnblendedChild() const=0;
|
||||||
|
|
||||||
void GetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32, u32, u32) const;
|
u32 GetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32 capacity, u32 iterator, u32) const;
|
||||||
void GetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32, u32, u32) const;
|
u32 GetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32 capacity, u32 iterator, u32) const;
|
||||||
void GetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32, u32, u32) const;
|
u32 GetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32 capacity, u32 iterator, u32) const;
|
||||||
void GetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32, u32, u32) const;
|
u32 GetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity, u32 iterator, u32) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,18 @@ CCharAnimTime IMetaAnim::GetTime(const CPreAdvanceIndicator& ind, const IAnimRea
|
||||||
return ind.GetTime();
|
return ind.GetTime();
|
||||||
|
|
||||||
CBoolPOINode nodes[64];
|
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<count ; ++i)
|
||||||
|
{
|
||||||
|
CBoolPOINode& node = nodes[i];
|
||||||
|
if (node.GetName().compare(cmpStr) || !node.GetValue())
|
||||||
|
continue;
|
||||||
|
return node.GetTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue