Store unlock data in a more fundamental form in the profile, and derive

the special values as needed.  Centralize most of it in GameState::EndGame.
This commit is contained in:
Glenn Maynard
2004-02-22 08:16:49 +00:00
parent 066826e421
commit 802e1a6758
10 changed files with 228 additions and 207 deletions
+26
View File
@@ -245,6 +245,19 @@ void GameState::EndGame()
pMachineProfile->m_iNumSongsPlayedByStyle[ss.style]++;
pMachineProfile->m_iNumSongsPlayedByDifficulty[ss.pSteps[p]->GetDifficulty()]++;
pMachineProfile->m_iNumSongsPlayedByMeter[iMeter]++;
pMachineProfile->m_iTotalDancePoints += ss.iActualDancePoints[p];
if( ss.StageType == StageStats::STAGE_EXTRA || ss.StageType == StageStats::STAGE_EXTRA2 )
{
if( ss.bFailed[p] )
++pMachineProfile->m_iNumExtraStagesFailed;
else
++pMachineProfile->m_iNumExtraStagesPassed;
}
if( !ss.bFailed[p] )
{
pMachineProfile->m_iNumSongsPassedByPlayMode[ss.playMode]++;
pMachineProfile->m_iNumSongsPassedByGrade[ss.GetGrade((PlayerNumber)p)]++;
}
if( pPlayerProfile )
{
@@ -252,6 +265,19 @@ void GameState::EndGame()
pPlayerProfile->m_iNumSongsPlayedByStyle[ss.style]++;
pPlayerProfile->m_iNumSongsPlayedByDifficulty[ss.pSteps[p]->GetDifficulty()]++;
pPlayerProfile->m_iNumSongsPlayedByMeter[iMeter]++;
pPlayerProfile->m_iTotalDancePoints += ss.iActualDancePoints[p];
if( ss.StageType == StageStats::STAGE_EXTRA || ss.StageType == StageStats::STAGE_EXTRA2 )
{
if( ss.bFailed[p] )
++pPlayerProfile->m_iNumExtraStagesFailed;
else
++pPlayerProfile->m_iNumExtraStagesPassed;
}
if( !ss.bFailed[p] )
{
pPlayerProfile->m_iNumSongsPassedByPlayMode[ss.playMode]++;
pPlayerProfile->m_iNumSongsPassedByGrade[ss.GetGrade((PlayerNumber)p)]++;
}
}
}