本文整理汇总了C++中Profile::GetSongsActual方法的典型用法代码示例。如果您正苦于以下问题:C++ Profile::GetSongsActual方法的具体用法?C++ Profile::GetSongsActual怎么用?C++ Profile::GetSongsActual使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Profile
的用法示例。
在下文中一共展示了Profile::GetSongsActual方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetStatsLineValue
CString GetStatsLineValue( PlayerNumber pn, EndingStatsLine line )
{
Profile* pProfile = PROFILEMAN->GetProfile( pn );
ASSERT( pProfile );
StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType;
switch( line )
{
case CALORIES_TODAY: return pProfile->GetDisplayTotalCaloriesBurnedToday();
case CURRENT_COMBO: return Commify( pProfile->m_iCurrentCombo );
case PERCENT_COMPLETE:
{
float fActual = 0;
float fPossible = 0;
if( GAMESTATE->IsCourseMode() )
{
set<CourseDifficulty> vDiffs;
GAMESTATE->GetCourseDifficultiesToShow( vDiffs );
for( set<CourseDifficulty>::iterator iter = vDiffs.begin(); iter != vDiffs.end(); iter++ )
{
fActual += pProfile->GetCoursesActual(st,*iter);
fPossible += pProfile->GetCoursesPossible(st,*iter);
}
}
else
{
set<Difficulty> vDiffs;
GAMESTATE->GetDifficultiesToShow( vDiffs );
for( set<Difficulty>::iterator iter = vDiffs.begin(); iter != vDiffs.end(); iter++ )
{
fActual += pProfile->GetSongsActual(st,*iter);
fPossible += pProfile->GetSongsPossible(st,*iter);
}
}
return ssprintf( "%05.2f%%", fActual/fPossible*100 );
}
case PERCENT_COMPLETE_EASY:
case PERCENT_COMPLETE_MEDIUM:
case PERCENT_COMPLETE_HARD:
case PERCENT_COMPLETE_CHALLENGE:
// Ugly...
{
CString sStepsType = GAMEMAN->StepsTypeToThemedString(st);
float fPercent = 0;
if( GAMESTATE->IsCourseMode() )
{
CourseDifficulty cd = (CourseDifficulty)(DIFFICULTY_EASY+line-PERCENT_COMPLETE_EASY);
ASSERT( cd >= 0 && cd < NUM_COURSE_DIFFICULTIES );
if( !GAMESTATE->IsCourseDifficultyShown(cd) )
return "";
// CString sDifficulty = CourseDifficultyToThemedString(cd);
fPercent = pProfile->GetCoursesPercentComplete(st,cd);
}
else
{
Difficulty dc = (Difficulty)(DIFFICULTY_EASY+line-PERCENT_COMPLETE_EASY);
ASSERT( dc >= 0 && dc < NUM_DIFFICULTIES );
// CString sDifficulty = DifficultyToThemedString(dc);
fPercent = pProfile->GetSongsPercentComplete(st,dc);
}
return ssprintf( "%05.2f%%", fPercent*100 );
}
default: ASSERT(0); return "";
}
}