Move ez2 actors out of m_frameStage; only use that for the
stage number actors. Remove the m_frameStage ez2 special case; just put m_frameStage on top.
This commit is contained in:
@@ -102,7 +102,6 @@ ScreenStage::ScreenStage()
|
|||||||
//
|
//
|
||||||
this->AddChild( &m_sprSongBackground ); // add background first so it draws bottom-most
|
this->AddChild( &m_sprSongBackground ); // add background first so it draws bottom-most
|
||||||
this->AddChild( &m_quadMask ); // add quad mask before stage so that it will block out the stage sprites
|
this->AddChild( &m_quadMask ); // add quad mask before stage so that it will block out the stage sprites
|
||||||
this->AddChild( &m_frameStage );
|
|
||||||
|
|
||||||
for( int i=0; i<4; i++ )
|
for( int i=0; i<4; i++ )
|
||||||
{
|
{
|
||||||
@@ -170,13 +169,10 @@ ScreenStage::ScreenStage()
|
|||||||
}
|
}
|
||||||
m_sprStage.SetX( fStageCenterX );
|
m_sprStage.SetX( fStageCenterX );
|
||||||
|
|
||||||
if ( g_StageType != STAGE_TYPE_EZ2 ) // Ez2dancer MUST have this graphic on-top
|
|
||||||
{
|
|
||||||
for( i=0; i<iNumChars; i++ )
|
for( i=0; i<iNumChars; i++ )
|
||||||
m_frameStage.AddChild( &m_sprNumbers[i] );
|
m_frameStage.AddChild( &m_sprNumbers[i] );
|
||||||
m_frameStage.AddChild( &m_sprStage );
|
m_frameStage.AddChild( &m_sprStage );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case MODE_FINAL:
|
case MODE_FINAL:
|
||||||
m_sprStage.Load( THEME->GetPathTo("Graphics","stage final") );
|
m_sprStage.Load( THEME->GetPathTo("Graphics","stage final") );
|
||||||
@@ -216,7 +212,8 @@ ScreenStage::ScreenStage()
|
|||||||
const float fStageOffScreenY = CENTER_Y+fStageHeight;
|
const float fStageOffScreenY = CENTER_Y+fStageHeight;
|
||||||
|
|
||||||
m_quadMask.SetDiffuse( D3DXCOLOR(0,0,0,0) );
|
m_quadMask.SetDiffuse( D3DXCOLOR(0,0,0,0) );
|
||||||
m_quadMask.StretchTo( CRect(SCREEN_LEFT, roundf(fStageOffScreenY-fStageHeight/2), SCREEN_RIGHT, roundf(fStageOffScreenY+fStageHeight/2)) );
|
m_quadMask.StretchTo( CRect(SCREEN_LEFT, roundf(fStageOffScreenY-fStageHeight/2),
|
||||||
|
SCREEN_RIGHT, roundf(fStageOffScreenY+fStageHeight/2)) );
|
||||||
m_quadMask.SetZ( -1 ); // important: fill Z buffer with values that will cause subsequent draws to fail the Z test
|
m_quadMask.SetZ( -1 ); // important: fill Z buffer with values that will cause subsequent draws to fail the Z test
|
||||||
|
|
||||||
m_frameStage.SetXY( CENTER_X, fStageOffScreenY );
|
m_frameStage.SetXY( CENTER_X, fStageOffScreenY );
|
||||||
@@ -357,15 +354,11 @@ ScreenStage::ScreenStage()
|
|||||||
m_sprbg[2].SetTweenX( CENTER_X );
|
m_sprbg[2].SetTweenX( CENTER_X );
|
||||||
m_sprbg[2].SetTweenRotationZ( 0 );
|
m_sprbg[2].SetTweenRotationZ( 0 );
|
||||||
|
|
||||||
for (i=3; i>=0; i--) // work backwards as we wanna add em in reverse
|
for (i = 3; i >= 0; i--) // add them backwards
|
||||||
{
|
AddChild( &m_sprbg[i] );
|
||||||
m_frameStage.AddChild( &m_sprbg[i] );
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stage_mode == MODE_FINAL) // if we're in FINAL add that extra background element mentioned earlier.
|
if (stage_mode == MODE_FINAL) // if we're in FINAL add that extra background element mentioned earlier.
|
||||||
{
|
AddChild( &m_sprbgxtra );
|
||||||
m_frameStage.AddChild( &m_sprbgxtra );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////
|
/////////////////////////
|
||||||
@@ -426,8 +419,8 @@ ScreenStage::ScreenStage()
|
|||||||
|
|
||||||
for (i=0; i<2; i++) // add the actors
|
for (i=0; i<2; i++) // add the actors
|
||||||
{
|
{
|
||||||
m_frameStage.AddChild( &m_ez2ukm[i] );
|
AddChild( &m_ez2ukm[i] );
|
||||||
m_frameStage.AddChild( &m_stagedesc[i] );
|
AddChild( &m_stagedesc[i] );
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////
|
//////////////////////////////
|
||||||
@@ -478,7 +471,7 @@ ScreenStage::ScreenStage()
|
|||||||
else // set 2
|
else // set 2
|
||||||
m_sprScrollingBlobs[j][i].SetTweenX(CENTER_X+(SCREEN_WIDTH/2)+30-70-(i*30.0f));
|
m_sprScrollingBlobs[j][i].SetTweenX(CENTER_X+(SCREEN_WIDTH/2)+30-70-(i*30.0f));
|
||||||
|
|
||||||
m_frameStage.AddChild( &m_sprScrollingBlobs[j][i] ); // add the actor
|
AddChild( &m_sprScrollingBlobs[j][i] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -532,20 +525,17 @@ ScreenStage::ScreenStage()
|
|||||||
m_stagename.BeginTweening(0.5f); // start tweening them to their new home
|
m_stagename.BeginTweening(0.5f); // start tweening them to their new home
|
||||||
|
|
||||||
m_stagename.SetTweenX(CENTER_X+70); // set their new locations
|
m_stagename.SetTweenX(CENTER_X+70); // set their new locations
|
||||||
m_frameStage.AddChild( &m_stagename ); //add the actor
|
AddChild( &m_stagename ); //add the actor
|
||||||
//////////////////////////////
|
//////////////////////////////
|
||||||
// END stage name //
|
// END stage name //
|
||||||
//////////////////////////////
|
//////////////////////////////
|
||||||
|
|
||||||
// Add in the number graphics that were neglected earlier
|
|
||||||
CString sStageNo = ssprintf("%d", iStageNo);
|
|
||||||
const int iNumChars = sStageNo.GetLength()+1;
|
|
||||||
for( i=0; i<iNumChars; i++ )
|
|
||||||
m_frameStage.AddChild( &m_sprNumbers[i] );
|
|
||||||
m_frameStage.AddChild( &m_sprStage );
|
|
||||||
m_sprStage.SetZoom( 0 ); // hide this element for Ez2 :)
|
m_sprStage.SetZoom( 0 ); // hide this element for Ez2 :)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Add this last, so it's on top (except for the QuadMask, due to SetZ) */
|
||||||
|
this->AddChild( &m_frameStage );
|
||||||
|
|
||||||
this->SendScreenMessage( SM_DoneFadingIn, 1.0f );
|
this->SendScreenMessage( SM_DoneFadingIn, 1.0f );
|
||||||
this->SendScreenMessage( SM_StartFadingOut, 4.0f );
|
this->SendScreenMessage( SM_StartFadingOut, 4.0f );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,9 +28,11 @@ private:
|
|||||||
|
|
||||||
// Common Elements
|
// Common Elements
|
||||||
|
|
||||||
ActorFrame m_frameStage;
|
|
||||||
Sprite m_sprNumbers[4]; // up to 3 numbers and suffix
|
Sprite m_sprNumbers[4]; // up to 3 numbers and suffix
|
||||||
Sprite m_sprStage; // "Stage", "Final Stage", etc.
|
Sprite m_sprStage; // "Stage", "Final Stage", etc.
|
||||||
|
/* A frame for m_sprNumbers and m_sprStage, so they can be
|
||||||
|
* manipulated as a unit. */
|
||||||
|
ActorFrame m_frameStage;
|
||||||
|
|
||||||
// Ez2 Elements
|
// Ez2 Elements
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user