diff --git a/src/GameManager.cpp b/src/GameManager.cpp index bc0e138de1..7e1f8ec5a9 100644 --- a/src/GameManager.cpp +++ b/src/GameManager.cpp @@ -2791,8 +2791,8 @@ static const Game g_Game_Lights = static const Game *g_Games[] = { - &g_Game_Pump, &g_Game_Dance, + &g_Game_Pump, &g_Game_KB7, &g_Game_Ez2, &g_Game_Para, diff --git a/src/SongManager.cpp b/src/SongManager.cpp index a3795a8206..5c72e4454d 100644 --- a/src/SongManager.cpp +++ b/src/SongManager.cpp @@ -59,7 +59,6 @@ static Preference g_bHideIncompleteCourses( "HideIncompleteCourses", false RString SONG_GROUP_COLOR_NAME( size_t i ) { return ssprintf( "SongGroupColor%i", (int) i+1 ); } RString COURSE_GROUP_COLOR_NAME( size_t i ) { return ssprintf( "CourseGroupColor%i", (int) i+1 ); } - SongManager::SongManager() { // Register with Lua. @@ -246,10 +245,10 @@ void SongManager::LoadStepManiaSongDir( RString sDir, LoadingWindow *ld ) SortRStringArray( arrayGroupDirs ); StripCvsAndSvn( arrayGroupDirs ); StripMacResourceForks( arrayGroupDirs ); - + vector< vector > arrayGroupSongDirs; int groupIndex, songCount, songIndex; - + groupIndex = 0; songCount = 0; FOREACH_CONST( RString, arrayGroupDirs, s ) // foreach dir in /Songs/ @@ -263,19 +262,19 @@ void SongManager::LoadStepManiaSongDir( RString sDir, LoadingWindow *ld ) StripCvsAndSvn( arraySongDirs ); StripMacResourceForks( arraySongDirs ); SortRStringArray( arraySongDirs ); - + arrayGroupSongDirs.push_back(arraySongDirs); songCount += arraySongDirs.size(); } if( songCount==0 ) return; - + if( ld ) { ld->SetIndeterminate( false ); ld->SetTotalWork( songCount ); } - + groupIndex = 0; songIndex = 0; FOREACH_CONST( RString, arrayGroupDirs, s ) // foreach dir in /Songs/ @@ -573,7 +572,7 @@ RageColor SongManager::GetCourseGroupColor( const RString &sCourseGroup ) const return SONG_GROUP_COLOR.GetValue( iIndex%NUM_SONG_GROUP_COLORS ); iIndex++; } - + ASSERT_M( 0, ssprintf("requested color for course group '%s' that doesn't exist",sCourseGroup.c_str()) ); return RageColor(1,1,1,1); } @@ -585,7 +584,6 @@ RageColor SongManager::GetCourseColor( const Course* pCourse ) const if( pUE && USE_UNLOCK_COLOR.GetValue() ) return UNLOCK_COLOR.GetValue(); - if( USE_PREFERRED_SORT_COLOR ) { FOREACH_CONST( CoursePointerVector, m_vPreferredCourseSort, v ) @@ -627,7 +625,7 @@ void SongManager::ResetGroupColors() const vector &SongManager::GetSongs( const RString &sGroupName ) const { static const vector vEmpty; - + if( sGroupName == GROUP_ALL ) return m_pSongs; map::const_iterator iter = m_mapSongGroupIndex.find( sGroupName ); @@ -780,6 +778,7 @@ void SongManager::InitCoursesFromDisk( LoadingWindow *ld ) vsCourseGroupNames.push_back( SpecialFiles::COURSES_DIR ); SortRStringArray( vsCourseGroupNames ); + int courseIndex = 0; FOREACH_CONST( RString, vsCourseGroupNames, sCourseGroup ) // for each dir in /Courses/ { // Find all CRS files in this group directory @@ -787,10 +786,17 @@ void SongManager::InitCoursesFromDisk( LoadingWindow *ld ) GetDirListing( *sCourseGroup + "/*.crs", vsCoursePaths, false, true ); SortRStringArray( vsCoursePaths ); + if( ld ) + { + ld->SetIndeterminate( false ); + ld->SetTotalWork( vsCoursePaths.size() ); + } + FOREACH_CONST( RString, vsCoursePaths, sCoursePath ) { if( ld ) { + ld->SetProgress(courseIndex); ld->SetText( LOADING_COURSES.GetValue()+ssprintf("\n%s\n%s", Basename(*sCourseGroup).c_str(), Basename(*sCoursePath).c_str())); @@ -806,9 +812,14 @@ void SongManager::InitCoursesFromDisk( LoadingWindow *ld ) } m_pCourses.push_back( pCourse ); + courseIndex++; } } + if( ld ) { + ld->SetIndeterminate( true ); + } + RefreshCourseGroupInfo(); } @@ -880,7 +891,7 @@ void SongManager::InitAutogenCourses() } aSongs.clear(); - + if( i < apSongs.size() ) { sCurArtist = sArtist;