2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-14 14:06:09 +00:00

CGunWeapon: Eliminate usages of const_cast

Eliminates trivial usages of const_cast by making Draw related functions
non-const. This also allows removing the mutable specifiers from several
shader data members.
This commit is contained in:
Lioncash
2020-04-05 08:29:43 -04:00
parent 19cfb92d5d
commit 2e6bd0f05e
7 changed files with 24 additions and 23 deletions

View File

@@ -167,18 +167,18 @@ void CPhazonBeam::Unload(CStateManager& mgr) {
bool CPhazonBeam::IsLoaded() const { return CGunWeapon::IsLoaded() && x274_24_loaded; }
void CPhazonBeam::DrawClipScaleCube() const {
void CPhazonBeam::DrawClipScaleCube() {
// Render AABB as completely transparent object, only modifying Z-buffer
m_aaboxShaderScale.draw(zeus::skClear);
}
void CPhazonBeam::DrawClipTranslateCube() const {
void CPhazonBeam::DrawClipTranslateCube() {
// Render AABB as completely transparent object, only modifying Z-buffer
m_aaboxShaderTranslate.draw(zeus::skClear);
}
void CPhazonBeam::Draw(bool drawSuitArm, const CStateManager& mgr, const zeus::CTransform& xf, const CModelFlags& flags,
const CActorLights* lights) const {
const CActorLights* lights) {
CPlayerState::EPlayerVisor visor = mgr.GetPlayerState()->GetActiveVisor(mgr);
bool drawIndirect = visor == CPlayerState::EPlayerVisor::Combat || visor == CPlayerState::EPlayerVisor::Scan;