rename iMaxScoreToNow -> iCurMaxScore, to look like iCurCombo, iCurMissCombo

This commit is contained in:
Glenn Maynard
2005-01-10 15:26:21 +00:00
parent c7c28b9aea
commit faa835f980
4 changed files with 11 additions and 11 deletions
+4 -4
View File
@@ -59,18 +59,18 @@ void ScoreDisplayNormal::SetScore( int iNewScore )
if( m_pPlayerState->m_CurrentPlayerOptions.m_ScoreDisplay == PlayerOptions::SCORING_SUBTRACT ) if( m_pPlayerState->m_CurrentPlayerOptions.m_ScoreDisplay == PlayerOptions::SCORING_SUBTRACT )
{ {
if( iNewScore == 0 && g_CurStageStats.m_player[pn].iMaxScoreToNow == 0 ) if( iNewScore == 0 && g_CurStageStats.m_player[pn].iCurMaxScore == 0 )
m_iScore = g_CurStageStats.m_player[pn].iMaxScore; m_iScore = g_CurStageStats.m_player[pn].iMaxScore;
else else
m_iScore = g_CurStageStats.m_player[pn].iMaxScore - ( g_CurStageStats.m_player[pn].iMaxScoreToNow - iNewScore ); m_iScore = g_CurStageStats.m_player[pn].iMaxScore - ( g_CurStageStats.m_player[pn].iCurMaxScore - iNewScore );
} }
else if( m_pPlayerState->m_CurrentPlayerOptions.m_ScoreDisplay == PlayerOptions::SCORING_AVERAGE ) else if( m_pPlayerState->m_CurrentPlayerOptions.m_ScoreDisplay == PlayerOptions::SCORING_AVERAGE )
{ {
if( g_CurStageStats.m_player[pn].iMaxScoreToNow == 0 ) // don't divide by zero fats if( g_CurStageStats.m_player[pn].iCurMaxScore == 0 ) // don't divide by zero fats
m_iScore = 0; m_iScore = 0;
else else
{ {
float scoreRatio = (float) iNewScore / (float) g_CurStageStats.m_player[pn].iMaxScoreToNow; float scoreRatio = (float) iNewScore / (float) g_CurStageStats.m_player[pn].iCurMaxScore;
m_iScore = (int) ( scoreRatio * g_CurStageStats.m_player[pn].iMaxScore ); m_iScore = (int) ( scoreRatio * g_CurStageStats.m_player[pn].iMaxScore );
} }
} }
+4 -4
View File
@@ -207,7 +207,7 @@ static int GetScore(int p, int B, int S, int n)
void ScoreKeeperMAX2::AddScore( TapNoteScore score ) void ScoreKeeperMAX2::AddScore( TapNoteScore score )
{ {
int &iScore = m_pPlayerStageStats->iScore; int &iScore = m_pPlayerStageStats->iScore;
int &iMaxScoreToNow = m_pPlayerStageStats->iMaxScoreToNow; int &iCurMaxScore = m_pPlayerStageStats->iCurMaxScore;
/* /*
http://www.aaroninjapan.com/ddr2.html http://www.aaroninjapan.com/ddr2.html
@@ -287,7 +287,7 @@ void ScoreKeeperMAX2::AddScore( TapNoteScore score )
/* Subtract the maximum this step could have been worth from the bonus. */ /* Subtract the maximum this step could have been worth from the bonus. */
m_iPointBonus -= GetScore(10, B, sum, m_iTapNotesHit); m_iPointBonus -= GetScore(10, B, sum, m_iTapNotesHit);
/* And add the maximum this step could have been worth to the max score up to now. */ /* And add the maximum this step could have been worth to the max score up to now. */
iMaxScoreToNow += GetScore(10, B, sum, m_iTapNotesHit); iCurMaxScore += GetScore(10, B, sum, m_iTapNotesHit);
if ( m_iTapNotesHit == m_iNumTapsAndHolds && score >= TNS_PERFECT ) if ( m_iTapNotesHit == m_iNumTapsAndHolds && score >= TNS_PERFECT )
{ {
@@ -296,13 +296,13 @@ void ScoreKeeperMAX2::AddScore( TapNoteScore score )
if ( m_bIsLastSongInCourse ) if ( m_bIsLastSongInCourse )
{ {
iScore += 100000000 - m_iMaxScoreSoFar; iScore += 100000000 - m_iMaxScoreSoFar;
iMaxScoreToNow += 100000000 - m_iMaxScoreSoFar; iCurMaxScore += 100000000 - m_iMaxScoreSoFar;
/* If we're in Endless mode, we'll come around here again, so reset /* If we're in Endless mode, we'll come around here again, so reset
* the bonus counter. */ * the bonus counter. */
m_iMaxScoreSoFar = 0; m_iMaxScoreSoFar = 0;
} }
iMaxScoreToNow += m_iPointBonus; iCurMaxScore += m_iPointBonus;
} }
ASSERT( iScore >= 0 ); ASSERT( iScore >= 0 );
+2 -2
View File
@@ -18,7 +18,7 @@ void PlayerStageStats::Init()
fAliveSeconds = 0; fAliveSeconds = 0;
bFailed = bFailedEarlier = false; bFailed = bFailedEarlier = false;
iPossibleDancePoints = iActualDancePoints = 0; iPossibleDancePoints = iActualDancePoints = 0;
iCurCombo = iMaxCombo = iCurMissCombo = iScore = iBonus = iMaxScore = iMaxScoreToNow = 0; iCurCombo = iMaxCombo = iCurMissCombo = iScore = iBonus = iMaxScore = iCurMaxScore = 0;
fSecondsBeforeFail = 0; fSecondsBeforeFail = 0;
iSongsPassed = iSongsPlayed = 0; iSongsPassed = iSongsPlayed = 0;
iTotalError = 0; iTotalError = 0;
@@ -51,7 +51,7 @@ void PlayerStageStats::AddStats( const PlayerStageStats& other )
iCurMissCombo += other.iCurMissCombo; iCurMissCombo += other.iCurMissCombo;
iScore += other.iScore; iScore += other.iScore;
iMaxScore += other.iMaxScore; iMaxScore += other.iMaxScore;
iMaxScoreToNow += other.iMaxScoreToNow; iCurMaxScore += other.iCurMaxScore;
radarPossible += other.radarPossible; radarPossible += other.radarPossible;
radarActual += other.radarActual; radarActual += other.radarActual;
fSecondsBeforeFail += other.fSecondsBeforeFail; fSecondsBeforeFail += other.fSecondsBeforeFail;
+1 -1
View File
@@ -40,7 +40,7 @@ struct PlayerStageStats
int iMaxCombo; int iMaxCombo;
int iCurMissCombo; int iCurMissCombo;
int iScore; int iScore;
int iMaxScoreToNow; int iCurMaxScore;
int iMaxScore; int iMaxScore;
int iBonus; // bonus to be added on screeneval int iBonus; // bonus to be added on screeneval
RadarValues radarPossible; // filled in by ScreenGameplay on start of notes RadarValues radarPossible; // filled in by ScreenGameplay on start of notes