From bc7885cd8b460f79ed7c0e326b749c331f7b117c Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 2 Nov 2002 22:59:12 +0000 Subject: [PATCH] use GetNumHoldNotes --- stepmania/src/NoteData.cpp | 30 +++++++++++++-------------- stepmania/src/NoteDataWithScoring.cpp | 2 +- stepmania/src/NoteField.cpp | 2 +- stepmania/src/Player.cpp | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/stepmania/src/NoteData.cpp b/stepmania/src/NoteData.cpp index 7aebc9e6ca..811e1ef617 100644 --- a/stepmania/src/NoteData.cpp +++ b/stepmania/src/NoteData.cpp @@ -222,7 +222,7 @@ void NoteData::AddHoldNote( HoldNote add ) // look for other hold notes that overlap and merge them // XXX: this is done implicitly with 4s, but 4s uses this function. // Rework this later. - for( i=0; i fOldestBeatFoundSoFar ) fOldestBeatFoundSoFar = GetHoldNote(i).m_fEndBeat; @@ -397,7 +397,7 @@ int NoteData::GetNumHoldNotes( const float fStartBeat, const float fEndBeat ) { int iNumHolds = 0; - for( int i=0; i=0; i-- ) // foreach HoldNote + for( int i=GetNumHoldNotes()-1; i>=0; i-- ) // foreach HoldNote { if( c >= iFirstRightSideColumn ) { // delete this HoldNote by shifting everything down // XXX: err, why not just call RemoveHoldNote? - for( int j=i; j=0; i-- ) // foreach HoldNote + for( int i=GetNumHoldNotes()-1; i>=0; i-- ) // foreach HoldNote { HoldNote &hn = GetHoldNote(i); @@ -493,7 +493,7 @@ void NoteData::CropToRightSide() void NoteData::RemoveHoldNotes() { // turn all the HoldNotes into TapNotes - for( int i=0; im_iNumTracks; // copy all HoldNotes before copying taps - for( int i=0; im_iNumHoldNotes; i++ ) + for( int i=0; iGetNumHoldNotes(); i++ ) tempNoteData.AddHoldNote( this->GetHoldNote(i) ); this->ConvertHoldNotesTo4s(); @@ -729,7 +729,7 @@ void NoteData::Convert2sAnd3sToHoldNotes() void NoteData::ConvertHoldNotesTo2sAnd3s() { // copy HoldNotes into the new structure, but expand them into 2s and 3s - for( int i=0; iConvert4sToHoldNotes(); - for( int i=0; im_iNumHoldNotes; i++ ) + for( int i=0; iGetNumHoldNotes(); i++ ) { const HoldNote& hn = pOriginal->GEtHoldNote(i); /* Bug here: NoteRowToBeat() may have floating point error, diff --git a/stepmania/src/NoteDataWithScoring.cpp b/stepmania/src/NoteDataWithScoring.cpp index c8f7a03e73..4c340b4932 100644 --- a/stepmania/src/NoteDataWithScoring.cpp +++ b/stepmania/src/NoteDataWithScoring.cpp @@ -87,7 +87,7 @@ int NoteDataWithScoring::GetNumHoldNotesWithScore( HoldNoteScore hns, const floa { int iNumSuccessfulHolds = 0; - for( int i=0; i