From cecb7a5710b2eb88cf1c5be8f8eb58bdc38c3b6e Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 14 Nov 2006 22:01:21 +0000 Subject: [PATCH] simplify --- stepmania/src/Player.cpp | 7 ++----- stepmania/src/ScoreKeeper.h | 2 +- stepmania/src/ScoreKeeperNormal.cpp | 6 +----- stepmania/src/ScoreKeeperNormal.h | 2 +- stepmania/src/ScoreKeeperRave.cpp | 5 +---- stepmania/src/ScoreKeeperRave.h | 2 +- 6 files changed, 7 insertions(+), 17 deletions(-) diff --git a/stepmania/src/Player.cpp b/stepmania/src/Player.cpp index 6c27b17193..a027e02288 100644 --- a/stepmania/src/Player.cpp +++ b/stepmania/src/Player.cpp @@ -1734,18 +1734,15 @@ void Player::HandleTapRowScore( unsigned row ) m_pSecondaryScoreKeeper->HandleTapScore( tn ); } - bool bComboStopped = false; - bool bMissComboStopped = false; - const int iCurCombo = m_pPlayerStageStats ? m_pPlayerStageStats->m_iCurCombo : 0; const int iCurMissCombo = m_pPlayerStageStats ? m_pPlayerStageStats->m_iCurMissCombo : 0; if( m_pPrimaryScoreKeeper != NULL ) - m_pPrimaryScoreKeeper->HandleTapRowScore( m_NoteData, row, bComboStopped, bMissComboStopped ); + m_pPrimaryScoreKeeper->HandleTapRowScore( m_NoteData, row ); if( iOldCombo > 50 && iCurCombo < 50 ) SCREENMAN->PostMessageToTopScreen( SM_ComboStopped, 0 ); if( m_pSecondaryScoreKeeper != NULL ) - m_pSecondaryScoreKeeper->HandleTapRowScore( m_NoteData, row, bComboStopped, bMissComboStopped ); + m_pSecondaryScoreKeeper->HandleTapRowScore( m_NoteData, row ); if( m_pPlayerStageStats && m_pCombo ) { diff --git a/stepmania/src/ScoreKeeper.h b/stepmania/src/ScoreKeeper.h index cf17d02908..d2a775acdb 100644 --- a/stepmania/src/ScoreKeeper.h +++ b/stepmania/src/ScoreKeeper.h @@ -49,7 +49,7 @@ public: virtual void OnNextSong( int iSongInCourseIndex, const Steps* pSteps, const NoteData* pNoteData ) = 0; // before a song plays (called multiple times if course) virtual void HandleTapScore( const TapNote &tn ) = 0; - virtual void HandleTapRowScore( const NoteData &nd, int iRow, bool &bComboStopped, bool &bMissComboStopped ) = 0; + virtual void HandleTapRowScore( const NoteData &nd, int iRow ) = 0; virtual void HandleHoldScore( const TapNote &tn ) = 0; protected: diff --git a/stepmania/src/ScoreKeeperNormal.cpp b/stepmania/src/ScoreKeeperNormal.cpp index c3112f755a..4f2552eaf0 100644 --- a/stepmania/src/ScoreKeeperNormal.cpp +++ b/stepmania/src/ScoreKeeperNormal.cpp @@ -350,13 +350,11 @@ void ScoreKeeperNormal::HandleTapScore( const TapNote &tn ) } } -void ScoreKeeperNormal::HandleTapRowScore( const NoteData &nd, int iRow, bool &bComboStopped, bool &bMissComboStopped ) +void ScoreKeeperNormal::HandleTapRowScore( const NoteData &nd, int iRow ) { TapNoteScore scoreOfLastTap; int iNumTapsInRow; - bComboStopped = false; - bMissComboStopped = false; GetScoreOfLastTapInRow( nd, iRow, scoreOfLastTap, iNumTapsInRow ); if( iNumTapsInRow <= 0 ) @@ -378,14 +376,12 @@ void ScoreKeeperNormal::HandleTapRowScore( const NoteData &nd, int iRow, bool &b const int iComboCountIfHit = m_bComboIsPerRow? 1: iNumTapsInRow; if( scoreOfLastTap >= m_MinScoreToMaintainCombo ) { - bMissComboStopped = true; m_pPlayerStageStats->m_iCurMissCombo = 0; if( scoreOfLastTap >= m_MinScoreToContinueCombo ) m_pPlayerStageStats->m_iCurCombo += iComboCountIfHit; } else { - bComboStopped = true; m_pPlayerStageStats->m_iCurCombo = 0; if( scoreOfLastTap == TNS_Miss ) ++m_pPlayerStageStats->m_iCurMissCombo; diff --git a/stepmania/src/ScoreKeeperNormal.h b/stepmania/src/ScoreKeeperNormal.h index 8a386f893a..20b330cc83 100644 --- a/stepmania/src/ScoreKeeperNormal.h +++ b/stepmania/src/ScoreKeeperNormal.h @@ -51,7 +51,7 @@ public: void OnNextSong( int iSongInCourseIndex, const Steps* pSteps, const NoteData* pNoteData ); void HandleTapScore( const TapNote &tn ); - void HandleTapRowScore( const NoteData &nd, int iRow, bool &bComboStopped, bool &bMissComboStopped ); + void HandleTapRowScore( const NoteData &nd, int iRow ); void HandleHoldScore( const TapNote &tn ); // This must be calculated using only cached radar values so that we can diff --git a/stepmania/src/ScoreKeeperRave.cpp b/stepmania/src/ScoreKeeperRave.cpp index 75f7c6c716..2383b788cd 100644 --- a/stepmania/src/ScoreKeeperRave.cpp +++ b/stepmania/src/ScoreKeeperRave.cpp @@ -31,15 +31,12 @@ void ScoreKeeperRave::HandleTapScore( const TapNote &tn ) #define CROSSED( val ) (fOld < val && fNew >= val) #define CROSSED_ATTACK_LEVEL( level ) CROSSED(1.f/NUM_ATTACK_LEVELS*(level+1)) -void ScoreKeeperRave::HandleTapRowScore( const NoteData &nd, int iRow, bool &bComboStopped, bool &bMissComboStopped ) +void ScoreKeeperRave::HandleTapRowScore( const NoteData &nd, int iRow ) { TapNoteScore scoreOfLastTap; int iNumTapsInRow; float fPercentToMove; - bComboStopped = false; - bMissComboStopped = false; - GetScoreOfLastTapInRow( nd, iRow, scoreOfLastTap, iNumTapsInRow ); if( iNumTapsInRow <= 0 ) return; diff --git a/stepmania/src/ScoreKeeperRave.h b/stepmania/src/ScoreKeeperRave.h index 4d6ef82c67..0b122e4f5c 100644 --- a/stepmania/src/ScoreKeeperRave.h +++ b/stepmania/src/ScoreKeeperRave.h @@ -13,7 +13,7 @@ public: ScoreKeeperRave( PlayerState *pPlayerState, PlayerStageStats *pPlayerStageStats ); void OnNextSong( int iSongInCourseIndex, const Steps *pSteps, const NoteData *pNoteData ) { } void HandleTapScore( const TapNote &tn ); - void HandleTapRowScore( const NoteData &nd, int iRow, bool &bComboStopped, bool &bMissComboStopped ); + void HandleTapRowScore( const NoteData &nd, int iRow ); void HandleHoldScore( const TapNote &tn ); protected: