From c3666c2ef5dad5cc181da5cd60576d490f297d05 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 5 Aug 2003 20:38:12 +0000 Subject: [PATCH] simplify --- stepmania/src/ScoreKeeperMAX2.cpp | 59 ++++++++++--------------------- 1 file changed, 18 insertions(+), 41 deletions(-) diff --git a/stepmania/src/ScoreKeeperMAX2.cpp b/stepmania/src/ScoreKeeperMAX2.cpp index f456c64885..481ec9b391 100644 --- a/stepmania/src/ScoreKeeperMAX2.cpp +++ b/stepmania/src/ScoreKeeperMAX2.cpp @@ -29,51 +29,28 @@ ScoreKeeperMAX2::ScoreKeeperMAX2( const vector& apNotes_, PlayerNumber p // // Fill in m_CurStageStats, calculate multiplier // - switch( GAMESTATE->m_PlayMode ) + int iTotalPossibleDancePoints = 0; + for( unsigned i=0; im_CurStageStats.pSong = GAMESTATE->m_pCurSong; - GAMESTATE->m_CurStageStats.iMeter[pn_] = pNotes->GetMeter(); + Steps* pSteps = apNotes[0]; + NoteData notedata; + pSteps->GetNoteData( ¬edata ); - pNotes->GetNoteData( ¬edata ); - const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef(); - NoteData playerNoteData; - pStyleDef->GetTransformedNoteDataForStyle( pn_, ¬edata, &playerNoteData ); + const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef(); + NoteData playerNoteData; + pStyleDef->GetTransformedNoteDataForStyle( pn_, ¬edata, &playerNoteData ); - GAMESTATE->m_CurStageStats.iPossibleDancePoints[pn_] = this->GetPossibleDancePoints( &playerNoteData ); - } - break; - case PLAY_MODE_NONSTOP: - case PLAY_MODE_ONI: - case PLAY_MODE_ENDLESS: - { - int iTotalPossibleDancePoints = 0; - for( unsigned i=0; iGetNoteData( ¬edata ); + iTotalPossibleDancePoints += this->GetPossibleDancePoints( ¬edata ); + } + GAMESTATE->m_CurStageStats.iPossibleDancePoints[pn_] = iTotalPossibleDancePoints; - const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef(); - NoteData playerNoteData; - pStyleDef->GetTransformedNoteDataForStyle( pn_, ¬edata, &playerNoteData ); - - apNotes[i]->GetNoteData( &playerNoteData ); - iTotalPossibleDancePoints += this->GetPossibleDancePoints( ¬edata ); - } - - GAMESTATE->m_CurStageStats.pSong = NULL; - GAMESTATE->m_CurStageStats.iPossibleDancePoints[pn_] = iTotalPossibleDancePoints; - } - break; - default: - ASSERT(0); + if( !GAMESTATE->IsCourseMode() ) + { + ASSERT( !apNotes.empty() ); + GAMESTATE->m_CurStageStats.pSong = GAMESTATE->m_pCurSong; + GAMESTATE->m_CurStageStats.iMeter[pn_] = apNotes[0]->GetMeter(); + } else { + GAMESTATE->m_CurStageStats.pSong = NULL; }