diff --git a/stepmania/src/GameConstantsAndTypes.h b/stepmania/src/GameConstantsAndTypes.h index 6069f62ea6..9fcf7f0d40 100644 --- a/stepmania/src/GameConstantsAndTypes.h +++ b/stepmania/src/GameConstantsAndTypes.h @@ -171,8 +171,8 @@ TapNoteScore StringToTapNoteScore( const CString& str ); enum HoldNoteScore { HNS_NONE, // this HoldNote has not been scored yet - HNS_OK, // the HoldNote has passed and was successfully held all the way through HNS_NG, // the HoldNote has passed and they missed it + HNS_OK, // the HoldNote has passed and was successfully held all the way through NUM_HOLD_NOTE_SCORES }; #define FOREACH_HoldNoteScore( hns ) FOREACH_ENUM( HoldNoteScore, NUM_HOLD_NOTE_SCORES, hns ) diff --git a/stepmania/src/StageStats.cpp b/stepmania/src/StageStats.cpp index 3fb8d0b989..ed358f0a5b 100644 --- a/stepmania/src/StageStats.cpp +++ b/stepmania/src/StageStats.cpp @@ -148,14 +148,13 @@ Grade StageStats::GetGrade( PlayerNumber pn ) const }; float Possible = 0, Actual = 0; - int i; - for( i = 0; i < NUM_TAP_NOTE_SCORES; ++i ) + FOREACH_TapNoteScore( i ) { Actual += iTapNoteScores[pn][i] * TapScoreValues[i]; Possible += iTapNoteScores[pn][i] * TapScoreValues[TNS_MARVELOUS]; } - for( i = HNS_OK; i < NUM_HOLD_NOTE_SCORES; ++i ) + FOREACH_HoldNoteScore( i ) { Actual += iHoldNoteScores[pn][i] * HoldScoreValues[i]; Possible += iHoldNoteScores[pn][i] * HoldScoreValues[HNS_OK];