2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 21:47:42 +00:00

CModelBoo: Remove usages of const_cast

Many functions are modifying internals of CBooModel and const-casting
is performed in order to work around functions being const when they
really shouldn't be.

This amends the function signatures in order to allow these functions to
exist without const_cast, making code much nicer to read.
This commit is contained in:
Lioncash
2020-03-18 01:14:36 -04:00
committed by Luke Street
parent 36ac0a8d78
commit 40fc3f9dd8
18 changed files with 141 additions and 112 deletions

View File

@@ -210,16 +210,16 @@ public:
void DisableAllLights();
void RemapMaterialData(SShader& shader);
void RemapMaterialData(SShader& shader, const std::unordered_map<int, CModelShaders::ShaderPipelines>& pipelines);
bool TryLockTextures() const;
void UnlockTextures() const;
void SyncLoadTextures() const;
void Touch(int shaderIdx) const;
bool TryLockTextures();
void UnlockTextures();
void SyncLoadTextures();
void Touch(int shaderIdx);
void VerifyCurrentShader(int shaderIdx);
boo::ObjToken<boo::IGraphicsBufferD> UpdateUniformData(const CModelFlags& flags, const CSkinRules* cskr,
const CPoseAsTransforms* pose, int sharedLayoutBuf = -1) const;
void DrawAlpha(const CModelFlags& flags, const CSkinRules* cskr, const CPoseAsTransforms* pose) const;
void DrawNormal(const CModelFlags& flags, const CSkinRules* cskr, const CPoseAsTransforms* pose) const;
void Draw(const CModelFlags& flags, const CSkinRules* cskr, const CPoseAsTransforms* pose) const;
const CPoseAsTransforms* pose, int sharedLayoutBuf = -1);
void DrawAlpha(const CModelFlags& flags, const CSkinRules* cskr, const CPoseAsTransforms* pose);
void DrawNormal(const CModelFlags& flags, const CSkinRules* cskr, const CPoseAsTransforms* pose);
void Draw(const CModelFlags& flags, const CSkinRules* cskr, const CPoseAsTransforms* pose);
void DrawFlat(ESurfaceSelection sel, EExtendedShader extendedIdx) const;
void LockParent() { m_modelTok.Lock(); }