add song cleaning

This commit is contained in:
Glenn Maynard
2002-12-21 18:23:37 +00:00
parent 7632bf8d00
commit e7c32293da
3 changed files with 18 additions and 0 deletions
+3
View File
@@ -238,6 +238,9 @@ Screen* ScreenManager::MakeNewScreen( CString sClassName )
* apparent. */
DISPLAY->ResetStats();
/* This is a convenient time to clean up our song cache. */
SONGMAN->CleanCourses();
return ret;
}
+14
View File
@@ -512,6 +512,20 @@ void SongManager::ReloadCourses()
}
/* Called periodically to wipe out cached NoteData. This is called when we change
* screens. */
void SongManager::CleanCourses()
{
for( unsigned i=0; i<m_pSongs.size(); i++ )
{
for( unsigned n=0; n<m_pSongs[i]->m_apNotes.size(); n++ )
{
m_pSongs[i]->m_apNotes[n]->Compress();
}
}
}
bool SongManager::GetExtraStageInfoFromCourse( bool bExtra2, CString sPreferredGroup,
Song*& pSongOut, Notes*& pNotesOut, PlayerOptions& po_out, SongOptions& so_out )
{
+1
View File
@@ -57,6 +57,7 @@ public:
void InitCoursesFromDisk();
void ReloadCourses();
void CleanCourses();
void GetExtraStageInfo( bool bExtra2, CString sPreferredGroup, const StyleDef *s,
Song*& pSongOut, Notes*& pNotesOut, PlayerOptions& po_out, SongOptions& so_out );