From c693634e4db25d78e9358911fd803f950cc48208 Mon Sep 17 00:00:00 2001 From: Bruno Figueiredo Date: Sun, 28 Jul 2002 16:20:46 +0000 Subject: [PATCH] added support for true group selection, like the 4th mix arcade --- stepmania/src/MusicWheel.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/stepmania/src/MusicWheel.cpp b/stepmania/src/MusicWheel.cpp index eb0e25ab0c..6c7b3ba969 100644 --- a/stepmania/src/MusicWheel.cpp +++ b/stepmania/src/MusicWheel.cpp @@ -472,7 +472,7 @@ void MusicWheel::BuildWheelItemDatas( CArray &arr { case SORT_MOST_PLAYED: bUseSections = false; break; case SORT_BPM: bUseSections = false; break; - case SORT_GROUP: bUseSections = GAMESTATE->m_sPreferredGroup != "ALL MUSIC"; break; + case SORT_GROUP: bUseSections = GAMESTATE->m_sPreferredGroup == "ALL MUSIC"; break; case SORT_TITLE: bUseSections = true; break; default: ASSERT( false ); } @@ -491,7 +491,10 @@ void MusicWheel::BuildWheelItemDatas( CArray &arr Song* pSong = arraySongs[i]; CString sThisSection = GetSectionNameFromSongAndSort( pSong, so ); int iSectionColorIndex = 0; - if( sThisSection != sLastSection ) // new section, make a section item + + if( GAMESTATE->m_sPreferredGroup != "ALL MUSIC" && pSong->m_sGroupName != GAMESTATE->m_sPreferredGroup ) + continue; + if( sThisSection != sLastSection) // new section, make a section item { colorSection = (so==SORT_GROUP) ? SONGMAN->GetGroupColor(pSong->m_sGroupName) : SECTION_COLORS[iSectionColorIndex]; iSectionColorIndex = (iSectionColorIndex+1) % NUM_SECTION_COLORS; @@ -507,7 +510,7 @@ void MusicWheel::BuildWheelItemDatas( CArray &arr for( int i=0; im_sPreferredGroup != "ALL MUSIC" && pSong->m_sGroupName != GAMESTATE->m_sPreferredGroup ) + if( GAMESTATE->m_sPreferredGroup != "ALL MUSIC" && pSong->m_sGroupName != GAMESTATE->m_sPreferredGroup ) continue; // skip arrayWheelItemDatas.Add( WheelItemData(TYPE_SONG, pSong, "", NULL, SONGMAN->GetGroupColor(pSong->m_sGroupName)) ); }