We have a lot of duplicate, redundant checks between UNLOCKMAN->SongIsLocked

and Song::GetDisplayed/Song::NormallyDisplayed, which leads to inconsistency.

Make UnlockManager::SongIsLocked() handle both.  Returns a bitfield; most
cases only need to test true or false.

(Also adds m_bEnabled; not used yet.)
This commit is contained in:
Glenn Maynard
2007-08-13 21:20:51 +00:00
parent 4d3b3315b8
commit 3e3c1deea4
13 changed files with 64 additions and 44 deletions
+2 -2
View File
@@ -100,7 +100,7 @@ void CatalogXml::Save( LoadingWindow *loading_window )
if( pSong->IsTutorial() )
continue; // skip: Tutorial song.
if( UNLOCKMAN->SongIsLocked(pSong) )
if( !pSong->NormallyDisplayed() )
continue; // skip: Locked song.
iTotalSongs++;
iNumSongsInGroup++;
@@ -184,7 +184,7 @@ void CatalogXml::Save( LoadingWindow *loading_window )
if( pSong->IsTutorial() )
continue; // skip: Tutorial song.
if( UNLOCKMAN->SongIsLocked(pSong) )
if( !pSong->NormallyDisplayed() )
continue; // skip: Locked song.
SongID songID;