Last Major Changes Before B6: Added PUMP style select, fixed some noteskins.

This commit is contained in:
Andrew Livy
2002-09-18 18:24:33 +00:00
parent 44baba9fd3
commit 4a60d0cb4d
6 changed files with 141 additions and 33 deletions
+55 -2
View File
@@ -88,6 +88,7 @@ ControllerP2Y=350
HelpText=Press $ on the pad to join. Press ! " to change styles, then press START
TimerSeconds=40
NextScreen=ScreenSelectGroup
ScrollingListY=250
[ScreenSelectDifficulty]
MorePage1X=580
@@ -787,7 +788,6 @@ Sprite0-Y=-350
[bganims-para-0]
NumElements=0
[bganims-para-1]
NumElements=0
@@ -797,4 +797,57 @@ NumElements=0
[bganims-para-3]
NumElements=0
NumElements=0
[bganims-pump-0]
NumElements=2
Sprite0-path=back
Sprite0-effect=NULL
Sprite0-zoom=1.0
Sprite0-X=CENTER_X
Sprite0-Y=CENTER_Y
Sprite1-path=pleaseselectyourmode
Sprite1-effect=NULL
Sprite1-zoom=1.0
Sprite1-X=CENTER_X
Sprite1-Y=300
[bganims-pump-1]
NumElements=2
Sprite0-path=back
Sprite0-effect=NULL
Sprite0-zoom=1.0
Sprite0-X=CENTER_X
Sprite0-Y=CENTER_Y
Sprite1-path=pleaseselectyourmode
Sprite1-effect=NULL
Sprite1-zoom=1.0
Sprite1-X=CENTER_X
Sprite1-Y=300
[bganims-pump-2]
NumElements=2
Sprite0-path=back
Sprite0-effect=NULL
Sprite0-zoom=1.0
Sprite0-X=CENTER_X
Sprite0-Y=CENTER_Y
Sprite1-path=pleaseselectyourmode
Sprite1-effect=NULL
Sprite1-zoom=1.0
Sprite1-X=CENTER_X
Sprite1-Y=300
[bganims-pump-3]
NumElements=2
Sprite0-path=back
Sprite0-effect=NULL
Sprite0-zoom=1.0
Sprite0-X=CENTER_X
Sprite0-Y=CENTER_Y
Sprite1-path=pleaseselectyourmode
Sprite1-effect=NULL
Sprite1-zoom=1.0
Sprite1-X=CENTER_X
Sprite1-Y=300
+7 -7
View File
@@ -158,11 +158,11 @@ GameDef g_GameDefs[NUM_GAMES] =
"MenuDown",
},
{ // m_szSecondaryFunction
"(MenuLeft)",
"(MenuRight)",
"(Start)",
"(MenuUp)",
"(MenuDown)",
"(Start)",
"(MenuLeft)",
"(MenuRight)",
"(dedicated)",
"",
"(dedicated)",
@@ -179,10 +179,10 @@ GameDef g_GameDefs[NUM_GAMES] =
PUMP_BUTTON_BACK, // MENU_BUTTON_BACK
},
{ // m_SecondaryMenuButton
PUMP_BUTTON_UPLEFT, // MENU_BUTTON_LEFT
PUMP_BUTTON_UPRIGHT, // MENU_BUTTON_RIGHT
PUMP_BUTTON_DOWNLEFT, // MENU_BUTTON_UP
PUMP_BUTTON_DOWNRIGHT, // MENU_BUTTON_DOWN
PUMP_BUTTON_DOWNLEFT, // MENU_BUTTON_LEFT
PUMP_BUTTON_DOWNRIGHT, // MENU_BUTTON_RIGHT
PUMP_BUTTON_UPLEFT, // MENU_BUTTON_UP
PUMP_BUTTON_UPRIGHT, // MENU_BUTTON_DOWN
PUMP_BUTTON_CENTER, // MENU_BUTTON_START
PUMP_BUTTON_BACK, // MENU_BUTTON_BACK
},
+1
View File
@@ -21,6 +21,7 @@ class GameManager
{
public:
GameManager();
~GameManager();
GameDef* GetGameDefForGame( Game g );
const StyleDef* GetStyleDefForStyle( Style s );
+75 -23
View File
@@ -37,6 +37,8 @@ const ScreenMessage SM_GoToNextScreen = ScreenMessage(SM_User + 2);
#define NEXT_SCREEN THEME->GetMetric("ScreenEz2SelectStyle","NextScreen")
#define USE_METRIC_FOR_MENU THEME->GetMetricI("ScreenEz2SelectStyle","UseMetricForMenu")
#define SCROLLING_ELEMENT_SPACING THEME->GetMetricI("ScreenEz2SelectStyle","ScrollingElementSpacing")
#define DISABLE_2P THEME->GetMetricI("ScreenEz2SelectStyle","Disable2p")
#define SCROLLING_LIST_Y THEME->GetMetricF("ScreenEz2SelectStyle","ScrollingListY")
const float TWEEN_TIME = 0.35f;
@@ -62,10 +64,10 @@ ScreenEz2SelectStyle::ScreenEz2SelectStyle()
}
m_BGAnim[0].SetZoom(1.0f);
m_ScrollingList.SetXY( CENTER_X, CENTER_Y );
m_ScrollingList.SetSpacing( SCROLLING_ELEMENT_SPACING );
m_ScrollingList.SetNumberVisible( 5 );
this->AddChild( &m_ScrollingList );
m_ScrollingList.SetXY( CENTER_X, SCROLLING_LIST_Y );
m_ScrollingList.SetSpacing( SCROLLING_ELEMENT_SPACING );
m_ScrollingList.SetNumberVisible( 9 );
this->AddChild( &m_ScrollingList );
for( int p=0; p<NUM_PLAYERS; p++ )
@@ -100,18 +102,9 @@ ScreenEz2SelectStyle::ScreenEz2SelectStyle()
if (USE_METRIC_FOR_MENU == 1) // get it from the metrics
{
int numstyles = THEME->GetMetricI("ScreenEz2SelectStyle","NumStyles"); // get the number of styles we need
CStringArray asGraphicPaths;
for (i=0; i<numstyles; i++) // load in the graphics we want to use
{
asGraphicPaths.Add( THEME->GetPathTo("Graphics",ssprintf("%s",THEME->GetMetric("ScreenEz2SelectStyle",ssprintf("StyleGraphic%d",i) ) ) ) );
}
m_ScrollingList.Load( asGraphicPaths );
RefreshStylesAndListFromMetrics();
}
else // get it from the styles....
else // get it from the styles......
{
RefreshStylesAndList();
}
@@ -204,6 +197,35 @@ void ScreenEz2SelectStyle::HandleScreenMessage( const ScreenMessage SM )
}
}
void ScreenEz2SelectStyle::RefreshStylesAndListFromMetrics()
{
int numstyles = THEME->GetMetricI("ScreenEz2SelectStyle","NumStyles"); // get the number of styles we need
int numstyles2p = THEME->GetMetricI("ScreenEz2SelectStyle","NumStyles2p"); // get the number of styles we need
int iNumSidesJoined = 0;
for( int c=0; c<2; c++ )
if( GAMESTATE->m_bSideIsJoined[c] )
iNumSidesJoined++; // left side, and right side
CStringArray asGraphicPaths;
if( iNumSidesJoined == 2 ) // we got two players
{
for (int i=0; i<numstyles2p; i++) // load in the graphics we want to use
{
asGraphicPaths.Add( THEME->GetPathTo("Graphics",ssprintf("%s",THEME->GetMetric("ScreenEz2SelectStyle",ssprintf("StyleGraphic2p%d",i) ) ) ) );
}
}
else // else we got one player
{
for (int i=0; i<numstyles; i++) // load in the graphics we want to use
{
asGraphicPaths.Add( THEME->GetPathTo("Graphics",ssprintf("%s",THEME->GetMetric("ScreenEz2SelectStyle",ssprintf("StyleGraphic%d",i) ) ) ) );
}
}
m_ScrollingList.Load( asGraphicPaths );
}
void ScreenEz2SelectStyle::RefreshStylesAndList()
{
GAMEMAN->GetGameplayStylesForGame( GAMESTATE->m_CurGame, m_aPossibleStyles );
@@ -301,7 +323,7 @@ presses the button bound to start
************************************/
void ScreenEz2SelectStyle::MenuStart( PlayerNumber pn )
{
if( !GAMESTATE->m_bSideIsJoined[pn] )
if( !GAMESTATE->m_bSideIsJoined[pn] && !DISABLE_2P )
{
// join them
GAMESTATE->m_bSideIsJoined[pn] = true;
@@ -311,8 +333,15 @@ void ScreenEz2SelectStyle::MenuStart( PlayerNumber pn )
m_sprCursors[pn].SetTweenZoomY( 0 );
m_sprControllers[pn].BeginTweening( 0.25f );
m_sprControllers[pn].SetTweenZoomY( 0 );
RefreshStylesAndList();
if (USE_METRIC_FOR_MENU == 1) // get it from the metrics
{
RefreshStylesAndListFromMetrics();
}
else
{
RefreshStylesAndList();
}
m_ScrollingList.SetSelection( 0 );
/********** TODO: MAKE IT WORK FOR ALL GAME TYPES! ************/
@@ -330,17 +359,40 @@ void ScreenEz2SelectStyle::MenuStart( PlayerNumber pn )
if (USE_METRIC_FOR_MENU == 1) // get it from the metrics
{
int chosen=m_ScrollingList.GetSelection();
int iNumSidesJoined = 0;
for( int c=0; c<2; c++ )
if( GAMESTATE->m_bSideIsJoined[c] )
iNumSidesJoined++; // left side, and right side
GAMEMAN->GetGameplayStylesForGame( GAMESTATE->m_CurGame, m_aPossibleStyles );
GAMESTATE->m_CurStyle = m_aPossibleStyles[ THEME->GetMetricI("ScreenEz2SelectStyle",ssprintf("UseStyle%d",chosen) ) ];
if( iNumSidesJoined == 2 ) // load in the Style to use based upon the list for 2players
GAMESTATE->m_CurStyle = m_aPossibleStyles[ THEME->GetMetricI("ScreenEz2SelectStyle",ssprintf("UseStyle2p%d",chosen) ) ];
else // load in the Style to use based upon the list for 1player
GAMESTATE->m_CurStyle = m_aPossibleStyles[ THEME->GetMetricI("ScreenEz2SelectStyle",ssprintf("UseStyle%d",chosen) ) ];
int m_diSelection = THEME->GetMetricI("ScreenEz2SelectStyle",ssprintf("UseDifficulty%d",chosen) );
int m_diSelection;
if( iNumSidesJoined == 2 )
m_diSelection = THEME->GetMetricI("ScreenEz2SelectStyle",ssprintf("UseDifficulty2p%d",chosen) );
else
m_diSelection = THEME->GetMetricI("ScreenEz2SelectStyle",ssprintf("UseDifficulty%d",chosen) );
switch( m_diSelection )
{
case 0: GAMESTATE->m_PreferredDifficultyClass[PLAYER_1] = CLASS_EASY; break;
case 1: GAMESTATE->m_PreferredDifficultyClass[PLAYER_1] = CLASS_MEDIUM; break;
case 2: GAMESTATE->m_PreferredDifficultyClass[PLAYER_1] = CLASS_HARD; break;
case 0:
GAMESTATE->m_PreferredDifficultyClass[PLAYER_1] = CLASS_EASY;
GAMESTATE->m_PreferredDifficultyClass[PLAYER_2] = CLASS_EASY;
break;
case 1:
GAMESTATE->m_PreferredDifficultyClass[PLAYER_1] = CLASS_MEDIUM;
GAMESTATE->m_PreferredDifficultyClass[PLAYER_2] = CLASS_MEDIUM;
break;
case 2:
GAMESTATE->m_PreferredDifficultyClass[PLAYER_1] = CLASS_HARD;
GAMESTATE->m_PreferredDifficultyClass[PLAYER_2] = CLASS_HARD;
break;
}
}
+2
View File
@@ -53,6 +53,8 @@ protected:
ScrollingList m_ScrollingList;
void RefreshStylesAndList();
void RefreshStylesAndListFromMetrics();
Sprite m_sprBackgrounds[NUM_STYLES];
+1 -1
View File
@@ -19,7 +19,7 @@
#include "Course.h"
#include "SongManager.h"
const int DEFAULT_VISIBLE_ELEMENTS = 3;
const int DEFAULT_VISIBLE_ELEMENTS = 9;
const int DEFAULT_SPACING = 300;
const D3DXCOLOR COLOR_SELECTED = D3DXCOLOR(1.0f,1.0f,1.0f,1);