remove CachedThemeMetrics in favor of ThemeMetric<T>

fix "CachedThemeMetrics don't read HTML colors and don't evaluate Lua expressions"
This commit is contained in:
Chris Danford
2004-11-06 20:36:04 +00:00
parent 3594cc345e
commit 5127ceef4d
30 changed files with 166 additions and 321 deletions
+3 -5
View File
@@ -41,6 +41,7 @@
#include "Foreach.h"
#include "DancingCharacters.h"
#include "ScreenDimensions.h"
#include "ThemeMetric.h"
//
// Defines
@@ -55,8 +56,8 @@
* go away eventually, once metrics can redirect to Lua calls. */
#define INITIAL_BACKGROUND_BRIGHTNESS( play_mode ) THEME->GetMetricF(m_sName,"InitialBackgroundBrightness"+Capitalize(PlayModeToString(play_mode)))
static CachedThemeMetricF SECONDS_BETWEEN_COMMENTS ("ScreenGameplay","SecondsBetweenComments");
static CachedThemeMetricF TICK_EARLY_SECONDS ("ScreenGameplay","TickEarlySeconds");
static ThemeMetric<float> SECONDS_BETWEEN_COMMENTS ("ScreenGameplay","SecondsBetweenComments");
static ThemeMetric<float> TICK_EARLY_SECONDS ("ScreenGameplay","TickEarlySeconds");
/* Global, so it's accessible from ShowSavePrompt: */
static float g_fOldOffset; // used on offset screen to calculate difference
@@ -100,9 +101,6 @@ void ScreenGameplay::Init()
/* We do this ourself. */
SOUND->HandleSongTimer( false );
SECONDS_BETWEEN_COMMENTS.Refresh();
TICK_EARLY_SECONDS.Refresh();
//need to initialize these before checking for demonstration mode
//otherwise destructor will try to delete possibly invalid pointers