add checkpoints

This commit is contained in:
Chris Danford
2004-11-24 03:49:17 +00:00
parent 2aacb108b7
commit 0b64a246f9
2 changed files with 20 additions and 7 deletions
+11
View File
@@ -226,6 +226,8 @@ float Profile::GetSongsPossible( StepsType st, Difficulty dc ) const
float Profile::GetSongsActual( StepsType st, Difficulty dc ) const float Profile::GetSongsActual( StepsType st, Difficulty dc ) const
{ {
CHECKPOINT_M( ssprintf("Profile::GetSongsActual(%d,%d)",st,dc) );
float fTotalPercents = 0; float fTotalPercents = 0;
// add steps high scores // add steps high scores
@@ -236,6 +238,8 @@ float Profile::GetSongsActual( StepsType st, Difficulty dc ) const
const SongID &id = i->first; const SongID &id = i->first;
Song* pSong = id.ToSong(); Song* pSong = id.ToSong();
CHECKPOINT_M( ssprintf("Profile::GetSongsActual: %p", pSong) );
// If the Song isn't loaded on the current machine, then we can't // If the Song isn't loaded on the current machine, then we can't
// get radar values to compute dance points. // get radar values to compute dance points.
if( pSong == NULL ) if( pSong == NULL )
@@ -245,13 +249,16 @@ float Profile::GetSongsActual( StepsType st, Difficulty dc ) const
continue; // skip continue; // skip
const HighScoresForASong &hsfas = i->second; const HighScoresForASong &hsfas = i->second;
CHECKPOINT_M( ssprintf("Profile::GetSongsActual: %p", &hsfas) );
for( std::map<StepsID,HighScoresForASteps>::const_iterator j = hsfas.m_StepsHighScores.begin(); for( std::map<StepsID,HighScoresForASteps>::const_iterator j = hsfas.m_StepsHighScores.begin();
j != hsfas.m_StepsHighScores.end(); j != hsfas.m_StepsHighScores.end();
++j ) ++j )
{ {
const StepsID &id = j->first; const StepsID &id = j->first;
CHECKPOINT_M( ssprintf("Profile::GetSongsActual: n %s", id.ToString().c_str()) );
Steps* pSteps = id.ToSteps( pSong, true ); Steps* pSteps = id.ToSteps( pSong, true );
CHECKPOINT_M( ssprintf("Profile::GetSongsActual: steps %p", pSteps) );
// If the Steps isn't loaded on the current machine, then we can't // If the Steps isn't loaded on the current machine, then we can't
// get radar values to compute dance points. // get radar values to compute dance points.
@@ -265,10 +272,14 @@ float Profile::GetSongsActual( StepsType st, Difficulty dc ) const
continue; // skip continue; // skip
const HighScoresForASteps& h = j->second; const HighScoresForASteps& h = j->second;
CHECKPOINT_M( ssprintf("Profile::GetSongsActual: h %p", &h) );
const HighScoreList& hs = h.hs; const HighScoreList& hs = h.hs;
CHECKPOINT_M( ssprintf("Profile::GetSongsActual: hs %p", &hs) );
fTotalPercents += hs.GetTopScore().fPercentDP; fTotalPercents += hs.GetTopScore().fPercentDP;
CHECKPOINT;
} }
CHECKPOINT;
} }
return fTotalPercents; return fTotalPercents;
+2
View File
@@ -63,6 +63,8 @@ CString GetStatsLineTitle( PlayerNumber pn, EndingStatsLine line )
CString GetStatsLineValue( PlayerNumber pn, EndingStatsLine line ) CString GetStatsLineValue( PlayerNumber pn, EndingStatsLine line )
{ {
CHECKPOINT_M( ssprintf("GetStatsLineValue(%d,%d)",pn,line) );
Profile* pProfile = PROFILEMAN->GetProfile( pn ); Profile* pProfile = PROFILEMAN->GetProfile( pn );
ASSERT( pProfile ); ASSERT( pProfile );