From 26913ee5dcad079f0f5774e3768cb2b698778f77 Mon Sep 17 00:00:00 2001 From: Charles Lohr Date: Mon, 13 Sep 2004 15:08:57 +0000 Subject: [PATCH] Fix: Autogen issues with Ez2. --- stepmania/src/MusicBannerWheel.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/stepmania/src/MusicBannerWheel.cpp b/stepmania/src/MusicBannerWheel.cpp index fa42944931..aa1a2a9a10 100644 --- a/stepmania/src/MusicBannerWheel.cpp +++ b/stepmania/src/MusicBannerWheel.cpp @@ -13,11 +13,13 @@ TODO: #include "RageUtil.h" #include "GameState.h" #include "PrefsManager.h" +#include "RageLog.h" #include "SongManager.h" #include "ThemeManager.h" #include "GameSoundManager.h" #include "Style.h" #include "song.h" +#include "Steps.h" #include "ActorUtil.h" #define BANNERSPACING THEME->GetMetricI("ScreenEz2SelectMusic","BannerSpacing") @@ -58,6 +60,24 @@ MusicBannerWheel::MusicBannerWheel() else // Get the Group They Want SONGMAN->GetSongs( arraySongs, GAMESTATE->m_sPreferredGroup, GAMESTATE->GetNumStagesLeft() ); + //Detect autogenned songs + if ( !PREFSMAN->m_bAutogenSteps ) + { + LOG->Trace( "Removing all autogen songs from wheel." ); + vector songSteps; + vector pNotAutogen; + for ( unsigned i = 0; i < arraySongs.size(); i++) + { + //ONLY get non-autogenned steps + songSteps.clear(); + arraySongs[i]->GetSteps( songSteps, GAMESTATE->GetCurrentStyle()->m_StepsType, DIFFICULTY_INVALID, -1, -1, "", false); + if ( !songSteps.empty() ) + pNotAutogen.push_back( arraySongs[i] ); + } + arraySongs.clear(); + arraySongs = pNotAutogen; + } + if( arraySongs.size() > 0) { SongsExist=1;