Checking for first second now ignores autokeysounds.

This commit is contained in:
Joe
2016-02-13 22:30:02 +00:00
parent 1ebf75c683
commit 4023544670
2 changed files with 11 additions and 3 deletions
+10 -2
View File
@@ -422,7 +422,7 @@ int NoteData::GetFirstRow() const
for( int t=0; t < GetNumTracks(); t++ )
{
int iRow = -1;
if( !GetNextTapNoteRowForTrack( t, iRow ) )
if( !GetNextTapNoteRowForTrack( t, iRow, true ) )
continue;
if( iEarliestRowFoundSoFar == -1 )
@@ -972,7 +972,7 @@ int NoteData::GetNumTracksHeldAtRow( int row )
return viTracks.size();
}
bool NoteData::GetNextTapNoteRowForTrack( int track, int &rowInOut ) const
bool NoteData::GetNextTapNoteRowForTrack( int track, int &rowInOut, bool ignoreAutoKeysounds ) const
{
const TrackMap &mapTrack = m_TapNotes[track];
@@ -987,6 +987,14 @@ bool NoteData::GetNextTapNoteRowForTrack( int track, int &rowInOut ) const
return false;
ASSERT( iter->first > rowInOut );
// If we want to ignore autokeysounds, keep going until we find a real note.
if(ignoreAutoKeysounds) {
while(iter->second.type == TapNoteType_AutoKeysound) {
iter++;
if(iter==mapTrack.end()) return false;
}
}
rowInOut = iter->first;
return true;
}