Please use real names in copyright notices, not aliases.

Minor cleanup: Indent of 4.  Use ssprintf, not sprintf.  Fix warnings.  Use
SET_XY.
This commit is contained in:
Glenn Maynard
2003-07-08 23:48:51 +00:00
parent e3eb9b4e50
commit a61a803ced
+7 -22
View File
@@ -28,39 +28,24 @@ ScreenUnlock::ScreenUnlock() : ScreenAttract("ScreenUnlock")
for(int i=1; i <= THEME->GetMetricI("ScreenUnlock", "NumUnlocks"); i++)
{
// new unlock graphic
char filename[30];
sprintf(filename, "UnlockGraphic%d", i);
Unlocks[i].Load( THEME->GetPathToG(filename) );
sprintf(filename, "Unlock%d", i);
PointsUntilNextUnlock.SetXY(
THEME->GetMetricI("ScreenUnlock",ssprintf("Unlock%dX", i)),
THEME->GetMetricI("ScreenUnlock",ssprintf("Unlock%dX", i)) );
Unlocks[i].Load( THEME->GetPathToG(ssprintf("UnlockGraphic%d", i)) );
Unlocks[i].SetName( ssprintf("Unlock%d",i) );
SET_XY( Unlocks[i] );
UtilSetXY( Unlocks[i], "ScreenUnlock" );
if (!GAMESTATE->m_pUnlockingSys->SongIsLocked
(THEME->GetMetric
("ScreenUnlock", ssprintf
("Unlock%dSong", i))))
const bool SongIsLocked = GAMESTATE->m_pUnlockingSys->SongIsLocked
(THEME->GetMetric("ScreenUnlock", ssprintf("Unlock%dSong", i)));
if ( !SongIsLocked )
this->AddChild(&Unlocks[i]);
}
/* Remove the decimal
if( sDP.Find(".",1) > 0 )
{
sDP = sDP.Left(sDP.Find(".",1));
} no longer necessary since its an int*/
// No negative numbers
if( sDP.Left(1) == "-" )
sDP = "*";
PointsUntilNextUnlock.SetName( "DancePointsDisplay" );
PointsUntilNextUnlock.SetText( sDP );
PointsUntilNextUnlock.SetZoom( THEME->GetMetricF("ScreenUnlock","DancePointsZoom") );
PointsUntilNextUnlock.SetXY( THEME->GetMetricI("ScreenUnlock","DancePointsDisplayX"), THEME->GetMetricI("ScreenUnlock","DancePointsDisplayY") );
SET_XY( PointsUntilNextUnlock );
this->AddChild( &PointsUntilNextUnlock );
}