From d4df3a14310989e604a24801c1c067a7aa0e899d Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Wed, 13 Apr 2005 04:08:51 +0000 Subject: [PATCH] fix successful jumps miscalculation: Player used "latest tap note score". Scoring used "min tap note score". --- stepmania/src/GameConstantsAndTypes.h | 1 + stepmania/src/NoteDataWithScoring.cpp | 23 +++++++---------------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/stepmania/src/GameConstantsAndTypes.h b/stepmania/src/GameConstantsAndTypes.h index f2f1daa84f..b517e6f810 100644 --- a/stepmania/src/GameConstantsAndTypes.h +++ b/stepmania/src/GameConstantsAndTypes.h @@ -136,6 +136,7 @@ enum TapNoteScore { TNS_PERFECT, TNS_MARVELOUS, NUM_TAP_NOTE_SCORES, + TNS_INVALID, }; #define FOREACH_TapNoteScore( tns ) FOREACH_ENUM( TapNoteScore, NUM_TAP_NOTE_SCORES, tns ) const CString& TapNoteScoreToString( TapNoteScore tns ); diff --git a/stepmania/src/NoteDataWithScoring.cpp b/stepmania/src/NoteDataWithScoring.cpp index 6797af5e41..37926ac827 100644 --- a/stepmania/src/NoteDataWithScoring.cpp +++ b/stepmania/src/NoteDataWithScoring.cpp @@ -3,6 +3,7 @@ #include "NoteData.h" #include "StageStats.h" #include "StatsManager.h" +#include namespace { @@ -23,25 +24,15 @@ int GetNumTapNotesWithScore( const NoteData &in, TapNoteScore tns, int iStartInd return iNumSuccessfulTapNotes; } -int GetNumNWithScore( const NoteData &in, TapNoteScore tns, int MinTaps, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) +int GetNumNWithScore( const NoteData &in, TapNoteScore tns, int MinTaps, int iStartRow = 0, int iEndRow = MAX_NOTE_ROW ) { int iNumSuccessfulDoubles = 0; - FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE( in, i, iStartIndex, iEndIndex ) + FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE( in, r, iStartRow, iEndRow ) { - int iNumNotesThisIndex = 0; - TapNoteScore minTapNoteScore = TNS_MARVELOUS; - for( int t=0; t= MinTaps && minTapNoteScore >= tns ) + int iNumNotesInRow = in.GetNumTracksWithTapOrHoldHead( r ); + TapNoteScore tnsRow = NoteDataWithScoring::LastTapNoteScore( in, r ); + + if( iNumNotesInRow >= MinTaps && tnsRow >= tns ) iNumSuccessfulDoubles++; }