From 0b64a246f98165f61c8e7377c5234dd02437dc36 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Wed, 24 Nov 2004 03:49:17 +0000 Subject: [PATCH] add checkpoints --- stepmania/src/Profile.cpp | 25 ++++++++++++++++++------- stepmania/src/ScreenEnding.cpp | 2 ++ 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/stepmania/src/Profile.cpp b/stepmania/src/Profile.cpp index b85e2d774c..37ac8c9e76 100644 --- a/stepmania/src/Profile.cpp +++ b/stepmania/src/Profile.cpp @@ -226,6 +226,8 @@ float Profile::GetSongsPossible( 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; // add steps high scores @@ -236,39 +238,48 @@ float Profile::GetSongsActual( StepsType st, Difficulty dc ) const const SongID &id = i->first; 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 // get radar values to compute dance points. if( pSong == NULL ) continue; - + if( pSong->m_SelectionDisplay == Song::SHOW_NEVER ) continue; // skip - + const HighScoresForASong &hsfas = i->second; - + CHECKPOINT_M( ssprintf("Profile::GetSongsActual: %p", &hsfas) ); + for( std::map::const_iterator j = hsfas.m_StepsHighScores.begin(); j != hsfas.m_StepsHighScores.end(); ++j ) { const StepsID &id = j->first; + CHECKPOINT_M( ssprintf("Profile::GetSongsActual: n %s", id.ToString().c_str()) ); 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 // get radar values to compute dance points. if( pSteps == NULL ) continue; - + if( pSteps->m_StepsType != st ) continue; - + if( pSteps->GetDifficulty() != dc ) continue; // skip - + const HighScoresForASteps& h = j->second; + CHECKPOINT_M( ssprintf("Profile::GetSongsActual: h %p", &h) ); const HighScoreList& hs = h.hs; - + CHECKPOINT_M( ssprintf("Profile::GetSongsActual: hs %p", &hs) ); + fTotalPercents += hs.GetTopScore().fPercentDP; + CHECKPOINT; } + CHECKPOINT; } return fTotalPercents; diff --git a/stepmania/src/ScreenEnding.cpp b/stepmania/src/ScreenEnding.cpp index b9abf2997e..61102e6e85 100644 --- a/stepmania/src/ScreenEnding.cpp +++ b/stepmania/src/ScreenEnding.cpp @@ -63,6 +63,8 @@ CString GetStatsLineTitle( PlayerNumber pn, EndingStatsLine line ) CString GetStatsLineValue( PlayerNumber pn, EndingStatsLine line ) { + CHECKPOINT_M( ssprintf("GetStatsLineValue(%d,%d)",pn,line) ); + Profile* pProfile = PROFILEMAN->GetProfile( pn ); ASSERT( pProfile );