Profile::ClearStats

This commit is contained in:
Glenn Maynard
2007-05-06 05:13:58 +00:00
parent 837f29e0f9
commit 6b60a97092
5 changed files with 12 additions and 9 deletions
+8
View File
@@ -87,6 +87,14 @@ void Profile::InitEditableData()
m_iWeightPounds = 0;
}
void Profile::ClearStats()
{
// don't reset the Guid
RString sGuid = m_sGuid;
InitAll();
m_sGuid = sGuid;
}
RString Profile::MakeGuid()
{
RString s;
+1
View File
@@ -296,6 +296,7 @@ public:
void InitCalorieData();
void InitRecentSongScores();
void InitRecentCourseScores();
void ClearStats();
//
// Loading and saving
+2 -3
View File
@@ -25,7 +25,6 @@
#include "Profile.h"
#include "SongManager.h"
#include "GameLoop.h"
#include "ScreenServiceAction.h"
#include "song.h"
static bool g_bIsDisplayed = false;
@@ -711,8 +710,8 @@ class DebugLineClearMachineStats : public IDebugLine
virtual RString GetPageName() const { return "Profiles"; }
virtual void DoAndMakeSystemMessage( RString &sMessageOut )
{
GameCommand gc;
ClearMachineStats();
Profile* pProfile = PROFILEMAN->GetMachineProfile();
pProfile->ClearStats();
IDebugLine::DoAndMakeSystemMessage( sMessageOut );
}
};
+1 -4
View File
@@ -29,10 +29,7 @@ static LocalizedString MACHINE_STATS_CLEARED( "ScreenServiceAction", "Machine st
RString ClearMachineStats()
{
Profile* pProfile = PROFILEMAN->GetMachineProfile();
// don't reset the Guid
RString sGuid = pProfile->m_sGuid;
pProfile->InitAll();
pProfile->m_sGuid = sGuid;
pProfile->ClearStats();
PROFILEMAN->SaveMachineProfile();
return MACHINE_STATS_CLEARED.GetValue();
}
-2
View File
@@ -8,8 +8,6 @@
#undef FAILED
#endif
RString ClearMachineStats();
#include "ScreenPrompt.h"
class ScreenServiceAction : public ScreenPrompt