Remove more duplicated code. Why was over 550 lines of code
copied and pasted? Maintenance nightmare ...
This commit is contained in:
@@ -31,6 +31,8 @@
|
||||
#include "PlayerAI.h"
|
||||
#include "NoteFieldPositioning.h"
|
||||
#include "NoteDataUtil.h"
|
||||
#include "ScreenGameplay.h" /* for SM_ComboStopped */
|
||||
#include "ScreenManager.h"
|
||||
|
||||
CachedThemeMetricF GRAY_ARROWS_Y_STANDARD ("Player","GrayArrowsYStandard");
|
||||
CachedThemeMetricF GRAY_ARROWS_Y_REVERSE ("Player","GrayArrowsYReverse");
|
||||
@@ -825,6 +827,23 @@ void PlayerMinus::HandleTapRowScore( unsigned row )
|
||||
if(m_pSecondaryScoreKeeper)
|
||||
m_pSecondaryScoreKeeper->HandleTapRowScore(scoreOfLastTap, iNumTapsInRow, iNumAdditions );
|
||||
|
||||
|
||||
int &iCurCombo = GAMESTATE->m_CurStageStats.iCurCombo[m_PlayerNumber];
|
||||
switch( scoreOfLastTap )
|
||||
{
|
||||
case TNS_GOOD:
|
||||
case TNS_BOO:
|
||||
case TNS_MISS:
|
||||
if( iCurCombo > 50 )
|
||||
SCREENMAN->PostMessageToTopScreen( SM_ComboStopped, 0 );
|
||||
|
||||
iCurCombo = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
// new max combo
|
||||
GAMESTATE->m_CurStageStats.iMaxCombo[m_PlayerNumber] = max(GAMESTATE->m_CurStageStats.iMaxCombo[m_PlayerNumber], iCurCombo);
|
||||
|
||||
if (m_pScore)
|
||||
m_pScore->SetScore(GAMESTATE->m_CurStageStats.iScore[m_PlayerNumber]);
|
||||
|
||||
|
||||
@@ -416,22 +416,6 @@ void ScoreKeeper5th::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTap
|
||||
SCREENMAN->PostMessageToTopScreen( SM_900Combo, 0 );
|
||||
else if( CROSSED(1000))
|
||||
SCREENMAN->PostMessageToTopScreen( SM_1000Combo, 0 );
|
||||
|
||||
// new max combo
|
||||
GAMESTATE->m_CurStageStats.iMaxCombo[m_PlayerNumber] = max(GAMESTATE->m_CurStageStats.iMaxCombo[m_PlayerNumber], iCurCombo);
|
||||
|
||||
|
||||
switch( scoreOfLastTap )
|
||||
{
|
||||
case TNS_GOOD:
|
||||
case TNS_BOO:
|
||||
case TNS_MISS:
|
||||
if( iCurCombo>50 )
|
||||
SCREENMAN->PostMessageToTopScreen( SM_ComboStopped, 0 );
|
||||
|
||||
iCurCombo = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -393,22 +393,6 @@ void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTa
|
||||
SCREENMAN->PostMessageToTopScreen( SM_1000Combo, 0 );
|
||||
else if( (iOldCombo / 100) < (iCurCombo / 100) && iCurCombo > 1000 )
|
||||
SCREENMAN->PostMessageToTopScreen( SM_ComboContinuing, 0 );
|
||||
|
||||
// new max combo
|
||||
GAMESTATE->m_CurStageStats.iMaxCombo[m_PlayerNumber] = max(GAMESTATE->m_CurStageStats.iMaxCombo[m_PlayerNumber], iCurCombo);
|
||||
|
||||
|
||||
switch( scoreOfLastTap )
|
||||
{
|
||||
case TNS_GOOD:
|
||||
case TNS_BOO:
|
||||
case TNS_MISS:
|
||||
if( iCurCombo>50 )
|
||||
SCREENMAN->PostMessageToTopScreen( SM_ComboStopped, 0 );
|
||||
|
||||
iCurCombo = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user