Total Re-write of ScreenSelectMode, now working under the ScreenSelect class, but still a lot of work to do.
This commit is contained in:
+36
-21
@@ -3,29 +3,22 @@ X denotes task complete or no longer required to do.
|
|||||||
- denotes task to do, but also being worked upon by other dev.
|
- denotes task to do, but also being worked upon by other dev.
|
||||||
H denotes task on hold.
|
H denotes task on hold.
|
||||||
|
|
||||||
TODO As of: 12:26 03/02/28
|
TODO As of: 17:11 03/04/22
|
||||||
* Mathematics Assignment
|
* Pass Exams
|
||||||
* Integrating Assignment 3
|
* Finish the BGA editor
|
||||||
|
|
||||||
|
|
||||||
TODO As of: 16:57 03/02/08
|
TODO As of: 16:57 03/02/08
|
||||||
X Object Oriented Design 2 Assignment
|
X Object Oriented Design 2 Assignment
|
||||||
X Operating Systems 2 Assignment
|
X Operating Systems 2 Assignment
|
||||||
* Systems Programming 2 Assignment
|
X Systems Programming 2 Assignment
|
||||||
* Para-Style EndScreens
|
* Para-Style EndScreens
|
||||||
* Para-Style Scoreboard
|
* Para-Style Scoreboard
|
||||||
* Ez2-Style Scoreboard
|
* Ez2-Style Scoreboard
|
||||||
H Pump Battle Mode
|
- Pump Battle Mode
|
||||||
H Pump Random Speed
|
H Pump Random Speed
|
||||||
H Pump Random Vanish
|
H Pump Random Vanish
|
||||||
|
|
||||||
TODO As of: 06:36:PM 10/12/02
|
|
||||||
X Optimize The Music Banner Wheel
|
|
||||||
|
|
||||||
TODO As of: 04:46:PM 27/11/02
|
|
||||||
X Systems Programming Assignment
|
|
||||||
X Integrating Assignment 2
|
|
||||||
X Add Scoreboard Initials Entry Frontend
|
|
||||||
|
|
||||||
TODO As of: 01:30:PM 13/11/02
|
TODO As of: 01:30:PM 13/11/02
|
||||||
* Work on 3DDX Support
|
* Work on 3DDX Support
|
||||||
X Software Engineering Assignment
|
X Software Engineering Assignment
|
||||||
@@ -41,14 +34,6 @@ H Update Menu Graphics for Ez2
|
|||||||
* Finish The PUMP Graphics
|
* Finish The PUMP Graphics
|
||||||
- Work on Beatmania Support
|
- Work on Beatmania Support
|
||||||
|
|
||||||
TODO As of: 07:47:PM 12/09/02
|
|
||||||
|
|
||||||
X Get internet connection back (evil BT!! Changed their TOS and didn't tell me!)
|
|
||||||
X Put the graphics artists work onto the project
|
|
||||||
X Add credits for the ez2 graphics team :)
|
|
||||||
X Add PARA Gametype
|
|
||||||
X Add Ez2dancer Style Select Background Animation
|
|
||||||
|
|
||||||
TODO As of: 11:42:PM 05/09/02
|
TODO As of: 11:42:PM 05/09/02
|
||||||
|
|
||||||
X Fix the Bug on ScreenStage that reports the current stage number for final stage as being 00 in Ez2
|
X Fix the Bug on ScreenStage that reports the current stage number for final stage as being 00 in Ez2
|
||||||
@@ -71,3 +56,33 @@ X Modify Pump Style Select So it is more arcade accurate.
|
|||||||
- Update the rather tacky graphics.
|
- Update the rather tacky graphics.
|
||||||
|
|
||||||
* Keep my sanity.
|
* Keep my sanity.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
Completed Modules Of Work
|
||||||
|
|
||||||
|
|
||||||
|
TODO As of: 07:47:PM 12/09/02
|
||||||
|
|
||||||
|
X Get internet connection back (evil BT!! Changed their TOS and didn't tell me!)
|
||||||
|
X Put the graphics artists work onto the project
|
||||||
|
X Add credits for the ez2 graphics team :)
|
||||||
|
X Add PARA Gametype
|
||||||
|
X Add Ez2dancer Style Select Background Animation
|
||||||
|
|
||||||
|
|
||||||
|
TODO As of: 06:36:PM 10/12/02
|
||||||
|
|
||||||
|
X Optimize The Music Banner Wheel
|
||||||
|
|
||||||
|
X TODO As of: 04:46:PM 27/11/02
|
||||||
|
X Systems Programming Assignment
|
||||||
|
X Integrating Assignment 2
|
||||||
|
X Add Scoreboard Initials Entry Frontend
|
||||||
|
|
||||||
|
|
||||||
|
TODO As of: 12:26 03/02/28
|
||||||
|
X Mathematics Assignment
|
||||||
|
X Integrating Assignment 3
|
||||||
@@ -252,7 +252,6 @@ void Screen::ClearMessageQueue( const ScreenMessage SM )
|
|||||||
#include "ScreenEditMenu.h"
|
#include "ScreenEditMenu.h"
|
||||||
#include "ScreenEvaluation.h"
|
#include "ScreenEvaluation.h"
|
||||||
#include "ScreenEz2SelectPlayer.h"
|
#include "ScreenEz2SelectPlayer.h"
|
||||||
#include "ScreenSelectMode.h"
|
|
||||||
#include "ScreenGameOver.h"
|
#include "ScreenGameOver.h"
|
||||||
#include "ScreenGameplay.h"
|
#include "ScreenGameplay.h"
|
||||||
#include "ScreenGraphicOptions.h"
|
#include "ScreenGraphicOptions.h"
|
||||||
@@ -299,6 +298,7 @@ void Screen::ClearMessageQueue( const ScreenMessage SM )
|
|||||||
#include "ScreenCredits.h"
|
#include "ScreenCredits.h"
|
||||||
#include "ScreenSelectCharacter.h"
|
#include "ScreenSelectCharacter.h"
|
||||||
#include "ScreenRaveOptions.h"
|
#include "ScreenRaveOptions.h"
|
||||||
|
#include "ScreenSelectMode.h"
|
||||||
|
|
||||||
Screen* Screen::Create( CString sClassName )
|
Screen* Screen::Create( CString sClassName )
|
||||||
{
|
{
|
||||||
@@ -316,7 +316,6 @@ Screen* Screen::Create( CString sClassName )
|
|||||||
IF_RETURN( ScreenEvaluationBattle );
|
IF_RETURN( ScreenEvaluationBattle );
|
||||||
IF_RETURN( ScreenEvaluationRave );
|
IF_RETURN( ScreenEvaluationRave );
|
||||||
IF_RETURN( ScreenEz2SelectPlayer );
|
IF_RETURN( ScreenEz2SelectPlayer );
|
||||||
IF_RETURN( ScreenSelectMode );
|
|
||||||
IF_RETURN( ScreenGameOver );
|
IF_RETURN( ScreenGameOver );
|
||||||
IF_RETURN( ScreenGameplay );
|
IF_RETURN( ScreenGameplay );
|
||||||
IF_RETURN( ScreenGraphicOptions );
|
IF_RETURN( ScreenGraphicOptions );
|
||||||
@@ -336,6 +335,7 @@ Screen* Screen::Create( CString sClassName )
|
|||||||
IF_RETURN( ScreenSelectMusic );
|
IF_RETURN( ScreenSelectMusic );
|
||||||
IF_RETURN( ScreenSelectStyle5th );
|
IF_RETURN( ScreenSelectStyle5th );
|
||||||
IF_RETURN( ScreenSelectStyle );
|
IF_RETURN( ScreenSelectStyle );
|
||||||
|
IF_RETURN( ScreenSelectMode );
|
||||||
IF_RETURN( ScreenSongOptions );
|
IF_RETURN( ScreenSongOptions );
|
||||||
IF_RETURN( ScreenStage );
|
IF_RETURN( ScreenStage );
|
||||||
IF_RETURN( ScreenTest );
|
IF_RETURN( ScreenTest );
|
||||||
|
|||||||
@@ -179,7 +179,16 @@ void ScreenSelect::Input( const DeviceInput& DeviceI, const InputEventType type,
|
|||||||
* are other screens you can join (eg ScreenCaution). -glenn */
|
* are other screens you can join (eg ScreenCaution). -glenn */
|
||||||
|
|
||||||
/* Joint premium on a DDR machine does allow two player modes with a single
|
/* Joint premium on a DDR machine does allow two player modes with a single
|
||||||
* credit. -Chris */
|
* credit. -Chris
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Indeed, I can see three different premium settings here:
|
||||||
|
AnyPlayersTwoCoins (2 coins for doubles and 2 coins for versus)
|
||||||
|
OnePlayerOneCoin (1 coin for doubles, but 2 coins for versus (like pump and ez2))
|
||||||
|
TwoPlayerOneCoin (1 coin for doubles / versus play)
|
||||||
|
perhaps we should change the joint premium system to work this way?
|
||||||
|
That way we can support all gametypes.
|
||||||
|
*/
|
||||||
|
|
||||||
if( PREFSMAN->m_iCoinMode == COIN_PAY )
|
if( PREFSMAN->m_iCoinMode == COIN_PAY )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,120 +26,53 @@ Chris Danford
|
|||||||
|
|
||||||
/* Constants */
|
/* Constants */
|
||||||
|
|
||||||
|
#define ELEM_SPACING THEME->GetMetricI("ScreenSelectMode","ElementSpacing")
|
||||||
|
#define INCLUDE_DOUBLE_IN_JP THEME->GetMetricI("ScreenSelectMode","IncludeDoubleInJointPremium")
|
||||||
#define JOIN_FRAME_X( p ) THEME->GetMetricF("ScreenSelectMode",ssprintf("JoinFrameP%dX",p+1))
|
#define SCROLLING_LIST_X THEME->GetMetricI("ScreenSelectMode","ScrollingListX")
|
||||||
#define JOIN_FRAME_Y( i ) THEME->GetMetricF("ScreenSelectMode",ssprintf("JoinFrameP%dY",i+1))
|
#define SCROLLING_LIST_Y THEME->GetMetricI("ScreenSelectMode","ScrollingListY")
|
||||||
#define JOIN_MESSAGE_X( p ) THEME->GetMetricF("ScreenSelectMode",ssprintf("JoinMessageP%dX",p+1))
|
#define GUIDE_X THEME->GetMetricF("ScreenSelectMode", "GuideX")
|
||||||
#define JOIN_MESSAGE_Y( i ) THEME->GetMetricF("ScreenSelectMode",ssprintf("JoinMessageP%dY",i+1))
|
#define GUIDE_Y THEME->GetMetricF("ScreenSelectMode", "GuideY")
|
||||||
#define GUIDE_X THEME->GetMetricF("ScreenSelectMode","GuideX")
|
|
||||||
#define GUIDE_Y THEME->GetMetricF("ScreenSelectMode","GuideY")
|
|
||||||
#define HELP_TEXT THEME->GetMetric("ScreenSelectMode","HelpText")
|
|
||||||
#define TIMER_SECONDS THEME->GetMetricI("ScreenSelectMode","TimerSeconds")
|
|
||||||
#define NEXT_SCREEN THEME->GetMetric("ScreenSelectMode","NextScreen")
|
|
||||||
#define SCROLLING_ELEMENT_SPACING THEME->GetMetricI("ScreenSelectMode","ScrollingElementSpacing")
|
|
||||||
#define SCROLLING_LIST_X THEME->GetMetricF("ScreenSelectMode","ScrollingListX")
|
|
||||||
#define SCROLLING_LIST_Y THEME->GetMetricF("ScreenSelectMode","ScrollingListY")
|
|
||||||
#define SELECTION_SPECIFIC_BG_ANIMATIONS THEME->GetMetricB("ScreenSelectMode","SelectionSpecificBGAnimations")
|
|
||||||
#define BOUNCE_JOIN_MESSAGE THEME->GetMetricB("ScreenSelectMode","BounceJoinMessage")
|
|
||||||
#define FOLD_ON_JOIN THEME->GetMetricB("ScreenSelectMode","FoldOnJoin")
|
|
||||||
|
|
||||||
const float TWEEN_TIME = 0.35f;
|
|
||||||
|
|
||||||
|
|
||||||
/************************************
|
/************************************
|
||||||
ScreenSelectMode (Constructor)
|
ScreenSelectMode (Constructor)
|
||||||
Desc: Sets up the screen display
|
Desc: Sets up the screen display
|
||||||
************************************/
|
************************************/
|
||||||
|
|
||||||
ScreenSelectMode::ScreenSelectMode() : Screen("ScreenSelectMode")
|
ScreenSelectMode::ScreenSelectMode() : ScreenSelect( "ScreenSelectMode" )
|
||||||
{
|
{
|
||||||
LOG->Trace( "ScreenSelectMode::ScreenSelectMode()" );
|
|
||||||
GAMESTATE->m_bPlayersCanJoin = true;
|
|
||||||
SCREENMAN->RefreshCreditsMessages();
|
|
||||||
|
|
||||||
|
|
||||||
GAMESTATE->m_PlayMode = PLAY_MODE_ARCADE; // the only mode you can select on this screen
|
|
||||||
|
|
||||||
|
|
||||||
/*********** TODO: MAKE THIS WORK FOR ALL GAME STYLES! *************/
|
|
||||||
m_ChoiceListFrame.Load( THEME->GetPathToG("ScreenSelectMode list frame"));
|
m_ChoiceListFrame.Load( THEME->GetPathToG("ScreenSelectMode list frame"));
|
||||||
m_ChoiceListFrame.SetXY( SCROLLING_LIST_X, SCROLLING_LIST_Y);
|
m_ChoiceListFrame.SetXY( SCROLLING_LIST_X, SCROLLING_LIST_Y);
|
||||||
this->AddChild( &m_ChoiceListFrame );
|
this->AddChild( &m_ChoiceListFrame );
|
||||||
|
|
||||||
m_ScrollingList.SetXY( CENTER_X, SCROLLING_LIST_Y );
|
m_soundModeChange.Load( THEME->GetPathToS("ScreenSelectMode modechange"));
|
||||||
m_ScrollingList.SetSpacing( SCROLLING_ELEMENT_SPACING );
|
unsigned i;
|
||||||
m_ScrollingList.SetNumberVisible( 9 );
|
for( i=0; i<m_aModeChoices.size(); i++ )
|
||||||
|
{
|
||||||
|
const ModeChoice& mc = m_aModeChoices[i];
|
||||||
|
|
||||||
|
//
|
||||||
|
// Load Sprite
|
||||||
|
//
|
||||||
|
CString sElementName = ssprintf("ScreenSelectMode %s", mc.name );
|
||||||
|
CString sElementPath = THEME->GetPathToG(sElementName);
|
||||||
|
|
||||||
|
arrayLocations.push_back( sElementPath );
|
||||||
|
}
|
||||||
|
|
||||||
|
// m_ScrollingList.UseSpriteType(BANNERTYPE);
|
||||||
|
m_ScrollingList.SetXY( SCROLLING_LIST_X, SCROLLING_LIST_Y );
|
||||||
|
m_ScrollingList.SetSpacing( ELEM_SPACING );
|
||||||
this->AddChild( &m_ScrollingList );
|
this->AddChild( &m_ScrollingList );
|
||||||
|
|
||||||
m_ChoiceListHighlight.Load( THEME->GetPathToG("ScreenSelectMode list highlight"));
|
m_ChoiceListHighlight.Load( THEME->GetPathToG("ScreenSelectMode list highlight"));
|
||||||
m_ChoiceListHighlight.SetXY( CENTER_X, SCROLLING_LIST_Y);
|
m_ChoiceListHighlight.SetXY( SCROLLING_LIST_X, SCROLLING_LIST_Y );
|
||||||
this->AddChild( &m_ChoiceListHighlight );
|
this->AddChild(&m_ChoiceListHighlight);
|
||||||
|
|
||||||
m_Guide.Load( THEME->GetPathToG("select mode guide"));
|
m_Guide.Load( THEME->GetPathToG("select mode guide"));
|
||||||
m_Guide.SetXY( GUIDE_X, GUIDE_Y );
|
m_Guide.SetXY( GUIDE_X, GUIDE_Y );
|
||||||
this->AddChild( &m_Guide );
|
this->AddChild( &m_Guide );
|
||||||
|
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
UpdateSelectableChoices();
|
||||||
{
|
|
||||||
m_sprJoinFrame[p].Load( THEME->GetPathToG("ScreenSelectMode join frame 1x2") );
|
|
||||||
m_sprJoinFrame[p].StopAnimating();
|
|
||||||
m_sprJoinFrame[p].SetState( p );
|
|
||||||
m_sprJoinFrame[p].SetXY( JOIN_FRAME_X(p), JOIN_FRAME_Y(p) );
|
|
||||||
this->AddChild( &m_sprJoinFrame[p] );
|
|
||||||
|
|
||||||
if( GAMESTATE->m_bSideIsJoined[p] )
|
|
||||||
m_sprJoinFrame[p].SetZoomY( 0 );
|
|
||||||
|
|
||||||
m_sprJoinMessage[p].Load( THEME->GetPathToG("ScreenSelectMode join message 2x2") );
|
|
||||||
m_sprJoinMessage[p].StopAnimating();
|
|
||||||
m_sprJoinMessage[p].SetState( p );
|
|
||||||
m_sprJoinMessage[p].SetXY( JOIN_MESSAGE_X(p), JOIN_MESSAGE_Y(p) );
|
|
||||||
if( BOUNCE_JOIN_MESSAGE )
|
|
||||||
m_sprJoinMessage[p].SetEffectBounce( 0.5f, RageVector3(0,10,0) );
|
|
||||||
this->AddChild( &m_sprJoinMessage[p] );
|
|
||||||
|
|
||||||
if( GAMESTATE->m_bSideIsJoined[p] )
|
|
||||||
{
|
|
||||||
m_sprJoinMessage[p].SetState( p+NUM_PLAYERS );
|
|
||||||
|
|
||||||
if( FOLD_ON_JOIN )
|
|
||||||
{
|
|
||||||
m_sprJoinMessage[p].SetZoomY( 0 );
|
|
||||||
m_sprJoinFrame[p].SetZoomY( 0 );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
m_Menu.Load( "ScreenSelectMode" );
|
|
||||||
this->AddChild( &m_Menu );
|
|
||||||
|
|
||||||
m_soundSelect.Load( THEME->GetPathToS("Common start") );
|
|
||||||
m_soundChange.Load( THEME->GetPathToS("ScreenSelectMode change"), true );
|
|
||||||
|
|
||||||
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select mode intro") );
|
|
||||||
|
|
||||||
SOUNDMAN->PlayMusic( THEME->GetPathToS("ScreenSelectMode music") );
|
|
||||||
|
|
||||||
RefreshModeChoices();
|
|
||||||
|
|
||||||
if( SELECTION_SPECIFIC_BG_ANIMATIONS )
|
|
||||||
{
|
|
||||||
CString sGameName = GAMESTATE->GetCurrentGameDef()->m_szName;
|
|
||||||
|
|
||||||
for( unsigned i=0; i<m_apPossibleModeChoices.size(); i++ )
|
|
||||||
{
|
|
||||||
CString sChoiceName = m_apPossibleModeChoices[i]->name;
|
|
||||||
m_Infotext[i].Load( THEME->GetPathToG(ssprintf("ScreenSelectMode infotext %s %s", sGameName.c_str(), sChoiceName.c_str())) );
|
|
||||||
m_Infotext[i].SetXY( GUIDE_X, GUIDE_Y );
|
|
||||||
this->AddChild( &m_Infotext[i] );
|
|
||||||
m_Infotext[i].SetDiffuse( RageColor(0,0,0,0));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
AfterChange();
|
|
||||||
|
|
||||||
TweenOnScreen();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************
|
/************************************
|
||||||
@@ -152,267 +85,71 @@ ScreenSelectMode::~ScreenSelectMode()
|
|||||||
LOG->Trace( "ScreenSelectMode::~ScreenSelectMode()" );
|
LOG->Trace( "ScreenSelectMode::~ScreenSelectMode()" );
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************
|
|
||||||
Update
|
|
||||||
Desc: Animates the 1p/2p selection
|
|
||||||
************************************/
|
|
||||||
void ScreenSelectMode::Update( float fDeltaTime )
|
|
||||||
{
|
|
||||||
m_BGAnimations[ m_ScrollingList.GetSelection() ].Update( fDeltaTime );
|
|
||||||
Screen::Update( fDeltaTime );
|
|
||||||
}
|
|
||||||
|
|
||||||
/************************************
|
|
||||||
DrawPrimitives
|
|
||||||
Desc: Draws the screen =P
|
|
||||||
************************************/
|
|
||||||
|
|
||||||
void ScreenSelectMode::DrawPrimitives()
|
|
||||||
{
|
|
||||||
m_Menu.DrawBottomLayer();
|
|
||||||
m_BGAnimations[ m_ScrollingList.GetSelection() ].Draw();
|
|
||||||
Screen::DrawPrimitives();
|
|
||||||
m_Menu.DrawTopLayer();
|
|
||||||
}
|
|
||||||
|
|
||||||
/************************************
|
|
||||||
Input
|
|
||||||
Desc: Handles player input.
|
|
||||||
************************************/
|
|
||||||
void ScreenSelectMode::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
|
|
||||||
{
|
|
||||||
LOG->Trace( "ScreenSelectMode::Input()" );
|
|
||||||
|
|
||||||
if( m_Menu.IsTransitioning() )
|
|
||||||
return;
|
|
||||||
|
|
||||||
Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); // default input handler
|
|
||||||
}
|
|
||||||
|
|
||||||
/************************************
|
|
||||||
HandleScreenMessage
|
|
||||||
Desc: Handles Screen Messages and changes
|
|
||||||
game states.
|
|
||||||
************************************/
|
|
||||||
void ScreenSelectMode::HandleScreenMessage( const ScreenMessage SM )
|
|
||||||
{
|
|
||||||
Screen::HandleScreenMessage( SM );
|
|
||||||
|
|
||||||
switch( SM )
|
|
||||||
{
|
|
||||||
case SM_MenuTimer:
|
|
||||||
MenuStart( PLAYER_INVALID );
|
|
||||||
TweenOffScreen();
|
|
||||||
m_Menu.StartTransitioning( SM_GoToNextScreen );
|
|
||||||
break;
|
|
||||||
case SM_GoToPrevScreen:
|
|
||||||
SOUNDMAN->StopMusic();
|
|
||||||
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
|
|
||||||
break;
|
|
||||||
case SM_GoToNextScreen:
|
|
||||||
// Put the mode choice into effect
|
|
||||||
int iSelection = m_ScrollingList.GetSelection();
|
|
||||||
const ModeChoice* pChoice = m_apPossibleModeChoices[ iSelection ];
|
|
||||||
GAMESTATE->m_CurStyle = pChoice->style;
|
|
||||||
GAMESTATE->m_PlayMode = pChoice->pm;
|
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
|
||||||
GAMESTATE->m_PreferredDifficulty[p] = pChoice->dc;
|
|
||||||
|
|
||||||
switch( GAMESTATE->m_PlayMode )
|
|
||||||
{
|
|
||||||
case PLAY_MODE_ARCADE:
|
|
||||||
SCREENMAN->SetNewScreen( NEXT_SCREEN );
|
|
||||||
break;
|
|
||||||
case PLAY_MODE_NONSTOP:
|
|
||||||
case PLAY_MODE_ONI:
|
|
||||||
case PLAY_MODE_ENDLESS:
|
|
||||||
SCREENMAN->SetNewScreen( "ScreenSelectCourse" );
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
ASSERT(0);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ScreenSelectMode::RefreshModeChoices()
|
|
||||||
{
|
|
||||||
int iNumSidesJoined = GAMESTATE->GetNumSidesJoined();
|
|
||||||
|
|
||||||
// GAMEMAN->GetModesChoicesForGame( GAMESTATE->m_CurGame, m_apPossibleModeChoices ); // FIXME
|
|
||||||
ASSERT( !m_apPossibleModeChoices.empty() );
|
|
||||||
|
|
||||||
int i;
|
|
||||||
|
|
||||||
// remove ModeChoices that won't work with the current number of players
|
|
||||||
for( i=m_apPossibleModeChoices.size()-1; i>=0; i-- )
|
|
||||||
if( m_apPossibleModeChoices[i]->numSidesJoinedToPlay != iNumSidesJoined )
|
|
||||||
m_apPossibleModeChoices.erase( m_apPossibleModeChoices.begin()+i,
|
|
||||||
m_apPossibleModeChoices.begin()+i+1 );
|
|
||||||
|
|
||||||
CString sGameName = GAMESTATE->GetCurrentGameDef()->m_szName;
|
|
||||||
|
|
||||||
CStringArray asGraphicPaths;
|
|
||||||
for( unsigned j=0; j<m_apPossibleModeChoices.size(); j++ )
|
|
||||||
{
|
|
||||||
const ModeChoice* pChoice = m_apPossibleModeChoices[j];
|
|
||||||
asGraphicPaths.push_back( THEME->GetPathToG( ssprintf("select mode choice %s %s", sGameName.c_str(), pChoice->name) ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
m_ScrollingList.Load( asGraphicPaths );
|
|
||||||
|
|
||||||
|
|
||||||
if( SELECTION_SPECIFIC_BG_ANIMATIONS )
|
|
||||||
{
|
|
||||||
CString sGameName = GAMESTATE->GetCurrentGameDef()->m_szName;
|
|
||||||
|
|
||||||
for( unsigned i=0; i<m_apPossibleModeChoices.size(); i++ )
|
|
||||||
{
|
|
||||||
CString sChoiceName = m_apPossibleModeChoices[i]->name;
|
|
||||||
m_BGAnimations[i].LoadFromAniDir( THEME->GetPathToB(ssprintf("select mode %s %s", sGameName.c_str(), sChoiceName.c_str())) );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/************************************
|
|
||||||
MenuBack
|
|
||||||
Desc: Actions performed when a player
|
|
||||||
presses the button bound to back
|
|
||||||
************************************/
|
|
||||||
void ScreenSelectMode::MenuBack( PlayerNumber pn )
|
|
||||||
{
|
|
||||||
SOUNDMAN->StopMusic();
|
|
||||||
|
|
||||||
m_Menu.Back( SM_GoToPrevScreen );
|
|
||||||
}
|
|
||||||
|
|
||||||
void ScreenSelectMode::AfterChange()
|
|
||||||
{
|
|
||||||
if( SELECTION_SPECIFIC_BG_ANIMATIONS )
|
|
||||||
{
|
|
||||||
for( unsigned i=0; i<m_apPossibleModeChoices.size(); i++ )
|
|
||||||
{
|
|
||||||
if(i == (unsigned)m_ScrollingList.GetSelection())
|
|
||||||
{
|
|
||||||
m_Infotext[i].SetDiffuse(RageColor(1,1,1,1));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_Infotext[i].SetDiffuse(RageColor(0,0,0,0));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// CString sGameName = GAMESTATE->GetCurrentGameDef()->m_szName;
|
|
||||||
// const ModeChoice& choice = m_aPossibleModeChoices[ m_ScrollingList.GetSelection() ];
|
|
||||||
}
|
|
||||||
|
|
||||||
void ScreenSelectMode::MenuLeft( PlayerNumber pn )
|
void ScreenSelectMode::MenuLeft( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
m_ScrollingList.Left();
|
m_ScrollingList.Left();
|
||||||
m_soundChange.Play();
|
m_soundModeChange.Play();
|
||||||
AfterChange();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenSelectMode::MenuRight( PlayerNumber pn )
|
void ScreenSelectMode::MenuRight( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
m_ScrollingList.Right();
|
m_ScrollingList.Right();
|
||||||
m_soundChange.Play();
|
m_soundModeChange.Play();
|
||||||
AfterChange();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************
|
void ScreenSelectMode::UpdateSelectableChoices()
|
||||||
MenuDown
|
|
||||||
Desc: Actions performed when a player
|
|
||||||
presses the button bound to down
|
|
||||||
************************************/
|
|
||||||
void ScreenSelectMode::MenuDown( PlayerNumber pn )
|
|
||||||
{
|
{
|
||||||
if( GAMESTATE->m_bSideIsJoined[pn] ) // already joined
|
CStringArray GraphicPaths;
|
||||||
return; // ignore
|
m_iNumChoices = 0;
|
||||||
|
unsigned i=0;
|
||||||
MenuStart( pn );
|
unsigned j=0;
|
||||||
}
|
for( i=0; i<m_aModeChoices.size(); i++ )
|
||||||
|
|
||||||
/************************************
|
|
||||||
MenuStart
|
|
||||||
Desc: Actions performed when a player
|
|
||||||
presses the button bound to start
|
|
||||||
************************************/
|
|
||||||
void ScreenSelectMode::MenuStart( PlayerNumber pn )
|
|
||||||
{
|
|
||||||
if( pn == PLAYER_INVALID )
|
|
||||||
pn = GAMESTATE->m_MasterPlayerNumber;
|
|
||||||
|
|
||||||
if( !GAMESTATE->m_bSideIsJoined[pn] )
|
|
||||||
{
|
{
|
||||||
// join them
|
const ModeChoice& mc = m_aModeChoices[i];
|
||||||
GAMESTATE->m_bSideIsJoined[pn] = true;
|
CString modename = mc.name;
|
||||||
SCREENMAN->RefreshCreditsMessages();
|
modename.MakeUpper();
|
||||||
m_soundSelect.Play();
|
|
||||||
|
|
||||||
m_sprJoinMessage[pn].SetState( pn + NUM_PLAYERS );
|
|
||||||
|
|
||||||
if( FOLD_ON_JOIN )
|
// if its joint premium and inclusive of double consider double and versus as needing another coin
|
||||||
|
// if its joint premium and non-inclusive of double consider double as appearing only when one player is available.
|
||||||
|
// if its joint premium, everythings available for play
|
||||||
|
if(
|
||||||
|
(PREFSMAN->m_bJointPremium && INCLUDE_DOUBLE_IN_JP == 1 && ((GAMESTATE->GetNumSidesJoined() == 1 && mc.numSidesJoinedToPlay == 1) || (GAMESTATE->GetNumSidesJoined() == 2 && mc.numSidesJoinedToPlay == 2))) ||
|
||||||
|
(PREFSMAN->m_bJointPremium && INCLUDE_DOUBLE_IN_JP == 0 &&
|
||||||
|
((modename.substr(0, 6) == "DOUBLE" && GAMESTATE->GetNumSidesJoined() != 2 ) || GAMESTATE->GetNumSidesJoined() == 1 && mc.numSidesJoinedToPlay == 1) ||
|
||||||
|
(modename.substr(0, 6) != "DOUBLE" && GAMESTATE->GetNumSidesJoined() == 2 && mc.numSidesJoinedToPlay == 2)) ||
|
||||||
|
(!PREFSMAN->m_bJointPremium)
|
||||||
|
)
|
||||||
{
|
{
|
||||||
m_sprJoinMessage[pn].BeginTweening( 0.25f );
|
m_iNumChoices++;
|
||||||
m_sprJoinMessage[pn].SetZoomY( 0 );
|
if(j<=MAX_ELEMS)
|
||||||
m_sprJoinFrame[pn].BeginTweening( 0.25f );
|
{
|
||||||
m_sprJoinFrame[pn].SetZoomY( 0 );
|
m_iSelectableChoices[j] = i;
|
||||||
}
|
j++;
|
||||||
|
|
||||||
RefreshModeChoices();
|
|
||||||
|
|
||||||
m_ScrollingList.SetSelection( 0 );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// made a selection
|
ASSERT(0); // too many choices, can't track them all. Quick Fix: If You Get This Just Increase MAX_ELEMS
|
||||||
m_soundSelect.Play();
|
|
||||||
|
|
||||||
TweenOffScreen();
|
|
||||||
m_Menu.StartTransitioning( SM_GoToNextScreen );
|
|
||||||
GAMESTATE->m_bPlayersCanJoin = false;
|
|
||||||
SCREENMAN->RefreshCreditsMessages();
|
|
||||||
}
|
}
|
||||||
|
GraphicPaths.push_back(arrayLocations[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
m_ScrollingList.Unload();
|
||||||
|
m_ScrollingList.Load(GraphicPaths);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenSelectMode::TweenOnScreen()
|
|
||||||
|
void ScreenSelectMode::MenuStart( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
float fOriginalZoomY = m_ScrollingList.GetZoomY();
|
SCREENMAN->PostMessageToTopScreen( SM_AllDoneChoosing, 0 );
|
||||||
m_ScrollingList.BeginTweening( 0.5f );
|
|
||||||
m_ScrollingList.SetZoomY( fOriginalZoomY );
|
|
||||||
|
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
|
||||||
{
|
|
||||||
float fOffScreenOffset = float( (p==PLAYER_1) ? -SCREEN_WIDTH/2 : +SCREEN_WIDTH/2 );
|
|
||||||
|
|
||||||
float fOriginalX;
|
|
||||||
|
|
||||||
fOriginalX = m_sprJoinMessage[p].GetX();
|
|
||||||
m_sprJoinMessage[p].SetX( m_sprJoinMessage[p].GetX()+fOffScreenOffset );
|
|
||||||
m_sprJoinMessage[p].BeginTweening( 0.5f, Actor::TWEEN_BOUNCE_END );
|
|
||||||
m_sprJoinMessage[p].SetX( fOriginalX );
|
|
||||||
|
|
||||||
fOriginalX = m_sprJoinFrame[p].GetX();
|
|
||||||
m_sprJoinFrame[p].SetX( m_sprJoinMessage[p].GetX()+fOffScreenOffset );
|
|
||||||
m_sprJoinFrame[p].BeginTweening( 0.5f, Actor::TWEEN_BOUNCE_END );
|
|
||||||
m_sprJoinFrame[p].SetX( fOriginalX );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenSelectMode::TweenOffScreen()
|
int ScreenSelectMode::GetSelectionIndex( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
m_ScrollingList.BeginTweening( 0.5f );
|
return m_iSelectableChoices[m_ScrollingList.GetSelection()];
|
||||||
m_ScrollingList.SetZoomY( 0 );
|
}
|
||||||
|
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
void ScreenSelectMode::Update( float fDelta )
|
||||||
{
|
{
|
||||||
float fOffScreenOffset = float( (p==PLAYER_1) ? -SCREEN_WIDTH : +SCREEN_WIDTH );
|
ScreenSelect::Update( fDelta );
|
||||||
|
|
||||||
m_sprJoinMessage[p].BeginTweening( 0.5f, Actor::TWEEN_DECELERATE );
|
|
||||||
m_sprJoinMessage[p].SetX( m_sprJoinMessage[p].GetX()+fOffScreenOffset );
|
|
||||||
m_sprJoinFrame[p].BeginTweening( 0.5f, Actor::TWEEN_DECELERATE );
|
|
||||||
m_sprJoinFrame[p].SetX( m_sprJoinMessage[p].GetX()+fOffScreenOffset );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -6,7 +6,7 @@ Andrew Livy
|
|||||||
*********************************/
|
*********************************/
|
||||||
|
|
||||||
/* Includes */
|
/* Includes */
|
||||||
|
#include "ScreenSelect.h"
|
||||||
#include "Background.h"
|
#include "Background.h"
|
||||||
#include "Screen.h"
|
#include "Screen.h"
|
||||||
#include "Sprite.h"
|
#include "Sprite.h"
|
||||||
@@ -16,54 +16,32 @@ Andrew Livy
|
|||||||
#include "GameConstantsAndTypes.h"
|
#include "GameConstantsAndTypes.h"
|
||||||
#include "ModeChoice.h"
|
#include "ModeChoice.h"
|
||||||
#include "BitmapText.h"
|
#include "BitmapText.h"
|
||||||
// #include "TransitionFade.h"
|
|
||||||
#include "RandomSample.h"
|
#include "RandomSample.h"
|
||||||
|
|
||||||
/* Class Definition */
|
/* Class Definition */
|
||||||
|
|
||||||
#define MAX_MODE_CHOICES2 10
|
#define MAX_ELEMS 30
|
||||||
|
|
||||||
|
class ScreenSelectMode : public ScreenSelect
|
||||||
class ScreenSelectMode : public Screen
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenSelectMode(); // Constructor
|
ScreenSelectMode(); // Constructor
|
||||||
virtual ~ScreenSelectMode(); // Destructor
|
virtual ~ScreenSelectMode(); // Destructor
|
||||||
|
virtual void MenuLeft( PlayerNumber pn );
|
||||||
/* Public Function Prototypes */
|
virtual void MenuRight( PlayerNumber pn );
|
||||||
virtual void Update( float fDeltaTime );
|
virtual void MenuStart( PlayerNumber pn );
|
||||||
virtual void DrawPrimitives();
|
virtual void Update( float fDelta );
|
||||||
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
|
||||||
virtual void HandleScreenMessage( const ScreenMessage SM );
|
|
||||||
|
|
||||||
void MenuLeft( PlayerNumber pn );
|
|
||||||
void MenuRight( PlayerNumber pn );
|
|
||||||
void MenuStart( PlayerNumber pn );
|
|
||||||
void MenuBack( PlayerNumber pn );
|
|
||||||
void MenuDown( PlayerNumber pn );
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void AfterChange();
|
virtual int GetSelectionIndex( PlayerNumber pn );
|
||||||
|
virtual void UpdateSelectableChoices();
|
||||||
void TweenOffScreen();
|
int m_iNumChoices;
|
||||||
void TweenOnScreen();
|
int m_iSelectableChoices[MAX_ELEMS];
|
||||||
|
RageSound m_soundModeChange;
|
||||||
Sprite m_sprJoinMessage[NUM_PLAYERS];
|
CStringArray arrayLocations;
|
||||||
Sprite m_sprJoinFrame[NUM_PLAYERS];
|
ScrollingList m_ScrollingList;
|
||||||
Sprite m_ChoiceListFrame;
|
Sprite m_ChoiceListFrame;
|
||||||
Sprite m_ChoiceListHighlight;
|
Sprite m_ChoiceListHighlight;
|
||||||
|
Sprite m_sprJoinMessage[NUM_PLAYERS];
|
||||||
|
Sprite m_sprJoinFrame[NUM_PLAYERS];
|
||||||
Sprite m_Guide;
|
Sprite m_Guide;
|
||||||
|
|
||||||
Sprite m_Infotext[MAX_MODE_CHOICES2];
|
|
||||||
|
|
||||||
vector<ModeChoice*> m_apPossibleModeChoices;
|
|
||||||
|
|
||||||
ScrollingList m_ScrollingList;
|
|
||||||
void RefreshModeChoices();
|
|
||||||
|
|
||||||
BGAnimation m_BGAnimations[MAX_MODE_CHOICES2];
|
|
||||||
MenuElements m_Menu;
|
|
||||||
|
|
||||||
RageSound m_soundSelect;
|
|
||||||
RageSound m_soundChange;
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ ScreenSelectStyle::ScreenSelectStyle() : ScreenSelect( "ScreenSelectStyle" )
|
|||||||
{
|
{
|
||||||
m_iSelection = 0;
|
m_iSelection = 0;
|
||||||
|
|
||||||
|
|
||||||
unsigned i;
|
unsigned i;
|
||||||
for( i=0; i<m_aModeChoices.size(); i++ )
|
for( i=0; i<m_aModeChoices.size(); i++ )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,6 +12,69 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
#undef APSTUDIO_READONLY_SYMBOLS
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Japanese resources
|
||||||
|
|
||||||
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_JPN)
|
||||||
|
#ifdef _WIN32
|
||||||
|
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
|
||||||
|
#pragma code_page(932)
|
||||||
|
#endif //_WIN32
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Dialog
|
||||||
|
//
|
||||||
|
|
||||||
|
IDD_DIALOG1 DIALOG DISCARDABLE 0, 0, 187, 93
|
||||||
|
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
|
CAPTION "Dialog"
|
||||||
|
FONT 9, "MS Pゴシック"
|
||||||
|
BEGIN
|
||||||
|
DEFPUSHBUTTON "OK",IDOK,130,7,50,14
|
||||||
|
PUSHBUTTON "Cancel",IDCANCEL,130,24,50,14
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_DIALOG2 DIALOG DISCARDABLE 0, 0, 187, 93
|
||||||
|
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
|
CAPTION "Dialog"
|
||||||
|
FONT 9, "MS Pゴシック"
|
||||||
|
BEGIN
|
||||||
|
DEFPUSHBUTTON "OK",IDOK,130,7,50,14
|
||||||
|
PUSHBUTTON "Cancel",IDCANCEL,130,24,50,14
|
||||||
|
END
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// DESIGNINFO
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
GUIDELINES DESIGNINFO DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
IDD_DIALOG1, DIALOG
|
||||||
|
BEGIN
|
||||||
|
LEFTMARGIN, 7
|
||||||
|
RIGHTMARGIN, 180
|
||||||
|
TOPMARGIN, 7
|
||||||
|
BOTTOMMARGIN, 86
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_DIALOG2, DIALOG
|
||||||
|
BEGIN
|
||||||
|
LEFTMARGIN, 7
|
||||||
|
RIGHTMARGIN, 180
|
||||||
|
TOPMARGIN, 7
|
||||||
|
BOTTOMMARGIN, 86
|
||||||
|
END
|
||||||
|
END
|
||||||
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
#endif // Japanese resources
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// English (U.S.) resources
|
// English (U.S.) resources
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
#define IDD_LOADING_DIALOG 116
|
#define IDD_LOADING_DIALOG 116
|
||||||
#define BITMAP_LOADING 117
|
#define BITMAP_LOADING 117
|
||||||
#define BITMAP_CRASH 121
|
#define BITMAP_CRASH 121
|
||||||
|
#define IDD_DIALOG1 126
|
||||||
|
#define IDD_DIALOG2 127
|
||||||
#define BITMAP_ERROR 129
|
#define BITMAP_ERROR 129
|
||||||
#define IDD_DISASM_CRASH 199
|
#define IDD_DISASM_CRASH 199
|
||||||
#define IDC_SHOCKWAVEFLASH1 1000
|
#define IDC_SHOCKWAVEFLASH1 1000
|
||||||
@@ -38,7 +40,7 @@
|
|||||||
//
|
//
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 126
|
#define _APS_NEXT_RESOURCE_VALUE 128
|
||||||
#define _APS_NEXT_COMMAND_VALUE 40009
|
#define _APS_NEXT_COMMAND_VALUE 40009
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1015
|
#define _APS_NEXT_CONTROL_VALUE 1015
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
|
|||||||
Reference in New Issue
Block a user