add ScreenEnding to show stats

add weight/calories to Profile
This commit is contained in:
Chris Danford
2004-01-07 02:56:47 +00:00
parent 764214cf16
commit 5580eccda5
6 changed files with 45 additions and 11 deletions
+30 -4
View File
@@ -43,8 +43,8 @@ ProfileManager* PROFILEMAN = NULL; // global and accessable from anywhere in our
#define COURSE_SCORES_FILE "CourseScores.dat"
#define STATS_HTML_FILE "stats.html"
#define STYLE_CSS_FILE "style.css"
#define NEW_MEM_CARD_NAME "NewCard"
#define NEW_PROFILE_NAME "NewProfile"
#define NEW_MEM_CARD_NAME ""
#define NEW_PROFILE_NAME ""
#define SM_300_STATISTICS_FILE "statistics.ini"
@@ -64,6 +64,34 @@ static const char *MEM_CARD_DIR[NUM_PLAYERS] =
"@mc2/",
};
CString Profile::GetDisplayName()
{
if( !m_sName.empty() )
return m_sName;
else if( !m_sLastUsedHighScoreName.empty() )
return m_sLastUsedHighScoreName;
else
return "NO NAME";
}
CString Profile::GetDisplayCaloriesBurned()
{
if( m_fWeightPounds == 0 ) // weight not entered
return "N/A";
else
return ssprintf("%f.3Cal",m_fCaloriesBurned);
}
int Profile::GetTotalNumSongsPlayed()
{
int iTotal = 0;
for( int i=0; i<NUM_PLAY_MODES; i++ )
iTotal += m_iNumSongsPlayedByPlayMode[i];
return iTotal;
}
ProfileManager::ProfileManager()
{
for( int p=0; p<NUM_PLAYERS; p++ )
@@ -129,8 +157,6 @@ bool ProfileManager::LoadProfile( PlayerNumber pn, CString sProfileDir, bool bIs
bool ProfileManager::CreateProfile( CString sProfileDir, CString sName )
{
ASSERT( !sName.empty() );
bool bResult;
Profile pro;