rename AutogenMissingTypes -> AutogenSteps
simplify
This commit is contained in:
@@ -517,7 +517,7 @@ static vector<Song*> GetFilteredBestSongs( StepsType nt )
|
|||||||
{
|
{
|
||||||
if( pSong->m_apNotes[j]->m_StepsType != nt )
|
if( pSong->m_apNotes[j]->m_StepsType != nt )
|
||||||
continue;
|
continue;
|
||||||
if( !PREFSMAN->m_bAutogenMissingTypes && pSong->m_apNotes[j]->IsAutogen() )
|
if( !PREFSMAN->m_bAutogenSteps && pSong->m_apNotes[j]->IsAutogen() )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if( pSong->m_apNotes[j]->GetDifficulty() == DIFFICULTY_MEDIUM )
|
if( pSong->m_apNotes[j]->GetDifficulty() == DIFFICULTY_MEDIUM )
|
||||||
@@ -594,11 +594,11 @@ void Course::GetCourseInfo( StepsType nt, vector<Course::Info> &ci, CourseDiffic
|
|||||||
if( pSong )
|
if( pSong )
|
||||||
{
|
{
|
||||||
if( e.difficulty != DIFFICULTY_INVALID )
|
if( e.difficulty != DIFFICULTY_INVALID )
|
||||||
pNotes = pSong->GetStepsByDifficulty( nt, e.difficulty, PREFSMAN->m_bAutogenMissingTypes );
|
pNotes = pSong->GetStepsByDifficulty( nt, e.difficulty );
|
||||||
else if( e.low_meter != -1 && e.high_meter != -1 )
|
else if( e.low_meter != -1 && e.high_meter != -1 )
|
||||||
pNotes = pSong->GetStepsByMeter( nt, low_meter, high_meter, PREFSMAN->m_bAutogenMissingTypes );
|
pNotes = pSong->GetStepsByMeter( nt, low_meter, high_meter );
|
||||||
else
|
else
|
||||||
pNotes = pSong->GetStepsByDifficulty( nt, DIFFICULTY_MEDIUM, PREFSMAN->m_bAutogenMissingTypes );
|
pNotes = pSong->GetStepsByDifficulty( nt, DIFFICULTY_MEDIUM );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case COURSE_ENTRY_RANDOM:
|
case COURSE_ENTRY_RANDOM:
|
||||||
@@ -625,9 +625,9 @@ void Course::GetCourseInfo( StepsType nt, vector<Course::Info> &ci, CourseDiffic
|
|||||||
continue; /* wrong group */
|
continue; /* wrong group */
|
||||||
|
|
||||||
if( e.difficulty == DIFFICULTY_INVALID )
|
if( e.difficulty == DIFFICULTY_INVALID )
|
||||||
pNotes = pSong->GetStepsByMeter( nt, low_meter, high_meter, PREFSMAN->m_bAutogenMissingTypes );
|
pNotes = pSong->GetStepsByMeter( nt, low_meter, high_meter );
|
||||||
else
|
else
|
||||||
pNotes = pSong->GetStepsByDifficulty( nt, e.difficulty, PREFSMAN->m_bAutogenMissingTypes );
|
pNotes = pSong->GetStepsByDifficulty( nt, e.difficulty );
|
||||||
|
|
||||||
if( pNotes ) // found a match
|
if( pNotes ) // found a match
|
||||||
break; // stop searching
|
break; // stop searching
|
||||||
@@ -662,9 +662,9 @@ void Course::GetCourseInfo( StepsType nt, vector<Course::Info> &ci, CourseDiffic
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( e.difficulty == DIFFICULTY_INVALID )
|
if( e.difficulty == DIFFICULTY_INVALID )
|
||||||
pNotes = pSong->GetStepsByMeter( nt, low_meter, high_meter, PREFSMAN->m_bAutogenMissingTypes );
|
pNotes = pSong->GetStepsByMeter( nt, low_meter, high_meter );
|
||||||
else
|
else
|
||||||
pNotes = pSong->GetStepsByDifficulty( nt, e.difficulty, PREFSMAN->m_bAutogenMissingTypes );
|
pNotes = pSong->GetStepsByDifficulty( nt, e.difficulty );
|
||||||
|
|
||||||
if( pNotes == NULL )
|
if( pNotes == NULL )
|
||||||
pNotes = pSong->GetClosestNotes( nt, DIFFICULTY_MEDIUM );
|
pNotes = pSong->GetClosestNotes( nt, DIFFICULTY_MEDIUM );
|
||||||
@@ -687,7 +687,7 @@ void Course::GetCourseInfo( StepsType nt, vector<Course::Info> &ci, CourseDiffic
|
|||||||
Difficulty new_dc = Difficulty( dc + cd );
|
Difficulty new_dc = Difficulty( dc + cd );
|
||||||
if( new_dc < NUM_DIFFICULTIES )
|
if( new_dc < NUM_DIFFICULTIES )
|
||||||
{
|
{
|
||||||
Steps* pNewNotes = pSong->GetStepsByDifficulty( nt, new_dc, PREFSMAN->m_bAutogenMissingTypes );
|
Steps* pNewNotes = pSong->GetStepsByDifficulty( nt, new_dc );
|
||||||
if( pNewNotes )
|
if( pNewNotes )
|
||||||
pNotes = pNewNotes;
|
pNotes = pNewNotes;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -366,7 +366,7 @@ void MusicWheel::GetSongList(vector<Song*> &arraySongs, SongSortOrder so, CStrin
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
vector<Steps*> arraySteps;
|
vector<Steps*> arraySteps;
|
||||||
pSong->GetSteps( arraySteps, GAMESTATE->GetCurrentStyleDef()->m_StepsType, DIFFICULTY_INVALID, -1, -1, "", PREFSMAN->m_bAutogenMissingTypes );
|
pSong->GetSteps( arraySteps, GAMESTATE->GetCurrentStyleDef()->m_StepsType, DIFFICULTY_INVALID, -1, -1, "" );
|
||||||
|
|
||||||
if( !arraySteps.empty() )
|
if( !arraySteps.empty() )
|
||||||
arraySongs.push_back( pSong );
|
arraySongs.push_back( pSong );
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ PrefsManager::PrefsManager()
|
|||||||
m_bPercentageScoring = false;
|
m_bPercentageScoring = false;
|
||||||
m_fMinPercentageForHighScore = 0.5f;
|
m_fMinPercentageForHighScore = 0.5f;
|
||||||
m_bShowLyrics = true;
|
m_bShowLyrics = true;
|
||||||
m_bAutogenMissingTypes = true;
|
m_bAutogenSteps = true;
|
||||||
m_bAutogenGroupCourses = true;
|
m_bAutogenGroupCourses = true;
|
||||||
m_bBreakComboToGetItem = false;
|
m_bBreakComboToGetItem = false;
|
||||||
m_bLockCourseDifficulties = true;
|
m_bLockCourseDifficulties = true;
|
||||||
@@ -434,7 +434,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk()
|
|||||||
ini.GetValue( "Options", "PercentageScoring", m_bPercentageScoring );
|
ini.GetValue( "Options", "PercentageScoring", m_bPercentageScoring );
|
||||||
ini.GetValue( "Options", "MinPercentageForHighScore", m_fMinPercentageForHighScore );
|
ini.GetValue( "Options", "MinPercentageForHighScore", m_fMinPercentageForHighScore );
|
||||||
ini.GetValue( "Options", "ShowLyrics", m_bShowLyrics );
|
ini.GetValue( "Options", "ShowLyrics", m_bShowLyrics );
|
||||||
ini.GetValue( "Options", "AutogenMissingTypes", m_bAutogenMissingTypes );
|
ini.GetValue( "Options", "AutogenSteps", m_bAutogenSteps );
|
||||||
ini.GetValue( "Options", "AutogenGroupCourses", m_bAutogenGroupCourses );
|
ini.GetValue( "Options", "AutogenGroupCourses", m_bAutogenGroupCourses );
|
||||||
ini.GetValue( "Options", "BreakComboToGetItem", m_bBreakComboToGetItem );
|
ini.GetValue( "Options", "BreakComboToGetItem", m_bBreakComboToGetItem );
|
||||||
ini.GetValue( "Options", "LockCourseDifficulties", m_bLockCourseDifficulties );
|
ini.GetValue( "Options", "LockCourseDifficulties", m_bLockCourseDifficulties );
|
||||||
@@ -648,7 +648,7 @@ void PrefsManager::SaveGlobalPrefsToDisk() const
|
|||||||
ini.SetValue( "Options", "PercentageScoring", m_bPercentageScoring );
|
ini.SetValue( "Options", "PercentageScoring", m_bPercentageScoring );
|
||||||
ini.SetValue( "Options", "MinPercentageForHighScore", m_fMinPercentageForHighScore );
|
ini.SetValue( "Options", "MinPercentageForHighScore", m_fMinPercentageForHighScore );
|
||||||
ini.SetValue( "Options", "ShowLyrics", m_bShowLyrics );
|
ini.SetValue( "Options", "ShowLyrics", m_bShowLyrics );
|
||||||
ini.SetValue( "Options", "AutogenMissingTypes", m_bAutogenMissingTypes );
|
ini.SetValue( "Options", "AutogenSteps", m_bAutogenSteps );
|
||||||
ini.SetValue( "Options", "AutogenGroupCourses", m_bAutogenGroupCourses );
|
ini.SetValue( "Options", "AutogenGroupCourses", m_bAutogenGroupCourses );
|
||||||
ini.SetValue( "Options", "BreakComboToGetItem", m_bBreakComboToGetItem );
|
ini.SetValue( "Options", "BreakComboToGetItem", m_bBreakComboToGetItem );
|
||||||
ini.SetValue( "Options", "LockCourseDifficulties", m_bLockCourseDifficulties );
|
ini.SetValue( "Options", "LockCourseDifficulties", m_bLockCourseDifficulties );
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ public:
|
|||||||
bool m_bPercentageScoring;
|
bool m_bPercentageScoring;
|
||||||
float m_fMinPercentageForHighScore;
|
float m_fMinPercentageForHighScore;
|
||||||
bool m_bShowLyrics;
|
bool m_bShowLyrics;
|
||||||
bool m_bAutogenMissingTypes;
|
bool m_bAutogenSteps;
|
||||||
bool m_bAutogenGroupCourses;
|
bool m_bAutogenGroupCourses;
|
||||||
bool m_bBreakComboToGetItem;
|
bool m_bBreakComboToGetItem;
|
||||||
bool m_bLockCourseDifficulties;
|
bool m_bLockCourseDifficulties;
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ bool ScreenJukebox::SetSong()
|
|||||||
if( pNotes == NULL )
|
if( pNotes == NULL )
|
||||||
continue; // skip
|
continue; // skip
|
||||||
|
|
||||||
if( !PREFSMAN->m_bAutogenMissingTypes && pNotes->IsAutogen())
|
if( !PREFSMAN->m_bAutogenSteps && pNotes->IsAutogen())
|
||||||
continue; // skip
|
continue; // skip
|
||||||
|
|
||||||
// Found something we can use!
|
// Found something we can use!
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ MOVE( Translations, PREFSMAN->m_bShowNative );
|
|||||||
MOVE( Lyrics, PREFSMAN->m_bShowLyrics );
|
MOVE( Lyrics, PREFSMAN->m_bShowLyrics );
|
||||||
|
|
||||||
/* Misc. options */
|
/* Misc. options */
|
||||||
MOVE( AutogenMissingTypes, PREFSMAN->m_bAutogenMissingTypes );
|
MOVE( AutogenSteps, PREFSMAN->m_bAutogenSteps );
|
||||||
MOVE( AutogenGroupCourses, PREFSMAN->m_bAutogenGroupCourses );
|
MOVE( AutogenGroupCourses, PREFSMAN->m_bAutogenGroupCourses );
|
||||||
MOVE( FastLoad, PREFSMAN->m_bFastLoad );
|
MOVE( FastLoad, PREFSMAN->m_bFastLoad );
|
||||||
|
|
||||||
@@ -422,7 +422,7 @@ static const ConfOption g_ConfOptions[] =
|
|||||||
ConfOption( "Lyrics", Lyrics, "HIDE","SHOW"),
|
ConfOption( "Lyrics", Lyrics, "HIDE","SHOW"),
|
||||||
|
|
||||||
/* Misc options */
|
/* Misc options */
|
||||||
ConfOption( "Autogen\nMissing Types", AutogenMissingTypes, "OFF","ON" ),
|
ConfOption( "Autogen\nSteps", AutogenSteps, "OFF","ON" ),
|
||||||
ConfOption( "Autogen\nGroup Courses", AutogenGroupCourses, "OFF","ON" ),
|
ConfOption( "Autogen\nGroup Courses", AutogenGroupCourses, "OFF","ON" ),
|
||||||
ConfOption( "Fast\nLoad", FastLoad, "OFF","ON" ),
|
ConfOption( "Fast\nLoad", FastLoad, "OFF","ON" ),
|
||||||
|
|
||||||
|
|||||||
@@ -856,6 +856,9 @@ void Song::ReCalculateRadarValuesAndLastBeat()
|
|||||||
|
|
||||||
void Song::GetSteps( vector<Steps*>& arrayAddTo, StepsType nt, Difficulty dc, int iMeterLow, int iMeterHigh, const CString &sDescription, bool bIncludeAutoGen, int Max ) const
|
void Song::GetSteps( vector<Steps*>& arrayAddTo, StepsType nt, Difficulty dc, int iMeterLow, int iMeterHigh, const CString &sDescription, bool bIncludeAutoGen, int Max ) const
|
||||||
{
|
{
|
||||||
|
if( !PREFSMAN->m_bAutogenSteps )
|
||||||
|
bIncludeAutoGen = false;
|
||||||
|
|
||||||
for( unsigned i=0; i<m_apNotes.size(); i++ ) // for each of the Song's Steps
|
for( unsigned i=0; i<m_apNotes.size(); i++ ) // for each of the Song's Steps
|
||||||
{
|
{
|
||||||
if( !Max )
|
if( !Max )
|
||||||
@@ -891,10 +894,10 @@ Steps* Song::GetStepsByDifficulty( StepsType nt, Difficulty dc, bool bIncludeAut
|
|||||||
return vNotes[0];
|
return vNotes[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
Steps* Song::GetStepsByMeter( StepsType nt, int iMeterLow, int iMeterHigh, bool bIncludeAutoGen ) const
|
Steps* Song::GetStepsByMeter( StepsType nt, int iMeterLow, int iMeterHigh ) const
|
||||||
{
|
{
|
||||||
vector<Steps*> vNotes;
|
vector<Steps*> vNotes;
|
||||||
GetSteps( vNotes, nt, DIFFICULTY_INVALID, iMeterLow, iMeterHigh, "", bIncludeAutoGen, 1 );
|
GetSteps( vNotes, nt, DIFFICULTY_INVALID, iMeterLow, iMeterHigh, "", true, 1 );
|
||||||
if( vNotes.size() == 0 )
|
if( vNotes.size() == 0 )
|
||||||
return NULL;
|
return NULL;
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ public:
|
|||||||
const vector<Steps*>& GetAllSteps() const { return m_apNotes; }
|
const vector<Steps*>& GetAllSteps() const { return m_apNotes; }
|
||||||
void GetSteps( vector<Steps*>& arrayAddTo, StepsType nt = STEPS_TYPE_INVALID, Difficulty dc = DIFFICULTY_INVALID, int iMeterLow = -1, int iMeterHigh = -1, const CString &sDescription = "", bool bIncludeAutoGen = true, int Max = -1 ) const;
|
void GetSteps( vector<Steps*>& arrayAddTo, StepsType nt = STEPS_TYPE_INVALID, Difficulty dc = DIFFICULTY_INVALID, int iMeterLow = -1, int iMeterHigh = -1, const CString &sDescription = "", bool bIncludeAutoGen = true, int Max = -1 ) const;
|
||||||
Steps* GetStepsByDifficulty( StepsType nt, Difficulty dc, bool bIncludeAutoGen = true ) const;
|
Steps* GetStepsByDifficulty( StepsType nt, Difficulty dc, bool bIncludeAutoGen = true ) const;
|
||||||
Steps* GetStepsByMeter( StepsType nt, int iMeterLow, int iMeterHigh, bool bIncludeAutoGen = true ) const;
|
Steps* GetStepsByMeter( StepsType nt, int iMeterLow, int iMeterHigh ) const;
|
||||||
Steps* GetStepsByDescription( StepsType nt, CString sDescription ) const;
|
Steps* GetStepsByDescription( StepsType nt, CString sDescription ) const;
|
||||||
Steps* GetClosestNotes( StepsType nt, Difficulty dc ) const;
|
Steps* GetClosestNotes( StepsType nt, Difficulty dc ) const;
|
||||||
void GetEdits( vector<Steps*>& arrayAddTo, StepsType nt ) const;
|
void GetEdits( vector<Steps*>& arrayAddTo, StepsType nt ) const;
|
||||||
|
|||||||
Reference in New Issue
Block a user