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());
}
void CCompoundTargetReticle::Draw(const CStateManager& mgr, bool hideLockon) const {
void CCompoundTargetReticle::Draw(const CStateManager& mgr, bool hideLockon) {
if (mgr.GetPlayer().GetMorphballTransitionState() == CPlayer::EPlayerMorphBallState::Unmorphed &&
!mgr.GetCameraManager()->IsInCinematicCamera()) {
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 {
if (x28_noDrawTicks > 0)
void CCompoundTargetReticle::DrawNextLockOnGroup(const zeus::CMatrix3f& rot, const CStateManager& mgr) {
if (x28_noDrawTicks > 0) {
return;
}
zeus::CVector3f position = x174_nextGroupInterp.GetTargetPositionWorld();
float visorFactor = mgr.GetPlayerState()->GetVisorTransitionFactor();

View File

@ -129,7 +129,7 @@ private:
std::optional<CLineRenderer> m_stripRenderers[2][4];
SScanReticuleRenderer();
};
mutable SScanReticuleRenderer m_scanRetRenderer;
SScanReticuleRenderer m_scanRetRenderer;
void DrawGrapplePoint(const CScriptGrapplePoint& point, float t, const CStateManager& mgr, const zeus::CMatrix3f& rot,
bool zEqual) const;
@ -144,10 +144,10 @@ public:
void UpdateCurrLockOnGroup(float, const CStateManager&);
void UpdateNextLockOnGroup(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 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 UpdateTargetParameters(CTargetReticleRenderState&, const CStateManager&);
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);
}
void CTargetingManager::Draw(const CStateManager& mgr, bool hideLockon) const {
void CTargetingManager::Draw(const CStateManager& mgr, bool hideLockon) {
CGraphics::SetAmbientColor(zeus::skWhite);
CGraphics::DisableAllLights();
x21c_orbitPointMarker.Draw(mgr);

View File

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

View File

@ -321,7 +321,7 @@ void CPlayerVisor::LockUnlockAssets() {
#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);
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);
}
void CPlayerVisor::Draw(const CStateManager& mgr, const CTargetingManager* tgtManager) {
void CPlayerVisor::Draw(const CStateManager& mgr, CTargetingManager* tgtManager) {
CGraphics::SetAmbientColor(zeus::skWhite);
CGraphics::DisableAllLights();
switch (mgr.GetPlayerState()->GetActiveVisor(mgr)) {

View File

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