fixed song display on "display group" screen for unlocks

This commit is contained in:
Andrew Wong
2003-08-02 09:56:24 +00:00
parent 9bcb0e0a48
commit 2351951035
2 changed files with 16 additions and 1 deletions
+14 -1
View File
@@ -24,6 +24,8 @@
#include "ThemeManager.h"
#include <map>
#include "ActorUtil.h"
#include "GameState.h"
#include "UnlockSystem.h"
#define BANNER_WIDTH THEME->GetMetricF("ScreenSelectGroup","BannerWidth")
#define BANNER_HEIGHT THEME->GetMetricF("ScreenSelectGroup","BannerHeight")
@@ -64,8 +66,19 @@ ScreenSelectGroup::ScreenSelectGroup() : Screen("ScreenSelectGroup")
// Filter out Songs that can't be played by the current Style
for( j=aAllSongs.size()-1; j>=0; j-- ) // foreach Song, back to front
{
bool DisplaySong = aAllSongs[j]->NormallyDisplayed();
// check if song is locked
if (PREFSMAN->m_bUseUnlockSystem)
{
SongEntry* m_UnlockSong = GAMESTATE->m_pUnlockingSys->FindSong( aAllSongs[j] );
if (m_UnlockSong)
DisplaySong = (m_UnlockSong->SelectableWheel());
}
if( aAllSongs[j]->SongCompleteForStyle(GAMESTATE->GetCurrentStyleDef()) &&
aAllSongs[j]->NormallyDisplayed() )
DisplaySong )
continue;
aAllSongs.erase( aAllSongs.begin()+j, aAllSongs.begin()+j+1 );