From 0c7f5e113d92d2e7bfc96376c0264832d0c78808 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Fri, 11 Jun 2004 08:52:41 +0000 Subject: [PATCH] ranking element name cleanup --- stepmania/src/ScreenRanking.cpp | 38 ++++++++++++++++----------------- stepmania/src/ScreenRanking.h | 4 ++-- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/stepmania/src/ScreenRanking.cpp b/stepmania/src/ScreenRanking.cpp index ab4db27d97..247a1dc4f6 100644 --- a/stepmania/src/ScreenRanking.cpp +++ b/stepmania/src/ScreenRanking.cpp @@ -165,16 +165,16 @@ ScreenRanking::ScreenRanking( CString sClassName ) : ScreenAttract( sClassName ) // init Actors for all_steps { - for( int d=0; dGetPathToG(ssprintf("ScreenRanking difficulty 1x%d",NUM_DIFFICULTIES)) ); - m_sprDifficulty[d].SetHidden( true ); - this->AddChild( &m_sprDifficulty[d] ); + m_sprDifficulty[d].Load( THEME->GetPathG(m_sName,"difficulty "+DifficultyToString(d)) ); + m_sprDifficulty[d]->SetName( ssprintf("Difficulty%d",d) ); + m_sprDifficulty[d]->SetHidden( true ); + this->AddChild( m_sprDifficulty[d] ); } const unsigned num_songs = SONGMAN->GetAllSongs().size(); for( unsigned s=0; sGetAllSongs()[s]; if( UNLOCKMAN->SongIsLocked(pSong) ) continue; + if( pSong->IsTutorial() ) + continue; StepsScoreRowItem* pStepsScoreRowItem = new StepsScoreRowItem; pStepsScoreRowItem ->m_pSong = pSong; @@ -217,10 +219,10 @@ ScreenRanking::ScreenRanking( CString sClassName ) : ScreenAttract( sClassName ) FOREACH_ShownCourseDifficulty(d) { CString cd = CourseDifficultyToString(d); - m_sprCourseDifficulty[d].SetName( ssprintf("CourseDifficulty%s",cd.c_str()) ); - m_sprCourseDifficulty[d].Load( THEME->GetPathToG(ssprintf("ScreenRanking course difficulty %s",cd.c_str())) ); - m_sprCourseDifficulty[d].SetHidden( true ); - this->AddChild( &m_sprCourseDifficulty[d] ); + m_sprCourseDifficulty[d].Load( THEME->GetPathG(m_sName,"CourseDifficulty "+cd) ); + m_sprCourseDifficulty[d]->SetName( ssprintf("CourseDifficulty%s",cd.c_str()) ); + m_sprCourseDifficulty[d]->SetHidden( true ); + this->AddChild( m_sprCourseDifficulty[d] ); } vector courses; @@ -567,13 +569,11 @@ float ScreenRanking::SetPage( PageToShow pts ) { for( vector::iterator dc_iter=m_vDiffsToShow.begin(); dc_iter!=m_vDiffsToShow.end(); dc_iter++ ) { - m_sprDifficulty[*dc_iter].SetHidden( !bShowDifficulty ); + m_sprDifficulty[*dc_iter]->SetHidden( !bShowDifficulty ); if( bShowDifficulty ) { - m_sprDifficulty[*dc_iter].Reset(); - m_sprDifficulty[*dc_iter].StopAnimating(); - m_sprDifficulty[*dc_iter].SetState( *dc_iter ); - m_sprDifficulty[*dc_iter].SetXY( DIFFICULTY_X(*dc_iter), DIFFICULTY_Y ); + m_sprDifficulty[*dc_iter]->Reset(); + m_sprDifficulty[*dc_iter]->SetXY( DIFFICULTY_X(*dc_iter), DIFFICULTY_Y ); ON_COMMAND( m_sprDifficulty[*dc_iter] ); } } @@ -617,11 +617,11 @@ float ScreenRanking::SetPage( PageToShow pts ) { FOREACH_ShownCourseDifficulty(d) { - m_sprCourseDifficulty[d].SetHidden( !bShowCourseDifficulty ); + m_sprCourseDifficulty[d]->SetHidden( !bShowCourseDifficulty ); if( bShowCourseDifficulty ) { - m_sprCourseDifficulty[d].Reset(); - m_sprCourseDifficulty[d].SetXY( COURSE_DIFFICULTY_X(d), COURSE_DIFFICULTY_Y ); + m_sprCourseDifficulty[d]->Reset(); + m_sprCourseDifficulty[d]->SetXY( COURSE_DIFFICULTY_X(d), COURSE_DIFFICULTY_Y ); ON_COMMAND( m_sprCourseDifficulty[d] ); } } @@ -872,12 +872,12 @@ void ScreenRanking::TweenPageOffScreen() } for( vector::iterator dc_iter=m_vDiffsToShow.begin(); dc_iter!=m_vDiffsToShow.end(); dc_iter++ ) { - if( !m_sprDifficulty[*dc_iter].GetHidden() ) + if( !m_sprDifficulty[*dc_iter]->GetHidden() ) OFF_COMMAND( m_sprDifficulty[*dc_iter] ); } FOREACH_ShownCourseDifficulty(d) { - if( !m_sprCourseDifficulty[d].GetHidden() ) + if( !m_sprCourseDifficulty[d]->GetHidden() ) OFF_COMMAND( m_sprCourseDifficulty[d] ); } diff --git a/stepmania/src/ScreenRanking.h b/stepmania/src/ScreenRanking.h index 4ec0af0415..5c457ca31c 100644 --- a/stepmania/src/ScreenRanking.h +++ b/stepmania/src/ScreenRanking.h @@ -68,7 +68,7 @@ protected: BitmapText m_textScores[NUM_RANKING_LINES]; // for category and course BitmapText m_textPoints[NUM_RANKING_LINES]; // for course BitmapText m_textTime[NUM_RANKING_LINES]; // for course - Sprite m_sprDifficulty[NUM_DIFFICULTIES]; // for all_steps + AutoActor m_sprDifficulty[NUM_DIFFICULTIES]; // for all_steps struct StepsScoreRowItem : public ActorFrame // for all_steps { Song *m_pSong; @@ -78,7 +78,7 @@ protected: }; vector m_vpStepsScoreRowItem; // for all_steps ListDisplay m_ListScoreRowItems; - Sprite m_sprCourseDifficulty[NUM_DIFFICULTIES]; // for all_courses + AutoActor m_sprCourseDifficulty[NUM_DIFFICULTIES]; // for all_courses struct CourseScoreRowItem : public ActorFrame // for all_steps { Course *m_pCourse;