diff --git a/stepmania/src/PrefsManager.cpp b/stepmania/src/PrefsManager.cpp index 55d834cea1..55cd37d840 100644 --- a/stepmania/src/PrefsManager.cpp +++ b/stepmania/src/PrefsManager.cpp @@ -203,6 +203,7 @@ void PrefsManager::Init() // default to old sort order m_iCourseSortOrder = COURSE_SORT_SONGS; m_bMoveRandomToEnd = false; + m_bSubSortByNumSteps = false; m_iScoringType = SCORING_MAX2; m_iGetRankingName = RANKING_ON; @@ -487,6 +488,7 @@ void PrefsManager::ReadPrefsFromFile( CString sIni ) ini.GetValue( "Options", "CourseSortOrder", (int&)m_iCourseSortOrder ); ini.GetValue( "Options", "MoveRandomToEnd", m_bMoveRandomToEnd ); + ini.GetValue( "Options", "SubSortByNumSteps", m_bSubSortByNumSteps ); ini.GetValue( "Options", "ScoringType", (int&)m_iScoringType ); @@ -506,7 +508,7 @@ void PrefsManager::ReadPrefsFromFile( CString sIni ) #endif ini.GetValue( "Options", "CoursesToShowRanking", m_sCoursesToShowRanking ); ini.GetValue( "Options", "GetRankingName", (int&)m_iGetRankingName); - ini.GetValue( "Options", "SmoothLines", m_bSmoothLines ); + ini.GetValue( "Options", "SmoothLines", m_bSmoothLines ); ini.GetValue( "Options", "GlobalOffsetSeconds", m_fGlobalOffsetSeconds ); ini.GetValue( "Options", "ShowBeginnerHelper", m_bShowBeginnerHelper ); ini.GetValue( "Options", "Language", m_sLanguage ); @@ -726,11 +728,12 @@ void PrefsManager::SaveGlobalPrefsToDisk() const #endif ini.SetValue( "Options", "CoursesToShowRanking", m_sCoursesToShowRanking ); ini.SetValue( "Options", "GetRankingName", m_iGetRankingName); - ini.SetValue( "Options", "SmoothLines", m_bSmoothLines ); + ini.SetValue( "Options", "SmoothLines", m_bSmoothLines ); ini.SetValue( "Options", "GlobalOffsetSeconds", m_fGlobalOffsetSeconds ); ini.SetValue( "Options", "CourseSortOrder", m_iCourseSortOrder ); ini.SetValue( "Options", "MoveRandomToEnd", m_bMoveRandomToEnd ); + ini.SetValue( "Options", "SubSortByNumSteps", m_bSubSortByNumSteps ); ini.SetValue( "Options", "ScoringType", m_iScoringType ); diff --git a/stepmania/src/PrefsManager.h b/stepmania/src/PrefsManager.h index 649058ae49..9b81c13e7c 100644 --- a/stepmania/src/PrefsManager.h +++ b/stepmania/src/PrefsManager.h @@ -225,6 +225,7 @@ public: // course ranking enum CourseSortOrders { COURSE_SORT_SONGS, COURSE_SORT_METER, COURSE_SORT_METER_SUM, COURSE_SORT_RANK } m_iCourseSortOrder; bool m_bMoveRandomToEnd; + bool m_bSubSortByNumSteps; enum GetRankingName { RANKING_OFF, RANKING_ON, RANKING_LIST } m_iGetRankingName; // scoring type; SCORING_MAX2 should always be first diff --git a/stepmania/src/SongUtil.cpp b/stepmania/src/SongUtil.cpp index b881177cfd..10efa52127 100644 --- a/stepmania/src/SongUtil.cpp +++ b/stepmania/src/SongUtil.cpp @@ -8,6 +8,7 @@ #include "PrefsManager.h" #include "SongManager.h" #include "XmlFile.h" +#include "PrefsManager.h" ///////////////////////////////////// @@ -350,7 +351,10 @@ void SongUtil::SortSongPointerArrayByMeter( vector &arraySongPointers, Di for(unsigned i = 0; i < arraySongPointers.size(); ++i) { Steps* pSteps = arraySongPointers[i]->GetStepsByDifficulty( GAMESTATE->GetCurrentStyleDef()->m_StepsType, dc ); - song_sort_val[arraySongPointers[i]] = ssprintf("%i", pSteps ? pSteps->GetMeter() : 0); + CString &s = song_sort_val[arraySongPointers[i]]; + s = ssprintf("%03d", pSteps ? pSteps->GetMeter() : 0); + if( PREFSMAN->m_bSubSortByNumSteps ) + s += ssprintf("%06.0f",pSteps ? pSteps->GetRadarValues().value[RADAR_NUM_TAPS_AND_HOLDS] : 0); } stable_sort( arraySongPointers.begin(), arraySongPointers.end(), CompareSongPointersBySortValueAscending ); }