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:
@@ -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<Song*> 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
|
||||
|
||||
Reference in New Issue
Block a user