diff --git a/stepmania/src/SongManager.cpp b/stepmania/src/SongManager.cpp index c82e5ee067..ce3e1902b4 100644 --- a/stepmania/src/SongManager.cpp +++ b/stepmania/src/SongManager.cpp @@ -41,7 +41,7 @@ const CString MACHINE_STEPS_MEM_CARD_DATA = BASE_PATH "Data" SLASH "MachineStep const CString MACHINE_COURSE_MEM_CARD_DATA = BASE_PATH "Data" SLASH "MachineCourseMemCardData.dat"; const int CATEGORY_RANKING_VERSION = 3; const int STEPS_MEM_CARD_DATA_VERSION = 7; -const int COURSE_MEM_CARD_DATA_VERSION = 4; +const int COURSE_MEM_CARD_DATA_VERSION = 5; #define NUM_GROUP_COLORS THEME->GetMetricI("SongManager","NumGroupColors") @@ -520,8 +520,16 @@ void SongManager::ReadCourseMemCardDataFromFile( CString fn, int mc ) // even if we don't find the Course*, we still have to read past the input - for( int st=0; stm_MemCardDatas[st][mc].vHighScores[l].sName = sName; pCourse->m_MemCardDatas[st][mc].vHighScores[l].iScore = iScore; @@ -682,9 +690,21 @@ void SongManager::SaveCourseMemCardDataToFile( CString fn, int mc ) FileWrite( f, pCourse->m_sName ); else FileWrite( f, pCourse->m_sPath ); - - for( int st=0; stm_MemCardDatas[st][mc].iNumTimesPlayed ) + ++NumStepsPlayed; + FileWrite( f, NumStepsPlayed ); + + for( st=0; stm_MemCardDatas[st][mc].iNumTimesPlayed ) + continue; + --NumStepsPlayed; + + FileWrite( f, st ); FileWrite( f, pCourse->m_MemCardDatas[st][mc].iNumTimesPlayed ); pCourse->m_MemCardDatas[st][mc].vHighScores.resize(NUM_RANKING_LINES); for( int l=0; lm_MemCardDatas[st][mc].vHighScores[l].fSurviveTime ); } } + ASSERT( !NumStepsPlayed ); } }