Move the GradePercent tiers to theme metrics; this will allow for different games (e.g. beatmania) to have their own tiers, and is in the same vein as moving unlocks to themes

This commit is contained in:
Sean Burke
2005-03-12 10:49:41 +00:00
parent 3c4abc8b9d
commit b9c409cb58
5 changed files with 19 additions and 37 deletions
+7 -3
View File
@@ -2,8 +2,12 @@
#include "PlayerStageStats.h"
#include "RageLog.h"
#include "PrefsManager.h"
#include "ThemeManager.h"
#include "Foreach.h"
#define GRADE_PERCENT_TIER(i) THEME->GetMetricF("PlayerStageStats",ssprintf("GradePercent%s",GradeToString((Grade)i).c_str()))
#define GRADE_TIER_02_IS_ALL_PERFECTS THEME->GetMetricB("PlayerStageStats","GradeTier02IsAllPerfects")
void PlayerStageStats::Init()
{
vpSteps.clear();
@@ -144,15 +148,15 @@ Grade PlayerStageStats::GetGrade() const
FOREACH_Grade(g)
{
if( fPercent >= PREFSMAN->m_fGradePercent[g] )
if( fPercent >= GRADE_PERCENT_TIER(g) )
{
grade = g;
break;
}
}
LOG->Trace( "GetGrade: Grade: %s, %i", GradeToString(grade).c_str(), PREFSMAN->m_bGradeTier02IsAllPerfects );
if( PREFSMAN->m_bGradeTier02IsAllPerfects )
LOG->Trace( "GetGrade: Grade: %s, %i", GradeToString(grade).c_str(), GRADE_TIER_02_IS_ALL_PERFECTS );
if( GRADE_TIER_02_IS_ALL_PERFECTS )
{
if( iTapNoteScores[TNS_MARVELOUS] > 0 &&
iTapNoteScores[TNS_PERFECT] == 0 &&