merge code for common GameButtons
This commit is contained in:
@@ -136,17 +136,6 @@ static Game g_Games[NUM_GAMES] =
|
|||||||
{ "UpLeft", GameButtonType_Step, NO_DEFAULT_KEY, KEY_KP_C7 },
|
{ "UpLeft", GameButtonType_Step, NO_DEFAULT_KEY, KEY_KP_C7 },
|
||||||
{ "UpRight", GameButtonType_Step, NO_DEFAULT_KEY, KEY_KP_C9 },
|
{ "UpRight", GameButtonType_Step, NO_DEFAULT_KEY, KEY_KP_C9 },
|
||||||
},
|
},
|
||||||
{ // m_DedicatedMenuButton
|
|
||||||
GAME_BUTTON_MENULEFT, // MENU_BUTTON_LEFT
|
|
||||||
GAME_BUTTON_MENURIGHT, // MENU_BUTTON_RIGHT
|
|
||||||
GAME_BUTTON_MENUUP, // MENU_BUTTON_UP
|
|
||||||
GAME_BUTTON_MENUDOWN, // MENU_BUTTON_DOWN
|
|
||||||
GAME_BUTTON_START, // MENU_BUTTON_START
|
|
||||||
GAME_BUTTON_SELECT, // MENU_BUTTON_SELECT
|
|
||||||
GAME_BUTTON_BACK, // MENU_BUTTON_BACK
|
|
||||||
GAME_BUTTON_COIN, // MENU_BUTTON_COIN
|
|
||||||
GAME_BUTTON_OPERATOR // MENU_BUTTON_OPERATOR
|
|
||||||
},
|
|
||||||
{ // m_SecondaryMenuButton
|
{ // m_SecondaryMenuButton
|
||||||
DANCE_BUTTON_LEFT, // MENU_BUTTON_LEFT
|
DANCE_BUTTON_LEFT, // MENU_BUTTON_LEFT
|
||||||
DANCE_BUTTON_RIGHT, // MENU_BUTTON_RIGHT
|
DANCE_BUTTON_RIGHT, // MENU_BUTTON_RIGHT
|
||||||
@@ -188,17 +177,6 @@ static Game g_Games[NUM_GAMES] =
|
|||||||
{ "DownLeft", GameButtonType_Step, KEY_Cz, KEY_KP_C1 },
|
{ "DownLeft", GameButtonType_Step, KEY_Cz, KEY_KP_C1 },
|
||||||
{ "DownRight", GameButtonType_Step, KEY_Cc, KEY_KP_C3 },
|
{ "DownRight", GameButtonType_Step, KEY_Cc, KEY_KP_C3 },
|
||||||
},
|
},
|
||||||
{ // m_DedicatedMenuButton
|
|
||||||
GAME_BUTTON_MENULEFT, // MENU_BUTTON_LEFT
|
|
||||||
GAME_BUTTON_MENURIGHT, // MENU_BUTTON_RIGHT
|
|
||||||
GAME_BUTTON_MENUUP, // MENU_BUTTON_UP
|
|
||||||
GAME_BUTTON_MENUDOWN, // MENU_BUTTON_DOWN
|
|
||||||
GAME_BUTTON_START, // MENU_BUTTON_START
|
|
||||||
GAME_BUTTON_SELECT, // MENU_BUTTON_SELECT
|
|
||||||
GAME_BUTTON_BACK, // MENU_BUTTON_BACK
|
|
||||||
GAME_BUTTON_COIN, // MENU_BUTTON_COIN
|
|
||||||
GAME_BUTTON_OPERATOR, // MENU_BUTTON_OPERATOR
|
|
||||||
},
|
|
||||||
{ // m_SecondaryMenuButton
|
{ // m_SecondaryMenuButton
|
||||||
PUMP_BUTTON_DOWNLEFT, // MENU_BUTTON_LEFT
|
PUMP_BUTTON_DOWNLEFT, // MENU_BUTTON_LEFT
|
||||||
PUMP_BUTTON_DOWNRIGHT, // MENU_BUTTON_RIGHT
|
PUMP_BUTTON_DOWNRIGHT, // MENU_BUTTON_RIGHT
|
||||||
@@ -242,17 +220,6 @@ static Game g_Games[NUM_GAMES] =
|
|||||||
{ "HandLrLeft", GameButtonType_Step, KEY_Cs, NO_DEFAULT_KEY },
|
{ "HandLrLeft", GameButtonType_Step, KEY_Cs, NO_DEFAULT_KEY },
|
||||||
{ "HandLrRight", GameButtonType_Step, KEY_Cf, NO_DEFAULT_KEY },
|
{ "HandLrRight", GameButtonType_Step, KEY_Cf, NO_DEFAULT_KEY },
|
||||||
},
|
},
|
||||||
{ // m_DedicatedMenuButton
|
|
||||||
GAME_BUTTON_MENULEFT, // MENU_BUTTON_LEFT
|
|
||||||
GAME_BUTTON_MENURIGHT, // MENU_BUTTON_RIGHT
|
|
||||||
GAME_BUTTON_MENUUP, // MENU_BUTTON_UP
|
|
||||||
GAME_BUTTON_MENUDOWN, // MENU_BUTTON_DOWN
|
|
||||||
GAME_BUTTON_START, // MENU_BUTTON_START
|
|
||||||
GAME_BUTTON_SELECT, // MENU_BUTTON_SELECT
|
|
||||||
GAME_BUTTON_BACK, // MENU_BUTTON_BACK
|
|
||||||
GAME_BUTTON_COIN, // MENU_BUTTON_COIN
|
|
||||||
GAME_BUTTON_OPERATOR, // MENU_BUTTON_OPERATOR
|
|
||||||
},
|
|
||||||
{ // m_SecondaryMenuButton
|
{ // m_SecondaryMenuButton
|
||||||
EZ2_BUTTON_HANDUPLEFT, // MENU_BUTTON_LEFT
|
EZ2_BUTTON_HANDUPLEFT, // MENU_BUTTON_LEFT
|
||||||
EZ2_BUTTON_HANDUPRIGHT, // MENU_BUTTON_RIGHT
|
EZ2_BUTTON_HANDUPRIGHT, // MENU_BUTTON_RIGHT
|
||||||
@@ -294,17 +261,6 @@ static Game g_Games[NUM_GAMES] =
|
|||||||
{ "UpRight", GameButtonType_Step, KEY_Cv, NO_DEFAULT_KEY },
|
{ "UpRight", GameButtonType_Step, KEY_Cv, NO_DEFAULT_KEY },
|
||||||
{ "Right", GameButtonType_Step, KEY_Cb, NO_DEFAULT_KEY },
|
{ "Right", GameButtonType_Step, KEY_Cb, NO_DEFAULT_KEY },
|
||||||
},
|
},
|
||||||
{ // m_DedicatedMenuButton
|
|
||||||
GAME_BUTTON_MENULEFT, // MENU_BUTTON_LEFT
|
|
||||||
GAME_BUTTON_MENURIGHT, // MENU_BUTTON_RIGHT
|
|
||||||
GAME_BUTTON_MENUUP, // MENU_BUTTON_UP
|
|
||||||
GAME_BUTTON_MENUDOWN, // MENU_BUTTON_DOWN
|
|
||||||
GAME_BUTTON_START, // MENU_BUTTON_START
|
|
||||||
GAME_BUTTON_SELECT, // MENU_BUTTON_SELECT
|
|
||||||
GAME_BUTTON_BACK, // MENU_BUTTON_BACK
|
|
||||||
GAME_BUTTON_COIN, // MENU_BUTTON_COIN
|
|
||||||
GAME_BUTTON_OPERATOR, // MENU_BUTTON_OPERATOR
|
|
||||||
},
|
|
||||||
{ // m_SecondaryMenuButton
|
{ // m_SecondaryMenuButton
|
||||||
PARA_BUTTON_LEFT, // MENU_BUTTON_LEFT
|
PARA_BUTTON_LEFT, // MENU_BUTTON_LEFT
|
||||||
PARA_BUTTON_RIGHT, // MENU_BUTTON_RIGHT
|
PARA_BUTTON_RIGHT, // MENU_BUTTON_RIGHT
|
||||||
@@ -349,17 +305,6 @@ static Game g_Games[NUM_GAMES] =
|
|||||||
{ "FootDownRight", GameButtonType_Step, KEY_Cc, NO_DEFAULT_KEY },
|
{ "FootDownRight", GameButtonType_Step, KEY_Cc, NO_DEFAULT_KEY },
|
||||||
{ "HandRight", GameButtonType_Step, KEY_Cd, NO_DEFAULT_KEY },
|
{ "HandRight", GameButtonType_Step, KEY_Cd, NO_DEFAULT_KEY },
|
||||||
},
|
},
|
||||||
{ // m_DedicatedMenuButton
|
|
||||||
GAME_BUTTON_MENULEFT, // MENU_BUTTON_LEFT
|
|
||||||
GAME_BUTTON_MENURIGHT, // MENU_BUTTON_RIGHT
|
|
||||||
GAME_BUTTON_MENUUP, // MENU_BUTTON_UP
|
|
||||||
GAME_BUTTON_MENUDOWN, // MENU_BUTTON_DOWN
|
|
||||||
GAME_BUTTON_START, // MENU_BUTTON_START
|
|
||||||
GAME_BUTTON_SELECT, // MENU_BUTTON_SELECT
|
|
||||||
GAME_BUTTON_BACK, // MENU_BUTTON_BACK
|
|
||||||
GAME_BUTTON_COIN, // MENU_BUTTON_COIN
|
|
||||||
GAME_BUTTON_OPERATOR, // MENU_BUTTON_OPERATOR
|
|
||||||
},
|
|
||||||
{ // m_SecondaryMenuButton
|
{ // m_SecondaryMenuButton
|
||||||
DS3DDX_BUTTON_HANDLEFT, // MENU_BUTTON_LEFT
|
DS3DDX_BUTTON_HANDLEFT, // MENU_BUTTON_LEFT
|
||||||
DS3DDX_BUTTON_HANDRIGHT, // MENU_BUTTON_RIGHT
|
DS3DDX_BUTTON_HANDRIGHT, // MENU_BUTTON_RIGHT
|
||||||
@@ -405,17 +350,6 @@ static Game g_Games[NUM_GAMES] =
|
|||||||
{ "Scratch up", GameButtonType_Step, KEY_LSHIFT, NO_DEFAULT_KEY },
|
{ "Scratch up", GameButtonType_Step, KEY_LSHIFT, NO_DEFAULT_KEY },
|
||||||
{ "Scratch down", GameButtonType_Step, NO_DEFAULT_KEY, NO_DEFAULT_KEY },
|
{ "Scratch down", GameButtonType_Step, NO_DEFAULT_KEY, NO_DEFAULT_KEY },
|
||||||
},
|
},
|
||||||
{ // m_DedicatedMenuButton
|
|
||||||
GAME_BUTTON_MENULEFT, // MENU_BUTTON_LEFT
|
|
||||||
GAME_BUTTON_MENURIGHT, // MENU_BUTTON_RIGHT
|
|
||||||
GAME_BUTTON_MENUUP, // MENU_BUTTON_UP
|
|
||||||
GAME_BUTTON_MENUDOWN, // MENU_BUTTON_DOWN
|
|
||||||
GAME_BUTTON_START, // MENU_BUTTON_START
|
|
||||||
GAME_BUTTON_SELECT, // MENU_BUTTON_SELECT
|
|
||||||
GAME_BUTTON_BACK, // MENU_BUTTON_BACK
|
|
||||||
GAME_BUTTON_COIN, // MENU_BUTTON_COIN
|
|
||||||
GAME_BUTTON_OPERATOR, // MENU_BUTTON_OPERATOR
|
|
||||||
},
|
|
||||||
{ // m_SecondaryMenuButton
|
{ // m_SecondaryMenuButton
|
||||||
BEAT_BUTTON_KEY1, // MENU_BUTTON_LEFT
|
BEAT_BUTTON_KEY1, // MENU_BUTTON_LEFT
|
||||||
BEAT_BUTTON_KEY3, // MENU_BUTTON_RIGHT
|
BEAT_BUTTON_KEY3, // MENU_BUTTON_RIGHT
|
||||||
@@ -456,17 +390,6 @@ static Game g_Games[NUM_GAMES] =
|
|||||||
{ "HandLrLeft", GameButtonType_Step, KEY_Cz, KEY_KP_C1 },
|
{ "HandLrLeft", GameButtonType_Step, KEY_Cz, KEY_KP_C1 },
|
||||||
{ "HandLrRight", GameButtonType_Step, KEY_Cx, KEY_KP_C2 },
|
{ "HandLrRight", GameButtonType_Step, KEY_Cx, KEY_KP_C2 },
|
||||||
},
|
},
|
||||||
{ // m_DedicatedMenuButton
|
|
||||||
GAME_BUTTON_MENULEFT, // MENU_BUTTON_LEFT
|
|
||||||
GAME_BUTTON_MENURIGHT, // MENU_BUTTON_RIGHT
|
|
||||||
GAME_BUTTON_MENUUP, // MENU_BUTTON_UP
|
|
||||||
GAME_BUTTON_MENUDOWN, // MENU_BUTTON_DOWN
|
|
||||||
GAME_BUTTON_START, // MENU_BUTTON_START
|
|
||||||
GAME_BUTTON_SELECT, // MENU_BUTTON_SELECT
|
|
||||||
GAME_BUTTON_BACK, // MENU_BUTTON_BACK
|
|
||||||
GAME_BUTTON_COIN, // MENU_BUTTON_COIN
|
|
||||||
GAME_BUTTON_OPERATOR // MENU_BUTTON_OPERATOR
|
|
||||||
},
|
|
||||||
{ // m_SecondaryMenuButton
|
{ // m_SecondaryMenuButton
|
||||||
MANIAX_BUTTON_HANDUPLEFT, // MENU_BUTTON_LEFT
|
MANIAX_BUTTON_HANDUPLEFT, // MENU_BUTTON_LEFT
|
||||||
MANIAX_BUTTON_HANDUPRIGHT, // MENU_BUTTON_RIGHT
|
MANIAX_BUTTON_HANDUPRIGHT, // MENU_BUTTON_RIGHT
|
||||||
@@ -512,17 +435,6 @@ static Game g_Games[NUM_GAMES] =
|
|||||||
{ "DownLeft", GameButtonType_Step, KEY_Cz, KEY_KP_C1 },
|
{ "DownLeft", GameButtonType_Step, KEY_Cz, KEY_KP_C1 },
|
||||||
{ "DownRight", GameButtonType_Step, KEY_Cc, KEY_KP_C3 },
|
{ "DownRight", GameButtonType_Step, KEY_Cc, KEY_KP_C3 },
|
||||||
},
|
},
|
||||||
{ // m_DedicatedMenuButton
|
|
||||||
GAME_BUTTON_MENULEFT, // MENU_BUTTON_LEFT
|
|
||||||
GAME_BUTTON_MENURIGHT, // MENU_BUTTON_RIGHT
|
|
||||||
GAME_BUTTON_MENUUP, // MENU_BUTTON_UP
|
|
||||||
GAME_BUTTON_MENUDOWN, // MENU_BUTTON_DOWN
|
|
||||||
GAME_BUTTON_START, // MENU_BUTTON_START
|
|
||||||
GAME_BUTTON_SELECT, // MENU_BUTTON_SELECT
|
|
||||||
GAME_BUTTON_BACK, // MENU_BUTTON_BACK
|
|
||||||
GAME_BUTTON_COIN, // MENU_BUTTON_COIN
|
|
||||||
GAME_BUTTON_OPERATOR // MENU_BUTTON_OPERATOR
|
|
||||||
},
|
|
||||||
{ // m_SecondaryMenuButton
|
{ // m_SecondaryMenuButton
|
||||||
TECHNO_BUTTON_LEFT, // MENU_BUTTON_LEFT
|
TECHNO_BUTTON_LEFT, // MENU_BUTTON_LEFT
|
||||||
TECHNO_BUTTON_RIGHT, // MENU_BUTTON_RIGHT
|
TECHNO_BUTTON_RIGHT, // MENU_BUTTON_RIGHT
|
||||||
@@ -568,17 +480,6 @@ static Game g_Games[NUM_GAMES] =
|
|||||||
{ "Right Yellow", GameButtonType_Step, KEY_Cg, NO_DEFAULT_KEY },
|
{ "Right Yellow", GameButtonType_Step, KEY_Cg, NO_DEFAULT_KEY },
|
||||||
{ "Right White", GameButtonType_Step, KEY_Cb, NO_DEFAULT_KEY },
|
{ "Right White", GameButtonType_Step, KEY_Cb, NO_DEFAULT_KEY },
|
||||||
},
|
},
|
||||||
{ // m_DedicatedMenuButton
|
|
||||||
GAME_BUTTON_MENULEFT, // MENU_BUTTON_LEFT
|
|
||||||
GAME_BUTTON_MENURIGHT, // MENU_BUTTON_RIGHT
|
|
||||||
GAME_BUTTON_MENUUP, // MENU_BUTTON_UP
|
|
||||||
GAME_BUTTON_MENUDOWN, // MENU_BUTTON_DOWN
|
|
||||||
GAME_BUTTON_START, // MENU_BUTTON_START
|
|
||||||
GAME_BUTTON_SELECT, // MENU_BUTTON_SELECT
|
|
||||||
GAME_BUTTON_BACK, // MENU_BUTTON_START
|
|
||||||
GAME_BUTTON_COIN, // MENU_BUTTON_COIN
|
|
||||||
GAME_BUTTON_OPERATOR // MENU_BUTTON_OPERATOR
|
|
||||||
},
|
|
||||||
{ // m_SecondaryMenuButton
|
{ // m_SecondaryMenuButton
|
||||||
POPN_BUTTON_LEFT_BLUE, // MENU_BUTTON_LEFT
|
POPN_BUTTON_LEFT_BLUE, // MENU_BUTTON_LEFT
|
||||||
POPN_BUTTON_RIGHT_BLUE, // MENU_BUTTON_RIGHT
|
POPN_BUTTON_RIGHT_BLUE, // MENU_BUTTON_RIGHT
|
||||||
@@ -623,17 +524,6 @@ static Game g_Games[NUM_GAMES] =
|
|||||||
{ "BassLeft", GameButtonType_Step, KEY_Cu, NO_DEFAULT_KEY },
|
{ "BassLeft", GameButtonType_Step, KEY_Cu, NO_DEFAULT_KEY },
|
||||||
{ "BassRight", GameButtonType_Step, KEY_Ci, NO_DEFAULT_KEY },
|
{ "BassRight", GameButtonType_Step, KEY_Ci, NO_DEFAULT_KEY },
|
||||||
},
|
},
|
||||||
{ // m_DedicatedMenuButton
|
|
||||||
GAME_BUTTON_MENULEFT, // MENU_BUTTON_LEFT
|
|
||||||
GAME_BUTTON_MENURIGHT, // MENU_BUTTON_RIGHT
|
|
||||||
GAME_BUTTON_MENUUP, // MENU_BUTTON_UP
|
|
||||||
GAME_BUTTON_MENUDOWN, // MENU_BUTTON_DOWN
|
|
||||||
GAME_BUTTON_START, // MENU_BUTTON_START
|
|
||||||
GAME_BUTTON_SELECT, // MENU_BUTTON_SELECT
|
|
||||||
GAME_BUTTON_BACK, // MENU_BUTTON_BACK
|
|
||||||
GAME_BUTTON_COIN, // MENU_BUTTON_COIN
|
|
||||||
GAME_BUTTON_OPERATOR // MENU_BUTTON_OPERATOR
|
|
||||||
},
|
|
||||||
{ // m_SecondaryMenuButton
|
{ // m_SecondaryMenuButton
|
||||||
LIGHTS_BUTTON_MARQUEE_UP_LEFT, // MENU_BUTTON_LEFT
|
LIGHTS_BUTTON_MARQUEE_UP_LEFT, // MENU_BUTTON_LEFT
|
||||||
LIGHTS_BUTTON_MARQUEE_UP_RIGHT, // MENU_BUTTON_RIGHT
|
LIGHTS_BUTTON_MARQUEE_UP_RIGHT, // MENU_BUTTON_RIGHT
|
||||||
|
|||||||
@@ -24,6 +24,19 @@ namespace
|
|||||||
|
|
||||||
InputMapper* INPUTMAPPER = NULL; // global and accessable from anywhere in our program
|
InputMapper* INPUTMAPPER = NULL; // global and accessable from anywhere in our program
|
||||||
|
|
||||||
|
static GameButton g_DedicatedMenuButtons[NUM_MenuButton] =
|
||||||
|
{
|
||||||
|
GAME_BUTTON_MENULEFT, // MENU_BUTTON_LEFT
|
||||||
|
GAME_BUTTON_MENURIGHT, // MENU_BUTTON_RIGHT
|
||||||
|
GAME_BUTTON_MENUUP, // MENU_BUTTON_UP
|
||||||
|
GAME_BUTTON_MENUDOWN, // MENU_BUTTON_DOWN
|
||||||
|
GAME_BUTTON_START, // MENU_BUTTON_START
|
||||||
|
GAME_BUTTON_SELECT, // MENU_BUTTON_SELECT
|
||||||
|
GAME_BUTTON_BACK, // MENU_BUTTON_BACK
|
||||||
|
GAME_BUTTON_COIN, // MENU_BUTTON_COIN
|
||||||
|
GAME_BUTTON_OPERATOR // MENU_BUTTON_OPERATOR
|
||||||
|
};
|
||||||
|
|
||||||
InputMapper::InputMapper()
|
InputMapper::InputMapper()
|
||||||
{
|
{
|
||||||
g_JoinControllers = PLAYER_INVALID;
|
g_JoinControllers = PLAYER_INVALID;
|
||||||
@@ -927,7 +940,7 @@ GameButton InputScheme::ButtonNameToIndex( const RString &sButtonName ) const
|
|||||||
MenuButton InputScheme::GameInputToMenuButton( GameInput GameI ) const
|
MenuButton InputScheme::GameInputToMenuButton( GameInput GameI ) const
|
||||||
{
|
{
|
||||||
FOREACH_MenuButton(i)
|
FOREACH_MenuButton(i)
|
||||||
if( m_DedicatedMenuButton[i] == GameI.button )
|
if( g_DedicatedMenuButtons[i] == GameI.button )
|
||||||
return i;
|
return i;
|
||||||
|
|
||||||
if( !PREFSMAN->m_bOnlyDedicatedMenuButtons )
|
if( !PREFSMAN->m_bOnlyDedicatedMenuButtons )
|
||||||
@@ -960,7 +973,7 @@ void InputScheme::MenuButtonToGameInputs( MenuButton MenuI, PlayerNumber pn, Gam
|
|||||||
controller.push_back( (GameController)pn );
|
controller.push_back( (GameController)pn );
|
||||||
}
|
}
|
||||||
|
|
||||||
GameButton button[2] = { m_DedicatedMenuButton[MenuI], m_SecondaryMenuButton[MenuI] };
|
GameButton button[2] = { g_DedicatedMenuButtons[MenuI], m_SecondaryMenuButton[MenuI] };
|
||||||
int iNumButtonsUsing = PREFSMAN->m_bOnlyDedicatedMenuButtons ? 1 : 2;
|
int iNumButtonsUsing = PREFSMAN->m_bOnlyDedicatedMenuButtons ? 1 : 2;
|
||||||
|
|
||||||
int iOut = 0;
|
int iOut = 0;
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ public:
|
|||||||
DeviceButton m_iDefaultKeyboardKey[NUM_GameController]; // default keyboard keys only effect the current game is this game
|
DeviceButton m_iDefaultKeyboardKey[NUM_GameController]; // default keyboard keys only effect the current game is this game
|
||||||
};
|
};
|
||||||
GameButtonInfo m_GameButtonInfo[NUM_GameButton];
|
GameButtonInfo m_GameButtonInfo[NUM_GameButton];
|
||||||
GameButton m_DedicatedMenuButton[NUM_MenuButton];
|
|
||||||
GameButton m_SecondaryMenuButton[NUM_MenuButton];
|
GameButton m_SecondaryMenuButton[NUM_MenuButton];
|
||||||
|
|
||||||
GameButton ButtonNameToIndex( const RString &sButtonName ) const;
|
GameButton ButtonNameToIndex( const RString &sButtonName ) const;
|
||||||
|
|||||||
Reference in New Issue
Block a user