Fixed goofiness in SelectMode
This commit is contained in:
@@ -270,6 +270,7 @@ ScoreP1X=520
|
|||||||
ScoreP1Y=210
|
ScoreP1Y=210
|
||||||
ScoreP2X=520
|
ScoreP2X=520
|
||||||
ScoreP2Y=286
|
ScoreP2Y=286
|
||||||
|
ScoreZoom=0.8
|
||||||
HelpText=Use ! " to select, then press START
|
HelpText=Use ! " to select, then press START
|
||||||
TimerSeconds=60
|
TimerSeconds=60
|
||||||
|
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
#define WHEEL_Y THEME->GetMetricF("ScreenSelectCourse","WheelY")
|
#define WHEEL_Y THEME->GetMetricF("ScreenSelectCourse","WheelY")
|
||||||
#define SCORE_X( p ) THEME->GetMetricF("ScreenSelectCourse",ssprintf("ScoreP%dX",p+1))
|
#define SCORE_X( p ) THEME->GetMetricF("ScreenSelectCourse",ssprintf("ScoreP%dX",p+1))
|
||||||
#define SCORE_Y( i ) THEME->GetMetricF("ScreenSelectCourse",ssprintf("ScoreP%dY",i+1))
|
#define SCORE_Y( i ) THEME->GetMetricF("ScreenSelectCourse",ssprintf("ScoreP%dY",i+1))
|
||||||
|
#define SCORE_ZOOM THEME->GetMetricF("ScreenSelectCourse","ScoreZoom")
|
||||||
#define HELP_TEXT THEME->GetMetric("ScreenSelectCourse","HelpText")
|
#define HELP_TEXT THEME->GetMetric("ScreenSelectCourse","HelpText")
|
||||||
#define TIMER_SECONDS THEME->GetMetricI("ScreenSelectCourse","TimerSeconds")
|
#define TIMER_SECONDS THEME->GetMetricI("ScreenSelectCourse","TimerSeconds")
|
||||||
|
|
||||||
@@ -113,7 +114,7 @@ ScreenSelectCourse::ScreenSelectCourse()
|
|||||||
this->AddChild( &m_sprHighScoreFrame[p] );
|
this->AddChild( &m_sprHighScoreFrame[p] );
|
||||||
|
|
||||||
m_HighScore[p].SetXY( SCORE_X(p), SCORE_Y(p) );
|
m_HighScore[p].SetXY( SCORE_X(p), SCORE_Y(p) );
|
||||||
m_HighScore[p].SetZoom( 0.6f );
|
m_HighScore[p].SetZoom( SCORE_ZOOM );
|
||||||
m_HighScore[p].SetDiffuse( PlayerToColor(p) );
|
m_HighScore[p].SetDiffuse( PlayerToColor(p) );
|
||||||
this->AddChild( &m_HighScore[p] );
|
this->AddChild( &m_HighScore[p] );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ ScreenEzSelectPlayer,cpp
|
|||||||
Desc: See Header
|
Desc: See Header
|
||||||
Copyright (C):
|
Copyright (C):
|
||||||
Andrew Livy
|
Andrew Livy
|
||||||
|
Chris Danford
|
||||||
*****************************************/
|
*****************************************/
|
||||||
|
|
||||||
/* Includes */
|
/* Includes */
|
||||||
@@ -184,7 +185,7 @@ void ScreenSelectMode::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
switch( SM )
|
switch( SM )
|
||||||
{
|
{
|
||||||
case SM_MenuTimer:
|
case SM_MenuTimer:
|
||||||
MenuStart(PLAYER_1);
|
MenuStart( PLAYER_INVALID );
|
||||||
m_Menu.StopTimer();
|
m_Menu.StopTimer();
|
||||||
|
|
||||||
TweenOffScreen();
|
TweenOffScreen();
|
||||||
@@ -195,8 +196,25 @@ void ScreenSelectMode::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
|
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
|
||||||
break;
|
break;
|
||||||
case SM_GoToNextScreen:
|
case SM_GoToNextScreen:
|
||||||
|
// Put the mode choice into effect
|
||||||
|
int iSelection = m_ScrollingList.GetSelection();
|
||||||
|
const ModeChoice& choice = m_aPossibleModeChoices[ iSelection ];
|
||||||
|
GAMESTATE->m_CurStyle = choice.style;
|
||||||
|
GAMESTATE->m_PlayMode = choice.pm;
|
||||||
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
|
GAMESTATE->m_PreferredDifficulty[p] = choice.dc;
|
||||||
|
|
||||||
|
switch( GAMESTATE->m_PlayMode )
|
||||||
|
{
|
||||||
|
case PLAY_MODE_ARCADE:
|
||||||
SCREENMAN->SetNewScreen( NEXT_SCREEN );
|
SCREENMAN->SetNewScreen( NEXT_SCREEN );
|
||||||
break;
|
break;
|
||||||
|
case PLAY_MODE_ONI:
|
||||||
|
case PLAY_MODE_ENDLESS:
|
||||||
|
SCREENMAN->SetNewScreen( "ScreenSelectCourse" );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -207,14 +225,17 @@ void ScreenSelectMode::RefreshModeChoices()
|
|||||||
GAMEMAN->GetModesChoicesForGame( GAMESTATE->m_CurGame, m_aPossibleModeChoices );
|
GAMEMAN->GetModesChoicesForGame( GAMESTATE->m_CurGame, m_aPossibleModeChoices );
|
||||||
ASSERT( m_aPossibleModeChoices.GetSize() > 0 );
|
ASSERT( m_aPossibleModeChoices.GetSize() > 0 );
|
||||||
|
|
||||||
|
// remove ModeChoices that won't work with the current number of players
|
||||||
|
for( int i=m_aPossibleModeChoices.GetSize()-1; i>=0; i-- )
|
||||||
|
if( m_aPossibleModeChoices[i].numSidesJoinedToPlay != iNumSidesJoined )
|
||||||
|
m_aPossibleModeChoices.RemoveAt( i );
|
||||||
|
|
||||||
CString sGameName = GAMESTATE->GetCurrentGameDef()->m_szName;
|
CString sGameName = GAMESTATE->GetCurrentGameDef()->m_szName;
|
||||||
|
|
||||||
CStringArray asGraphicPaths;
|
CStringArray asGraphicPaths;
|
||||||
for( int i=0; i<m_aPossibleModeChoices.GetSize(); i++ )
|
for( int i=0; i<m_aPossibleModeChoices.GetSize(); i++ )
|
||||||
{
|
{
|
||||||
const ModeChoice& choice = m_aPossibleModeChoices[i];
|
const ModeChoice& choice = m_aPossibleModeChoices[i];
|
||||||
|
|
||||||
if( choice.numSidesJoinedToPlay == iNumSidesJoined )
|
|
||||||
asGraphicPaths.Add( THEME->GetPathTo("Graphics", ssprintf("select mode choice %s %s", sGameName, choice.name) ) );
|
asGraphicPaths.Add( THEME->GetPathTo("Graphics", ssprintf("select mode choice %s %s", sGameName, choice.name) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -286,6 +307,9 @@ presses the button bound to start
|
|||||||
************************************/
|
************************************/
|
||||||
void ScreenSelectMode::MenuStart( PlayerNumber pn )
|
void ScreenSelectMode::MenuStart( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
|
if( pn == PLAYER_INVALID )
|
||||||
|
pn = GAMESTATE->m_MasterPlayerNumber;
|
||||||
|
|
||||||
if( !GAMESTATE->m_bSideIsJoined[pn] )
|
if( !GAMESTATE->m_bSideIsJoined[pn] )
|
||||||
{
|
{
|
||||||
// join them
|
// join them
|
||||||
@@ -312,12 +336,6 @@ void ScreenSelectMode::MenuStart( PlayerNumber pn )
|
|||||||
// made a selection
|
// made a selection
|
||||||
m_soundSelect.Play();
|
m_soundSelect.Play();
|
||||||
|
|
||||||
const ModeChoice& choice = m_aPossibleModeChoices[ m_ScrollingList.GetSelection() ];
|
|
||||||
GAMESTATE->m_CurStyle = choice.style;
|
|
||||||
GAMESTATE->m_PlayMode = choice.pm;
|
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
|
||||||
GAMESTATE->m_PreferredDifficulty[p] = choice.dc;
|
|
||||||
|
|
||||||
TweenOffScreen();
|
TweenOffScreen();
|
||||||
m_Menu.TweenOffScreenToMenu( SM_GoToNextScreen );
|
m_Menu.TweenOffScreenToMenu( SM_GoToNextScreen );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user