2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-11 08:27:43 +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

@@ -20,11 +20,11 @@ public:
CGuiTextSupport& TextSupport() { return xd4_textSupport; }
const CGuiTextSupport& GetTextSupport() const { return xd4_textSupport; }
void Update(float dt) override;
bool GetIsFinishedLoadingWidgetSpecific() const override;
bool GetIsFinishedLoadingWidgetSpecific() override;
std::vector<CAssetId> GetFontAssets() const { return {xd4_textSupport.x5c_fontId}; }
void SetDimensions(const zeus::CVector2f& dim, bool initVBO) override;
void ScaleDimensions(const zeus::CVector3f& scale) override;
void Draw(const CGuiWidgetDrawParms& parms) const override;
void Draw(const CGuiWidgetDrawParms& parms) override;
bool TestCursorHit(const zeus::CMatrix4f& vp, const zeus::CVector2f& point) const override;
static std::shared_ptr<CGuiWidget> Create(CGuiFrame* frame, CInputStream& in, CSimplePool* sp);