Add a new sort type (SORT_GROUP_NOHEADER) which is the default and is like all music but doesn't display section headers.
Make it the default for more arcade-like behavior.
This commit is contained in:
@@ -7,8 +7,9 @@
|
||||
|
||||
Desc: Things that are used in many places and don't change often.
|
||||
|
||||
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||
Copyright (c) 2001-2003 by the person(s) listed below. All rights reserved.
|
||||
Chris Danford
|
||||
Chris Gomez
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
@@ -107,7 +108,8 @@ RageColor PlayerToColor( PlayerNumber pn );
|
||||
RageColor PlayerToColor( int p );
|
||||
|
||||
|
||||
enum SongSortOrder {
|
||||
enum SongSortOrder {
|
||||
SORT_GROUP_NOHEADER,
|
||||
SORT_GROUP,
|
||||
SORT_TITLE,
|
||||
SORT_BPM,
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
|
||||
Desc: See Header.
|
||||
|
||||
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||
Copyright (c) 2001-2003 by the person(s) listed below. All rights reserved.
|
||||
Chris Danford
|
||||
Chris Gomez
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
@@ -61,7 +62,9 @@ void GameState::Reset()
|
||||
m_sPreferredGroup = "";
|
||||
for( p=0; p<NUM_PLAYERS; p++ )
|
||||
m_PreferredDifficulty[p] = DIFFICULTY_INVALID;
|
||||
m_SongSortOrder = SORT_GROUP;
|
||||
if(PREFSMAN != NULL) // Reset() is called once before PREFSMAN is initialized, but is called again
|
||||
// at least once before m_SongSortOrder is ever used
|
||||
m_SongSortOrder = (PREFSMAN->m_bMusicWheelUsesSections ? SORT_GROUP_NOHEADER : SORT_GROUP);
|
||||
m_PlayMode = PLAY_MODE_INVALID;
|
||||
m_bEditing = false;
|
||||
m_bDemonstration = false;
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
|
||||
Desc: A graphic displayed in the MusicSortDisplay during Dancing.
|
||||
|
||||
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||
Copyright (c) 2001-2003 by the person(s) listed below. All rights reserved.
|
||||
Chris Danford
|
||||
Chris Gomez
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
@@ -20,7 +21,7 @@
|
||||
|
||||
MusicSortDisplay::MusicSortDisplay()
|
||||
{
|
||||
Load( THEME->GetPathTo("Graphics","music sort icons 1x4") );
|
||||
Load( THEME->GetPathTo("Graphics","music sort icons 1x5") );
|
||||
StopAnimating();
|
||||
}
|
||||
|
||||
@@ -28,6 +29,7 @@ void MusicSortDisplay::Set( SongSortOrder so )
|
||||
{
|
||||
switch( so )
|
||||
{
|
||||
case SORT_GROUP_NOHEADER:
|
||||
case SORT_GROUP:
|
||||
case SORT_TITLE:
|
||||
case SORT_BPM:
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
|
||||
Desc: See header.
|
||||
|
||||
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||
Copyright (c) 2001-2003 by the person(s) listed below. All rights reserved.
|
||||
Chris Danford
|
||||
Chris Gomez
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
@@ -521,6 +522,7 @@ void MusicWheel::BuildWheelItemDatas( vector<WheelItemData> &arrayWheelItemDatas
|
||||
// sort the songs
|
||||
switch( so )
|
||||
{
|
||||
case SORT_GROUP_NOHEADER:
|
||||
case SORT_GROUP:
|
||||
case SORT_ROULETTE:
|
||||
SortSongPointerArrayByGroup( arraySongs );
|
||||
@@ -553,6 +555,7 @@ void MusicWheel::BuildWheelItemDatas( vector<WheelItemData> &arrayWheelItemDatas
|
||||
bool bUseSections = false;
|
||||
switch( so )
|
||||
{
|
||||
case SORT_GROUP_NOHEADER: bUseSections = false; break;
|
||||
case SORT_MOST_PLAYED: bUseSections = false; break;
|
||||
case SORT_BPM: bUseSections = false; break;
|
||||
case SORT_GROUP: bUseSections = GAMESTATE->m_sPreferredGroup == "ALL MUSIC"; break;
|
||||
@@ -827,7 +830,11 @@ void MusicWheel::Update( float fDeltaTime )
|
||||
CString sPrevSelectedSection = m_CurWheelItemData[m_iSelection]->m_sSectionName;
|
||||
|
||||
// change the sort order
|
||||
GAMESTATE->m_SongSortOrder = SongSortOrder( (GAMESTATE->m_SongSortOrder+1) % NUM_SORT_ORDERS );
|
||||
if(!PREFSMAN->m_bMusicWheelUsesSections && ( SongSortOrder( (GAMESTATE->m_SongSortOrder+1) % NUM_SORT_ORDERS) == SongSortOrder(SORT_GROUP_NOHEADER) ))
|
||||
GAMESTATE->m_SongSortOrder = SongSortOrder( (GAMESTATE->m_SongSortOrder+2) % NUM_SORT_ORDERS);
|
||||
else
|
||||
GAMESTATE->m_SongSortOrder = SongSortOrder( (GAMESTATE->m_SongSortOrder+1) % NUM_SORT_ORDERS );
|
||||
|
||||
SCREENMAN->SendMessageToTopScreen( SM_SortOrderChanged, 0 );
|
||||
SetOpenGroup(GetSectionNameFromSongAndSort( pPrevSelectedSong, GAMESTATE->m_SongSortOrder ));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user