This commit is contained in:
Jack Andersen 2016-09-02 19:19:37 -10:00
commit 44cd8596df
4 changed files with 30 additions and 4 deletions

View File

@ -35,7 +35,7 @@ void ViewManager::BuildTestPART(urde::IObjectStore& objStore)
CAnimRes samusAnimRes(samusCharSet.id, 2, zeus::CVector3f{2.f, 2.f, 2.f}, 0, true);
g_GameState->GetWorldTransitionManager()->EnableTransition(samusAnimRes,
platModel.id, zeus::CVector3f::skOne,
bgModel.id, zeus::CVector3f::skOne, false);
bgModel.id, zeus::CVector3f::skOne, true);
#endif
SObjectTag areaTag = m_projManager.TagFromPath(
@ -70,7 +70,7 @@ void ViewManager::BuildTestPART(urde::IObjectStore& objStore)
m_videoVoice = m_voiceEngine->allocateNewStereoVoice(32000, &m_voiceCallback);
m_videoVoice->start();
//m_rootView->accessContentViews().clear();
m_rootView->accessContentViews().clear();
m_rootView->accessContentViews().push_back(m_particleView.get());
m_rootView->updateSize();
}

View File

@ -178,12 +178,28 @@ void CAnimData::CalcPlaybackAlignmentParms(const CAnimPlaybackParms& parms,
zeus::CTransform CAnimData::GetLocatorTransform(CSegId id, const CCharAnimTime* time) const
{
if (id == 0xFF)
return {};
zeus::CTransform ret;
if (!x220_31_poseCached)
const_cast<CAnimData*>(this)->RecalcPoseBuilder(time);
if (!x220_31_poseCached)
x2fc_poseBuilder.BuildTransform(id, ret);
else
{
zeus::CMatrix3f rot = x224_pose.GetRotation(id);
zeus::CVector3f offset = x224_pose.GetOffset(id);
ret.setRotation(rot);
ret.origin = offset;
}
return ret;
}
zeus::CTransform CAnimData::GetLocatorTransform(const std::string& name, const CCharAnimTime* time) const
{
return {};
return GetLocatorTransform(xcc_layoutData->GetSegIdFromString(name), time);
}
bool CAnimData::IsAnimTimeRemaining(float, const std::string& name) const

View File

@ -16,6 +16,15 @@ zeus::CVector3f CCharLayoutInfo::GetFromParentUnrotated(const CSegId& id) const
}
}
CSegId CCharLayoutInfo::GetSegIdFromString(const std::string& name) const
{
auto it = x18_segIdMap.find(name);
if (it == x18_segIdMap.end())
return {};
return (*it).second;
}
void CCharLayoutNode::Bone::read(CInputStream& in)
{
x0_parentId = CSegId(in);

View File

@ -37,6 +37,7 @@ public:
const std::shared_ptr<CCharLayoutNode>& GetRootNode() const {return x0_node;}
const CSegIdList& GetSegIdList() const {return x8_segIdList;}
zeus::CVector3f GetFromParentUnrotated(const CSegId& id) const;
CSegId GetSegIdFromString(const std::string& name) const;
};
CFactoryFnReturn FCharLayoutInfo(const SObjectTag&, CInputStream&, const CVParamTransfer&,