This commit is contained in:
Glenn Maynard
2003-12-16 04:01:26 +00:00
parent 7003e2b157
commit d3f2c7aff3
+6 -16
View File
@@ -495,30 +495,21 @@ int NoteData::GetNumHands( float fStartBeat, float fEndBeat ) const
iStartIndex = max( iStartIndex, 0 ); iStartIndex = max( iStartIndex, 0 );
iEndIndex = min( iEndIndex, GetMaxRow()-1 ); iEndIndex = min( iEndIndex, GetMaxRow()-1 );
// vector<int> HoldsAtRow;
// HoldsAtRow.insert( HoldsAtRow.begin(), iEndIndex-iStartIndex+1, 0 );
int i;
// for( i=0; i<GetNumHoldNotes(); i++ )
// {
// /* Skip the first row of each hold, since there's also a TAP_HOLD_HEAD there. */
// const HoldNote &hn = GetHoldNote(i);
// for( int row = hn.iStartRow+1; row < hn.iEndRow; ++row )
// ++HoldsAtRow[row-iStartIndex];
// }
int iNum = 0; int iNum = 0;
for( i=iStartIndex; i<=iEndIndex; i++ ) for( int i=iStartIndex; i<=iEndIndex; i++ )
{ {
int iNumNotesThisIndex = 0; int iNumNotesThisIndex = 0;
for( int t=0; t<m_iNumTracks; t++ ) for( int t=0; t<m_iNumTracks; t++ )
{ {
TapNote tn = GetTapNoteX(t, i); TapNote tn = GetTapNoteX(t, i);
if( tn != TAP_MINE && tn != TAP_EMPTY ) // mines don't count if( tn != TAP_MINE && tn != TAP_EMPTY ) // mines don't count
iNumNotesThisIndex++; ++iNumNotesThisIndex;
} }
/* We must have at least one non-hold-body at this row to count it. */ /* We must have at least one non-hold-body at this row to count it. */
if( !iNumNotesThisIndex ) if( !iNumNotesThisIndex )
continue; continue;
if( iNumNotesThisIndex < 3 ) if( iNumNotesThisIndex < 3 )
{ {
/* We have at least one, but not enough. Count holds. */ /* We have at least one, but not enough. Count holds. */
@@ -526,15 +517,14 @@ int NoteData::GetNumHands( float fStartBeat, float fEndBeat ) const
{ {
const HoldNote &hn = GetHoldNote(j); const HoldNote &hn = GetHoldNote(j);
if( hn.iStartRow+1 <= j && j <= hn.iEndRow ) if( hn.iStartRow+1 <= j && j <= hn.iEndRow )
iNumNotesThisIndex++; ++iNumNotesThisIndex;
} }
} }
// iNumNotesThisIndex += HoldsAtRow[i-iStartIndex];
if( iNumNotesThisIndex >= 3 ) if( iNumNotesThisIndex >= 3 )
iNum++; iNum++;
} }
LOG->Trace("xxxxxx %i", iNum);
return iNum; return iNum;
} }