implement GetPrevTapNoteRowForAllTracks
This commit is contained in:
@@ -837,6 +837,32 @@ bool NoteData::GetNextTapNoteRowForAllTracks( int &rowInOut ) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool NoteData::GetPrevTapNoteRowForAllTracks( int &rowInOut ) const
|
||||||
|
{
|
||||||
|
int iClosestPrevRow = 0;
|
||||||
|
bool bAnyHavePrevNote = false;
|
||||||
|
for( int t=0; t<GetNumTracks(); t++ )
|
||||||
|
{
|
||||||
|
int iNewRowThisTrack = rowInOut;
|
||||||
|
if( GetPrevTapNoteRowForTrack( t, iNewRowThisTrack ) )
|
||||||
|
{
|
||||||
|
bAnyHavePrevNote = true;
|
||||||
|
ASSERT( iNewRowThisTrack < MAX_NOTE_ROW );
|
||||||
|
iClosestPrevRow = max( iClosestPrevRow, iNewRowThisTrack );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if( bAnyHavePrevNote )
|
||||||
|
{
|
||||||
|
rowInOut = iClosestPrevRow;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (c) 2001-2004 Chris Danford, Glenn Maynard
|
* (c) 2001-2004 Chris Danford, Glenn Maynard
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ public:
|
|||||||
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;
|
bool GetPrevTapNoteRowForTrack( int track, int &rowInOut ) const;
|
||||||
|
bool GetPrevTapNoteRowForAllTracks( 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