Move RadarValues::WriteSimpleValues, WriteComplexValues into ThemeMetric objects for maintainability.

This commit is contained in:
Chris Danford
2007-02-26 06:04:52 +00:00
parent aa34a3082d
commit 5637d0f7f7
5 changed files with 12 additions and 5 deletions
+2 -2
View File
@@ -54,8 +54,8 @@ void CatalogXml::Save( LoadingWindow *loading_window )
const vector<StepsType> &vStepsTypesToShow = CommonMetrics::STEPS_TYPES_TO_SHOW.GetValue();
const vector<Difficulty> &vDifficultiesToShow = CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue();
const vector<CourseDifficulty> &vCourseDifficultiesToShow = CommonMetrics::COURSE_DIFFICULTIES_TO_SHOW.GetValue();
const bool bWriteSimpleValues = THEME->GetMetricB( "RadarValues", "WriteSimpleValues" );
const bool bWriteComplexValues = THEME->GetMetricB( "RadarValues", "WriteComplexValues" );
const bool bWriteSimpleValues = RadarValues::WRITE_SIMPLE_VALIES;
const bool bWriteComplexValues = RadarValues::WRITE_COMPLEX_VALIES;
{
XNode* pNode = xml.AppendChild( "Totals" );
+1 -1
View File
@@ -22,7 +22,7 @@ ThemeMetric<float> CommonMetrics::TICK_EARLY_SECONDS ("ScreenGameplay","TickE
ThemeMetric<RString> CommonMetrics::DEFAULT_NOTESKIN_NAME ("Common","DefaultNoteSkinName");
ThemeMetricDifficultiesToShow CommonMetrics::DIFFICULTIES_TO_SHOW ("Common","DifficultiesToShow");
ThemeMetricCourseDifficultiesToShow CommonMetrics::COURSE_DIFFICULTIES_TO_SHOW ("Common","CourseDifficultiesToShow");
ThemeMetricStepsTypesToShow CommonMetrics::STEPS_TYPES_TO_SHOW ("Common","StepsTypesToHide");
ThemeMetricStepsTypesToShow CommonMetrics::STEPS_TYPES_TO_SHOW ("Common","StepsTypesToHide"); // This metric takes a list of StepsTypes to hide and returns a list of StepsTypes to show
ThemeMetric<bool> CommonMetrics::ALL_STEPS_TYPES_IN_ONE_LIST ("Common","AllStepsTypeInOneList");
+2 -2
View File
@@ -80,8 +80,8 @@ HighScoreImpl::HighScoreImpl()
XNode *HighScoreImpl::CreateNode() const
{
XNode *pNode = new XNode( "HighScore" );
const bool bWriteSimpleValues = THEME->GetMetricB( "RadarValues", "WriteSimpleValues" );
const bool bWriteComplexValues = THEME->GetMetricB( "RadarValues", "WriteComplexValues" );
const bool bWriteSimpleValues = RadarValues::WRITE_SIMPLE_VALIES;
const bool bWriteComplexValues = RadarValues::WRITE_COMPLEX_VALIES;
// TRICKY: Don't write "name to fill in" markers.
pNode->AppendChild( "Name", IsRankingToFillIn(sName) ? RString("") : sName );
+3
View File
@@ -5,6 +5,9 @@
#include "XmlFile.h"
#include "ThemeManager.h"
ThemeMetric<bool> RadarValues::WRITE_SIMPLE_VALIES( "RadarValues", "WriteSimpleValues" );
ThemeMetric<bool> RadarValues::WRITE_COMPLEX_VALIES( "RadarValues", "WriteComplexValues" );
RadarValues::RadarValues()
{
MakeUnknown();
+4
View File
@@ -4,6 +4,7 @@
#define RARAR_VALUES_H
#include "GameConstantsAndTypes.h"
#include "ThemeMetric.h"
#define RADAR_VAL_UNKNOWN -1
@@ -65,6 +66,9 @@ struct RadarValues
RString ToString( int iMaxValues = -1 ) const; // default = all
void FromString( RString sValues );
static ThemeMetric<bool> WRITE_SIMPLE_VALIES;
static ThemeMetric<bool> WRITE_COMPLEX_VALIES;
// Lua
void PushSelf( lua_State *L );
};