From 2a0972b8ba7544d15d1eac119722bccd2138c9b4 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 30 Jun 2003 07:09:13 +0000 Subject: [PATCH] cleanup --- stepmania/src/GameState.cpp | 2 +- stepmania/src/MusicWheel.cpp | 35 ++++++++++++++++++----------------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index 02a9b3111c..0d47143c89 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -62,7 +62,7 @@ void GameState::Reset() m_bChangedFailMode = false; for( p=0; pm_SongOptions = so; } - /* Disable SORT_PREFERRED for now, until it's implemented; right now it's not - * very different than SORT_GROUP. Once it's implemented, enable it only - * when no group is selected. */ - if(GAMESTATE->m_SongSortOrder == SORT_PREFERRED) - GAMESTATE->m_SongSortOrder = SORT_GROUP; + if( GAMESTATE->m_SongSortOrder == SORT_INVALID ) + { + if( GAMESTATE->IsCourseMode() ) + GAMESTATE->m_SongSortOrder = SORT_PREFERRED; + else + GAMESTATE->m_SongSortOrder = SortOrder[0]; + } /* Build all of the wheel item data. Do tihs after selecting * the extra stage, so it knows to always display it. */ @@ -517,8 +529,7 @@ void MusicWheel::BuildWheelItemDatas( vector &arrayWheelItemDatas case PLAY_MODE_ENDLESS: { // We only use SORT_PREFERRED when selecting a course - // Err, SORT_PREFERRED is skipped right now ... - if( so != SongSortOrder(SORT_GROUP /*SORT_PREFERRED*/) ) + if( so != SongSortOrder(SORT_PREFERRED) ) break; vector apCourses; @@ -1022,16 +1033,6 @@ bool MusicWheel::ChangeSort( SongSortOrder new_so ) // return true if change suc return true; } -static const SongSortOrder SortOrder[] = -{ - SORT_GROUP, - SORT_TITLE, - SORT_BPM, - SORT_MOST_PLAYED, - SORT_ARTIST, - SORT_INVALID -}; - bool MusicWheel::NextSort() // return true if change successful { /* Is the current sort in the default sort order? */