Fix Perfects having a base score of 10 instead of 9 when Marvelous is always on (not set to "course only").

Fix OK being worth 3 DP instead of 2 DP when Marvelous is set to "course only" and we're not playing a course.
Add an assert.  Remove old code.
This commit is contained in:
Glenn Maynard
2003-09-22 22:11:18 +00:00
parent 787cebdda7
commit bc31b9ec65
+4 -6
View File
@@ -211,12 +211,11 @@ void ScoreKeeperMAX2::AddScore( TapNoteScore score )
*/ */
int p = 0; // score multiplier int p = 0; // score multiplier
const bool MarvelousEnabled = GAMESTATE->IsCourseMode() && (PREFSMAN->m_iMarvelousTiming > 0);
switch( score ) switch( score )
{ {
case TNS_MARVELOUS: p = 10; break; case TNS_MARVELOUS: p = 10; break;
case TNS_PERFECT: p = MarvelousEnabled? 9:10; break; case TNS_PERFECT: p = GAMESTATE->ShowMarvelous()? 9:10; break;
case TNS_GREAT: p = 5; break; case TNS_GREAT: p = 5; break;
default: p = 0; break; default: p = 0; break;
} }
@@ -227,9 +226,6 @@ void ScoreKeeperMAX2::AddScore( TapNoteScore score )
const int sum = (N * (N + 1)) / 2; const int sum = (N * (N + 1)) / 2;
const int B = m_iMaxPossiblePoints/10; const int B = m_iMaxPossiblePoints/10;
int iScoreMultiplier = (m_iMaxPossiblePoints / (10*sum));
ASSERT( iScoreMultiplier >= 0 );
// What does this do? "Don't use a multiplier if // What does this do? "Don't use a multiplier if
// the player has failed"? // the player has failed"?
if( GAMESTATE->m_CurStageStats.bFailedEarlier[m_PlayerNumber] ) if( GAMESTATE->m_CurStageStats.bFailedEarlier[m_PlayerNumber] )
@@ -264,6 +260,8 @@ void ScoreKeeperMAX2::AddScore( TapNoteScore score )
} }
} }
ASSERT( iScore >= 0 );
/* Undo rounding from the last tap, and re-round. */ /* Undo rounding from the last tap, and re-round. */
iScore += m_iScoreRemainder; iScore += m_iScoreRemainder;
m_iScoreRemainder = (iScore % m_iRoundTo); m_iScoreRemainder = (iScore % m_iRoundTo);
@@ -509,7 +507,7 @@ int ScoreKeeperMAX2::HoldNoteScoreToDancePoints( HoldNoteScore hns )
case PLAY_MODE_ONI: case PLAY_MODE_ONI:
switch( hns ) switch( hns )
{ {
case HNS_OK: return (PREFSMAN->m_iMarvelousTiming != 0)? +3:+2; case HNS_OK: return GAMESTATE->ShowMarvelous()? +3:+2;
case HNS_NG: return +0; case HNS_NG: return +0;
} }
break; break;