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

Initial CAnimData implementation and other support classes

This commit is contained in:
Jack Andersen
2016-04-12 12:28:08 -10:00
parent 14e0468adf
commit 795b77fe48
29 changed files with 367 additions and 81 deletions

View File

@@ -123,8 +123,7 @@ void CAnimSource::CalcAverageVelocity()
CAnimSource::CAnimSource(CInputStream& in, IObjectStore& store)
: x0_duration(in),
x8_interval(in.readFloatBig()),
xc_(in.readUint32Big()),
x8_interval(in),
x10_frameCount(in.readUint32Big()),
x1c_rootBone(in),
x20_rotationChannels(ReadIndexTable(in)),
@@ -174,7 +173,7 @@ const std::vector<CBoolPOINode>& CAnimSource::GetBoolPOIStream() const
zeus::CQuaternion CAnimSource::GetRotation(const CSegId& seg, const CCharAnimTime& time) const
{
u8 rotIdx = x20_rotationChannels[seg.GetId()];
u8 rotIdx = x20_rotationChannels[seg];
if (rotIdx != 0xff)
{
u32 frameIdx = unsigned(time / x8_interval);
@@ -201,7 +200,7 @@ zeus::CQuaternion CAnimSource::GetRotation(const CSegId& seg, const CCharAnimTim
zeus::CVector3f CAnimSource::GetOffset(const CSegId& seg, const CCharAnimTime& time) const
{
u8 rotIdx = x20_rotationChannels[seg.GetId()];
u8 rotIdx = x20_rotationChannels[seg];
if (rotIdx != 0xff)
{
u8 transIdx = x30_translationChannels[rotIdx];
@@ -232,7 +231,7 @@ zeus::CVector3f CAnimSource::GetOffset(const CSegId& seg, const CCharAnimTime& t
bool CAnimSource::HasOffset(const CSegId& seg) const
{
u8 rotIdx = x20_rotationChannels[seg.GetId()];
u8 rotIdx = x20_rotationChannels[seg];
if (rotIdx == 0xff)
return false;
u8 transIdx = x30_translationChannels[rotIdx];