diff --git a/stepmania/src/MusicWheelItem.cpp b/stepmania/src/MusicWheelItem.cpp index 7c39a6ed0b..e64c865ed4 100644 --- a/stepmania/src/MusicWheelItem.cpp +++ b/stepmania/src/MusicWheelItem.cpp @@ -307,9 +307,8 @@ void MusicWheelItem::RefreshGrades() if( PROFILEMAN->IsPersistentProfile(p) ) ps = (ProfileSlot)p; - HighScore hs; - PROFILEMAN->GetHighScoreForDifficulty( data->m_pSong, GAMESTATE->GetCurrentStyle(), ps, dc, hs ); - m_pGradeDisplay[p]->SetGrade( p, hs.GetGrade() ); + Grade g = PROFILEMAN->GetHighGradeForDifficulty( data->m_pSong, GAMESTATE->GetCurrentStyle(), ps, dc ); + m_pGradeDisplay[p]->SetGrade( p, g ); } } diff --git a/stepmania/src/ProfileManager.cpp b/stepmania/src/ProfileManager.cpp index ae398dbce2..c2fb8e7336 100644 --- a/stepmania/src/ProfileManager.cpp +++ b/stepmania/src/ProfileManager.cpp @@ -680,7 +680,7 @@ void ProfileManager::IncrementStepsPlayCount( const Song* pSong, const Steps* pS PROFILEMAN->GetMachineProfile()->IncrementStepsPlayCount( pSong, pSteps ); } -void ProfileManager::GetHighScoreForDifficulty( const Song *s, const Style *st, ProfileSlot slot, Difficulty dc, HighScore &hsOut ) const +Grade ProfileManager::GetHighGradeForDifficulty( const Song *s, const Style *st, ProfileSlot slot, Difficulty dc ) const { // return max grade of notes in difficulty class vector aNotes; @@ -690,9 +690,8 @@ void ProfileManager::GetHighScoreForDifficulty( const Song *s, const Style *st, const Steps* pSteps = SongUtil::GetStepsByDifficulty( s, st->m_StepsType, dc ); if( pSteps && PROFILEMAN->IsPersistentProfile(slot) ) - hsOut = PROFILEMAN->GetProfile(slot)->GetStepsHighScoreList(s,pSteps).GetTopScore(); - else - hsOut = HighScore(); + return PROFILEMAN->GetProfile(slot)->GetStepsHighScoreList(s,pSteps).HighGrade; + return Grade_NoData; } diff --git a/stepmania/src/ProfileManager.h b/stepmania/src/ProfileManager.h index 2b0f1f3235..74fd53a9f4 100644 --- a/stepmania/src/ProfileManager.h +++ b/stepmania/src/ProfileManager.h @@ -7,6 +7,7 @@ #include "GameConstantsAndTypes.h" #include "Difficulty.h" #include "Preference.h" +#include "Grade.h" class Profile; class Song; @@ -94,7 +95,7 @@ public: bool IsSongNew( const Song* pSong ) const { return GetSongNumTimesPlayed(pSong,ProfileSlot_Machine)==0; } void AddStepsScore( const Song* pSong, const Steps* pSteps , PlayerNumber pn, const HighScore &hs, int &iPersonalIndexOut, int &iMachineIndexOut ); void IncrementStepsPlayCount( const Song* pSong, const Steps* pSteps, PlayerNumber pn ); - void GetHighScoreForDifficulty( const Song *s, const Style *st, ProfileSlot slot, Difficulty dc, HighScore &hsOut ) const; + Grade GetHighGradeForDifficulty( const Song *s, const Style *st, ProfileSlot slot, Difficulty dc ) const; // // Course stats