diff --git a/stepmania/src/Course.cpp b/stepmania/src/Course.cpp index 19d00944da..d7cd129df9 100644 --- a/stepmania/src/Course.cpp +++ b/stepmania/src/Course.cpp @@ -585,9 +585,9 @@ RageColor Course::GetColor() const } -Difficulty Course::GetDifficulty( int stage ) const +Difficulty Course::GetDifficulty( const Info &stage ) const { - Difficulty dc = m_entries[stage].difficulty; + Difficulty dc = m_entries[stage.CourseIndex].difficulty; if(GAMESTATE->m_bDifficultCourses && dc < DIFFICULTY_CHALLENGE) dc = Difficulty(dc + 1); @@ -608,6 +608,12 @@ void Course::GetMeterRange( int stage, int& iMeterLowOut, int& iMeterHighOut ) c } } + +void Course::GetMeterRange( const Info &stage, int& iMeterLowOut, int& iMeterHighOut ) const +{ + GetMeterRange( stage.CourseIndex, iMeterLowOut, iMeterHighOut ); +} + bool Course::GetTotalSeconds( float& fSecondsOut ) const { vector ci; diff --git a/stepmania/src/Course.h b/stepmania/src/Course.h index 5dfd26b2b3..df88331ed5 100644 --- a/stepmania/src/Course.h +++ b/stepmania/src/Course.h @@ -86,8 +86,8 @@ public: CString& sModifiersOut, NotesType nt ) const; RageColor GetColor() const; - Difficulty GetDifficulty( int stage ) const; - void GetMeterRange( int stage, int& iMeterLowOut, int& iMeterHighOut ) const; + Difficulty GetDifficulty( const Info &stage ) const; + void GetMeterRange( const Info &stage, int& iMeterLowOut, int& iMeterHighOut ) const; bool GetTotalSeconds( float& fSecondsOut ) const; bool IsNonstop() const { return !m_bRepeat && m_iLives <= 0; } // use bar life meter @@ -122,6 +122,7 @@ public: private: Song *FindSong(CString sGroup, CString sSong) const; void SetDefaultScore(); + void GetMeterRange( int stage, int& iMeterLowOut, int& iMeterHighOut ) const; }; diff --git a/stepmania/src/CourseContentsList.cpp b/stepmania/src/CourseContentsList.cpp index ed7fb7c6f1..a3aa6651c5 100644 --- a/stepmania/src/CourseContentsList.cpp +++ b/stepmania/src/CourseContentsList.cpp @@ -63,9 +63,9 @@ void CourseContentsList::SetFromCourse( Course* pCourse ) if( ci[i].Random ) { - Difficulty dc = pCourse->GetDifficulty(i); + Difficulty dc = pCourse->GetDifficulty( ci[i] ); int iMeterLow, iMeterHigh; - pCourse->GetMeterRange(i, iMeterLow, iMeterHigh); + pCourse->GetMeterRange(ci[i], iMeterLow, iMeterHigh); if( dc == DIFFICULTY_INVALID ) display.LoadFromMeterRange( m_iNumContents+1, iMeterLow, iMeterHigh, ci[i].Modifiers );