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
-28
View File
@@ -219,34 +219,6 @@ void ScreenEvaluation::Init()
}
for( p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled( (PlayerNumber)p ) )
continue; // skip
switch( m_Type )
{
case stage:
// update unlock data
UNLOCKMAN->UnlockClearStage();
UNLOCKMAN->UnlockAddAP( grade[p] );
UNLOCKMAN->UnlockAddSP( grade[p] );
UNLOCKMAN->UnlockAddDP( (float)stageStats.iActualDancePoints[p] );
// if it's extra stage, update # passed stages
if ( (GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() ) &&
grade[p] > GRADE_FAILED )
UNLOCKMAN->UnlockClearExtraStage();
break;
case course:
UNLOCKMAN->UnlockAddDP( (float) stageStats.iActualDancePoints[p] );
UNLOCKMAN->UnlockAddAP( (float) stageStats.iSongsPassed[p] );
UNLOCKMAN->UnlockAddSP( (float) stageStats.iSongsPassed[p] );
break;
}
}
//
// update persistent statistics
//