cleanup of ScreenSelect

This commit is contained in:
Chris Danford
2003-03-03 10:03:02 +00:00
parent 6071bf6fac
commit 0adf3d8590
29 changed files with 1081 additions and 1283 deletions
+88 -91
View File
@@ -4,15 +4,12 @@
// - ScreenSelectMode
// - ScreenInstructions
// - ScreenSelectCourse
// - ScreenSelectDifficulty
// - ScreenSelectDifficultyEX
// - ScreenSelectMaxType2
// - ScreenSelectMaxType2EX
// - ScreenSelectGroup
// - ScreenSelectMusic
// - ScreenSelectStyle5th
// - ScreenSelectStyle
// Possible Selector names:
// - ModeSelectorMaxType1 (Max's Select Style)
// - ModeSelectorMaxType2 (Max's Select Difficulty)
// - ScreenSelectMaxType15th
// - ScreenSelectMaxType1
[Common]
ColorP1=0.4,1.0,0.8,1 // sea green
@@ -42,7 +39,7 @@ HelpTextFree=No charge to join in. Press START
NextScreen=ScreenCaution
[ScreenCaution]
NextScreen=ScreenSelectStyle
NextScreen=ScreenSelectMaxType1
[ScreenEz2SelectPlayer]
JoinFrameP1X=120
@@ -60,16 +57,34 @@ SilentWait=1
BounceJoinMessage=1
FoldOnJoin=1
[ScreenSelectStyle]
Selector=ModeSelectorMaxType1
[ScreenSelectMaxType1]
ChoicesType=0 // 0=styles, 1=difficulties, 2=modes, 3=games
HelpText=Use &LEFT; &RIGHT; to select, then press START
TimerSeconds=40
NextScreen=ScreenSelectDifficulty
[ScreenSelectStyle5th]
NextScreen=ScreenSelectMaxType2
JointPremiumOnCommand=x,550;y,400;xoffset,400;bounceend,0.5;xoffset,-400
JointPremiumOffCommand=bouncebegin,0.5;xoffset,400
Icon1OnCommand=x,60;y,84;xoffset,-800;sleep,0.20;decelerate,0.4;xoffset,800
Icon1OffCommand=bouncebegin,0.5;zoomy,0
Icon2OnCommand=x,140;y,84;xoffset,-800;sleep,0.15;decelerate,0.4;xoffset,800
Icon2OffCommand=bouncebegin,0.5;zoomy,0
Icon3OnCommand=x,220;y,84;xoffset,-800;sleep,0.10;decelerate,0.4;xoffset,800
Icon3OffCommand=bouncebegin,0.5;zoomy,0
Icon4OnCommand=x,300;y,84;xoffset,-800;sleep,0.05;decelerate,0.4;xoffset,800
Icon4OffCommand=bouncebegin,0.5;zoomy,0
Icon5OnCommand=x,380;y,84;xoffset,-800;sleep,0.00;decelerate,0.4;xoffset,800
Icon5OffCommand=bouncebegin,0.5;zoomy,0
DisabledColor=0.2,0.2,0.2,1
ExplanationOnCommand=x,480;y,170;xoffset,400;bounceend,0.5;xoffset,-400
ExplanationOffCommand=bouncebegin,0.5;xoffset,400
InfoOnCommand=x,480;y,280;zoomy,0;bounceend,0.5;zoomy,1
InfoOffCommand=bouncebegin,0.5;zoomy,0
PreviewOnCommand=x,160;y,260;diffuse,1,1,1,0;glow,1,1,1,0;linear,0.2;glow,1,1,1,1;linear,0.0;diffuse,1,1,1,1;linear,0.2;glow,1,1,1,0
PreviewOffCommand=linear,0.5;diffuse,1,1,1,0
[ScreenSelectMaxType15th]
HelpText=Use &LEFT; &RIGHT; to select, then press START
TimerSeconds=40
NextScreen=ScreenSelectDifficulty
NextScreen=ScreenSelectMaxType2
[ScreenSelectMode]
JoinFrameP1X=120
@@ -95,16 +110,72 @@ FoldOnJoin=1
[ScreenStyleSplash]
NextScreen=ScreenSelectGroup
[ScreenSelectDifficulty]
[ScreenSelectMaxType2]
ChoicesType=1 // 0=styles, 1=difficulties, 2=modes, 3=games
Choices=Beginner,Easy,Medium,Hard,Nonstop,Oni,Endless
Selector=ModeSelectorMaxType2
HelpText=Use &LEFT; &RIGHT; to select, then press START
TimerSeconds=40
NextScreenArcade=ScreenSelectGroup
NextScreenOni=ScreenInstructions
NextScreenBattle=ScreenInstructions
NumChoicesOnPage1=4
LockInputSeconds=0.5
SleepAfterChoiceSeconds=0.5
SleepAfterTweenOffSeconds=1.3
MorePage1OnCommand=diffuse,1,1,1,0;x,580;y,90;linear,0.5;diffuse,1,1,1,1
MorePage1OffCommand=linear,0.5;diffuse,1,1,1,0
MorePage2OnCommand=x,700;y,90
MorePage2OffCommand=linear,0.5;diffuse,1,1,1,0
ExplanationPage1OnCommand=x,170;y,70;xoffset,-400;bounceend,0.5;xoffset,400;
ExplanationPage1OffCommand=bouncebegin,0.5;xoffset,-400
ExplanationPage2OnCommand=x,1100;y,70
ExplanationPage2OffCommand=bouncebegin,0.5;xoffset,400
HeaderPage1Choice1OnCommand=vertalign,bottom;x,90;y,180;xoffset,-800;sleep,0.0;decelerate,0.4;xoffset,800
HeaderPage1Choice1OffCommand=sleep,0.3;accelerate,0.4;xoffset,-800
HeaderPage1Choice2OnCommand=vertalign,bottom;x,246;y,220;xoffset,-800;sleep,0.2;decelerate,0.4;xoffset,800
HeaderPage1Choice2OffCommand=sleep,0.5;accelerate,0.4;xoffset,-800
HeaderPage1Choice3OnCommand=vertalign,bottom;x,394;y,180;xoffset,-800;sleep,0.4;decelerate,0.4;xoffset,800
HeaderPage1Choice3OffCommand=sleep,0.7;accelerate,0.4;xoffset,-800
HeaderPage1Choice4OnCommand=vertalign,bottom;x,542;y,220;xoffset,-800;sleep,0.6;decelerate,0.4;xoffset,800
HeaderPage1Choice4OffCommand=sleep,0.9;accelerate,0.4;xoffset,-800
HeaderPage2Choice1OnCommand=vertalign,bottom;x,760;y,200
HeaderPage2Choice1OffCommand=sleep,0.3;accelerate,0.4;xoffset,-800
HeaderPage2Choice2OnCommand=vertalign,bottom;x,960;y,200
HeaderPage2Choice2OffCommand=sleep,0.5;accelerate,0.4;xoffset,-800
HeaderPage2Choice3OnCommand=vertalign,bottom;x,1160;y,200
HeaderPage2Choice3OffCommand=sleep,0.7;accelerate,0.4;xoffset,-800
PicturePage1Choice1OnCommand=vertalign,top;x,90;y,180;zoomy,0.0;sleep,0.4;bounceend,0.3;zoomy,1
PicturePage1Choice1OffCommand=sleep,0.0;bouncebegin,0.3;zoomy,0
PicturePage1Choice2OnCommand=vertalign,top;x,246;y,220;zoomy,0.0;sleep,0.6;bounceend,0.3;zoomy,1
PicturePage1Choice2OffCommand=sleep,0.2;bouncebegin,0.3;zoomy,0
PicturePage1Choice3OnCommand=vertalign,top;x,394;y,180;zoomy,0.0;sleep,0.8;bounceend,0.3;zoomy,1
PicturePage1Choice3OffCommand=sleep,0.4;bouncebegin,0.3;zoomy,0
PicturePage1Choice4OnCommand=vertalign,top;x,542;y,220;zoomy,0.0;sleep,1.0;bounceend,0.3;zoomy,1
PicturePage1Choice4OffCommand=sleep,0.6;bouncebegin,0.3;zoomy,0
PicturePage2Choice1OnCommand=vertalign,top;x,760;y,200;
PicturePage2Choice1OffCommand=sleep,0.0;bouncebegin,0.3;zoomy,0
PicturePage2Choice2OnCommand=vertalign,top;x,960;y,200
PicturePage2Choice2OffCommand=sleep,0.2;bouncebegin,0.3;zoomy,0
PicturePage2Choice3OnCommand=vertalign,top;x,1160;y,200
PicturePage2Choice3OffCommand=sleep,0.4;bouncebegin,0.3;zoomy,0
CursorOnCommand=diffuse,1,1,1,0;rotationz,6;zoom,4;linear,0.3;diffuse,1,1,1,1;rotationz,0;zoom,1;glowshift
CursorChooseCommand=sleep,0.2;linear,0.2;xoffset,10;yoffset,10
CursorOffCommand=sleep,0.2;linear,0.3;zoom,0
CursorP1OffsetXFromPicture=-40
CursorP1OffsetYFromPicture=188
CursorP2OffsetXFromPicture=+40
CursorP2OffsetYFromPicture=188
ShadowOnCommand=diffuse,1,1,1,0;rotationz,6;zoom,4;linear,0.3;diffuse,1,1,1,1;rotationz,0;zoom,1
ShadowChooseCommand=sleep,0.2;linear,0.2;diffuse,1,1,1,0
ShadowOffCommand=sleep,0.2;linear,0.3;diffuse,1,1,1,0
ShadowLengthX=10
ShadowLengthY=10
OKOnCommand=diffuse,1,1,1,1
OKChooseCommand=diffuse,1,1,1,1;zoom,2;linear,0.2;diffuse,1,1,1,1;zoom,1
OKOffCommand=sleep,0.2;linear,0.3;zoom,0
DisabledColor=0.2,0.2,0.2,1
[ScreenSelectDifficultyEX]
[ScreenSelectMaxType2EX]
DifficultyP1X=216
DifficultyP1Y=180
DifficultyP2X=440
@@ -983,77 +1054,3 @@ TextHorizAlignP1=0
TextHorizAlignP2=0
TextZoom=0
SpacingY=0
[ModeSelectorMaxType1]
JointPremiumBannerX=550
JointPremiumBannerY=400
IconsStartX=60
IconsSpacingX=76
IconsStartY=100
IconsSpacingY=0
IconsDisabledColor=0.2,0.2,0.2,1
ExplanationX=480
ExplanationY=170
InfoX=480
InfoY=280
PreviewX=160
PreviewY=240
FadeSeconds=0.5
[ModeSelectorMaxType2]
NumChoicesOnPage1=4
LockInputSeconds=0.5
SleepAfterChoiceSeconds=0.5
SleepAfterTweenOffSeconds=1.3
MorePage1OnCommand=diffuse,1,1,1,0;x,580;y,90;linear,0.5;diffuse,1,1,1,1
MorePage1OffCommand=linear,0.5;diffuse,1,1,1,0
MorePage2OnCommand=x,700;y,90
MorePage2OffCommand=linear,0.5;diffuse,1,1,1,0
ExplanationPage1OnCommand=x,170;y,70;xoffset,-400;bounceend,0.5;xoffset,400;
ExplanationPage1OffCommand=bouncebegin,0.5;xoffset,-400
ExplanationPage2OnCommand=x,1100;y,70
ExplanationPage2OffCommand=bouncebegin,0.5;xoffset,400
HeaderPage1Choice1OnCommand=vertalign,bottom;x,90;y,180;xoffset,-800;sleep,0.0;decelerate,0.4;xoffset,800
HeaderPage1Choice1OffCommand=sleep,0.3;accelerate,0.4;xoffset,-800
HeaderPage1Choice2OnCommand=vertalign,bottom;x,246;y,220;xoffset,-800;sleep,0.2;decelerate,0.4;xoffset,800
HeaderPage1Choice2OffCommand=sleep,0.5;accelerate,0.4;xoffset,-800
HeaderPage1Choice3OnCommand=vertalign,bottom;x,394;y,180;xoffset,-800;sleep,0.4;decelerate,0.4;xoffset,800
HeaderPage1Choice3OffCommand=sleep,0.7;accelerate,0.4;xoffset,-800
HeaderPage1Choice4OnCommand=vertalign,bottom;x,542;y,220;xoffset,-800;sleep,0.6;decelerate,0.4;xoffset,800
HeaderPage1Choice4OffCommand=sleep,0.9;accelerate,0.4;xoffset,-800
HeaderPage2Choice1OnCommand=vertalign,bottom;x,760;y,200
HeaderPage2Choice1OffCommand=sleep,0.3;accelerate,0.4;xoffset,-800
HeaderPage2Choice2OnCommand=vertalign,bottom;x,960;y,200
HeaderPage2Choice2OffCommand=sleep,0.5;accelerate,0.4;xoffset,-800
HeaderPage2Choice3OnCommand=vertalign,bottom;x,1160;y,200
HeaderPage2Choice3OffCommand=sleep,0.7;accelerate,0.4;xoffset,-800
PicturePage1Choice1OnCommand=vertalign,top;x,90;y,180;zoomy,0.0;sleep,0.4;bounceend,0.3;zoomy,1
PicturePage1Choice1OffCommand=sleep,0.0;bouncebegin,0.3;zoomy,0
PicturePage1Choice2OnCommand=vertalign,top;x,246;y,220;zoomy,0.0;sleep,0.6;bounceend,0.3;zoomy,1
PicturePage1Choice2OffCommand=sleep,0.2;bouncebegin,0.3;zoomy,0
PicturePage1Choice3OnCommand=vertalign,top;x,394;y,180;zoomy,0.0;sleep,0.8;bounceend,0.3;zoomy,1
PicturePage1Choice3OffCommand=sleep,0.4;bouncebegin,0.3;zoomy,0
PicturePage1Choice4OnCommand=vertalign,top;x,542;y,220;zoomy,0.0;sleep,1.0;bounceend,0.3;zoomy,1
PicturePage1Choice4OffCommand=sleep,0.6;bouncebegin,0.3;zoomy,0
PicturePage2Choice1OnCommand=vertalign,top;x,760;y,200;
PicturePage2Choice1OffCommand=sleep,0.0;bouncebegin,0.3;zoomy,0
PicturePage2Choice2OnCommand=vertalign,top;x,960;y,200
PicturePage2Choice2OffCommand=sleep,0.2;bouncebegin,0.3;zoomy,0
PicturePage2Choice3OnCommand=vertalign,top;x,1160;y,200
PicturePage2Choice3OffCommand=sleep,0.4;bouncebegin,0.3;zoomy,0
CursorOnCommand=diffuse,1,1,1,0;rotationz,6;zoom,4;linear,0.3;diffuse,1,1,1,1;rotationz,0;zoom,1;glowshift
CursorChooseCommand=sleep,0.2;linear,0.2;xoffset,10;yoffset,10
CursorOffCommand=sleep,0.2;linear,0.3;zoom,0
CursorP1OffsetXFromPicture=-40
CursorP1OffsetYFromPicture=188
CursorP2OffsetXFromPicture=+40
CursorP2OffsetYFromPicture=188
ShadowOnCommand=diffuse,1,1,1,0;rotationz,6;zoom,4;linear,0.3;diffuse,1,1,1,1;rotationz,0;zoom,1
ShadowChooseCommand=sleep,0.2;linear,0.2;diffuse,1,1,1,0
ShadowOffCommand=sleep,0.2;linear,0.3;diffuse,1,1,1,0
ShadowLengthX=10
ShadowLengthY=10
OKOnCommand=diffuse,1,1,1,1
OKChooseCommand=diffuse,1,1,1,1;zoom,2;linear,0.2;diffuse,1,1,1,1;zoom,1
OKOffCommand=sleep,0.2;linear,0.3;zoom,0
DisabledColor=0.2,0.2,0.2,1
+29 -10
View File
@@ -1265,6 +1265,7 @@ StyleDef g_StyleDefs[NUM_STYLES] =
};
/*
ModeChoice g_ModeChoices[] =
{
{
@@ -1525,7 +1526,7 @@ ModeChoice g_ModeChoices[] =
},
};
const int NUM_MODE_CHOICES = sizeof(g_ModeChoices) / sizeof(g_ModeChoices[0]);
*/
GameManager::GameManager()
{
@@ -1571,12 +1572,14 @@ Style GameManager::GetEditorStyleForNotesType( NotesType nt )
return STYLE_INVALID;
}
/*
void GameManager::GetModesChoicesForGame( Game game, vector<ModeChoice*>& apChoicesAddTo )
{
for( int s=0; s<NUM_MODE_CHOICES; s++ )
if( g_ModeChoices[s].game == game)
apChoicesAddTo.push_back( &g_ModeChoices[s] );
}
*/
void GameManager::GetNotesTypesForGame( Game game, vector<NotesType>& aNotesTypeAddTo )
{
@@ -1645,15 +1648,6 @@ NotesType GameManager::StringToNotesType( CString sNotesType )
return NOTES_TYPE_DANCE_SINGLE;
}
Game GameManager::StringToGameType( CString sGameType )
{
for( int i=0; i<NUM_GAMES; i++ )
if( !sGameType.CompareNoCase(g_GameDefs[i].m_szName) )
return Game(i);
return GAME_INVALID;
}
CString GameManager::NotesTypeToString( NotesType nt )
{
if(nt >= NUM_NOTES_TYPES)
@@ -1665,3 +1659,28 @@ CString GameManager::NotesTypeToString( NotesType nt )
return NotesTypes[nt].name;
}
Game GameManager::StringToGameType( CString sGameType )
{
for( int i=0; i<NUM_GAMES; i++ )
if( !sGameType.CompareNoCase(g_GameDefs[i].m_szName) )
return Game(i);
return GAME_INVALID;
}
Style GameManager::GameAndStringToStyle( Game game, CString sStyle )
{
for( unsigned s=0; s<NUM_STYLES; s++ )
{
Style style = (Style)s;
const StyleDef* pStyleDef = GetStyleDefForStyle( style );
if( pStyleDef->m_Game != game )
continue;
if( sStyle.CompareNoCase(pStyleDef->m_szName) == 0 )
return style;
}
return STYLE_INVALID;
}
+1 -2
View File
@@ -15,7 +15,6 @@
#include "StyleDef.h"
#include "Style.h"
#include "Game.h"
#include "ModeChoice.h"
class IniFile;
@@ -29,7 +28,6 @@ public:
const StyleDef* GetStyleDefForStyle( Style s );
void GetStylesForGame( Game game, vector<Style>& aStylesAddTo, bool editor=false );
void GetModesChoicesForGame( Game game, vector<ModeChoice*>& apChoicesAddTo );
void GetNotesTypesForGame( Game game, vector<NotesType>& aNotesTypeAddTo );
Style GetEditorStyleForNotesType( NotesType nt );
@@ -39,6 +37,7 @@ public:
static NotesType StringToNotesType( CString sNotesType );
static CString NotesTypeToString( NotesType nt );
static Game StringToGameType( CString sGameType );
Style GameAndStringToStyle( Game game, CString sStyle );
protected:
};
+14 -9
View File
@@ -241,16 +241,21 @@ const StyleDef* GameState::GetCurrentStyleDef()
return GAMEMAN->GetStyleDefForStyle( m_CurStyle );
}
void GameState::ApplyModeChoice( const ModeChoice* pModeChoice, PlayerNumber pn )
void GameState::ApplyModeChoice( const ModeChoice& mc, PlayerNumber pn )
{
if( pModeChoice->game != GAME_INVALID )
m_CurGame = pModeChoice->game;
if( pModeChoice->pm != PLAY_MODE_INVALID )
m_PlayMode = pModeChoice->pm;
if( pModeChoice->style != STYLE_INVALID )
m_CurStyle = pModeChoice->style;
if( pModeChoice->dc != DIFFICULTY_INVALID && pn != PLAYER_INVALID )
m_PreferredDifficulty[pn] = pModeChoice->dc;
if( mc.game != GAME_INVALID )
m_CurGame = mc.game;
if( mc.pm != PLAY_MODE_INVALID )
m_PlayMode = mc.pm;
if( mc.style != STYLE_INVALID )
m_CurStyle = mc.style;
if( mc.dc != DIFFICULTY_INVALID && pn != PLAYER_INVALID )
m_PreferredDifficulty[pn] = mc.dc;
}
bool GameState::IsPlayable( const ModeChoice& mc )
{
return mc.numSidesJoinedToPlay == GAMESTATE->GetNumSidesJoined();
}
bool GameState::IsPlayerEnabled( PlayerNumber pn )
+2 -1
View File
@@ -60,7 +60,8 @@ public:
GameDef* GetCurrentGameDef();
const StyleDef* GetCurrentStyleDef();
void ApplyModeChoice( const ModeChoice* pModeChoice, PlayerNumber pn );
void ApplyModeChoice( const ModeChoice& mc, PlayerNumber pn );
bool IsPlayable( const ModeChoice& mc );
bool IsPlayerEnabled( PlayerNumber pn );
bool IsPlayerEnabled( int p ) { return IsPlayerEnabled( (PlayerNumber)p ); }; // for those too lasy to cast all those p's to a PlayerNumber
+2 -1
View File
@@ -76,7 +76,8 @@ void MenuElements::Load( CString sBackgroundPath, CString sTopEdgePath, CString
LOG->Trace( "MenuElements::MenuElements()" );
m_Background.LoadFromAniDir( sBackgroundPath );
if( sBackgroundPath != "" )
m_Background.LoadFromAniDir( sBackgroundPath );
m_quadBrightness.SetDiffuse( RageColor(0,0,0,0) );
m_quadBrightness.StretchTo( RectI(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM) );
+1 -1
View File
@@ -18,8 +18,8 @@
struct ModeChoice // used in SelectMode
{
Game game;
PlayMode pm;
Style style;
PlayMode pm;
Difficulty dc;
char name[64];
int numSidesJoinedToPlay;
-35
View File
@@ -1,35 +0,0 @@
#include "global.h"
/*
-----------------------------------------------------------------------------
Class: ModeSelector
Desc: See header.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "ModeSelector.h"
#include "ThemeManager.h"
#include "GameState.h"
#include "ModeChoice.h"
bool ModeSelector::IsSelectable( const ModeChoice& choice )
{
return choice.numSidesJoinedToPlay == GAMESTATE->GetNumSidesJoined();
}
#include "ModeSelectorMaxType1.h"
#include "ModeSelectorMaxType2.h"
ModeSelector* ModeSelector::Create( CString sClassName )
{
if( sClassName.CompareNoCase("ModeSelectorMaxType1") == 0 ) return new ModeSelectorMaxType1;
if( sClassName.CompareNoCase("ModeSelectorMaxType2") == 0 ) return new ModeSelectorMaxType2;
RageException::Throw( "Invalid ModeSelector class name '%s'.", sClassName.GetString() );
}
-46
View File
@@ -1,46 +0,0 @@
#ifndef ModeSelector_H
#define ModeSelector_H
/*
-----------------------------------------------------------------------------
Class: ModeSelector
Desc: Abstract class for a widget that selects a ModeChoice
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "Screen.h"
#include "PlayerNumber.h"
struct ModeChoice;
// send SM_BeginFadingOut when all players have confirmed choice
class ModeSelector : public Screen // instead of ActorFrame so we can use ScreenMessages
{
public:
ModeSelector() {};
virtual ~ModeSelector() {};
virtual void Init( const vector<ModeChoice>& choices, CString sClassName, CString sThemeElementPrefix ) = 0;
virtual void MenuLeft( PlayerNumber pn ) = 0;
virtual void MenuRight( PlayerNumber pn ) = 0;
virtual void MenuUp( PlayerNumber pn ) = 0;
virtual void MenuDown( PlayerNumber pn ) = 0;
virtual void MenuStart( PlayerNumber pn ) = 0;
virtual void MenuBack( PlayerNumber pn ) = 0;
virtual void TweenOffScreen() = 0;
virtual void TweenOnScreen() = 0;
virtual void GetSelectedModeChoice( PlayerNumber pn, ModeChoice* pModeChoiceOut ) = 0;
bool IsSelectable( const ModeChoice& choice );
virtual void UpdateSelectableChoices() = 0;
static ModeSelector* Create( CString sClassName );
};
#endif
-276
View File
@@ -1,276 +0,0 @@
#include "global.h"
/*
-----------------------------------------------------------------------------
Class: ModeSelectorMaxType1
Desc: See header.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "ModeSelectorMaxType1.h"
#include "GameManager.h"
#include "ThemeManager.h"
#include "PrefsManager.h"
#include "ScreenManager.h"
#define JOINT_PREMIUM_BANNER_X THEME->GetMetricF("ModeSelectorMaxType1","JointPremiumBannerX")
#define JOINT_PREMIUM_BANNER_Y THEME->GetMetricF("ModeSelectorMaxType1","JointPremiumBannerY")
#define ICONS_START_X THEME->GetMetricF("ModeSelectorMaxType1","IconsStartX")
#define ICONS_SPACING_X THEME->GetMetricF("ModeSelectorMaxType1","IconsSpacingX")
#define ICONS_START_Y THEME->GetMetricF("ModeSelectorMaxType1","IconsStartY")
#define ICONS_SPACING_Y THEME->GetMetricF("ModeSelectorMaxType1","IconsSpacingY")
#define ICONS_DISABLED_COLOR THEME->GetMetricC("ModeSelectorMaxType1","IconsDisabledColor")
#define EXPLANATION_X THEME->GetMetricF("ModeSelectorMaxType1","ExplanationX")
#define EXPLANATION_Y THEME->GetMetricF("ModeSelectorMaxType1","ExplanationY")
#define INFO_X THEME->GetMetricF("ModeSelectorMaxType1","InfoX")
#define INFO_Y THEME->GetMetricF("ModeSelectorMaxType1","InfoY")
#define PREVIEW_X THEME->GetMetricF("ModeSelectorMaxType1","PreviewX")
#define PREVIEW_Y THEME->GetMetricF("ModeSelectorMaxType1","PreviewY")
#define FADE_SECONDS THEME->GetMetricF("ModeSelectorMaxType1","FadeSeconds")
ModeSelectorMaxType1::ModeSelectorMaxType1()
{
m_iSelection = 0;
}
void ModeSelectorMaxType1::Init( const vector<ModeChoice>& choices, CString sClassName, CString sThemeElementPrefix )
{
m_aModeChoices = choices;
unsigned i;
for( i=0; i<m_aModeChoices.size(); i++ )
{
const ModeChoice& mc = m_aModeChoices[i];
CString sGameName = GAMEMAN->GetGameDefForGame(mc.game)->m_szName;
//
// Load icon
//
float fIconX = ICONS_START_X + i*ICONS_SPACING_X;
float fIconY = ICONS_START_Y + i*ICONS_SPACING_Y;
CString sIconElementName = ssprintf("%s icon %s %s", sThemeElementPrefix.GetString(), sGameName.GetString(), mc.name );
CString sIconPath = THEME->GetPathTo("Graphics",sIconElementName);
if( sIconPath.empty() ) // element doesn't exist
{
m_textIcon[i].LoadFromFont( THEME->GetPathTo("Fonts","normal") );
m_textIcon[i].SetXY( fIconX, fIconY );
m_textIcon[i].SetText( mc.name );
m_textIcon[i].SetZoom(0.5f);
this->AddChild( &m_textIcon[i] );
}
else
{
m_sprIcon[i].Load( sIconPath );
m_sprIcon[i].SetXY( fIconX, fIconY );
this->AddChild( &m_sprIcon[i] );
}
//
// Load preview
//
CString sPreviewElementName = ssprintf("%s preview %s %s", sThemeElementPrefix.GetString(), sGameName.GetString(), mc.name );
CString sPreviewPath = THEME->GetPathTo("Graphics",sPreviewElementName);
if( sPreviewPath != "" )
{
m_sprPreview[i].Load( sPreviewPath );
m_sprPreview[i].SetXY( PREVIEW_X, PREVIEW_Y );
m_sprPreview[i].SetDiffuse( RageColor(1,1,1,0) );
this->AddChild( &m_sprPreview[i] );
}
//
// Load info
//
CString sInfoElementName = ssprintf("%s info %s %s", sThemeElementPrefix.GetString(), sGameName.GetString(), mc.name );
CString sInfoPath = THEME->GetPathTo("Graphics",sInfoElementName);
if( sInfoPath != "" )
{
m_sprInfo[i].Load( sInfoPath );
m_sprInfo[i].SetXY( INFO_X, INFO_Y );
m_sprInfo[i].SetDiffuse( RageColor(1,1,1,0) );
this->AddChild( &m_sprInfo[i] );
}
}
// fix Z ordering of Preview and Info so that they draw on top
for( i=0; i<this->m_aModeChoices.size(); i++ )
this->MoveToTail( &m_sprPreview[i] );
for( i=0; i<this->m_aModeChoices.size(); i++ )
this->MoveToTail( &m_sprInfo[i] );
this->UpdateSelectableChoices();
m_sprExplanation.Load( THEME->GetPathTo("Graphics","select style explanation") );
m_sprExplanation.SetXY( EXPLANATION_X, EXPLANATION_Y );
this->AddChild( &m_sprExplanation );
if( PREFSMAN->m_bJointPremium )
{
m_sprJointPremium.Load( THEME->GetPathTo("Graphics","select style joint premium banner") );
m_sprJointPremium.SetXY( JOINT_PREMIUM_BANNER_X, JOINT_PREMIUM_BANNER_Y );
this->AddChild( &m_sprJointPremium );
}
m_soundChange.Load( THEME->GetPathTo("Sounds",sThemeElementPrefix + " change") );
m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") );
TweenOnScreen();
}
void ModeSelectorMaxType1::MenuLeft( PlayerNumber pn )
{
int iSwitchToIndex = -1; // -1 means none found
for( int i=m_iSelection-1; i>=0; i-- )
{
if( IsSelectable(m_aModeChoices[i]) )
{
iSwitchToIndex = i;
break;
}
}
if( iSwitchToIndex == -1 )
return;
BeforeChange();
m_iSelection = iSwitchToIndex;
m_soundChange.Play();
AfterChange();
}
void ModeSelectorMaxType1::MenuRight( PlayerNumber pn )
{
int iSwitchToIndex = -1; // -1 means none found
for( unsigned i=m_iSelection+1; i<m_aModeChoices.size(); i++ )
{
if( IsSelectable(m_aModeChoices[i]) )
{
iSwitchToIndex = i;
break;
}
}
if( iSwitchToIndex == -1 )
return;
BeforeChange();
m_iSelection = iSwitchToIndex;
m_soundChange.Play();
AfterChange();
}
void ModeSelectorMaxType1::MenuStart( PlayerNumber pn )
{
m_soundSelect.Play();
SCREENMAN->SendMessageToTopScreen( SM_BeginFadingOut, 0 );
}
void ModeSelectorMaxType1::MenuBack( PlayerNumber pn )
{
}
void ModeSelectorMaxType1::TweenOffScreen()
{
for( unsigned i=0; i<m_aModeChoices.size(); i++ )
{
m_sprIcon[i].FadeOff( 0, "FoldY", FADE_SECONDS );
m_textIcon[i].FadeOff( 0, "FoldY", FADE_SECONDS );
}
m_sprExplanation.FadeOff( 0, "FoldY", FADE_SECONDS );
m_sprPreview[m_iSelection].FadeOff( 0, "FoldY", FADE_SECONDS );
m_sprInfo[m_iSelection].FadeOff( 0, "FoldY", FADE_SECONDS );
m_sprJointPremium.FadeOff( 0, "fade", FADE_SECONDS );
}
void ModeSelectorMaxType1::TweenOnScreen()
{
for( unsigned i=0; i<m_aModeChoices.size(); i++ )
{
m_sprIcon[i].FadeOn( (m_aModeChoices.size()-i)*0.05f, "Left Accelerate", FADE_SECONDS );
m_textIcon[i].FadeOn( (m_aModeChoices.size()-i)*0.05f, "Left Accelerate", FADE_SECONDS );
}
m_sprExplanation.FadeOn( 0, "Right Accelerate", FADE_SECONDS );
m_sprJointPremium.FadeOn( 0, "fade", FADE_SECONDS );
// let AfterChange tween Preview and Info
}
void ModeSelectorMaxType1::GetSelectedModeChoice( PlayerNumber pn, ModeChoice* pModeChoiceOut )
{
*pModeChoiceOut = m_aModeChoices[m_iSelection]; // doesn't depend on pn
}
void ModeSelectorMaxType1::UpdateSelectableChoices()
{
unsigned i;
/* XXX: If a player joins during the tween-in, this diffuse change
* will be undone by the tween. Hmm. */
for( i=0; i<m_aModeChoices.size(); i++ )
{
/* If the icon is text, use a dimmer diffuse, or we won't be
* able to see the glow. */
if( IsSelectable(m_aModeChoices[i]) )
{
m_sprIcon[i].SetDiffuse( RageColor(1,1,1,1) );
m_textIcon[i].SetDiffuse( RageColor(0.5f,0.5f,0.5f,1) ); // gray so glow is visible
}
else
{
m_sprIcon[i].SetDiffuse( ICONS_DISABLED_COLOR );
m_textIcon[i].SetDiffuse( ICONS_DISABLED_COLOR );
}
}
// Select first enabled choie
BeforeChange();
int iSwitchToStyleIndex = -1; // -1 means none found
for( i=0; i<m_aModeChoices.size(); i++ )
{
if( IsSelectable(m_aModeChoices[i]) )
{
iSwitchToStyleIndex = i;
break;
}
}
ASSERT( iSwitchToStyleIndex != -1 ); // no styles are enabled. We're stuck! This should never happen
m_iSelection = iSwitchToStyleIndex;
AfterChange();
}
void ModeSelectorMaxType1::BeforeChange()
{
// dim/hide old selection
m_sprIcon[m_iSelection].SetEffectNone();
m_textIcon[m_iSelection].SetEffectNone();
m_sprPreview[m_iSelection].StopTweening();
m_sprInfo[m_iSelection].StopTweening();
m_sprPreview[m_iSelection].SetDiffuse( RageColor(1,1,1,0) );
m_sprInfo[m_iSelection].SetDiffuse( RageColor(1,1,1,0) );
m_sprPreview[m_iSelection].SetGlow( RageColor(1,1,1,0) );
m_sprInfo[m_iSelection].SetGlow( RageColor(1,1,1,0) );
}
void ModeSelectorMaxType1::AfterChange()
{
m_sprIcon[m_iSelection].SetEffectGlowShift();
m_textIcon[m_iSelection].SetEffectGlowShift();
m_sprPreview[m_iSelection].SetDiffuse( RageColor(1,1,1,1) );
m_sprInfo[m_iSelection].SetDiffuse( RageColor(1,1,1,1) );
m_sprPreview[m_iSelection].SetZoom( 1 );
m_sprInfo[m_iSelection].SetZoom( 1 );
m_sprPreview[m_iSelection].FadeOn( 0, "ghost", FADE_SECONDS );
m_sprInfo[m_iSelection].FadeOn( 0, "FoldY bounce", FADE_SECONDS );
}
+2 -6
View File
@@ -71,7 +71,6 @@ PrefsManager::PrefsManager()
m_bShowSelectGroup = true;
m_bShowTranslations = true;
m_bArcadeOptionsNavigation = false;
m_bDDRExtremeDifficultySelect = false;
m_bSoloSingle = false; // OFF!!!!
m_iUnloadTextureDelaySeconds = 0; // disabled 60*30; // 30 mins
m_bCoinOpMode = false;
@@ -87,7 +86,6 @@ PrefsManager::PrefsManager()
m_iPolygonRadar = -1;
m_bShowSongOptions = true;
m_DefaultFailType = SongOptions::FAIL_ARCADE;
m_bDDRExtremeDifficultySelect = false;
m_bDancePointsForOni = false; //DDR-Extreme style dance points instead of max2 percent
/* DDR Extreme-style extra stage support.
@@ -179,8 +177,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
ini.GetValueF( "Options", "MarathonVerSeconds", m_fMarathonVerSongSeconds );
ini.GetValueB( "Options", "ShowSongOptions", m_bShowSongOptions );
ini.GetValueI( "Options", "DefaultFailType", (int&)m_DefaultFailType );
ini.GetValueB( "Options", "bAllowSoftwareRenderer", m_bAllowSoftwareRenderer );
ini.GetValueB( "Options", "DDRExtremeDifficultySelect", m_bDDRExtremeDifficultySelect );
ini.GetValueB( "Options", "AllowSoftwareRenderer", m_bAllowSoftwareRenderer );
ini.GetValueB( "Options", "SoloSingle", m_bSoloSingle );
ini.GetValueB( "Options", "DancePointsForOni", m_bDancePointsForOni );
@@ -256,8 +253,7 @@ void PrefsManager::SaveGlobalPrefsToDisk()
ini.SetValueF( "Options", "MarathonVerSeconds", m_fMarathonVerSongSeconds );
ini.SetValueB( "Options", "ShowSongOptions", m_bShowSongOptions );
ini.SetValueI( "Options", "DefaultFailType", (int&)m_DefaultFailType );
ini.SetValueB( "Options", "bAllowSoftwareRenderer", m_bAllowSoftwareRenderer );
ini.SetValueB( "Options", "DDRExtremeDifficultySelect", m_bDDRExtremeDifficultySelect );
ini.SetValueB( "Options", "AllowSoftwareRenderer", m_bAllowSoftwareRenderer );
ini.SetValueB( "Options", "SoloSingle", m_bSoloSingle );
ini.SetValueB( "Options", "DancePointsForOni", m_bDancePointsForOni );
+110
View File
@@ -125,3 +125,113 @@ void Screen::ClearMessageQueue( const ScreenMessage SM )
for( int i=m_QueuedMessages.size()-1; i>=0; i-- )
m_QueuedMessages.erase( m_QueuedMessages.begin()+i );
}
// Screen classes
#include "ScreenAppearanceOptions.h"
#include "ScreenCaution.h"
#include "ScreenEdit.h"
#include "ScreenEditMenu.h"
#include "ScreenEvaluation.h"
#include "ScreenEz2SelectPlayer.h"
#include "ScreenSelectMode.h"
#include "ScreenGameOver.h"
#include "ScreenGameplay.h"
#include "ScreenGraphicOptions.h"
#include "ScreenHowToPlay.h"
#include "ScreenInputOptions.h"
#include "ScreenMachineOptions.h"
#include "ScreenMapControllers.h"
#include "ScreenMusicScroll.h"
#include "ScreenPlayerOptions.h"
#include "ScreenSelectCourse.h"
#include "ScreenSelectMaxType2.h"
#include "ScreenSelectDifficultyEX.h"
#include "ScreenSelectGame.h"
#include "ScreenSelectGroup.h"
#include "ScreenSelectMusic.h"
#include "ScreenSelectStyle5th.h"
#include "ScreenSelectMaxType1.h"
#include "ScreenSongOptions.h"
#include "ScreenSoundOptions.h"
#include "ScreenStage.h"
#include "ScreenTest.h"
#include "ScreenTestFonts.h"
#include "ScreenTestSound.h"
#include "ScreenTitleMenu.h"
#include "ScreenEz2SelectMusic.h"
#include "ScreenWarning.h"
#include "ScreenRanking.h"
#include "ScreenMemoryCard.h"
#include "ScreenCompany.h"
#include "ScreenIntroMovie.h"
#include "ScreenAlbums.h"
#include "ScreenLogo.h"
#include "ScreenUnlock.h"
#include "ScreenDemonstration.h"
#include "ScreenInstructions.h"
#include "ScreenNameEntry.h"
#include "ScreenJukebox.h"
#include "ScreenJukeboxMenu.h"
#include "ScreenOptionsMenu.h"
#include "ScreenGameplayOptions.h"
#include "ScreenStyleSplash.h"
Screen* Screen::Create( CString sClassName )
{
Screen *ret = NULL;
if( 0==stricmp(sClassName, "ScreenAppearanceOptions") ) ret = new ScreenAppearanceOptions;
else if( 0==stricmp(sClassName, "ScreenCaution") ) ret = new ScreenCaution;
else if( 0==stricmp(sClassName, "ScreenEdit") ) ret = new ScreenEdit;
else if( 0==stricmp(sClassName, "ScreenEditMenu") ) ret = new ScreenEditMenu;
else if( 0==stricmp(sClassName, "ScreenEvaluation") ) ret = new ScreenEvaluation;
else if( 0==stricmp(sClassName, "ScreenFinalEvaluation") ) ret = new ScreenFinalEvaluation;
else if( 0==stricmp(sClassName, "ScreenEz2SelectPlayer") ) ret = new ScreenEz2SelectPlayer;
else if( 0==stricmp(sClassName, "ScreenSelectMode") ) ret = new ScreenSelectMode;
else if( 0==stricmp(sClassName, "ScreenGameOver") ) ret = new ScreenGameOver;
else if( 0==stricmp(sClassName, "ScreenGameplay") ) ret = new ScreenGameplay;
else if( 0==stricmp(sClassName, "ScreenGraphicOptions") ) ret = new ScreenGraphicOptions;
else if( 0==stricmp(sClassName, "ScreenHowToPlay") ) ret = new ScreenHowToPlay;
else if( 0==stricmp(sClassName, "ScreenInputOptions") ) ret = new ScreenInputOptions;
else if( 0==stricmp(sClassName, "ScreenMachineOptions") ) ret = new ScreenMachineOptions;
else if( 0==stricmp(sClassName, "ScreenMapControllers") ) ret = new ScreenMapControllers;
else if( 0==stricmp(sClassName, "ScreenInputOptions") ) ret = new ScreenInputOptions;
else if( 0==stricmp(sClassName, "ScreenMusicScroll") ) ret = new ScreenMusicScroll;
else if( 0==stricmp(sClassName, "ScreenPlayerOptions") ) ret = new ScreenPlayerOptions;
else if( 0==stricmp(sClassName, "ScreenSelectCourse") ) ret = new ScreenSelectCourse;
else if( 0==stricmp(sClassName, "ScreenSelectMaxType2") ) ret = new ScreenSelectMaxType2;
else if( 0==stricmp(sClassName, "ScreenSelectDifficultyEX") ) ret = new ScreenSelectDifficultyEX;
else if( 0==stricmp(sClassName, "ScreenSelectGame") ) ret = new ScreenSelectGame;
else if( 0==stricmp(sClassName, "ScreenSelectGroup") ) ret = new ScreenSelectGroup;
else if( 0==stricmp(sClassName, "ScreenSelectMusic") ) ret = new ScreenSelectMusic;
else if( 0==stricmp(sClassName, "ScreenSelectStyle5th") ) ret = new ScreenSelectStyle5th;
else if( 0==stricmp(sClassName, "ScreenSelectMaxType1") ) ret = new ScreenSelectMaxType1;
else if( 0==stricmp(sClassName, "ScreenSongOptions") ) ret = new ScreenSongOptions;
else if( 0==stricmp(sClassName, "ScreenStage") ) ret = new ScreenStage;
else if( 0==stricmp(sClassName, "ScreenTest") ) ret = new ScreenTest;
else if( 0==stricmp(sClassName, "ScreenTestFonts") ) ret = new ScreenTestFonts;
else if( 0==stricmp(sClassName, "ScreenTestSound") ) ret = new ScreenTestSound;
else if( 0==stricmp(sClassName, "ScreenTitleMenu") ) ret = new ScreenTitleMenu;
else if( 0==stricmp(sClassName, "ScreenEz2SelectMusic") ) ret = new ScreenEz2SelectMusic;
else if( 0==stricmp(sClassName, "ScreenWarning") ) ret = new ScreenWarning;
else if( 0==stricmp(sClassName, "ScreenRanking") ) ret = new ScreenRanking;
else if( 0==stricmp(sClassName, "ScreenMemoryCard") ) ret = new ScreenMemoryCard;
else if( 0==stricmp(sClassName, "ScreenCompany") ) ret = new ScreenCompany;
else if( 0==stricmp(sClassName, "ScreenIntroMovie") ) ret = new ScreenIntroMovie;
else if( 0==stricmp(sClassName, "ScreenAlbums") ) ret = new ScreenAlbums;
else if( 0==stricmp(sClassName, "ScreenLogo") ) ret = new ScreenLogo;
else if( 0==stricmp(sClassName, "ScreenUnlock") ) ret = new ScreenUnlock;
else if( 0==stricmp(sClassName, "ScreenDemonstration") ) ret = (ScreenGameplay*)new ScreenDemonstration;
else if( 0==stricmp(sClassName, "ScreenInstructions") ) ret = new ScreenInstructions;
else if( 0==stricmp(sClassName, "ScreenNameEntry") ) ret = new ScreenNameEntry;
else if( 0==stricmp(sClassName, "ScreenJukebox") ) ret = new ScreenJukebox;
else if( 0==stricmp(sClassName, "ScreenJukeboxMenu") ) ret = new ScreenJukeboxMenu;
else if( 0==stricmp(sClassName, "ScreenOptionsMenu") ) ret = new ScreenOptionsMenu;
else if( 0==stricmp(sClassName, "ScreenSoundOptions") ) ret = new ScreenSoundOptions;
else if( 0==stricmp(sClassName, "ScreenGameplayOptions") ) ret = new ScreenGameplayOptions;
else if( 0==stricmp(sClassName, "ScreenStyleSplash") ) ret = new ScreenStyleSplash;
else
RageException::Throw( "Invalid Screen class name '%s'", sClassName.GetString() );
return ret;
}
+2
View File
@@ -41,6 +41,8 @@ public:
bool IsTransparent() { return m_bIsTransparent; }
static Screen* Create( CString sClassName );
protected:
// structure for holding messages sent to a Screen
struct QueuedScreenMessage {
+7 -110
View File
@@ -22,6 +22,7 @@
#include "ThemeManager.h"
#include "RageDisplay.h"
#include "Screen.h"
#include "SongManager.h"
ScreenManager* SCREENMAN = NULL; // global and accessable from anywhere in our program
@@ -165,117 +166,9 @@ void ScreenManager::Input( const DeviceInput& DeviceI, const InputEventType type
}
// Screen classes
#include "ScreenAppearanceOptions.h"
#include "ScreenCaution.h"
#include "ScreenEdit.h"
#include "ScreenEditMenu.h"
#include "ScreenEvaluation.h"
#include "ScreenEz2SelectPlayer.h"
#include "ScreenSelectMode.h"
#include "ScreenGameOver.h"
#include "ScreenGameplay.h"
#include "ScreenGraphicOptions.h"
#include "ScreenHowToPlay.h"
#include "ScreenInputOptions.h"
#include "ScreenMachineOptions.h"
#include "ScreenMapControllers.h"
#include "ScreenMusicScroll.h"
#include "ScreenPlayerOptions.h"
#include "ScreenSelectCourse.h"
#include "ScreenSelectDifficulty.h"
#include "ScreenSelectDifficultyEX.h"
#include "ScreenSelectGame.h"
#include "ScreenSelectGroup.h"
#include "ScreenSelectMusic.h"
#include "ScreenSelectStyle5th.h"
#include "ScreenSelectStyle.h"
#include "ScreenSongOptions.h"
#include "ScreenSoundOptions.h"
#include "ScreenStage.h"
#include "ScreenTest.h"
#include "ScreenTestFonts.h"
#include "ScreenTestSound.h"
#include "ScreenTitleMenu.h"
#include "ScreenEz2SelectMusic.h"
#include "ScreenWarning.h"
#include "ScreenRanking.h"
#include "ScreenMemoryCard.h"
#include "ScreenCompany.h"
#include "ScreenIntroMovie.h"
#include "ScreenAlbums.h"
#include "ScreenLogo.h"
#include "ScreenUnlock.h"
#include "ScreenDemonstration.h"
#include "ScreenInstructions.h"
#include "ScreenNameEntry.h"
#include "ScreenJukebox.h"
#include "ScreenJukeboxMenu.h"
#include "ScreenOptionsMenu.h"
#include "ScreenGameplayOptions.h"
#include "ScreenStyleSplash.h"
#include "ScreenPrompt.h"
#include "ScreenTextEntry.h"
#include "ScreenMiniMenu.h"
Screen* ScreenManager::MakeNewScreen( CString sClassName )
{
#define RETURN_IF_MATCH(className) if(0==stricmp(sClassName,"##className##")) return new className
Screen *ret = NULL;
if( 0==stricmp(sClassName, "ScreenAppearanceOptions") ) ret = new ScreenAppearanceOptions;
else if( 0==stricmp(sClassName, "ScreenCaution") ) ret = new ScreenCaution;
else if( 0==stricmp(sClassName, "ScreenEdit") ) ret = new ScreenEdit;
else if( 0==stricmp(sClassName, "ScreenEditMenu") ) ret = new ScreenEditMenu;
else if( 0==stricmp(sClassName, "ScreenEvaluation") ) ret = new ScreenEvaluation;
else if( 0==stricmp(sClassName, "ScreenFinalEvaluation") ) ret = new ScreenFinalEvaluation;
else if( 0==stricmp(sClassName, "ScreenEz2SelectPlayer") ) ret = new ScreenEz2SelectPlayer;
else if( 0==stricmp(sClassName, "ScreenSelectMode") ) ret = new ScreenSelectMode;
else if( 0==stricmp(sClassName, "ScreenGameOver") ) ret = new ScreenGameOver;
else if( 0==stricmp(sClassName, "ScreenGameplay") ) ret = new ScreenGameplay;
else if( 0==stricmp(sClassName, "ScreenGraphicOptions") ) ret = new ScreenGraphicOptions;
else if( 0==stricmp(sClassName, "ScreenHowToPlay") ) ret = new ScreenHowToPlay;
else if( 0==stricmp(sClassName, "ScreenInputOptions") ) ret = new ScreenInputOptions;
else if( 0==stricmp(sClassName, "ScreenMachineOptions") ) ret = new ScreenMachineOptions;
else if( 0==stricmp(sClassName, "ScreenMapControllers") ) ret = new ScreenMapControllers;
else if( 0==stricmp(sClassName, "ScreenInputOptions") ) ret = new ScreenInputOptions;
else if( 0==stricmp(sClassName, "ScreenMusicScroll") ) ret = new ScreenMusicScroll;
else if( 0==stricmp(sClassName, "ScreenPlayerOptions") ) ret = new ScreenPlayerOptions;
else if( 0==stricmp(sClassName, "ScreenSelectCourse") ) ret = new ScreenSelectCourse;
else if( 0==stricmp(sClassName, "ScreenSelectDifficulty") ) ret = new ScreenSelectDifficulty;
else if( 0==stricmp(sClassName, "ScreenSelectDifficultyEX") ) ret = new ScreenSelectDifficultyEX;
else if( 0==stricmp(sClassName, "ScreenSelectGame") ) ret = new ScreenSelectGame;
else if( 0==stricmp(sClassName, "ScreenSelectGroup") ) ret = new ScreenSelectGroup;
else if( 0==stricmp(sClassName, "ScreenSelectMusic") ) ret = new ScreenSelectMusic;
else if( 0==stricmp(sClassName, "ScreenSelectStyle5th") ) ret = new ScreenSelectStyle5th;
else if( 0==stricmp(sClassName, "ScreenSelectStyle") ) ret = new ScreenSelectStyle;
else if( 0==stricmp(sClassName, "ScreenSongOptions") ) ret = new ScreenSongOptions;
else if( 0==stricmp(sClassName, "ScreenStage") ) ret = new ScreenStage;
else if( 0==stricmp(sClassName, "ScreenTest") ) ret = new ScreenTest;
else if( 0==stricmp(sClassName, "ScreenTestFonts") ) ret = new ScreenTestFonts;
else if( 0==stricmp(sClassName, "ScreenTestSound") ) ret = new ScreenTestSound;
else if( 0==stricmp(sClassName, "ScreenTitleMenu") ) ret = new ScreenTitleMenu;
else if( 0==stricmp(sClassName, "ScreenEz2SelectMusic") ) ret = new ScreenEz2SelectMusic;
else if( 0==stricmp(sClassName, "ScreenWarning") ) ret = new ScreenWarning;
else if( 0==stricmp(sClassName, "ScreenRanking") ) ret = new ScreenRanking;
else if( 0==stricmp(sClassName, "ScreenMemoryCard") ) ret = new ScreenMemoryCard;
else if( 0==stricmp(sClassName, "ScreenCompany") ) ret = new ScreenCompany;
else if( 0==stricmp(sClassName, "ScreenIntroMovie") ) ret = new ScreenIntroMovie;
else if( 0==stricmp(sClassName, "ScreenAlbums") ) ret = new ScreenAlbums;
else if( 0==stricmp(sClassName, "ScreenLogo") ) ret = new ScreenLogo;
else if( 0==stricmp(sClassName, "ScreenUnlock") ) ret = new ScreenUnlock;
else if( 0==stricmp(sClassName, "ScreenDemonstration") ) ret = (ScreenGameplay*)new ScreenDemonstration;
else if( 0==stricmp(sClassName, "ScreenInstructions") ) ret = new ScreenInstructions;
else if( 0==stricmp(sClassName, "ScreenNameEntry") ) ret = new ScreenNameEntry;
else if( 0==stricmp(sClassName, "ScreenJukebox") ) ret = new ScreenJukebox;
else if( 0==stricmp(sClassName, "ScreenJukeboxMenu") ) ret = new ScreenJukeboxMenu;
else if( 0==stricmp(sClassName, "ScreenOptionsMenu") ) ret = new ScreenOptionsMenu;
else if( 0==stricmp(sClassName, "ScreenSoundOptions") ) ret = new ScreenSoundOptions;
else if( 0==stricmp(sClassName, "ScreenGameplayOptions") ) ret = new ScreenGameplayOptions;
else if( 0==stricmp(sClassName, "ScreenStyleSplash") ) ret = new ScreenStyleSplash;
else
RageException::Throw( "Invalid Screen class name '%s'", sClassName.GetString() );
Screen *ret = Screen::Create( sClassName );
/* Give a null update to the new screen. This bumps everything into its
* initial tween state, if any, so we don't show stuff at an incorrect
@@ -355,6 +248,10 @@ void ScreenManager::AddNewScreenToTop( CString sClassName )
m_ScreenStack.push_back( pNewScreen );
}
#include "ScreenPrompt.h"
#include "ScreenTextEntry.h"
#include "ScreenMiniMenu.h"
void ScreenManager::Prompt( ScreenMessage SM_SendWhenDone, CString sText, bool bYesNo, bool bDefaultAnswer, void(*OnYes)(), void(*OnNo)() )
{
// add the new state onto the back of the array
@@ -420,7 +317,7 @@ void ScreenManager::RefreshCreditsMessages()
case PrefsManager::COIN_HOME:
if( GAMESTATE->m_bSideIsJoined[p] )
m_textCreditInfo[p].SetText( "" );
else if( GAMESTATE->m_bPlayersCanJoin )
else if( GAMESTATE->m_bPlayersCanJoin ) // would (GAMESTATE->m_CurStyle!=STYLE_INVALID) do the same thing?
m_textCreditInfo[p].SetText( "PRESS START" );
else
m_textCreditInfo[p].SetText( "NOT PRESENT" );
+1 -1
View File
@@ -428,7 +428,7 @@ void ScreenOptions::HandleScreenMessage( const ScreenMessage SM )
m_SoundStart.Play();
m_Wipe.CloseWipingRight( SM_GoToNextScreen );
m_framePage.BeginTweening( 0.3f, Actor::TWEEN_DECELERATE );
m_framePage.BeginTweening( 0.3f, Actor::TWEEN_ACCELERATE );
m_framePage.SetTweenX( SCREEN_RIGHT );
break;
}
+365
View File
@@ -0,0 +1,365 @@
#include "global.h"
/*
-----------------------------------------------------------------------------
Class: ScreenSelect
Desc: See Header.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "ScreenSelect.h"
#include "ScreenManager.h"
#include "PrefsManager.h"
#include "RageSoundManager.h"
#include "GameConstantsAndTypes.h"
#include "PrefsManager.h"
#include "GameManager.h"
#include "RageLog.h"
#include "AnnouncerManager.h"
#include "GameState.h"
#include "GameConstantsAndTypes.h"
#include "ThemeManager.h"
#include "ModeChoice.h"
#define CHOICES_TYPE THEME->GetMetricI(m_sClassName,"ChoicesType")
#define CHOICES THEME->GetMetric (m_sClassName,"Choices")
#define HELP_TEXT THEME->GetMetric (m_sClassName,"HelpText")
#define TIMER_SECONDS THEME->GetMetricI(m_sClassName,"TimerSeconds")
#define NEXT_SCREEN THEME->GetMetric (m_sClassName,"NextScreen")
#define NEXT_SCREEN_ARCADE THEME->GetMetric (m_sClassName,"NextScreenArcade")
#define NEXT_SCREEN_ONI THEME->GetMetric (m_sClassName,"NextScreenOni")
#define NEXT_SCREEN_BATTLE THEME->GetMetric (m_sClassName,"NextScreenBattle")
ScreenSelect::ScreenSelect( CString sClassName )
{
LOG->Trace( "ScreenSelect::ScreenSelect()" );
m_sClassName = sClassName;
m_type = (ChoicesType)CHOICES_TYPE;
m_sClassName = sClassName;
GAMESTATE->m_bPlayersCanJoin = (m_type==CHOICES_STYLE)||(m_type==CHOICES_MODE);
switch( m_type )
{
case CHOICES_STYLE:
{
vector<Style> aStyles;
GAMEMAN->GetStylesForGame( GAMESTATE->m_CurGame, aStyles );
ASSERT( !aStyles.empty() ); // every game should have at least one Style, or else why have the Game? :-)
for( unsigned s=0; s<aStyles.size(); s++ )
{
Style style = aStyles[s];
const StyleDef* pStyleDef = GAMEMAN->GetStyleDefForStyle(aStyles[s]);
int iNumSidesJoinedToPlay;
switch( pStyleDef->m_StyleType )
{
case StyleDef::ONE_PLAYER_ONE_CREDIT: iNumSidesJoinedToPlay = 1; break;
case StyleDef::TWO_PLAYERS_TWO_CREDITS: iNumSidesJoinedToPlay = 2; break;
case StyleDef::ONE_PLAYER_TWO_CREDITS: iNumSidesJoinedToPlay = 2; break;
default: ASSERT(0); iNumSidesJoinedToPlay = 1;
}
ModeChoice mc = {
GAMESTATE->m_CurGame,
style,
PLAY_MODE_INVALID,
DIFFICULTY_INVALID,
"",
iNumSidesJoinedToPlay
};
strcpy( mc.name, pStyleDef->m_szName );
m_aModeChoices.push_back( mc );
}
}
break;
case CHOICES_MODE:
{
CStringArray asChoices;
split( CHOICES, ",", asChoices );
for( unsigned c=0; c<asChoices.size(); c++ )
{
ModeChoice mc = { // fill this in below
GAMESTATE->m_CurGame,
STYLE_INVALID,
PLAY_MODE_INVALID,
DIFFICULTY_INVALID,
"",
1 };
CStringArray asBits;
split( asChoices[c], "-", asBits );
if( asBits.size() != 3 )
RageException::Throw(
"The mode choice '%s' is invalid. Mode choices must be in the format "
"'style-playmode-difficulty'", asChoices[c].GetString() );
mc.game = GAMESTATE->m_CurGame;
mc.style = GAMEMAN->GameAndStringToStyle( mc.game, asBits[0] );
if( mc.style == STYLE_INVALID )
RageException::Throw(
"The specified style '%s' in the mode choice '%s' is invalid.", asBits[0].GetString(), asChoices[c].GetString() );
mc.pm = StringToPlayMode( asBits[1] );
if( mc.pm == PLAY_MODE_INVALID )
RageException::Throw(
"The specified play mode '%s' in the mode choice '%s' is invalid.", asBits[1].GetString(), asChoices[c].GetString() );
mc.dc = StringToDifficulty( asBits[2] );
if( mc.dc == DIFFICULTY_INVALID )
RageException::Throw(
"The specified difficulty '%s' in the mode choice '%s' is invalid.", asBits[2].GetString(), asChoices[c].GetString() );
strcpy( mc.name, asChoices[c] );
const StyleDef* pStyleDef = GAMEMAN->GetStyleDefForStyle(mc.style);
switch( pStyleDef->m_StyleType )
{
case StyleDef::ONE_PLAYER_ONE_CREDIT:
mc.numSidesJoinedToPlay = 1;
break;
case StyleDef::TWO_PLAYERS_TWO_CREDITS:
case StyleDef::ONE_PLAYER_TWO_CREDITS:
mc.numSidesJoinedToPlay = 2;
break;
default:
ASSERT(0);
}
m_aModeChoices.push_back( mc );
}
}
break;
case CHOICES_DIFFICULTY:
{
if( GAMESTATE->m_CurStyle == STYLE_INVALID )
RageException::Throw( "The current Style has not been set. A theme must set the style before it can display a difficulty selection screen." );
CStringArray asBits;
split( CHOICES, ",", asBits );
unsigned choice;
for( choice=0; choice<asBits.size(); choice++ )
{
Difficulty dc = StringToDifficulty(asBits[choice]);
PlayMode pm = StringToPlayMode(asBits[choice]);
if( dc!=DIFFICULTY_INVALID ) // valid difficulty
{
ModeChoice mc = {
GAMESTATE->m_CurGame,
GAMESTATE->m_CurStyle,
PLAY_MODE_ARCADE,
dc,
"",
GAMESTATE->GetNumSidesJoined() };
strcpy( mc.name, DifficultyToString(dc) );
m_aModeChoices.push_back( mc );
}
else if( pm!=PLAY_MODE_INVALID ) // valid play mode
{
ModeChoice mc = {
GAMESTATE->m_CurGame,
GAMESTATE->m_CurStyle,
pm,
DIFFICULTY_MEDIUM,
"",
GAMESTATE->GetNumSidesJoined() };
strcpy( mc.name, PlayModeToString(pm) );
m_aModeChoices.push_back( mc );
}
else
RageException::Throw( "Invalid Choice%d value '%s'.", choice+1, asBits[choice].GetString() );
}
}
break;
case CHOICES_GAME:
ASSERT(0); // TODO
break;
}
for( unsigned c=0; c<m_aModeChoices.size(); c++ )
{
CString sBGAnimationDir = THEME->GetPathToOptional("BGAnimations",ssprintf("%s %s",m_sClassName.GetString(),m_aModeChoices[c].name));
if( sBGAnimationDir == "" )
sBGAnimationDir = THEME->GetPathTo("BGAnimations",m_sClassName.GetString());
m_BGAnimations[c].LoadFromAniDir( sBGAnimationDir );
}
m_Menu.Load(
"", // don't load any BGAnimation. We have our own.
THEME->GetPathTo("Graphics",m_sClassName+" top edge"),
HELP_TEXT, false, true, TIMER_SECONDS
);
this->AddChild( &m_Menu );
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo(m_sClassName+" intro") );
SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds",m_sClassName+" music") );
switch( m_type )
{
case CHOICES_STYLE:
case CHOICES_MODE:
// This is probably the first screen in the menu sequence.
m_Menu.TweenOnScreenFromBlack( SM_None );
break;
case CHOICES_DIFFICULTY:
// This is probably not the first screen in the menu sequence.
m_Menu.TweenOnScreenFromMenu( SM_None );
break;
}
}
ScreenSelect::~ScreenSelect()
{
LOG->Trace( "ScreenSelect::~ScreenSelect()" );
}
void ScreenSelect::Update( float fDelta )
{
Screen::Update( fDelta );
m_BGAnimations[ this->GetSelectionIndex(GAMESTATE->m_MasterPlayerNumber) ].Update( fDelta );
}
void ScreenSelect::DrawPrimitives()
{
m_BGAnimations[ this->GetSelectionIndex(GAMESTATE->m_MasterPlayerNumber) ].Draw();
m_Menu.DrawBottomLayer();
Screen::DrawPrimitives();
m_Menu.DrawTopLayer();
}
void ScreenSelect::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
{
LOG->Trace( "ScreenSelect::Input()" );
if( MenuI.IsValid() && MenuI.button==MENU_BUTTON_START )
{
PlayerNumber pn = MenuI.player;
switch( m_type )
{
case CHOICES_STYLE:
case CHOICES_MODE:
if( pn!=PLAYER_INVALID && !GAMESTATE->m_bSideIsJoined[pn] )
{
/* I think JP should allow playing two-pad singleplayer modes (doubles),
* but not two-pad two-player modes (battle). (Battle mode isn't "joint".)
* That means we should leave player-entry logic alone and simply enable
* couples mode if JP is on and only one person has clicked in. (However,
* that means we'll display couples even if we don't really know if we have
* a second pad, which is a little annoying.)
*
* Also, credit deduction should be handled in StepMania.cpp (along with
* the coin logic) using GAMESTATE->m_bPlayersCanJoin, since there
* are other screens you can join (eg ScreenCaution). -glenn */
if( PREFSMAN->m_CoinMode == PrefsManager::COIN_PAY )
{
if( !PREFSMAN->m_bJointPremium )
{
if( GAMESTATE->m_iCoins < PREFSMAN->m_iCoinsPerCredit )
{
/* Joint Premium is NOT enabled, and we do not have enough credits */
return;
}
/* Joint Premium is NOT enabled, but we have enough credits. Pay up! */
GAMESTATE->m_iCoins -= PREFSMAN->m_iCoinsPerCredit;
}
}
/* If credits had to be used, it's already taken care of.. add the player */
SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","menu start") );
GAMESTATE->m_bSideIsJoined[pn] = true;
SCREENMAN->RefreshCreditsMessages();
this->UpdateSelectableChoices();
return;
}
break;
}
}
if( m_Menu.IsClosing() )
return;
Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); // default input handler
}
void ScreenSelect::HandleScreenMessage( const ScreenMessage SM )
{
switch( SM )
{
case SM_AllDoneChoosing:
{
for( int p=0; p<NUM_PLAYERS; p++ )
if( GAMESTATE->IsPlayerEnabled((PlayerNumber)p) )
GAMESTATE->ApplyModeChoice( m_aModeChoices[this->GetSelectionIndex((PlayerNumber)p)], (PlayerNumber)p );
GAMESTATE->m_bPlayersCanJoin = false;
SCREENMAN->RefreshCreditsMessages();
m_Menu.StopTimer();
m_Menu.TweenOffScreenToMenu( SM_GoToNextScreen );
}
break;
case SM_MenuTimer:
{
for( int p=0; p<NUM_PLAYERS; p++ )
if( GAMESTATE->IsPlayerEnabled(p) )
MenuStart( (PlayerNumber)p );
}
break;
case SM_GoToPrevScreen:
SOUNDMAN->StopMusic();
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
break;
case SM_GoToNextScreen:
switch( m_type )
{
case CHOICES_STYLE:
// if they only chose a style, then the play mode isn't set.
SCREENMAN->SetNewScreen( NEXT_SCREEN );
break;
case CHOICES_MODE:
case CHOICES_DIFFICULTY:
// go to a specific screen depending on the play mode
switch( GAMESTATE->m_PlayMode )
{
case PLAY_MODE_ARCADE: SCREENMAN->SetNewScreen( NEXT_SCREEN_ARCADE ); break;
case PLAY_MODE_NONSTOP:
case PLAY_MODE_ONI:
case PLAY_MODE_ENDLESS: SCREENMAN->SetNewScreen( NEXT_SCREEN_ONI ); break;
case PLAY_MODE_BATTLE: SCREENMAN->SetNewScreen( NEXT_SCREEN_BATTLE ); break;
default: ASSERT(0);
}
break;
}
break;
}
}
void ScreenSelect::MenuBack( PlayerNumber pn )
{
SOUNDMAN->StopMusic();
m_Menu.TweenOffScreenToBlack( SM_GoToPrevScreen, true );
}
+53
View File
@@ -0,0 +1,53 @@
#ifndef ScreenSelect_H
#define ScreenSelect_H
/*
-----------------------------------------------------------------------------
Class: ScreenSelect
Desc: Base class for Style, Difficulty, and Mode selection screens.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "Screen.h"
#include "MenuElements.h"
#include "BGAnimation.h"
#include "ModeChoice.h"
// Derived classes must send this when done
const ScreenMessage SM_AllDoneChoosing = (ScreenMessage)(SM_User+123); // unique
#define MAX_CHOICES 30
class ScreenSelect : public Screen
{
public:
ScreenSelect( CString sClassName );
virtual ~ScreenSelect();
virtual void Update( float fDelta );
virtual void DrawPrimitives();
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
virtual void HandleScreenMessage( const ScreenMessage SM );
virtual void MenuBack( PlayerNumber pn );
protected:
virtual int GetSelectionIndex( PlayerNumber pn ) = 0;
virtual void UpdateSelectableChoices() = 0; // derived screens must handle this
enum ChoicesType { CHOICES_STYLE, CHOICES_DIFFICULTY, CHOICES_MODE, CHOICES_GAME };
ChoicesType m_type;
CString m_sClassName;
MenuElements m_Menu;
BGAnimation m_BGAnimations[MAX_CHOICES];
vector<ModeChoice> m_aModeChoices; // derived classes should look here for what choices are available
};
#endif
-220
View File
@@ -1,220 +0,0 @@
#include "global.h"
/*
-----------------------------------------------------------------------------
Class: ScreenSelectDifficulty
Desc: Testing the Screen class.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "ScreenSelectDifficulty.h"
#include "ScreenManager.h"
#include "PrefsManager.h"
#include "GameManager.h"
#include "RageLog.h"
#include "GameConstantsAndTypes.h"
#include "AnnouncerManager.h"
#include "GameState.h"
#include "RageSoundManager.h"
#include "ThemeManager.h"
#include "ModeSelector.h"
#define CHOICES THEME->GetMetric ("ScreenSelectDifficulty","Choices")
#define SELECTOR THEME->GetMetric ("ScreenSelectDifficulty","Selector")
#define HELP_TEXT THEME->GetMetric("ScreenSelectDifficulty","HelpText")
#define TIMER_SECONDS THEME->GetMetricI("ScreenSelectDifficulty","TimerSeconds")
#define NEXT_SCREEN_ARCADE THEME->GetMetric ("ScreenSelectDifficulty","NextScreenArcade")
#define NEXT_SCREEN_ONI THEME->GetMetric ("ScreenSelectDifficulty","NextScreenOni")
#define NEXT_SCREEN_BATTLE THEME->GetMetric ("ScreenSelectDifficulty","NextScreenBattle")
const ScreenMessage SM_StartTweeningOffScreen = ScreenMessage(SM_User + 3);
const ScreenMessage SM_StartFadingOut = ScreenMessage(SM_User + 4);
ScreenSelectDifficulty::ScreenSelectDifficulty()
{
LOG->Trace( "ScreenSelectDifficulty::ScreenSelectDifficulty()" );
// Reset the current PlayMode
GAMESTATE->m_PlayMode = PLAY_MODE_INVALID;
vector<ModeChoice> aModeChoices;
CStringArray asBits;
split( CHOICES, ",", asBits );
unsigned choice;
for( choice=0; choice<asBits.size(); choice++ )
{
Difficulty dc = StringToDifficulty(asBits[choice]);
PlayMode pm = StringToPlayMode(asBits[choice]);
if( dc!=DIFFICULTY_INVALID ) // valid difficulty
{
ModeChoice mc = {
GAMESTATE->m_CurGame,
PLAY_MODE_ARCADE,
GAMESTATE->m_CurStyle,
dc,
"",
GAMESTATE->GetNumSidesJoined() };
strcpy( mc.name, DifficultyToString(dc) );
aModeChoices.push_back( mc );
}
else if( pm!=PLAY_MODE_INVALID ) // valid play mode
{
ModeChoice mc = {
GAMESTATE->m_CurGame,
pm,
GAMESTATE->m_CurStyle,
DIFFICULTY_MEDIUM,
"",
GAMESTATE->GetNumSidesJoined() };
strcpy( mc.name, PlayModeToString(pm) );
aModeChoices.push_back( mc );
}
else
RageException::Throw( "Invalid Choice%d value '%s'.", choice+1, asBits[choice].GetString() );
}
m_pSelector = ModeSelector::Create( SELECTOR );
m_pSelector->Init( aModeChoices, "ScreenSelectDifficulty", "select difficulty" );
this->AddChild( m_pSelector );
m_Menu.Load(
THEME->GetPathTo("BGAnimations","select difficulty"),
THEME->GetPathTo("Graphics","select difficulty top edge"),
HELP_TEXT, true, true, TIMER_SECONDS
);
this->AddChild( &m_Menu );
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select difficulty intro") );
m_Menu.TweenOnScreenFromMenu( SM_None );
m_pSelector->TweenOnScreen();
SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","select difficulty music") );
}
ScreenSelectDifficulty::~ScreenSelectDifficulty()
{
LOG->Trace( "ScreenSelectDifficulty::~ScreenSelectDifficulty()" );
}
void ScreenSelectDifficulty::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
{
LOG->Trace( "ScreenSelectDifficulty::Input()" );
if( m_Menu.IsClosing() )
return;
Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); // default input handler
}
void ScreenSelectDifficulty::Update( float fDeltaTime )
{
Screen::Update( fDeltaTime );
}
void ScreenSelectDifficulty::DrawPrimitives()
{
m_Menu.DrawBottomLayer();
Screen::DrawPrimitives();
m_Menu.DrawTopLayer();
}
void ScreenSelectDifficulty::HandleScreenMessage( const ScreenMessage SM )
{
int p;
switch( SM )
{
case SM_MenuTimer:
for( p=0; p<NUM_PLAYERS; p++ )
if( GAMESTATE->IsPlayerEnabled(p) )
MenuStart( (PlayerNumber)p );
break;
case SM_BeginFadingOut: // sent by our ModeSelector
{
ModeChoice mc;
for( int p=0; p<NUM_PLAYERS; p++ )
if( GAMESTATE->IsPlayerEnabled(p) )
{
m_pSelector->GetSelectedModeChoice( (PlayerNumber)p, &mc );
GAMESTATE->ApplyModeChoice( &mc, (PlayerNumber)p );
}
m_Menu.StopTimer();
m_pSelector->TweenOffScreen();
m_Menu.TweenOffScreenToMenu( SM_GoToNextScreen );
}
break;
case SM_GoToPrevScreen:
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
break;
case SM_GoToNextScreen:
switch( GAMESTATE->m_PlayMode )
{
case PLAY_MODE_ARCADE: SCREENMAN->SetNewScreen( NEXT_SCREEN_ARCADE ); break;
case PLAY_MODE_NONSTOP:
case PLAY_MODE_ONI:
case PLAY_MODE_ENDLESS: SCREENMAN->SetNewScreen( NEXT_SCREEN_ONI ); break;
case PLAY_MODE_BATTLE: SCREENMAN->SetNewScreen( NEXT_SCREEN_BATTLE ); break;
default: ASSERT(0);
}
break;
case SM_StartTweeningOffScreen:
m_pSelector->TweenOffScreen();
this->SendScreenMessage( SM_StartFadingOut, 0.8f );
break;
case SM_StartFadingOut:
m_Menu.TweenOffScreenToMenu( SM_GoToNextScreen );
break;
}
}
void ScreenSelectDifficulty::MenuLeft( PlayerNumber pn )
{
m_pSelector->MenuLeft( pn );
}
void ScreenSelectDifficulty::MenuRight( PlayerNumber pn )
{
m_pSelector->MenuRight( pn );
}
void ScreenSelectDifficulty::MenuUp( PlayerNumber pn )
{
m_pSelector->MenuUp( pn );
}
void ScreenSelectDifficulty::MenuDown( PlayerNumber pn )
{
m_pSelector->MenuDown( pn );
}
void ScreenSelectDifficulty::MenuStart( PlayerNumber pn )
{
m_pSelector->MenuStart( pn );
}
void ScreenSelectDifficulty::MenuBack( PlayerNumber pn )
{
SOUNDMAN->StopMusic();
m_Menu.TweenOffScreenToBlack( SM_GoToPrevScreen, true );
}
-46
View File
@@ -1,46 +0,0 @@
/*
-----------------------------------------------------------------------------
File: ScreenSelectDifficulty.h
Desc: Select the difficulty (easy, medium, hard).
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "Screen.h"
#include "MenuElements.h"
class ModeSelector;
class ScreenSelectDifficulty : public Screen
{
public:
enum Page { PAGE_1, PAGE_2, NUM_PAGES };
#define MAX_CHOICES_PER_PAGE 6
ScreenSelectDifficulty();
virtual ~ScreenSelectDifficulty();
virtual void Update( float fDeltaTime );
virtual void DrawPrimitives();
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 MenuUp( PlayerNumber pn );
void MenuDown( PlayerNumber pn );
void MenuLeft( PlayerNumber pn );
void MenuRight( PlayerNumber pn );
void MenuStart( PlayerNumber pn );
void MenuBack( PlayerNumber pn );
private:
MenuElements m_Menu;
ModeSelector* m_pSelector;
};
+260
View File
@@ -0,0 +1,260 @@
#include "global.h"
/*
-----------------------------------------------------------------------------
Class: ScreenSelectMaxType1
Desc: See header.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "ScreenSelectMaxType1.h"
#include "GameManager.h"
#include "ThemeManager.h"
#include "PrefsManager.h"
#include "ScreenManager.h"
#include "GameState.h"
#define JOINT_PREMIUM_ON_COMMAND THEME->GetMetric ("ScreenSelectMaxType1","JointPremiumOnCommand")
#define JOINT_PREMIUM_OFF_COMMAND THEME->GetMetric ("ScreenSelectMaxType1","JointPremiumOffCommand")
#define ICON_ON_COMMAND( i ) THEME->GetMetric ("ScreenSelectMaxType1",ssprintf("Icon%dOnCommand",i+1))
#define ICON_OFF_COMMAND( i ) THEME->GetMetric ("ScreenSelectMaxType1",ssprintf("Icon%dOffCommand",i+1))
#define DISABLED_COLOR THEME->GetMetricC("ScreenSelectMaxType1","DisabledColor")
#define EXPLANATION_ON_COMMAND THEME->GetMetric ("ScreenSelectMaxType1","ExplanationOnCommand")
#define EXPLANATION_OFF_COMMAND THEME->GetMetric ("ScreenSelectMaxType1","ExplanationOffCommand")
#define INFO_ON_COMMAND THEME->GetMetric ("ScreenSelectMaxType1","InfoOnCommand")
#define INFO_OFF_COMMAND THEME->GetMetric ("ScreenSelectMaxType1","InfoOffCommand")
#define PREVIEW_ON_COMMAND THEME->GetMetric ("ScreenSelectMaxType1","PreviewOnCommand")
#define PREVIEW_OFF_COMMAND THEME->GetMetric ("ScreenSelectMaxType1","PreviewOffCommand")
ScreenSelectMaxType1::ScreenSelectMaxType1() : ScreenSelect( "ScreenSelectMaxType1" )
{
m_iSelection = 0;
unsigned i;
for( i=0; i<m_aModeChoices.size(); i++ )
{
const ModeChoice& mc = m_aModeChoices[i];
CString sGameName = GAMEMAN->GetGameDefForGame(mc.game)->m_szName;
//
// Load icon
//
CString sIconElementName = ssprintf("ScreenSelectMaxType1 icon %s %s", sGameName.GetString(), mc.name );
CString sIconPath = THEME->GetPathTo("Graphics",sIconElementName);
if( sIconPath.empty() ) // element doesn't exist
{
m_textIcon[i].LoadFromFont( THEME->GetPathTo("Fonts","normal") );
m_textIcon[i].SetText( mc.name );
m_textIcon[i].SetZoom(0.5f);
this->AddChild( &m_textIcon[i] );
}
else
{
m_sprIcon[i].Load( sIconPath );
this->AddChild( &m_sprIcon[i] );
}
//
// Load preview
//
CString sPreviewElementName = ssprintf("ScreenSelectMaxType1 preview %s %s", sGameName.GetString(), mc.name );
CString sPreviewPath = THEME->GetPathTo("Graphics",sPreviewElementName);
if( sPreviewPath != "" )
{
m_sprPreview[i].Load( sPreviewPath );
// m_sprPreview[i].Command( PREVIEW_X, PREVIEW_Y );
m_sprPreview[i].SetDiffuse( RageColor(1,1,1,0) );
this->AddChild( &m_sprPreview[i] );
}
//
// Load info
//
CString sInfoElementName = ssprintf("ScreenSelectMaxType1 info %s %s", sGameName.GetString(), mc.name );
CString sInfoPath = THEME->GetPathTo("Graphics",sInfoElementName);
if( sInfoPath != "" )
{
m_sprInfo[i].Load( sInfoPath );
// m_sprInfo[i].SetXY( INFO_X, INFO_Y );
m_sprInfo[i].SetDiffuse( RageColor(1,1,1,0) );
this->AddChild( &m_sprInfo[i] );
}
}
// fix Z ordering of Preview and Info so that they draw on top
for( i=0; i<this->m_aModeChoices.size(); i++ )
this->MoveToTail( &m_sprPreview[i] );
for( i=0; i<this->m_aModeChoices.size(); i++ )
this->MoveToTail( &m_sprInfo[i] );
this->UpdateSelectableChoices();
m_sprExplanation.Load( THEME->GetPathTo("Graphics","ScreenSelectMaxType1 explanation") );
// m_sprExplanation.SetXY( EXPLANATION_X, EXPLANATION_Y );
this->AddChild( &m_sprExplanation );
if( PREFSMAN->m_bJointPremium )
{
m_sprJointPremium.Load( THEME->GetPathTo("Graphics","ScreenSelectMaxType1 joint premium") );
// m_sprJointPremium.SetXY( JOINT_PREMIUM_BANNER_X, JOINT_PREMIUM_BANNER_Y );
this->AddChild( &m_sprJointPremium );
}
m_soundChange.Load( THEME->GetPathTo("Sounds","ScreenSelectMaxType1 change") );
m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") );
//
// TweenOnScreen
//
for( i=0; i<m_aModeChoices.size(); i++ )
{
m_textIcon[i].Command( ICON_ON_COMMAND(i) );
m_sprIcon[i].Command( ICON_ON_COMMAND(i) );
}
m_sprExplanation.Command( EXPLANATION_ON_COMMAND );
m_sprJointPremium.Command( JOINT_PREMIUM_ON_COMMAND );
// let AfterChange tween Preview and Info
}
void ScreenSelectMaxType1::MenuLeft( PlayerNumber pn )
{
int iSwitchToIndex = -1; // -1 means none found
for( int i=m_iSelection-1; i>=0; i-- )
{
if( GAMESTATE->IsPlayable(m_aModeChoices[i]) )
{
iSwitchToIndex = i;
break;
}
}
if( iSwitchToIndex == -1 )
return;
BeforeChange();
m_iSelection = iSwitchToIndex;
m_soundChange.Play();
AfterChange();
}
void ScreenSelectMaxType1::MenuRight( PlayerNumber pn )
{
int iSwitchToIndex = -1; // -1 means none found
for( unsigned i=m_iSelection+1; i<m_aModeChoices.size(); i++ )
{
if( GAMESTATE->IsPlayable(m_aModeChoices[i]) )
{
iSwitchToIndex = i;
break;
}
}
if( iSwitchToIndex == -1 )
return;
BeforeChange();
m_iSelection = iSwitchToIndex;
m_soundChange.Play();
AfterChange();
}
void ScreenSelectMaxType1::MenuStart( PlayerNumber pn )
{
m_soundSelect.Play();
SCREENMAN->SendMessageToTopScreen( SM_AllDoneChoosing, 0 );
//
// TweenOffScreen
//
for( unsigned i=0; i<m_aModeChoices.size(); i++ )
{
m_sprIcon[i].Command( ICON_OFF_COMMAND(i) );
m_textIcon[i].Command( ICON_OFF_COMMAND(i) );
}
m_sprExplanation.Command( EXPLANATION_OFF_COMMAND );
m_sprPreview[m_iSelection].Command( PREVIEW_OFF_COMMAND );
m_sprInfo[m_iSelection].Command( INFO_OFF_COMMAND );
m_sprJointPremium.Command( JOINT_PREMIUM_OFF_COMMAND );
}
int ScreenSelectMaxType1::GetSelectionIndex( PlayerNumber pn )
{
return m_iSelection;
}
void ScreenSelectMaxType1::UpdateSelectableChoices()
{
unsigned i;
/* XXX: If a player joins during the tween-in, this diffuse change
* will be undone by the tween. Hmm. */
for( i=0; i<m_aModeChoices.size(); i++ )
{
/* If the icon is text, use a dimmer diffuse, or we won't be
* able to see the glow. */
if( GAMESTATE->IsPlayable(m_aModeChoices[i]) )
{
m_sprIcon[i].SetDiffuse( RageColor(1,1,1,1) );
m_textIcon[i].SetDiffuse( RageColor(0.5f,0.5f,0.5f,1) ); // gray so glow is visible
}
else
{
m_sprIcon[i].SetDiffuse( DISABLED_COLOR );
m_textIcon[i].SetDiffuse( DISABLED_COLOR );
}
}
// Select first enabled choie
BeforeChange();
int iSwitchToStyleIndex = -1; // -1 means none found
for( i=0; i<m_aModeChoices.size(); i++ )
{
if( GAMESTATE->IsPlayable(m_aModeChoices[i]) )
{
iSwitchToStyleIndex = i;
break;
}
}
ASSERT( iSwitchToStyleIndex != -1 ); // no styles are enabled. We're stuck! This should never happen
m_iSelection = iSwitchToStyleIndex;
AfterChange();
}
void ScreenSelectMaxType1::BeforeChange()
{
// dim/hide old selection
m_sprIcon[m_iSelection].SetEffectNone();
m_textIcon[m_iSelection].SetEffectNone();
m_sprPreview[m_iSelection].StopTweening();
m_sprInfo[m_iSelection].StopTweening();
m_sprPreview[m_iSelection].SetDiffuse( RageColor(1,1,1,0) );
m_sprInfo[m_iSelection].SetDiffuse( RageColor(1,1,1,0) );
m_sprPreview[m_iSelection].SetGlow( RageColor(1,1,1,0) );
m_sprInfo[m_iSelection].SetGlow( RageColor(1,1,1,0) );
}
void ScreenSelectMaxType1::AfterChange()
{
m_sprIcon[m_iSelection].SetEffectGlowShift();
m_textIcon[m_iSelection].SetEffectGlowShift();
m_sprPreview[m_iSelection].SetDiffuse( RageColor(1,1,1,1) );
m_sprInfo[m_iSelection].SetDiffuse( RageColor(1,1,1,1) );
m_sprPreview[m_iSelection].SetZoom( 1 );
m_sprInfo[m_iSelection].SetZoom( 1 );
m_sprPreview[m_iSelection].Command( PREVIEW_ON_COMMAND );
m_sprInfo[m_iSelection].Command( INFO_ON_COMMAND );
}
@@ -1,10 +1,10 @@
#ifndef ModeSelectorMaxType1_H
#define ModeSelectorMaxType1_H
#ifndef ScreenSelectMaxType1_H
#define ScreenSelectMaxType1_H
/*
-----------------------------------------------------------------------------
Class: ModeSelectorMaxType1
Class: ScreenSelectMaxType1
Desc: Abstract class for a widget that selects a ModeChoice
Desc:
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
@@ -12,42 +12,29 @@
*/
#include "ModeSelector.h"
#include "ScreenSelect.h"
#include "Sprite.h"
#include "BitmapText.h"
#include "RageSound.h"
#define MAX_MODE_CHOICES 30
class ModeSelectorMaxType1 : public ModeSelector
class ScreenSelectMaxType1 : public ScreenSelect
{
public:
ModeSelectorMaxType1();
virtual ~ModeSelectorMaxType1() {};
virtual void Init( const vector<ModeChoice>& choices, CString sClassName, CString sThemeElementPrefix );
ScreenSelectMaxType1();
virtual void MenuLeft( PlayerNumber pn );
virtual void MenuRight( PlayerNumber pn );
virtual void MenuUp( PlayerNumber pn ) {};
virtual void MenuDown( PlayerNumber pn ) {};
virtual void MenuStart( PlayerNumber pn );
virtual void MenuBack( PlayerNumber pn );
virtual void TweenOffScreen();
virtual void TweenOnScreen();
virtual void GetSelectedModeChoice( PlayerNumber pn, ModeChoice* pModeChoiceOut );
virtual void UpdateSelectableChoices();
protected:
virtual int GetSelectionIndex( PlayerNumber pn );
virtual void UpdateSelectableChoices();
void BeforeChange();
void AfterChange();
vector<ModeChoice> m_aModeChoices;
int m_iSelection;
Sprite m_sprIcon[MAX_MODE_CHOICES];
// Artists don't make graphics for every single Game, so
// have a text representation if textures are missing.
@@ -59,6 +46,8 @@ protected:
RageSound m_soundChange;
RageSound m_soundSelect;
int m_iSelection;
};
#endif
@@ -1,7 +1,7 @@
#include "global.h"
/*
-----------------------------------------------------------------------------
Class: ModeSelectorMaxType2
Class: ScreenSelectMaxType2
Desc: See header.
@@ -10,45 +10,46 @@
-----------------------------------------------------------------------------
*/
#include "ModeSelectorMaxType2.h"
#include "ScreenSelectMaxType2.h"
#include "GameManager.h"
#include "ThemeManager.h"
#include "PrefsManager.h"
#include "ScreenManager.h"
#include "GameState.h"
#include "AnnouncerManager.h"
#include "ModeChoice.h"
#define NUM_CHOICES_ON_PAGE_1 THEME->GetMetricI("ModeSelectorMaxType2","NumChoicesOnPage1")
#define LOCK_INPUT_SECONDS THEME->GetMetricF("ModeSelectorMaxType2","LockInputSeconds")
#define SLEEP_AFTER_CHOICE_SECONDS THEME->GetMetricF("ModeSelectorMaxType2","SleepAfterChoiceSeconds")
#define SLEEP_AFTER_TWEEN_OFF_SECONDS THEME->GetMetricF("ModeSelectorMaxType2","SleepAfterTweenOffSeconds")
#define MORE_ON_COMMAND( page ) THEME->GetMetric ("ModeSelectorMaxType2",ssprintf("MorePage%dOnCommand",page+1))
#define MORE_OFF_COMMAND( page ) THEME->GetMetric ("ModeSelectorMaxType2",ssprintf("MorePage%dOffCommand",page+1))
#define EXPLANATION_ON_COMMAND( page ) THEME->GetMetric ("ModeSelectorMaxType2",ssprintf("ExplanationPage%dOnCommand",page+1))
#define EXPLANATION_OFF_COMMAND( page ) THEME->GetMetric ("ModeSelectorMaxType2",ssprintf("ExplanationPage%dOffCommand",page+1))
#define HEADER_ON_COMMAND( page, choice ) THEME->GetMetric ("ModeSelectorMaxType2",ssprintf("HeaderPage%dChoice%dOnCommand",page+1,choice+1))
#define HEADER_OFF_COMMAND( page, choice ) THEME->GetMetric ("ModeSelectorMaxType2",ssprintf("HeaderPage%dChoice%dOffCommand",page+1,choice+1))
#define PICTURE_ON_COMMAND( page, choice ) THEME->GetMetric ("ModeSelectorMaxType2",ssprintf("PicturePage%dChoice%dOnCommand",page+1,choice+1))
#define PICTURE_OFF_COMMAND( page, choice ) THEME->GetMetric ("ModeSelectorMaxType2",ssprintf("PicturePage%dChoice%dOffCommand",page+1,choice+1))
#define CURSOR_ON_COMMAND THEME->GetMetric ("ModeSelectorMaxType2","CursorOnCommand")
#define CURSOR_CHOOSE_COMMAND THEME->GetMetric ("ModeSelectorMaxType2","CursorChooseCommand")
#define CURSOR_OFF_COMMAND THEME->GetMetric ("ModeSelectorMaxType2","CursorOffCommand")
#define CURSOR_OFFSET_X_FROM_PICTURE( p ) THEME->GetMetricF("ModeSelectorMaxType2",ssprintf("CursorP%dOffsetXFromPicture",p+1))
#define CURSOR_OFFSET_Y_FROM_PICTURE( p ) THEME->GetMetricF("ModeSelectorMaxType2",ssprintf("CursorP%dOffsetYFromPicture",p+1))
#define SHADOW_ON_COMMAND THEME->GetMetric ("ModeSelectorMaxType2","ShadowOnCommand")
#define SHADOW_CHOOSE_COMMAND THEME->GetMetric ("ModeSelectorMaxType2","ShadowChooseCommand")
#define SHADOW_OFF_COMMAND THEME->GetMetric ("ModeSelectorMaxType2","ShadowOffCommand")
#define SHADOW_LENGTH_X THEME->GetMetricF("ModeSelectorMaxType2","ShadowLengthX")
#define SHADOW_LENGTH_Y THEME->GetMetricF("ModeSelectorMaxType2","ShadowLengthY")
#define OK_ON_COMMAND THEME->GetMetric ("ModeSelectorMaxType2","OKOnCommand")
#define OK_CHOOSE_COMMAND THEME->GetMetric ("ModeSelectorMaxType2","OKChooseCommand")
#define OK_OFF_COMMAND THEME->GetMetric ("ModeSelectorMaxType2","OKOffCommand")
#define DISABLED_COLOR THEME->GetMetricC("ModeSelectorMaxType2","DisabledColor")
#define NUM_CHOICES_ON_PAGE_1 THEME->GetMetricI("ScreenSelectMaxType2","NumChoicesOnPage1")
#define LOCK_INPUT_SECONDS THEME->GetMetricF("ScreenSelectMaxType2","LockInputSeconds")
#define SLEEP_AFTER_CHOICE_SECONDS THEME->GetMetricF("ScreenSelectMaxType2","SleepAfterChoiceSeconds")
#define SLEEP_AFTER_TWEEN_OFF_SECONDS THEME->GetMetricF("ScreenSelectMaxType2","SleepAfterTweenOffSeconds")
#define MORE_ON_COMMAND( page ) THEME->GetMetric ("ScreenSelectMaxType2",ssprintf("MorePage%dOnCommand",page+1))
#define MORE_OFF_COMMAND( page ) THEME->GetMetric ("ScreenSelectMaxType2",ssprintf("MorePage%dOffCommand",page+1))
#define EXPLANATION_ON_COMMAND( page ) THEME->GetMetric ("ScreenSelectMaxType2",ssprintf("ExplanationPage%dOnCommand",page+1))
#define EXPLANATION_OFF_COMMAND( page ) THEME->GetMetric ("ScreenSelectMaxType2",ssprintf("ExplanationPage%dOffCommand",page+1))
#define HEADER_ON_COMMAND( page, choice ) THEME->GetMetric ("ScreenSelectMaxType2",ssprintf("HeaderPage%dChoice%dOnCommand",page+1,choice+1))
#define HEADER_OFF_COMMAND( page, choice ) THEME->GetMetric ("ScreenSelectMaxType2",ssprintf("HeaderPage%dChoice%dOffCommand",page+1,choice+1))
#define PICTURE_ON_COMMAND( page, choice ) THEME->GetMetric ("ScreenSelectMaxType2",ssprintf("PicturePage%dChoice%dOnCommand",page+1,choice+1))
#define PICTURE_OFF_COMMAND( page, choice ) THEME->GetMetric ("ScreenSelectMaxType2",ssprintf("PicturePage%dChoice%dOffCommand",page+1,choice+1))
#define CURSOR_ON_COMMAND THEME->GetMetric ("ScreenSelectMaxType2","CursorOnCommand")
#define CURSOR_CHOOSE_COMMAND THEME->GetMetric ("ScreenSelectMaxType2","CursorChooseCommand")
#define CURSOR_OFF_COMMAND THEME->GetMetric ("ScreenSelectMaxType2","CursorOffCommand")
#define CURSOR_OFFSET_X_FROM_PICTURE( p ) THEME->GetMetricF("ScreenSelectMaxType2",ssprintf("CursorP%dOffsetXFromPicture",p+1))
#define CURSOR_OFFSET_Y_FROM_PICTURE( p ) THEME->GetMetricF("ScreenSelectMaxType2",ssprintf("CursorP%dOffsetYFromPicture",p+1))
#define SHADOW_ON_COMMAND THEME->GetMetric ("ScreenSelectMaxType2","ShadowOnCommand")
#define SHADOW_CHOOSE_COMMAND THEME->GetMetric ("ScreenSelectMaxType2","ShadowChooseCommand")
#define SHADOW_OFF_COMMAND THEME->GetMetric ("ScreenSelectMaxType2","ShadowOffCommand")
#define SHADOW_LENGTH_X THEME->GetMetricF("ScreenSelectMaxType2","ShadowLengthX")
#define SHADOW_LENGTH_Y THEME->GetMetricF("ScreenSelectMaxType2","ShadowLengthY")
#define OK_ON_COMMAND THEME->GetMetric ("ScreenSelectMaxType2","OKOnCommand")
#define OK_CHOOSE_COMMAND THEME->GetMetric ("ScreenSelectMaxType2","OKChooseCommand")
#define OK_OFF_COMMAND THEME->GetMetric ("ScreenSelectMaxType2","OKOffCommand")
#define DISABLED_COLOR THEME->GetMetricC("ScreenSelectMaxType2","DisabledColor")
ModeSelectorMaxType2::ModeSelectorMaxType2()
ScreenSelectMaxType2::ScreenSelectMaxType2() : ScreenSelect( "ScreenSelectMaxType2" )
{
m_CurrentPage = PAGE_1;
for( int p=0; p<NUM_PLAYERS; p++ )
@@ -56,27 +57,22 @@ ModeSelectorMaxType2::ModeSelectorMaxType2()
m_iChoiceOnPage[p] = 0;
m_bChosen[p] = false;
}
}
ModeSelectorMaxType2::~ModeSelectorMaxType2()
{
}
void ModeSelectorMaxType2::Init( const vector<ModeChoice>& choices, CString sClassName, CString sThemeElementPrefix )
{
for( int c=0; c<choices.size(); c++ )
if( c < NUM_CHOICES_ON_PAGE_1 )
m_ModeChoices[PAGE_1].push_back( choices[c] );
for( unsigned c=0; c<m_aModeChoices.size(); c++ )
{
if( (int)c < NUM_CHOICES_ON_PAGE_1 )
m_ModeChoices[PAGE_1].push_back( m_aModeChoices[c] );
else
m_ModeChoices[PAGE_2].push_back( choices[c] );
m_ModeChoices[PAGE_2].push_back( m_aModeChoices[c] );
}
for( int page=0; page<NUM_PAGES; page++ )
{
for( int choice=0; choice<m_ModeChoices[page].size(); choice++ )
for( unsigned choice=0; choice<m_ModeChoices[page].size(); choice++ )
{
CString sHeaderFile = ssprintf( "%s header %s", sThemeElementPrefix.GetString(), m_ModeChoices[page][choice].name );
CString sPictureFile = ssprintf( "%s picture %s", sThemeElementPrefix.GetString(), m_ModeChoices[page][choice].name );
CString sHeaderFile = ssprintf( "select difficulty header %s", m_ModeChoices[page][choice].name );
CString sPictureFile = ssprintf( "select difficulty picture %s", m_ModeChoices[page][choice].name );
m_sprPicture[page][choice].Load( THEME->GetPathTo("Graphics",sPictureFile) );
m_framePages.AddChild( &m_sprPicture[page][choice] );
@@ -86,17 +82,17 @@ void ModeSelectorMaxType2::Init( const vector<ModeChoice>& choices, CString sCla
}
m_sprMore[page].Load( THEME->GetPathTo("Graphics", ssprintf("%s more page%d",sThemeElementPrefix.GetString(),page+1) ) );
m_sprMore[page].Load( THEME->GetPathTo("Graphics", ssprintf("select difficulty more page%d",page+1) ) );
m_framePages.AddChild( &m_sprMore[page] );
m_sprExplanation[page].Load( THEME->GetPathTo("Graphics", ssprintf("%s explanation",sThemeElementPrefix.GetString())) );
m_sprExplanation[page].Load( THEME->GetPathTo("Graphics", "select difficulty explanation") );
m_sprExplanation[page].StopAnimating();
m_sprExplanation[page].SetState( page );
m_framePages.AddChild( &m_sprExplanation[page] );
}
for( int p=0; p<NUM_PLAYERS; p++ )
for( p=0; p<NUM_PLAYERS; p++ )
{
CLAMP( m_iChoiceOnPage[p], 0, (int)m_ModeChoices[0].size()-1 );
m_bChosen[p] = false;
@@ -129,15 +125,17 @@ void ModeSelectorMaxType2::Init( const vector<ModeChoice>& choices, CString sCla
m_soundDifficult.Load( ANNOUNCER->GetPathTo("select difficulty challenge") );
m_fLockInputTime = LOCK_INPUT_SECONDS;
TweenOnScreen();
}
void ModeSelectorMaxType2::Update( float fDelta )
void ScreenSelectMaxType2::Update( float fDelta )
{
ModeSelector::Update( fDelta );
ScreenSelect::Update( fDelta );
m_fLockInputTime = max( 0, m_fLockInputTime-fDelta );
}
void ModeSelectorMaxType2::HandleScreenMessage( const ScreenMessage SM )
void ScreenSelectMaxType2::HandleScreenMessage( const ScreenMessage SM )
{
switch( SM )
{
@@ -148,12 +146,16 @@ void ModeSelectorMaxType2::HandleScreenMessage( const ScreenMessage SM )
}
}
void ModeSelectorMaxType2::GetSelectedModeChoice( PlayerNumber pn, ModeChoice* pModeChoiceOut )
int ScreenSelectMaxType2::GetSelectionIndex( PlayerNumber pn )
{
*pModeChoiceOut = m_ModeChoices[m_CurrentPage][ m_iChoiceOnPage[pn] ]; // doesn't depend on pn
int index = 0;
for( int page=0; page<m_CurrentPage; page++ )
index += m_ModeChoices[page].size();
index += m_iChoiceOnPage[pn];
return index;
}
void ModeSelectorMaxType2::UpdateSelectableChoices()
void ScreenSelectMaxType2::UpdateSelectableChoices()
{
for( int page=0; page<NUM_PAGES; page++ )
{
@@ -163,7 +165,7 @@ void ModeSelectorMaxType2::UpdateSelectableChoices()
{
/* If the icon is text, use a dimmer diffuse, or we won't be
* able to see the glow. */
if( IsSelectable(m_ModeChoices[page][i]) )
if( GAMESTATE->IsPlayable(m_ModeChoices[page][i]) )
{
m_sprHeader[page][i].SetDiffuse( RageColor(1,1,1,1) );
m_sprPicture[page][i].SetDiffuse( RageColor(1,1,1,1) );
@@ -184,7 +186,7 @@ void ModeSelectorMaxType2::UpdateSelectableChoices()
}
}
void ModeSelectorMaxType2::MenuLeft( PlayerNumber pn )
void ScreenSelectMaxType2::MenuLeft( PlayerNumber pn )
{
if( m_fLockInputTime > 0 )
return;
@@ -200,7 +202,7 @@ void ModeSelectorMaxType2::MenuLeft( PlayerNumber pn )
}
void ModeSelectorMaxType2::MenuRight( PlayerNumber pn )
void ScreenSelectMaxType2::MenuRight( PlayerNumber pn )
{
if( m_fLockInputTime > 0 )
return;
@@ -215,7 +217,7 @@ void ModeSelectorMaxType2::MenuRight( PlayerNumber pn )
ChangeWithinPage( pn, m_iChoiceOnPage[pn]+1, false );
}
void ModeSelectorMaxType2::ChangePage( Page newPage )
void ScreenSelectMaxType2::ChangePage( Page newPage )
{
int p;
@@ -244,7 +246,7 @@ void ModeSelectorMaxType2::ChangePage( Page newPage )
m_framePages.SetTweenX( (float)newPage*-SCREEN_WIDTH );
}
void ModeSelectorMaxType2::ChangeWithinPage( PlayerNumber pn, int iNewChoice, bool bChangingPages )
void ScreenSelectMaxType2::ChangeWithinPage( PlayerNumber pn, int iNewChoice, bool bChangingPages )
{
for( int p=0; p<NUM_PLAYERS; p++ )
{
@@ -273,7 +275,7 @@ void ModeSelectorMaxType2::ChangeWithinPage( PlayerNumber pn, int iNewChoice, bo
m_soundChange.Play();
}
void ModeSelectorMaxType2::MenuStart( PlayerNumber pn )
void ScreenSelectMaxType2::MenuStart( PlayerNumber pn )
{
if( m_fLockInputTime > 0 )
return;
@@ -316,15 +318,15 @@ void ModeSelectorMaxType2::MenuStart( PlayerNumber pn )
if( GAMESTATE->IsPlayerEnabled((PlayerNumber)p) && m_bChosen[p] == false )
return;
}
this->SendScreenMessage( SM_BeginFadingOut, SLEEP_AFTER_CHOICE_SECONDS ); // tell our owner it's time to move on
this->SendScreenMessage( SM_AllDoneChoosing, SLEEP_AFTER_CHOICE_SECONDS ); // tell our owner it's time to move on
}
void ModeSelectorMaxType2::MenuBack( PlayerNumber pn )
void ScreenSelectMaxType2::MenuBack( PlayerNumber pn )
{
}
void ModeSelectorMaxType2::TweenOnScreen()
void ScreenSelectMaxType2::TweenOnScreen()
{
unsigned p;
@@ -363,7 +365,7 @@ void ModeSelectorMaxType2::TweenOnScreen()
}
}
void ModeSelectorMaxType2::TweenOffScreen()
void ScreenSelectMaxType2::TweenOffScreen()
{
const int page = m_CurrentPage;
@@ -383,7 +385,7 @@ void ModeSelectorMaxType2::TweenOffScreen()
for( unsigned c=0; c<m_ModeChoices[page].size(); c++ )
{
const float fPause = c*0.2f;
// const float fPause = c*0.2f;
// roll up
//m_sprPicture[page][c].FadeOff( fPause, "foldy bounce", 0.3f );
@@ -396,12 +398,12 @@ void ModeSelectorMaxType2::TweenOffScreen()
}
float ModeSelectorMaxType2::GetCursorX( PlayerNumber pn )
float ScreenSelectMaxType2::GetCursorX( PlayerNumber pn )
{
return m_sprPicture[m_CurrentPage][m_iChoiceOnPage[pn]].GetX() + CURSOR_OFFSET_X_FROM_PICTURE(pn);
}
float ModeSelectorMaxType2::GetCursorY( PlayerNumber pn )
float ScreenSelectMaxType2::GetCursorY( PlayerNumber pn )
{
return m_sprPicture[m_CurrentPage][m_iChoiceOnPage[pn]].GetY() + CURSOR_OFFSET_Y_FROM_PICTURE(pn);
}
@@ -1,8 +1,8 @@
#ifndef ModeSelectorMaxType2_H
#define ModeSelectorMaxType2_H
#ifndef ScreenSelectMaxType2_H
#define ScreenSelectMaxType2_H
/*
-----------------------------------------------------------------------------
Class: ModeSelectorMaxType2
Class: ScreenSelectMaxType2
Desc: Abstract class for a widget that selects a ModeChoice
@@ -12,25 +12,18 @@
*/
#include "ModeSelector.h"
#include "ScreenSelect.h"
#include "Sprite.h"
#include "BitmapText.h"
#include "RageSound.h"
#include "RandomSample.h"
#define MAX_CHOICES_PER_PAGE 15
#define MAX_CHOICES_PER_PAGE 10
class ModeSelectorMaxType2 : public ModeSelector
class ScreenSelectMaxType2 : public ScreenSelect
{
public:
enum Page { PAGE_1, PAGE_2, NUM_PAGES };
ModeSelectorMaxType2();
virtual ~ModeSelectorMaxType2();
virtual void Init( const vector<ModeChoice>& choices, CString sClassName, CString sThemeElementPrefix );
ScreenSelectMaxType2();
virtual void Update( float fDelta );
@@ -43,12 +36,14 @@ public:
virtual void TweenOffScreen();
virtual void TweenOnScreen();
virtual void GetSelectedModeChoice( PlayerNumber pn, ModeChoice* pModeChoiceOut );
virtual void UpdateSelectableChoices();
virtual void HandleScreenMessage( const ScreenMessage SM );
protected:
enum Page { PAGE_1, PAGE_2, NUM_PAGES };
virtual int GetSelectionIndex( PlayerNumber pn );
virtual void UpdateSelectableChoices();
float GetCursorX( PlayerNumber pn );
float GetCursorY( PlayerNumber pn );
void ChangeWithinPage( PlayerNumber pn, int iNewChoice, bool bChangingPages );
+2 -2
View File
@@ -1,6 +1,6 @@
#include "global.h"
/****************************************
ScreenEzSelectPlayer,cpp
ScreenSelectModeOld,cpp
Desc: See Header
Copyright (C):
Andrew Livy
@@ -247,7 +247,7 @@ void ScreenSelectMode::RefreshModeChoices()
{
int iNumSidesJoined = GAMESTATE->GetNumSidesJoined();
GAMEMAN->GetModesChoicesForGame( GAMESTATE->m_CurGame, m_apPossibleModeChoices );
// GAMEMAN->GetModesChoicesForGame( GAMESTATE->m_CurGame, m_apPossibleModeChoices ); // FIXME
ASSERT( !m_apPossibleModeChoices.empty() );
int i;
+3 -3
View File
@@ -23,7 +23,7 @@ Andrew Livy
/* Class Definition */
const int MAX_MODE_CHOICES = 10;
#define MAX_MODE_CHOICES2 10
class ScreenSelectMode : public Screen
@@ -56,14 +56,14 @@ protected:
Sprite m_ChoiceListHighlight;
Sprite m_Guide;
Sprite m_Infotext[MAX_MODE_CHOICES];
Sprite m_Infotext[MAX_MODE_CHOICES2];
vector<ModeChoice*> m_apPossibleModeChoices;
ScrollingList m_ScrollingList;
void RefreshModeChoices();
BGAnimation m_BGAnimations[MAX_MODE_CHOICES];
BGAnimation m_BGAnimations[MAX_MODE_CHOICES2];
MenuElements m_Menu;
RageSound m_soundSelect;
-220
View File
@@ -1,220 +0,0 @@
#include "global.h"
/*
-----------------------------------------------------------------------------
Class: ScreenSelectStyle
Desc: See Header.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "ScreenSelectStyle.h"
#include "ScreenManager.h"
#include "PrefsManager.h"
#include "RageSoundManager.h"
#include "GameConstantsAndTypes.h"
#include "PrefsManager.h"
#include "GameManager.h"
#include "RageLog.h"
#include "AnnouncerManager.h"
#include "GameState.h"
#include "GameConstantsAndTypes.h"
#include "ThemeManager.h"
#include "ModeSelector.h"
#define SELECTOR THEME->GetMetric ("ScreenSelectStyle","Selector")
#define HELP_TEXT THEME->GetMetric ("ScreenSelectStyle","HelpText")
#define TIMER_SECONDS THEME->GetMetricI("ScreenSelectStyle","TimerSeconds")
#define NEXT_SCREEN THEME->GetMetric ("ScreenSelectStyle","NextScreen")
ScreenSelectStyle::ScreenSelectStyle()
{
LOG->Trace( "ScreenSelectStyle::ScreenSelectStyle()" );
GAMESTATE->m_bPlayersCanJoin = true;
vector<ModeChoice> aModeChoices;
vector<Style> aStyles;
GAMEMAN->GetStylesForGame( GAMESTATE->m_CurGame, aStyles );
ASSERT( !aStyles.empty() ); // every game should have at least one Style, or else why have the Game? :-)
for( unsigned s=0; s<aStyles.size(); s++ )
{
Style style = aStyles[s];
const StyleDef* pStyleDef = GAMEMAN->GetStyleDefForStyle(aStyles[s]);
int iNumSidesJoinedToPlay;
switch( pStyleDef->m_StyleType )
{
case StyleDef::ONE_PLAYER_ONE_CREDIT: iNumSidesJoinedToPlay = 1; break;
case StyleDef::TWO_PLAYERS_TWO_CREDITS: iNumSidesJoinedToPlay = 2; break;
case StyleDef::ONE_PLAYER_TWO_CREDITS: iNumSidesJoinedToPlay = 2; break;
default: ASSERT(0); iNumSidesJoinedToPlay = 1;
}
ModeChoice mc = {
GAMESTATE->m_CurGame,
PLAY_MODE_INVALID,
style,
DIFFICULTY_INVALID,
"",
iNumSidesJoinedToPlay
};
strcpy( mc.name, pStyleDef->m_szName );
aModeChoices.push_back( mc );
}
m_pSelector = ModeSelector::Create( SELECTOR );
m_pSelector->Init( aModeChoices, "ScreenSelectStyle", "select style" );
this->AddChild( m_pSelector );
m_Menu.Load(
THEME->GetPathTo("BGAnimations","select style"),
THEME->GetPathTo("Graphics","select style top edge"),
HELP_TEXT, false, true, TIMER_SECONDS
);
this->AddChild( &m_Menu );
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select style intro") );
SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","select style music") );
m_Menu.TweenOnScreenFromBlack( SM_None );
}
ScreenSelectStyle::~ScreenSelectStyle()
{
LOG->Trace( "ScreenSelectStyle::~ScreenSelectStyle()" );
}
void ScreenSelectStyle::Update( float fDelta )
{
Screen::Update( fDelta );
}
void ScreenSelectStyle::DrawPrimitives()
{
m_Menu.DrawBottomLayer();
Screen::DrawPrimitives();
m_Menu.DrawTopLayer();
}
void ScreenSelectStyle::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
{
LOG->Trace( "ScreenSelectStyle::Input()" );
if( m_Menu.IsClosing() )
return;
Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); // default input handler
}
void ScreenSelectStyle::HandleScreenMessage( const ScreenMessage SM )
{
switch( SM )
{
case SM_BeginFadingOut: // sent by our ModeSelector
ModeChoice mc;
m_pSelector->GetSelectedModeChoice( GAMESTATE->m_MasterPlayerNumber, &mc );
GAMESTATE->ApplyModeChoice( &mc, GAMESTATE->m_MasterPlayerNumber );
GAMESTATE->m_bPlayersCanJoin = false;
SCREENMAN->RefreshCreditsMessages();
m_Menu.StopTimer();
m_pSelector->TweenOffScreen();
m_Menu.TweenOffScreenToMenu( SM_GoToNextScreen );
break;
case SM_MenuTimer:
{
for( int p=0; p<NUM_PLAYERS; p++ )
if( GAMESTATE->IsPlayerEnabled(p) )
MenuStart( (PlayerNumber)p );
}
break;
case SM_GoToPrevScreen:
SOUNDMAN->StopMusic();
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
break;
case SM_GoToNextScreen:
SCREENMAN->SetNewScreen( NEXT_SCREEN );
break;
}
}
void ScreenSelectStyle::MenuLeft( PlayerNumber pn )
{
m_pSelector->MenuLeft( pn );
}
void ScreenSelectStyle::MenuRight( PlayerNumber pn )
{
m_pSelector->MenuRight( pn );
}
void ScreenSelectStyle::MenuUp( PlayerNumber pn )
{
m_pSelector->MenuUp( pn );
}
void ScreenSelectStyle::MenuDown( PlayerNumber pn )
{
m_pSelector->MenuDown( pn );
}
void ScreenSelectStyle::MenuStart( PlayerNumber pn )
{
if( pn!=PLAYER_INVALID && !GAMESTATE->m_bSideIsJoined[pn] )
{
/* I think JP should allow playing two-pad singleplayer modes (doubles),
* but not two-pad two-player modes (battle). (Battle mode isn't "joint".)
* That means we should leave player-entry logic alone and simply enable
* couples mode if JP is on and only one person has clicked in. (However,
* that means we'll display couples even if we don't really know if we have
* a second pad, which is a little annoying.)
*
* Also, credit deduction should be handled in StepMania.cpp (along with
* the coin logic) using GAMESTATE->m_bPlayersCanJoin, since there
* are other screens you can join (eg ScreenCaution). -glenn */
if( PREFSMAN->m_CoinMode == PrefsManager::COIN_PAY )
{
if( !PREFSMAN->m_bJointPremium )
{
if( GAMESTATE->m_iCoins < PREFSMAN->m_iCoinsPerCredit )
{
/* Joint Premium is NOT enabled, and we do not have enough credits */
return;
}
/* Joint Premium is NOT enabled, but we have enough credits. Pay up! */
GAMESTATE->m_iCoins -= PREFSMAN->m_iCoinsPerCredit;
}
}
/* If credits had to be used, it's already taken care of.. add the player */
SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","menu start") );
GAMESTATE->m_bSideIsJoined[pn] = true;
SCREENMAN->RefreshCreditsMessages();
m_pSelector->UpdateSelectableChoices();
}
else
m_pSelector->MenuStart( pn );
}
void ScreenSelectStyle::MenuBack( PlayerNumber pn )
{
SOUNDMAN->StopMusic();
m_Menu.TweenOffScreenToBlack( SM_GoToPrevScreen, true );
}
-44
View File
@@ -1,44 +0,0 @@
#ifndef ScreenSelectStyle_H
#define ScreenSelectStyle_H
/*
-----------------------------------------------------------------------------
Class: ScreenSelectStyle
Desc: Base class for Style, Difficulty, and Mode selection screens.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "Screen.h"
#include "MenuElements.h"
class ModeSelector;
class ScreenSelectStyle : public Screen
{
public:
ScreenSelectStyle();
virtual ~ScreenSelectStyle();
virtual void Update( float fDelta );
virtual void DrawPrimitives();
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
virtual void HandleScreenMessage( const ScreenMessage SM );
virtual void MenuLeft( PlayerNumber pn );
virtual void MenuRight( PlayerNumber pn );
virtual void MenuUp( PlayerNumber pn );
virtual void MenuDown( PlayerNumber pn );
virtual void MenuStart( PlayerNumber pn );
virtual void MenuBack( PlayerNumber pn );
private:
MenuElements m_Menu;
ModeSelector* m_pSelector;
};
#endif
+30 -42
View File
@@ -60,7 +60,7 @@ IntDir=.\../Release6
TargetDir=\stepmania\stepmania
TargetName=StepMania
SOURCE="$(InputPath)"
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi
# End Special Build Tool
@@ -95,7 +95,7 @@ IntDir=.\../Debug6
TargetDir=\stepmania\stepmania
TargetName=StepMania-debug
SOURCE="$(InputPath)"
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi
# End Special Build Tool
@@ -371,6 +371,10 @@ SOURCE=.\Inventory.h
# End Source File
# Begin Source File
SOURCE=.\ModeChoice.h
# End Source File
# Begin Source File
SOURCE=.\NoteData.cpp
# End Source File
# Begin Source File
@@ -1104,30 +1108,6 @@ SOURCE=.\MenuTimer.h
# End Source File
# Begin Source File
SOURCE=.\ModeSelector.cpp
# End Source File
# Begin Source File
SOURCE=.\ModeSelector.h
# End Source File
# Begin Source File
SOURCE=.\ModeSelectorMaxType1.cpp
# End Source File
# Begin Source File
SOURCE=.\ModeSelectorMaxType1.h
# End Source File
# Begin Source File
SOURCE=.\ModeSelectorMaxType2.cpp
# End Source File
# Begin Source File
SOURCE=.\ModeSelectorMaxType2.h
# End Source File
# Begin Source File
SOURCE=.\MusicBannerWheel.cpp
# End Source File
# Begin Source File
@@ -1777,6 +1757,14 @@ SOURCE=.\ScreenSandbox.h
# End Source File
# Begin Source File
SOURCE=.\ScreenSelect.cpp
# End Source File
# Begin Source File
SOURCE=.\ScreenSelect.h
# End Source File
# Begin Source File
SOURCE=.\ScreenSelectCourse.cpp
# End Source File
# Begin Source File
@@ -1785,14 +1773,6 @@ SOURCE=.\ScreenSelectCourse.h
# End Source File
# Begin Source File
SOURCE=.\ScreenSelectDifficulty.cpp
# End Source File
# Begin Source File
SOURCE=.\ScreenSelectDifficulty.h
# End Source File
# Begin Source File
SOURCE=.\ScreenSelectDifficultyEX.cpp
# End Source File
# Begin Source File
@@ -1817,6 +1797,22 @@ SOURCE=.\ScreenSelectGroup.h
# End Source File
# Begin Source File
SOURCE=.\ScreenSelectMaxType1.cpp
# End Source File
# Begin Source File
SOURCE=.\ScreenSelectMaxType1.h
# End Source File
# Begin Source File
SOURCE=.\ScreenSelectMaxType2.cpp
# End Source File
# Begin Source File
SOURCE=.\ScreenSelectMaxType2.h
# End Source File
# Begin Source File
SOURCE=.\ScreenSelectMode.cpp
# End Source File
# Begin Source File
@@ -1833,14 +1829,6 @@ SOURCE=.\ScreenSelectMusic.h
# End Source File
# Begin Source File
SOURCE=.\ScreenSelectStyle.cpp
# End Source File
# Begin Source File
SOURCE=.\ScreenSelectStyle.h
# End Source File
# Begin Source File
SOURCE=.\ScreenSelectStyle5th.cpp
# End Source File
# Begin Source File
+18 -12
View File
@@ -375,18 +375,18 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
<File
RelativePath="ScreenSandbox.h">
</File>
<File
RelativePath="ScreenSelect.cpp">
</File>
<File
RelativePath="ScreenSelect.h">
</File>
<File
RelativePath="ScreenSelectCourse.cpp">
</File>
<File
RelativePath="ScreenSelectCourse.h">
</File>
<File
RelativePath="ScreenSelectDifficulty.cpp">
</File>
<File
RelativePath="ScreenSelectDifficulty.h">
</File>
<File
RelativePath="ScreenSelectDifficultyEX.cpp">
</File>
@@ -405,6 +405,18 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
<File
RelativePath="ScreenSelectGroup.h">
</File>
<File
RelativePath="ScreenSelectMaxType1.cpp">
</File>
<File
RelativePath="ScreenSelectMaxType1.h">
</File>
<File
RelativePath="ScreenSelectMaxType2.cpp">
</File>
<File
RelativePath="ScreenSelectMaxType2.h">
</File>
<File
RelativePath="ScreenSelectMode.cpp">
</File>
@@ -417,12 +429,6 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
<File
RelativePath="ScreenSelectMusic.h">
</File>
<File
RelativePath="ScreenSelectStyle.cpp">
</File>
<File
RelativePath="ScreenSelectStyle.h">
</File>
<File
RelativePath="ScreenSelectStyle5th.cpp">
</File>