From 2b65951893c096aa657e6a37291fbe34baf74352 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 20 May 2004 21:39:35 +0000 Subject: [PATCH] CourseDifficulty: don't break if the number of course difficulties changes, and allow animated sprites --- stepmania/src/ScreenRanking.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/stepmania/src/ScreenRanking.cpp b/stepmania/src/ScreenRanking.cpp index 2158113e43..6e537c4bef 100644 --- a/stepmania/src/ScreenRanking.cpp +++ b/stepmania/src/ScreenRanking.cpp @@ -225,10 +225,11 @@ ScreenRanking::ScreenRanking( CString sClassName ) : ScreenAttract( sClassName ) { // for all_courses: - for( int d=0; dGetPathToG(ssprintf("ScreenRanking course difficulty 1x%d",NUM_COURSE_DIFFICULTIES)) ); + 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] ); } @@ -626,8 +627,6 @@ float ScreenRanking::SetPage( PageToShow pts ) if( bShowCourseDifficulty ) { m_sprCourseDifficulty[d].Reset(); - m_sprCourseDifficulty[d].StopAnimating(); - m_sprCourseDifficulty[d].SetState( d ); m_sprCourseDifficulty[d].SetXY( COURSE_DIFFICULTY_X(d), COURSE_DIFFICULTY_Y ); ON_COMMAND( m_sprCourseDifficulty[d] ); }