mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 11:47:43 +00:00
Finish CGunWeapon
This commit is contained in:
@@ -54,6 +54,33 @@ void CModelData::Render(const CStateManager& stateMgr, const zeus::CTransform& x
|
||||
Render(GetRenderingModel(stateMgr), xf, lights, drawFlags);
|
||||
}
|
||||
|
||||
bool CModelData::IsLoaded(int shaderIdx) const
|
||||
{
|
||||
if (x10_animData)
|
||||
{
|
||||
if (!x10_animData->xd8_modelData->GetModel()->IsLoaded(shaderIdx))
|
||||
return false;
|
||||
if (const CSkinnedModel* model = x10_animData->xf4_xrayModel.get())
|
||||
if (!model->GetModel()->IsLoaded(shaderIdx))
|
||||
return false;
|
||||
if (const CSkinnedModel* model = x10_animData->xf8_infraModel.get())
|
||||
if (!model->GetModel()->IsLoaded(shaderIdx))
|
||||
return false;
|
||||
}
|
||||
|
||||
if (const CModel* model = x1c_normalModel.GetObj())
|
||||
if (!model->IsLoaded(shaderIdx))
|
||||
return false;
|
||||
if (const CModel* model = x2c_xrayModel.GetObj())
|
||||
if (!model->IsLoaded(shaderIdx))
|
||||
return false;
|
||||
if (const CModel* model = x3c_infraModel.GetObj())
|
||||
if (!model->IsLoaded(shaderIdx))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
CModelData::EWhichModel CModelData::GetRenderingModel(const CStateManager& stateMgr)
|
||||
{
|
||||
switch (stateMgr.GetPlayerState()->GetActiveVisor(stateMgr))
|
||||
|
||||
@@ -111,6 +111,7 @@ public:
|
||||
SAdvancementDeltas GetAdvancementDeltas(const CCharAnimTime& a, const CCharAnimTime& b) const;
|
||||
void Render(const CStateManager& stateMgr, const zeus::CTransform& xf,
|
||||
const CActorLights* lights, const CModelFlags& drawFlags) const;
|
||||
bool IsLoaded(int shaderIdx) const;
|
||||
static EWhichModel GetRenderingModel(const CStateManager& stateMgr);
|
||||
CSkinnedModel& PickAnimatedModel(EWhichModel which) const;
|
||||
const std::unique_ptr<CBooModel>& PickStaticModel(EWhichModel which) const;
|
||||
|
||||
Reference in New Issue
Block a user