mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-10 15:07: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:
@@ -24,12 +24,13 @@ zeus::CVector3f CGuiCamera::ConvertToScreenSpace(const zeus::CVector3f& vec) con
|
||||
return mat.multiplyOneOverW(local);
|
||||
}
|
||||
|
||||
void CGuiCamera::Draw(const CGuiWidgetDrawParms& parms) const {
|
||||
if (xb8_projtype == EProjection::Perspective)
|
||||
void CGuiCamera::Draw(const CGuiWidgetDrawParms& parms) {
|
||||
if (xb8_projtype == EProjection::Perspective) {
|
||||
CGraphics::SetPerspective(m_proj.xbc_fov, m_proj.xc0_aspect, m_proj.xc4_znear, m_proj.xc8_zfar);
|
||||
else
|
||||
} else {
|
||||
CGraphics::SetOrtho(m_proj.xbc_left, m_proj.xc0_right, m_proj.xc4_top, m_proj.xc8_bottom, m_proj.xcc_znear,
|
||||
m_proj.xd0_zfar);
|
||||
}
|
||||
CGraphics::SetViewPointMatrix(GetGuiFrame()->GetAspectTransform() *
|
||||
zeus::CTransform::Translate(parms.x4_cameraOffset) * x34_worldXF);
|
||||
CGuiWidget::Draw(parms);
|
||||
|
||||
Reference in New Issue
Block a user