optimize Stats.xml size: Allow theme to turn off writing off certain RadarValues
This commit is contained in:
@@ -4710,3 +4710,7 @@ InternetRankingViewGuidUrl=
|
||||
ProductTitle=StepMania
|
||||
FooterText=generated by StepMania
|
||||
FooterLink=http://www.stepmania.com
|
||||
|
||||
[RadarValues]
|
||||
WriteComplexValues=1
|
||||
WriteSimpleValues=1
|
||||
@@ -3,7 +3,10 @@
|
||||
#include "ThemeManager.h"
|
||||
#include "RageUtil.h"
|
||||
#include "XmlFile.h"
|
||||
#include "ThemeManager.h"
|
||||
|
||||
#define WRITE_COMPLEX_VALUES THEME->GetMetricB("RadarValues","WriteComplexValues")
|
||||
#define WRITE_SIMPLE_VALUES THEME->GetMetricB("RadarValues","WriteSimpleValues")
|
||||
|
||||
RadarValues::RadarValues()
|
||||
{
|
||||
@@ -31,9 +34,15 @@ XNode* RadarValues::CreateNode() const
|
||||
FOREACH_RadarCategory( rc )
|
||||
{
|
||||
if( rc >= RADAR_NUM_TAPS_AND_HOLDS )
|
||||
pNode->AppendChild( RadarCategoryToString(rc), (int)m_fValues[rc] );
|
||||
{
|
||||
if( WRITE_SIMPLE_VALUES )
|
||||
pNode->AppendChild( RadarCategoryToString(rc), (int)m_fValues[rc] );
|
||||
}
|
||||
else
|
||||
pNode->AppendChild( RadarCategoryToString(rc), m_fValues[rc] );
|
||||
{
|
||||
if( WRITE_COMPLEX_VALUES )
|
||||
pNode->AppendChild( RadarCategoryToString(rc), m_fValues[rc] );
|
||||
}
|
||||
}
|
||||
|
||||
return pNode;
|
||||
@@ -43,6 +52,8 @@ void RadarValues::LoadFromNode( const XNode* pNode )
|
||||
{
|
||||
ASSERT( pNode->name == "RadarValues" );
|
||||
|
||||
Zero();
|
||||
|
||||
CString s;
|
||||
|
||||
FOREACH_RadarCategory( rc )
|
||||
|
||||
Reference in New Issue
Block a user