use FOREACH_ShownCourseDifficulty

This commit is contained in:
Glenn Maynard
2004-05-20 22:27:45 +00:00
parent bcf6792d47
commit 7c1600a1c1
4 changed files with 12 additions and 13 deletions
+2 -2
View File
@@ -301,7 +301,7 @@ int Profile::GetPossibleCourseDancePointsForStepsType( StepsType st ) const
if( !pCourse->AllSongsAreFixed() ) if( !pCourse->AllSongsAreFixed() )
continue; continue;
FOREACH_CourseDifficulty( cd ) FOREACH_ShownCourseDifficulty( cd )
{ {
if( !pCourse->HasCourseDifficulty(st,cd) ) if( !pCourse->HasCourseDifficulty(st,cd) )
continue; continue;
@@ -338,7 +338,7 @@ int Profile::GetActualCourseDancePointsForStepsType( StepsType st ) const
continue; continue;
const HighScoresForACourse& h = i->second; const HighScoresForACourse& h = i->second;
FOREACH_CourseDifficulty( cd ) FOREACH_ShownCourseDifficulty( cd )
{ {
const HighScoreList& hs = h.hs[st][cd]; const HighScoreList& hs = h.hs[st][cd];
const RadarValues& fRadars = pCourse->GetRadarValues(st,cd); const RadarValues& fRadars = pCourse->GetRadarValues(st,cd);
+3 -3
View File
@@ -721,7 +721,7 @@ bool PrintHighScoresForCourse( RageFile &f, const Profile *pProfile, Course* pCo
for( StepsType st=(StepsType)0; st<NUM_STEPS_TYPES; st=(StepsType)(st+1) ) for( StepsType st=(StepsType)0; st<NUM_STEPS_TYPES; st=(StepsType)(st+1) )
{ {
FOREACH_CourseDifficulty( cd ) FOREACH_ShownCourseDifficulty( cd )
{ {
const HighScoreList &hsl = pProfile->GetCourseHighScoreList( pCourse, st, cd ); const HighScoreList &hsl = pProfile->GetCourseHighScoreList( pCourse, st, cd );
if( hsl.vHighScores.empty() ) if( hsl.vHighScores.empty() )
@@ -843,7 +843,7 @@ bool PrintPercentCompleteForStepsType( RageFile &f, const Profile *pProfile, Ste
// table header row // table header row
TranslatedWrite(f, "<tr><td>&nbsp;</td>" ); TranslatedWrite(f, "<tr><td>&nbsp;</td>" );
FOREACH_CourseDifficulty( cd ) FOREACH_ShownCourseDifficulty( cd )
{ {
TranslatedWrite(f, ssprintf("<td>%s</td>", CourseDifficultyToThemedString(cd).c_str()) ); TranslatedWrite(f, ssprintf("<td>%s</td>", CourseDifficultyToThemedString(cd).c_str()) );
} }
@@ -863,7 +863,7 @@ bool PrintPercentCompleteForStepsType( RageFile &f, const Profile *pProfile, Ste
TranslatedWrite(f, ssprintf("<p class='songtitle'>%s</p>", pCourse->m_sName.c_str()) ); TranslatedWrite(f, ssprintf("<p class='songtitle'>%s</p>", pCourse->m_sName.c_str()) );
TranslatedWrite(f, "</td>" ); TranslatedWrite(f, "</td>" );
FOREACH_CourseDifficulty( cd ) FOREACH_ShownCourseDifficulty( cd )
{ {
if( pCourse->HasCourseDifficulty(st,cd) ) if( pCourse->HasCourseDifficulty(st,cd) )
{ {
+1 -2
View File
@@ -112,9 +112,8 @@ void ScreenOptionsMaster::SetStep( OptionRowData &row, OptionRowHandler &hand )
Course* pCourse = GAMESTATE->m_pCurCourse; Course* pCourse = GAMESTATE->m_pCurCourse;
StepsType st = GAMESTATE->GetCurrentStyleDef()->m_StepsType; StepsType st = GAMESTATE->GetCurrentStyleDef()->m_StepsType;
for( int d=0; d<NUM_COURSE_DIFFICULTIES; d++ ) FOREACH_ShownCourseDifficulty(cd)
{ {
CourseDifficulty cd = (CourseDifficulty)d;
if( !pCourse->HasCourseDifficulty(st,cd) ) if( !pCourse->HasCourseDifficulty(st,cd) )
continue; // skip continue; // skip
+6 -6
View File
@@ -225,7 +225,7 @@ ScreenRanking::ScreenRanking( CString sClassName ) : ScreenAttract( sClassName )
{ {
// for all_courses: // for all_courses:
FOREACH_CourseDifficulty(d) FOREACH_ShownCourseDifficulty(d)
{ {
CString cd = CourseDifficultyToString(d); CString cd = CourseDifficultyToString(d);
m_sprCourseDifficulty[d].SetName( ssprintf("CourseDifficulty%s",cd.c_str()) ); m_sprCourseDifficulty[d].SetName( ssprintf("CourseDifficulty%s",cd.c_str()) );
@@ -255,7 +255,7 @@ ScreenRanking::ScreenRanking( CString sClassName ) : ScreenAttract( sClassName )
pCourseScoreRowItem->m_textSongTitle.LoadFromFont( THEME->GetPathToF("ScreenRanking course list title") ); pCourseScoreRowItem->m_textSongTitle.LoadFromFont( THEME->GetPathToF("ScreenRanking course list title") );
pCourseScoreRowItem->AddChild( &pCourseScoreRowItem->m_textSongTitle ); pCourseScoreRowItem->AddChild( &pCourseScoreRowItem->m_textSongTitle );
for( int d=0; d<NUM_COURSE_DIFFICULTIES; d++ ) FOREACH_ShownCourseDifficulty(d)
{ {
pCourseScoreRowItem->m_textStepsScore[d].SetName( "CourseListScore" ); pCourseScoreRowItem->m_textStepsScore[d].SetName( "CourseListScore" );
pCourseScoreRowItem->m_textStepsScore[d].LoadFromFont( THEME->GetPathToF("ScreenRanking course list score") ); pCourseScoreRowItem->m_textStepsScore[d].LoadFromFont( THEME->GetPathToF("ScreenRanking course list score") );
@@ -621,7 +621,7 @@ float ScreenRanking::SetPage( PageToShow pts )
} }
{ {
for( int d=0; d<NUM_COURSE_DIFFICULTIES; d++ ) FOREACH_ShownCourseDifficulty(d)
{ {
m_sprCourseDifficulty[d].SetHidden( !bShowCourseDifficulty ); m_sprCourseDifficulty[d].SetHidden( !bShowCourseDifficulty );
if( bShowCourseDifficulty ) if( bShowCourseDifficulty )
@@ -656,7 +656,7 @@ float ScreenRanking::SetPage( PageToShow pts )
pCourseScoreRowItem->m_textSongTitle.SetUseZBuffer( true ); pCourseScoreRowItem->m_textSongTitle.SetUseZBuffer( true );
ON_COMMAND( pCourseScoreRowItem->m_textSongTitle ); ON_COMMAND( pCourseScoreRowItem->m_textSongTitle );
for( int d=0; d<NUM_COURSE_DIFFICULTIES; d++ ) FOREACH_ShownCourseDifficulty(d)
{ {
pCourseScoreRowItem->m_textStepsScore[d].Reset(); pCourseScoreRowItem->m_textStepsScore[d].Reset();
pCourseScoreRowItem->m_textStepsScore[d].SetXY( COURSE_SCORE_OFFSET_X(d), COURSE_SCORE_OFFSET_Y ); pCourseScoreRowItem->m_textStepsScore[d].SetXY( COURSE_SCORE_OFFSET_X(d), COURSE_SCORE_OFFSET_Y );
@@ -821,7 +821,7 @@ float ScreenRanking::SetPage( PageToShow pts )
const Course* pCourse = pCourseScoreRowItem->m_pCourse; const Course* pCourse = pCourseScoreRowItem->m_pCourse;
pCourseScoreRowItem->m_textSongTitle.SetText( pCourse->m_sName ); pCourseScoreRowItem->m_textSongTitle.SetText( pCourse->m_sName );
FOREACH_CourseDifficulty( cd ) FOREACH_ShownCourseDifficulty( cd )
{ {
const HighScoreList &hsl = PROFILEMAN->GetMachineProfile()->GetCourseHighScoreList( pCourse, pts.nt, cd ); const HighScoreList &hsl = PROFILEMAN->GetMachineProfile()->GetCourseHighScoreList( pCourse, pts.nt, cd );
BitmapText* pTextStepsScore = &pCourseScoreRowItem->m_textStepsScore[cd]; BitmapText* pTextStepsScore = &pCourseScoreRowItem->m_textStepsScore[cd];
@@ -875,7 +875,7 @@ void ScreenRanking::TweenPageOffScreen()
if( !m_sprDifficulty[*dc_iter].GetHidden() ) if( !m_sprDifficulty[*dc_iter].GetHidden() )
OFF_COMMAND( m_sprDifficulty[*dc_iter] ); OFF_COMMAND( m_sprDifficulty[*dc_iter] );
} }
for( int d=0; d<NUM_COURSE_DIFFICULTIES; d++ ) FOREACH_ShownCourseDifficulty(d)
{ {
if( !m_sprCourseDifficulty[d].GetHidden() ) if( !m_sprCourseDifficulty[d].GetHidden() )
OFF_COMMAND( m_sprCourseDifficulty[d] ); OFF_COMMAND( m_sprCourseDifficulty[d] );