diff --git a/stepmania/src/NoteData.cpp b/stepmania/src/NoteData.cpp index 9fd94b828b..3ac5280684 100644 --- a/stepmania/src/NoteData.cpp +++ b/stepmania/src/NoteData.cpp @@ -520,4 +520,3 @@ void NoteData::SetTapNote(int track, int row, TapNote t) PadTapNotes(row); m_TapNotes[track][row]=t; } - diff --git a/stepmania/src/NoteData.h b/stepmania/src/NoteData.h index 1c255fb0ab..7a05028bce 100644 --- a/stepmania/src/NoteData.h +++ b/stepmania/src/NoteData.h @@ -7,7 +7,7 @@ Desc: Holds data about the notes that the player is supposed to hit. NoteData is organized by: track - corresponds to different columns of notes on the screen - index - corresponds to subdivisions of beats + row/index - corresponds to subdivisions of beats Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. Chris Danford @@ -133,6 +133,12 @@ public: void Convert4sToHoldNotes(); void ConvertHoldNotesTo4s(); + + // True if no notes in row that aren't true in the mask + bool RowPassesValidMask( int row, bool bValidMask[] ); + + // Remove all tap notes that fail this mask + void EliminateNonPassingTaps( int row, bool bValidMask[] ); }; diff --git a/stepmania/src/NoteDataUtil.cpp b/stepmania/src/NoteDataUtil.cpp index 8204aafd0a..3f306a7288 100644 --- a/stepmania/src/NoteDataUtil.cpp +++ b/stepmania/src/NoteDataUtil.cpp @@ -823,9 +823,47 @@ void NoteDataUtil::ShiftRight( NoteData &in ) } -//NUM_STEPS_TYPES +struct ValidRow +{ + StepsType st; + bool bValidMask[MAX_NOTE_TRACKS]; +}; +#define T true +#define f false +const ValidRow g_ValidRows[] = +{ + { STEPS_TYPE_DANCE_DOUBLE, { T,T,T,T,f,f,f,f } }, + { STEPS_TYPE_DANCE_DOUBLE, { f,T,T,T,T,f,f,f } }, + { STEPS_TYPE_DANCE_DOUBLE, { f,f,f,T,T,T,T,f } }, + { STEPS_TYPE_DANCE_DOUBLE, { f,f,f,f,T,T,T,T } }, +}; void NoteDataUtil::FixImpossibleRows( NoteData &in, StepsType st ) { - + for( int i=0; i