[ScreenEvaluation] new metric DetailLineFormat. must contain two integer flags (%d or %i should work.)

This commit is contained in:
AJ Kelly
2010-03-09 03:22:05 -06:00
parent fbd156c00f
commit 4d50f8da6e
+4 -17
View File
@@ -48,6 +48,7 @@ static const char *DetailLineNames[NUM_DetailLine] =
"NumSteps","Jumps", "Holds", "Mines", "Hands", "Rolls",
};
XToString( DetailLine );
#define DETAILLINE_FORMAT THEME->GetMetric (m_sName,"DetailLineFormat")
#define CHEER_DELAY_SECONDS THEME->GetMetricF(m_sName,"CheerDelaySeconds")
#define BAR_ACTUAL_MAX_COMMAND THEME->GetMetricA(m_sName,"BarActualMaxCommand")
@@ -370,9 +371,7 @@ void ScreenEvaluation::Init()
}
}
//
// init bonus area
//
if( SHOW_BONUS_AREA )
{
FOREACH_EnabledPlayer( p )
@@ -411,9 +410,7 @@ void ScreenEvaluation::Init()
}
}
//
// init survived area
//
if( SHOW_SURVIVED_AREA )
{
FOREACH_EnabledPlayer( p )
@@ -435,9 +432,7 @@ void ScreenEvaluation::Init()
}
}
//
// init win area
//
if( SHOW_WIN_AREA )
{
FOREACH_EnabledPlayer( p )
@@ -459,9 +454,7 @@ void ScreenEvaluation::Init()
}
}
//
// init judgment area
//
FOREACH_ENUM( JudgmentLine, l )
{
if( l == JudgmentLine_W1 && !GAMESTATE->ShowW1() )
@@ -528,9 +521,7 @@ void ScreenEvaluation::Init()
}
}
//
// init detail area
//
if( SHOW_DETAIL_AREA )
{
FOREACH_EnabledPlayer( p )
@@ -560,14 +551,14 @@ void ScreenEvaluation::Init()
const int iActual = lrintf(m_pStageStats->m_player[p].m_radarActual[ind]);
const int iPossible = lrintf(m_pStageStats->m_player[p].m_radarPossible[ind]);
m_textDetailText[l][p].SetText( ssprintf("%3d/%3d",iActual,iPossible) );
// todo: check if format string is valid
// (two integer values in DETAILLINE_FORMAT) -aj
m_textDetailText[l][p].SetText( ssprintf(DETAILLINE_FORMAT,iActual,iPossible) );
}
}
}
//
// init score area
//
if( SHOW_SCORE_AREA )
{
m_sprScoreLabel.Load( THEME->GetPathG(m_sName,"ScoreLabel") );
@@ -588,9 +579,7 @@ void ScreenEvaluation::Init()
}
}
//
// init time area
//
if( SHOW_TIME_AREA )
{
m_sprTimeLabel.Load( THEME->GetPathG(m_sName,"time label") );
@@ -611,9 +600,7 @@ void ScreenEvaluation::Init()
}
}
//
// init records area
//
bool bOneHasNewTopRecord = false;
FOREACH_PlayerNumber( p )
if( GAMESTATE->IsPlayerEnabled(p) && (m_pStageStats->m_player[p].m_iMachineHighScoreIndex == 0 || m_pStageStats->m_player[p].m_iPersonalHighScoreIndex == 0) )