From cc0996f653f4a06dbb0251cd4488b490e1bbe0e1 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sun, 25 Jul 2010 19:39:07 -0500 Subject: [PATCH] slight comment/cleanup --- src/MusicWheel.cpp | 16 +++++++++------- src/MusicWheel.h | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/MusicWheel.cpp b/src/MusicWheel.cpp index b55b9c8f6b..fa39914dd3 100644 --- a/src/MusicWheel.cpp +++ b/src/MusicWheel.cpp @@ -616,7 +616,8 @@ void MusicWheel::BuildWheelItemDatas( vector &arrayWheelIt // new section, make a section item RageColor colorSection = (so==SORT_GROUP) ? SONGMAN->GetSongGroupColor(pSong->m_sGroupName) : SECTION_COLORS.GetValue(iSectionColorIndex); iSectionColorIndex = (iSectionColorIndex+1) % NUM_SECTION_COLORS; - // This restricts to show only one group at time (ever heard about exceed or zero?) + // In certain situations (e.g. simulating Pump it Up), themes may + // want to only show one group at a time. if( !HIDE_INACTIVE_SECTIONS ) arrayWheelItemDatas.push_back( new MusicWheelItemData(TYPE_SECTION, NULL, sThisSection, NULL, colorSection, iSectionCount) ); sLastSection = sThisSection; @@ -1132,8 +1133,8 @@ void MusicWheel::SetOpenSection( RString group ) // sm-ssc additions: jump to group RString MusicWheel::JumpToNextGroup() { - //Thanks to Juanelote for this small addition - if(HIDE_INACTIVE_SECTIONS) + // Thanks to Juanelote for this logic: + if( HIDE_INACTIVE_SECTIONS ) { unsigned iNumGroups = SONGMAN->GetNumSongGroups(); @@ -1151,7 +1152,8 @@ RString MusicWheel::JumpToNextGroup() } } } - else{ + else + { unsigned int iLastSelection = m_iSelection; for( unsigned int i = m_iSelection; i < m_CurWheelItemData.size(); ++i ) { @@ -1172,13 +1174,13 @@ RString MusicWheel::JumpToNextGroup() } } } - // and this would be el bad: + // it shouldn't get here, but just in case... return ""; } RString MusicWheel::JumpToPrevGroup() { - if(HIDE_INACTIVE_SECTIONS) + if( HIDE_INACTIVE_SECTIONS ) { unsigned iNumGroups = SONGMAN->GetNumSongGroups(); @@ -1218,7 +1220,7 @@ RString MusicWheel::JumpToPrevGroup() } } } - // and this would be el bad: + // it shouldn't get here, but just in case... return ""; } diff --git a/src/MusicWheel.h b/src/MusicWheel.h index 8484279f87..f939a97991 100644 --- a/src/MusicWheel.h +++ b/src/MusicWheel.h @@ -84,8 +84,8 @@ protected: ThemeMetric1D SECTION_COLORS; ThemeMetric SORT_ORDERS; ThemeMetric SHOW_EASY_FLAG; + // sm-ssc additions: ThemeMetric USE_SECTIONS_WITH_PREFERRED_GROUP; - //sm-ssc additions -DaisuMaster ThemeMetric HIDE_INACTIVE_SECTIONS; };