fixing broken Ez2 code - part I ( reaches game screen now )

This commit is contained in:
Bruno Figueiredo
2002-07-30 01:45:18 +00:00
parent 9ade2f771e
commit 378d27a3ed
3 changed files with 31 additions and 21 deletions
+5 -1
View File
@@ -90,7 +90,11 @@ void Actor::Draw() // set the world matrix and calculate actor properties, the
* 2.0f * D3DX_PI );
break;
case spinning:
ASSERT( false ); // ugh. What was here before!
//ASSERT( false );
// ugh. What was here before!
// BBF update: This was here before (till revision 1.16):
// nothing special needed
break;
case vibrating:
m_temp_pos.x += m_fVibrationDistance * randomf(-1.0f, 1.0f) * GetZoom();
+2 -2
View File
@@ -61,7 +61,7 @@ ScreenEz2SelectPlayer::ScreenEz2SelectPlayer()
LOG->WriteLine( "ScreenEz2SelectPlayer::ScreenEz2SelectPlayer()" );
ez2_lasttimercheck[0] = TIMER->GetTimeSinceStart();
ez2_lasttimercheck[1] = 0.0f;
m_iSelectedStyle=0;
m_iSelectedStyle=3; // by bbf: frieza, was this supposed to be 3 ?
GAMESTATE->m_CurStyle = STYLE_NONE;
GAMESTATE->m_MasterPlayerNumber = PLAYER_INVALID;
@@ -284,7 +284,7 @@ presses the button bound to start
void ScreenEz2SelectPlayer::MenuStart( PlayerNumber p )
{
//disallow multiple presses of the menu start.
if (m_iSelectedStyle == 0 && p == PLAYER_1 || m_iSelectedStyle == 1 && p == PLAYER_2)
if ( (m_iSelectedStyle == 0 && p == PLAYER_1) || (m_iSelectedStyle == 1 && p == PLAYER_2))
{
return;
}
+24 -18
View File
@@ -167,14 +167,16 @@ ScreenGameplay::ScreenGameplay()
m_pLifeMeter[p]->Load( (PlayerNumber)p );
m_pLifeMeter[p]->SetXY( LIFE_LOCAL_X[p], LIFE_LOCAL_Y[p] );
m_frameTop.AddSubActor( m_pLifeMeter[p] );
if( GAMESTATE->m_CurGame == GAME_EZ2 )
{
{
m_pScoreDisplay[p] = new ScoreDisplayNormal;
m_pScoreDisplay[p]->SetXY( SCORE_LOCALEZ2_X[p], SCORE_LOCALEZ2_Y[p] );
m_pScoreDisplay[p]->SetZoom( 0.5f );
m_pScoreDisplay[p]->SetDiffuseColor( PlayerToColor(p) );
m_frameTop.AddSubActor( m_pScoreDisplay[p] );
}
}
// TopFrame goes above LifeMeter
@@ -224,29 +226,33 @@ ScreenGameplay::ScreenGameplay()
for( p=0; p<NUM_PLAYERS; p++ )
{
switch( GAMESTATE->m_PlayMode )
if( GAMESTATE->m_CurGame != GAME_EZ2 )
{
case PLAY_MODE_ARCADE:
m_pScoreDisplay[p] = new ScoreDisplayNormal;
break;
case PLAY_MODE_ONI:
case PLAY_MODE_ENDLESS:
m_pScoreDisplay[p] = new ScoreDisplayOni;
break;
default:
ASSERT(0);
}
switch( GAMESTATE->m_PlayMode )
{
case PLAY_MODE_ARCADE:
m_pScoreDisplay[p] = new ScoreDisplayNormal;
break;
case PLAY_MODE_ONI:
case PLAY_MODE_ENDLESS:
m_pScoreDisplay[p] = new ScoreDisplayOni;
break;
default:
ASSERT(0);
}
m_pScoreDisplay[p]->Init( (PlayerNumber)p );
m_pScoreDisplay[p]->SetXY( SCORE_LOCAL_X[p], SCORE_LOCAL_Y[p] );
m_pScoreDisplay[p]->SetZoom( 0.8f );
m_pScoreDisplay[p]->SetDiffuseColor( PlayerToColor(p) );
m_frameBottom.AddSubActor( m_pScoreDisplay[p] );
m_pScoreDisplay[p]->Init( (PlayerNumber)p );
m_pScoreDisplay[p]->SetXY( SCORE_LOCAL_X[p], SCORE_LOCAL_Y[p] );
m_pScoreDisplay[p]->SetZoom( 0.8f );
m_pScoreDisplay[p]->SetDiffuseColor( PlayerToColor(p) );
m_frameBottom.AddSubActor( m_pScoreDisplay[p] );
}
m_textPlayerOptions[p].Load( THEME->GetPathTo(FONT_NORMAL) );
if( !GAMESTATE->IsPlayerEnabled(PlayerNumber(p)) )
continue;
if( GAMESTATE->m_CurGame != GAME_EZ2 )
{
m_pScoreDisplay[p]->SetXY( SCORE_LOCAL_X[p], SCORE_LOCAL_Y[p] );