fix compile errors

This commit is contained in:
Chris Danford
2003-03-09 01:31:15 +00:00
parent 31aa613295
commit 769dac616f
6 changed files with 51 additions and 593 deletions
+24 -18
View File
@@ -30,11 +30,11 @@ const float LOCK_INPUT_TIME = 0.30f; // lock input while waiting for tweening to
#define CURSOR_OFFSET_EX_X( p ) THEME->GetMetricF("ScreenSelectDifficultyEX",ssprintf("CursorOffsetP%dX",p+1))
#define CURSOR_OFFSET_EX_Y( i ) THEME->GetMetricF("ScreenSelectDifficultyEX",ssprintf("CursorOffsetP%dY",i+1))
#define INITIAL_CHOICE THEME->GetMetricI("ScreenSelectDifficultyEX","InitialChoice")
#define HELP_TEXT THEME->GetMetric ("ScreenSelectDifficultyEX","HelpText")
#define HELP_TEXT THEME->GetMetric("ScreenSelectDifficultyEX","HelpText")
#define TIMER_SECONDS THEME->GetMetricI("ScreenSelectDifficultyEX","TimerSeconds")
#define NEXT_SCREEN_ARCADE THEME->GetMetric ("ScreenSelectDifficultyEX","NextScreenArcade")
#define NEXT_SCREEN_ONI THEME->GetMetric ("ScreenSelectDifficultyEX","NextScreenOni")
#define NEXT_SCREEN_BATTLE THEME->GetMetric ("ScreenSelectDifficultyEX","NextScreenBattle")
#define NEXT_SCREEN_ARCADE THEME->GetMetric("ScreenSelectDifficultyEX","NextScreenArcade")
#define NEXT_SCREEN_ONI THEME->GetMetric("ScreenSelectDifficultyEX","NextScreenOni")
#define NEXT_SCREEN_BATTLE THEME->GetMetric("ScreenSelectDifficultyEX","NextScreenBattle")
const CString CHOICE_TEXT[ScreenSelectDifficultyEX::NUM_CHOICES_EX] =
@@ -54,6 +54,8 @@ float CURSOR_EX_X( int p ) { return DIFFICULTY_X(p) + CURSOR_OFFSET_EX_X(p); }
float CURSOR_EX_Y( int p ) { return DIFFICULTY_Y(p) + CURSOR_OFFSET_EX_Y(p); }
const ScreenMessage SM_StartTweeningOffScreen = ScreenMessage(SM_User + 3);
const ScreenMessage SM_StartFadingOut = ScreenMessage(SM_User + 4);
ScreenSelectDifficultyEX::ScreenSelectDifficultyEX()
@@ -64,15 +66,15 @@ ScreenSelectDifficultyEX::ScreenSelectDifficultyEX()
GAMESTATE->m_PlayMode = PLAY_MODE_INVALID;
m_Menu.Load( "SelectDifficultyEx" );
m_Menu.Load("ScreenSelectDifficultyEx");
this->AddChild( &m_Menu );
for( unsigned c=0; c<NUM_PLAYERS; c++ )
{
if( GAMESTATE->IsPlayerEnabled(c) == true )
{
CString sHeaderFile = ssprintf( "SelectDifficultyEx header %s", CHOICE_TEXT[INITIAL_CHOICE].c_str() );
CString sPictureFile = ssprintf( "SelectDifficultyEx picture %s", CHOICE_TEXT[INITIAL_CHOICE].c_str() );
CString sHeaderFile = ssprintf( "select difficulty ex header %s", CHOICE_TEXT[INITIAL_CHOICE].c_str() );
CString sPictureFile = ssprintf( "select difficulty ex picture %s", CHOICE_TEXT[INITIAL_CHOICE].c_str() );
m_sprPicture[c].Load( THEME->GetPathTo("Graphics",sPictureFile) );
m_sprPicture[c].SetVertAlign( align_top );
@@ -95,14 +97,14 @@ ScreenSelectDifficultyEX::ScreenSelectDifficultyEX()
if( !GAMESTATE->IsPlayerEnabled((PlayerNumber)p) )
continue;
m_sprCursor[p].Load( THEME->GetPathTo("Graphics", "SelectDifficultyEx cursor 2x1") );
m_sprCursor[p].Load( THEME->GetPathTo("Graphics", "select difficulty ex cursor 2x1") );
m_sprCursor[p].SetXY( -1600, -1600 );
m_sprCursor[p].StopAnimating();
m_sprCursor[p].SetState( p );
m_sprCursor[p].EnableShadow( false );
m_framePages.AddChild( &m_sprCursor[p] );
m_sprOK[p].Load( THEME->GetPathTo("Graphics", "SelectDifficultyEx ok 2x1") );
m_sprOK[p].Load( THEME->GetPathTo("Graphics", "select difficulty ex ok 2x1") );
m_sprOK[p].SetState( p );
m_sprOK[p].StopAnimating();
m_sprOK[p].SetDiffuse( RageColor(1,1,1,0) );
@@ -111,15 +113,15 @@ ScreenSelectDifficultyEX::ScreenSelectDifficultyEX()
this->AddChild( &m_framePages );
m_soundChange.Load( THEME->GetPathTo("Sounds", "SelectDifficultyEx change") );
m_soundSelect.Load( THEME->GetPathTo("Sounds", "Common start") );
m_soundChange.Load( THEME->GetPathTo("Sounds", "select difficulty change") );
m_soundSelect.Load( THEME->GetPathTo("Sounds", "menu start") );
m_soundDifficult.Load( ANNOUNCER->GetPathTo("select difficulty challenge") );
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select difficulty intro") );
TweenOnScreen();
SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","SelectDifficultyEx music") );
SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","select difficulty music") );
m_fLockInputTime = LOCK_INPUT_TIME;
}
@@ -211,6 +213,13 @@ void ScreenSelectDifficultyEX::HandleScreenMessage( const ScreenMessage SM )
default: ASSERT(0);
}
break;
case SM_StartTweeningOffScreen:
TweenOffScreen();
this->SendScreenMessage( SM_StartFadingOut, 0.8f );
break;
case SM_StartFadingOut:
m_Menu.StartTransitioning( SM_GoToNextScreen );
break;
}
}
@@ -396,15 +405,12 @@ void ScreenSelectDifficultyEX::MenuStart( PlayerNumber pn )
// check to see if everyone has chosen
bool bAllChosen = true;
for( int p=0; p<NUM_PLAYERS; p++ )
{
if( GAMESTATE->IsPlayerEnabled((PlayerNumber)p) )
bAllChosen &= m_bChosen[p];
if( GAMESTATE->IsPlayerEnabled((PlayerNumber)p) && m_bChosen[p] == false )
return;
}
if( bAllChosen )
m_Menu.StartTransitioning( SM_GoToNextScreen );
this->SendScreenMessage( SM_StartTweeningOffScreen, 0.7f );
}
void ScreenSelectDifficultyEX::ShowSelected( PlayerNumber pv )