more progress on Ranking

This commit is contained in:
Chris Danford
2003-01-27 02:00:38 +00:00
parent 8870fa3044
commit 025539e52c
15 changed files with 277 additions and 152 deletions
+41 -5
View File
@@ -55,7 +55,7 @@ ScreenRanking::ScreenRanking() : ScreenAttract("ScreenRanking","ranking")
m_textType.SetXY( TYPE_X, TYPE_Y );
this->AddChild( &m_textType );
for( int i=0; i<NUM_HIGH_SCORE_LINES; i++ )
for( int i=0; i<NUM_RANKING_LINES; i++ )
{
m_sprBullets[i].Load( THEME->GetPathTo("Graphics",("ranking bullets 1x5")) );
m_sprBullets[i].SetXY( BULLETS_START_X+LINE_SPACING_X*i, BULLETS_START_Y+LINE_SPACING_Y*i );
@@ -69,6 +69,7 @@ ScreenRanking::ScreenRanking() : ScreenAttract("ScreenRanking","ranking")
m_textNames[i].SetXY( NAMES_START_X+LINE_SPACING_X*i, NAMES_START_Y+LINE_SPACING_Y*i );
m_textNames[i].SetZoom( NAMES_ZOOM );
m_textNames[i].SetDiffuse( NAMES_COLOR );
m_textNames[i].SetHorizAlign( Actor::align_left );
this->AddChild( &m_textNames[i] );
m_textScores[i].LoadFromFont( THEME->GetPathTo("Fonts","ranking") );
@@ -76,6 +77,7 @@ ScreenRanking::ScreenRanking() : ScreenAttract("ScreenRanking","ranking")
m_textScores[i].SetXY( SCORES_START_X+LINE_SPACING_X*i, SCORES_START_Y+LINE_SPACING_Y*i );
m_textScores[i].SetZoom( SCORES_ZOOM );
m_textScores[i].SetDiffuse( SCORES_COLOR );
m_textScores[i].SetHorizAlign( Actor::align_right );
this->AddChild( &m_textScores[i] );
}
@@ -177,12 +179,29 @@ void ScreenRanking::SetPage( PageToShow pts )
{
m_textCategory.SetText( ssprintf("Type %c", 'A'+pts.category) );
m_textType.SetText( GameManager::NotesTypeToString(pts.nt) );
for( int l=0; l<NUM_HIGH_SCORE_LINES; l++ )
for( int l=0; l<NUM_RANKING_LINES; l++ )
{
CString sName = SONGMAN->m_MachineScores[pts.nt][pts.category][l].sName;
float fScore = SONGMAN->m_MachineScores[pts.nt][pts.category][l].fScore;
m_textNames[l].SetText( sName );
m_textScores[l].SetText( ssprintf("%.0f",fScore) );
m_textNames[l].SetDiffuse( NAMES_COLOR );
m_textScores[l].SetDiffuse( SCORES_COLOR );
for( int p=0; p<NUM_PLAYERS; p++ )
{
if( pts.nt == GAMESTATE->m_LastRankingNotesType &&
GAMESTATE->m_LastRankingCategory[p] == pts.category &&
GAMESTATE->m_iLastRankingIndex[p] == l )
{
m_textNames[l].SetEffectBlinking();
m_textScores[l].SetEffectBlinking();
}
else
{
m_textNames[l].SetEffectNone();
m_textScores[l].SetEffectNone();
}
}
}
}
break;
@@ -190,12 +209,29 @@ void ScreenRanking::SetPage( PageToShow pts )
{
m_textCategory.SetText( pts.pCourse->m_sName );
m_textType.SetText( GameManager::NotesTypeToString(pts.nt) );
for( int l=0; l<NUM_HIGH_SCORE_LINES; l++ )
for( int l=0; l<NUM_RANKING_LINES; l++ )
{
CString sName = pts.pCourse->m_MachineScores[pts.nt][l].sName;
int iDancePoints = pts.pCourse->m_MachineScores[pts.nt][l].iDancePoints;
m_textNames[l].SetText( sName );
m_textScores[l].SetText( ssprintf("%d",iDancePoints) );
m_textNames[l].SetDiffuse( NAMES_COLOR );
m_textScores[l].SetDiffuse( SCORES_COLOR );
for( int p=0; p<NUM_PLAYERS; p++ )
{
if( pts.pCourse == GAMESTATE->m_pLastPlayedCourse &&
pts.nt == GAMESTATE->m_LastRankingNotesType &&
GAMESTATE->m_iLastRankingIndex[p] == l )
{
m_textNames[l].SetEffectBlinking();
m_textScores[l].SetEffectBlinking();
}
else
{
m_textNames[l].SetEffectNone();
m_textScores[l].SetEffectNone();
}
}
}
}
break;
@@ -211,7 +247,7 @@ void ScreenRanking::TweenPageOnScreen()
m_textType.SetDiffuse( RageColor(1,1,1,1) );
m_textType.FadeOn(0.1f,"bounce right",0.5f);
for( int l=0; l<NUM_HIGH_SCORE_LINES; l++ )
for( int l=0; l<NUM_RANKING_LINES; l++ )
{
m_sprBullets[l].SetDiffuse( RageColor(1,1,1,1) );
m_sprBullets[l].FadeOn(0.2f+l*0.1f,"bounce right far",1.f);
@@ -227,7 +263,7 @@ void ScreenRanking::TweenPageOffScreen()
m_textCategory.FadeOff(0,"fade",0.25f);
m_textType.FadeOff(0.1f,"fade",0.25f);
for( int l=0; l<NUM_HIGH_SCORE_LINES; l++ )
for( int l=0; l<NUM_RANKING_LINES; l++ )
{
m_sprBullets[l].FadeOff(0.2f+l*0.1f,"fade",0.25f);
m_textNames[l].FadeOff(0.2f+l*0.1f,"fade",0.25f);