@@ -345,15 +345,26 @@ void MusicWheelItem::RefreshGrades()
345
345
346
346
Profile *pProfile = PROFILEMAN->GetProfile (ps);
347
347
348
- HighScoreList *pHSL = NULL ;
348
+ HighScoreList *pHSL = NULL ;
349
+ /* quick hack to make the highest grade for any difficulty show up,
350
+ should make optional later, also should make it descend through the
351
+ difficulties and stop once a valid grade has been hit - Mina*/
352
+ Grade agP;
349
353
if ( PROFILEMAN->IsPersistentProfile (ps) && dc != Difficulty_Invalid )
350
354
{
351
- if ( pWID->m_pSong )
355
+ if ( pWID->m_pSong )
352
356
{
353
- const Steps* pSteps = SongUtil::GetStepsByDifficulty ( pWID->m_pSong , st, dc );
354
- if ( pSteps != NULL )
355
- pHSL = &pProfile->GetStepsHighScoreList (pWID->m_pSong , pSteps);
357
+ FOREACH_ENUM (Difficulty, i) {
358
+ Steps* pSteps = SongUtil::GetStepsByDifficulty (pWID->m_pSong , st, i);
359
+ if (pSteps != NULL ) {
360
+ pHSL = &pProfile->GetStepsHighScoreList (pWID->m_pSong , pSteps);
361
+ Grade ag = pHSL->HighGrade ;
362
+ agP = min (ag,agP);
363
+ }
364
+ }
356
365
}
366
+
367
+
357
368
else if ( pWID->m_pCourse )
358
369
{
359
370
const Trail *pTrail = pWID->m_pCourse ->GetTrail ( st, dc );
@@ -366,7 +377,7 @@ void MusicWheelItem::RefreshGrades()
366
377
msg.SetParam ( " PlayerNumber" , p );
367
378
if ( pHSL )
368
379
{
369
- msg.SetParam ( " Grade" , pHSL-> HighGrade );
380
+ msg.SetParam ( " Grade" , agP );
370
381
msg.SetParam ( " NumTimesPlayed" , pHSL->GetNumTimesPlayed () );
371
382
}
372
383
m_pGradeDisplay[p]->HandleMessage ( msg );
0 commit comments