From 63bbabc4910e4b890ca1b482c01ad2f04abcfaea Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Tue, 8 Jun 2004 08:15:58 +0000 Subject: [PATCH] add pref: MinPercentageForMachineCourseHighScore --- stepmania/src/PrefsManager.cpp | 9 ++++++--- stepmania/src/PrefsManager.h | 3 ++- stepmania/src/ProfileManager.cpp | 7 +++---- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/stepmania/src/PrefsManager.cpp b/stepmania/src/PrefsManager.cpp index b3361232b3..0d304e7d8d 100644 --- a/stepmania/src/PrefsManager.cpp +++ b/stepmania/src/PrefsManager.cpp @@ -159,7 +159,8 @@ void PrefsManager::Init() m_ShowSongOptions = YES; m_bDancePointsForOni = false; m_bPercentageScoring = false; - m_fMinPercentageForHighScore = 0.5f; + m_fMinPercentageForMachineSongHighScore = 0.5f; + m_fMinPercentageForMachineCourseHighScore = 0; m_bDisqualification = false; m_bShowLyrics = true; m_bAutogenSteps = true; @@ -469,7 +470,8 @@ void PrefsManager::ReadPrefsFromFile( CString sIni ) ini.GetValue( "Options", "SoloSingle", m_bSoloSingle ); ini.GetValue( "Options", "DancePointsForOni", m_bDancePointsForOni ); ini.GetValue( "Options", "PercentageScoring", m_bPercentageScoring ); - ini.GetValue( "Options", "MinPercentageForHighScore", m_fMinPercentageForHighScore ); + ini.GetValue( "Options", "MinPercentageForMachineSongHighScore", m_fMinPercentageForMachineSongHighScore ); + ini.GetValue( "Options", "MinPercentageForMachineCourseHighScore", m_fMinPercentageForMachineCourseHighScore ); ini.GetValue( "Options", "Disqualification", m_bDisqualification ); ini.GetValue( "Options", "ShowLyrics", m_bShowLyrics ); ini.GetValue( "Options", "AutogenSteps", m_bAutogenSteps ); @@ -703,7 +705,8 @@ void PrefsManager::SaveGlobalPrefsToDisk() const ini.SetValue( "Options", "SoloSingle", m_bSoloSingle ); ini.SetValue( "Options", "DancePointsForOni", m_bDancePointsForOni ); ini.SetValue( "Options", "PercentageScoring", m_bPercentageScoring ); - ini.SetValue( "Options", "MinPercentageForHighScore", m_fMinPercentageForHighScore ); + ini.SetValue( "Options", "MinPercentageForMachineSongHighScore", m_fMinPercentageForMachineSongHighScore ); + ini.SetValue( "Options", "MinPercentageForMachineCourseHighScore", m_fMinPercentageForMachineCourseHighScore ); ini.SetValue( "Options", "Disqualification", m_bDisqualification ); ini.SetValue( "Options", "ShowLyrics", m_bShowLyrics ); ini.SetValue( "Options", "AutogenSteps", m_bAutogenSteps ); diff --git a/stepmania/src/PrefsManager.h b/stepmania/src/PrefsManager.h index 4a984a32b0..128719d971 100644 --- a/stepmania/src/PrefsManager.h +++ b/stepmania/src/PrefsManager.h @@ -153,7 +153,8 @@ public: bool m_bSoloSingle; bool m_bDancePointsForOni; //DDR-Extreme style dance points instead of max2 percent bool m_bPercentageScoring; - float m_fMinPercentageForHighScore; + float m_fMinPercentageForMachineSongHighScore; + float m_fMinPercentageForMachineCourseHighScore; bool m_bDisqualification; bool m_bShowLyrics; bool m_bAutogenSteps; diff --git a/stepmania/src/ProfileManager.cpp b/stepmania/src/ProfileManager.cpp index 64394e9314..0f14066ce6 100644 --- a/stepmania/src/ProfileManager.cpp +++ b/stepmania/src/ProfileManager.cpp @@ -457,7 +457,7 @@ void ProfileManager::AddStepsScore( const Song* pSong, const Steps* pSteps, Play { hs.sName = RANKING_TO_FILL_IN_MARKER[pn]; - if( hs.fPercentDP >= PREFSMAN->m_fMinPercentageForHighScore ) + if( hs.fPercentDP >= PREFSMAN->m_fMinPercentageForMachineSongHighScore ) { if( PROFILEMAN->IsUsingProfile(pn) ) PROFILEMAN->GetProfile(pn)->AddStepsHighScore( pSong, pSteps, hs, iPersonalIndexOut ); @@ -502,8 +502,7 @@ HighScore ProfileManager::GetHighScoreForDifficulty( const Song *s, const StyleD // void ProfileManager::AddCourseScore( const Course* pCourse, const Trail* pTrail, PlayerNumber pn, HighScore hs, int &iPersonalIndexOut, int &iMachineIndexOut ) { - // Don't use a minimum percentage for Course scores -// if( hs.fPercentDP >= PREFSMAN->m_fMinPercentageForHighScore ) + if( hs.fPercentDP >= PREFSMAN->m_fMinPercentageForMachineCourseHighScore ) { hs.sName = RANKING_TO_FILL_IN_MARKER[pn]; if( PROFILEMAN->IsUsingProfile(pn) ) @@ -531,7 +530,7 @@ void ProfileManager::IncrementCoursePlayCount( const Course* pCourse, const Trai // void ProfileManager::AddCategoryScore( StepsType st, RankingCategory rc, PlayerNumber pn, HighScore hs, int &iPersonalIndexOut, int &iMachineIndexOut ) { - if( hs.fPercentDP > PREFSMAN->m_fMinPercentageForHighScore ) + if( hs.fPercentDP > PREFSMAN->m_fMinPercentageForMachineSongHighScore ) { hs.sName = RANKING_TO_FILL_IN_MARKER[pn]; if( PROFILEMAN->IsUsingProfile(pn) )