From cb6800ccd45a2b5f012795b9ab6a211bfa27b96e Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Thu, 10 Jun 2004 08:43:53 +0000 Subject: [PATCH] hide tutorial songs in all modes but PLAY_MODE_ARCADE --- stepmania/src/MusicWheel.cpp | 22 ++++++++++++++-------- stepmania/src/Song.cpp | 14 ++++++++++++++ stepmania/src/song.h | 1 + 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/stepmania/src/MusicWheel.cpp b/stepmania/src/MusicWheel.cpp index aa70df01a6..6680c289d7 100644 --- a/stepmania/src/MusicWheel.cpp +++ b/stepmania/src/MusicWheel.cpp @@ -1309,15 +1309,21 @@ void MusicWheel::SetOpenGroup(CString group, SortOrder so) m_CurWheelItemData.clear(); vector &from = m_WheelItemDatas[so]; - unsigned i; - for(i = 0; i < from.size(); ++i) + for( unsigned i = 0; i < from.size(); ++i ) { - if((from[i].m_Type == TYPE_SONG || - from[i].m_Type == TYPE_COURSE) && - !from[i].m_sSectionName.empty() && - from[i].m_sSectionName != group) + WheelItemData &d = from[i]; + if( (d.m_Type == TYPE_SONG || d.m_Type == TYPE_COURSE) && + !d.m_sSectionName.empty() && + d.m_sSectionName != group ) continue; - m_CurWheelItemData.push_back(&from[i]); + + /* Only show tutorial songs in arcade */ + if( GAMESTATE->m_PlayMode!=PLAY_MODE_ARCADE && + d.m_pSong && + d.m_pSong->IsTutorial() ) + continue; + + m_CurWheelItemData.push_back(&d); } @@ -1326,7 +1332,7 @@ void MusicWheel::SetOpenGroup(CString group, SortOrder so) // m_iSelection = 0; - for( i=0; im_StepsType == STEPS_TYPE_LIGHTS_CABINET ) + continue; // ignore + if( (*s)->GetDifficulty() != DIFFICULTY_BEGINNER ) + return false; + } + + return true; +} + bool Song::HasEdits( StepsType st ) const { for( unsigned i=0; i