diff --git a/stepmania/src/ScreenSelectCourse.cpp b/stepmania/src/ScreenSelectCourse.cpp index 85e0876b99..7fc7be3d2a 100644 --- a/stepmania/src/ScreenSelectCourse.cpp +++ b/stepmania/src/ScreenSelectCourse.cpp @@ -412,7 +412,7 @@ void ScreenSelectCourse::AfterCourseChange() if( pCourse->GetTotalSeconds(fTotalSeconds) ) m_textTime.SetText( SecondsToTime(fTotalSeconds) ); else - m_textTime.SetText( "??:??:??" ); + m_textTime.SetText( "xx:xx:xx" ); // The numbers format doesn't have a '?'. Is there a better solution? m_Banner.LoadFromCourse( pCourse ); diff --git a/stepmania/src/SongManager.cpp b/stepmania/src/SongManager.cpp index dff289aee3..a8e3eeb8bd 100644 --- a/stepmania/src/SongManager.cpp +++ b/stepmania/src/SongManager.cpp @@ -659,17 +659,45 @@ int SongManager::GetNumStagesForSong( const Song* pSong ) void SongManager::InitCoursesFromDisk() { + unsigned i; + // - // Load courses from CRS files + // Load courses from in Courses dir // CStringArray saCourseFiles; GetDirListing( "Courses/*.crs", saCourseFiles, false, true ); - for( unsigned i=0; iLoadFromCRSFile( saCourseFiles[i] ); m_pCourses.push_back( pCourse ); } + + + // Find all group directories in Courses dir + CStringArray arrayGroupDirs; + GetDirListing( "Courses/*", arrayGroupDirs, true ); + SortCStringArray( arrayGroupDirs ); + + for( i=0; i< arrayGroupDirs.size(); i++ ) // for each dir in /Courses/ + { + CString sGroupDirName = arrayGroupDirs[i]; + + if( 0 == stricmp( sGroupDirName, "cvs" ) ) // the directory called "CVS" + continue; // ignore it + + // Find all CRS files in this group directory + CStringArray arrayCoursePaths; + GetDirListing( "Courses/"+sGroupDirName + "/*.crs", arrayCoursePaths, false, true ); + SortCStringArray( arrayCoursePaths ); + + for( unsigned j=0; jLoadFromCRSFile( arrayCoursePaths[j] ); + m_pCourses.push_back( pCourse ); + } + } } void SongManager::InitAutogenCourses()