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

CAnimSourceReader imps

This commit is contained in:
Jack Andersen
2016-04-15 17:24:25 -10:00
parent 3bab36faba
commit e51a657ec1
25 changed files with 462 additions and 88 deletions

View File

@@ -6,13 +6,12 @@ namespace urde
zeus::CVector3f CCharLayoutInfo::GetFromParentUnrotated(const CSegId& id) const
{
const CCharLayoutNode::Bone& bone = x0_node->GetBone(id);
const CSegId& prev = x0_node->GetPrevBone(bone.x0_parentId);
if (prev == 0xff)
const CCharLayoutNode::Bone& bone = x0_node->GetBoneMap()[id];
if (!x0_node->GetBoneMap().HasElement(bone.x0_parentId))
return bone.x4_origin;
else
{
const CCharLayoutNode::Bone& pBone = x0_node->GetBone(bone.x0_parentId);
const CCharLayoutNode::Bone& pBone = x0_node->GetBoneMap()[bone.x0_parentId];
return bone.x4_origin - pBone.x4_origin;
}
}
@@ -34,11 +33,8 @@ CCharLayoutNode::CCharLayoutNode(CInputStream& in)
for (u32 i=0 ; i<count ; ++i)
{
u32 thisId = in.readUint32Big();
Bone& bone = x6c_bones[thisId];
Bone& bone = x0_boneMap[thisId];
bone.read(in);
x8_prevBones[thisId] = x1_curPrevBone;
x1_curPrevBone = thisId;
++x0_boneCount;
}
}