diff --git a/stepmania/src/Makefile.am b/stepmania/src/Makefile.am index b265a96624..9498449424 100644 --- a/stepmania/src/Makefile.am +++ b/stepmania/src/Makefile.am @@ -62,7 +62,7 @@ NoteData.cpp NoteData.h NoteDataUtil.cpp NoteDataUtil.h NoteDataWithScoring.cpp NoteFieldPositioning.cpp NoteFieldPositioning.h NoteTypes.cpp NoteTypes.h NotesLoader.cpp NotesLoader.h \ NotesLoaderBMS.cpp NotesLoaderBMS.h NotesLoaderDWI.cpp NotesLoaderDWI.h NotesLoaderKSF.cpp NotesLoaderKSF.h \ NotesLoaderSM.cpp NotesLoaderSM.h NotesWriterDWI.cpp NotesWriterDWI.h NotesWriterSM.cpp NotesWriterSM.h \ -PlayerAI.cpp PlayerAI.h PlayerNumber.cpp PlayerNumber.h PlayerOptions.cpp PlayerOptions.h RandomSample.cpp RandomSample.h \ +PlayerAI.cpp PlayerAI.h PlayerNumber.cpp PlayerNumber.h PlayerOptions.cpp PlayerOptions.h Profile.cpp Profile.h RandomSample.cpp RandomSample.h \ ScoreKeeper.h ScoreKeeperMAX2.cpp ScoreKeeperMAX2.h ScoreKeeperRave.cpp ScoreKeeperRave.h \ Song.cpp song.h SongCacheIndex.cpp SongCacheIndex.h SongOptions.cpp SongOptions.h StageStats.cpp StageStats.h Steps.cpp Steps.h \ Style.h StyleDef.cpp StyleDef.h StyleInput.h TimingData.cpp TimingData.h TitleSubstitution.cpp TitleSubstitution.h diff --git a/stepmania/src/Profile.cpp b/stepmania/src/Profile.cpp new file mode 100644 index 0000000000..fec4a0c871 --- /dev/null +++ b/stepmania/src/Profile.cpp @@ -0,0 +1,42 @@ +#include "global.h" +/* +----------------------------------------------------------------------------- + Class: ProfileManager + + Desc: See header. + + Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. + Chris Danford +----------------------------------------------------------------------------- +*/ + +#include "ProfileManager.h" +#include "RageUtil.h" + +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("%iCal",m_fCaloriesBurned); +} + +int Profile::GetTotalNumSongsPlayed() +{ + int iTotal = 0; + for( int i=0; i + + + +