Change this interface to return the tap note itself, rather than just the result.
This commit is contained in:
@@ -28,7 +28,7 @@ int GetNumNWithScore( const NoteData &in, TapNoteScore tns, int MinTaps, int iSt
|
|||||||
FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE( in, r, iStartRow, iEndRow )
|
FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE( in, r, iStartRow, iEndRow )
|
||||||
{
|
{
|
||||||
int iNumNotesInRow = in.GetNumTracksWithTapOrHoldHead( r );
|
int iNumNotesInRow = in.GetNumTracksWithTapOrHoldHead( r );
|
||||||
TapNoteScore tnsRow = NoteDataWithScoring::LastTapNoteResult( in, r ).tns;
|
TapNoteScore tnsRow = NoteDataWithScoring::LastTapNoteWithResult( in, r ).result.tns;
|
||||||
|
|
||||||
if( iNumNotesInRow >= MinTaps && tnsRow >= tns )
|
if( iNumNotesInRow >= MinTaps && tnsRow >= tns )
|
||||||
iNumSuccessfulDoubles++;
|
iNumSuccessfulDoubles++;
|
||||||
@@ -157,12 +157,12 @@ int LastTapNoteScoreTrack( const NoteData &in, unsigned iRow )
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TapNoteResult NoteDataWithScoring::LastTapNoteResult( const NoteData &in, unsigned iRow )
|
const TapNote &NoteDataWithScoring::LastTapNoteWithResult( const NoteData &in, unsigned iRow )
|
||||||
{
|
{
|
||||||
int iTrack = LastTapNoteScoreTrack( in, iRow );
|
int iTrack = LastTapNoteScoreTrack( in, iRow );
|
||||||
if( iTrack == -1 )
|
if( iTrack == -1 )
|
||||||
return TapNoteResult();
|
return TAP_EMPTY;
|
||||||
return in.GetTapNote(iTrack, iRow).result;
|
return in.GetTapNote( iTrack, iRow );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace NoteDataWithScoring
|
|||||||
{
|
{
|
||||||
bool IsRowCompletelyJudged( const NoteData &in, unsigned iRow );
|
bool IsRowCompletelyJudged( const NoteData &in, unsigned iRow );
|
||||||
TapNoteScore MinTapNoteScore( const NoteData &in, unsigned iRow );
|
TapNoteScore MinTapNoteScore( const NoteData &in, unsigned iRow );
|
||||||
TapNoteResult LastTapNoteResult( const NoteData &in, unsigned iRow );
|
const TapNote &LastTapNoteWithResult( const NoteData &in, unsigned iRow );
|
||||||
|
|
||||||
void GetActualRadarValues( const NoteData &in, const PlayerStageStats &pss, float fSongSeconds, RadarValues& out );
|
void GetActualRadarValues( const NoteData &in, const PlayerStageStats &pss, float fSongSeconds, RadarValues& out );
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1362,7 +1362,7 @@ void Player::OnRowCompletelyJudged( int iIndexThatWasSteppedOn )
|
|||||||
|
|
||||||
if( !pCurGame->m_bCountNotesSeparately )
|
if( !pCurGame->m_bCountNotesSeparately )
|
||||||
{
|
{
|
||||||
TapNoteResult tnr = NoteDataWithScoring::LastTapNoteResult( m_NoteData, iIndexThatWasSteppedOn );
|
TapNoteResult tnr = NoteDataWithScoring::LastTapNoteWithResult( m_NoteData, iIndexThatWasSteppedOn ).result;
|
||||||
TapNoteScore score = tnr.tns;
|
TapNoteScore score = tnr.tns;
|
||||||
|
|
||||||
ASSERT(score != TNS_None);
|
ASSERT(score != TNS_None);
|
||||||
@@ -1569,7 +1569,7 @@ void Player::RandomizeNotes( int iNoteRow )
|
|||||||
|
|
||||||
void Player::HandleTapRowScore( unsigned row )
|
void Player::HandleTapRowScore( unsigned row )
|
||||||
{
|
{
|
||||||
TapNoteScore scoreOfLastTap = NoteDataWithScoring::LastTapNoteResult( m_NoteData, row ).tns;
|
TapNoteScore scoreOfLastTap = NoteDataWithScoring::LastTapNoteWithResult( m_NoteData, row ).result.tns;
|
||||||
int iNumTapsInRow = m_NoteData.GetNumTracksWithTapOrHoldHead(row);
|
int iNumTapsInRow = m_NoteData.GetNumTracksWithTapOrHoldHead(row);
|
||||||
ASSERT_M( iNumTapsInRow > 0, ssprintf("%d, %u",iNumTapsInRow,row) );
|
ASSERT_M( iNumTapsInRow > 0, ssprintf("%d, %u",iNumTapsInRow,row) );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user