mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 21:07:42 +00:00
CWorldTransManager 2-camera instances
This commit is contained in:
@@ -22,20 +22,21 @@ CModelData::~CModelData() {}
|
||||
CModelData::CModelData() {}
|
||||
CModelData CModelData::CModelDataNull() {return CModelData();}
|
||||
|
||||
CModelData::CModelData(const CStaticRes& res)
|
||||
: x0_scale(res.GetScale())
|
||||
CModelData::CModelData(const CStaticRes& res, int instCount)
|
||||
: x0_scale(res.GetScale()), m_drawInstCount(instCount)
|
||||
{
|
||||
x1c_normalModel = g_SimplePool->GetObj({SBIG('CMDL'), res.GetId()});
|
||||
if (!x1c_normalModel)
|
||||
Log.report(logvisor::Fatal, "unable to find CMDL %08X", res.GetId());
|
||||
m_normalModelInst = x1c_normalModel->MakeNewInstance(0);
|
||||
m_normalModelInst = x1c_normalModel->MakeNewInstance(0, instCount);
|
||||
}
|
||||
|
||||
CModelData::CModelData(const CAnimRes& res)
|
||||
: x0_scale(res.GetScale())
|
||||
CModelData::CModelData(const CAnimRes& res, int instCount)
|
||||
: x0_scale(res.GetScale()), m_drawInstCount(instCount)
|
||||
{
|
||||
TToken<CCharacterFactory> factory = g_CharFactoryBuilder->GetFactory(res);
|
||||
x10_animData = factory->CreateCharacter(res.GetCharacterNodeId(), res.CanLoop(), factory, res.GetDefaultAnim());
|
||||
x10_animData = factory->CreateCharacter(res.GetCharacterNodeId(), res.CanLoop(), factory,
|
||||
res.GetDefaultAnim(), instCount);
|
||||
}
|
||||
|
||||
SAdvancementDeltas CModelData::GetAdvancementDeltas(const CCharAnimTime& a,
|
||||
@@ -115,7 +116,7 @@ void CModelData::SetXRayModel(const std::pair<ResId, ResId>& modelSkin)
|
||||
x2c_xrayModel = g_SimplePool->GetObj({SBIG('CMDL'), modelSkin.first});
|
||||
if (!x2c_xrayModel)
|
||||
Log.report(logvisor::Fatal, "unable to find CMDL %08X", modelSkin.first);
|
||||
m_xrayModelInst = x2c_xrayModel->MakeNewInstance(0);
|
||||
m_xrayModelInst = x2c_xrayModel->MakeNewInstance(0, m_drawInstCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -138,7 +139,7 @@ void CModelData::SetInfraModel(const std::pair<ResId, ResId>& modelSkin)
|
||||
x3c_infraModel = g_SimplePool->GetObj({SBIG('CMDL'), modelSkin.first});
|
||||
if (!x3c_infraModel)
|
||||
Log.report(logvisor::Fatal, "unable to find CMDL %08X", modelSkin.first);
|
||||
m_infraModelInst = x3c_infraModel->MakeNewInstance(0);
|
||||
m_infraModelInst = x3c_infraModel->MakeNewInstance(0, m_drawInstCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user