diff --git a/stepmania/src/Course.cpp b/stepmania/src/Course.cpp index 4bc070716e..30c229e120 100644 --- a/stepmania/src/Course.cpp +++ b/stepmania/src/Course.cpp @@ -182,8 +182,8 @@ void Course::CreateEndlessCourseFromGroupAndDifficulty( CString sGroupName, Diff void Course::Shuffle() { /* Shuffle the list. */ - for( int i = 0; i < m_iStages; ++i) - swap(SongOrdering[i], SongOrdering[rand() % m_iStages]); + for( int i = 0; i < GetNumStages(); ++i) + swap(SongOrdering[i], SongOrdering[rand() % GetNumStages()]); } Notes* Course::GetNotesForStage( int iStage ) @@ -249,7 +249,7 @@ void Course::GetSongAndNotesForCurrentStyle( CStringArray& asModifiersOut, bool bShuffled ) { - for( int i=0; i= 7 ) + if( GetNumStages() >= 7 ) return RageColor(1,0,0,1); // red - else if( m_iStages >= 4 ) + else if( GetNumStages() >= 4 ) return RageColor(1,0.5f,0,1); // orange else return RageColor(0,1,0,1); // green @@ -303,7 +303,7 @@ int Course::GetNumStages() const static int CompareCoursePointersByDifficulty(const Course* pCourse1, const Course* pCourse2) { - return pCourse1->m_iStages < pCourse2->m_iStages; + return pCourse1->GetNumStages() < pCourse2->GetNumStages(); } void SortCoursePointerArrayByDifficulty( CArray &apCourses ) diff --git a/stepmania/src/CourseContentsFrame.cpp b/stepmania/src/CourseContentsFrame.cpp index 7dbc5e0904..f556646363 100644 --- a/stepmania/src/CourseContentsFrame.cpp +++ b/stepmania/src/CourseContentsFrame.cpp @@ -102,7 +102,7 @@ void CourseContentsFrame::SetFromCourse( Course* pCourse ) m_iNumContents = 0; - for( int i=0; im_iStages, MAX_TOTAL_CONTENTS); i++ ) + for( int i=0; iGetNumStages(), MAX_TOTAL_CONTENTS); i++ ) { Song* pSong = pCourse->GetSong(i); Notes* pNotes = pCourse->GetNotesForStage(i); diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 3ece90b6a9..b6cc1c8408 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -1029,7 +1029,7 @@ void SaveChanges() case PLAY_MODE_ONI: case PLAY_MODE_ENDLESS: { - for( int i=0; im_pCurCourse->m_iStages; i++ ) + for( int i=0; im_pCurCourse->GetNumStages(); i++ ) { Song* pSong = GAMESTATE->m_pCurCourse->GetSong(i); pSong->Save(); @@ -1053,7 +1053,7 @@ void DontSaveChanges() case PLAY_MODE_ONI: case PLAY_MODE_ENDLESS: { - for( int i=0; im_pCurCourse->m_iStages; i++ ) + for( int i=0; im_pCurCourse->GetNumStages(); i++ ) { Song* pSong = GAMESTATE->m_pCurCourse->GetSong(i); ld.LoadFromSMFile( GAMESTATE->m_pCurSong->GetCacheFilePath(), *pSong ); diff --git a/stepmania/src/ScreenSelectCourse.cpp b/stepmania/src/ScreenSelectCourse.cpp index bab9125db1..688860d265 100644 --- a/stepmania/src/ScreenSelectCourse.cpp +++ b/stepmania/src/ScreenSelectCourse.cpp @@ -329,9 +329,9 @@ void ScreenSelectCourse::AfterCourseChange() { Course* pCourse = m_MusicWheel.GetSelectedCourse(); - m_textNumSongs.SetText( ssprintf("%d", pCourse->m_iStages) ); + m_textNumSongs.SetText( ssprintf("%d", pCourse->GetNumStages()) ); float fTotalSeconds = 0; - for( int i=0; im_iStages; i++ ) + for( int i=0; iGetNumStages(); i++ ) fTotalSeconds += pCourse->GetSong(i)->m_fMusicLengthSeconds; m_textTime.SetText( SecondsToTime(fTotalSeconds) ); diff --git a/stepmania/src/SongManager.cpp b/stepmania/src/SongManager.cpp index d78eeff789..6d493c3758 100644 --- a/stepmania/src/SongManager.cpp +++ b/stepmania/src/SongManager.cpp @@ -459,7 +459,7 @@ void SongManager::InitCoursesFromDisk() { Course course; course.LoadFromCRSFile( "Courses\\" + saCourseFiles[i], m_pSongs ); - if( course.m_iStages > 0 ) + if( course.GetNumStages() > 0 ) m_aOniCourses.push_back( course ); } @@ -480,7 +480,7 @@ void SongManager::InitCoursesFromDisk() Course course; course.CreateEndlessCourseFromGroupAndDifficulty( sGroupName, dc, apGroupSongs ); - if( course.m_iStages > 0 ) + if( course.GetNumStages() > 0 ) m_aEndlessCourses.push_back( course ); } } @@ -498,7 +498,7 @@ void SongManager::InitCoursesFromDisk() { Course course; course.LoadFromCRSFile( saCoursePaths[i], m_pSongs ); - if( course.m_iStages > 0 ) + if( course.GetNumStages() > 0 ) m_aExtraCourses.push_back( course ); } } @@ -520,7 +520,7 @@ bool SongManager::GetExtraStageInfoFromCourse( bool bExtra2, CString sPreferredG Course course; course.LoadFromCRSFile( sCoursePath, m_pSongs ); - if( course.m_iStages <= 0 ) return false; + if( course.GetNumStages() <= 0 ) return false; pSongOut = course.GetSong(0); pNotesOut = course.GetNotesForStage( 0 );