diff --git a/src/Profile.cpp b/src/Profile.cpp index 82be153b8b..fd686eaa91 100644 --- a/src/Profile.cpp +++ b/src/Profile.cpp @@ -136,6 +136,7 @@ void Profile::InitGeneralData() m_iTotalRolls = 0; m_iTotalMines = 0; m_iTotalHands = 0; + m_iTotalLifts = 0; FOREACH_ENUM( PlayMode, i ) m_iNumSongsPlayedByPlayMode[i] = 0; @@ -1056,6 +1057,7 @@ XNode* Profile::SaveGeneralDataCreateNode() const pGeneralDataNode->AppendChild( "TotalRolls", m_iTotalRolls ); pGeneralDataNode->AppendChild( "TotalMines", m_iTotalMines ); pGeneralDataNode->AppendChild( "TotalHands", m_iTotalHands ); + pGeneralDataNode->AppendChild( "TotalLifts", m_iTotalLifts ); // Keep declared variables in a very local scope so they aren't // accidentally used where they're not intended. There's a lot of @@ -1238,6 +1240,7 @@ void Profile::LoadGeneralDataFromNode( const XNode* pNode ) pNode->GetChildValue( "TotalRolls", m_iTotalRolls ); pNode->GetChildValue( "TotalMines", m_iTotalMines ); pNode->GetChildValue( "TotalHands", m_iTotalHands ); + pNode->GetChildValue( "TotalLifts", m_iTotalLifts ); { const XNode* pDefaultModifiers = pNode->GetChild("DefaultModifiers"); @@ -1353,7 +1356,7 @@ void Profile::LoadGeneralDataFromNode( const XNode* pNode ) } -void Profile::AddStepTotals( int iTotalTapsAndHolds, int iTotalJumps, int iTotalHolds, int iTotalRolls, int iTotalMines, int iTotalHands, float fCaloriesBurned ) +void Profile::AddStepTotals( int iTotalTapsAndHolds, int iTotalJumps, int iTotalHolds, int iTotalRolls, int iTotalMines, int iTotalHands, int iTotalLifts, float fCaloriesBurned ) { m_iTotalTapsAndHolds += iTotalTapsAndHolds; m_iTotalJumps += iTotalJumps; @@ -1361,6 +1364,7 @@ void Profile::AddStepTotals( int iTotalTapsAndHolds, int iTotalJumps, int iTotal m_iTotalRolls += iTotalRolls; m_iTotalMines += iTotalMines; m_iTotalHands += iTotalHands; + m_iTotalLifts += iTotalLifts; m_fTotalCaloriesBurned += fCaloriesBurned; @@ -2018,6 +2022,7 @@ public: static int GetTotalRolls( T* p, lua_State *L ) { lua_pushnumber(L, p->m_iTotalRolls ); return 1; } static int GetTotalMines( T* p, lua_State *L ) { lua_pushnumber(L, p->m_iTotalMines ); return 1; } static int GetTotalHands( T* p, lua_State *L ) { lua_pushnumber(L, p->m_iTotalHands ); return 1; } + static int GetTotalLifts( T* p, lua_State *L ) { lua_pushnumber(L, p->m_iTotalLifts ); return 1; } static int GetUserData( T* p, lua_State *L ) { p->m_UserData.PushSelf(L); return 1; } LunaProfile() @@ -2062,6 +2067,7 @@ public: ADD_METHOD( GetTotalRolls ); ADD_METHOD( GetTotalMines ); ADD_METHOD( GetTotalHands ); + ADD_METHOD( GetTotalLifts ); ADD_METHOD( GetUserData ); } }; diff --git a/src/Profile.h b/src/Profile.h index 2dce403afe..8f85d3ac1b 100644 --- a/src/Profile.h +++ b/src/Profile.h @@ -87,7 +87,7 @@ public: Song *GetMostPopularSong() const; Course *GetMostPopularCourse() const; - void AddStepTotals( int iNumTapsAndHolds, int iNumJumps, int iNumHolds, int iNumRolls, int iNumMines, int iNumHands, float fCaloriesBurned ); + void AddStepTotals( int iNumTapsAndHolds, int iNumJumps, int iNumHolds, int iNumRolls, int iNumMines, int iNumHands, int iNumLifts, float fCaloriesBurned ); bool IsMachine() const; @@ -125,6 +125,7 @@ public: int m_iTotalRolls; int m_iTotalMines; int m_iTotalHands; + int m_iTotalLifts; set m_UnlockedEntryIDs; mutable RString m_sLastPlayedMachineGuid; // mutable because we overwrite this on save, and I don't want to remove const from the whole save chain. -Chris mutable DateTime m_LastPlayedDate; diff --git a/src/ProfileManager.cpp b/src/ProfileManager.cpp index ed095c76e0..cab97d0523 100644 --- a/src/ProfileManager.cpp +++ b/src/ProfileManager.cpp @@ -606,11 +606,11 @@ void ProfileManager::IncrementToastiesCount( PlayerNumber pn ) ++GetMachineProfile()->m_iNumToasties; } -void ProfileManager::AddStepTotals( PlayerNumber pn, int iNumTapsAndHolds, int iNumJumps, int iNumHolds, int iNumRolls, int iNumMines, int iNumHands, float fCaloriesBurned ) +void ProfileManager::AddStepTotals( PlayerNumber pn, int iNumTapsAndHolds, int iNumJumps, int iNumHolds, int iNumRolls, int iNumMines, int iNumHands, int iNumLifts, float fCaloriesBurned ) { if( IsPersistentProfile(pn) ) - GetProfile(pn)->AddStepTotals( iNumTapsAndHolds, iNumJumps, iNumHolds, iNumRolls, iNumMines, iNumHands, fCaloriesBurned ); - GetMachineProfile()->AddStepTotals( iNumTapsAndHolds, iNumJumps, iNumHolds, iNumRolls, iNumMines, iNumHands, fCaloriesBurned ); + GetProfile(pn)->AddStepTotals( iNumTapsAndHolds, iNumJumps, iNumHolds, iNumRolls, iNumMines, iNumHands, iNumLifts, fCaloriesBurned ); + GetMachineProfile()->AddStepTotals( iNumTapsAndHolds, iNumJumps, iNumHolds, iNumRolls, iNumMines, iNumHands, iNumLifts, fCaloriesBurned ); } // diff --git a/src/ProfileManager.h b/src/ProfileManager.h index 26607f52b1..3381b9498f 100644 --- a/src/ProfileManager.h +++ b/src/ProfileManager.h @@ -56,7 +56,7 @@ public: // General data void IncrementToastiesCount( PlayerNumber pn ); - void AddStepTotals( PlayerNumber pn, int iNumTapsAndHolds, int iNumJumps, int iNumHolds, int iNumRolls, int iNumMines, int iNumHands, float fCaloriesBurned ); + void AddStepTotals( PlayerNumber pn, int iNumTapsAndHolds, int iNumJumps, int iNumHolds, int iNumRolls, int iNumMines, int iNumHands, int iNumLifts, float fCaloriesBurned ); // High scores void LoadMachineProfile(); // including edits