AccumStageStats -> AccumPlayedStageStats
This commit is contained in:
@@ -1756,7 +1756,7 @@ bool GameState::IsPlayerDead( const PlayerState *pPlayerState ) const
|
||||
float GameState::GetGoalPercentComplete( PlayerNumber pn )
|
||||
{
|
||||
const Profile *pProfile = PROFILEMAN->GetProfile(pn);
|
||||
const StageStats &ssAccum = STATSMAN->GetAccumStageStats();
|
||||
const StageStats &ssAccum = STATSMAN->GetAccumPlayedStageStats();
|
||||
const StageStats &ssCurrent = STATSMAN->m_CurStageStats;
|
||||
const PlayerStageStats &pssAccum = ssAccum.m_player[pn];
|
||||
const PlayerStageStats &pssCurrent = ssCurrent.m_player[pn];
|
||||
|
||||
@@ -52,7 +52,7 @@ void ScoreDisplayAliveTime::UpdateNumber()
|
||||
ASSERT( m_PlayerNumber != PLAYER_INVALID );
|
||||
if( GAMESTATE->IsPlayerEnabled(m_PlayerNumber) )
|
||||
fSecsIntoPlay =
|
||||
STATSMAN->GetAccumStageStats().m_player[m_PlayerNumber].fAliveSeconds +
|
||||
STATSMAN->GetAccumPlayedStageStats().m_player[m_PlayerNumber].fAliveSeconds +
|
||||
STATSMAN->m_CurStageStats.m_player[m_PlayerNumber].fAliveSeconds;
|
||||
|
||||
SetText( SecondsToMMSSMsMs(fSecsIntoPlay) );
|
||||
|
||||
@@ -40,7 +40,7 @@ void ScoreDisplayCalories::LoadFromNode( const RString& sDir, const XNode* pNode
|
||||
|
||||
void ScoreDisplayCalories::Update( float fDelta )
|
||||
{
|
||||
// We have to set the initial text after StatsManager::CalcAccumStageStats
|
||||
// We have to set the initial text after StatsManager::CalcAccumPlayedStageStats
|
||||
// is called.
|
||||
if( IsFirstUpdate() )
|
||||
UpdateNumber();
|
||||
@@ -61,7 +61,7 @@ void ScoreDisplayCalories::PlayCommand( const RString &sCommandName, Actor* pPar
|
||||
void ScoreDisplayCalories::UpdateNumber()
|
||||
{
|
||||
float fCals =
|
||||
STATSMAN->GetAccumStageStats().m_player[m_PlayerNumber].fCaloriesBurned +
|
||||
STATSMAN->GetAccumPlayedStageStats().m_player[m_PlayerNumber].fCaloriesBurned +
|
||||
STATSMAN->m_CurStageStats.m_player[m_PlayerNumber].fCaloriesBurned;
|
||||
|
||||
SetTargetNumber( fCals );
|
||||
|
||||
@@ -188,7 +188,7 @@ void ScreenEvaluation::Init()
|
||||
//
|
||||
// Figure out which statistics and songs we're going to display
|
||||
//
|
||||
STATSMAN->CalcAccumStageStats();
|
||||
STATSMAN->CalcAccumPlayedStageStats();
|
||||
|
||||
if( SUMMARY )
|
||||
STATSMAN->GetFinalEvalStageStats( STATSMAN->m_CurStageStats );
|
||||
|
||||
@@ -19,12 +19,12 @@ void StatsManager::Reset()
|
||||
{
|
||||
m_CurStageStats.Init();
|
||||
m_vPlayedStageStats.clear();
|
||||
m_AccumStageStats.Init();
|
||||
m_AccumPlayedStageStats.Init();
|
||||
|
||||
CalcAccumStageStats();
|
||||
CalcAccumPlayedStageStats();
|
||||
}
|
||||
|
||||
static StageStats AccumStageStats( const vector<StageStats>& vss )
|
||||
static StageStats AccumPlayedStageStats( const vector<StageStats>& vss )
|
||||
{
|
||||
StageStats ssreturn;
|
||||
|
||||
@@ -91,13 +91,13 @@ void StatsManager::GetFinalEvalStageStats( StageStats& statsOut ) const
|
||||
vssToCount.push_back( ss );
|
||||
}
|
||||
|
||||
statsOut = AccumStageStats( vssToCount );
|
||||
statsOut = AccumPlayedStageStats( vssToCount );
|
||||
}
|
||||
|
||||
|
||||
void StatsManager::CalcAccumStageStats()
|
||||
void StatsManager::CalcAccumPlayedStageStats()
|
||||
{
|
||||
m_AccumStageStats = AccumStageStats( m_vPlayedStageStats );
|
||||
m_AccumPlayedStageStats = AccumPlayedStageStats( m_vPlayedStageStats );
|
||||
}
|
||||
|
||||
/* This data is added to each player profile, and to the machine profile per-player. */
|
||||
@@ -205,7 +205,7 @@ public:
|
||||
LunaStatsManager() { LUA->Register( Register ); }
|
||||
|
||||
static int GetCurStageStats( T* p, lua_State *L ) { p->m_CurStageStats.PushSelf(L); return 1; }
|
||||
static int GetAccumStageStats( T* p, lua_State *L ) { p->GetAccumStageStats().PushSelf(L); return 1; }
|
||||
static int GetAccumPlayedStageStats( T* p, lua_State *L ) { p->GetAccumPlayedStageStats().PushSelf(L); return 1; }
|
||||
static int Reset( T* p, lua_State *L ) { p->Reset(); return 0; }
|
||||
static int GetFinalGrade( T* p, lua_State *L )
|
||||
{
|
||||
@@ -245,7 +245,7 @@ public:
|
||||
static void Register(lua_State *L)
|
||||
{
|
||||
ADD_METHOD( GetCurStageStats );
|
||||
ADD_METHOD( GetAccumStageStats );
|
||||
ADD_METHOD( GetAccumPlayedStageStats );
|
||||
ADD_METHOD( Reset );
|
||||
ADD_METHOD( GetFinalGrade );
|
||||
ADD_METHOD( GetStagesPlayed );
|
||||
|
||||
@@ -20,8 +20,8 @@ public:
|
||||
|
||||
// All stages played. Returns a ref to the private member so that
|
||||
// the object will remain alive while Lua is operating on it.
|
||||
void CalcAccumStageStats();
|
||||
StageStats& GetAccumStageStats() { return m_AccumStageStats; }
|
||||
void CalcAccumPlayedStageStats();
|
||||
StageStats& GetAccumPlayedStageStats() { return m_AccumPlayedStageStats; }
|
||||
|
||||
void CommitStatsToProfiles();
|
||||
|
||||
@@ -29,7 +29,7 @@ public:
|
||||
void PushSelf( lua_State *L );
|
||||
|
||||
private:
|
||||
StageStats m_AccumStageStats;
|
||||
StageStats m_AccumPlayedStageStats;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user