diff --git a/stepmania/src/ProfileHtml.cpp b/stepmania/src/ProfileHtml.cpp index 0aca27f048..be0e886a51 100644 --- a/stepmania/src/ProfileHtml.cpp +++ b/stepmania/src/ProfileHtml.cpp @@ -611,7 +611,7 @@ void PrintHighScoreListTable( RageFile &f, const HighScoreList& hsl ) bool PrintHighScoresForSong( RageFile &f, const Profile *pProfile, Song* pSong ) { - if( pSong->m_SelectionDisplay == Song::SHOW_NEVER || UNLOCKMAN->SongIsLocked(pSong) ) + if( pSong->NeverDisplayed() || UNLOCKMAN->SongIsLocked(pSong) ) return false; // skip int iNumTimesPlayed = pProfile->GetSongNumTimesPlayed(pSong); if( iNumTimesPlayed == 0 ) @@ -762,7 +762,7 @@ void PrintGradeTable( RageFile &f, const Profile *pProfile, CString sTitle, vect bool PrintInventoryForSong( RageFile &f, const Profile *pProfile, Song* pSong ) { - if( pSong->m_SelectionDisplay == Song::SHOW_NEVER || UNLOCKMAN->SongIsLocked(pSong) ) + if( pSong->NeverDisplayed() || UNLOCKMAN->SongIsLocked(pSong) ) return false; // skip vector vpSteps = pSong->GetAllSteps(); diff --git a/stepmania/src/ScreenJukebox.cpp b/stepmania/src/ScreenJukebox.cpp index d1fc361914..e63a509dcb 100644 --- a/stepmania/src/ScreenJukebox.cpp +++ b/stepmania/src/ScreenJukebox.cpp @@ -46,7 +46,7 @@ bool ScreenJukebox::SetSong() if( !pSong->HasMusic() ) continue; // skip - if( pSong->m_SelectionDisplay == Song::SHOW_NEVER ) + if( pSong->NeverDisplayed() ) continue; // skip Difficulty dc = GAMESTATE->m_PreferredDifficulty[PLAYER_1]; diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index d471c396bb..b1c17e1cfa 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -1568,16 +1568,11 @@ void SortSongPointerArrayByMeter( vector &arraySongPointers, Difficulty d sort( arraySongPointers.begin(), arraySongPointers.end(), CompareSongByMeter(dc) ); } -bool Song::NormallyDisplayed() const +Song::SelectionDisplay Song::GetDisplayed() const { - if(!PREFSMAN->m_bHiddenSongs) return true; - return m_SelectionDisplay == SHOW_ALWAYS; -} - -bool Song::RouletteDisplayed() const -{ - if(!PREFSMAN->m_bHiddenSongs) return true; - return m_SelectionDisplay != SHOW_NEVER; + if( !PREFSMAN->m_bHiddenSongs ) + return SHOW_ALWAYS; + return m_SelectionDisplay; } bool Song::HasMusic() const {return m_sMusicFile != "" && IsAFile(GetMusicPath()); } diff --git a/stepmania/src/song.h b/stepmania/src/song.h index 04fdd1cccd..dd98967a9b 100644 --- a/stepmania/src/song.h +++ b/stepmania/src/song.h @@ -54,7 +54,7 @@ class Song public: /* Set when this song should be displayed in the music wheel: */ - enum { SHOW_ALWAYS, /* all the time */ + enum SelectionDisplay { SHOW_ALWAYS, /* all the time */ SHOW_ROULETTE, /* only when rouletting */ SHOW_NEVER } /* never (unless song hiding is turned off) */ m_SelectionDisplay; @@ -191,8 +191,10 @@ public: void GetEdits( vector& arrayAddTo, StepsType nt ) const; bool IsEasy( StepsType nt ) const; bool HasEdits( StepsType nt ) const; - bool NormallyDisplayed() const; - bool RouletteDisplayed() const; + SelectionDisplay GetDisplayed() const; + bool NormallyDisplayed() const { return GetDisplayed() == SHOW_ALWAYS; } + bool NeverDisplayed() const { return GetDisplayed() == SHOW_NEVER; } + bool RouletteDisplayed() const { return GetDisplayed() != SHOW_NEVER; } int GetNumNotesWithGrade( Grade g ) const; void AddNotes( Steps* pNotes ); // we are responsible for deleting the memory pointed to by pNotes!