From: Glenn M. <gma...@us...> - 2007-05-06 05:14:04
|
Update of /cvsroot/stepmania/stepmania/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv608 Modified Files: Profile.cpp Profile.h ScreenServiceAction.cpp ScreenServiceAction.h ScreenDebugOverlay.cpp Log Message: Profile::ClearStats Index: ScreenDebugOverlay.cpp =================================================================== RCS file: /cvsroot/stepmania/stepmania/src/ScreenDebugOverlay.cpp,v retrieving revision 1.89 retrieving revision 1.90 diff -u -d -p -r1.89 -r1.90 --- ScreenDebugOverlay.cpp 6 May 2007 04:49:21 -0000 1.89 +++ ScreenDebugOverlay.cpp 6 May 2007 05:13:58 -0000 1.90 @@ -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 : publi virtual RString GetPageName() const { return "Profiles"; } virtual void DoAndMakeSystemMessage( RString &sMessageOut ) { - GameCommand gc; - ClearMachineStats(); + Profile* pProfile = PROFILEMAN->GetMachineProfile(); + pProfile->ClearStats(); IDebugLine::DoAndMakeSystemMessage( sMessageOut ); } }; Index: Profile.h =================================================================== RCS file: /cvsroot/stepmania/stepmania/src/Profile.h,v retrieving revision 1.116 retrieving revision 1.117 diff -u -d -p -r1.116 -r1.117 --- Profile.h 25 Apr 2007 03:39:53 -0000 1.116 +++ Profile.h 6 May 2007 05:13:58 -0000 1.117 @@ -296,6 +296,7 @@ public: void InitCalorieData(); void InitRecentSongScores(); void InitRecentCourseScores(); + void ClearStats(); // // Loading and saving Index: ScreenServiceAction.h =================================================================== RCS file: /cvsroot/stepmania/stepmania/src/ScreenServiceAction.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -p -r1.5 -r1.6 --- ScreenServiceAction.h 18 Mar 2006 11:59:41 -0000 1.5 +++ ScreenServiceAction.h 6 May 2007 05:13:58 -0000 1.6 @@ -8,8 +8,6 @@ #undef FAILED #endif -RString ClearMachineStats(); - #include "ScreenPrompt.h" class ScreenServiceAction : public ScreenPrompt Index: ScreenServiceAction.cpp =================================================================== RCS file: /cvsroot/stepmania/stepmania/src/ScreenServiceAction.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -p -r1.27 -r1.28 --- ScreenServiceAction.cpp 16 May 2006 01:48:59 -0000 1.27 +++ ScreenServiceAction.cpp 6 May 2007 05:13:58 -0000 1.28 @@ -29,10 +29,7 @@ static LocalizedString MACHINE_STATS_CLE 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(); } Index: Profile.cpp =================================================================== RCS file: /cvsroot/stepmania/stepmania/src/Profile.cpp,v retrieving revision 1.291 retrieving revision 1.292 diff -u -d -p -r1.291 -r1.292 --- Profile.cpp 6 May 2007 02:09:33 -0000 1.291 +++ Profile.cpp 6 May 2007 05:13:58 -0000 1.292 @@ -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; |