This commit is contained in:
Glenn Maynard
2004-02-22 02:16:02 +00:00
parent 455d4a8383
commit 29d2ceb5b5
+12 -16
View File
@@ -221,19 +221,6 @@ void GameState::EndGame()
continue; continue;
CHECKPOINT; CHECKPOINT;
unsigned i;
for( i=0; i<g_vPlayedStageStats.size(); i++ )
{
const StageStats& ss = g_vPlayedStageStats[i];
CheckStageStats( ss, p );
CHECKPOINT;
pMachineProfile->m_iNumSongsPlayedByPlayMode[ss.playMode]++;
pMachineProfile->m_iNumSongsPlayedByStyle[ss.style]++;
pMachineProfile->m_iNumSongsPlayedByDifficulty[ss.pSteps[p]->GetDifficulty()]++;
int iMeter = clamp( ss.iMeter[p], 0, MAX_METER );
pMachineProfile->m_iNumSongsPlayedByMeter[ iMeter ]++;
}
Profile* pPlayerProfile = PROFILEMAN->GetProfile( (PlayerNumber)p ); Profile* pPlayerProfile = PROFILEMAN->GetProfile( (PlayerNumber)p );
if( pPlayerProfile ) if( pPlayerProfile )
@@ -245,25 +232,34 @@ void GameState::EndGame()
PREFSMAN->m_bComboContinuesBetweenSongs ? PREFSMAN->m_bComboContinuesBetweenSongs ?
g_CurStageStats.iCurCombo[p] : g_CurStageStats.iCurCombo[p] :
0; 0;
}
for( i=0; i<g_vPlayedStageStats.size(); i++ ) for( unsigned i=0; i<g_vPlayedStageStats.size(); i++ )
{ {
const StageStats& ss = g_vPlayedStageStats[i]; const StageStats& ss = g_vPlayedStageStats[i];
CheckStageStats( ss, p ); CheckStageStats( ss, p );
CHECKPOINT; CHECKPOINT;
const int iMeter = clamp( ss.iMeter[p], 0, MAX_METER );
pMachineProfile->m_iNumSongsPlayedByPlayMode[ss.playMode]++;
pMachineProfile->m_iNumSongsPlayedByStyle[ss.style]++;
pMachineProfile->m_iNumSongsPlayedByDifficulty[ss.pSteps[p]->GetDifficulty()]++;
pMachineProfile->m_iNumSongsPlayedByMeter[iMeter]++;
if( pPlayerProfile )
{
pPlayerProfile->m_iNumSongsPlayedByPlayMode[ss.playMode]++; pPlayerProfile->m_iNumSongsPlayedByPlayMode[ss.playMode]++;
pPlayerProfile->m_iNumSongsPlayedByStyle[ss.style]++; pPlayerProfile->m_iNumSongsPlayedByStyle[ss.style]++;
pPlayerProfile->m_iNumSongsPlayedByDifficulty[ss.pSteps[p]->GetDifficulty()]++; pPlayerProfile->m_iNumSongsPlayedByDifficulty[ss.pSteps[p]->GetDifficulty()]++;
int iMeter = clamp( ss.iMeter[p], 0, MAX_METER );
pPlayerProfile->m_iNumSongsPlayedByMeter[iMeter]++; pPlayerProfile->m_iNumSongsPlayedByMeter[iMeter]++;
} }
} }
CHECKPOINT; CHECKPOINT;
MEMCARDMAN->FlushAllDisks();
} }
CHECKPOINT; CHECKPOINT;
MEMCARDMAN->FlushAllDisks();
CHECKPOINT;
BOOKKEEPER->WriteToDisk(); BOOKKEEPER->WriteToDisk();
PROFILEMAN->SaveMachineProfile(); PROFILEMAN->SaveMachineProfile();