Skip to content

Commit

Permalink
remove highscore clamping abilities and related checks since it doesn…
Browse files Browse the repository at this point in the history
…t even affect the new scoreman anyway
  • Loading branch information
MinaciousGrace committed Jun 10, 2017
1 parent d1d1829 commit c10733b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 39 deletions.
15 changes: 0 additions & 15 deletions src/HighScore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -868,8 +868,6 @@ void HighScoreList::AddHighScore( HighScore hs, int &iIndexOut, bool bIsMachine
// and not here so that we don't end up with fewer than iMaxScores after
// removing HighScores with duplicate names.
//
if( !bIsMachine )
ClampSize( bIsMachine );
HighGrade = min( hs.GetWifeGrade(), HighGrade);
}

Expand Down Expand Up @@ -964,18 +962,6 @@ void HighScoreList::RemoveAllButOneOfEachName()
}
}

/* commented out functionality instead of obliterating in
case some of you for whatever reason want to reenable this
- Mina */
void HighScoreList::ClampSize( bool bIsMachine )
{
const int iMaxScores = bIsMachine ?
PREFSMAN->m_iMaxHighScoresPerListForMachine :
PREFSMAN->m_iMaxHighScoresPerListForPlayer;
//if( vHighScores.size() > unsigned(iMaxScores) )
// vHighScores.erase( vHighScores.begin()+iMaxScores, vHighScores.end() );
}

void HighScoreList::MergeFromOtherHSL(HighScoreList& other, bool is_machine)
{
iNumTimesPlayed+= other.iNumTimesPlayed;
Expand All @@ -991,7 +977,6 @@ void HighScoreList::MergeFromOtherHSL(HighScoreList& other, bool is_machine)
vHighScores.erase(unique_end, vHighScores.end());
// Reverse it because sort moved the lesser scores to the top.
std::reverse(vHighScores.begin(), vHighScores.end());
ClampSize(is_machine);
}

XNode* Screenshot::CreateNode() const
Expand Down
1 change: 0 additions & 1 deletion src/HighScore.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ struct HighScoreList
void AddHighScore( HighScore hs, int &iIndexOut, bool bIsMachine );
void IncrementPlayCount( DateTime dtLastPlayed );
void RemoveAllButOneOfEachName();
void ClampSize( bool bIsMachine );

void MergeFromOtherHSL(HighScoreList& other, bool is_machine);

Expand Down
25 changes: 2 additions & 23 deletions src/StageStats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,31 +282,10 @@ void StageStats::FinalizeScores(bool bSummary)
LOG->Trace("done saving stats and high scores");
}

// all scores are saved so all scores are highscores, remove this later -mina
bool StageStats::PlayerHasHighScore( PlayerNumber pn ) const
{
const Song *pSong = m_vpPlayedSongs[0];
const Steps *pSteps = m_player[pn].m_vpPossibleSteps[0];

// Don't show high scores for tutorial songs.
if( pSong->IsTutorial() == Song::SHOW_NEVER )
return false;

const HighScoreList &hsl = PROFILEMAN->GetProfile(pn)->GetStepsHighScoreList(pSong, pSteps);

int iScore = m_player[pn].m_iScore;
float fPercentDP = m_player[pn].GetPercentDancePoints();
for( int h=0; h<(int)hsl.vHighScores.size() && h<PREFSMAN->m_iMaxHighScoresPerListForMachine; ++h )
{
const HighScore &hs = hsl.vHighScores[h];
if( hs.GetName() == RANKING_TO_FILL_IN_MARKER[pn] &&
hs.GetPercentDP() == fPercentDP &&
hs.GetScore() == iScore )
{
return true;
}
}

return false;
return true;
}

unsigned int StageStats::GetMinimumMissCombo() const
Expand Down

0 comments on commit c10733b

Please sign in to comment.