2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-10 04:27:42 +00:00

CIOWin: Make Draw() non-const

Allows removing several const_cast usages within the codebase.
This commit is contained in:
Lioncash
2020-03-29 21:55:58 -04:00
parent 0d3bab4c14
commit 6dce70895c
17 changed files with 42 additions and 36 deletions

View File

@@ -124,18 +124,19 @@ CIOWin::EMessageReturn CSlideShow::OnMessage(const CArchitectureMessage& msg, CA
return EMessageReturn::Exit;
}
void CSlideShow::SSlideData::Draw() const {
if (!IsLoaded())
void CSlideShow::SSlideData::Draw() {
if (!IsLoaded()) {
return;
}
zeus::CRectangle rect;
const_cast<CTexturedQuadFilterAlpha&>(*m_texQuad).draw(x30_mulColor, 1.f, rect);
const zeus::CRectangle rect;
m_texQuad->draw(x30_mulColor, 1.f, rect);
zeus::CVector2f centeredOffset((x28_canvasSize.x() - m_texQuad->GetTex()->GetWidth()) * 0.5f,
(x28_canvasSize.y() - m_texQuad->GetTex()->GetHeight()) * 0.5f);
const zeus::CVector2f centeredOffset((x28_canvasSize.x() - m_texQuad->GetTex()->GetWidth()) * 0.5f,
(x28_canvasSize.y() - m_texQuad->GetTex()->GetHeight()) * 0.5f);
}
void CSlideShow::Draw() const {
void CSlideShow::Draw() {
SCOPED_GRAPHICS_DEBUG_GROUP("CSlideShow::Draw", zeus::skGreen);
if (x14_phase == Phase::Five) {
x5c_slideA.Draw();