Fix '4's showing up in autogen data; fixes bogus grades.

This commit is contained in:
Glenn Maynard
2002-09-06 00:21:49 +00:00
parent 6fb0ba3c7e
commit 215d2ac87f
+10 -6
View File
@@ -314,9 +314,11 @@ int NoteData::GetNumTapNotes( const float fStartBeat, const float fEndBeat )
int iEndIndex = BeatToNoteRow( fEndBeat ); int iEndIndex = BeatToNoteRow( fEndBeat );
for( int i=iStartIndex; i<min(iEndIndex, MAX_TAP_NOTE_ROWS); i++ ) for( int i=iStartIndex; i<min(iEndIndex, MAX_TAP_NOTE_ROWS); i++ )
{
for( int t=0; t<m_iNumTracks; t++ ) for( int t=0; t<m_iNumTracks; t++ )
if( m_TapNotes[t][i] != '0' ) if( m_TapNotes[t][i] != '0' )
iNumNotes++; iNumNotes++;
}
return iNumNotes; return iNumNotes;
} }
@@ -631,12 +633,15 @@ void NoteData::Convert2sAnd3sToHoldNotes()
{ {
for( int i=0; i<MAX_TAP_NOTE_ROWS; i++ ) // foreach TapNote element for( int i=0; i<MAX_TAP_NOTE_ROWS; i++ ) // foreach TapNote element
{ {
if( m_TapNotes[col][i] == '2' ) // this is a HoldNote begin marker if( m_TapNotes[col][i] != '2' ) // this is a HoldNote begin marker
{ continue;
for( int j=i+1; j<MAX_TAP_NOTE_ROWS; j++ ) // search for end of HoldNote for( int j=i+1; j<MAX_TAP_NOTE_ROWS; j++ ) // search for end of HoldNote
{ {
if( m_TapNotes[col][j] != '0' ) // end hold on the next note we see // end hold on the next note we see
{ if( m_TapNotes[col][j] == '0' )
continue;
HoldNote hn = { col, NoteRowToBeat(i), NoteRowToBeat(j) }; HoldNote hn = { col, NoteRowToBeat(i), NoteRowToBeat(j) };
AddHoldNote( hn ); AddHoldNote( hn );
break; break;
@@ -644,8 +649,6 @@ void NoteData::Convert2sAnd3sToHoldNotes()
} }
} }
} }
}
}
/* "102000301" == /* "102000301" ==
* "104444001" */ * "104444001" */
@@ -839,6 +842,7 @@ void NoteData::LoadTransformed( NoteData* pOriginal, int iNewNumTracks, const in
} }
pOriginal->Convert4sToHoldNotes(); pOriginal->Convert4sToHoldNotes();
Convert4sToHoldNotes();
} }
NoteType NoteData::GetSmallestNoteTypeForMeasure( int iMeasureIndex ) NoteType NoteData::GetSmallestNoteTypeForMeasure( int iMeasureIndex )