Don't save unplayed PlayModes and styles.

This commit is contained in:
Glenn Maynard
2004-02-22 02:51:27 +00:00
parent 0888d41ef7
commit 806d9cbafa
+8
View File
@@ -469,13 +469,21 @@ XNode* Profile::SaveGeneralDataCreateNode() const
{
XNode* pNumSongsPlayedByPlayMode = pGeneralDataNode->AppendChild("NumSongsPlayedByPlayMode");
FOREACH_PlayMode( pm )
{
/* Don't save unplayed PlayModes. */
if( !m_iNumSongsPlayedByPlayMode[pm] )
continue;
pNumSongsPlayedByPlayMode->AppendChild( PlayModeToString(pm), m_iNumSongsPlayedByPlayMode[pm] );
}
}
{
XNode* pNumSongsPlayedByStyle = pGeneralDataNode->AppendChild("NumSongsPlayedByStyle");
for( int i=0; i<NUM_STYLES; i++ )
{
/* Don't save unplayed styles. */
if( !m_iNumSongsPlayedByStyle[i] )
continue;
CString sStyle = GAMEMAN->GetStyleDefForStyle((Style)i)->m_szName;
pNumSongsPlayedByStyle->AppendChild( sStyle, m_iNumSongsPlayedByStyle[i] );
}