diff --git a/stepmania/src/ScreenJukebox.cpp b/stepmania/src/ScreenJukebox.cpp index 8a7ab3fcfa..3f8b56aafe 100644 --- a/stepmania/src/ScreenJukebox.cpp +++ b/stepmania/src/ScreenJukebox.cpp @@ -12,6 +12,8 @@ #include "ScreenAttract.h" #include "RageUtil.h" #include "UnlockSystem.h" +#include "Course.h" +#include "ThemeManager.h" // HACK: This belongs in ScreenDemonstration #define DIFFICULTIES_TO_SHOW THEME->GetMetric ("ScreenDemonstration","DifficultiesToShow") @@ -22,10 +24,20 @@ const ScreenMessage SM_NotesEnded = ScreenMessage(SM_User+10); // MUST be sam bool ScreenJukebox::SetSong( bool bDemonstration ) { vector vSongs; - if( GAMESTATE->m_sPreferredGroup == GROUP_ALL_MUSIC ) - SONGMAN->GetSongs( vSongs ); - else - SONGMAN->GetSongs( vSongs, GAMESTATE->m_sPreferredGroup ); + + //Check to see if there is a theme-course + //I.E. If there is a course called exactly the theme name, + //then we pick a song from this course. + Course * tCourse = SONGMAN->GetCourseFromName( THEME->GetCurThemeName() ); + if( tCourse != NULL ) + for ( int i = 0; i < tCourse->m_entries.size(); i++ ) + vSongs.push_back( tCourse->m_entries[i].pSong ); + + if ( vSongs.size() == 0 ) + if( GAMESTATE->m_sPreferredGroup == GROUP_ALL_MUSIC ) + SONGMAN->GetSongs( vSongs ); + else + SONGMAN->GetSongs( vSongs, GAMESTATE->m_sPreferredGroup ); // // Calculate what difficulties to show