add song cleaning
This commit is contained in:
@@ -238,6 +238,9 @@ Screen* ScreenManager::MakeNewScreen( CString sClassName )
|
|||||||
* apparent. */
|
* apparent. */
|
||||||
DISPLAY->ResetStats();
|
DISPLAY->ResetStats();
|
||||||
|
|
||||||
|
/* This is a convenient time to clean up our song cache. */
|
||||||
|
SONGMAN->CleanCourses();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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,
|
bool SongManager::GetExtraStageInfoFromCourse( bool bExtra2, CString sPreferredGroup,
|
||||||
Song*& pSongOut, Notes*& pNotesOut, PlayerOptions& po_out, SongOptions& so_out )
|
Song*& pSongOut, Notes*& pNotesOut, PlayerOptions& po_out, SongOptions& so_out )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ public:
|
|||||||
|
|
||||||
void InitCoursesFromDisk();
|
void InitCoursesFromDisk();
|
||||||
void ReloadCourses();
|
void ReloadCourses();
|
||||||
|
void CleanCourses();
|
||||||
|
|
||||||
void GetExtraStageInfo( bool bExtra2, CString sPreferredGroup, const StyleDef *s,
|
void GetExtraStageInfo( bool bExtra2, CString sPreferredGroup, const StyleDef *s,
|
||||||
Song*& pSongOut, Notes*& pNotesOut, PlayerOptions& po_out, SongOptions& so_out );
|
Song*& pSongOut, Notes*& pNotesOut, PlayerOptions& po_out, SongOptions& so_out );
|
||||||
|
|||||||
Reference in New Issue
Block a user