Removes all tap notes except for those with PLAYER_INVALID and those matching that player.

This commit is contained in:
Steve Checkoway
2006-07-09 20:11:46 +00:00
parent e830771ad9
commit 025997d453
2 changed files with 18 additions and 0 deletions
+17
View File
@@ -893,6 +893,23 @@ void NoteDataUtil::RemoveAllButOneTap( NoteData &inout, int row )
}
}
void NoteDataUtil::RemoveAllButPlayer( NoteData &inout, PlayerNumber pn )
{
for( int track = 0; track < inout.GetNumTracks(); ++track )
{
NoteData::iterator i = inout.begin( track );
while( i != inout.end(track) )
{
if( i->second.pn != pn && i->second.pn != PLAYER_INVALID )
inout.RemoveTapNote( track, i++ );
else
++i;
}
}
}
static void GetTrackMapping( StepsType st, NoteDataUtil::TrackMapping tt, int NumTracks, int *iTakeFromTrack )
{
// Identity transform for cases not handled below.
+1
View File
@@ -47,6 +47,7 @@ namespace NoteDataUtil
void RemoveMines( NoteData &inout, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW );
void RemoveStretch( NoteData &inout, StepsType st, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW );
void RemoveAllButOneTap( NoteData &inout, int row );
void RemoveAllButPlayer( NoteData &inout, PlayerNumber pn );
enum TrackMapping { left, right, mirror, shuffle, super_shuffle, stomp, NUM_TRACK_MAPPINGS };
void Turn( NoteData &inout, StepsType st, TrackMapping tt, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW );
void Little( NoteData &inout, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW );