Profile::ClearStats
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -296,6 +296,7 @@ public:
|
||||
void InitCalorieData();
|
||||
void InitRecentSongScores();
|
||||
void InitRecentCourseScores();
|
||||
void ClearStats();
|
||||
|
||||
//
|
||||
// Loading and saving
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
#undef FAILED
|
||||
#endif
|
||||
|
||||
RString ClearMachineStats();
|
||||
|
||||
#include "ScreenPrompt.h"
|
||||
|
||||
class ScreenServiceAction : public ScreenPrompt
|
||||
|
||||
Reference in New Issue
Block a user