basic course sorting implemented via preferences

This commit is contained in:
Andrew Wong
2003-07-27 14:10:47 +00:00
parent 8b9ae5ae92
commit cb250344b8
6 changed files with 128 additions and 0 deletions
+16
View File
@@ -571,8 +571,24 @@ void MusicWheel::BuildWheelItemDatas( vector<WheelItemData> &arrayWheelItemDatas
default: ASSERT(0); break;
}
// default sort order; other songs may alter this
SortCoursePointerArrayByDifficulty( apCourses );
if (PREFSMAN->m_iCourseSortOrder != 0)
{
for(i=0; i<apCourses.size(); i++)
apCourses[i]->UpdateCourseStats();
if (PREFSMAN->m_iCourseSortOrder == 1)
SortCoursePointerArrayByAvgDifficulty( apCourses );
if (PREFSMAN->m_iCourseSortOrder == 2)
SortCoursePointerArrayByTotalDifficulty( apCourses );
if (PREFSMAN->m_iCourseSortOrder == 3)
SortCoursePointerArrayByRanking( apCourses );
}
if( so == SORT_ALL_COURSES )
SortCoursePointerArrayByType( apCourses );