add 5th mix bonuses
This commit is contained in:
@@ -59,6 +59,7 @@ ScoreKeeper5th::ScoreKeeper5th( const vector<Steps*>& apNotes_, PlayerNumber pn_
|
||||
m_iCurToastyCombo = 0;
|
||||
m_iMaxScoreSoFar = 0;
|
||||
m_iPointBonus = 0;
|
||||
m_iComboBonus = 0;
|
||||
m_iNumTapsAndHolds = 0;
|
||||
m_bIsLastSongInCourse = false;
|
||||
}
|
||||
@@ -203,8 +204,29 @@ void ScoreKeeper5th::AddScore( TapNoteScore score )
|
||||
case TNS_GREAT: m_iScore += 5; break;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_iScore += GetScore(p, B, sum, m_iTapNotesHit);
|
||||
|
||||
if (!GAMESTATE->IsCourseMode())
|
||||
{
|
||||
// handle combo bonus
|
||||
|
||||
// combo hasn't been updated yet, its one bigger than it really is
|
||||
int m_iCurrentCombo = GAMESTATE->m_CurStageStats.iCurCombo[m_PlayerNumber] + 1;
|
||||
|
||||
switch( score )
|
||||
{
|
||||
case TNS_MARVELOUS:
|
||||
case TNS_PERFECT:
|
||||
m_iComboBonus += 55 * m_iCurrentCombo;
|
||||
break;
|
||||
case TNS_GREAT:
|
||||
m_iComboBonus += 33 * m_iCurrentCombo;
|
||||
}
|
||||
GAMESTATE->m_CurStageStats.iBonus[m_PlayerNumber] = m_iComboBonus;
|
||||
}
|
||||
}
|
||||
|
||||
/* Subtract the maximum this step could have been worth from the bonus. */
|
||||
m_iPointBonus -= GetScore(10, B, sum, m_iTapNotesHit);
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ class ScoreKeeper5th: public ScoreKeeper
|
||||
|
||||
int m_iNumTapsAndHolds;
|
||||
int m_iMaxScoreSoFar; // for nonstop scoring
|
||||
int m_iComboBonus; // 5th-mix combo bonus at end
|
||||
int m_iPointBonus; // the difference to award at the end
|
||||
int m_iCurToastyCombo;
|
||||
bool m_bIsLastSongInCourse;
|
||||
|
||||
@@ -131,6 +131,12 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) : Screen(sCl
|
||||
grade[p] = stageStats.GetGrade( (PlayerNumber)p );
|
||||
else
|
||||
grade[p] = GRADE_E;
|
||||
|
||||
if (PREFSMAN->m_iScoringType == PrefsManager::SCORING_5TH)
|
||||
{
|
||||
int ScoreBonuses[9] = {0, 0, 100, 1000, 10000, 100000, 1000000, 10000000, 10000000};
|
||||
GAMESTATE->m_CurStageStats.iBonus[p] += ScoreBonuses[(int)grade[p] ];
|
||||
}
|
||||
}
|
||||
|
||||
Grade max_grade = GRADE_NO_DATA;
|
||||
@@ -814,6 +820,27 @@ void ScreenEvaluation::Update( float fDeltaTime )
|
||||
{
|
||||
Screen::Update( fDeltaTime );
|
||||
|
||||
for( int p=0; p<NUM_PLAYERS; p++)
|
||||
{
|
||||
if (GAMESTATE->m_CurStageStats.iBonus[p] == 0)
|
||||
continue;
|
||||
|
||||
// wait a few seconds before adding bonus
|
||||
if ( RageTimer::GetTimeSinceStart() - m_fScreenCreateTime < 3.0f)
|
||||
continue;
|
||||
|
||||
int increment = GAMESTATE->m_CurStageStats.iBonus[p]/10;
|
||||
|
||||
if (increment < 1) increment = min(1024, GAMESTATE->m_CurStageStats.iBonus[p]);
|
||||
// if (GAMESTATE->m_CurStageStats.iBonus[p] > 5000000) increment = 499999;
|
||||
|
||||
GAMESTATE->m_CurStageStats.iBonus[p] -= increment;
|
||||
|
||||
GAMESTATE->m_CurStageStats.iScore[p] += increment;
|
||||
|
||||
m_textScore[p].SetText( ssprintf("%*.0i", NUM_SCORE_DIGITS, GAMESTATE->m_CurStageStats.iScore[p]) );
|
||||
}
|
||||
|
||||
/* for( int l=0; l<NUM_JUDGE_LINES; l++ )
|
||||
{
|
||||
if(!SHOW_JUDGMENT(l))
|
||||
|
||||
@@ -35,6 +35,7 @@ struct StageStats
|
||||
int iCurCombo[NUM_PLAYERS];
|
||||
int iMaxCombo[NUM_PLAYERS];
|
||||
int iScore[NUM_PLAYERS];
|
||||
int iBonus[NUM_PLAYERS]; // bonus to be added on screeneval
|
||||
float fRadarPossible[NUM_PLAYERS][NUM_RADAR_CATEGORIES]; // filled in by ScreenGameplay on start of notes
|
||||
float fRadarActual[NUM_PLAYERS][NUM_RADAR_CATEGORIES]; // filled in by ScreenGameplay on start of notes
|
||||
float fSecondsBeforeFail[NUM_PLAYERS]; // -1 means didn't/hasn't failed
|
||||
|
||||
Reference in New Issue
Block a user