allow freeing steps from a specific profile

This commit is contained in:
Glenn Maynard
2005-04-25 00:09:59 +00:00
parent dcafde0088
commit 96bcbbc820
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -185,7 +185,7 @@ void GameState::Reset()
FOREACH_PlayerNumber( pn ) FOREACH_PlayerNumber( pn )
PROFILEMAN->UnloadProfile( pn ); PROFILEMAN->UnloadProfile( pn );
SONGMAN->FreeAllLoadedFromProfiles(); SONGMAN->FreeAllLoadedFromProfile();
SONGMAN->UpdateBest(); SONGMAN->UpdateBest();
SONGMAN->UpdateShuffled(); SONGMAN->UpdateShuffled();
@@ -385,7 +385,7 @@ void GameState::EndGame()
// MEMCARDMAN->FlushAndReset(); // MEMCARDMAN->FlushAndReset();
CHECKPOINT; CHECKPOINT;
SONGMAN->FreeAllLoadedFromProfiles(); SONGMAN->FreeAllLoadedFromProfile();
// make sure we don't execute EndGame twice. // make sure we don't execute EndGame twice.
m_timeGameStarted.SetZero(); m_timeGameStarted.SetZero();
+2 -2
View File
@@ -1214,12 +1214,12 @@ void SongManager::LoadEditsFromDir( const CString &sDir, ProfileSlot slot )
} }
} }
void SongManager::FreeAllLoadedFromProfiles() void SongManager::FreeAllLoadedFromProfile( ProfileSlot slot )
{ {
for( unsigned s=0; s<m_pSongs.size(); s++ ) for( unsigned s=0; s<m_pSongs.size(); s++ )
{ {
Song* pSong = m_pSongs[s]; Song* pSong = m_pSongs[s];
pSong->FreeAllLoadedFromProfile(); pSong->FreeAllLoadedFromProfile( slot );
} }
// After freeing some Steps pointers, the cache will be invalid. // After freeing some Steps pointers, the cache will be invalid.
+1 -1
View File
@@ -37,7 +37,7 @@ public:
void LoadAllFromProfile( ProfileSlot s ); // songs, edits void LoadAllFromProfile( ProfileSlot s ); // songs, edits
void LoadEditsFromDir( const CString &sDir, ProfileSlot slot ); void LoadEditsFromDir( const CString &sDir, ProfileSlot slot );
int GetNumStepsLoadedFromProfile(); int GetNumStepsLoadedFromProfile();
void FreeAllLoadedFromProfiles(); void FreeAllLoadedFromProfile( ProfileSlot slot = PROFILE_SLOT_INVALID );
void LoadGroupSymLinks( CString sDir, CString sGroupFolder ); void LoadGroupSymLinks( CString sDir, CString sGroupFolder );