Autogen fixes, stage 1 - tracks are combined semi-correctly (double->single will combine both pads to one)

This commit is contained in:
Matt Denham
2003-10-29 23:17:00 +00:00
parent 0024b33020
commit acec32cc8b
3 changed files with 68 additions and 9 deletions
+30
View File
@@ -570,3 +570,33 @@ void NoteData::EliminateAllButOneTap(int row)
}
}
// MD 10/29/03 - This is necessary, for whatever reason.
void NoteData::CombineTracks( int iTrackTo, int iTrackFrom )
{
LOG->Trace("NoteData::CombineTracks( %i , %i )", iTrackTo, iTrackFrom);
if(iTrackFrom < 0 || iTrackTo < 0) return;
int iLastRow = GetMaxRow();
LOG->Trace("NoteData::CombineTracks - %i rows", iLastRow);
for (int row = 0; row < iLastRow; ++row)
{
LOG->Trace("NoteData::CombineTracks - row %i", row);
int iStepFrom = m_TapNotes[iTrackFrom][row];
int iStepTo = m_TapNotes[iTrackTo][row];
if( iStepFrom == iStepTo )
{
// no reason to combine same steps
continue;
}
if( iStepTo != TAP_EMPTY )
{
// Mines from "from" track will not knock out any steps in
// the "to" track, but this behavior is fine, I think...
continue;
}
m_TapNotes[iTrackTo][row] = iStepFrom;
}
return;
}