CCompoundTargetingReticle: Remove mutable specifier on m_scanRetRenderer

This can be trivially resolved by dropping const qualifiers on the
necessary member functions.
This commit is contained in:
Lioncash 2020-04-09 21:28:50 -04:00
parent 35ca901784
commit b72d217a68
6 changed files with 13 additions and 12 deletions

View File

@ -431,7 +431,7 @@ void CCompoundTargetReticle::UpdateOrbitZoneGroup(float dt, const CStateManager&
x1e8_crosshairsScale = std::max(0.f, x1e8_crosshairsScale - dt / g_tweakTargeting->GetCrosshairsScaleDuration()); x1e8_crosshairsScale = std::max(0.f, x1e8_crosshairsScale - dt / g_tweakTargeting->GetCrosshairsScaleDuration());
} }
void CCompoundTargetReticle::Draw(const CStateManager& mgr, bool hideLockon) const { void CCompoundTargetReticle::Draw(const CStateManager& mgr, bool hideLockon) {
if (mgr.GetPlayer().GetMorphballTransitionState() == CPlayer::EPlayerMorphBallState::Unmorphed && if (mgr.GetPlayer().GetMorphballTransitionState() == CPlayer::EPlayerMorphBallState::Unmorphed &&
!mgr.GetCameraManager()->IsInCinematicCamera()) { !mgr.GetCameraManager()->IsInCinematicCamera()) {
SCOPED_GRAPHICS_DEBUG_GROUP("CCompoundTargetReticle::Draw", zeus::skCyan); SCOPED_GRAPHICS_DEBUG_GROUP("CCompoundTargetReticle::Draw", zeus::skCyan);
@ -740,9 +740,10 @@ void CCompoundTargetReticle::DrawCurrLockOnGroup(const zeus::CMatrix3f& rot, con
} }
} }
void CCompoundTargetReticle::DrawNextLockOnGroup(const zeus::CMatrix3f& rot, const CStateManager& mgr) const { void CCompoundTargetReticle::DrawNextLockOnGroup(const zeus::CMatrix3f& rot, const CStateManager& mgr) {
if (x28_noDrawTicks > 0) if (x28_noDrawTicks > 0) {
return; return;
}
zeus::CVector3f position = x174_nextGroupInterp.GetTargetPositionWorld(); zeus::CVector3f position = x174_nextGroupInterp.GetTargetPositionWorld();
float visorFactor = mgr.GetPlayerState()->GetVisorTransitionFactor(); float visorFactor = mgr.GetPlayerState()->GetVisorTransitionFactor();

View File

@ -129,7 +129,7 @@ private:
std::optional<CLineRenderer> m_stripRenderers[2][4]; std::optional<CLineRenderer> m_stripRenderers[2][4];
SScanReticuleRenderer(); SScanReticuleRenderer();
}; };
mutable SScanReticuleRenderer m_scanRetRenderer; SScanReticuleRenderer m_scanRetRenderer;
void DrawGrapplePoint(const CScriptGrapplePoint& point, float t, const CStateManager& mgr, const zeus::CMatrix3f& rot, void DrawGrapplePoint(const CScriptGrapplePoint& point, float t, const CStateManager& mgr, const zeus::CMatrix3f& rot,
bool zEqual) const; bool zEqual) const;
@ -144,10 +144,10 @@ public:
void UpdateCurrLockOnGroup(float, const CStateManager&); void UpdateCurrLockOnGroup(float, const CStateManager&);
void UpdateNextLockOnGroup(float, const CStateManager&); void UpdateNextLockOnGroup(float, const CStateManager&);
void UpdateOrbitZoneGroup(float, const CStateManager&); void UpdateOrbitZoneGroup(float, const CStateManager&);
void Draw(const CStateManager&, bool hideLockon) const; void Draw(const CStateManager&, bool hideLockon);
void DrawGrappleGroup(const zeus::CMatrix3f& rot, const CStateManager&, bool) const; void DrawGrappleGroup(const zeus::CMatrix3f& rot, const CStateManager&, bool) const;
void DrawCurrLockOnGroup(const zeus::CMatrix3f& rot, const CStateManager&) const; void DrawCurrLockOnGroup(const zeus::CMatrix3f& rot, const CStateManager&) const;
void DrawNextLockOnGroup(const zeus::CMatrix3f& rot, const CStateManager&) const; void DrawNextLockOnGroup(const zeus::CMatrix3f& rot, const CStateManager&);
void DrawOrbitZoneGroup(const zeus::CMatrix3f& rot, const CStateManager&) const; void DrawOrbitZoneGroup(const zeus::CMatrix3f& rot, const CStateManager&) const;
void UpdateTargetParameters(CTargetReticleRenderState&, const CStateManager&); void UpdateTargetParameters(CTargetReticleRenderState&, const CStateManager&);
float CalculateRadiusWorld(const CActor&, const CStateManager&) const; float CalculateRadiusWorld(const CActor&, const CStateManager&) const;

View File

@ -18,7 +18,7 @@ void CTargetingManager::Update(float dt, const CStateManager& stateMgr) {
x21c_orbitPointMarker.Update(dt, stateMgr); x21c_orbitPointMarker.Update(dt, stateMgr);
} }
void CTargetingManager::Draw(const CStateManager& mgr, bool hideLockon) const { void CTargetingManager::Draw(const CStateManager& mgr, bool hideLockon) {
CGraphics::SetAmbientColor(zeus::skWhite); CGraphics::SetAmbientColor(zeus::skWhite);
CGraphics::DisableAllLights(); CGraphics::DisableAllLights();
x21c_orbitPointMarker.Draw(mgr); x21c_orbitPointMarker.Draw(mgr);

View File

@ -13,7 +13,7 @@ public:
explicit CTargetingManager(const CStateManager& stateMgr); explicit CTargetingManager(const CStateManager& stateMgr);
bool CheckLoadComplete(); bool CheckLoadComplete();
void Update(float, const CStateManager& stateMgr); void Update(float, const CStateManager& stateMgr);
void Draw(const CStateManager& stateMgr, bool hideLockon) const; void Draw(const CStateManager& stateMgr, bool hideLockon);
void Touch(); void Touch();
CCompoundTargetReticle& CompoundTargetReticle() { return x0_targetReticule; } CCompoundTargetReticle& CompoundTargetReticle() { return x0_targetReticule; }
}; };

