Add GetGradeForTrail().

This commit is contained in:
Steve Checkoway
2007-05-05 11:16:07 +00:00
parent 7d90dc3967
commit fb7553a2c0
2 changed files with 9 additions and 1 deletions
+8
View File
@@ -679,6 +679,14 @@ Grade ProfileManager::GetGradeForSteps( const Song *pSong, const Style *st, Prof
return Grade_NoData; return Grade_NoData;
} }
Grade ProfileManager::GetGradeForTrail( const Course *pCourse, const Style *st, ProfileSlot slot, Difficulty dc ) const
{
const Trail *pTrail = pCourse->GetTrail( st->m_StepsType, dc );
if( pTrail && IsPersistentProfile(slot) )
return GetProfile( slot )->GetCourseHighScoreList( pCourse, pTrail ).HighGrade;
return Grade_NoData;
}
// //
// Course stats // Course stats
+1 -1
View File
@@ -101,7 +101,7 @@ public:
// //
void AddCourseScore( const Course* pCourse, const Trail* pTrail, PlayerNumber pn, const HighScore &hs, int &iPersonalIndexOut, int &iMachineIndexOut ); void AddCourseScore( const Course* pCourse, const Trail* pTrail, PlayerNumber pn, const HighScore &hs, int &iPersonalIndexOut, int &iMachineIndexOut );
void IncrementCoursePlayCount( const Course* pCourse, const Trail* pTrail, PlayerNumber pn ); void IncrementCoursePlayCount( const Course* pCourse, const Trail* pTrail, PlayerNumber pn );
Grade GetGradeForTrail( const Course *pCourse, const Style *st, ProfileSlot slot, Difficulty dc ) const;
// //
// Category stats // Category stats
// //