remove more unused eval metrics

remove separate "course record" and "category record" graphics
keep track of personal category records
cleanup eval time area
This commit is contained in:
Chris Danford
2003-12-21 04:19:51 +00:00
parent 120a37cee8
commit ba3ea672c3
5 changed files with 52 additions and 917 deletions
File diff suppressed because it is too large Load Diff
+40 -15
View File
@@ -1095,22 +1095,47 @@ void GameState::GetRankingFeats( PlayerNumber pn, vector<RankingFeats> &asFeatsO
StepsType nt = GAMESTATE->GetCurrentStyleDef()->m_StepsType; StepsType nt = GAMESTATE->GetCurrentStyleDef()->m_StepsType;
Course* pCourse = GAMESTATE->m_pCurCourse; Course* pCourse = GAMESTATE->m_pCurCourse;
ASSERT( pCourse ); ASSERT( pCourse );
vector<Course::MemCardData::HighScore> &vHighScores = pCourse->m_MemCardDatas[nt][MEMORY_CARD_MACHINE].vHighScores;
for( unsigned i=0; i<vHighScores.size(); i++ )
{
if( vHighScores[i].sName != RANKING_TO_FILL_IN_MARKER[pn] )
continue;
RankingFeats feat; // Find Machine Records
feat.Type = RankingFeats::COURSE; {
feat.Feat = ssprintf("No. %d in %s", i+1, pCourse->m_sName.c_str() ); vector<Course::MemCardData::HighScore> &vHighScores = pCourse->m_MemCardDatas[nt][MEMORY_CARD_MACHINE].vHighScores;
feat.pStringToFill = &vHighScores[i].sName; for( unsigned i=0; i<vHighScores.size(); i++ )
feat.grade = GRADE_NO_DATA; {
feat.iScore = vHighScores[i].iScore; if( vHighScores[i].sName != RANKING_TO_FILL_IN_MARKER[pn] )
feat.fPercentDP = vHighScores[i].fPercentDP; continue;
if( pCourse->HasBanner() )
feat.Banner = pCourse->m_sBannerPath; RankingFeats feat;
asFeatsOut.push_back( feat ); feat.Type = RankingFeats::COURSE;
feat.Feat = ssprintf("MR #%d in %s", i+1, pCourse->m_sName.c_str() );
feat.pStringToFill = &vHighScores[i].sName;
feat.grade = GRADE_NO_DATA;
feat.iScore = vHighScores[i].iScore;
feat.fPercentDP = vHighScores[i].fPercentDP;
if( pCourse->HasBanner() )
feat.Banner = pCourse->m_sBannerPath;
asFeatsOut.push_back( feat );
}
}
// Find Personal Records
vector<Course::MemCardData::HighScore> &vHighScores = pCourse->m_MemCardDatas[nt][pn].vHighScores;
{
for( unsigned i=0; i<vHighScores.size(); i++ )
{
if( vHighScores[i].sName != RANKING_TO_FILL_IN_MARKER[pn] )
continue;
RankingFeats feat;
feat.Type = RankingFeats::COURSE;
feat.Feat = ssprintf("PR #%d in %s", i+1, pCourse->m_sName.c_str() );
feat.pStringToFill = &vHighScores[i].sName;
feat.grade = GRADE_NO_DATA;
feat.iScore = vHighScores[i].iScore;
feat.fPercentDP = vHighScores[i].fPercentDP;
if( pCourse->HasBanner() )
feat.Banner = pCourse->m_sBannerPath;
asFeatsOut.push_back( feat );
}
} }
} }
break; break;
+2 -2
View File
@@ -114,10 +114,10 @@ public:
} m_CategoryDatas[NUM_MEMORY_CARDS][NUM_STEPS_TYPES][NUM_RANKING_CATEGORIES]; } m_CategoryDatas[NUM_MEMORY_CARDS][NUM_STEPS_TYPES][NUM_RANKING_CATEGORIES];
void AddHighScore( StepsType nt, RankingCategory rc, PlayerNumber pn, CategoryData::HighScore hs, int &iMachineIndexOut ) void AddHighScore( StepsType nt, RankingCategory rc, PlayerNumber pn, CategoryData::HighScore hs, int &iPersonalIndexOut, int &iMachineIndexOut )
{ {
hs.sName = RANKING_TO_FILL_IN_MARKER[pn]; hs.sName = RANKING_TO_FILL_IN_MARKER[pn];
m_CategoryDatas[pn][nt][rc].AddHighScore( hs, iMachineIndexOut ); m_CategoryDatas[pn][nt][rc].AddHighScore( hs, iPersonalIndexOut );
m_CategoryDatas[MEMORY_CARD_MACHINE][nt][rc].AddHighScore( hs, iMachineIndexOut ); m_CategoryDatas[MEMORY_CARD_MACHINE][nt][rc].AddHighScore( hs, iMachineIndexOut );
} }
+8 -24
View File
@@ -655,7 +655,7 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName ) : Screen(sClassName)
if( SHOW_TOTAL_SCORE_AREA ) if( SHOW_TOTAL_SCORE_AREA )
{ {
m_sprTotalScoreLabel.Load( THEME->GetPathToG("ScreenEvaluation totalscore labels 1x2") ); m_sprTotalScoreLabel.Load( THEME->GetPathToG("ScreenEvaluation totalscore label") );
m_sprTotalScoreLabel.SetState( 0 ); m_sprTotalScoreLabel.SetState( 0 );
m_sprTotalScoreLabel.StopAnimating(); m_sprTotalScoreLabel.StopAnimating();
m_sprTotalScoreLabel.SetName( "TotalScoreLabel" ); m_sprTotalScoreLabel.SetName( "TotalScoreLabel" );
@@ -689,7 +689,7 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName ) : Screen(sClassName)
// //
if( SHOW_TIME_AREA ) if( SHOW_TIME_AREA )
{ {
m_sprTimeLabel.Load( THEME->GetPathToG("ScreenEvaluation score labels 1x2") ); m_sprTimeLabel.Load( THEME->GetPathToG("ScreenEvaluation time label") );
m_sprTimeLabel.SetState( 1 ); m_sprTimeLabel.SetState( 1 );
m_sprTimeLabel.StopAnimating(); m_sprTimeLabel.StopAnimating();
m_sprTimeLabel.SetName( "TimeLabel" ); m_sprTimeLabel.SetName( "TimeLabel" );
@@ -701,10 +701,10 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName ) : Screen(sClassName)
if( !GAMESTATE->IsPlayerEnabled( (PlayerNumber)p ) ) if( !GAMESTATE->IsPlayerEnabled( (PlayerNumber)p ) )
continue; // skip continue; // skip
m_textTime[p].LoadFromNumbers( THEME->GetPathToN("ScreenEvaluation score") ); m_textTime[p].LoadFromNumbers( THEME->GetPathToN("ScreenEvaluation time") );
m_textTime[p].EnableShadow( false ); m_textTime[p].EnableShadow( false );
m_textTime[p].SetDiffuse( PlayerToColor(p) ); m_textTime[p].SetDiffuse( PlayerToColor(p) );
m_textTime[p].SetName( ssprintf("ScoreNumberP%d",p+1) ); m_textTime[p].SetName( ssprintf("TimeNumberP%d",p+1) );
SET_XY_AND_ON_COMMAND( m_textTime[p] ); SET_XY_AND_ON_COMMAND( m_textTime[p] );
m_textTime[p].SetText( SecondsToTime(stageStats.fAliveSeconds[p]) ); m_textTime[p].SetText( SecondsToTime(stageStats.fAliveSeconds[p]) );
this->AddChild( &m_textTime[p] ); this->AddChild( &m_textTime[p] );
@@ -719,24 +719,8 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName ) : Screen(sClassName)
{ {
if( iMachineHighScoreIndex[p] != -1 ) if( iMachineHighScoreIndex[p] != -1 )
{ {
switch( m_Type ) m_sprMachineRecord[p].Load( THEME->GetPathToG("ScreenEvaluation machine record") );
{ m_sprMachineRecord[p].SetName( ssprintf("MachineRecordP%d",p+1) );
case stage:
m_sprMachineRecord[p].Load( THEME->GetPathToG("ScreenEvaluation machine record") );
m_sprMachineRecord[p].SetName( ssprintf("MachineRecordP%d",p+1) );
break;
case summary:
m_sprMachineRecord[p].Load( THEME->GetPathToG("ScreenEvaluation category record") );
m_sprMachineRecord[p].SetName( ssprintf("CategoryRecordP%d",p+1) );
break;
case course:
m_sprMachineRecord[p].Load( THEME->GetPathToG("ScreenEvaluation course record") );
m_sprMachineRecord[p].SetName( ssprintf("CourseRecordP%d",p+1) );
break;
default:
ASSERT(0);
}
m_sprMachineRecord[p].SetState( iMachineHighScoreIndex[p] ); m_sprMachineRecord[p].SetState( iMachineHighScoreIndex[p] );
m_sprMachineRecord[p].StopAnimating(); m_sprMachineRecord[p].StopAnimating();
SET_XY_AND_ON_COMMAND( m_sprMachineRecord[p] ); SET_XY_AND_ON_COMMAND( m_sprMachineRecord[p] );
@@ -745,9 +729,9 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName ) : Screen(sClassName)
if( iPersonalHighScoreIndex[p] != -1 ) if( iPersonalHighScoreIndex[p] != -1 )
{ {
m_sprPersonalRecord[p].Load( THEME->GetPathToG("ScreenEvaluation personal record") ); m_sprPersonalRecord[p].Load( THEME->GetPathToG("ScreenEvaluation personal record") );
m_sprPersonalRecord[p].SetName( ssprintf("PersonalRecordP%d",p+1) );
m_sprPersonalRecord[p].SetState( iPersonalHighScoreIndex[p] ); m_sprPersonalRecord[p].SetState( iPersonalHighScoreIndex[p] );
m_sprPersonalRecord[p].StopAnimating(); m_sprPersonalRecord[p].StopAnimating();
m_sprPersonalRecord[p].SetName( ssprintf("PersonalRecordP%d",p+1) );
SET_XY_AND_ON_COMMAND( m_sprPersonalRecord[p] ); SET_XY_AND_ON_COMMAND( m_sprPersonalRecord[p] );
this->AddChild( &m_sprPersonalRecord[p] ); this->AddChild( &m_sprPersonalRecord[p] );
} }
@@ -888,7 +872,7 @@ void ScreenEvaluation::CommitScores( const StageStats &stageStats, int iPersonal
hs.iScore = stageStats.iScore[p]; hs.iScore = stageStats.iScore[p];
hs.fPercentDP = stageStats.GetPercentDancePoints( (PlayerNumber)p ); hs.fPercentDP = stageStats.GetPercentDancePoints( (PlayerNumber)p );
if( hs.fPercentDP > PREFSMAN->m_fMinPercentageForHighScore ) if( hs.fPercentDP > PREFSMAN->m_fMinPercentageForHighScore )
PROFILEMAN->AddHighScore( nt, rc[p], (PlayerNumber)p, hs, iMachineHighScoreIndex[p] ); PROFILEMAN->AddHighScore( nt, rc[p], (PlayerNumber)p, hs, iPersonalHighScoreIndex[p], iMachineHighScoreIndex[p] );
} }
break; break;
+2 -2
View File
@@ -84,14 +84,14 @@ ScreenNameEntryTraditional::ScreenNameEntryTraditional( CString sClassName ) : S
hs.grade = GRADE_A; hs.grade = GRADE_A;
hs.iScore = 42; hs.iScore = 42;
int a, b; int a, b;
GAMESTATE->m_pCurNotes[i]->AddHighScore( (PlayerNumber)i, hs, a,b ); GAMESTATE->m_pCurNotes[i]->AddHighScore( (PlayerNumber)i, hs, a, b );
if( i == 0 ) if( i == 0 )
{ {
ProfileManager::CategoryData::HighScore hs; ProfileManager::CategoryData::HighScore hs;
hs.iScore = 1234567; hs.iScore = 1234567;
StepsType nt = GAMESTATE->GetCurrentStyleDef()->m_StepsType; StepsType nt = GAMESTATE->GetCurrentStyleDef()->m_StepsType;
PROFILEMAN->AddHighScore( nt, RANKING_A, (PlayerNumber)i, hs, a ); PROFILEMAN->AddHighScore( nt, RANKING_A, (PlayerNumber)i, hs, a, b );
} }
} }