Read in bone rotation on Echoes CINFs
This commit is contained in:
parent
18e9eebb8d
commit
2655f9d3fd
|
@ -55,6 +55,7 @@ class CBone
|
|||
std::vector<CBone*> mChildren;
|
||||
u32 mID;
|
||||
CVector3f mPosition;
|
||||
CQuaternion mRotation;
|
||||
TString mName;
|
||||
CTransform4f mInvBind;
|
||||
|
||||
|
@ -72,6 +73,7 @@ public:
|
|||
inline u32 ID() const { return mID; }
|
||||
inline CVector3f Position() const { return mPosition; }
|
||||
inline CVector3f AbsolutePosition() const { return mPosition + (mpParent ? mpParent->AbsolutePosition() : CVector3f::skZero); }
|
||||
inline CQuaternion Rotation() const { return mRotation; }
|
||||
inline TString Name() const { return mName; }
|
||||
};
|
||||
|
||||
|
|
|
@ -59,7 +59,11 @@ CSkeleton* CSkeletonLoader::LoadCINF(IInputStream& rCINF)
|
|||
u32 Check = rCINF.PeekLong();
|
||||
Game = ((Check > 100 || Check == 0) ? eEchoes : ePrime);
|
||||
}
|
||||
if (Game == eEchoes) rCINF.Seek(0x20, SEEK_CUR); // Skip skin metrics
|
||||
if (Game == eEchoes)
|
||||
{
|
||||
pBone->mRotation = CQuaternion(rCINF);
|
||||
rCINF.Seek(0x10, SEEK_CUR); // Think this is another quaternion, not sure what for.
|
||||
}
|
||||
|
||||
u32 NumLinkedBones = rCINF.ReadLong();
|
||||
ASSERT(NumLinkedBones != 0);
|
||||
|
|
Loading…
Reference in New Issue