improved Wide - prevents some nearly-impossible patterns

This commit is contained in:
Chris Danford
2003-03-16 01:47:08 +00:00
parent f93156f848
commit b2892caa4e
4 changed files with 15 additions and 5 deletions
+13 -1
View File
@@ -1017,10 +1017,22 @@ void NoteDataUtil::Wide( NoteData &in )
for( int i=0; i<=max_row; i+=ROWS_PER_BEAT )
{
if( in.GetNumTapNonEmptyTracks(i) != 1 )
continue; // skip
continue; // skip. Don't place during holds
if( in.GetNumTracksWithTap(i) != 1 )
continue; // skip
bool bSpaceAroundIsEmpty = true; // no other notes with a 1/8th of this row
for( int j=i-ROWS_PER_BEAT/2+1; j<i+ROWS_PER_BEAT/2-1; j++ )
if( j!=i && in.GetNumTapNonEmptyTracks(j) > 0 )
{
bSpaceAroundIsEmpty = false;
break;
}
if( !bSpaceAroundIsEmpty )
continue; // skip
// add a note determinitsitcally
int iBeat = (int)roundf( NoteRowToBeat(i) );
int iTrackOfNote = in.GetFirstTrackWithTap(i);