From 809dd7dc2784bee86d6b1221d9b3a60156921304 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sat, 11 Sep 2004 03:50:37 +0000 Subject: [PATCH] rename: MaxRow -> NumRows fix some off-by-1 row errors --- stepmania/src/NoteData.cpp | 42 +++++++++++++-------------- stepmania/src/NoteData.h | 10 +++---- stepmania/src/NoteDataUtil.cpp | 12 ++++---- stepmania/src/NoteDataWithScoring.cpp | 16 +++++----- stepmania/src/Player.cpp | 2 +- 5 files changed, 41 insertions(+), 41 deletions(-) diff --git a/stepmania/src/NoteData.cpp b/stepmania/src/NoteData.cpp index 8aa6fa6709..20d5dc5fb2 100644 --- a/stepmania/src/NoteData.cpp +++ b/stepmania/src/NoteData.cpp @@ -127,7 +127,7 @@ void NoteData::CopyAll( const NoteData* pFrom ) bool NoteData::IsRowEmpty( int index ) const { /* If this is out of range, we don't have any notes there, so all tracks are empty. */ - if( index < 0 || index >= GetMaxRow() ) + if( index < 0 || index >= GetNumRows() ) return true; for( int t=0; t& addTo ) const int NoteData::GetFirstNonEmptyTrack( int index ) const { /* If this is out of range, we don't have any notes there, so all tracks are empty. */ - if( index < 0 || index >= GetMaxRow() ) + if( index < 0 || index >= GetNumRows() ) return 0; for( int t=0; t= GetMaxRow() ) + if( index < 0 || index >= GetNumRows() ) return 0; int iNum = 0; @@ -196,7 +196,7 @@ int NoteData::GetNumTracksWithTap( int index ) const int NoteData::GetNumTracksWithTapOrHoldHead( int index ) const { /* If this is out of range, we don't have any notes there, so all tracks are empty. */ - if( index < 0 || index >= GetMaxRow() ) + if( index < 0 || index >= GetNumRows() ) return 0; int iNum = 0; @@ -212,7 +212,7 @@ int NoteData::GetNumTracksWithTapOrHoldHead( int index ) const int NoteData::GetFirstTrackWithTap( int index ) const { /* If this is out of range, we don't have any notes there, so all tracks are empty. */ - if( index < 0 || index >= GetMaxRow() ) + if( index < 0 || index >= GetNumRows() ) return -1; for( int t=0; t= GetMaxRow() ) + if( index < 0 || index >= GetNumRows() ) return -1; for( int t=0; t mapAttackToNothing; - int max_row = GetMaxRow(); + int num_rows = GetNumRows(); for( int t=0; tm_pCurSong, m_PlayerNumber, fStartBeat, fEndBeat ); - fEndBeat = min( fEndBeat, GetMaxBeat() ); + fEndBeat = min( fEndBeat, GetNumBeats() ); LOG->Trace( "Applying transform '%s' from %f to %f to '%s'", mod.sModifier.c_str(), fStartBeat, fEndBeat, GAMESTATE->m_pCurSong->GetTranslitMainTitle().c_str() );