add NoteData::GetNumRolls
This commit is contained in:
@@ -556,6 +556,7 @@ int NoteData::GetNumRowsWithSimultaneousTaps( int iMinTaps, int iStartIndex, int
|
|||||||
return iNum;
|
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 NoteData::GetNumHoldNotes( int iStartIndex, int iEndIndex ) const
|
||||||
{
|
{
|
||||||
int iNumHolds = 0;
|
int iNumHolds = 0;
|
||||||
@@ -573,6 +574,24 @@ int NoteData::GetNumHoldNotes( int iStartIndex, int iEndIndex ) const
|
|||||||
return iNumHolds;
|
return iNumHolds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int NoteData::GetNumRolls( int iStartIndex, int iEndIndex ) const
|
||||||
|
{
|
||||||
|
int iNumRolls = 0;
|
||||||
|
for( int t=0; t<GetNumTracks(); ++t )
|
||||||
|
{
|
||||||
|
const_iterator begin, end;
|
||||||
|
GetTapNoteRangeExclusive( t, iStartIndex, iEndIndex, begin, end );
|
||||||
|
for( ; begin != end; ++begin )
|
||||||
|
{
|
||||||
|
if( begin->second.type != TapNote::hold_head ||
|
||||||
|
begin->second.subType != TapNote::hold_head_roll )
|
||||||
|
continue;
|
||||||
|
iNumRolls++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return iNumRolls;
|
||||||
|
}
|
||||||
|
|
||||||
// -1 for iOriginalTracksToTakeFrom means no track
|
// -1 for iOriginalTracksToTakeFrom means no track
|
||||||
void NoteData::LoadTransformed( const NoteData& in, int iNewNumTracks, const int iOriginalTrackToTakeFrom[] )
|
void NoteData::LoadTransformed( const NoteData& in, int iNewNumTracks, const int iOriginalTrackToTakeFrom[] )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -134,6 +134,7 @@ public:
|
|||||||
int GetNumRowsWithTapOrHoldHead( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
|
int GetNumRowsWithTapOrHoldHead( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
|
||||||
/* optimization: for the default of start to end, use the second (faster) */
|
/* optimization: for the default of start to end, use the second (faster) */
|
||||||
int GetNumHoldNotes( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
|
int GetNumHoldNotes( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
|
||||||
|
int GetNumRolls( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
|
||||||
|
|
||||||
// Count rows that contain iMinTaps or more taps.
|
// Count rows that contain iMinTaps or more taps.
|
||||||
int GetNumRowsWithSimultaneousTaps( int iMinTaps, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
|
int GetNumRowsWithSimultaneousTaps( int iMinTaps, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
|
||||||
|
|||||||
Reference in New Issue
Block a user