consistent command loading style
This commit is contained in:
@@ -274,13 +274,11 @@ void ScreenEvaluation::Init()
|
||||
m_SmallBanner[i].LoadFromSong( pSong );
|
||||
m_SmallBanner[i].ScaleToClipped( BANNER_WIDTH, BANNER_HEIGHT );
|
||||
m_SmallBanner[i].SetName( ssprintf("SmallBanner%d",i+1) );
|
||||
ActorUtil::LoadAllCommands( m_SmallBanner[i], m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_SmallBanner[i] );
|
||||
this->AddChild( &m_SmallBanner[i] );
|
||||
|
||||
m_sprSmallBannerFrame[i].Load( THEME->GetPathG(m_sName,"banner frame") );
|
||||
m_sprSmallBannerFrame[i]->SetName( ssprintf("SmallBanner%d",i+1) );
|
||||
ActorUtil::LoadAllCommands( *m_sprSmallBannerFrame[i], m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_sprSmallBannerFrame[i] );
|
||||
this->AddChild( m_sprSmallBannerFrame[i] );
|
||||
}
|
||||
@@ -293,13 +291,11 @@ void ScreenEvaluation::Init()
|
||||
m_LargeBanner.LoadFromSong( GAMESTATE->m_pCurSong );
|
||||
m_LargeBanner.ScaleToClipped( BANNER_WIDTH, BANNER_HEIGHT );
|
||||
m_LargeBanner.SetName( "LargeBanner" );
|
||||
ActorUtil::LoadAllCommands( m_LargeBanner, m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_LargeBanner );
|
||||
this->AddChild( &m_LargeBanner );
|
||||
|
||||
m_sprLargeBannerFrame.Load( THEME->GetPathG(m_sName,"banner frame") );
|
||||
m_sprLargeBannerFrame->SetName( "LargeBannerFrame" );
|
||||
ActorUtil::LoadAllCommands( *m_sprLargeBannerFrame, m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_sprLargeBannerFrame );
|
||||
this->AddChild( m_sprLargeBannerFrame );
|
||||
}
|
||||
@@ -316,7 +312,6 @@ void ScreenEvaluation::Init()
|
||||
else
|
||||
m_DifficultyIcon[p].SetFromSteps( p, GAMESTATE->m_pCurSteps[p] );
|
||||
m_DifficultyIcon[p].SetName( ssprintf("DifficultyIconP%d",p+1) );
|
||||
ActorUtil::LoadAllCommands( m_DifficultyIcon[p], m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_DifficultyIcon[p] );
|
||||
this->AddChild( &m_DifficultyIcon[p] );
|
||||
|
||||
@@ -326,13 +321,11 @@ void ScreenEvaluation::Init()
|
||||
m_DifficultyMeter[p].SetFromTrail( GAMESTATE->m_pCurTrail[p] );
|
||||
else
|
||||
m_DifficultyMeter[p].SetFromSteps( GAMESTATE->m_pCurSteps[p] );
|
||||
ActorUtil::LoadAllCommands( m_DifficultyMeter[p], m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_DifficultyMeter[p] );
|
||||
this->AddChild( &m_DifficultyMeter[p] );
|
||||
|
||||
m_textPlayerOptions[p].LoadFromFont( THEME->GetPathF(m_sName,"PlayerOptions") );
|
||||
m_textPlayerOptions[p].SetName( ssprintf("PlayerOptionsP%d",p+1) );
|
||||
ActorUtil::LoadAllCommands( m_textPlayerOptions[p], m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_textPlayerOptions[p] );
|
||||
vector<RString> v;
|
||||
GAMESTATE->m_pPlayerState[p]->m_PlayerOptions.GetStage().GetLocalizedMods( v );
|
||||
@@ -352,14 +345,12 @@ void ScreenEvaluation::Init()
|
||||
{
|
||||
m_sprGradeFrame[p].Load( THEME->GetPathG(m_sName,ssprintf("grade frame p%d",p+1)) );
|
||||
m_sprGradeFrame[p]->SetName( ssprintf("GradeFrameP%d",p+1) );
|
||||
ActorUtil::LoadAllCommands( *m_sprGradeFrame[p], m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_sprGradeFrame[p] );
|
||||
this->AddChild( m_sprGradeFrame[p] );
|
||||
|
||||
m_Grades[p].Load( THEME->GetPathG(m_sName,"grades") );
|
||||
m_Grades[p].SetGrade( p, grade[p] );
|
||||
m_Grades[p].SetName( ssprintf("GradeP%d",p+1) );
|
||||
ActorUtil::LoadAllCommands( m_Grades[p], m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_Grades[p] );
|
||||
this->AddChild( &m_Grades[p] );
|
||||
}
|
||||
@@ -374,7 +365,6 @@ void ScreenEvaluation::Init()
|
||||
{
|
||||
m_sprPercentFrame[p].Load( THEME->GetPathG(m_sName,ssprintf("percent frame p%d",p+1)) );
|
||||
m_sprPercentFrame[p]->SetName( ssprintf("PercentFrameP%d",p+1) );
|
||||
ActorUtil::LoadAllCommands( *m_sprPercentFrame[p], m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_sprPercentFrame[p] );
|
||||
this->AddChild( m_sprPercentFrame[p] );
|
||||
|
||||
@@ -382,7 +372,6 @@ void ScreenEvaluation::Init()
|
||||
* tween it with "PercentP1X", etc. */
|
||||
m_Percent[p].SetName( ssprintf("PercentP%d",p+1) );
|
||||
m_Percent[p].Load( GAMESTATE->m_pPlayerState[p], &STATSMAN->m_CurStageStats.m_player[p], "ScreenEvaluation Percent", true );
|
||||
ActorUtil::LoadAllCommands( m_Percent[p], m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_Percent[p] );
|
||||
this->AddChild( &m_Percent[p] );
|
||||
}
|
||||
@@ -397,7 +386,6 @@ void ScreenEvaluation::Init()
|
||||
{
|
||||
m_sprBonusFrame[p].Load( THEME->GetPathG(m_sName,ssprintf("bonus frame p%d",p+1)) );
|
||||
m_sprBonusFrame[p]->SetName( ssprintf("BonusFrameP%d",p+1) );
|
||||
ActorUtil::LoadAllCommands( *m_sprBonusFrame[p], m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_sprBonusFrame[p] );
|
||||
this->AddChild( m_sprBonusFrame[p] );
|
||||
|
||||
@@ -406,7 +394,6 @@ void ScreenEvaluation::Init()
|
||||
m_sprPossibleBar[p][r].Load( THEME->GetPathG(m_sName,ssprintf("bar possible p%d",p+1)) );
|
||||
m_sprPossibleBar[p][r].SetWidth( m_sprPossibleBar[p][r].GetUnzoomedWidth() * STATSMAN->m_CurStageStats.m_player[p].m_radarPossible[r] );
|
||||
m_sprPossibleBar[p][r].SetName( ssprintf("BarPossible%dP%d",r+1,p+1) );
|
||||
ActorUtil::LoadAllCommands( m_sprPossibleBar[p][r], m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_sprPossibleBar[p][r] );
|
||||
this->AddChild( &m_sprPossibleBar[p][r] );
|
||||
|
||||
@@ -418,7 +405,6 @@ void ScreenEvaluation::Init()
|
||||
LOG->Trace("Radar bar %d of 5 - %f percent", r, value);
|
||||
|
||||
m_sprActualBar[p][r].SetName( ssprintf("BarActual%dP%d",r+1,p+1) );
|
||||
ActorUtil::LoadAllCommands( m_sprActualBar[p][r], m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_sprActualBar[p][r] );
|
||||
|
||||
// .99999 is fairly close to 1.00, so we use that
|
||||
@@ -438,7 +424,6 @@ void ScreenEvaluation::Init()
|
||||
{
|
||||
m_sprSurvivedFrame[p].Load( THEME->GetPathG(m_sName,ssprintf("survived frame p%d",p+1)) );
|
||||
m_sprSurvivedFrame[p]->SetName( ssprintf("SurvivedFrameP%d",p+1) );
|
||||
ActorUtil::LoadAllCommands( *m_sprSurvivedFrame[p], m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_sprSurvivedFrame[p] );
|
||||
this->AddChild( m_sprSurvivedFrame[p] );
|
||||
|
||||
@@ -448,7 +433,6 @@ void ScreenEvaluation::Init()
|
||||
// Should be accurate, but I'm not sure if its "standard" that (bool)true = 1. (assumption)
|
||||
m_textSurvivedNumber[p].SetText( ssprintf("%02d", STATSMAN->m_CurStageStats.m_player[p].m_iSongsPassed) );
|
||||
m_textSurvivedNumber[p].SetName( ssprintf("SurvivedNumberP%d",p+1) );
|
||||
ActorUtil::LoadAllCommands( m_textSurvivedNumber[p], m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_textSurvivedNumber[p] );
|
||||
this->AddChild( &m_textSurvivedNumber[p] );
|
||||
}
|
||||
@@ -463,7 +447,6 @@ void ScreenEvaluation::Init()
|
||||
{
|
||||
m_sprWinFrame[p].Load( THEME->GetPathG(m_sName,ssprintf("win frame p%d",p+1)) );
|
||||
m_sprWinFrame[p]->SetName( ssprintf("WinFrameP%d",p+1) );
|
||||
ActorUtil::LoadAllCommands( *m_sprWinFrame[p], m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_sprWinFrame[p] );
|
||||
this->AddChild( m_sprWinFrame[p] );
|
||||
|
||||
@@ -472,7 +455,6 @@ void ScreenEvaluation::Init()
|
||||
int iFrame = GAMESTATE->GetStageResult( p );
|
||||
m_sprWin[p].SetState( iFrame );
|
||||
m_sprWin[p].SetName( ssprintf("WinP%d",p+1) );
|
||||
ActorUtil::LoadAllCommands( m_sprWin[p], m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_sprWin[p] );
|
||||
this->AddChild( &m_sprWin[p] );
|
||||
}
|
||||
@@ -494,7 +476,6 @@ void ScreenEvaluation::Init()
|
||||
m_sprJudgeLabels[l].StopAnimating();
|
||||
m_sprJudgeLabels[l].SetState( l );
|
||||
m_sprJudgeLabels[l].SetName( JudgeLineToString(l)+"Label" );
|
||||
ActorUtil::LoadAllCommands( m_sprJudgeLabels[l], m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_sprJudgeLabels[l] );
|
||||
this->AddChild( &m_sprJudgeLabels[l] );
|
||||
}
|
||||
@@ -505,7 +486,6 @@ void ScreenEvaluation::Init()
|
||||
m_textJudgeNumbers[l][p].SetShadowLength( 0 );
|
||||
m_textJudgeNumbers[l][p].RunCommands( CommonMetrics::PLAYER_COLOR.GetValue(p) );
|
||||
m_textJudgeNumbers[l][p].SetName( JudgeLineToString(l)+ssprintf("NumberP%d",p+1) );
|
||||
ActorUtil::LoadAllCommands( m_textJudgeNumbers[l][p], m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_textJudgeNumbers[l][p] );
|
||||
this->AddChild( &m_textJudgeNumbers[l][p] );
|
||||
|
||||
@@ -540,7 +520,6 @@ void ScreenEvaluation::Init()
|
||||
m_sprStatsLabel[l].Load( THEME->GetPathG(m_sName,"label "+StatLineToString(l)) );
|
||||
m_sprStatsLabel[l]->StopAnimating();
|
||||
m_sprStatsLabel[l]->SetName( StatLineToString(l)+"Label" );
|
||||
ActorUtil::LoadAllCommands( *m_sprStatsLabel[l], m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_sprStatsLabel[l] );
|
||||
this->AddChild( m_sprStatsLabel[l] );
|
||||
}
|
||||
@@ -550,7 +529,6 @@ void ScreenEvaluation::Init()
|
||||
m_textStatsText[l][p].LoadFromFont( THEME->GetPathF(m_sName,"stats") );
|
||||
m_textStatsText[l][p].RunCommands( CommonMetrics::PLAYER_COLOR.GetValue(p) );
|
||||
m_textStatsText[l][p].SetName( StatLineToString(l)+ssprintf("TextP%d",p+1) );
|
||||
ActorUtil::LoadAllCommands( m_textStatsText[l][p], m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_textStatsText[l][p] );
|
||||
this->AddChild( &m_textStatsText[l][p] );
|
||||
|
||||
@@ -573,7 +551,6 @@ void ScreenEvaluation::Init()
|
||||
{
|
||||
m_sprScoreLabel.Load( THEME->GetPathG(m_sName,"score label") );
|
||||
m_sprScoreLabel->SetName( "ScoreLabel" );
|
||||
ActorUtil::LoadAllCommands( *m_sprScoreLabel, m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_sprScoreLabel );
|
||||
this->AddChild( m_sprScoreLabel );
|
||||
|
||||
@@ -583,7 +560,6 @@ void ScreenEvaluation::Init()
|
||||
m_textScore[p].SetShadowLength( 0 );
|
||||
m_textScore[p].RunCommands( CommonMetrics::PLAYER_COLOR.GetValue(p) );
|
||||
m_textScore[p].SetName( ssprintf("ScoreNumberP%d",p+1) );
|
||||
ActorUtil::LoadAllCommands( m_textScore[p], m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_textScore[p] );
|
||||
m_textScore[p].SetText( ssprintf("%*.0i", NUM_SCORE_DIGITS, STATSMAN->m_CurStageStats.m_player[p].m_iScore) );
|
||||
this->AddChild( &m_textScore[p] );
|
||||
@@ -594,7 +570,6 @@ void ScreenEvaluation::Init()
|
||||
{
|
||||
m_sprTotalScoreLabel.Load( THEME->GetPathG(m_sName,"totalscore label") );
|
||||
m_sprTotalScoreLabel->SetName( "TotalScoreLabel" );
|
||||
ActorUtil::LoadAllCommands( *m_sprTotalScoreLabel, m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_sprTotalScoreLabel );
|
||||
this->AddChild( m_sprTotalScoreLabel );
|
||||
|
||||
@@ -611,7 +586,6 @@ void ScreenEvaluation::Init()
|
||||
m_textTotalScore[p].RunCommands( CommonMetrics::PLAYER_COLOR.GetValue(p) );
|
||||
m_textTotalScore[p].SetName( ssprintf("TotalScoreNumberP%d",p+1) );
|
||||
m_textTotalScore[p].SetText( ssprintf("%*.0i", NUM_SCORE_DIGITS+2, iTotalScore) );
|
||||
ActorUtil::LoadAllCommands( m_textTotalScore[p], m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_textTotalScore[p] );
|
||||
|
||||
this->AddChild( &m_textTotalScore[p] );
|
||||
@@ -625,7 +599,6 @@ void ScreenEvaluation::Init()
|
||||
{
|
||||
m_sprTimeLabel.Load( THEME->GetPathG(m_sName,"time label") );
|
||||
m_sprTimeLabel->SetName( "TimeLabel" );
|
||||
ActorUtil::LoadAllCommands( *m_sprTimeLabel, m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_sprTimeLabel );
|
||||
this->AddChild( m_sprTimeLabel );
|
||||
|
||||
@@ -635,7 +608,6 @@ void ScreenEvaluation::Init()
|
||||
m_textTime[p].SetShadowLength( 0 );
|
||||
m_textTime[p].RunCommands( CommonMetrics::PLAYER_COLOR.GetValue(p) );
|
||||
m_textTime[p].SetName( ssprintf("TimeNumberP%d",p+1) );
|
||||
ActorUtil::LoadAllCommands( m_textTime[p], m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_textTime[p] );
|
||||
m_textTime[p].SetText( SecondsToMMSSMsMs(STATSMAN->m_CurStageStats.m_player[p].m_fAliveSeconds) );
|
||||
this->AddChild( &m_textTime[p] );
|
||||
@@ -654,7 +626,6 @@ void ScreenEvaluation::Init()
|
||||
{
|
||||
m_sprMachineRecord[p].Load( THEME->GetPathG( m_sName, ssprintf("MachineRecord %02d",STATSMAN->m_CurStageStats.m_player[p].m_iMachineHighScoreIndex+1) ) );
|
||||
m_sprMachineRecord[p]->SetName( ssprintf("MachineRecordP%d",p+1) );
|
||||
ActorUtil::LoadAllCommands( *m_sprMachineRecord[p], m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_sprMachineRecord[p] );
|
||||
this->AddChild( m_sprMachineRecord[p] );
|
||||
}
|
||||
@@ -662,7 +633,6 @@ void ScreenEvaluation::Init()
|
||||
{
|
||||
m_sprPersonalRecord[p].Load( THEME->GetPathG( m_sName, ssprintf("PersonalRecord %02d",STATSMAN->m_CurStageStats.m_player[p].m_iPersonalHighScoreIndex+1) ) );
|
||||
m_sprPersonalRecord[p]->SetName( ssprintf("PersonalRecordP%d",p+1) );
|
||||
ActorUtil::LoadAllCommands( *m_sprPersonalRecord[p], m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_sprPersonalRecord[p] );
|
||||
this->AddChild( m_sprPersonalRecord[p] );
|
||||
}
|
||||
@@ -682,7 +652,6 @@ void ScreenEvaluation::Init()
|
||||
{
|
||||
m_sprTryExtraStage.Load( THEME->GetPathG(m_sName,GAMESTATE->IsExtraStage()?"try extra2":"try extra1") );
|
||||
m_sprTryExtraStage->SetName( "TryExtraStage" );
|
||||
ActorUtil::LoadAllCommands( *m_sprTryExtraStage, m_sName );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_sprTryExtraStage );
|
||||
this->AddChild( m_sprTryExtraStage );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user