Tweaks to IsRowCompletelyJudged, MinTapNoteScore, and LastTapNoteWithResult to allow them to filter notes by a specific player
This commit is contained in:
@@ -219,7 +219,7 @@ int MinTapNoteScoreTrack( const NoteData &in, unsigned iRow, PlayerNumber pn )
|
||||
|
||||
}
|
||||
|
||||
const TapNote &NoteDataWithScoring::LastTapNoteWithResult( const NoteData &in, unsigned iRow )
|
||||
const TapNote &NoteDataWithScoring::LastTapNoteWithResult( const NoteData &in, unsigned iRow, PlayerNumber plnum )
|
||||
{
|
||||
// Allow this to be configurable between LastTapNoteScoreTrack and
|
||||
// MinTapNoteScore; this change inspired by PumpMania (Zmey, et al) -aj
|
||||
@@ -238,7 +238,7 @@ const TapNote &NoteDataWithScoring::LastTapNoteWithResult( const NoteData &in, u
|
||||
break;
|
||||
}
|
||||
*/
|
||||
int iTrack = LastTapNoteScoreTrack( in, iRow, PLAYER_INVALID );
|
||||
int iTrack = LastTapNoteScoreTrack( in, iRow, plnum );
|
||||
if( iTrack == -1 )
|
||||
return TAP_EMPTY;
|
||||
|
||||
@@ -248,7 +248,7 @@ const TapNote &NoteDataWithScoring::LastTapNoteWithResult( const NoteData &in, u
|
||||
|
||||
/* Return the minimum tap score of a row. If the row isn't complete (not all
|
||||
* taps have been hit), return TNS_None or TNS_Miss. */
|
||||
TapNoteScore NoteDataWithScoring::MinTapNoteScore( const NoteData &in, unsigned row )
|
||||
TapNoteScore NoteDataWithScoring::MinTapNoteScore( const NoteData &in, unsigned row, PlayerNumber plnum )
|
||||
{
|
||||
//LOG->Trace("Hey I'm NoteDataWithScoring::MinTapNoteScore");
|
||||
TapNoteScore score = TNS_W1;
|
||||
@@ -259,7 +259,8 @@ TapNoteScore NoteDataWithScoring::MinTapNoteScore( const NoteData &in, unsigned
|
||||
if (tn.type == TapNote::empty ||
|
||||
tn.type == TapNote::mine ||
|
||||
tn.type == TapNote::fake ||
|
||||
tn.type == TapNote::autoKeysound)
|
||||
tn.type == TapNote::autoKeysound ||
|
||||
( plnum != PlayerNumber_Invalid && tn.pn != plnum ) )
|
||||
continue;
|
||||
score = min( score, tn.result.tns );
|
||||
}
|
||||
@@ -268,9 +269,9 @@ TapNoteScore NoteDataWithScoring::MinTapNoteScore( const NoteData &in, unsigned
|
||||
return score;
|
||||
}
|
||||
|
||||
bool NoteDataWithScoring::IsRowCompletelyJudged( const NoteData &in, unsigned row )
|
||||
bool NoteDataWithScoring::IsRowCompletelyJudged( const NoteData &in, unsigned row, PlayerNumber plnum )
|
||||
{
|
||||
return MinTapNoteScore( in, row ) >= TNS_Miss;
|
||||
return MinTapNoteScore( in, row, plnum ) >= TNS_Miss;
|
||||
}
|
||||
|
||||
namespace
|
||||
|
||||
@@ -16,10 +16,11 @@ namespace NoteDataWithScoring
|
||||
* @brief Has the current row of NoteData been judged completely?
|
||||
* @param in the entire Notedata.
|
||||
* @param iRow the row to check.
|
||||
* @plnum If valid, only consider notes for that PlayerNumber
|
||||
* @return true if it has been completley judged, or false otherwise. */
|
||||
bool IsRowCompletelyJudged( const NoteData &in, unsigned iRow );
|
||||
TapNoteScore MinTapNoteScore( const NoteData &in, unsigned iRow );
|
||||
const TapNote &LastTapNoteWithResult( const NoteData &in, unsigned iRow );
|
||||
bool IsRowCompletelyJudged( const NoteData &in, unsigned iRow, PlayerNumber plnum = PlayerNumber_Invalid );
|
||||
TapNoteScore MinTapNoteScore( const NoteData &in, unsigned iRow, PlayerNumber plnum = PlayerNumber_Invalid );
|
||||
const TapNote &LastTapNoteWithResult( const NoteData &in, unsigned iRow, PlayerNumber plnum = PlayerNumber_Invalid );
|
||||
|
||||
void GetActualRadarValues( const NoteData &in, const PlayerStageStats &pss,
|
||||
float fSongSeconds, RadarValues& out );
|
||||
|
||||
Reference in New Issue
Block a user