fix edits icon not showing for all StepsTypes in AutoStyle

This commit is contained in:
Chris Danford
2008-06-25 05:06:05 +00:00
parent 00578338f0
commit f72a0cd94e
3 changed files with 8 additions and 2 deletions
+5 -1
View File
@@ -696,7 +696,11 @@ void MusicWheel::BuildWheelItemDatas( vector<MusicWheelItemData *> &arrayWheelIt
if( WID.m_pSong != NULL ) if( WID.m_pSong != NULL )
{ {
WID.m_Flags.bHasBeginnerOr1Meter = WID.m_pSong->IsEasy( GAMESTATE->GetCurrentStyle()->m_StepsType ) && SHOW_EASY_FLAG; WID.m_Flags.bHasBeginnerOr1Meter = WID.m_pSong->IsEasy( GAMESTATE->GetCurrentStyle()->m_StepsType ) && SHOW_EASY_FLAG;
WID.m_Flags.bEdits = WID.m_pSong->HasEdits( GAMESTATE->GetCurrentStyle()->m_StepsType ); WID.m_Flags.bEdits = false;
set<StepsType> vStepsType;
SongUtil::GetPlayableStepsTypes( WID.m_pSong, vStepsType );
FOREACHS( StepsType, vStepsType, st )
WID.m_Flags.bEdits |= WID.m_pSong->HasEdits( *st );
WID.m_Flags.iStagesForSong = GameState::GetNumStagesMultiplierForSong( WID.m_pSong ); WID.m_Flags.iStagesForSong = GameState::GetNumStagesMultiplierForSong( WID.m_pSong );
} }
else if( WID.m_pCourse != NULL ) else if( WID.m_pCourse != NULL )
+1 -1
View File
@@ -824,7 +824,7 @@ void SongUtil::FilterSongs( const SongCriteria &sc, const vector<Song*> &in, vec
} }
} }
static void GetPlayableStepsTypes( const Song *pSong, set<StepsType> &vOut ) void SongUtil::GetPlayableStepsTypes( const Song *pSong, set<StepsType> &vOut )
{ {
vector<const Style*> vpPossibleStyles; vector<const Style*> vpPossibleStyles;
if( CommonMetrics::AUTO_SET_STYLE ) if( CommonMetrics::AUTO_SET_STYLE )
+2
View File
@@ -6,6 +6,7 @@
#include "GameConstantsAndTypes.h" #include "GameConstantsAndTypes.h"
#include "Difficulty.h" #include "Difficulty.h"
#include "RageUtil_CachedObject.h" #include "RageUtil_CachedObject.h"
#include <set>
class Song; class Song;
class Steps; class Steps;
@@ -112,6 +113,7 @@ namespace SongUtil
void GetAllSongGenres( vector<RString> &vsOut ); void GetAllSongGenres( vector<RString> &vsOut );
void FilterSongs( const SongCriteria &sc, const vector<Song*> &in, vector<Song*> &out ); void FilterSongs( const SongCriteria &sc, const vector<Song*> &in, vector<Song*> &out );
void GetPlayableStepsTypes( const Song *pSong, set<StepsType> &vOut );
void GetPlayableSteps( const Song *pSong, vector<Steps*> &vOut ); void GetPlayableSteps( const Song *pSong, vector<Steps*> &vOut );
bool IsStepsTypePlayable( Song *pSong, StepsType st ); bool IsStepsTypePlayable( Song *pSong, StepsType st );
bool IsStepsPlayable( Song *pSong, Steps *pSteps ); bool IsStepsPlayable( Song *pSong, Steps *pSteps );