NoteData::GetPrevTapNoteRowForTrack
This commit is contained in:
@@ -788,6 +788,24 @@ bool NoteData::GetNextTapNoteRowForTrack( int track, int &rowInOut ) const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool NoteData::GetPrevTapNoteRowForTrack( int track, int &rowInOut ) const
|
||||||
|
{
|
||||||
|
const TrackMap &mapTrack = m_TapNotes[track];
|
||||||
|
|
||||||
|
/* Find the first note >= rowInOut. */
|
||||||
|
TrackMap::const_iterator iter = mapTrack.lower_bound( rowInOut );
|
||||||
|
|
||||||
|
/* If we're at the beginning, we can't move back any more. */
|
||||||
|
if( iter == mapTrack.begin() )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
/* Move back by one. */
|
||||||
|
--iter;
|
||||||
|
ASSERT( iter->first < rowInOut );
|
||||||
|
rowInOut = iter->first;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool NoteData::GetNextTapNoteRowForAllTracks( int &rowInOut ) const
|
bool NoteData::GetNextTapNoteRowForAllTracks( int &rowInOut ) const
|
||||||
{
|
{
|
||||||
int iClosestNextRow = 999999;
|
int iClosestNextRow = 999999;
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ public:
|
|||||||
// index > afterRow.
|
// index > afterRow.
|
||||||
bool GetNextTapNoteRowForTrack( int track, int &rowInOut ) const;
|
bool GetNextTapNoteRowForTrack( int track, int &rowInOut ) const;
|
||||||
bool GetNextTapNoteRowForAllTracks( int &rowInOut ) const;
|
bool GetNextTapNoteRowForAllTracks( int &rowInOut ) const;
|
||||||
|
bool GetPrevTapNoteRowForTrack( int track, int &rowInOut ) const;
|
||||||
|
|
||||||
void MoveTapNoteTrack( int dest, int src );
|
void MoveTapNoteTrack( int dest, int src );
|
||||||
void SetTapNote( int track, int row, const TapNote& tn );
|
void SetTapNote( int track, int row, const TapNote& tn );
|
||||||
|
|||||||
Reference in New Issue
Block a user