Stop some horizontal scrolling.

The actual...insanity will begin soon I think.
This commit is contained in:
Jason Felds
2011-07-13 13:50:44 -04:00
parent 497f460b42
commit 72255a931a
+36 -10
View File
@@ -130,7 +130,8 @@ public:
* @param iEndRow the ending point. * @param iEndRow the ending point.
* @param begin the eventual beginning point of the range. * @param begin the eventual beginning point of the range.
* @param end the eventual end point of the range. */ * @param end the eventual end point of the range. */
void GetTapNoteRange( int iTrack, int iStartRow, int iEndRow, TrackMap::const_iterator &begin, TrackMap::const_iterator &end ) const; void GetTapNoteRange(int iTrack, int iStartRow, int iEndRow,
TrackMap::const_iterator &begin, TrackMap::const_iterator &end ) const;
/** /**
* @brief Return a constant iterator range for [rowBegin,rowEnd). * @brief Return a constant iterator range for [rowBegin,rowEnd).
* @param iTrack the column to use. * @param iTrack the column to use.
@@ -158,13 +159,17 @@ public:
/* Return an iterator range include iStartRow to iEndRow. Extend the range to include /* Return an iterator range include iStartRow to iEndRow. Extend the range to include
* hold notes overlapping the boundary. */ * hold notes overlapping the boundary. */
void GetTapNoteRangeInclusive( int iTrack, int iStartRow, int iEndRow, TrackMap::const_iterator &begin, TrackMap::const_iterator &end, bool bIncludeAdjacent=false ) const; void GetTapNoteRangeInclusive(int iTrack, int iStartRow, int iEndRow,
void GetTapNoteRangeInclusive( int iTrack, int iStartRow, int iEndRow, TrackMap::iterator &begin, TrackMap::iterator &end, bool bIncludeAdjacent=false ); TrackMap::const_iterator &begin, TrackMap::const_iterator &end, bool bIncludeAdjacent=false ) const;
void GetTapNoteRangeInclusive(int iTrack, int iStartRow, int iEndRow,
TrackMap::iterator &begin, TrackMap::iterator &end, bool bIncludeAdjacent=false );
/* Return an iterator range include iStartRow to iEndRow. Shrink the range to exclude /* Return an iterator range include iStartRow to iEndRow. Shrink the range to exclude
* hold notes overlapping the boundary. */ * hold notes overlapping the boundary. */
void GetTapNoteRangeExclusive( int iTrack, int iStartRow, int iEndRow, TrackMap::const_iterator &begin, TrackMap::const_iterator &end ) const; void GetTapNoteRangeExclusive(int iTrack, int iStartRow, int iEndRow,
void GetTapNoteRangeExclusive( int iTrack, int iStartRow, int iEndRow, TrackMap::iterator &begin, TrackMap::iterator &end ); TrackMap::const_iterator &begin, TrackMap::const_iterator &end ) const;
void GetTapNoteRangeExclusive(int iTrack, int iStartRow, int iEndRow,
TrackMap::iterator &begin, TrackMap::iterator &end );
/* Returns the row of the first TapNote on the track that has a row greater than rowInOut. */ /* Returns the row of the first TapNote on the track that has a row greater than rowInOut. */
@@ -175,7 +180,17 @@ public:
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 );
void AddHoldNote( int iTrack, int iStartRow, int iEndRow, TapNote tn ); // add note hold note merging overlapping HoldNotes and destroying TapNotes underneath /**
* @brief Add a hold note, merging other overlapping holds and destroying
* tap notes underneath.
* @param iTrack the column to work with.
* @param iStartRow the starting row.
* @param iEndRow the ending row.
* @param tn the tap note. */
void AddHoldNote(int iTrack,
int iStartRow,
int iEndRow,
TapNote tn );
void ClearRangeForTrack( int rowBegin, int rowEnd, int iTrack ); void ClearRangeForTrack( int rowBegin, int rowEnd, int iTrack );
void ClearRange( int rowBegin, int rowEnd ); void ClearRange( int rowBegin, int rowEnd );
@@ -222,7 +237,10 @@ public:
// 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;
int GetNumJumps( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const { return GetNumRowsWithSimultaneousTaps( 2, iStartIndex, iEndIndex ); } int GetNumJumps( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const
{
return GetNumRowsWithSimultaneousTaps( 2, iStartIndex, iEndIndex );
}
// This row needs at least iMinSimultaneousPresses either tapped or held. // This row needs at least iMinSimultaneousPresses either tapped or held.
bool RowNeedsAtLeastSimultaneousPresses( int iMinSimultaneousPresses, int row ) const; bool RowNeedsAtLeastSimultaneousPresses( int iMinSimultaneousPresses, int row ) const;
@@ -230,15 +248,23 @@ public:
// Count rows that need iMinSimultaneousPresses either tapped or held. // Count rows that need iMinSimultaneousPresses either tapped or held.
int GetNumRowsWithSimultaneousPresses( int iMinSimultaneousPresses, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const; int GetNumRowsWithSimultaneousPresses( int iMinSimultaneousPresses, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
int GetNumHands( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const { return GetNumRowsWithSimultaneousPresses( 3, iStartIndex, iEndIndex ); } int GetNumHands( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const
int GetNumQuads( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const { return GetNumRowsWithSimultaneousPresses( 4, iStartIndex, iEndIndex ); } {
return GetNumRowsWithSimultaneousPresses( 3, iStartIndex, iEndIndex );
}
int GetNumQuads( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const
{
return GetNumRowsWithSimultaneousPresses( 4, iStartIndex, iEndIndex );
}
// and the other notetypes // and the other notetypes
int GetNumLifts( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const; int GetNumLifts( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
int GetNumFakes( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const; int GetNumFakes( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
// Transformations // Transformations
void LoadTransformed( const NoteData& original, int iNewNumTracks, const int iOriginalTrackToTakeFrom[] ); // -1 for iOriginalTracksToTakeFrom means no track void LoadTransformed(const NoteData& original,
int iNewNumTracks,
const int iOriginalTrackToTakeFrom[] ); // -1 for iOriginalTracksToTakeFrom means no track
// XML // XML
XNode* CreateNode() const; XNode* CreateNode() const;