From aa470b4defe36ed9cee7e18f0bd9e6262050f997 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Tue, 15 Nov 2011 21:30:29 -0500 Subject: [PATCH] Add the ExtraStageFreshBar metric. --- Docs/Changelog_sm5.txt | 7 +++++++ Themes/_fallback/metrics.ini | 2 ++ src/LifeMeterBar.cpp | 3 ++- src/LifeMeterBar.h | 1 + 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 1b38cf1ac3..d5488fd978 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -8,6 +8,13 @@ ________________________________________________________________________________ StepMania 5.0 $next | 2011xxxx -------------------------------------------------------------------------------- +2011/11/15 +---------- +* [LifeMeterBar] Added the ExtraStageFreshBar metric. Let the themer decide + if extra stages should have their own life bar behavior. Note that this + metric does NOT change the lifebar to the battery style. This metric starts + as true. [Wolfman2000] + 2011/11/14 ---------- * [Mac OS X] Restore JPEG functionality. [Wolfman2000] diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index 0f7f83506c..b3b7edc9cb 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -526,6 +526,8 @@ HotValue=1.0 LifeMultiplier=1.0 # How good you gotta hit it to keep it alive. ( W3 is 'Great' ); MinStayAlive="TapNoteScore_W3" +# If the life bar resets to "default" settings on an extra stage. +ExtraStageFreshBar=true # How much it changes LifePercentChangeW1=0.008 diff --git a/src/LifeMeterBar.cpp b/src/LifeMeterBar.cpp index 4c7eee2ed7..c3e6671a75 100644 --- a/src/LifeMeterBar.cpp +++ b/src/LifeMeterBar.cpp @@ -25,6 +25,7 @@ LifeMeterBar::LifeMeterBar() HOT_VALUE.Load ("LifeMeterBar","HotValue"); LIFE_MULTIPLIER.Load ( "LifeMeterBar","LifeMultiplier"); MIN_STAY_ALIVE.Load ("LifeMeterBar","MinStayAlive"); + EXTRA_STAGE_FRESH_BAR.Load ("LifeMeterBar","ExtraStageFreshBar"); m_fLifePercentChange.Load( "LifeMeterBar", LIFE_PERCENT_CHANGE_NAME, NUM_ScoreEvent ); m_pPlayerState = NULL; @@ -306,7 +307,7 @@ void LifeMeterBar::UpdateNonstopLifebar() // if (iCleared > iTotal) iCleared = iTotal; // clear/iTotal <= 1 // if (iTotal == 0) iTotal = 1; // no division by 0 - if( GAMESTATE->IsAnExtraStage() ) + if( GAMESTATE->IsAnExtraStage() && EXTRA_STAGE_FRESH_BAR ) { // extra stage is its own thing, should not be progressive // and it should be as difficult as life 4 diff --git a/src/LifeMeterBar.h b/src/LifeMeterBar.h index b15da07f21..803b411326 100644 --- a/src/LifeMeterBar.h +++ b/src/LifeMeterBar.h @@ -38,6 +38,7 @@ private: ThemeMetric INITIAL_VALUE; ThemeMetric HOT_VALUE; ThemeMetric LIFE_MULTIPLIER; + ThemeMetric EXTRA_STAGE_FRESH_BAR; ThemeMetric MIN_STAY_ALIVE; ThemeMetric1D m_fLifePercentChange;