don't pick autogen Courses for a BGA random course banner
don't pick DISPLAY_NEVER songs for demonstration don't pick DISPLAY_NEVER songs for a BGA random song banner don't show DISPLAY_NEVER songs on the ranking screen
This commit is contained in:
@@ -98,7 +98,18 @@ Actor* LoadFromActorFile( CString sIniPath, CString sLayer )
|
|||||||
{
|
{
|
||||||
Song *pSong = GAMESTATE->m_pCurSong;
|
Song *pSong = GAMESTATE->m_pCurSong;
|
||||||
if( pSong == NULL )
|
if( pSong == NULL )
|
||||||
|
{
|
||||||
|
// probe for a random banner
|
||||||
|
for( int i=0; i<300; i++ )
|
||||||
|
{
|
||||||
pSong = SONGMAN->GetRandomSong();
|
pSong = SONGMAN->GetRandomSong();
|
||||||
|
if( pSong == NULL )
|
||||||
|
break;
|
||||||
|
if( !pSong->ShowInDemonstrationAndRanking() )
|
||||||
|
continue;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if( pSong && pSong->HasBanner() )
|
if( pSong && pSong->HasBanner() )
|
||||||
sFile = pSong->GetBannerPath();
|
sFile = pSong->GetBannerPath();
|
||||||
@@ -120,7 +131,20 @@ Actor* LoadFromActorFile( CString sIniPath, CString sLayer )
|
|||||||
{
|
{
|
||||||
Course *pCourse = GAMESTATE->m_pCurCourse;
|
Course *pCourse = GAMESTATE->m_pCurCourse;
|
||||||
if( pCourse == NULL )
|
if( pCourse == NULL )
|
||||||
|
{
|
||||||
|
// probe for a random banner
|
||||||
|
for( int i=0; i<300; i++ )
|
||||||
|
{
|
||||||
pCourse = SONGMAN->GetRandomCourse();
|
pCourse = SONGMAN->GetRandomCourse();
|
||||||
|
if( pCourse == NULL )
|
||||||
|
break;
|
||||||
|
if( !pCourse->ShowInDemonstrationAndRanking() )
|
||||||
|
continue;
|
||||||
|
if( pCourse->m_bIsAutogen )
|
||||||
|
continue;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if( pCourse && pCourse->HasBanner() )
|
if( pCourse && pCourse->HasBanner() )
|
||||||
sFile = pCourse->m_sBannerPath;
|
sFile = pCourse->m_sBannerPath;
|
||||||
|
|||||||
@@ -126,6 +126,8 @@ public:
|
|||||||
|
|
||||||
bool IsFixed() const;
|
bool IsFixed() const;
|
||||||
|
|
||||||
|
bool ShowInDemonstrationAndRanking() const { return true; }
|
||||||
|
|
||||||
void LoadFromCRSFile( CString sPath );
|
void LoadFromCRSFile( CString sPath );
|
||||||
void RevertFromDisk();
|
void RevertFromDisk();
|
||||||
void Init();
|
void Init();
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#include "Steps.h"
|
#include "Steps.h"
|
||||||
#include "ScreenAttract.h"
|
#include "ScreenAttract.h"
|
||||||
#include "RageUtil.h"
|
#include "RageUtil.h"
|
||||||
|
#include "UnlockSystem.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")
|
||||||
@@ -69,8 +70,9 @@ bool ScreenJukebox::SetSong( bool bDemonstration )
|
|||||||
|
|
||||||
if( !pSong->HasMusic() )
|
if( !pSong->HasMusic() )
|
||||||
continue; // skip
|
continue; // skip
|
||||||
|
if( UNLOCKMAN->SongIsLocked(pSong) )
|
||||||
if( pSong->NeverDisplayed() )
|
continue;
|
||||||
|
if( !pSong->ShowInDemonstrationAndRanking() )
|
||||||
continue; // skip
|
continue; // skip
|
||||||
|
|
||||||
Difficulty dc = vDifficultiesToShow[ rand()%vDifficultiesToShow.size() ];
|
Difficulty dc = vDifficultiesToShow[ rand()%vDifficultiesToShow.size() ];
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ ScreenRanking::ScreenRanking( CString sClassName ) : ScreenAttract( sClassName )
|
|||||||
Song *pSong = SONGMAN->GetAllSongs()[s];
|
Song *pSong = SONGMAN->GetAllSongs()[s];
|
||||||
if( UNLOCKMAN->SongIsLocked(pSong) )
|
if( UNLOCKMAN->SongIsLocked(pSong) )
|
||||||
continue;
|
continue;
|
||||||
if( pSong->IsTutorial() )
|
if( !pSong->ShowInDemonstrationAndRanking() )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
StepsScoreRowItem* pStepsScoreRowItem = new StepsScoreRowItem;
|
StepsScoreRowItem* pStepsScoreRowItem = new StepsScoreRowItem;
|
||||||
|
|||||||
@@ -1231,10 +1231,10 @@ Song::SelectionDisplay Song::GetDisplayed() const
|
|||||||
return SHOW_ALWAYS;
|
return SHOW_ALWAYS;
|
||||||
return m_SelectionDisplay;
|
return m_SelectionDisplay;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Song::NormallyDisplayed() const { return GetDisplayed() == SHOW_ALWAYS; }
|
bool Song::NormallyDisplayed() const { return GetDisplayed() == SHOW_ALWAYS; }
|
||||||
bool Song::NeverDisplayed() const { return GetDisplayed() == SHOW_NEVER; }
|
bool Song::NeverDisplayed() const { return GetDisplayed() == SHOW_NEVER; }
|
||||||
bool Song::RouletteDisplayed() const { if(IsTutorial()) return false; return GetDisplayed() != SHOW_NEVER; }
|
bool Song::RouletteDisplayed() const { if(IsTutorial()) return false; return GetDisplayed() != SHOW_NEVER; }
|
||||||
|
bool Song::ShowInDemonstrationAndRanking() const { return !IsTutorial() && NormallyDisplayed(); }
|
||||||
|
|
||||||
|
|
||||||
bool Song::HasMusic() const {return m_sMusicFile != "" && IsAFile(GetMusicPath()); }
|
bool Song::HasMusic() const {return m_sMusicFile != "" && IsAFile(GetMusicPath()); }
|
||||||
|
|||||||
@@ -186,6 +186,7 @@ public:
|
|||||||
bool NormallyDisplayed() const;
|
bool NormallyDisplayed() const;
|
||||||
bool NeverDisplayed() const;
|
bool NeverDisplayed() const;
|
||||||
bool RouletteDisplayed() const;
|
bool RouletteDisplayed() const;
|
||||||
|
bool ShowInDemonstrationAndRanking() const;
|
||||||
|
|
||||||
void AddSteps( Steps* pSteps ); // we are responsible for deleting the memory pointed to by pSteps!
|
void AddSteps( Steps* pSteps ); // we are responsible for deleting the memory pointed to by pSteps!
|
||||||
void RemoveSteps( const Steps* pSteps );
|
void RemoveSteps( const Steps* pSteps );
|
||||||
|
|||||||
Reference in New Issue
Block a user