From b0ca9ef1eafa97168b8a78754815aad8e1ba6b22 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 25 Apr 2004 23:22:46 +0000 Subject: [PATCH] debugging --- stepmania/src/HighScore.cpp | 4 +++- stepmania/src/Profile.cpp | 4 +++- stepmania/src/Song.cpp | 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/stepmania/src/HighScore.cpp b/stepmania/src/HighScore.cpp index 8e7c7c469e..724f72bcd3 100644 --- a/stepmania/src/HighScore.cpp +++ b/stepmania/src/HighScore.cpp @@ -115,17 +115,19 @@ void HighScoreList::AddHighScore( HighScore hs, int &iIndexOut ) vHighScores.erase( vHighScores.begin()+iMaxScores, vHighScores.end() ); } } - +#include "RageLog.h" const HighScore& HighScoreList::GetTopScore() const { if( vHighScores.empty() ) { + LOG->Trace("empty"); static HighScore hs; hs = HighScore(); return hs; } else { + LOG->Trace("not empty"); return vHighScores[0]; } } diff --git a/stepmania/src/Profile.cpp b/stepmania/src/Profile.cpp index 05cc4f57f6..3db30dd59e 100644 --- a/stepmania/src/Profile.cpp +++ b/stepmania/src/Profile.cpp @@ -330,9 +330,11 @@ HighScoreList& Profile::GetStepsHighScoreList( const Song* pSong, const Steps* p StepsID stepsID; stepsID.FromSteps( pSteps ); - + CHECKPOINT; HighScoresForASong &hsSong = m_SongHighScores[songID]; // operator[] inserts into map + CHECKPOINT; HighScoresForASteps &hsSteps = hsSong.m_StepsHighScores[stepsID]; // operator[] inserts into map + CHECKPOINT; return hsSteps.hs; } diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index 4f3d44c346..0f3db25c08 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -1283,9 +1283,12 @@ int Song::GetNumNotesWithGrade( Grade g ) const { Steps* pSteps = vNotes[j]; +CHECKPOINT; if( PROFILEMAN->GetMachineProfile()->GetStepsHighScoreList(this,pSteps).GetTopScore().grade == g ) iCount++; +CHECKPOINT; } +CHECKPOINT; return iCount; }