Feature: If there is a course named exactly the current theme name, then take songs from it for demo and jukebox.

This commit is contained in:
Charles Lohr
2004-11-08 05:24:43 +00:00
parent 7a8116c119
commit 1cd2532f9e
+12
View File
@@ -12,6 +12,8 @@
#include "ScreenAttract.h" #include "ScreenAttract.h"
#include "RageUtil.h" #include "RageUtil.h"
#include "UnlockSystem.h" #include "UnlockSystem.h"
#include "Course.h"
#include "ThemeManager.h"
// HACK: This belongs in ScreenDemonstration // HACK: This belongs in ScreenDemonstration
#define DIFFICULTIES_TO_SHOW THEME->GetMetric ("ScreenDemonstration","DifficultiesToShow") #define DIFFICULTIES_TO_SHOW THEME->GetMetric ("ScreenDemonstration","DifficultiesToShow")
@@ -22,6 +24,16 @@ const ScreenMessage SM_NotesEnded = ScreenMessage(SM_User+10); // MUST be sam
bool ScreenJukebox::SetSong( bool bDemonstration ) bool ScreenJukebox::SetSong( bool bDemonstration )
{ {
vector<Song*> vSongs; vector<Song*> vSongs;
//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 ) if( GAMESTATE->m_sPreferredGroup == GROUP_ALL_MUSIC )
SONGMAN->GetSongs( vSongs ); SONGMAN->GetSongs( vSongs );
else else