From ce4274af531e96996790e58aa1784e707d0fa82b Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Mon, 31 May 2004 20:40:44 +0000 Subject: [PATCH] show per-difficulty awards on the eval screen even if not using a profile --- stepmania/src/ScreenEvaluation.cpp | 70 +++++++++++++++++------------- 1 file changed, 39 insertions(+), 31 deletions(-) diff --git a/stepmania/src/ScreenEvaluation.cpp b/stepmania/src/ScreenEvaluation.cpp index 7bc91174ed..059d11bec2 100644 --- a/stepmania/src/ScreenEvaluation.cpp +++ b/stepmania/src/ScreenEvaluation.cpp @@ -1045,12 +1045,6 @@ void ScreenEvaluation::CommitScores( { FOREACH_HumanPlayer( p ) { - // must be using a profile to receive awards - if( !PROFILEMAN->IsUsingProfile(p) ) - continue; - - Profile* pProfile = PROFILEMAN->GetProfile(p); - deque &vPdas = GAMESTATE->m_vLastPerDifficultyAwards[p]; LOG->Trace( "per difficulty awards" ); @@ -1117,37 +1111,51 @@ void ScreenEvaluation::CommitScores( LOG->Trace( "done with per combo awards" ); + + // // erase awards from the Last list that have been received so that we // won't show them again. - switch( m_Type ) + // + if( !PROFILEMAN->IsUsingProfile(p) ) { - case stage: - for( int i=GAMESTATE->m_vLastPerDifficultyAwards[p].size()-1; i>=0; i-- ) - { - PerDifficultyAward pda = GAMESTATE->m_vLastPerDifficultyAwards[p][i]; - Steps* pSteps = stageStats.pSteps[p]; - ASSERT( pSteps != NULL ); - bool bAlreadyHad = pProfile->HasPerDifficultyAward( pSteps->m_StepsType, pSteps->GetDifficulty(), pda ); - pProfile->AddPerDifficultyAward( pSteps->m_StepsType, pSteps->GetDifficulty(), pda ); - if( bAlreadyHad ) - GAMESTATE->m_vLastPerDifficultyAwards[p].erase( GAMESTATE->m_vLastPerDifficultyAwards[p].begin()+i ); - } + // don't show any awards on ScreenAward unless using a profile + GAMESTATE->m_vLastPerDifficultyAwards[p].clear(); + GAMESTATE->m_vLastPeakComboAwards[p].clear(); } - - LOG->Trace( "done erasing dupe pdas" ); - + else { - for( int i=GAMESTATE->m_vLastPeakComboAwards[p].size()-1; i>=0; i-- ) - { - PeakComboAward pca = GAMESTATE->m_vLastPeakComboAwards[p][i]; - bool bAlreadyHad = pProfile->HasPeakComboAward( pca ); - pProfile->AddPeakComboAward( pca ); - if( bAlreadyHad ) - GAMESTATE->m_vLastPeakComboAwards[p].erase( GAMESTATE->m_vLastPeakComboAwards[p].begin()+i ); - } - } + Profile* pProfile = PROFILEMAN->GetProfile(p); - LOG->Trace( "done erasing pcas" ); + switch( m_Type ) + { + case stage: + for( int i=GAMESTATE->m_vLastPerDifficultyAwards[p].size()-1; i>=0; i-- ) + { + PerDifficultyAward pda = GAMESTATE->m_vLastPerDifficultyAwards[p][i]; + Steps* pSteps = stageStats.pSteps[p]; + ASSERT( pSteps != NULL ); + bool bAlreadyHad = pProfile->HasPerDifficultyAward( pSteps->m_StepsType, pSteps->GetDifficulty(), pda ); + pProfile->AddPerDifficultyAward( pSteps->m_StepsType, pSteps->GetDifficulty(), pda ); + if( bAlreadyHad ) + GAMESTATE->m_vLastPerDifficultyAwards[p].erase( GAMESTATE->m_vLastPerDifficultyAwards[p].begin()+i ); + } + } + + LOG->Trace( "done erasing dupe pdas" ); + + { + for( int i=GAMESTATE->m_vLastPeakComboAwards[p].size()-1; i>=0; i-- ) + { + PeakComboAward pca = GAMESTATE->m_vLastPeakComboAwards[p][i]; + bool bAlreadyHad = pProfile->HasPeakComboAward( pca ); + pProfile->AddPeakComboAward( pca ); + if( bAlreadyHad ) + GAMESTATE->m_vLastPeakComboAwards[p].erase( GAMESTATE->m_vLastPeakComboAwards[p].begin()+i ); + } + } + + LOG->Trace( "done erasing pcas" ); + } } }