From 64f2d8ad3ca93b6bfe36b6779dcf72f70d6f46d5 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 10 Feb 2004 21:10:23 +0000 Subject: [PATCH] rename AutogenMissingTypes -> AutogenSteps simplify --- stepmania/src/Course.cpp | 18 +++++++++--------- stepmania/src/MusicWheel.cpp | 2 +- stepmania/src/PrefsManager.cpp | 6 +++--- stepmania/src/PrefsManager.h | 2 +- stepmania/src/ScreenJukebox.cpp | 2 +- stepmania/src/ScreenOptionsMasterPrefs.cpp | 4 ++-- stepmania/src/Song.cpp | 7 +++++-- stepmania/src/song.h | 2 +- 8 files changed, 23 insertions(+), 20 deletions(-) diff --git a/stepmania/src/Course.cpp b/stepmania/src/Course.cpp index 4b47b4ae7e..dec17601f3 100644 --- a/stepmania/src/Course.cpp +++ b/stepmania/src/Course.cpp @@ -517,7 +517,7 @@ static vector GetFilteredBestSongs( StepsType nt ) { if( pSong->m_apNotes[j]->m_StepsType != nt ) continue; - if( !PREFSMAN->m_bAutogenMissingTypes && pSong->m_apNotes[j]->IsAutogen() ) + if( !PREFSMAN->m_bAutogenSteps && pSong->m_apNotes[j]->IsAutogen() ) continue; if( pSong->m_apNotes[j]->GetDifficulty() == DIFFICULTY_MEDIUM ) @@ -594,11 +594,11 @@ void Course::GetCourseInfo( StepsType nt, vector &ci, CourseDiffic if( pSong ) { 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 ) - pNotes = pSong->GetStepsByMeter( nt, low_meter, high_meter, PREFSMAN->m_bAutogenMissingTypes ); + pNotes = pSong->GetStepsByMeter( nt, low_meter, high_meter ); else - pNotes = pSong->GetStepsByDifficulty( nt, DIFFICULTY_MEDIUM, PREFSMAN->m_bAutogenMissingTypes ); + pNotes = pSong->GetStepsByDifficulty( nt, DIFFICULTY_MEDIUM ); } break; case COURSE_ENTRY_RANDOM: @@ -625,9 +625,9 @@ void Course::GetCourseInfo( StepsType nt, vector &ci, CourseDiffic continue; /* wrong group */ 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 - pNotes = pSong->GetStepsByDifficulty( nt, e.difficulty, PREFSMAN->m_bAutogenMissingTypes ); + pNotes = pSong->GetStepsByDifficulty( nt, e.difficulty ); if( pNotes ) // found a match break; // stop searching @@ -662,9 +662,9 @@ void Course::GetCourseInfo( StepsType nt, vector &ci, CourseDiffic } 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 - pNotes = pSong->GetStepsByDifficulty( nt, e.difficulty, PREFSMAN->m_bAutogenMissingTypes ); + pNotes = pSong->GetStepsByDifficulty( nt, e.difficulty ); if( pNotes == NULL ) pNotes = pSong->GetClosestNotes( nt, DIFFICULTY_MEDIUM ); @@ -687,7 +687,7 @@ void Course::GetCourseInfo( StepsType nt, vector &ci, CourseDiffic Difficulty new_dc = Difficulty( dc + cd ); if( new_dc < NUM_DIFFICULTIES ) { - Steps* pNewNotes = pSong->GetStepsByDifficulty( nt, new_dc, PREFSMAN->m_bAutogenMissingTypes ); + Steps* pNewNotes = pSong->GetStepsByDifficulty( nt, new_dc ); if( pNewNotes ) pNotes = pNewNotes; } diff --git a/stepmania/src/MusicWheel.cpp b/stepmania/src/MusicWheel.cpp index 4ae041537c..de45f82db3 100644 --- a/stepmania/src/MusicWheel.cpp +++ b/stepmania/src/MusicWheel.cpp @@ -366,7 +366,7 @@ void MusicWheel::GetSongList(vector &arraySongs, SongSortOrder so, CStrin continue; vector 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() ) arraySongs.push_back( pSong ); diff --git a/stepmania/src/PrefsManager.cpp b/stepmania/src/PrefsManager.cpp index 0175a99c5e..7da1a4a224 100644 --- a/stepmania/src/PrefsManager.cpp +++ b/stepmania/src/PrefsManager.cpp @@ -162,7 +162,7 @@ PrefsManager::PrefsManager() m_bPercentageScoring = false; m_fMinPercentageForHighScore = 0.5f; m_bShowLyrics = true; - m_bAutogenMissingTypes = true; + m_bAutogenSteps = true; m_bAutogenGroupCourses = true; m_bBreakComboToGetItem = false; m_bLockCourseDifficulties = true; @@ -434,7 +434,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk() ini.GetValue( "Options", "PercentageScoring", m_bPercentageScoring ); ini.GetValue( "Options", "MinPercentageForHighScore", m_fMinPercentageForHighScore ); 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", "BreakComboToGetItem", m_bBreakComboToGetItem ); ini.GetValue( "Options", "LockCourseDifficulties", m_bLockCourseDifficulties ); @@ -648,7 +648,7 @@ void PrefsManager::SaveGlobalPrefsToDisk() const ini.SetValue( "Options", "PercentageScoring", m_bPercentageScoring ); ini.SetValue( "Options", "MinPercentageForHighScore", m_fMinPercentageForHighScore ); 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", "BreakComboToGetItem", m_bBreakComboToGetItem ); ini.SetValue( "Options", "LockCourseDifficulties", m_bLockCourseDifficulties ); diff --git a/stepmania/src/PrefsManager.h b/stepmania/src/PrefsManager.h index 4cd68a79f0..fbb3c6d3ce 100644 --- a/stepmania/src/PrefsManager.h +++ b/stepmania/src/PrefsManager.h @@ -157,7 +157,7 @@ public: bool m_bPercentageScoring; float m_fMinPercentageForHighScore; bool m_bShowLyrics; - bool m_bAutogenMissingTypes; + bool m_bAutogenSteps; bool m_bAutogenGroupCourses; bool m_bBreakComboToGetItem; bool m_bLockCourseDifficulties; diff --git a/stepmania/src/ScreenJukebox.cpp b/stepmania/src/ScreenJukebox.cpp index d4ea987ac0..1b5349f0aa 100644 --- a/stepmania/src/ScreenJukebox.cpp +++ b/stepmania/src/ScreenJukebox.cpp @@ -61,7 +61,7 @@ bool ScreenJukebox::SetSong() if( pNotes == NULL ) continue; // skip - if( !PREFSMAN->m_bAutogenMissingTypes && pNotes->IsAutogen()) + if( !PREFSMAN->m_bAutogenSteps && pNotes->IsAutogen()) continue; // skip // Found something we can use! diff --git a/stepmania/src/ScreenOptionsMasterPrefs.cpp b/stepmania/src/ScreenOptionsMasterPrefs.cpp index 357ef72e17..673f15cd1b 100644 --- a/stepmania/src/ScreenOptionsMasterPrefs.cpp +++ b/stepmania/src/ScreenOptionsMasterPrefs.cpp @@ -210,7 +210,7 @@ MOVE( Translations, PREFSMAN->m_bShowNative ); MOVE( Lyrics, PREFSMAN->m_bShowLyrics ); /* Misc. options */ -MOVE( AutogenMissingTypes, PREFSMAN->m_bAutogenMissingTypes ); +MOVE( AutogenSteps, PREFSMAN->m_bAutogenSteps ); MOVE( AutogenGroupCourses, PREFSMAN->m_bAutogenGroupCourses ); MOVE( FastLoad, PREFSMAN->m_bFastLoad ); @@ -422,7 +422,7 @@ static const ConfOption g_ConfOptions[] = ConfOption( "Lyrics", Lyrics, "HIDE","SHOW"), /* Misc options */ - ConfOption( "Autogen\nMissing Types", AutogenMissingTypes, "OFF","ON" ), + ConfOption( "Autogen\nSteps", AutogenSteps, "OFF","ON" ), ConfOption( "Autogen\nGroup Courses", AutogenGroupCourses, "OFF","ON" ), ConfOption( "Fast\nLoad", FastLoad, "OFF","ON" ), diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index 59de69e9d8..27f1f07040 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -856,6 +856,9 @@ void Song::ReCalculateRadarValuesAndLastBeat() void Song::GetSteps( vector& 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 vNotes; - GetSteps( vNotes, nt, DIFFICULTY_INVALID, iMeterLow, iMeterHigh, "", bIncludeAutoGen, 1 ); + GetSteps( vNotes, nt, DIFFICULTY_INVALID, iMeterLow, iMeterHigh, "", true, 1 ); if( vNotes.size() == 0 ) return NULL; else diff --git a/stepmania/src/song.h b/stepmania/src/song.h index 6fc1820cdd..6666630c89 100644 --- a/stepmania/src/song.h +++ b/stepmania/src/song.h @@ -185,7 +185,7 @@ public: const vector& GetAllSteps() const { return m_apNotes; } void GetSteps( vector& 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* 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* GetClosestNotes( StepsType nt, Difficulty dc ) const; void GetEdits( vector& arrayAddTo, StepsType nt ) const;