Ez2dancer update.
This commit is contained in:
@@ -185,6 +185,8 @@ enum NotesType
|
|||||||
NOTES_TYPE_EZ2_SINGLE,
|
NOTES_TYPE_EZ2_SINGLE,
|
||||||
NOTES_TYPE_EZ2_DOUBLE,
|
NOTES_TYPE_EZ2_DOUBLE,
|
||||||
NOTES_TYPE_EZ2_REAL,
|
NOTES_TYPE_EZ2_REAL,
|
||||||
|
NOTES_TYPE_EZ2_SINGLE_VERSUS,
|
||||||
|
NOTES_TYPE_EZ2_REAL_VERSUS,
|
||||||
NUM_NOTES_TYPES, // leave this at the end
|
NUM_NOTES_TYPES, // leave this at the end
|
||||||
NOTES_TYPE_INVALID,
|
NOTES_TYPE_INVALID,
|
||||||
};
|
};
|
||||||
@@ -202,6 +204,8 @@ inline int NotesTypeToNumTracks( NotesType nt )
|
|||||||
case NOTES_TYPE_EZ2_SINGLE: return 5; // Single: TL,LHH,D,RHH,TR
|
case NOTES_TYPE_EZ2_SINGLE: return 5; // Single: TL,LHH,D,RHH,TR
|
||||||
case NOTES_TYPE_EZ2_DOUBLE: return 10; // Double: Single x2
|
case NOTES_TYPE_EZ2_DOUBLE: return 10; // Double: Single x2
|
||||||
case NOTES_TYPE_EZ2_REAL: return 7; // Real: TL,LHH,LHL,D,RHL,RHH,TR
|
case NOTES_TYPE_EZ2_REAL: return 7; // Real: TL,LHH,LHL,D,RHL,RHH,TR
|
||||||
|
case NOTES_TYPE_EZ2_SINGLE_VERSUS: return 10;
|
||||||
|
case NOTES_TYPE_EZ2_REAL_VERSUS: return 10;
|
||||||
default: ASSERT(0); return -1; // invalid NotesType
|
default: ASSERT(0); return -1; // invalid NotesType
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -218,6 +222,8 @@ inline NotesType StringToNotesType( CString sNotesType )
|
|||||||
else if( sNotesType == "ez2-single" ) return NOTES_TYPE_EZ2_SINGLE;
|
else if( sNotesType == "ez2-single" ) return NOTES_TYPE_EZ2_SINGLE;
|
||||||
else if( sNotesType == "ez2-double" ) return NOTES_TYPE_EZ2_DOUBLE;
|
else if( sNotesType == "ez2-double" ) return NOTES_TYPE_EZ2_DOUBLE;
|
||||||
else if( sNotesType == "ez2-real" ) return NOTES_TYPE_EZ2_REAL;
|
else if( sNotesType == "ez2-real" ) return NOTES_TYPE_EZ2_REAL;
|
||||||
|
else if( sNotesType == "ez2-real-versus" ) return NOTES_TYPE_EZ2_REAL_VERSUS;
|
||||||
|
else if( sNotesType == "ez2-single-versus" ) return NOTES_TYPE_EZ2_SINGLE_VERSUS;
|
||||||
else ASSERT(0); return NOTES_TYPE_DANCE_SINGLE; // invalid NotesType
|
else ASSERT(0); return NOTES_TYPE_DANCE_SINGLE; // invalid NotesType
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -234,6 +240,8 @@ inline CString NotesTypeToString( NotesType nt )
|
|||||||
case NOTES_TYPE_EZ2_SINGLE: return "ez2-single";
|
case NOTES_TYPE_EZ2_SINGLE: return "ez2-single";
|
||||||
case NOTES_TYPE_EZ2_DOUBLE: return "ez2-double";
|
case NOTES_TYPE_EZ2_DOUBLE: return "ez2-double";
|
||||||
case NOTES_TYPE_EZ2_REAL: return "ez2-real";
|
case NOTES_TYPE_EZ2_REAL: return "ez2-real";
|
||||||
|
case NOTES_TYPE_EZ2_REAL_VERSUS: return "ez2-real-versus";
|
||||||
|
case NOTES_TYPE_EZ2_SINGLE_VERSUS: return "ez2-single-versus";
|
||||||
default: ASSERT(0); return ""; // invalid NotesType
|
default: ASSERT(0); return ""; // invalid NotesType
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -303,6 +311,8 @@ enum Style
|
|||||||
STYLE_EZ2_SINGLE,
|
STYLE_EZ2_SINGLE,
|
||||||
STYLE_EZ2_DOUBLE,
|
STYLE_EZ2_DOUBLE,
|
||||||
STYLE_EZ2_REAL,
|
STYLE_EZ2_REAL,
|
||||||
|
STYLE_EZ2_SINGLE_VERSUS,
|
||||||
|
STYLE_EZ2_REAL_VERSUS,
|
||||||
NUM_STYLES, // leave this at the end
|
NUM_STYLES, // leave this at the end
|
||||||
STYLE_NONE,
|
STYLE_NONE,
|
||||||
};
|
};
|
||||||
@@ -324,6 +334,8 @@ inline Game StyleToGame( Style s )
|
|||||||
case STYLE_EZ2_SINGLE:
|
case STYLE_EZ2_SINGLE:
|
||||||
case STYLE_EZ2_DOUBLE:
|
case STYLE_EZ2_DOUBLE:
|
||||||
case STYLE_EZ2_REAL:
|
case STYLE_EZ2_REAL:
|
||||||
|
case STYLE_EZ2_SINGLE_VERSUS:
|
||||||
|
case STYLE_EZ2_REAL_VERSUS:
|
||||||
return GAME_EZ2;
|
return GAME_EZ2;
|
||||||
default:
|
default:
|
||||||
ASSERT(0); // invalid Style
|
ASSERT(0); // invalid Style
|
||||||
|
|||||||
@@ -467,7 +467,62 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
3,0,6,2,4,1,5 // This should be from back to front: Down, UpLeft, UpRight, Lower Left Hand, Lower Right Hand, Upper Left Hand, Upper Right Hand
|
3,0,6,2,4,1,5 // This should be from back to front: Down, UpLeft, UpRight, Lower Left Hand, Lower Right Hand, Upper Left Hand, Upper Right Hand
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{ // EZ2_STYLE_SINGLE_VERSUS
|
||||||
|
"ez2-single-versus", // m_szName
|
||||||
|
NOTES_TYPE_EZ2_SINGLE, // m_NotesType
|
||||||
|
StyleDef::TWO_PLAYERS_USE_TWO_SIDES, // m_StyleType
|
||||||
|
{ 160, 480 }, // m_iCenterX
|
||||||
|
5, // m_iColsPerPlayer
|
||||||
|
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
|
||||||
|
{ // PLAYER_1
|
||||||
|
{ TRACK_1, INSTRUMENT_1, EZ2_BUTTON_UPLEFT, -EZ2_COL_SPACING*2 }, // CHANGE THESE WHEN WE CAN SEE THE
|
||||||
|
{ TRACK_2, INSTRUMENT_1, EZ2_BUTTON_UPLEFTHAND, -EZ2_COL_SPACING*1 }, // NOTES IN-GAME !!!!!!!!!!
|
||||||
|
{ TRACK_3, INSTRUMENT_1, EZ2_BUTTON_DOWN, +EZ2_COL_SPACING*0 },
|
||||||
|
{ TRACK_4, INSTRUMENT_1, EZ2_BUTTON_UPRIGHTHAND, +EZ2_COL_SPACING*1 },
|
||||||
|
{ TRACK_5, INSTRUMENT_1, EZ2_BUTTON_UPRIGHT, +EZ2_COL_SPACING*2 },
|
||||||
|
},
|
||||||
|
{ // PLAYER_2
|
||||||
|
{ TRACK_1, INSTRUMENT_1, EZ2_BUTTON_UPLEFT, -EZ2_COL_SPACING*2 }, // CHANGE THESE WHEN WE CAN SEE THE
|
||||||
|
{ TRACK_2, INSTRUMENT_1, EZ2_BUTTON_UPLEFTHAND, -EZ2_COL_SPACING*1 }, // NOTES IN-GAME !!!!!!!!!!
|
||||||
|
{ TRACK_3, INSTRUMENT_1, EZ2_BUTTON_DOWN, +EZ2_COL_SPACING*0 },
|
||||||
|
{ TRACK_4, INSTRUMENT_1, EZ2_BUTTON_UPRIGHTHAND, +EZ2_COL_SPACING*1 },
|
||||||
|
{ TRACK_5, INSTRUMENT_1, EZ2_BUTTON_UPRIGHT, +EZ2_COL_SPACING*2 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ // m_iColumnDrawOrder[MAX_COLS_PER_PLAYER];
|
||||||
|
2,0,4,1,3 // This should be from back to front: Down, UpLeft, UpRight, Upper Left Hand, Upper Right Hand
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ // EZ2_STYLE_REAL_VERSUS
|
||||||
|
"ez2-real-versus", // m_szName
|
||||||
|
NOTES_TYPE_EZ2_REAL, // m_NotesType
|
||||||
|
StyleDef::TWO_PLAYERS_USE_TWO_SIDES, // m_StyleType
|
||||||
|
{ 160, 480 }, // m_iCenterX
|
||||||
|
7, // m_iColsPerPlayer
|
||||||
|
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
|
||||||
|
{ // PLAYER_1
|
||||||
|
{ TRACK_1, INSTRUMENT_1, EZ2_BUTTON_UPLEFT, -EZ2_COL_SPACING*3 }, // CHANGE THESE WHEN WE CAN SEE THE
|
||||||
|
{ TRACK_2, INSTRUMENT_1, EZ2_BUTTON_UPLEFTHAND, -EZ2_COL_SPACING*2 }, // NOTES IN-GAME !!!!!!!!!!
|
||||||
|
{ TRACK_3, INSTRUMENT_1, EZ2_BUTTON_LRLEFTHAND, -EZ2_COL_SPACING*1 },
|
||||||
|
{ TRACK_4, INSTRUMENT_1, EZ2_BUTTON_DOWN, +EZ2_COL_SPACING*0 },
|
||||||
|
{ TRACK_5, INSTRUMENT_1, EZ2_BUTTON_LRRIGHTHAND, +EZ2_COL_SPACING*1 },
|
||||||
|
{ TRACK_6, INSTRUMENT_1, EZ2_BUTTON_UPRIGHTHAND, +EZ2_COL_SPACING*2 },
|
||||||
|
{ TRACK_7, INSTRUMENT_1, EZ2_BUTTON_UPRIGHT, +EZ2_COL_SPACING*3 },
|
||||||
|
},
|
||||||
|
{ // PLAYER_2
|
||||||
|
{ TRACK_1, INSTRUMENT_1, EZ2_BUTTON_UPLEFT, -EZ2_COL_SPACING*3 }, // CHANGE THESE WHEN WE CAN SEE THE
|
||||||
|
{ TRACK_2, INSTRUMENT_1, EZ2_BUTTON_UPLEFTHAND, -EZ2_COL_SPACING*2 }, // NOTES IN-GAME !!!!!!!!!!
|
||||||
|
{ TRACK_3, INSTRUMENT_1, EZ2_BUTTON_LRLEFTHAND, -EZ2_COL_SPACING*1 },
|
||||||
|
{ TRACK_4, INSTRUMENT_1, EZ2_BUTTON_DOWN, +EZ2_COL_SPACING*0 },
|
||||||
|
{ TRACK_5, INSTRUMENT_1, EZ2_BUTTON_LRRIGHTHAND, +EZ2_COL_SPACING*1 },
|
||||||
|
{ TRACK_6, INSTRUMENT_1, EZ2_BUTTON_UPRIGHTHAND, +EZ2_COL_SPACING*2 },
|
||||||
|
{ TRACK_7, INSTRUMENT_1, EZ2_BUTTON_UPRIGHT, +EZ2_COL_SPACING*3 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ // m_iColumnDrawOrder[MAX_COLS_PER_PLAYER];
|
||||||
|
3,0,6,2,4,1,5 // This should be from back to front: Down, UpLeft, UpRight, Lower Left Hand, Lower Right Hand, Upper Left Hand, Upper Right Hand
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -178,6 +178,22 @@ void ScreenEz2SelectPlayer::DrawPrimitives()
|
|||||||
{
|
{
|
||||||
ez2_lasttimercheck[1] = 0.0f;
|
ez2_lasttimercheck[1] = 0.0f;
|
||||||
|
|
||||||
|
if (m_iSelectedStyle == 0) // only the left pad was selected
|
||||||
|
{
|
||||||
|
GAMEMAN->m_sMasterPlayerNumber = PLAYER_1;
|
||||||
|
GAMEMAN->m_CurStyle = STYLE_EZ2_SINGLE;
|
||||||
|
}
|
||||||
|
else if (m_iSelectedStyle == 1) // only the right pad was selected
|
||||||
|
{
|
||||||
|
GAMEMAN->m_sMasterPlayerNumber = PLAYER_2;
|
||||||
|
GAMEMAN->m_CurStyle = STYLE_EZ2_SINGLE;
|
||||||
|
}
|
||||||
|
else // they both selected
|
||||||
|
{
|
||||||
|
GAMEMAN->m_sMasterPlayerNumber = PLAYER_1;
|
||||||
|
GAMEMAN->m_CurStyle = STYLE_EZ2_SINGLE_VERSUS;
|
||||||
|
}
|
||||||
|
|
||||||
MUSIC->Stop();
|
MUSIC->Stop();
|
||||||
|
|
||||||
this->ClearMessageQueue();
|
this->ClearMessageQueue();
|
||||||
|
|||||||
@@ -22,9 +22,12 @@ Andrew Livy
|
|||||||
#include "RageLog.h"
|
#include "RageLog.h"
|
||||||
#include "AnnouncerManager.h"
|
#include "AnnouncerManager.h"
|
||||||
#include "GameConstantsAndTypes.h"
|
#include "GameConstantsAndTypes.h"
|
||||||
|
#include "Background.h"
|
||||||
|
|
||||||
/* Constants */
|
/* Constants */
|
||||||
|
|
||||||
|
const CString BG_ANIMS_DIR = "BGAnimations\\";
|
||||||
|
|
||||||
const ScreenMessage SM_GoToPrevState = ScreenMessage(SM_User + 1);
|
const ScreenMessage SM_GoToPrevState = ScreenMessage(SM_User + 1);
|
||||||
const ScreenMessage SM_GoToNextState = ScreenMessage(SM_User + 2);
|
const ScreenMessage SM_GoToNextState = ScreenMessage(SM_User + 2);
|
||||||
|
|
||||||
@@ -35,6 +38,14 @@ const CString DANCE_STYLES[] = {
|
|||||||
"double",
|
"double",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum DStyles {
|
||||||
|
DS_CLUB,
|
||||||
|
DS_EASY,
|
||||||
|
DS_HARD,
|
||||||
|
DS_REAL
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
const float TWEEN_TIME = 0.35f;
|
const float TWEEN_TIME = 0.35f;
|
||||||
const D3DXCOLOR OPT_NOT_SELECTED = D3DXCOLOR(0.3f,0.3f,0.3f,1);
|
const D3DXCOLOR OPT_NOT_SELECTED = D3DXCOLOR(0.3f,0.3f,0.3f,1);
|
||||||
const D3DXCOLOR OPT_SELECTED = D3DXCOLOR(1.0f,1.0f,1.0f,1);
|
const D3DXCOLOR OPT_SELECTED = D3DXCOLOR(1.0f,1.0f,1.0f,1);
|
||||||
@@ -81,6 +92,22 @@ const float REAL_X[NUM_EZ2STYLE_GRAPHICS] = {
|
|||||||
OPT_X[0]+0,
|
OPT_X[0]+0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const float OPT_XP[NUM_EZ2P_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_YP[NUM_EZ2P_GRAPHICS] = {
|
||||||
|
CENTER_Y+130,
|
||||||
|
CENTER_Y+130,
|
||||||
|
CENTER_Y+115,
|
||||||
|
CENTER_Y+115,
|
||||||
|
}; // tells us the default Y position
|
||||||
|
|
||||||
|
float ez2p_lasttimercheck[2];
|
||||||
|
int ez2p_bounce=0; // used for the bouncing of the '1p' and '2p' images
|
||||||
|
int ez2p_direct=0; // direction of the bouncing of the '1p' and '2p' images
|
||||||
|
|
||||||
/************************************
|
/************************************
|
||||||
ScreenEz2SelectStyle (Constructor)
|
ScreenEz2SelectStyle (Constructor)
|
||||||
@@ -92,7 +119,7 @@ ScreenEz2SelectStyle::ScreenEz2SelectStyle()
|
|||||||
LOG->WriteLine( "ScreenEz2SelectStyle::ScreenEz2SelectStyle()" );
|
LOG->WriteLine( "ScreenEz2SelectStyle::ScreenEz2SelectStyle()" );
|
||||||
|
|
||||||
m_iSelectedStyle=0;
|
m_iSelectedStyle=0;
|
||||||
|
ez2p_lasttimercheck[0] = TIMER->GetTimeSinceStart();
|
||||||
// Load in the sprites we will be working with.
|
// Load in the sprites we will be working with.
|
||||||
for( int i=0; i<NUM_EZ2STYLE_GRAPHICS; i++ )
|
for( int i=0; i<NUM_EZ2STYLE_GRAPHICS; i++ )
|
||||||
{
|
{
|
||||||
@@ -118,6 +145,29 @@ ScreenEz2SelectStyle::ScreenEz2SelectStyle()
|
|||||||
this->AddActor( &m_sprOpt[i] );
|
this->AddActor( &m_sprOpt[i] );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for( i=0; i<NUM_EZ2P_GRAPHICS; i++ )
|
||||||
|
{
|
||||||
|
CString sPadGraphicPath;
|
||||||
|
switch( i )
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
sPadGraphicPath = THEME->GetPathTo(GRAPHIC_SELECT_DIFFICULTY_HARD_PICTURE);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
sPadGraphicPath = THEME->GetPathTo(GRAPHIC_SELECT_DIFFICULTY_HARD_PICTURE);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
sPadGraphicPath = THEME->GetPathTo(GRAPHIC_SELECT_DIFFICULTY_MEDIUM_PICTURE);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
sPadGraphicPath = THEME->GetPathTo(GRAPHIC_SELECT_DIFFICULTY_EASY_PICTURE);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
m_sprPly[i].Load( sPadGraphicPath );
|
||||||
|
m_sprPly[i].SetXY( OPT_XP[i], OPT_YP[i] );
|
||||||
|
m_sprPly[i].SetZoom( 1 );
|
||||||
|
this->AddActor( &m_sprPly[i] );
|
||||||
|
}
|
||||||
|
|
||||||
m_Menu.Load(
|
m_Menu.Load(
|
||||||
THEME->GetPathTo(GRAPHIC_SELECT_STYLE_BACKGROUND),
|
THEME->GetPathTo(GRAPHIC_SELECT_STYLE_BACKGROUND),
|
||||||
@@ -139,8 +189,44 @@ ScreenEz2SelectStyle::ScreenEz2SelectStyle()
|
|||||||
MUSIC->Play( true );
|
MUSIC->Play( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
// AfterChange();
|
if ( GAMEMAN->m_sMasterPlayerNumber == PLAYER_1 && GAMEMAN->m_CurStyle == STYLE_EZ2_SINGLE) //if p1 already selected hide graphic.
|
||||||
// TweenOnScreen();
|
{
|
||||||
|
m_iSelectedPlayer = 0;
|
||||||
|
m_sprPly[1].BeginTweening( 0 );
|
||||||
|
m_sprPly[1].SetTweenZoomY( 0 );
|
||||||
|
m_sprPly[2].BeginTweening( 0 );
|
||||||
|
m_sprPly[2].SetTweenZoomY( 0 );
|
||||||
|
}
|
||||||
|
else if ( GAMEMAN->m_sMasterPlayerNumber == PLAYER_2 && GAMEMAN->m_CurStyle == STYLE_EZ2_SINGLE) //if p2 already selected hide graphic.
|
||||||
|
{
|
||||||
|
m_iSelectedPlayer = 1;
|
||||||
|
m_sprPly[3].BeginTweening( 0 );
|
||||||
|
m_sprPly[3].SetTweenZoomY( 0 );
|
||||||
|
m_sprPly[0].BeginTweening( 0 );
|
||||||
|
m_sprPly[0].SetTweenZoomY( 0 );
|
||||||
|
}
|
||||||
|
else // if both are already selected, hide the graphics alltogether
|
||||||
|
{
|
||||||
|
m_iSelectedPlayer = 2;
|
||||||
|
m_sprPly[1].BeginTweening( 0 );
|
||||||
|
m_sprPly[1].SetTweenZoomY( 0 );
|
||||||
|
m_sprPly[2].BeginTweening( 0 );
|
||||||
|
m_sprPly[2].SetTweenZoomY( 0 );
|
||||||
|
m_sprPly[3].BeginTweening( 0 );
|
||||||
|
m_sprPly[3].SetTweenZoomY( 0 );
|
||||||
|
m_sprPly[0].BeginTweening( 0 );
|
||||||
|
m_sprPly[0].SetTweenZoomY( 0 );
|
||||||
|
|
||||||
|
// hide the CLUB graphic...
|
||||||
|
m_sprOpt[0].BeginTweening( 0 );
|
||||||
|
m_sprOpt[0].SetTweenZoomY( 0 );
|
||||||
|
m_iSelectedStyle = 1; // make sure we DONT have CLUB selected
|
||||||
|
MenuLeft( PLAYER_1 ); // shift left so that we're clean again.
|
||||||
|
|
||||||
|
}
|
||||||
|
GAMEMAN->m_CurStyle = STYLE_NONE; // why reset this? because we want player2 to be able to input at this stage.
|
||||||
|
|
||||||
|
|
||||||
m_Menu.TweenOnScreenFromBlack( SM_None );
|
m_Menu.TweenOnScreenFromBlack( SM_None );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -162,6 +248,11 @@ Desc: Draws the screen =P
|
|||||||
|
|
||||||
void ScreenEz2SelectStyle::DrawPrimitives()
|
void ScreenEz2SelectStyle::DrawPrimitives()
|
||||||
{
|
{
|
||||||
|
if (m_iSelectedPlayer != 2) // no need to animate graphics if we have no graphics to animate ;)
|
||||||
|
{
|
||||||
|
AnimateGraphics();
|
||||||
|
}
|
||||||
|
|
||||||
m_Menu.DrawBottomLayer();
|
m_Menu.DrawBottomLayer();
|
||||||
Screen::DrawPrimitives();
|
Screen::DrawPrimitives();
|
||||||
m_Menu.DrawTopLayer();
|
m_Menu.DrawTopLayer();
|
||||||
@@ -242,6 +333,10 @@ void ScreenEz2SelectStyle::SetFadedStyles()
|
|||||||
{
|
{
|
||||||
m_sprOpt[0].SetTweenDiffuseColor( OPT_SELECTED );
|
m_sprOpt[0].SetTweenDiffuseColor( OPT_SELECTED );
|
||||||
}
|
}
|
||||||
|
if (m_iSelectedPlayer == 2 && m_iSelectedStyle == DS_REAL)
|
||||||
|
{
|
||||||
|
m_sprOpt[1].SetTweenDiffuseColor( OPT_SELECTED );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************
|
/************************************
|
||||||
@@ -251,7 +346,10 @@ presses the button bound to right
|
|||||||
************************************/
|
************************************/
|
||||||
void ScreenEz2SelectStyle::MenuRight( PlayerNumber p )
|
void ScreenEz2SelectStyle::MenuRight( PlayerNumber p )
|
||||||
{
|
{
|
||||||
|
if (m_iSelectedPlayer != 2) // Single player
|
||||||
|
{
|
||||||
|
if (((m_iSelectedPlayer == 0 && p == PLAYER_2) || (m_iSelectedPlayer == 1 && p == PLAYER_1)) != TRUE) // make sure players who haven't selected yet can't choose a style
|
||||||
|
{
|
||||||
if( m_iSelectedStyle == 3 ) // wrap to the first dance style
|
if( m_iSelectedStyle == 3 ) // wrap to the first dance style
|
||||||
m_iSelectedStyle = 0; // which is (club) easy (hard)
|
m_iSelectedStyle = 0; // which is (club) easy (hard)
|
||||||
else
|
else
|
||||||
@@ -289,7 +387,8 @@ void ScreenEz2SelectStyle::MenuRight( PlayerNumber p )
|
|||||||
m_sprOpt[3].SetTweenY( OPT_Y[m_iSelectedStyle] );
|
m_sprOpt[3].SetTweenY( OPT_Y[m_iSelectedStyle] );
|
||||||
|
|
||||||
SetFadedStyles();
|
SetFadedStyles();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************
|
/************************************
|
||||||
@@ -299,8 +398,11 @@ presses the button bound to left
|
|||||||
************************************/
|
************************************/
|
||||||
void ScreenEz2SelectStyle::MenuLeft( PlayerNumber p )
|
void ScreenEz2SelectStyle::MenuLeft( PlayerNumber p )
|
||||||
{
|
{
|
||||||
|
if (m_iSelectedPlayer != 2) // Single player
|
||||||
if( m_iSelectedStyle == 0 ) // wrap to the last dance style
|
{
|
||||||
|
if (((m_iSelectedPlayer == 0 && p == PLAYER_2) || (m_iSelectedPlayer == 1 && p == PLAYER_1)) != TRUE) // make sure players who haven't selected yet can't choose a style
|
||||||
|
{
|
||||||
|
if( m_iSelectedStyle == 0 ) // wrap to the last dance style
|
||||||
m_iSelectedStyle = 3;
|
m_iSelectedStyle = 3;
|
||||||
else
|
else
|
||||||
m_iSelectedStyle = m_iSelectedStyle - 1;
|
m_iSelectedStyle = m_iSelectedStyle - 1;
|
||||||
@@ -336,7 +438,80 @@ if( m_iSelectedStyle == 0 ) // wrap to the last dance style
|
|||||||
m_sprOpt[3].SetTweenY( OPT_Y[m_iSelectedStyle] );
|
m_sprOpt[3].SetTweenY( OPT_Y[m_iSelectedStyle] );
|
||||||
|
|
||||||
SetFadedStyles();
|
SetFadedStyles();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else // Two Players (means NO club option...)
|
||||||
|
{
|
||||||
|
if (((m_iSelectedPlayer == 0 && p == PLAYER_2) || (m_iSelectedPlayer == 1 && p == PLAYER_1)) != TRUE) // make sure players who haven't selected yet can't choose a style
|
||||||
|
{
|
||||||
|
if( m_iSelectedStyle == DS_EASY ) // wrap to the last dance style
|
||||||
|
m_iSelectedStyle = DS_REAL;
|
||||||
|
else
|
||||||
|
m_iSelectedStyle = m_iSelectedStyle - 1;
|
||||||
|
|
||||||
|
if( m_iSelectedStyle == DS_REAL ) // (REALLY EASY)
|
||||||
|
{
|
||||||
|
m_sprOpt[DS_HARD].SetXY( CLUB_X[m_iSelectedStyle], OPT_Y[0] ); // First move it over the other side off-screen...
|
||||||
|
m_sprOpt[DS_REAL].SetXY( REAL_X[m_iSelectedStyle]-350, OPT_Y[0] );
|
||||||
|
}
|
||||||
|
else if( m_iSelectedStyle == DS_HARD ) // (REALLY REAL)
|
||||||
|
{
|
||||||
|
m_sprOpt[DS_EASY].SetXY( REAL_X[m_iSelectedStyle], OPT_Y[0] ); // First move it over the other side off-screen...
|
||||||
|
m_sprOpt[DS_HARD].SetXY( HARD_X[m_iSelectedStyle]-350, OPT_Y[0] );
|
||||||
|
}
|
||||||
|
else if( m_iSelectedStyle == DS_EASY ) // (REALLY HARD)
|
||||||
|
{
|
||||||
|
m_sprOpt[DS_REAL].SetXY( HARD_X[m_iSelectedStyle], OPT_Y[0] ); // First move it over the other side off-screen...
|
||||||
|
m_sprOpt[DS_EASY].SetXY( EASY_X[m_iSelectedStyle]-350, OPT_Y[0] );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* NOTE: Because we're really shifting three values using a setup for four values
|
||||||
|
the DS_ values are shifted out of phase by 1, i.e. DS_REAL is now actually DS_EASY
|
||||||
|
Confused? I was =) Anyhow, this will only happen if there are two players and we don't want
|
||||||
|
them playing double
|
||||||
|
*/
|
||||||
|
if (m_iSelectedStyle == DS_REAL)
|
||||||
|
{
|
||||||
|
m_sprOpt[DS_EASY].BeginTweening( 0.2f, TWEEN_BIAS_BEGIN );
|
||||||
|
m_sprOpt[DS_EASY].SetTweenX( CLUB_X[m_iSelectedStyle] );
|
||||||
|
m_sprOpt[DS_EASY].SetTweenY( OPT_Y[m_iSelectedStyle] );
|
||||||
|
m_sprOpt[DS_HARD].BeginTweening( 0.2f, TWEEN_BIAS_BEGIN );
|
||||||
|
m_sprOpt[DS_HARD].SetTweenX( CLUB_X[m_iSelectedStyle] + 350 );
|
||||||
|
m_sprOpt[DS_HARD].SetTweenY( OPT_Y[m_iSelectedStyle] );
|
||||||
|
m_sprOpt[DS_REAL].BeginTweening( 0.2f, TWEEN_BIAS_BEGIN );
|
||||||
|
m_sprOpt[DS_REAL].SetTweenX( REAL_X[m_iSelectedStyle] );
|
||||||
|
m_sprOpt[DS_REAL].SetTweenY( OPT_Y[m_iSelectedStyle] );
|
||||||
|
}
|
||||||
|
else if (m_iSelectedStyle == DS_HARD)
|
||||||
|
{
|
||||||
|
m_sprOpt[DS_EASY].BeginTweening( 0.2f, TWEEN_BIAS_BEGIN );
|
||||||
|
m_sprOpt[DS_EASY].SetTweenX( REAL_X[m_iSelectedStyle] + 350 );
|
||||||
|
m_sprOpt[DS_EASY].SetTweenY( OPT_Y[m_iSelectedStyle] );
|
||||||
|
m_sprOpt[DS_HARD].BeginTweening( 0.2f, TWEEN_BIAS_BEGIN );
|
||||||
|
m_sprOpt[DS_HARD].SetTweenX( HARD_X[m_iSelectedStyle] );
|
||||||
|
m_sprOpt[DS_HARD].SetTweenY( OPT_Y[m_iSelectedStyle] );
|
||||||
|
m_sprOpt[DS_REAL].BeginTweening( 0.2f, TWEEN_BIAS_BEGIN );
|
||||||
|
m_sprOpt[DS_REAL].SetTweenX( REAL_X[m_iSelectedStyle] );
|
||||||
|
m_sprOpt[DS_REAL].SetTweenY( OPT_Y[m_iSelectedStyle] );
|
||||||
|
}
|
||||||
|
else if (m_iSelectedStyle == DS_EASY)
|
||||||
|
{
|
||||||
|
m_sprOpt[DS_EASY].BeginTweening( 0.2f, TWEEN_BIAS_BEGIN );
|
||||||
|
m_sprOpt[DS_EASY].SetTweenX( EASY_X[m_iSelectedStyle] );
|
||||||
|
m_sprOpt[DS_EASY].SetTweenY( OPT_Y[m_iSelectedStyle] );
|
||||||
|
m_sprOpt[DS_HARD].BeginTweening( 0.2f, TWEEN_BIAS_BEGIN );
|
||||||
|
m_sprOpt[DS_HARD].SetTweenX( HARD_X[m_iSelectedStyle] );
|
||||||
|
m_sprOpt[DS_HARD].SetTweenY( OPT_Y[m_iSelectedStyle] );
|
||||||
|
m_sprOpt[DS_REAL].BeginTweening( 0.2f, TWEEN_BIAS_BEGIN );
|
||||||
|
m_sprOpt[DS_REAL].SetTweenX( HARD_X[m_iSelectedStyle] + 350 );
|
||||||
|
m_sprOpt[DS_REAL].SetTweenY( OPT_Y[m_iSelectedStyle] );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
SetFadedStyles();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************
|
/************************************
|
||||||
@@ -348,6 +523,20 @@ void ScreenEz2SelectStyle::MenuStart( PlayerNumber p )
|
|||||||
{
|
{
|
||||||
// GAMEMAN->m_CurStyle = DANCE_STYLES[m_iSelectedStyle];
|
// GAMEMAN->m_CurStyle = DANCE_STYLES[m_iSelectedStyle];
|
||||||
|
|
||||||
|
if ((m_iSelectedPlayer == 0 && p == PLAYER_2) || (m_iSelectedPlayer == 1 && p == PLAYER_1))
|
||||||
|
{
|
||||||
|
m_soundSelect.PlayRandom();
|
||||||
|
TweenPlyOffScreen();
|
||||||
|
m_iSelectedPlayer = 2; // set to BOTH players now.
|
||||||
|
|
||||||
|
// hide the CLUB graphic...
|
||||||
|
m_sprOpt[0].BeginTweening( 0 );
|
||||||
|
m_sprOpt[0].SetTweenZoomY( 0 );
|
||||||
|
m_iSelectedStyle = 1; // make sure we DONT have CLUB selected
|
||||||
|
MenuLeft( p ); // shift left so that we're clean again.
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
m_soundSelect.PlayRandom();
|
m_soundSelect.PlayRandom();
|
||||||
|
|
||||||
this->ClearMessageQueue();
|
this->ClearMessageQueue();
|
||||||
@@ -355,6 +544,7 @@ void ScreenEz2SelectStyle::MenuStart( PlayerNumber p )
|
|||||||
m_Menu.TweenOffScreenToMenu( SM_GoToNextState );
|
m_Menu.TweenOffScreenToMenu( SM_GoToNextState );
|
||||||
|
|
||||||
TweenOffScreen();
|
TweenOffScreen();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -365,18 +555,59 @@ changes state.
|
|||||||
************************************/
|
************************************/
|
||||||
void ScreenEz2SelectStyle::TweenOffScreen()
|
void ScreenEz2SelectStyle::TweenOffScreen()
|
||||||
{
|
{
|
||||||
/* if (m_iSelectedStyle == 0 || m_iSelectedStyle == 2)
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/************************************
|
||||||
|
AnimateGraphics
|
||||||
|
Desc: Animates the 1p/2p selection
|
||||||
|
************************************/
|
||||||
|
void ScreenEz2SelectStyle::AnimateGraphics()
|
||||||
|
{
|
||||||
|
|
||||||
|
//if (bounce < 10 && direct == 0 && wait == 2) // Bounce 1p/2p up
|
||||||
|
if (TIMER->GetTimeSinceStart() > ez2p_lasttimercheck[0] + 0.01f && ez2p_direct == 0)
|
||||||
{
|
{
|
||||||
m_sprOpt[1].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
ez2p_lasttimercheck[0] = TIMER->GetTimeSinceStart();
|
||||||
m_sprOpt[1].SetTweenZoomY( 0 );
|
ez2p_bounce+=1;
|
||||||
m_sprOpt[2].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
|
||||||
m_sprOpt[2].SetTweenZoomY( 0 );
|
m_sprPly[2].SetXY( OPT_XP[2], OPT_YP[2] - ez2p_bounce);
|
||||||
|
m_sprPly[3].SetXY( OPT_XP[3], OPT_YP[3] - ez2p_bounce);
|
||||||
|
|
||||||
|
|
||||||
|
if (ez2p_bounce == 10)
|
||||||
|
{
|
||||||
|
ez2p_direct = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (m_iSelectedStyle == 1 || m_iSelectedStyle == 2)
|
else if (TIMER->GetTimeSinceStart() > ez2p_lasttimercheck[0] + 0.01f && ez2p_direct == 1) // bounce 1p/2p down
|
||||||
|
{
|
||||||
|
ez2p_lasttimercheck[0] = TIMER->GetTimeSinceStart();
|
||||||
|
ez2p_bounce-=1;
|
||||||
|
|
||||||
|
m_sprPly[2].SetXY( OPT_XP[2], OPT_YP[2] - ez2p_bounce);
|
||||||
|
m_sprPly[3].SetXY( OPT_XP[3], OPT_YP[3] - ez2p_bounce);
|
||||||
|
|
||||||
|
if (ez2p_bounce == 0)
|
||||||
{
|
{
|
||||||
m_sprOpt[0].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
ez2p_direct = 0;
|
||||||
m_sprOpt[0].SetTweenZoomY( 0 );
|
}
|
||||||
m_sprOpt[3].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
}
|
||||||
m_sprOpt[3].SetTweenZoomY( 0 );
|
}
|
||||||
}*/
|
|
||||||
|
/************************************
|
||||||
|
TweenPlyOffScreen
|
||||||
|
Desc: Squashes Player Graphics off screen
|
||||||
|
When selected.
|
||||||
|
************************************/
|
||||||
|
void ScreenEz2SelectStyle::TweenPlyOffScreen()
|
||||||
|
{
|
||||||
|
m_sprPly[1].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
||||||
|
m_sprPly[1].SetTweenZoomY( 0 );
|
||||||
|
m_sprPly[2].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
||||||
|
m_sprPly[2].SetTweenZoomY( 0 );
|
||||||
|
m_sprPly[0].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
||||||
|
m_sprPly[0].SetTweenZoomY( 0 );
|
||||||
|
m_sprPly[3].BeginTweening( MENU_ELEMENTS_TWEEN_TIME );
|
||||||
|
m_sprPly[3].SetTweenZoomY( 0 );
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,7 @@ Andrew Livy
|
|||||||
|
|
||||||
/* Includes */
|
/* Includes */
|
||||||
|
|
||||||
|
#include "Background.h"
|
||||||
#include "Screen.h"
|
#include "Screen.h"
|
||||||
#include "Sprite.h"
|
#include "Sprite.h"
|
||||||
#include "BitmapText.h"
|
#include "BitmapText.h"
|
||||||
@@ -19,6 +20,7 @@ Andrew Livy
|
|||||||
/* Class Definition */
|
/* Class Definition */
|
||||||
|
|
||||||
const int NUM_EZ2STYLE_GRAPHICS = 4;
|
const int NUM_EZ2STYLE_GRAPHICS = 4;
|
||||||
|
const int NUM_EZ2P_GRAPHICS = 4;
|
||||||
|
|
||||||
class ScreenEz2SelectStyle : public Screen
|
class ScreenEz2SelectStyle : public Screen
|
||||||
{
|
{
|
||||||
@@ -36,21 +38,23 @@ public:
|
|||||||
void MenuStart( const PlayerNumber p );
|
void MenuStart( const PlayerNumber p );
|
||||||
void MenuBack( const PlayerNumber p );
|
void MenuBack( const PlayerNumber p );
|
||||||
void TweenOffScreen();
|
void TweenOffScreen();
|
||||||
// void TweenOnScreen();
|
void TweenPlyOffScreen();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/* Private Function Prototypes */
|
/* Private Function Prototypes */
|
||||||
|
void AnimateGraphics();
|
||||||
// void BeforeChange();
|
// void BeforeChange();
|
||||||
void AfterChange();
|
|
||||||
void SetFadedStyles();
|
void SetFadedStyles();
|
||||||
// void AnimateGraphics();
|
// void AnimateGraphics();
|
||||||
/* 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];
|
||||||
int m_iSelectedStyle;
|
int m_iSelectedStyle;
|
||||||
|
int m_iSelectedPlayer;
|
||||||
RandomSample m_soundChange;
|
RandomSample m_soundChange;
|
||||||
RandomSample m_soundSelect;
|
RandomSample m_soundSelect;
|
||||||
|
|
||||||
|
protected:
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user