add PREFSMAN->m_fMinPercentageForHighScore
fix fPercentDP not saved when new high score added
This commit is contained in:
@@ -106,6 +106,7 @@ PrefsManager::PrefsManager()
|
||||
m_ShowSongOptions = YES;
|
||||
m_bDancePointsForOni = false;
|
||||
m_bPercentageScoring = false;
|
||||
m_fMinPercentageForHighScore = 0.5f;
|
||||
m_bShowLyrics = true;
|
||||
m_bAutogenMissingTypes = true;
|
||||
m_bAutogenGroupCourses = true;
|
||||
@@ -315,6 +316,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk()
|
||||
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", "ShowLyrics", m_bShowLyrics );
|
||||
ini.GetValue( "Options", "AutogenMissingTypes", m_bAutogenMissingTypes );
|
||||
ini.GetValue( "Options", "AutogenGroupCourses", m_bAutogenGroupCourses );
|
||||
@@ -473,6 +475,7 @@ 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", "ShowLyrics", m_bShowLyrics );
|
||||
ini.SetValue( "Options", "AutogenMissingTypes", m_bAutogenMissingTypes );
|
||||
ini.SetValue( "Options", "AutogenGroupCourses", m_bAutogenGroupCourses );
|
||||
|
||||
@@ -100,6 +100,7 @@ public:
|
||||
bool m_bSoloSingle;
|
||||
bool m_bDancePointsForOni; //DDR-Extreme style dance points instead of max2 percent
|
||||
bool m_bPercentageScoring;
|
||||
float m_fMinPercentageForHighScore;
|
||||
bool m_bShowLyrics;
|
||||
bool m_bAutogenMissingTypes;
|
||||
bool m_bAutogenGroupCourses;
|
||||
|
||||
@@ -221,7 +221,8 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName ) : Screen(sClassName)
|
||||
hs.grade = grade[p];
|
||||
hs.iScore = stageStats.iScore[p] + stageStats.iBonus[p];
|
||||
hs.fPercentDP = stageStats.GetPercentDancePoints( (PlayerNumber)p );
|
||||
GAMESTATE->m_pCurNotes[p]->AddHighScore( (PlayerNumber)p, hs, iPersonalHighScoreIndex[p], iMachineHighScoreIndex[p] );
|
||||
if( hs.fPercentDP > PREFSMAN->m_fMinPercentageForHighScore )
|
||||
GAMESTATE->m_pCurNotes[p]->AddHighScore( (PlayerNumber)p, hs, iPersonalHighScoreIndex[p], iMachineHighScoreIndex[p] );
|
||||
|
||||
// update unlock data if unlocks are on
|
||||
if ( PREFSMAN->m_bUseUnlockSystem )
|
||||
@@ -253,7 +254,9 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName ) : Screen(sClassName)
|
||||
|
||||
ProfileManager::CategoryData::HighScore hs;
|
||||
hs.iScore = stageStats.iScore[p];
|
||||
PROFILEMAN->AddHighScore( nt, rc[p], (PlayerNumber)p, hs, iMachineHighScoreIndex[p] );
|
||||
hs.fPercentDP = stageStats.GetPercentDancePoints( (PlayerNumber)p );
|
||||
if( hs.fPercentDP > PREFSMAN->m_fMinPercentageForHighScore )
|
||||
PROFILEMAN->AddHighScore( nt, rc[p], (PlayerNumber)p, hs, iMachineHighScoreIndex[p] );
|
||||
|
||||
// If unlocking is enabled, save the dance points
|
||||
if( PREFSMAN->m_bUseUnlockSystem )
|
||||
@@ -270,17 +273,13 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName ) : Screen(sClassName)
|
||||
// DO save scores for a failed Oni/Endless
|
||||
if( m_bFailed && pCourse->IsNonstop() ) continue;
|
||||
|
||||
int score;
|
||||
if( pCourse->IsOni() )
|
||||
score = stageStats.iActualDancePoints[p];
|
||||
else
|
||||
score = stageStats.iScore[p];
|
||||
|
||||
StepsType nt = GAMESTATE->GetCurrentStyleDef()->m_StepsType;
|
||||
Course::MemCardData::HighScore hs;
|
||||
hs.iScore = score;
|
||||
hs.iScore = stageStats.iScore[p];
|
||||
hs.fPercentDP = stageStats.GetPercentDancePoints( (PlayerNumber)p );
|
||||
hs.fSurviveTime = stageStats.fAliveSeconds[p];
|
||||
pCourse->AddHighScore( nt, (PlayerNumber)p, hs, iPersonalHighScoreIndex[p], iMachineHighScoreIndex[p] );
|
||||
if( hs.fPercentDP > PREFSMAN->m_fMinPercentageForHighScore )
|
||||
pCourse->AddHighScore( nt, (PlayerNumber)p, hs, iPersonalHighScoreIndex[p], iMachineHighScoreIndex[p] );
|
||||
}
|
||||
|
||||
// If unlocking is enabled, save the dance points
|
||||
|
||||
Reference in New Issue
Block a user