comment and cleanup
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
#include "CommonMetrics.h"
|
#include "CommonMetrics.h"
|
||||||
|
|
||||||
#define GRADE_PERCENT_TIER(i) THEME->GetMetricF("PlayerStageStats",ssprintf("GradePercent%s",GradeToString((Grade)i).c_str()))
|
#define GRADE_PERCENT_TIER(i) THEME->GetMetricF("PlayerStageStats",ssprintf("GradePercent%s",GradeToString((Grade)i).c_str()))
|
||||||
|
// deprecated, but no solution to replace them exists yet:
|
||||||
#define GRADE_TIER02_IS_ALL_W2S THEME->GetMetricB("PlayerStageStats","GradeTier02IsAllW2s")
|
#define GRADE_TIER02_IS_ALL_W2S THEME->GetMetricB("PlayerStageStats","GradeTier02IsAllW2s")
|
||||||
#define GRADE_TIER01_IS_ALL_W2S THEME->GetMetricB("PlayerStageStats","GradeTier01IsAllW2s")
|
#define GRADE_TIER01_IS_ALL_W2S THEME->GetMetricB("PlayerStageStats","GradeTier01IsAllW2s")
|
||||||
#define GRADE_TIER02_IS_FULL_COMBO THEME->GetMetricB("PlayerStageStats","GradeTier02IsFullCombo")
|
#define GRADE_TIER02_IS_FULL_COMBO THEME->GetMetricB("PlayerStageStats","GradeTier02IsFullCombo")
|
||||||
@@ -180,12 +181,13 @@ Grade PlayerStageStats::GetGrade() const
|
|||||||
|
|
||||||
//LOG->Trace( "GetGrade: fActual: %f, fPossible: %d", fActual, m_iPossibleGradePoints );
|
//LOG->Trace( "GetGrade: fActual: %f, fPossible: %d", fActual, m_iPossibleGradePoints );
|
||||||
|
|
||||||
|
|
||||||
float fPercent = (m_iPossibleGradePoints == 0) ? 0 : fActual / m_iPossibleGradePoints;
|
float fPercent = (m_iPossibleGradePoints == 0) ? 0 : fActual / m_iPossibleGradePoints;
|
||||||
|
|
||||||
Grade grade = GetGradeFromPercent( fPercent );
|
Grade grade = GetGradeFromPercent( fPercent );
|
||||||
|
|
||||||
//LOG->Trace( "GetGrade: Grade: %s, %i", GradeToString(grade).c_str(), GRADE_TIER02_IS_ALL_W2S );
|
//LOG->Trace( "GetGrade: Grade: %s, %i", GradeToString(grade).c_str(), GRADE_TIER02_IS_ALL_W2S );
|
||||||
|
|
||||||
|
// todo: move all these conditions to Lua. -aj
|
||||||
if( GRADE_TIER02_IS_ALL_W2S )
|
if( GRADE_TIER02_IS_ALL_W2S )
|
||||||
{
|
{
|
||||||
if( FullComboOfScore(TNS_W1) )
|
if( FullComboOfScore(TNS_W1) )
|
||||||
@@ -260,9 +262,6 @@ float PlayerStageStats::GetPercentDancePoints() const
|
|||||||
float PlayerStageStats::GetCurMaxPercentDancePoints() const
|
float PlayerStageStats::GetCurMaxPercentDancePoints() const
|
||||||
{
|
{
|
||||||
if ( m_iPossibleDancePoints == 0 )
|
if ( m_iPossibleDancePoints == 0 )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0; // div/0
|
return 0; // div/0
|
||||||
|
|
||||||
if ( m_iCurPossibleDancePoints == m_iPossibleDancePoints )
|
if ( m_iCurPossibleDancePoints == m_iPossibleDancePoints )
|
||||||
@@ -410,7 +409,6 @@ float PlayerStageStats::GetLifeRecordLerpAt( float fStepsSecond ) const
|
|||||||
return SCALE( fStepsSecond, earlier->first, later->first, earlier->second, later->second );
|
return SCALE( fStepsSecond, earlier->first, later->first, earlier->second, later->second );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PlayerStageStats::GetLifeRecord( float *fLifeOut, int iNumSamples, float fStepsEndSecond ) const
|
void PlayerStageStats::GetLifeRecord( float *fLifeOut, int iNumSamples, float fStepsEndSecond ) const
|
||||||
{
|
{
|
||||||
for( int i = 0; i < iNumSamples; ++i )
|
for( int i = 0; i < iNumSamples; ++i )
|
||||||
@@ -768,7 +766,6 @@ public:
|
|||||||
LUA_REGISTER_CLASS( PlayerStageStats )
|
LUA_REGISTER_CLASS( PlayerStageStats )
|
||||||
// lua end
|
// lua end
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (c) 2001-2004 Chris Danford, Glenn Maynard
|
* (c) 2001-2004 Chris Danford, Glenn Maynard
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|||||||
@@ -123,7 +123,6 @@ public:
|
|||||||
void PushSelf( lua_State *L );
|
void PushSelf( lua_State *L );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user