AddHighScore fixes

This commit is contained in:
Glenn Maynard
2003-10-15 01:03:14 +00:00
parent cf381fb553
commit d1d342dbd3
4 changed files with 38 additions and 30 deletions
+17
View File
@@ -383,6 +383,23 @@ void Course::AutogenNonstopFromGroup( CString sGroupName, vector<Song*> &apSongs
m_entries.pop_back();
}
void Course::MemCardData::AddHighScore( HighScore hs, int &iIndexOut )
{
int i;
for( i=0; i<(int)vHighScores.size(); i++ )
{
if( hs > vHighScores[i] )
break;
}
if( i < NUM_RANKING_LINES )
{
vHighScores.insert( vHighScores.begin()+i, hs );
iIndexOut = i;
if( vHighScores.size() > NUM_RANKING_LINES )
vHighScores.erase( vHighScores.begin()+NUM_RANKING_LINES, vHighScores.end() );
}
}
/*
* Difficult courses do the following:
*