mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-10 04:27:42 +00:00
ANIM fixes
This commit is contained in:
@@ -63,11 +63,6 @@ void CPoseAsTransforms::Insert(const CSegId& id,
|
||||
Transform& xfOut = xd0_transformArr[x0_nextId];
|
||||
xfOut.m_originToAccum = zeus::CTransform(rotation, offset);
|
||||
xfOut.m_restPoseToAccum = xfOut.m_originToAccum * zeus::CTransform::Translate(-restOffset);
|
||||
//if (id == 4)
|
||||
//{
|
||||
// printf("INSBONE %d\n", int(id));
|
||||
// xfOut.m_originToAccum.printMatrix();
|
||||
//}
|
||||
|
||||
std::pair<CSegId, CSegId>& link = x8_links[id];
|
||||
link.first = xd4_lastInserted;
|
||||
|
||||
@@ -18,8 +18,6 @@ void CSkinBank::GetBankTransforms(std::vector<const zeus::CTransform*>& out,
|
||||
for (CSegId id : x0_segments)
|
||||
{
|
||||
const zeus::CTransform& xf = pose.GetRestToAccumTransform(id);
|
||||
//printf("BONE %d\n", int(id));
|
||||
//xf.printMatrix();
|
||||
out.push_back(&xf);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -441,8 +441,8 @@ void CBooModel::UVAnimationBuffer::ProcessAnimation(u8*& bufOut, const UVAnimati
|
||||
float halfA = anim.vals[0] * 0.5f;
|
||||
|
||||
postMtxOut = zeus::CTransform(zeus::CMatrix3f(halfA, 0.0, 0.0,
|
||||
0.0, 0.0, halfA,
|
||||
0.0, 0.0, 0.0),
|
||||
0.0, 0.0, halfA,
|
||||
0.0, 0.0, 0.0),
|
||||
zeus::CVector3f(xy, z, 1.0)).toMatrix4f();
|
||||
break;
|
||||
}
|
||||
@@ -500,11 +500,13 @@ void CBooModel::UpdateUniformData(const CModelFlags& flags,
|
||||
{
|
||||
const ModelInstance* inst;
|
||||
if (m_instances.size() <= m_uniUpdateCount)
|
||||
{
|
||||
inst = const_cast<CBooModel*>(this)->PushNewModelInstance();
|
||||
if (!inst)
|
||||
return;
|
||||
}
|
||||
else
|
||||
inst = &m_instances[m_uniUpdateCount];
|
||||
if (!inst)
|
||||
return;
|
||||
++const_cast<CBooModel*>(this)->m_uniUpdateCount;
|
||||
|
||||
u8* dataOut = reinterpret_cast<u8*>(inst->m_uniformBuffer->map(m_uniformDataSize));
|
||||
|
||||
@@ -221,7 +221,7 @@ void CWorldTransManager::DrawSecondPass()
|
||||
void CWorldTransManager::DrawEnabled()
|
||||
{
|
||||
float wsAspect = CWideScreenFilter::SetViewportToMatch(1.f);
|
||||
|
||||
|
||||
g_Renderer->SetPerspective(CCameraManager::DefaultFirstPersonFOV(),
|
||||
wsAspect,
|
||||
CCameraManager::DefaultNearPlane(),
|
||||
@@ -318,7 +318,7 @@ void CWorldTransManager::TouchModels()
|
||||
x4_modelData->x100_bgModelData[1].Touch(CModelData::EWhichModel::Normal, 0);
|
||||
if (!x4_modelData->x100_bgModelData[2].IsNull())
|
||||
x4_modelData->x100_bgModelData[2].Touch(CModelData::EWhichModel::Normal, 0);
|
||||
|
||||
|
||||
if (!x4_modelData->x68_beamModelData.IsNull())
|
||||
x4_modelData->x68_beamModelData.Touch(CModelData::EWhichModel::Normal, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user