move player positions from Style into metrics

This commit is contained in:
Chris Danford
2004-11-07 05:49:06 +00:00
parent f61f53cdc2
commit b8259d7af9
13 changed files with 133 additions and 144 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 59 KiB

+34 -22
View File
@@ -9,8 +9,8 @@ DefaultCpuModifiers=
JoinPauseSeconds=0.8
DifficultiesToShow=beginner,easy,medium,hard,challenge
CourseDifficultiesToShow=easy,regular,difficult
ScreenWidth=640
ScreenHeight=480
ScreenWidth=720
ScreenHeight=448
[ModeSwitcher]
PrevModeX=-200
@@ -1135,6 +1135,12 @@ SongPositionMeterX=
SongPositionMeterY=
SongPositionMeterOnCommand=hidden,1
SongPositionMeterOffCommand=
PlayerP1OnePlayerOneSideX=SCREEN_CENTER_X-160
PlayerP2OnePlayerOneSideX=SCREEN_CENTER_X+160
PlayerP1TwoPlayersTwoSidesX=SCREEN_CENTER_X-160
PlayerP2TwoPlayersTwoSidesX=SCREEN_CENTER_X+160
PlayerP1OnePlayerTwoSidesX=SCREEN_CENTER_X
PlayerP2OnePlayerTwoSidesX=SCREEN_CENTER_X
[ScreenGameplayExtra]
Class=ScreenGameplay
@@ -3021,9 +3027,9 @@ LabelsHAlign=2 // 0,1,2 = left,center,right
ItemsZoom=0.5
ItemsStartX=SCREEN_CENTER_X-160
ItemsEndX=SCREEN_CENTER_X+280
ItemsGapX=SCREEN_CENTER_X-306
ItemsGapX=14
ItemsStartY=SCREEN_CENTER_Y-152
ItemsSpacingY=240-206
ItemsSpacingY=34
ExplanationP1X=SCREEN_CENTER_X-250
ExplanationP1Y=SCREEN_CENTER_Y+172
ExplanationP2X=SCREEN_CENTER_X+250
@@ -3050,8 +3056,8 @@ PlayerNameP2X=
PlayerNameP2Y=
PlayerNameP2OnCommand=hidden,1
PlayerNameP2OffCommand=
PageX=SCREEN_CENTER_X+0
PageY=SCREEN_CENTER_Y+0
PageX=SCREEN_CENTER_X
PageY=SCREEN_CENTER_Y
PageOnCommand=
LineHighlightOnCommand=
LineHighlightChangeCommand=
@@ -3061,8 +3067,8 @@ ColorNotSelected=0.5,0.5,0.5,1 // grayed
NumShownItems=10
ShowScrollBar=0
ShowBpmInSpeedTitle=0
FrameOnCommand=addx,-SCREEN_WIDTH;decelerate,0.3;addx,+640
FrameOffCommand=accelerate,0.3;addx,+640
FrameOnCommand=addx,-SCREEN_WIDTH;decelerate,0.3;addx,SCREEN_WIDTH
FrameOffCommand=accelerate,0.3;addx,SCREEN_WIDTH
SeparateExitRow=0
MoreX=
MoreY=
@@ -3127,10 +3133,10 @@ ExtraColor=1.0,0.0,0.0,1.0 // red
ExtraColorMeter=10
[Background]
LeftEdge=20
TopEdge=20
RightEdge=620
BottomEdge=460
LeftEdge=SCREEN_LEFT+20
TopEdge=SCREEN_TOP+20
RightEdge=SCREEN_RIGHT-20
BottomEdge=SCREEN_BOTTOM-20
BlinkDangerAll=1
DangerAllIsOpaque=1
BrightnessFadeCommand=
@@ -3185,26 +3191,26 @@ FullComboBrokenCommand=
ShowMissCombo=0
[Player]
ReceptorArrowsYStandard=96
ReceptorArrowsYReverse=384
ReceptorArrowsYStandard=-144
ReceptorArrowsYReverse=144
ReceptorNoSinkScoreCutoff=4
JudgmentXOffsetOneSideP1=0
JudgmentXOffsetOneSideP2=0
JudgmentXOffsetBothSides=0
JudgmentY=SCREEN_CENTER_Y-30
JudgmentYReverse=270
JudgmentY=-30
JudgmentYReverse=30
ComboXOffsetOneSideP1=0
ComboXOffsetOneSideP2=0
ComboXOffsetBothSides=0
ComboY=SCREEN_CENTER_Y+30
ComboYReverse=210
ComboY=30
ComboYReverse=-30
AttackDisplayXOffsetOneSideP1=0
AttackDisplayXOffsetOneSideP2=0
AttackDisplayXOffsetBothSides=0
AttackDisplayY=SCREEN_CENTER_Y-70
AttackDisplayYReverse=310
HoldJudgmentYStandard=150
HoldJudgmentYReverse=330
AttackDisplayY=-70
AttackDisplayYReverse=70
HoldJudgmentYStandard=-90
HoldJudgmentYReverse=90
BrightGhostComboThreshold=100
StartDrawingAtPixels=-60
StopDrawingAtPixels=350
@@ -3825,6 +3831,12 @@ MaxRankingNameLength=4
StyleIcon=1
MemoryCardIcons=1
NextScreen=ScreenBranchEnding
PlayerP1OnePlayerOneSideX=SCREEN_CENTER_X-160
PlayerP2OnePlayerOneSideX=SCREEN_CENTER_X+160
PlayerP1TwoPlayersTwoSidesX=SCREEN_CENTER_X-160
PlayerP2TwoPlayersTwoSidesX=SCREEN_CENTER_X+160
PlayerP1OnePlayerTwoSidesX=SCREEN_CENTER_X
PlayerP2OnePlayerTwoSidesX=SCREEN_CENTER_X
[ScreenBranchEnding]
Class=ScreenBranch
+8 -8
View File
@@ -29,16 +29,16 @@ MenuInput Game::GameInputToMenuInput( GameInput GameI ) const
{
PlayerNumber pn;
Style::StyleType type = Style::TWO_PLAYERS_TWO_CREDITS;
StyleType type = TWO_PLAYERS_TWO_SIDES;
if( GAMESTATE->GetCurrentStyle() )
type = GAMESTATE->GetCurrentStyle()->m_StyleType;
switch( type )
{
case Style::ONE_PLAYER_ONE_CREDIT:
case Style::TWO_PLAYERS_TWO_CREDITS:
case ONE_PLAYER_ONE_SIDE:
case TWO_PLAYERS_TWO_SIDES:
pn = (PlayerNumber)GameI.controller;
break;
case Style::ONE_PLAYER_TWO_CREDITS:
case ONE_PLAYER_TWO_SIDES:
pn = GAMESTATE->m_MasterPlayerNumber;
break;
default:
@@ -69,19 +69,19 @@ void Game::MenuInputToGameInput( MenuInput MenuI, GameInput GameIout[4] ) const
GameIout[3].MakeInvalid();
GameController controller[2];
Style::StyleType type = Style::TWO_PLAYERS_TWO_CREDITS;
StyleType type = TWO_PLAYERS_TWO_SIDES;
if( GAMESTATE->GetCurrentStyle() )
type = GAMESTATE->GetCurrentStyle()->m_StyleType;
int iNumSidesUsing = 1;
switch( type )
{
case Style::ONE_PLAYER_ONE_CREDIT:
case Style::TWO_PLAYERS_TWO_CREDITS:
case ONE_PLAYER_ONE_SIDE:
case TWO_PLAYERS_TWO_SIDES:
controller[0] = (GameController)MenuI.player;
iNumSidesUsing = 1;
break;
case Style::ONE_PLAYER_TWO_CREDITS:
case ONE_PLAYER_TWO_SIDES:
controller[0] = GAME_CONTROLLER_1;
controller[1] = GAME_CONTROLLER_2;
iNumSidesUsing = 2;
+8
View File
@@ -219,6 +219,14 @@ bool DisplayBpms::IsMystery()
return false;
}
static const CString StyleTypeNames[NUM_STYLE_TYPES] = {
"OnePlayerOneSide",
"TwoPlayersTwoSides",
"OnePlayerTwoSides",
};
XToString( StyleType );
StringToX( StyleType );
/*
* (c) 2001-2004 Chris Danford
* All rights reserved.
+11
View File
@@ -323,6 +323,17 @@ struct DisplayBpms
vector<float> vfBpms;
};
enum StyleType
{
ONE_PLAYER_ONE_SIDE, // e.g. single
TWO_PLAYERS_TWO_SIDES, // e.g. versus
ONE_PLAYER_TWO_SIDES, // e.g. double
NUM_STYLE_TYPES
};
const CString& StyleTypeToString( StyleType s );
StyleType StringToStyleType( const CString& s );
#endif
/*
+39 -78
View File
@@ -1127,8 +1127,7 @@ Style g_Styles[] =
true, // m_bUsedForHowToPlay
"single", // m_szName
STEPS_TYPE_DANCE_SINGLE, // m_StepsType
Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType
{ 160, 480 }, // m_iCenterX
ONE_PLAYER_ONE_SIDE, // m_StyleType
4, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -1158,8 +1157,7 @@ Style g_Styles[] =
false, // m_bUsedForHowToPlay
"versus", // m_szName
STEPS_TYPE_DANCE_SINGLE, // m_StepsType
Style::TWO_PLAYERS_TWO_CREDITS, // m_StyleType
{ 160, 480 }, // m_iCenterX
TWO_PLAYERS_TWO_SIDES, // m_StyleType
4, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -1189,8 +1187,7 @@ Style g_Styles[] =
false, // m_bUsedForHowToPlay
"double", // m_szName
STEPS_TYPE_DANCE_DOUBLE, // m_StepsType
Style::ONE_PLAYER_TWO_CREDITS, // m_StyleType
{ 320, 320 }, // m_iCenterX
ONE_PLAYER_TWO_SIDES, // m_StyleType
8, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -1228,8 +1225,7 @@ Style g_Styles[] =
false, // m_bUsedForHowToPlay
"couple", // m_szName
STEPS_TYPE_DANCE_COUPLE, // m_StepsType
Style::TWO_PLAYERS_TWO_CREDITS, // m_StyleType
{ 160, 480 }, // m_iCenterX
TWO_PLAYERS_TWO_SIDES, // m_StyleType
4, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -1259,8 +1255,7 @@ Style g_Styles[] =
false, // m_bUsedForHowToPlay
"solo", // m_szName
STEPS_TYPE_DANCE_SOLO, // m_StepsType
Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType
{ 320, 320 }, // m_iCenterX
ONE_PLAYER_ONE_SIDE, // m_StyleType
6, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -1294,8 +1289,7 @@ Style g_Styles[] =
false, // m_bUsedForHowToPlay
"couple-edit", // m_szName
STEPS_TYPE_DANCE_COUPLE, // m_StepsType
Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType
{ 160, 480 }, // m_iCenterX
ONE_PLAYER_ONE_SIDE, // m_StyleType
8, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -1328,8 +1322,7 @@ Style g_Styles[] =
/* { // STYLE_DANCE_SOLO_VERSUS
"dance-solo-versus", // m_szName
STEPS_TYPE_DANCE_SOLO, // m_StepsType
Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType
{ 160, 480 }, // m_iCenterX
ONE_PLAYER_ONE_CREDIT, // m_StyleType
6, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -1363,8 +1356,7 @@ Style g_Styles[] =
true, // m_bUsedForHowToPlay
"single", // m_szName
STEPS_TYPE_PUMP_SINGLE, // m_StepsType
Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType
{ 160, 480 }, // m_iCenterX
ONE_PLAYER_ONE_SIDE, // m_StyleType
5, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -1396,8 +1388,7 @@ Style g_Styles[] =
false, // m_bUsedForHowToPlay
"versus", // m_szName
STEPS_TYPE_PUMP_SINGLE, // m_StepsType
Style::TWO_PLAYERS_TWO_CREDITS, // m_StyleType
{ 160, 480 }, // m_iCenterX
TWO_PLAYERS_TWO_SIDES, // m_StyleType
5, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -1429,8 +1420,7 @@ Style g_Styles[] =
false, // m_bUsedForHowToPlay
"halfdouble", // m_szName
STEPS_TYPE_PUMP_HALFDOUBLE, // m_StepsType
Style::ONE_PLAYER_TWO_CREDITS, // m_StyleType
{ 320, 320 }, // m_iCenterX
ONE_PLAYER_TWO_SIDES, // m_StyleType
6, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -1464,8 +1454,7 @@ Style g_Styles[] =
false, // m_bUsedForHowToPlay
"double", // m_szName
STEPS_TYPE_PUMP_DOUBLE, // m_StepsType
Style::ONE_PLAYER_TWO_CREDITS, // m_StyleType
{ 320, 320 }, // m_iCenterX
ONE_PLAYER_TWO_SIDES, // m_StyleType
10, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -1507,8 +1496,7 @@ Style g_Styles[] =
false, // m_bUsedForHowToPlay
"couple", // m_szName
STEPS_TYPE_PUMP_COUPLE, // m_StepsType
Style::TWO_PLAYERS_TWO_CREDITS, // m_StyleType
{ 160, 480 }, // m_iCenterX
TWO_PLAYERS_TWO_SIDES, // m_StyleType
5, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -1540,8 +1528,7 @@ Style g_Styles[] =
false, // m_bUsedForHowToPlay
"couple-edit", // m_szName
STEPS_TYPE_PUMP_COUPLE, // m_StepsType
Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType
{ 160, 480 }, // m_iCenterX
ONE_PLAYER_ONE_SIDE, // m_StyleType
10, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -1578,8 +1565,7 @@ Style g_Styles[] =
true, // m_bUsedForHowToPlay
"single", // m_szName
STEPS_TYPE_EZ2_SINGLE, // m_StepsType
Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType
{ 160, 480 }, // m_iCenterX
ONE_PLAYER_ONE_SIDE, // m_StyleType
5, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -1611,8 +1597,7 @@ Style g_Styles[] =
false, // m_bUsedForHowToPlay
"real", // m_szName
STEPS_TYPE_EZ2_REAL, // m_StepsType
Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType
{ 160, 480 }, // m_iCenterX
ONE_PLAYER_ONE_SIDE, // m_StyleType
7, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -1648,8 +1633,7 @@ Style g_Styles[] =
false, // m_bUsedForHowToPlay
"versus", // m_szName
STEPS_TYPE_EZ2_SINGLE, // m_StepsType
Style::TWO_PLAYERS_TWO_CREDITS, // m_StyleType
{ 160, 480 }, // m_iCenterX
TWO_PLAYERS_TWO_SIDES, // m_StyleType
5, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -1681,8 +1665,7 @@ Style g_Styles[] =
false, // m_bUsedForHowToPlay
"versusReal", // m_szName
STEPS_TYPE_EZ2_REAL, // m_StepsType
Style::TWO_PLAYERS_TWO_CREDITS, // m_StyleType
{ 160, 480 }, // m_iCenterX
TWO_PLAYERS_TWO_SIDES, // m_StyleType
7, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -1718,8 +1701,7 @@ Style g_Styles[] =
false, // m_bUsedForHowToPlay
"double", // m_szName
STEPS_TYPE_EZ2_DOUBLE, // m_StepsType
Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType
{ 320, 320 }, // m_iCenterX
ONE_PLAYER_ONE_SIDE, // m_StyleType
10, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -1761,8 +1743,7 @@ Style g_Styles[] =
true, // m_bUsedForHowToPlay
"single", // m_szName
STEPS_TYPE_PARA_SINGLE, // m_StepsType
Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType
{ 320, 320 }, // m_iCenterX
ONE_PLAYER_ONE_SIDE, // m_StyleType
5, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -1794,8 +1775,7 @@ Style g_Styles[] =
true, // m_bUsedForHowToPlay
"versus", // m_szName
STEPS_TYPE_PARA_VERSUS, // m_StepsType
Style::TWO_PLAYERS_TWO_CREDITS, // m_StyleType
{ 160, 480 }, // m_iCenterX
TWO_PLAYERS_TWO_SIDES, // m_StyleType
5, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -1827,8 +1807,7 @@ Style g_Styles[] =
true, // m_bUsedForHowToPlay
"single", // m_szName
STEPS_TYPE_DS3DDX_SINGLE, // m_StepsType
Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType
{ 160, 480 }, // m_iCenterX
ONE_PLAYER_ONE_SIDE, // m_StyleType
8, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -1866,8 +1845,7 @@ Style g_Styles[] =
true, // m_bUsedForHowToPlay
"single5", // m_szName
STEPS_TYPE_BM_SINGLE5, // m_StepsType
Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType
{ 160, 480 }, // m_iCenterX
ONE_PLAYER_ONE_SIDE, // m_StyleType
6, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -1901,8 +1879,7 @@ Style g_Styles[] =
false, // m_bUsedForHowToPlay
"double5", // m_szName
STEPS_TYPE_BM_DOUBLE5, // m_StepsType
Style::ONE_PLAYER_TWO_CREDITS, // m_StyleType
{ 320, 320 }, // m_iCenterX
ONE_PLAYER_TWO_SIDES, // m_StyleType
12, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -1948,8 +1925,7 @@ Style g_Styles[] =
false, // m_bUsedForHowToPlay
"single7", // m_szName
STEPS_TYPE_BM_SINGLE7, // m_StepsType
Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType
{ 160, 480 }, // m_iCenterX
ONE_PLAYER_ONE_SIDE, // m_StyleType
8, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -1987,8 +1963,7 @@ Style g_Styles[] =
false, // m_bUsedForHowToPlay
"double7", // m_szName
STEPS_TYPE_BM_DOUBLE7, // m_StepsType
Style::ONE_PLAYER_TWO_CREDITS, // m_StyleType
{ 320, 320 }, // m_iCenterX
ONE_PLAYER_TWO_SIDES, // m_StyleType
16, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -2042,8 +2017,7 @@ Style g_Styles[] =
true, // m_bUsedForHowToPlay
"single", // m_szName
STEPS_TYPE_MANIAX_SINGLE, // m_StepsType
Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType
{ 160, 480 }, // m_iCenterX
ONE_PLAYER_ONE_SIDE, // m_StyleType
4, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -2073,8 +2047,7 @@ Style g_Styles[] =
false, // m_bUsedForHowToPlay
"versus", // m_szName
STEPS_TYPE_MANIAX_SINGLE, // m_StepsType
Style::TWO_PLAYERS_TWO_CREDITS, // m_StyleType
{ 160, 480 }, // m_iCenterX
TWO_PLAYERS_TWO_SIDES, // m_StyleType
4, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -2104,8 +2077,7 @@ Style g_Styles[] =
false, // m_bUsedForHowToPlay
"double", // m_szName
STEPS_TYPE_MANIAX_DOUBLE, // m_StepsType
Style::ONE_PLAYER_TWO_CREDITS, // m_StyleType
{ 320, 320 }, // m_iCenterX
ONE_PLAYER_TWO_SIDES, // m_StyleType
8, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -2143,8 +2115,7 @@ Style g_Styles[] =
false, // m_bUsedForHowToPlay
"single4", // m_szName
STEPS_TYPE_TECHNO_SINGLE4, // m_StepsType
Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType
{ 112, 528 }, // m_iCenterX
ONE_PLAYER_ONE_SIDE, // m_StyleType
4, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -2174,8 +2145,7 @@ Style g_Styles[] =
false, // m_bUsedForHowToPlay
"single5", // m_szName
STEPS_TYPE_TECHNO_SINGLE5, // m_StepsType
Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType
{ 140, 500 }, // m_iCenterX
ONE_PLAYER_ONE_SIDE, // m_StyleType
5, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -2207,8 +2177,7 @@ Style g_Styles[] =
true, // m_bUsedForHowToPlay
"single8", // m_szName
STEPS_TYPE_TECHNO_SINGLE8, // m_StepsType
Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType
{ 224, 416 }, // m_iCenterX
ONE_PLAYER_ONE_SIDE, // m_StyleType
8, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -2246,8 +2215,7 @@ Style g_Styles[] =
false, // m_bUsedForHowToPlay
"versus4", // m_szName
STEPS_TYPE_TECHNO_SINGLE4, // m_StepsType
Style::TWO_PLAYERS_TWO_CREDITS, // m_StyleType
{ 112, 528 }, // m_iCenterX
TWO_PLAYERS_TWO_SIDES, // m_StyleType
4, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -2277,8 +2245,7 @@ Style g_Styles[] =
false, // m_bUsedForHowToPlay
"versus5", // m_szName
STEPS_TYPE_TECHNO_SINGLE5, // m_StepsType
Style::TWO_PLAYERS_TWO_CREDITS, // m_StyleType
{ 140, 500 }, // m_iCenterX
TWO_PLAYERS_TWO_SIDES, // m_StyleType
5, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -2310,8 +2277,7 @@ Style g_Styles[] =
false, // m_bUsedForHowToPlay
"versus8", // m_szName
STEPS_TYPE_TECHNO_SINGLE8, // m_StepsType
Style::TWO_PLAYERS_TWO_CREDITS, // m_StyleType
{ 132, 508 }, // m_iCenterX
TWO_PLAYERS_TWO_SIDES, // m_StyleType
8, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -2349,8 +2315,7 @@ Style g_Styles[] =
false, // m_bUsedForHowToPlay
"double4", // m_szName
STEPS_TYPE_TECHNO_DOUBLE4, // m_StepsType
Style::ONE_PLAYER_TWO_CREDITS, // m_StyleType
{ 320, 320 }, // m_iCenterX
ONE_PLAYER_TWO_SIDES, // m_StyleType
8, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -2388,8 +2353,7 @@ Style g_Styles[] =
false, // m_bUsedForHowToPlay
"double5", // m_szName
STEPS_TYPE_TECHNO_DOUBLE5, // m_StepsType
Style::ONE_PLAYER_TWO_CREDITS, // m_StyleType
{ 320, 320 }, // m_iCenterX
ONE_PLAYER_TWO_SIDES, // m_StyleType
10, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -2431,8 +2395,7 @@ Style g_Styles[] =
false, // m_bUsedForHowToPlay
"pnm-five", // m_szName
STEPS_TYPE_PNM_FIVE, // m_StepsType
Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType
{ 320, 320 }, // m_iCenterX
ONE_PLAYER_ONE_SIDE, // m_StyleType
5, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -2464,8 +2427,7 @@ Style g_Styles[] =
true, // m_bUsedForHowToPlay
"pnm-nine", // m_szName
STEPS_TYPE_PNM_NINE, // m_StepsType
Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType
{ 320, 320 }, // m_iCenterX
ONE_PLAYER_ONE_SIDE, // m_StyleType
9, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -2505,8 +2467,7 @@ Style g_Styles[] =
false, // m_bUsedForHowToPlay
"cabinet", // m_szName
STEPS_TYPE_LIGHTS_CABINET, // m_StepsType
Style::ONE_PLAYER_ONE_CREDIT, // m_StyleType
{ 320, 320 }, // m_iCenterX
ONE_PLAYER_ONE_SIDE, // m_StyleType
NUM_CABINET_LIGHTS, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
+4 -4
View File
@@ -868,7 +868,7 @@ int GameState::GetNumPlayersEnabled() const
bool GameState::PlayerUsingBothSides() const
{
return this->GetCurrentStyle()->m_StyleType==Style::ONE_PLAYER_TWO_CREDITS;
return this->GetCurrentStyle()->m_StyleType == ONE_PLAYER_TWO_SIDES;
}
bool GameState::IsHumanPlayer( PlayerNumber pn ) const
@@ -883,10 +883,10 @@ bool GameState::IsHumanPlayer( PlayerNumber pn ) const
switch( GetCurrentStyle()->m_StyleType )
{
case Style::TWO_PLAYERS_TWO_CREDITS:
case TWO_PLAYERS_TWO_SIDES:
return true;
case Style::ONE_PLAYER_ONE_CREDIT:
case Style::ONE_PLAYER_TWO_CREDITS:
case ONE_PLAYER_ONE_SIDE:
case ONE_PLAYER_TWO_SIDES:
return pn == m_MasterPlayerNumber;
default:
ASSERT(0); // invalid style type
+8 -8
View File
@@ -246,11 +246,11 @@ int GetCreditsRequiredToPlayStyle( const Style *style )
switch( style->m_StyleType )
{
case Style::ONE_PLAYER_ONE_CREDIT:
case ONE_PLAYER_ONE_SIDE:
return 1;
case Style::TWO_PLAYERS_TWO_CREDITS:
case TWO_PLAYERS_TWO_SIDES:
return 2;
case Style::ONE_PLAYER_TWO_CREDITS:
case ONE_PLAYER_TWO_SIDES:
return (PREFSMAN->GetPremium() == PrefsManager::DOUBLES_PREMIUM) ? 1 : 2;
default:
ASSERT(0);
@@ -275,7 +275,7 @@ static bool AreStyleAndPlayModeCompatible( const Style *style, PlayMode pm )
return false;
/* Don't allow battle modes if the style takes both sides. */
if( style->m_StyleType==Style::ONE_PLAYER_TWO_CREDITS )
if( style->m_StyleType==ONE_PLAYER_TWO_SIDES )
return false;
}
@@ -336,7 +336,7 @@ bool ModeChoice::IsPlayable( CString *why ) const
/* If both sides are joined, disallow singles modes, since easy to select them
* accidentally, instead of versus mode. */
if( m_pStyle->m_StyleType == Style::ONE_PLAYER_ONE_CREDIT &&
if( m_pStyle->m_StyleType == ONE_PLAYER_ONE_SIDE &&
GAMESTATE->GetNumSidesJoined() > 1 )
{
if( why )
@@ -433,10 +433,10 @@ void ModeChoice::Apply( PlayerNumber pn ) const
// that requires both sides, join the other side.
switch( m_pStyle->m_StyleType )
{
case Style::ONE_PLAYER_ONE_CREDIT:
case ONE_PLAYER_ONE_SIDE:
break;
case Style::TWO_PLAYERS_TWO_CREDITS:
case Style::ONE_PLAYER_TWO_CREDITS:
case TWO_PLAYERS_TWO_SIDES:
case ONE_PLAYER_TWO_SIDES:
{
FOREACH_PlayerNumber( p )
GAMESTATE->m_bSideIsJoined[p] = true;
+2 -2
View File
@@ -190,7 +190,7 @@ void PlayerMinus::Load(
m_ArrowBackdrop.SetPlayer( pn );
const bool bReverse = GAMESTATE->m_PlayerOptions[pn].GetReversePercentForColumn(0) == 1;
bool bPlayerUsingBothSides = GAMESTATE->GetCurrentStyle()->m_StyleType==Style::ONE_PLAYER_TWO_CREDITS;
bool bPlayerUsingBothSides = GAMESTATE->GetCurrentStyle()->m_StyleType==ONE_PLAYER_TWO_SIDES;
m_Combo.SetX( COMBO_X(m_PlayerNumber,bPlayerUsingBothSides) );
m_Combo.SetY( bReverse ? COMBO_Y_REVERSE : COMBO_Y );
m_AttackDisplay.SetX( ATTACK_DISPLAY_X(m_PlayerNumber,bPlayerUsingBothSides) - 40 );
@@ -504,7 +504,7 @@ void PlayerMinus::ApplyWaitingTransforms()
void PlayerMinus::DrawPrimitives()
{
// May have both players in doubles (for battle play); only draw primary player.
if( GAMESTATE->GetCurrentStyle()->m_StyleType == Style::ONE_PLAYER_TWO_CREDITS &&
if( GAMESTATE->GetCurrentStyle()->m_StyleType == ONE_PLAYER_TWO_SIDES &&
m_PlayerNumber != GAMESTATE->m_MasterPlayerNumber )
return;
+5 -3
View File
@@ -55,6 +55,7 @@
/* XXX: This is ugly; most people don't need to override this per-mode. This will
* go away eventually, once metrics can redirect to Lua calls. */
#define INITIAL_BACKGROUND_BRIGHTNESS( play_mode ) THEME->GetMetricF(m_sName,"InitialBackgroundBrightness"+Capitalize(PlayModeToString(play_mode)))
#define PLAYER_X( p, styleType ) THEME->GetMetricF(m_sName,ssprintf("PlayerP%d%sX",p+1,StyleTypeToString(styleType).c_str()))
static ThemeMetric<float> SECONDS_BETWEEN_COMMENTS ("ScreenGameplay","SecondsBetweenComments");
static ThemeMetric<float> TICK_EARLY_SECONDS ("ScreenGameplay","TickEarlySeconds");
@@ -301,7 +302,7 @@ void ScreenGameplay::Init()
FOREACH_EnabledPlayer(p)
{
float fPlayerX = (float) GAMESTATE->GetCurrentStyle()->m_iCenterX[p];
float fPlayerX = PLAYER_X( p, GAMESTATE->GetCurrentStyle()->m_StyleType );
/* Perhaps this should be handled better by defining a new
* StyleType for ONE_PLAYER_ONE_CREDIT_AND_ONE_COMPUTER,
@@ -310,11 +311,12 @@ void ScreenGameplay::Init()
if( PREFSMAN->m_bSoloSingle &&
GAMESTATE->m_PlayMode != PLAY_MODE_BATTLE &&
GAMESTATE->m_PlayMode != PLAY_MODE_RAVE &&
GAMESTATE->GetCurrentStyle()->m_StyleType == Style::ONE_PLAYER_ONE_CREDIT )
fPlayerX = SCREEN_WIDTH/2;
GAMESTATE->GetCurrentStyle()->m_StyleType == ONE_PLAYER_ONE_SIDE )
fPlayerX = SCREEN_CENTER_X;
m_Player[p].SetName( ssprintf("Player%i", p+1) );
m_Player[p].SetX( fPlayerX );
m_Player[p].SetY( SCREEN_CENTER_Y );
this->AddChild( &m_Player[p] );
m_sprOniGameOver[p].SetName( ssprintf("OniGameOver%i", p+1) );
+8 -5
View File
@@ -39,6 +39,7 @@
#define TIMER_SECONDS THEME->GetMetricI("ScreenNameEntry","TimerSeconds")
#define MAX_RANKING_NAME_LENGTH THEME->GetMetricI(m_sName,"MaxRankingNameLength")
#define NEXT_SCREEN THEME->GetMetric (m_sName,"NextScreen")
#define PLAYER_X( p, styleType ) THEME->GetMetricF(m_sName,ssprintf("PlayerP%d%sX",p+1,StyleTypeToString(styleType).c_str()))
// cache for frequently used metrics
@@ -181,8 +182,10 @@ ScreenNameEntry::ScreenNameEntry( CString sClassName ) : Screen( sClassName )
/* Ensure that this is up-to-date. */
GAMESTATE->m_pPosition->Load( (PlayerNumber)p );
m_ReceptorArrowRow[p].Load( (PlayerNumber)p, GAMESTATE->m_PlayerOptions[p].m_sNoteSkin, 0 );
m_ReceptorArrowRow[p].SetX( (float)GAMESTATE->GetCurrentStyle()->m_iCenterX[p] );
float fPlayerX = PLAYER_X(p,GAMESTATE->GetCurrentStyle()->m_StyleType);
m_ReceptorArrowRow[p].Load( p, GAMESTATE->m_PlayerOptions[p].m_sNoteSkin, 0 );
m_ReceptorArrowRow[p].SetX( fPlayerX );
m_ReceptorArrowRow[p].SetY( SCREEN_TOP + 100 );
this->AddChild( &m_ReceptorArrowRow[p] );
@@ -198,14 +201,14 @@ ScreenNameEntry::ScreenNameEntry( CString sClassName ) : Screen( sClassName )
continue; /* We have enough columns. */
/* Find out if this column is associated with the START menu button. */
StyleInput si((PlayerNumber)p, t);
StyleInput si(p, t);
GameInput gi=GAMESTATE->GetCurrentStyle()->StyleInputToGameInput(si);
MenuInput m=GAMESTATE->GetCurrentGame()->GameInputToMenuInput(gi);
if(m.button == MENU_BUTTON_START)
continue;
m_ColToStringIndex[p][t] = CurrentStringIndex++;
float ColX = pStyle->m_iCenterX[p] + pStyle->m_ColumnInfo[p][t].fXOffset;
float ColX = fPlayerX + pStyle->m_ColumnInfo[p][t].fXOffset;
m_textSelectedChars[p][t].LoadFromFont( THEME->GetPathToF("ScreenNameEntry letters") );
m_textSelectedChars[p][t].SetX( ColX );
@@ -224,7 +227,7 @@ ScreenNameEntry::ScreenNameEntry( CString sClassName ) : Screen( sClassName )
}
m_textCategory[p].LoadFromFont( THEME->GetPathToF("ScreenNameEntry category") );
m_textCategory[p].SetX( (float)GAMESTATE->GetCurrentStyle()->m_iCenterX[p] );
m_textCategory[p].SetX( fPlayerX );
m_textCategory[p].SetY( CATEGORY_Y );
m_textCategory[p].SetZoom( CATEGORY_ZOOM );
CString joined;
+5 -5
View File
@@ -60,8 +60,8 @@ StyleInput Style::GameInputToStyleInput( const GameInput &GameI ) const
SI = StyleInput( (PlayerNumber)p, t );
// HACK: Looking up the player number using m_ColumnInfo
// returns the wrong answer for ONE_PLAYER_TWO_CREDITS styles
if( m_StyleType == ONE_PLAYER_TWO_CREDITS )
// returns the wrong answer for ONE_PLAYER_TWO_SIDES styles
if( m_StyleType == ONE_PLAYER_TWO_SIDES )
SI.player = GAMESTATE->m_MasterPlayerNumber;
return SI;
@@ -76,10 +76,10 @@ PlayerNumber Style::ControllerToPlayerNumber( GameController controller ) const
{
switch( m_StyleType )
{
case ONE_PLAYER_ONE_CREDIT:
case TWO_PLAYERS_TWO_CREDITS:
case ONE_PLAYER_ONE_SIDE:
case TWO_PLAYERS_TWO_SIDES:
return (PlayerNumber)controller;
case ONE_PLAYER_TWO_CREDITS:
case ONE_PLAYER_TWO_SIDES:
return GAMESTATE->m_MasterPlayerNumber;
default:
ASSERT(0);
+1 -9
View File
@@ -31,16 +31,8 @@ public:
* the Steps with the tag "dance-single". */
StepsType m_StepsType;
enum StyleType
{
ONE_PLAYER_ONE_CREDIT, // e.g. single
TWO_PLAYERS_TWO_CREDITS, // e.g. versus
ONE_PLAYER_TWO_CREDITS, // e.g. double
};
StyleType m_StyleType;
int m_iCenterX[NUM_PLAYERS]; // center of the player
int m_iColsPerPlayer; // number of total tracks this style expects (e.g. 4 for versus, but 8 for double)
struct ColumnInfo
{