From c36df0225457b77352332f8deeef8b829ee2f1e0 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Mon, 9 May 2005 06:15:59 +0000 Subject: [PATCH] add rolls to eval and scoring --- stepmania/src/NoteData.cpp | 4 ++-- stepmania/src/NoteDataWithScoring.cpp | 6 +----- stepmania/src/ScoreKeeperMAX2.cpp | 7 +++++-- stepmania/src/ScreenEvaluation.cpp | 4 ++-- stepmania/src/ScreenEvaluation.h | 2 +- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/stepmania/src/NoteData.cpp b/stepmania/src/NoteData.cpp index b547a6ce0d..390df26af7 100644 --- a/stepmania/src/NoteData.cpp +++ b/stepmania/src/NoteData.cpp @@ -556,7 +556,6 @@ int NoteData::GetNumRowsWithSimultaneousTaps( int iMinTaps, int iStartIndex, int return iNum; } -// XXX: This shouldn't include rolls, but need to check how that would impact scoring ... int NoteData::GetNumHoldNotes( int iStartIndex, int iEndIndex ) const { int iNumHolds = 0; @@ -566,7 +565,8 @@ int NoteData::GetNumHoldNotes( int iStartIndex, int iEndIndex ) const GetTapNoteRangeExclusive( t, iStartIndex, iEndIndex, begin, end ); for( ; begin != end; ++begin ) { - if( begin->second.type != TapNote::hold_head ) + if( begin->second.type != TapNote::hold_head || + begin->second.subType != TapNote::hold_head_hold ) continue; iNumHolds++; } diff --git a/stepmania/src/NoteDataWithScoring.cpp b/stepmania/src/NoteDataWithScoring.cpp index d7a143da1e..f9beb8c021 100644 --- a/stepmania/src/NoteDataWithScoring.cpp +++ b/stepmania/src/NoteDataWithScoring.cpp @@ -270,11 +270,7 @@ void NoteDataWithScoring::GetActualRadarValues( const NoteData &in, PlayerNumber case RADAR_CHAOS: out[rc] = GetActualChaosRadarValue( in, fSongSeconds, pn ); break; case RADAR_NUM_TAPS_AND_HOLDS: out[rc] = (float) GetNumNWithScore( in, TNS_GOOD, 1 ); break; case RADAR_NUM_JUMPS: out[rc] = (float) GetNumNWithScore( in, TNS_GOOD, 2 ); break; - // XXX: This should be hold_head_hold, but that'll affect scoring. - case RADAR_NUM_HOLDS: out[rc] = (float) - GetNumHoldNotesWithScore( in, TapNote::hold_head_hold, HNS_OK ) + - GetNumHoldNotesWithScore( in, TapNote::hold_head_roll, HNS_OK ); - break; + case RADAR_NUM_HOLDS: out[rc] = (float) GetNumHoldNotesWithScore( in, TapNote::hold_head_hold, HNS_OK ); break; case RADAR_NUM_MINES: out[rc] = (float) GetSuccessfulMines( in ); break; case RADAR_NUM_HANDS: out[rc] = (float) GetSuccessfulHands( in ); break; case RADAR_NUM_ROLLS: out[rc] = (float) GetNumHoldNotesWithScore( in, TapNote::hold_head_roll, HNS_OK ); break; diff --git a/stepmania/src/ScoreKeeperMAX2.cpp b/stepmania/src/ScoreKeeperMAX2.cpp index f63c19c7b4..5b5f31a6e5 100644 --- a/stepmania/src/ScoreKeeperMAX2.cpp +++ b/stepmania/src/ScoreKeeperMAX2.cpp @@ -456,8 +456,11 @@ int ScoreKeeperMAX2::GetPossibleDancePoints( const RadarValues& radars ) int NumTaps = int(radars[RADAR_NUM_TAPS_AND_HOLDS]); int NumHolds = int(radars[RADAR_NUM_HOLDS]); - return NumTaps*TapNoteScoreToDancePoints(TNS_MARVELOUS)+ - NumHolds*HoldNoteScoreToDancePoints(HNS_OK); + int NumRolls = int(radars[RADAR_NUM_ROLLS]); + return + NumTaps*TapNoteScoreToDancePoints(TNS_MARVELOUS)+ + NumHolds*HoldNoteScoreToDancePoints(HNS_OK) + + NumRolls*HoldNoteScoreToDancePoints(HNS_OK); } int ScoreKeeperMAX2::GetPossibleDancePoints( const RadarValues& fOriginalRadars, const RadarValues& fPostRadars ) diff --git a/stepmania/src/ScreenEvaluation.cpp b/stepmania/src/ScreenEvaluation.cpp index 537da25c1d..b5d60e7e3f 100644 --- a/stepmania/src/ScreenEvaluation.cpp +++ b/stepmania/src/ScreenEvaluation.cpp @@ -44,7 +44,7 @@ const char* JUDGE_STRING[NUM_JUDGE_LINES] = }; const char* STATS_STRING[NUM_STATS_LINES] = { - "Jumps", "Holds", "Mines", "Hands" + "Jumps", "Holds", "Mines", "Hands", "Rolls", }; #define SPIN_GRADES THEME->GetMetricB(m_sName,"SpinGrades") @@ -660,7 +660,7 @@ void ScreenEvaluation::Init() const int indeces[NUM_STATS_LINES] = { - RADAR_NUM_JUMPS, RADAR_NUM_HOLDS, RADAR_NUM_MINES, RADAR_NUM_HANDS + RADAR_NUM_JUMPS, RADAR_NUM_HOLDS, RADAR_NUM_MINES, RADAR_NUM_HANDS, RADAR_NUM_ROLLS }; const int ind = indeces[l]; const int iActual = (int) roundf(stageStats.m_player[p].radarActual[ind]); diff --git a/stepmania/src/ScreenEvaluation.h b/stepmania/src/ScreenEvaluation.h index 97861f2f53..5108f7845d 100644 --- a/stepmania/src/ScreenEvaluation.h +++ b/stepmania/src/ScreenEvaluation.h @@ -21,7 +21,7 @@ const int MAX_SONGS_TO_SHOW = 5; // In summary, we show last 3 stages, plus extra stages if passed enum JudgeLine { marvelous, perfect, great, good, boo, miss, ok, max_combo, error, NUM_JUDGE_LINES }; -enum StatsLine { jumps, holds, mines, hands, NUM_STATS_LINES }; +enum StatsLine { jumps, holds, mines, hands, rolls, NUM_STATS_LINES }; // sound sequences for the evaluation screen struct EvalSoundSequence