split HighScore to separate file

move score data from ProfileManager to Profile
store score data in XML for easier forward/backward compatibility
This commit is contained in:
Chris Danford
2004-02-10 09:42:01 +00:00
parent 0196abe99b
commit 4f439be739
25 changed files with 1727 additions and 1337 deletions
+5
View File
@@ -1047,7 +1047,12 @@ void SortCoursePointerArrayByMostPlayed( vector<Course*> &arrayCoursePointers, P
Profile* pProfile = PROFILEMAN->GetProfile(slot);
if( pProfile == NULL )
return; // nothing to do since we don't have data
SortCoursePointerArrayByMostPlayed( arrayCoursePointers, pProfile );
}
void SortCoursePointerArrayByMostPlayed( vector<Course*> &arrayCoursePointers, Profile* pProfile )
{
ASSERT( pProfile );
for(unsigned i = 0; i < arrayCoursePointers.size(); ++i)
course_sort_val[arrayCoursePointers[i]] = (float) pProfile->GetCourseNumTimesPlayed(arrayCoursePointers[i]);
stable_sort( arrayCoursePointers.begin(), arrayCoursePointers.end(), CompareCoursePointersBySortValueDescending );