Factor out common code.
...how many more TapNotes can we squeeze in here anyway?
This commit is contained in:
+9
-10
@@ -929,28 +929,27 @@ void NoteDataUtil::RemoveQuads( NoteData &inout, int iStartIndex, int iEndIndex
|
|||||||
RemoveSimultaneousNotes( inout, 3, iStartIndex, iEndIndex );
|
RemoveSimultaneousNotes( inout, 3, iStartIndex, iEndIndex );
|
||||||
}
|
}
|
||||||
|
|
||||||
void NoteDataUtil::RemoveMines( NoteData &inout, int iStartIndex, int iEndIndex )
|
void NoteDataUtil::RemoveSpecificTapNotes( NoteData &inout, TapNote::Type tn, int iStartIndex, int iEndIndex )
|
||||||
{
|
{
|
||||||
for( int t=0; t<inout.GetNumTracks(); t++ )
|
for( int t=0; t<inout.GetNumTracks(); t++ )
|
||||||
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( inout, t, r, iStartIndex, iEndIndex )
|
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( inout, t, r, iStartIndex, iEndIndex )
|
||||||
if( inout.GetTapNote(t,r).type == TapNote::mine )
|
if( inout.GetTapNote(t,r).type == tn )
|
||||||
inout.SetTapNote( t, r, TAP_EMPTY );
|
inout.SetTapNote( t, r, TAP_EMPTY );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void NoteDataUtil::RemoveMines( NoteData &inout, int iStartIndex, int iEndIndex )
|
||||||
|
{
|
||||||
|
RemoveSpecificTapNotes( inout, TapNote::mine, iStartIndex, iEndIndex );
|
||||||
|
}
|
||||||
|
|
||||||
void NoteDataUtil::RemoveLifts( NoteData &inout, int iStartIndex, int iEndIndex )
|
void NoteDataUtil::RemoveLifts( NoteData &inout, int iStartIndex, int iEndIndex )
|
||||||
{
|
{
|
||||||
for( int t=0; t<inout.GetNumTracks(); t++ )
|
RemoveSpecificTapNotes( inout, TapNote::lift, iStartIndex, iEndIndex );
|
||||||
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( inout, t, r, iStartIndex, iEndIndex )
|
|
||||||
if( inout.GetTapNote(t,r).type == TapNote::lift )
|
|
||||||
inout.SetTapNote( t, r, TAP_EMPTY );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NoteDataUtil::RemoveFakes( NoteData &inout, int iStartIndex, int iEndIndex )
|
void NoteDataUtil::RemoveFakes( NoteData &inout, int iStartIndex, int iEndIndex )
|
||||||
{
|
{
|
||||||
for( int t=0; t<inout.GetNumTracks(); t++ )
|
RemoveSpecificTapNotes( inout, TapNote::fake, iStartIndex, iEndIndex );
|
||||||
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( inout, t, r, iStartIndex, iEndIndex )
|
|
||||||
if( inout.GetTapNote(t,r).type == TapNote::fake )
|
|
||||||
inout.SetTapNote( t, r, TAP_EMPTY );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NoteDataUtil::RemoveAllButOneTap( NoteData &inout, int row )
|
void NoteDataUtil::RemoveAllButOneTap( NoteData &inout, int row )
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ namespace NoteDataUtil
|
|||||||
void RemoveJumps( NoteData &inout, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW );
|
void RemoveJumps( NoteData &inout, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW );
|
||||||
void RemoveHands( NoteData &inout, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW );
|
void RemoveHands( NoteData &inout, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW );
|
||||||
void RemoveQuads( NoteData &inout, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW );
|
void RemoveQuads( NoteData &inout, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW );
|
||||||
|
void RemoveSpecificTapNotes( NoteData &inout, TapNote::Type tn, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW );
|
||||||
void RemoveMines( NoteData &inout, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW );
|
void RemoveMines( NoteData &inout, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW );
|
||||||
void RemoveLifts( NoteData &inout, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW );
|
void RemoveLifts( NoteData &inout, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW );
|
||||||
void RemoveFakes( NoteData &inout, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW );
|
void RemoveFakes( NoteData &inout, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW );
|
||||||
|
|||||||
Reference in New Issue
Block a user