added support for true group selection, like the 4th mix arcade

This commit is contained in:
Bruno Figueiredo
2002-07-28 16:20:46 +00:00
parent 09724f0d90
commit c693634e4d
+5 -2
View File
@@ -472,7 +472,7 @@ void MusicWheel::BuildWheelItemDatas( CArray<WheelItemData, WheelItemData&> &arr
{ {
case SORT_MOST_PLAYED: bUseSections = false; break; case SORT_MOST_PLAYED: bUseSections = false; break;
case SORT_BPM: 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; case SORT_TITLE: bUseSections = true; break;
default: ASSERT( false ); default: ASSERT( false );
} }
@@ -491,6 +491,9 @@ void MusicWheel::BuildWheelItemDatas( CArray<WheelItemData, WheelItemData&> &arr
Song* pSong = arraySongs[i]; Song* pSong = arraySongs[i];
CString sThisSection = GetSectionNameFromSongAndSort( pSong, so ); CString sThisSection = GetSectionNameFromSongAndSort( pSong, so );
int iSectionColorIndex = 0; int iSectionColorIndex = 0;
if( GAMESTATE->m_sPreferredGroup != "ALL MUSIC" && pSong->m_sGroupName != GAMESTATE->m_sPreferredGroup )
continue;
if( sThisSection != sLastSection) // new section, make a section item if( sThisSection != sLastSection) // new section, make a section item
{ {
colorSection = (so==SORT_GROUP) ? SONGMAN->GetGroupColor(pSong->m_sGroupName) : SECTION_COLORS[iSectionColorIndex]; colorSection = (so==SORT_GROUP) ? SONGMAN->GetGroupColor(pSong->m_sGroupName) : SECTION_COLORS[iSectionColorIndex];
@@ -507,7 +510,7 @@ void MusicWheel::BuildWheelItemDatas( CArray<WheelItemData, WheelItemData&> &arr
for( int i=0; i<arraySongs.GetSize(); i++ ) for( int i=0; i<arraySongs.GetSize(); i++ )
{ {
Song* pSong = arraySongs[i]; Song* pSong = arraySongs[i];
if( bRoulette && GAMESTATE->m_sPreferredGroup != "ALL MUSIC" && pSong->m_sGroupName != GAMESTATE->m_sPreferredGroup ) if( GAMESTATE->m_sPreferredGroup != "ALL MUSIC" && pSong->m_sGroupName != GAMESTATE->m_sPreferredGroup )
continue; // skip continue; // skip
arrayWheelItemDatas.Add( WheelItemData(TYPE_SONG, pSong, "", NULL, SONGMAN->GetGroupColor(pSong->m_sGroupName)) ); arrayWheelItemDatas.Add( WheelItemData(TYPE_SONG, pSong, "", NULL, SONGMAN->GetGroupColor(pSong->m_sGroupName)) );
} }