View File

@ -321,7 +321,7 @@ void CPlayerVisor::LockUnlockAssets() {
#endif #endif
} }
void CPlayerVisor::DrawScanEffect(const CStateManager& mgr, const CTargetingManager* tgtMgr) { void CPlayerVisor::DrawScanEffect(const CStateManager& mgr, CTargetingManager* tgtMgr) {
SCOPED_GRAPHICS_DEBUG_GROUP("CPlayerVisor::DrawScanEffect", zeus::skMagenta); SCOPED_GRAPHICS_DEBUG_GROUP("CPlayerVisor::DrawScanEffect", zeus::skMagenta);
const bool indicatorsDrawn = DrawScanObjectIndicators(mgr); const bool indicatorsDrawn = DrawScanObjectIndicators(mgr);
@ -645,7 +645,7 @@ void CPlayerVisor::Update(float dt, const CStateManager& mgr) {
x58_scanMagInterp = std::max(x58_scanMagInterp - 2.f * dt, scanMag); x58_scanMagInterp = std::max(x58_scanMagInterp - 2.f * dt, scanMag);
} }
void CPlayerVisor::Draw(const CStateManager& mgr, const CTargetingManager* tgtManager) { void CPlayerVisor::Draw(const CStateManager& mgr, CTargetingManager* tgtManager) {
CGraphics::SetAmbientColor(zeus::skWhite); CGraphics::SetAmbientColor(zeus::skWhite);
CGraphics::DisableAllLights(); CGraphics::DisableAllLights();
switch (mgr.GetPlayerState()->GetActiveVisor(mgr)) { switch (mgr.GetPlayerState()->GetActiveVisor(mgr)) {

View File

@ -72,7 +72,7 @@ class CPlayerVisor {
void UpdateScanWindow(float dt, const CStateManager& mgr); void UpdateScanWindow(float dt, const CStateManager& mgr);
EScanWindowState GetDesiredScanWindowState(const CStateManager& mgr) const; EScanWindowState GetDesiredScanWindowState(const CStateManager& mgr) const;
void LockUnlockAssets(); void LockUnlockAssets();
void DrawScanEffect(const CStateManager& mgr, const CTargetingManager* tgtMgr); void DrawScanEffect(const CStateManager& mgr, CTargetingManager* tgtMgr);
void DrawXRayEffect(const CStateManager& mgr); void DrawXRayEffect(const CStateManager& mgr);
void DrawThermalEffect(const CStateManager& mgr); void DrawThermalEffect(const CStateManager& mgr);
void UpdateCurrentVisor(float transFactor); void UpdateCurrentVisor(float transFactor);
@ -85,7 +85,7 @@ public:
explicit CPlayerVisor(CStateManager& stateMgr); explicit CPlayerVisor(CStateManager& stateMgr);
~CPlayerVisor(); ~CPlayerVisor();
void Update(float dt, const CStateManager& stateMgr); void Update(float dt, const CStateManager& stateMgr);
void Draw(const CStateManager& stateMgr, const CTargetingManager* tgtManager); void Draw(const CStateManager& stateMgr, CTargetingManager* tgtManager);
void Touch(); void Touch();
float GetDesiredViewportScaleX(const CStateManager& stateMgr) const; float GetDesiredViewportScaleX(const CStateManager& stateMgr) const;
float GetDesiredViewportScaleY(const CStateManager& stateMgr) const; float GetDesiredViewportScaleY(const CStateManager& stateMgr) const;