split UpdateBestAndShuffled()
add SortSongs()
This commit is contained in:
@@ -121,7 +121,8 @@ void GameState::Reset()
|
|||||||
|
|
||||||
ResetMusicStatistics();
|
ResetMusicStatistics();
|
||||||
ResetStageStatistics();
|
ResetStageStatistics();
|
||||||
SONGMAN->UpdateBestAndShuffled();
|
SONGMAN->UpdateBest();
|
||||||
|
SONGMAN->UpdateShuffled();
|
||||||
|
|
||||||
g_vPlayedStageStats.clear();
|
g_vPlayedStageStats.clear();
|
||||||
|
|
||||||
|
|||||||
@@ -871,7 +871,7 @@ Course *SongManager::FindCourse( CString sName )
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SongManager::UpdateBestAndShuffled()
|
void SongManager::UpdateBest()
|
||||||
{
|
{
|
||||||
// update players best
|
// update players best
|
||||||
for( int i = 0; i < NUM_PROFILE_SLOTS; ++i )
|
for( int i = 0; i < NUM_PROFILE_SLOTS; ++i )
|
||||||
@@ -882,7 +882,10 @@ void SongManager::UpdateBestAndShuffled()
|
|||||||
m_pBestCourses[i] = m_pCourses;
|
m_pBestCourses[i] = m_pCourses;
|
||||||
SortCoursePointerArrayByNumPlays( m_pBestCourses[i], (ProfileSlot) i, true );
|
SortCoursePointerArrayByNumPlays( m_pBestCourses[i], (ProfileSlot) i, true );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SongManager::UpdateShuffled()
|
||||||
|
{
|
||||||
// update shuffled
|
// update shuffled
|
||||||
m_pShuffledSongs = m_pSongs;
|
m_pShuffledSongs = m_pSongs;
|
||||||
random_shuffle( m_pShuffledSongs.begin(), m_pShuffledSongs.end() );
|
random_shuffle( m_pShuffledSongs.begin(), m_pShuffledSongs.end() );
|
||||||
@@ -891,6 +894,11 @@ void SongManager::UpdateBestAndShuffled()
|
|||||||
random_shuffle( m_pShuffledCourses.begin(), m_pShuffledCourses.end() );
|
random_shuffle( m_pShuffledCourses.begin(), m_pShuffledCourses.end() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SongManager::SortSongs()
|
||||||
|
{
|
||||||
|
SortSongPointerArrayByTitle( m_pSongs );
|
||||||
|
}
|
||||||
|
|
||||||
void SongManager::UpdateRankingCourses()
|
void SongManager::UpdateRankingCourses()
|
||||||
{
|
{
|
||||||
/* Updating the ranking courses data is fairly expensive
|
/* Updating the ranking courses data is fairly expensive
|
||||||
|
|||||||
@@ -91,7 +91,9 @@ public:
|
|||||||
Course* GetCourseFromName( CString sName );
|
Course* GetCourseFromName( CString sName );
|
||||||
|
|
||||||
|
|
||||||
void UpdateBestAndShuffled(); // update Players Best
|
void UpdateBest(); // update Players Best
|
||||||
|
void UpdateShuffled(); // re-shuffle songs and courses
|
||||||
|
void SortSongs(); // sort m_pSongs
|
||||||
|
|
||||||
void UpdateRankingCourses(); // courses shown on the ranking screen
|
void UpdateRankingCourses(); // courses shown on the ranking screen
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user