From dbb7ec7fe70422b4f8b8e7bafd58dee27edfc41b Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 23 Feb 2003 06:25:43 +0000 Subject: [PATCH] Remove most of the debugging cruft. (Nobody else is reporting this and the one person that did can't reproduce it.) Reduce it to some sanity and progress checks so it can be narrowed down if it happens again. --- stepmania/src/SongManager.cpp | 44 +++++------------------------------ 1 file changed, 6 insertions(+), 38 deletions(-) diff --git a/stepmania/src/SongManager.cpp b/stepmania/src/SongManager.cpp index d2332f6441..66bb69f22c 100644 --- a/stepmania/src/SongManager.cpp +++ b/stepmania/src/SongManager.cpp @@ -399,13 +399,8 @@ void SongManager::SaveMachineScoresToDisk() for( int i=0; iTrace("Writing %i,%i,%i", i, j, k); - LOG->Trace(" %p", m_MachineScores[i][j][k].sName.c_str()); - if( fp ) fprintf(fp, "%f %s\n", m_MachineScores[i][j][k].fScore, m_MachineScores[i][j][k].sName.c_str()); - } fclose(fp); } } @@ -421,26 +416,16 @@ void SongManager::SaveMachineScoresToDisk() for( unsigned c=0; cTrace("Writing c = %i", c); ASSERT(pCourse); - LOG->Trace(" ag %i", pCourse->m_bIsAutoGen ); + if( pCourse->m_bIsAutoGen ) - { LOG->Trace(" %p", pCourse->m_sName.c_str() ); - fprintf(fp, "%s\n", pCourse->m_sName.c_str()); - } else - { LOG->Trace(" %p", pCourse->m_sPath.c_str() ); - fprintf(fp, "%s\n", pCourse->m_sPath.c_str()); - } for( int i=0; iTrace(" Writing %i %i", i, j); - LOG->Trace(" %p", pCourse->m_RankingScores[i][j].sName.c_str()); fprintf(fp, "%d %f %s\n", pCourse->m_RankingScores[i][j].iDancePoints, pCourse->m_RankingScores[i][j].fSurviveTime, @@ -463,24 +448,17 @@ void SongManager::SaveMachineScoresToDisk() for( unsigned s=0; sTrace("Writing s = %i", s); Song* pSong = m_pSongs[s]; ASSERT(pSong); + vector vNotes = pSong->m_apNotes; for( int n=(int)vNotes.size()-1; n>=0; n-- ) { - LOG->Trace(" n = %i", n); if( vNotes[n]->m_MemCardScores[c].grade <= GRADE_E ) - { - LOG->Trace("erase"); vNotes.erase( vNotes.begin()+n ); - } } if( vNotes.size() == 0 ) continue; // skip - LOG->Trace("ok"); - LOG->Trace("write %p %i", pSong->GetSongDir().c_str(), vNotes.size()); fprintf(fp, "%s\n%u\n", pSong->GetSongDir().c_str(), @@ -488,15 +466,14 @@ void SongManager::SaveMachineScoresToDisk() for( unsigned i=0; iTrace(" i = %i", i); Notes* pNotes = vNotes[i]; ASSERT(pNotes); - LOG->Trace(" %p", pNotes->GetDescription().c_str()); + fprintf(fp, "%d\n%d\n%s\n", pNotes->m_NotesType, pNotes->GetDifficulty(), pNotes->GetDescription().c_str() ); - LOG->Trace(" ..."); + fprintf(fp, "%d %d %f\n", pNotes->m_MemCardScores[c].iNumTimesPlayed, pNotes->m_MemCardScores[c].grade, @@ -520,28 +497,19 @@ void SongManager::SaveMachineScoresToDisk() for( unsigned c=0; cTrace(" c=%i", c); Course* pCourse = m_pCourses[c]; ASSERT(pCourse); - LOG->Trace(" %i", pCourse->m_bIsAutoGen ); + if( pCourse->m_bIsAutoGen ) - { - LOG->Trace(" %p", pCourse->m_sName.c_str() ); fprintf(fp, "%s\n", pCourse->m_sName.c_str()); - } - else { - LOG->Trace(" %p", pCourse->m_sPath.c_str() ); + else fprintf(fp, "%s\n", pCourse->m_sPath.c_str()); - } for( int i=0; iTrace(" %i", i ); fprintf(fp, "%d %d %f\n", pCourse->m_MemCardScores[c][i].iNumTimesPlayed, pCourse->m_MemCardScores[c][i].iDancePoints, pCourse->m_MemCardScores[c][i].fSurviveTime); - } } fclose(fp);