save fewer recent scores in player profiles than in machine profile

This commit is contained in:
Chris Danford
2005-04-28 01:29:31 +00:00
parent b33f16d9b7
commit c4ddb498a9
3 changed files with 12 additions and 4 deletions
+6
View File
@@ -270,6 +270,8 @@ void PrefsManager::Init()
m_bHideDefaultNoteSkin = false;
m_iMaxHighScoresPerListForMachine = 10;
m_iMaxHighScoresPerListForPlayer = 3;
m_iMaxRecentScoresForMachine = 100;
m_iMaxRecentScoresForPlayer = 20;
m_bAllowMultipleHighScoreWithSameName = true;
m_fPadStickSeconds = 0;
m_bForceMipMaps = false;
@@ -477,6 +479,8 @@ void PrefsManager::ReadGlobalPrefsFromIni( const IniFile &ini )
ini.GetValue( "Options", "HideDefaultNoteSkin", m_bHideDefaultNoteSkin );
ini.GetValue( "Options", "MaxHighScoresPerListForMachine", m_iMaxHighScoresPerListForMachine );
ini.GetValue( "Options", "MaxHighScoresPerListForPlayer", m_iMaxHighScoresPerListForPlayer );
ini.GetValue( "Options", "MaxRecentScoresForMachine", m_iMaxRecentScoresForMachine );
ini.GetValue( "Options", "MaxRecentScoresForPlayer", m_iMaxRecentScoresForPlayer );
ini.GetValue( "Options", "AllowMultipleHighScoreWithSameName", m_bAllowMultipleHighScoreWithSameName );
ini.GetValue( "Options", "PadStickSeconds", m_fPadStickSeconds );
ini.GetValue( "Options", "ForceMipMaps", m_bForceMipMaps );
@@ -641,6 +645,8 @@ void PrefsManager::SaveGlobalPrefsToIni( IniFile &ini ) const
ini.SetValue( "Options", "HideDefaultNoteSkin", m_bHideDefaultNoteSkin );
ini.SetValue( "Options", "MaxHighScoresPerListForMachine", m_iMaxHighScoresPerListForMachine );
ini.SetValue( "Options", "MaxHighScoresPerListForPlayer", m_iMaxHighScoresPerListForPlayer );
ini.SetValue( "Options", "MaxRecentScoresForMachine", m_iMaxRecentScoresForMachine );
ini.SetValue( "Options", "MaxRecentScoresForPlayer", m_iMaxRecentScoresForPlayer );
ini.SetValue( "Options", "AllowMultipleHighScoreWithSameName", m_bAllowMultipleHighScoreWithSameName );
ini.SetValue( "Options", "PadStickSeconds", m_fPadStickSeconds );
ini.SetValue( "Options", "ForceMipMaps", m_bForceMipMaps );
+2
View File
@@ -218,6 +218,8 @@ public:
bool m_bHideDefaultNoteSkin;
int m_iMaxHighScoresPerListForMachine;
int m_iMaxHighScoresPerListForPlayer;
int m_iMaxRecentScoresForMachine;
int m_iMaxRecentScoresForPlayer;
bool m_bAllowMultipleHighScoreWithSameName;
bool m_bCelShadeModels;
+4 -4
View File
@@ -32,8 +32,6 @@ const CString COMMON_XSL = "Common.xsl";
#define GUID_SIZE_BYTES 8
#define MAX_RECENT_SCORES_TO_SAVE 100
#define MAX_EDITABLE_INI_SIZE_BYTES 2*1024 // 2KB
#define MAX_PLAYER_STATS_XML_SIZE_BYTES \
100 /* Songs */ \
@@ -1628,7 +1626,8 @@ XNode* Profile::SaveRecentSongScoresCreateNode() const
XNode* pNode = new XNode;
pNode->m_sName = "RecentSongScores";
unsigned uNumToSave = min( m_vRecentStepsScores.size(), (unsigned)MAX_RECENT_SCORES_TO_SAVE );
int iMaxRecentScoresToSave = IsMachine() ? PREFSMAN->m_iMaxRecentScoresForMachine : PREFSMAN->m_iMaxRecentScoresForPlayer;
unsigned uNumToSave = min( m_vRecentStepsScores.size(), (unsigned)iMaxRecentScoresToSave );
for( unsigned i=0; i<uNumToSave; i++ )
{
@@ -1705,7 +1704,8 @@ XNode* Profile::SaveRecentCourseScoresCreateNode() const
XNode* pNode = new XNode;
pNode->m_sName = "RecentCourseScores";
unsigned uNumToSave = min( m_vRecentCourseScores.size(), (unsigned)MAX_RECENT_SCORES_TO_SAVE );
int iMaxRecentScoresToSave = IsMachine() ? PREFSMAN->m_iMaxRecentScoresForMachine : PREFSMAN->m_iMaxRecentScoresForPlayer;
unsigned uNumToSave = min( m_vRecentStepsScores.size(), (unsigned)iMaxRecentScoresToSave );
for( unsigned i=0; i<uNumToSave; i++ )
{