GetHighScoreForDifficulty -> GetHighGradeForDifficulty.

This commit is contained in:
Steve Checkoway
2007-02-25 07:02:27 +00:00
parent bf77a61057
commit 2afb681aea
3 changed files with 7 additions and 8 deletions
+2 -3
View File
@@ -307,9 +307,8 @@ void MusicWheelItem::RefreshGrades()
if( PROFILEMAN->IsPersistentProfile(p) ) if( PROFILEMAN->IsPersistentProfile(p) )
ps = (ProfileSlot)p; ps = (ProfileSlot)p;
HighScore hs; Grade g = PROFILEMAN->GetHighGradeForDifficulty( data->m_pSong, GAMESTATE->GetCurrentStyle(), ps, dc );
PROFILEMAN->GetHighScoreForDifficulty( data->m_pSong, GAMESTATE->GetCurrentStyle(), ps, dc, hs ); m_pGradeDisplay[p]->SetGrade( p, g );
m_pGradeDisplay[p]->SetGrade( p, hs.GetGrade() );
} }
} }
+3 -4
View File
@@ -680,7 +680,7 @@ void ProfileManager::IncrementStepsPlayCount( const Song* pSong, const Steps* pS
PROFILEMAN->GetMachineProfile()->IncrementStepsPlayCount( pSong, pSteps ); 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 // return max grade of notes in difficulty class
vector<Steps*> aNotes; vector<Steps*> aNotes;
@@ -690,9 +690,8 @@ void ProfileManager::GetHighScoreForDifficulty( const Song *s, const Style *st,
const Steps* pSteps = SongUtil::GetStepsByDifficulty( s, st->m_StepsType, dc ); const Steps* pSteps = SongUtil::GetStepsByDifficulty( s, st->m_StepsType, dc );
if( pSteps && PROFILEMAN->IsPersistentProfile(slot) ) if( pSteps && PROFILEMAN->IsPersistentProfile(slot) )
hsOut = PROFILEMAN->GetProfile(slot)->GetStepsHighScoreList(s,pSteps).GetTopScore(); return PROFILEMAN->GetProfile(slot)->GetStepsHighScoreList(s,pSteps).HighGrade;
else return Grade_NoData;
hsOut = HighScore();
} }
+2 -1
View File
@@ -7,6 +7,7 @@
#include "GameConstantsAndTypes.h" #include "GameConstantsAndTypes.h"
#include "Difficulty.h" #include "Difficulty.h"
#include "Preference.h" #include "Preference.h"
#include "Grade.h"
class Profile; class Profile;
class Song; class Song;
@@ -94,7 +95,7 @@ public:
bool IsSongNew( const Song* pSong ) const { return GetSongNumTimesPlayed(pSong,ProfileSlot_Machine)==0; } 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 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 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 // Course stats