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
+7 -1
View File
@@ -330,8 +330,14 @@ bool CompareStepsPointersBySortValueDescending(const Steps *pSteps1, const Steps
void SortStepsPointerArrayByMostPlayed( vector<Steps*> &vStepsPointers, ProfileSlot slot )
{
Profile* pProfile = PROFILEMAN->GetProfile(slot);
ASSERT( pProfile ); // we shouldn't be requesting this sort unless there's a Profile in this slot
if( pProfile == NULL )
return; // nothing to do since we don't have data
SortStepsPointerArrayByMostPlayed( vStepsPointers, pProfile );
}
void SortStepsPointerArrayByMostPlayed( vector<Steps*> &vStepsPointers, Profile* pProfile )
{
ASSERT( pProfile );
for(unsigned i = 0; i < vStepsPointers.size(); ++i)
steps_sort_val[vStepsPointers[i]] = ssprintf("%9i", pProfile->GetStepsNumTimesPlayed(vStepsPointers[i]));
stable_sort( vStepsPointers.begin(), vStepsPointers.end(), CompareStepsPointersBySortValueDescending );