make m_iMaxPossiblePoints local
This commit is contained in:
@@ -65,7 +65,6 @@ ScoreKeeperMAX2::ScoreKeeperMAX2( const vector<Notes*>& apNotes_, PlayerNumber p
|
|||||||
m_iScore = 0;
|
m_iScore = 0;
|
||||||
m_iCurToastyCombo = 0;
|
m_iCurToastyCombo = 0;
|
||||||
m_iMaxScoreSoFar = 0;
|
m_iMaxScoreSoFar = 0;
|
||||||
m_iMaxPossiblePoints = 0;
|
|
||||||
m_iPointBonus = 0;
|
m_iPointBonus = 0;
|
||||||
m_iNumTapsAndHolds = 0;
|
m_iNumTapsAndHolds = 0;
|
||||||
m_bIsLastSongInCourse = false;
|
m_bIsLastSongInCourse = false;
|
||||||
@@ -95,6 +94,7 @@ void ScoreKeeperMAX2::OnNextSong( int iSongInCourseIndex, Notes* pNotes )
|
|||||||
|
|
||||||
int sum = (N * (N + 1)) / 2;
|
int sum = (N * (N + 1)) / 2;
|
||||||
|
|
||||||
|
int iMaxPossiblePoints = 0;
|
||||||
if( GAMESTATE->IsCourseMode() )
|
if( GAMESTATE->IsCourseMode() )
|
||||||
{
|
{
|
||||||
const int numSongsInCourse = apNotes.size();
|
const int numSongsInCourse = apNotes.size();
|
||||||
@@ -103,18 +103,18 @@ void ScoreKeeperMAX2::OnNextSong( int iSongInCourseIndex, Notes* pNotes )
|
|||||||
if ( iSongInCourseIndex == numSongsInCourse - 1 )
|
if ( iSongInCourseIndex == numSongsInCourse - 1 )
|
||||||
m_bIsLastSongInCourse = true;
|
m_bIsLastSongInCourse = true;
|
||||||
|
|
||||||
m_iMaxPossiblePoints = (10000000 * (iSongInCourseIndex+1)) / courseMult;
|
iMaxPossiblePoints = (10000000 * (iSongInCourseIndex+1)) / courseMult;
|
||||||
m_iMaxScoreSoFar += m_iMaxPossiblePoints;
|
m_iMaxScoreSoFar += iMaxPossiblePoints;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int iMeter = pNotes->GetMeter();
|
int iMeter = pNotes->GetMeter();
|
||||||
CLAMP( iMeter, 1, 10 );
|
CLAMP( iMeter, 1, 10 );
|
||||||
m_iMaxPossiblePoints = iMeter * 1000000;
|
iMaxPossiblePoints = iMeter * 1000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_iScoreMultiplier = m_iMaxPossiblePoints / sum;
|
m_iScoreMultiplier = iMaxPossiblePoints / sum;
|
||||||
m_iPointBonus = (m_iMaxPossiblePoints * 10) - (sum * 10 * m_iScoreMultiplier);
|
m_iPointBonus = (iMaxPossiblePoints * 10) - (sum * 10 * m_iScoreMultiplier);
|
||||||
|
|
||||||
ASSERT( m_iScoreMultiplier >= 0 );
|
ASSERT( m_iScoreMultiplier >= 0 );
|
||||||
ASSERT( m_iPointBonus >= 0 );
|
ASSERT( m_iPointBonus >= 0 );
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ class ScoreKeeperMAX2: public ScoreKeeper
|
|||||||
int m_iNumTapsAndHolds;
|
int m_iNumTapsAndHolds;
|
||||||
int m_iMaxScoreSoFar; // for nonstop scoring
|
int m_iMaxScoreSoFar; // for nonstop scoring
|
||||||
int m_iPointBonus; // the difference to award at the end
|
int m_iPointBonus; // the difference to award at the end
|
||||||
int m_iMaxPossiblePoints;
|
|
||||||
int m_iCurToastyCombo;
|
int m_iCurToastyCombo;
|
||||||
bool m_bIsLastSongInCourse;
|
bool m_bIsLastSongInCourse;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user