diff --git a/stepmania/src/LifeMeter.h b/stepmania/src/LifeMeter.h index 26e98e378d..5bbadc866e 100644 --- a/stepmania/src/LifeMeter.h +++ b/stepmania/src/LifeMeter.h @@ -31,9 +31,9 @@ public: * received for the initial tap note. */ virtual void ChangeLife( HoldNoteScore score, TapNoteScore tscore ) = 0; virtual void OnDancePointsChange() = 0; // look in GAMESTATE and update the display - virtual bool IsInDanger() = 0; - virtual bool IsHot() = 0; - virtual bool IsFailing() = 0; + virtual bool IsInDanger() const = 0; + virtual bool IsHot() const = 0; + virtual bool IsFailing() const = 0; virtual float GetLife() const { return 0; } // for cosmetic use only virtual void UpdateNonstopLifebar(int cleared, int total, int ProgressiveLifebarDifficulty) = 0; diff --git a/stepmania/src/LifeMeterBar.cpp b/stepmania/src/LifeMeterBar.cpp index b354dc84c0..a173e3b3c1 100644 --- a/stepmania/src/LifeMeterBar.cpp +++ b/stepmania/src/LifeMeterBar.cpp @@ -412,17 +412,17 @@ void LifeMeterBar::AfterLifeChanged() } -bool LifeMeterBar::IsHot() +bool LifeMeterBar::IsHot() const { return m_fLifePercentage >= 1; } -bool LifeMeterBar::IsInDanger() +bool LifeMeterBar::IsInDanger() const { return m_fLifePercentage < g_fDangerThreshold; } -bool LifeMeterBar::IsFailing() +bool LifeMeterBar::IsFailing() const { return m_fLifePercentage <= 0; } diff --git a/stepmania/src/LifeMeterBar.h b/stepmania/src/LifeMeterBar.h index f1179186c1..850103bd87 100644 --- a/stepmania/src/LifeMeterBar.h +++ b/stepmania/src/LifeMeterBar.h @@ -32,9 +32,9 @@ public: virtual void ChangeLife( HoldNoteScore score, TapNoteScore tscore ); virtual void AfterLifeChanged(); virtual void OnDancePointsChange() {}; // this life meter doesn't care - virtual bool IsInDanger(); - virtual bool IsHot(); - virtual bool IsFailing(); + virtual bool IsInDanger() const; + virtual bool IsHot() const; + virtual bool IsFailing() const; virtual float GetLife() const { return m_fLifePercentage; } void UpdateNonstopLifebar(int cleared, int total, int ProgressiveLifebarDifficulty); diff --git a/stepmania/src/LifeMeterBattery.cpp b/stepmania/src/LifeMeterBattery.cpp index 2ff1c87f69..d73010db04 100644 --- a/stepmania/src/LifeMeterBattery.cpp +++ b/stepmania/src/LifeMeterBattery.cpp @@ -140,17 +140,17 @@ void LifeMeterBattery::OnDancePointsChange() } -bool LifeMeterBattery::IsInDanger() +bool LifeMeterBattery::IsInDanger() const { return false; } -bool LifeMeterBattery::IsHot() +bool LifeMeterBattery::IsHot() const { return false; } -bool LifeMeterBattery::IsFailing() +bool LifeMeterBattery::IsFailing() const { return GAMESTATE->m_CurStageStats.bFailedEarlier[m_PlayerNumber]; } diff --git a/stepmania/src/LifeMeterBattery.h b/stepmania/src/LifeMeterBattery.h index c4d83696a8..4e03194482 100644 --- a/stepmania/src/LifeMeterBattery.h +++ b/stepmania/src/LifeMeterBattery.h @@ -32,9 +32,9 @@ public: virtual void ChangeLife( TapNoteScore score ); virtual void ChangeLife( HoldNoteScore score, TapNoteScore tscore ); virtual void OnDancePointsChange(); // look in GAMESTATE and update the display - virtual bool IsInDanger(); - virtual bool IsHot(); - virtual bool IsFailing(); + virtual bool IsInDanger() const; + virtual bool IsHot() const; + virtual bool IsFailing() const; virtual void UpdateNonstopLifebar(int cleared, int total, int ProgressiveLifebarDifficulty) { };