mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 15:04:56 +00:00
Implement CWallCrawlerSwarm
This commit is contained in:
@@ -200,6 +200,7 @@ public:
|
||||
|
||||
bool IsOpaque() const { return x3c_firstSortedSurface == nullptr; }
|
||||
void ActivateLights(const std::vector<CLight>& lights);
|
||||
void SetAmbientColor(const zeus::CColor& color) { m_lightingData.ambient = color; }
|
||||
void DisableAllLights();
|
||||
void RemapMaterialData(SShader& shader);
|
||||
void RemapMaterialData(SShader& shader, const std::unordered_map<int, CModelShaders::ShaderPipelines>& pipelines);
|
||||
|
||||
@@ -898,6 +898,9 @@ void GeometryUniformLayout::Update(const CModelFlags& flags, const CSkinRules* c
|
||||
boo::ObjToken<boo::IGraphicsBufferD> CBooModel::UpdateUniformData(const CModelFlags& flags, const CSkinRules* cskr,
|
||||
const CPoseAsTransforms* pose,
|
||||
int sharedLayoutBuf) const {
|
||||
if (!TryLockTextures())
|
||||
return {};
|
||||
|
||||
/* Invalidate instances if new shadow being drawn */
|
||||
if (flags.m_extendedShader == EExtendedShader::WorldShadow && m_lastDrawnShadowMap != g_shadowMap) {
|
||||
const_cast<CBooModel*>(this)->m_lastDrawnShadowMap = g_shadowMap;
|
||||
@@ -916,7 +919,7 @@ boo::ObjToken<boo::IGraphicsBufferD> CBooModel::UpdateUniformData(const CModelFl
|
||||
do {
|
||||
inst = const_cast<CBooModel*>(this)->PushNewModelInstance(m_instances.size());
|
||||
if (!inst)
|
||||
return nullptr;
|
||||
return {};
|
||||
} while (m_instances.size() <= sharedLayoutBuf);
|
||||
} else
|
||||
inst = &m_instances[sharedLayoutBuf];
|
||||
@@ -925,7 +928,7 @@ boo::ObjToken<boo::IGraphicsBufferD> CBooModel::UpdateUniformData(const CModelFl
|
||||
if (m_instances.size() <= m_uniUpdateCount) {
|
||||
inst = const_cast<CBooModel*>(this)->PushNewModelInstance(sharedLayoutBuf);
|
||||
if (!inst)
|
||||
return nullptr;
|
||||
return {};
|
||||
} else
|
||||
inst = &m_instances[m_uniUpdateCount];
|
||||
++const_cast<CBooModel*>(this)->m_uniUpdateCount;
|
||||
|
||||
@@ -27,6 +27,9 @@ public:
|
||||
TLockedToken<CCharLayoutInfo> layoutInfo, int shaderIdx, int drawInsts);
|
||||
CSkinnedModel(IObjectStore& store, CAssetId model, CAssetId skinRules, CAssetId layoutInfo, int shaderIdx,
|
||||
int drawInsts);
|
||||
std::unique_ptr<CSkinnedModel> Clone(int shaderIdx = 0, int drawInsts = 1) const {
|
||||
return std::make_unique<CSkinnedModel>(x4_model, x10_skinRules, x1c_layoutInfo, shaderIdx, drawInsts);
|
||||
}
|
||||
|
||||
const TLockedToken<CModel>& GetModel() const { return x4_model; }
|
||||
const std::unique_ptr<CBooModel>& GetModelInst() const { return m_modelInst; }
|
||||
|
||||
Reference in New Issue
Block a user