From 1c9a87326a3ced1fba04ac92038c6ffc4dde858e Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 15 Nov 2004 03:24:43 +0000 Subject: [PATCH] Move the default life meter to a metric. I'm not yet sure what the best way to handle these are; metrics, different GamePrefs defaults per game, ... --- stepmania/src/LifeMeterBar.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/stepmania/src/LifeMeterBar.cpp b/stepmania/src/LifeMeterBar.cpp index d19b26960c..5afa881f40 100644 --- a/stepmania/src/LifeMeterBar.cpp +++ b/stepmania/src/LifeMeterBar.cpp @@ -16,6 +16,7 @@ static ThemeMetric METER_HEIGHT ("LifeMeterBar","MeterHeight"); static ThemeMetric DANGER_THRESHOLD ("LifeMeterBar","DangerThreshold"); static ThemeMetric NUM_CHAMBERS ("LifeMeterBar","NumChambers"); static ThemeMetric NUM_STRIPS ("LifeMeterBar","NumStrips"); +static ThemeMetric INITIAL_VALUE ("LifeMeterBar","InitialValue"); const float FAIL_THRESHOLD = 0; @@ -222,9 +223,14 @@ LifeMeterBar::LifeMeterBar() switch( GAMESTATE->m_SongOptions.m_DrainType ) { - case SongOptions::DRAIN_NORMAL: m_fLifePercentage = 0.5f; break; - case SongOptions::DRAIN_NO_RECOVER: m_fLifePercentage = 1.0f; break; - case SongOptions::DRAIN_SUDDEN_DEATH: m_fLifePercentage = 1.0f; break; + case SongOptions::DRAIN_NORMAL: + m_fLifePercentage = INITIAL_VALUE; + break; + + /* These types only go down, so they always start at full. */ + case SongOptions::DRAIN_NO_RECOVER: + case SongOptions::DRAIN_SUDDEN_DEATH: + m_fLifePercentage = 1.0f; break; default: ASSERT(0); }