diff --git a/stepmania/src/NoteData.cpp b/stepmania/src/NoteData.cpp index edc9a4c316..717221dcd1 100644 --- a/stepmania/src/NoteData.cpp +++ b/stepmania/src/NoteData.cpp @@ -44,13 +44,13 @@ void NoteData::SetNumTracks( int iNewNumTracks ) } -/* Clear [iNoteIndexBegin,iNoteIndexEnd]; that is, including iNoteIndexEnd. */ -void NoteData::ClearRange( int iNoteIndexBegin, int iNoteIndexEnd ) +/* Clear [rowBegin,rowEnd]; that is, including rowEnd. */ +void NoteData::ClearRange( int rowBegin, int rowEnd ) { this->ConvertHoldNotesTo4s(); for( int t=0; tConvert4sToHoldNotes(); diff --git a/stepmania/src/NoteData.h b/stepmania/src/NoteData.h index 4749672970..b30c99edcd 100644 --- a/stepmania/src/NoteData.h +++ b/stepmania/src/NoteData.h @@ -71,7 +71,7 @@ public: void MoveTapNoteTrack( int dest, int src ); void SetTapNote( int track, int row, TapNote tn ); - void ClearRange( int iNoteIndexBegin, int iNoteIndexEnd ); + void ClearRange( int rowBegin, int rowEnd ); void ClearAll(); void CopyRange( const NoteData& from, int iFromIndexBegin, int iFromIndexEnd, int iToIndexBegin = 0 ); void CopyAll( const NoteData& from ); diff --git a/stepmania/src/NoteDataUtil.cpp b/stepmania/src/NoteDataUtil.cpp index 89050b7fd7..d881f99335 100644 --- a/stepmania/src/NoteDataUtil.cpp +++ b/stepmania/src/NoteDataUtil.cpp @@ -1291,13 +1291,13 @@ void NoteDataUtil::SnapToNearestNoteType( NoteData &in, NoteType nt1, NoteType n default: ASSERT( false ); return; } - int iNoteIndexBegin = BeatToNoteRow( fBeginBeat ); - int iNoteIndexEnd = BeatToNoteRow( fEndBeat ); + int rowBegin = BeatToNoteRow( fBeginBeat ); + int rowEnd = BeatToNoteRow( fEndBeat ); in.ConvertHoldNotesTo2sAnd3s(); // iterate over all TapNotes in the interval and snap them - for( int i=iNoteIndexBegin; i<=iNoteIndexEnd; i++ ) + for( int i=rowBegin; i<=rowEnd; i++ ) { int iOldIndex = i; float fOldBeat = NoteRowToBeat( iOldIndex ); diff --git a/stepmania/src/NoteTypes.cpp b/stepmania/src/NoteTypes.cpp index 4f34150664..800072e6fc 100644 --- a/stepmania/src/NoteTypes.cpp +++ b/stepmania/src/NoteTypes.cpp @@ -34,16 +34,16 @@ float NoteTypeToBeat( NoteType nt ) } } -NoteType GetNoteType( int iNoteIndex ) +NoteType GetNoteType( int row ) { - if( iNoteIndex % (ROWS_PER_MEASURE/4) == 0) return NOTE_TYPE_4TH; - else if( iNoteIndex % (ROWS_PER_MEASURE/8) == 0) return NOTE_TYPE_8TH; - else if( iNoteIndex % (ROWS_PER_MEASURE/12) == 0) return NOTE_TYPE_12TH; - else if( iNoteIndex % (ROWS_PER_MEASURE/16) == 0) return NOTE_TYPE_16TH; - else if( iNoteIndex % (ROWS_PER_MEASURE/24) == 0) return NOTE_TYPE_24TH; - else if( iNoteIndex % (ROWS_PER_MEASURE/32) == 0) return NOTE_TYPE_32ND; - else if( iNoteIndex % (ROWS_PER_MEASURE/48) == 0) return NOTE_TYPE_48TH; - else if( iNoteIndex % (ROWS_PER_MEASURE/64) == 0) return NOTE_TYPE_64TH; + if( row % (ROWS_PER_MEASURE/4) == 0) return NOTE_TYPE_4TH; + else if( row % (ROWS_PER_MEASURE/8) == 0) return NOTE_TYPE_8TH; + else if( row % (ROWS_PER_MEASURE/12) == 0) return NOTE_TYPE_12TH; + else if( row % (ROWS_PER_MEASURE/16) == 0) return NOTE_TYPE_16TH; + else if( row % (ROWS_PER_MEASURE/24) == 0) return NOTE_TYPE_24TH; + else if( row % (ROWS_PER_MEASURE/32) == 0) return NOTE_TYPE_32ND; + else if( row % (ROWS_PER_MEASURE/48) == 0) return NOTE_TYPE_48TH; + else if( row % (ROWS_PER_MEASURE/64) == 0) return NOTE_TYPE_64TH; else return NOTE_TYPE_INVALID; }; @@ -70,9 +70,9 @@ NoteType BeatToNoteType( float fBeat ) return GetNoteType( BeatToNoteRow(fBeat) ); } -bool IsNoteOfType( int iNoteIndex, NoteType t ) +bool IsNoteOfType( int row, NoteType t ) { - return GetNoteType(iNoteIndex) == t; + return GetNoteType(row) == t; } /* diff --git a/stepmania/src/NoteTypes.h b/stepmania/src/NoteTypes.h index 3a233859a0..76a03735a2 100644 --- a/stepmania/src/NoteTypes.h +++ b/stepmania/src/NoteTypes.h @@ -109,15 +109,15 @@ enum NoteType }; float NoteTypeToBeat( NoteType nt ); -NoteType GetNoteType( int iNoteIndex ); +NoteType GetNoteType( int row ); NoteType BeatToNoteType( float fBeat ); -bool IsNoteOfType( int iNoteIndex, NoteType t ); +bool IsNoteOfType( int row, NoteType t ); CString NoteTypeToString( NoteType nt ); inline int BeatToNoteRow( float fBeatNum ) { return int( fBeatNum * ROWS_PER_BEAT + 0.5f); }; // round inline int BeatToNoteRowNotRounded( float fBeatNum ) { return (int)( fBeatNum * ROWS_PER_BEAT ); }; inline float NoteRowToBeat( float fNoteIndex ) { return fNoteIndex / (float)ROWS_PER_BEAT; }; -inline float NoteRowToBeat( int iNoteIndex ) { return NoteRowToBeat( (float)iNoteIndex ); }; +inline float NoteRowToBeat( int row ) { return NoteRowToBeat( (float)row ); }; diff --git a/stepmania/src/NotesLoaderBMS.cpp b/stepmania/src/NotesLoaderBMS.cpp index bcee698607..b461ea6deb 100644 --- a/stepmania/src/NotesLoaderBMS.cpp +++ b/stepmania/src/NotesLoaderBMS.cpp @@ -300,7 +300,7 @@ bool BMSLoader::LoadFromBMSFile( const CString &sPath, Steps &out, const map