minor fixes. switch() is a bit cleaner

This commit is contained in:
Kevin Slaughter
2003-09-11 08:46:12 +00:00
parent 9a6b4560b1
commit 6dbf9e83b1
2 changed files with 14 additions and 20 deletions
+12 -18
View File
@@ -91,15 +91,14 @@ bool BeginnerHelper::CanUse()
return false;
if( GAMESTATE->m_CurGame != GAME_DANCE )
return false;
if( GAMESTATE->m_CurStyle == STYLE_DANCE_SOLO )
return false;
// not sure how this could happen, since double steps should be
// basic/light or higher, but lets check for it anyway.
if( GAMESTATE->m_CurStyle == STYLE_DANCE_DOUBLE )
return false;
if( GAMESTATE->m_pCharacters.size() == 0 )
return false;
switch (GAMESTATE->m_CurStyle)
{
case STYLE_DANCE_SOLO:
case STYLE_DANCE_DOUBLE: return false; break;
}
return true;
}
@@ -111,8 +110,11 @@ bool BeginnerHelper::Initialize( int iDancePadType )
return false;
// Load the StepCircle, Background, and flash animation
m_sBackground.Load( THEME->GetPathToG("BeginnerHelper background") );
m_sBackground.SetXY( CENTER_X, CENTER_Y);
if( m_bShowBackground )
{
m_sBackground.Load( THEME->GetPathToG("BeginnerHelper background") );
m_sBackground.SetXY( CENTER_X, CENTER_Y);
}
m_sFlash.Load( THEME->GetPathToG("BeginnerHelper flash") );
m_sFlash.SetXY( CENTER_X, CENTER_Y );
@@ -129,16 +131,8 @@ bool BeginnerHelper::Initialize( int iDancePadType )
switch(iDancePadType)
{
case 0: break; // No pad
case 1:
if (!DoesFileExist("Characters" SLASH "DancePad-DDR.txt") )
return false; // can't initialize without the required pad model. bail
m_mDancePad.LoadMilkshapeAscii( "Characters" SLASH "DancePad-DDR.txt" );
break;
case 2:
if (!DoesFileExist("Characters" SLASH "DancePads-DDR.txt") )
return false; // can't initialize without the required pad model. bail
m_mDancePad.LoadMilkshapeAscii( "Characters" SLASH "DancePads-DDR.txt" );
break;
case 1: m_mDancePad.LoadMilkshapeAscii( "Characters" SLASH "DancePad-DDR.txt" ); break;
case 2: m_mDancePad.LoadMilkshapeAscii( "Characters" SLASH "DancePads-DDR.txt" ); break;
}
m_mDancePad.SetHorizAlign( align_left );
m_mDancePad.SetRotationX( DANCEPAD_ANGLE );
+2 -2
View File
@@ -14,8 +14,6 @@ public:
BeginnerHelper();
~BeginnerHelper();
ActorFrame m_afDancerSuite; // So we can easily rotate or whatever without disturbing the Background.
void FlashOnce();
bool Initialize( int iDancePadType );
bool IsInitialized() { return m_bInitialized; }
@@ -26,6 +24,8 @@ public:
void TurnFlashOff();
void TurnFlashOn();
bool m_bShowBackground;
void Update( float fDeltaTime );
virtual void DrawPrimitives();