fix clear machine stats

This commit is contained in:
Chris Danford
2006-03-18 11:59:41 +00:00
parent a79329daa3
commit def70f62a1
3 changed files with 7 additions and 5 deletions
+4 -4
View File
@@ -24,6 +24,7 @@
#include "Profile.h" #include "Profile.h"
#include "SongManager.h" #include "SongManager.h"
#include "GameLoop.h" #include "GameLoop.h"
#include "ScreenServiceAction.h"
static bool g_bIsDisplayed = false; static bool g_bIsDisplayed = false;
static bool g_bIsSlow = false; static bool g_bIsSlow = false;
@@ -609,8 +610,7 @@ class DebugLineClearMachineStats : public IDebugLine
virtual void Do( RString &sMessageOut ) virtual void Do( RString &sMessageOut )
{ {
GameCommand gc; GameCommand gc;
gc.Load( 0, ParseCommands("ClearMachineStats") ); ClearMachineStats();
gc.ApplyToAllPlayers();
IDebugLine::Do( sMessageOut ); IDebugLine::Do( sMessageOut );
} }
}; };
@@ -642,7 +642,7 @@ static HighScore MakeRandomHighScore( float fPercentDP )
return hs; return hs;
} }
static void FillProfile( Profile *pProfile ) static void FillProfileStats( Profile *pProfile )
{ {
// Choose a percent for all scores. This is useful for testing unlocks // Choose a percent for all scores. This is useful for testing unlocks
// where some elements are unlocked at a certain percent complete // where some elements are unlocked at a certain percent complete
@@ -694,7 +694,7 @@ class DebugLineFillMachineStats : public IDebugLine
virtual void Do( RString &sMessageOut ) virtual void Do( RString &sMessageOut )
{ {
Profile* pProfile = PROFILEMAN->GetMachineProfile(); Profile* pProfile = PROFILEMAN->GetMachineProfile();
FillProfile( pProfile ); FillProfileStats( pProfile );
PROFILEMAN->SaveMachineProfile(); PROFILEMAN->SaveMachineProfile();
IDebugLine::Do( sMessageOut ); IDebugLine::Do( sMessageOut );
} }
+1 -1
View File
@@ -25,7 +25,7 @@ static RString ClearBookkeepingData()
} }
static LocalizedString MACHINE_STATS_CLEARED( "ScreenServiceAction", "Machine stats cleared." ); static LocalizedString MACHINE_STATS_CLEARED( "ScreenServiceAction", "Machine stats cleared." );
static RString ClearMachineStats() RString ClearMachineStats()
{ {
Profile* pProfile = PROFILEMAN->GetMachineProfile(); Profile* pProfile = PROFILEMAN->GetMachineProfile();
// don't reset the Guid // don't reset the Guid
+2
View File
@@ -8,6 +8,8 @@
#undef FAILED #undef FAILED
#endif #endif
RString ClearMachineStats();
#include "ScreenPrompt.h" #include "ScreenPrompt.h"
class ScreenServiceAction : public ScreenPrompt class ScreenServiceAction : public ScreenPrompt