From 8d11f9f1367d1bb2bbb347073884e1dbc41b7b7e Mon Sep 17 00:00:00 2001 From: Flameshadowxeroshin Date: Tue, 15 Nov 2011 21:09:27 -0600 Subject: [PATCH] change a metric --- Docs/Changelog_sm5.txt | 8 ++++---- Themes/_fallback/metrics.ini | 6 ++++-- src/LifeMeterBar.cpp | 7 ++++--- src/LifeMeterBar.h | 3 ++- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index d5488fd978..0942d0e1e9 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -10,10 +10,10 @@ 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] +* [LifeMeterBar] Added the ForceLifeDifficultyOnExtraStage metric and + the ExtraStageLifeDifficulty 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. [Wolfman2000/FSX] 2011/11/14 ---------- diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index b3b7edc9cb..c83808c8f8 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -526,8 +526,10 @@ 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 +# If the life difficulty should be changed on extra stages +ForceLifeDifficultyOnExtraStage=true +# And what it should be changed to. Has no effect if the above is false. +ExtraStageLifeDifficulty=1.0 # How much it changes LifePercentChangeW1=0.008 diff --git a/src/LifeMeterBar.cpp b/src/LifeMeterBar.cpp index c3e6671a75..246a508e39 100644 --- a/src/LifeMeterBar.cpp +++ b/src/LifeMeterBar.cpp @@ -25,7 +25,8 @@ 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"); + FORCE_LIFE_DIFFICULTY_ON_EXTRA_STAGE.Load ("LifeMeterBar","ForceLifeDifficultyOnExtraStage"); + EXTRA_STAGE_LIFE_DIFFICULTY.Load ("LifeMeterBar","ExtraStageLifeDifficulty"); m_fLifePercentChange.Load( "LifeMeterBar", LIFE_PERCENT_CHANGE_NAME, NUM_ScoreEvent ); m_pPlayerState = NULL; @@ -307,14 +308,14 @@ void LifeMeterBar::UpdateNonstopLifebar() // if (iCleared > iTotal) iCleared = iTotal; // clear/iTotal <= 1 // if (iTotal == 0) iTotal = 1; // no division by 0 - if( GAMESTATE->IsAnExtraStage() && EXTRA_STAGE_FRESH_BAR ) + if( GAMESTATE->IsAnExtraStage() && FORCE_LIFE_DIFFICULTY_ON_EXTRA_STAGE ) { // extra stage is its own thing, should not be progressive // and it should be as difficult as life 4 // (e.g. it should not depend on life settings) m_iProgressiveLifebar = 0; - m_fLifeDifficulty = 1.0f; + m_fLifeDifficulty = EXTRA_STAGE_LIFE_DIFFICULTY; return; } diff --git a/src/LifeMeterBar.h b/src/LifeMeterBar.h index 803b411326..7de5686fb3 100644 --- a/src/LifeMeterBar.h +++ b/src/LifeMeterBar.h @@ -38,8 +38,9 @@ private: ThemeMetric INITIAL_VALUE; ThemeMetric HOT_VALUE; ThemeMetric LIFE_MULTIPLIER; - ThemeMetric EXTRA_STAGE_FRESH_BAR; + ThemeMetric FORCE_LIFE_DIFFICULTY_ON_EXTRA_STAGE; ThemeMetric MIN_STAY_ALIVE; + ThemeMetric EXTRA_STAGE_LIFE_DIFFICULTY; ThemeMetric1D m_fLifePercentChange;