Some Ez2dancer Fixes, AND Breakages (sorry!!)
This commit is contained in:
@@ -242,7 +242,7 @@ void ScreenEz2SelectPlayer::MenuStart( PlayerNumber p )
|
|||||||
m_sprControllers[p].SetTweenZoomY( 0 );
|
m_sprControllers[p].SetTweenZoomY( 0 );
|
||||||
|
|
||||||
bool bBothSidesJoined = true;
|
bool bBothSidesJoined = true;
|
||||||
for( int pn=0; p<NUM_PLAYERS; pn++ )
|
for( int pn=0; pn<NUM_PLAYERS; pn++ )
|
||||||
if( !GAMESTATE->m_bSideIsJoined[pn] )
|
if( !GAMESTATE->m_bSideIsJoined[pn] )
|
||||||
bBothSidesJoined = false;
|
bBothSidesJoined = false;
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,20 @@ enum DStyles {
|
|||||||
DS_CLUB
|
DS_CLUB
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const float OPT_X[NUM_EZ2STYLE_GRAPHICS] = {
|
||||||
|
CENTER_X+200, // This is the pad X
|
||||||
|
CENTER_X-200, // This is the pad X
|
||||||
|
CENTER_X-198, // This is the 1p X
|
||||||
|
CENTER_X+195, // This is the 2p X
|
||||||
|
}; // tells us the default X position
|
||||||
|
const float OPT_Y[NUM_EZ2STYLE_GRAPHICS] = {
|
||||||
|
CENTER_Y+130,
|
||||||
|
CENTER_Y+130,
|
||||||
|
CENTER_Y+115,
|
||||||
|
CENTER_Y+115,
|
||||||
|
}; // tells us the default Y position
|
||||||
|
|
||||||
|
|
||||||
const float TWEEN_TIME = 0.35f;
|
const float TWEEN_TIME = 0.35f;
|
||||||
|
|
||||||
|
|
||||||
@@ -71,6 +85,7 @@ ScreenEz2SelectStyle::ScreenEz2SelectStyle()
|
|||||||
this->AddSubActor( &m_sprBackground[i] );
|
this->AddSubActor( &m_sprBackground[i] );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Setup The 1Player Scrolling List */
|
||||||
m_ScrList.SetNumberVisibleElements( 3 );
|
m_ScrList.SetNumberVisibleElements( 3 );
|
||||||
m_ScrList.CreateNewElement( "select style info game 2 style 1" );
|
m_ScrList.CreateNewElement( "select style info game 2 style 1" );
|
||||||
m_ScrList.CreateNewElement( "select style info game 2 style 2" );
|
m_ScrList.CreateNewElement( "select style info game 2 style 2" );
|
||||||
@@ -87,7 +102,48 @@ ScreenEz2SelectStyle::ScreenEz2SelectStyle()
|
|||||||
m_ScrList.SetXY(CENTER_X, CENTER_Y);
|
m_ScrList.SetXY(CENTER_X, CENTER_Y);
|
||||||
m_ScrList.SetCurrentPosition( DS_EASY );
|
m_ScrList.SetCurrentPosition( DS_EASY );
|
||||||
|
|
||||||
|
/* Setup the 2Player Scrolling List */
|
||||||
|
m_ScrList_2ply.SetNumberVisibleElements( 3 );
|
||||||
|
m_ScrList_2ply.CreateNewElement( "select style info game 2 style 1" );
|
||||||
|
m_ScrList_2ply.CreateNewElement( "select style info game 2 style 2" );
|
||||||
|
m_ScrList_2ply.CreateNewElement( "select style info game 2 style 3" ); // Excess so that the user is tricked into thinking
|
||||||
|
m_ScrList_2ply.CreateNewElement( "select style info game 2 style 1" ); // the list is infinite
|
||||||
|
m_ScrList_2ply.CreateNewElement( "select style info game 2 style 2" );
|
||||||
|
m_ScrList_2ply.CreateNewElement( "select style info game 2 style 3" );
|
||||||
|
m_ScrList_2ply.CreateNewElement( "select style info game 2 style 1" );
|
||||||
|
m_ScrList_2ply.CreateNewElement( "select style info game 2 style 2" );
|
||||||
|
m_ScrList_2ply.CreateNewElement( "select style info game 2 style 3" );
|
||||||
|
m_ScrList_2ply.SetXY(CENTER_X, CENTER_Y);
|
||||||
|
m_ScrList_2ply.SetCurrentPosition( DS_EASY );
|
||||||
|
|
||||||
this->AddSubActor( &m_ScrList );
|
this->AddSubActor( &m_ScrList );
|
||||||
|
this->AddSubActor( &m_ScrList_2ply );
|
||||||
|
|
||||||
|
// figure out on load which list we should put up.
|
||||||
|
if (GAMESTATE->m_CurStyle == STYLE_EZ2_SINGLE_VERSUS) // if we are using two players
|
||||||
|
{
|
||||||
|
m_ScrList.SetZoom( 0 ); // Hide the list for just 1 player
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_ScrList_2ply.SetZoom( 0 ); // Otherwise hide the 2 player list.
|
||||||
|
}
|
||||||
|
|
||||||
|
// Load in the sprites we will be working with.
|
||||||
|
for( i=0; i<NUM_EZ2STYLE_GRAPHICS; i++ )
|
||||||
|
{
|
||||||
|
CString sOptFileName;
|
||||||
|
switch( i )
|
||||||
|
{
|
||||||
|
case 0: sOptFileName = "select difficulty hard picture"; break;
|
||||||
|
case 1: sOptFileName = "select difficulty hard picture"; break;
|
||||||
|
case 2: sOptFileName = "select difficulty medium picture"; break;
|
||||||
|
case 3: sOptFileName = "select difficulty easy picture"; break;
|
||||||
|
}
|
||||||
|
m_sprOpt[i].Load( THEME->GetPathTo("Graphics",sOptFileName) );
|
||||||
|
m_sprOpt[i].SetXY( OPT_X[i], OPT_Y[i] );
|
||||||
|
this->AddSubActor( &m_sprOpt[i] );
|
||||||
|
}
|
||||||
|
|
||||||
m_Menu.Load(
|
m_Menu.Load(
|
||||||
THEME->GetPathTo("Graphics","select style background"),
|
THEME->GetPathTo("Graphics","select style background"),
|
||||||
@@ -394,6 +450,24 @@ void ScreenEz2SelectStyle::AnimateBackground()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/************************************
|
||||||
|
Update
|
||||||
|
Desc: Animates the 1p/2p selection
|
||||||
|
************************************/
|
||||||
|
void ScreenEz2SelectStyle::Update( float fDeltaTime )
|
||||||
|
{
|
||||||
|
Screen::Update( fDeltaTime );
|
||||||
|
|
||||||
|
fDeltaTime /= .01f;
|
||||||
|
|
||||||
|
ez2_bounce = fmod((ez2_bounce+fDeltaTime), 20);
|
||||||
|
|
||||||
|
/* 0..10..19 -> 10..0..9 */
|
||||||
|
int offset = abs(10-ez2_bounce);
|
||||||
|
m_sprOpt[2].SetXY( OPT_X[2], OPT_Y[2] - offset);
|
||||||
|
m_sprOpt[3].SetXY( OPT_X[3], OPT_Y[3] - offset);
|
||||||
|
}
|
||||||
|
|
||||||
/************************************
|
/************************************
|
||||||
TweenPlyOffScreen
|
TweenPlyOffScreen
|
||||||
Desc: Squashes Player Graphics off screen
|
Desc: Squashes Player Graphics off screen
|
||||||
|
|||||||
@@ -44,6 +44,8 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
/* Private Function Prototypes */
|
/* Private Function Prototypes */
|
||||||
|
|
||||||
|
void Update( float fDeltaTime );
|
||||||
void AnimateGraphics();
|
void AnimateGraphics();
|
||||||
void AnimateBackground();
|
void AnimateBackground();
|
||||||
// void BeforeChange();
|
// void BeforeChange();
|
||||||
@@ -52,12 +54,15 @@ private:
|
|||||||
/* Variable Declarations */
|
/* Variable Declarations */
|
||||||
|
|
||||||
MenuElements m_Menu;
|
MenuElements m_Menu;
|
||||||
// Sprite m_sprOpt[NUM_EZ2STYLE_GRAPHICS];
|
Sprite m_sprOpt[NUM_EZ2STYLE_GRAPHICS];
|
||||||
// Sprite m_sprPly[NUM_EZ2P_GRAPHICS];
|
// Sprite m_sprPly[NUM_EZ2P_GRAPHICS];
|
||||||
Sprite m_sprBackground[NUM_EZ2STYLE_GRAPHICS];
|
Sprite m_sprBackground[NUM_EZ2STYLE_GRAPHICS];
|
||||||
|
|
||||||
ScrollingList m_ScrList;
|
// used for the bouncing of the '1p' and '2p' images
|
||||||
|
float ez2_bounce;
|
||||||
|
|
||||||
|
ScrollingList m_ScrList;
|
||||||
|
ScrollingList m_ScrList_2ply;
|
||||||
|
|
||||||
int m_iSelectedStyle;
|
int m_iSelectedStyle;
|
||||||
int m_iSelectedPlayer;
|
int m_iSelectedPlayer;
|
||||||
|
|||||||
@@ -437,7 +437,8 @@ ScreenStage::ScreenStage()
|
|||||||
|
|
||||||
for( i=0; i<iNumChars; i++ )
|
for( i=0; i<iNumChars; i++ )
|
||||||
m_frameStage.AddSubActor( &m_sprNumbers[i] );
|
m_frameStage.AddSubActor( &m_sprNumbers[i] );
|
||||||
m_frameStage.AddSubActor( &m_sprStage );
|
if ( STAGE_TYPE != STAGE_TYPE_EZ2 ) // DIE EVIL STAGEWORD! err, yea this shouldn't be here for Ez2 =)
|
||||||
|
m_frameStage.AddSubActor( &m_sprStage );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MODE_FINAL:
|
case MODE_FINAL:
|
||||||
@@ -494,7 +495,8 @@ void ScreenStage::DrawPrimitives()
|
|||||||
m_sprSongBackground.Draw();
|
m_sprSongBackground.Draw();
|
||||||
break;
|
break;
|
||||||
case STAGE_TYPE_EZ2:
|
case STAGE_TYPE_EZ2:
|
||||||
m_sprSongBackground.Draw();
|
m_frameStage.Draw();
|
||||||
|
// m_sprSongBackground.Draw();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user