MenuButton -> GameButton

This commit is contained in:
Glenn Maynard
2007-01-13 03:47:36 +00:00
parent 434e603026
commit 58065fa455
7 changed files with 61 additions and 61 deletions
+27 -27
View File
@@ -131,8 +131,8 @@ static const Game g_Game_Dance =
{ "Right", MENU_BUTTON_RIGHT },
{ "Up", MENU_BUTTON_UP },
{ "Down", MENU_BUTTON_DOWN },
{ "UpLeft", MenuButton_Invalid },
{ "UpRight", MenuButton_Invalid },
{ "UpLeft", GameButton_Invalid },
{ "UpRight", GameButton_Invalid },
},
g_AutoKeyMappings_Dance
},
@@ -230,8 +230,8 @@ static const Game g_Game_Ez2 =
{ "FootDown", MENU_BUTTON_START },
{ "HandUpLeft", MENU_BUTTON_LEFT },
{ "HandUpRight", MENU_BUTTON_RIGHT },
{ "HandLrLeft", MenuButton_Invalid },
{ "HandLrRight", MenuButton_Invalid },
{ "HandLrLeft", GameButton_Invalid },
{ "HandLrRight", GameButton_Invalid },
},
g_AutoKeyMappings_Ez2
},
@@ -272,7 +272,7 @@ static const Game g_Game_Para =
{ // m_szButtonNames
{ "Left", MENU_BUTTON_LEFT },
{ "UpLeft", MENU_BUTTON_DOWN },
{ "Up", MenuButton_Invalid },
{ "Up", GameButton_Invalid },
{ "UpRight", MENU_BUTTON_UP },
{ "Right", MENU_BUTTON_RIGHT },
},
@@ -315,12 +315,12 @@ static const Game g_Game_DS3DDX =
NUM_DS3DDX_BUTTONS, // m_iButtonsPerController
{ // m_szButtonNames
{ "HandLeft", MENU_BUTTON_LEFT },
{ "FootDownLeft", MenuButton_Invalid },
{ "FootUpLeft", MenuButton_Invalid },
{ "FootDownLeft", GameButton_Invalid },
{ "FootUpLeft", GameButton_Invalid },
{ "HandUp", MENU_BUTTON_UP },
{ "HandDown", MENU_BUTTON_DOWN },
{ "FootUpRight", MenuButton_Invalid },
{ "FootDownRight", MenuButton_Invalid },
{ "FootUpRight", GameButton_Invalid },
{ "FootDownRight", GameButton_Invalid },
{ "HandRight", MENU_BUTTON_RIGHT },
},
g_AutoKeyMappings_DS3DDX
@@ -365,12 +365,12 @@ static const Game g_Game_Beat =
NUM_BEAT_BUTTONS, // m_iButtonsPerController
{ // m_szButtonNames
{ "Key1", MENU_BUTTON_LEFT },
{ "Key2", MenuButton_Invalid },
{ "Key2", GameButton_Invalid },
{ "Key3", MENU_BUTTON_RIGHT },
{ "Key4", MenuButton_Invalid },
{ "Key5", MenuButton_Invalid },
{ "Key6", MenuButton_Invalid },
{ "Key7", MenuButton_Invalid },
{ "Key4", GameButton_Invalid },
{ "Key5", GameButton_Invalid },
{ "Key6", GameButton_Invalid },
{ "Key7", GameButton_Invalid },
{ "Scratch up", MENU_BUTTON_UP },
{ "Scratch down", MENU_BUTTON_DOWN },
},
@@ -472,11 +472,11 @@ static const Game g_Game_Techno =
{ "Right", MENU_BUTTON_RIGHT },
{ "Up", MENU_BUTTON_UP },
{ "Down", MENU_BUTTON_DOWN },
{ "UpLeft", MenuButton_Invalid },
{ "UpRight", MenuButton_Invalid },
{ "Center", MenuButton_Invalid },
{ "DownLeft", MenuButton_Invalid },
{ "DownRight", MenuButton_Invalid },
{ "UpLeft", GameButton_Invalid },
{ "UpRight", GameButton_Invalid },
{ "Center", GameButton_Invalid },
{ "DownLeft", GameButton_Invalid },
{ "DownRight", GameButton_Invalid },
},
g_AutoKeyMappings_Techno
},
@@ -521,15 +521,15 @@ static const Game g_Game_Popn =
"popn", // m_szName
NUM_POPN_BUTTONS, // m_iButtonsPerController
{ // m_szButtonNames
{ "Left White", MenuButton_Invalid },
{ "Left White", GameButton_Invalid },
{ "Left Yellow", MENU_BUTTON_UP },
{ "Left Green", MenuButton_Invalid },
{ "Left Green", GameButton_Invalid },
{ "Left Blue", MENU_BUTTON_LEFT },
{ "Red", MENU_BUTTON_START },
{ "Right Blue", MENU_BUTTON_RIGHT },
{ "Right Green", MenuButton_Invalid },
{ "Right Green", GameButton_Invalid },
{ "Right Yellow", MENU_BUTTON_DOWN },
{ "Right White", MenuButton_Invalid },
{ "Right White", GameButton_Invalid },
},
g_AutoKeyMappings_Popn
},
@@ -577,10 +577,10 @@ static const Game g_Game_Lights =
{ "MarqueeUpRight", MENU_BUTTON_RIGHT },
{ "MarqueeLrLeft", MENU_BUTTON_UP },
{ "MarqueeLrRight", MENU_BUTTON_DOWN },
{ "ButtonsLeft", MenuButton_Invalid },
{ "ButtonsRight", MenuButton_Invalid },
{ "BassLeft", MenuButton_Invalid },
{ "BassRight", MenuButton_Invalid },
{ "ButtonsLeft", GameButton_Invalid },
{ "ButtonsRight", GameButton_Invalid },
{ "BassLeft", GameButton_Invalid },
{ "BassRight", GameButton_Invalid },
},
g_AutoKeyMappings_Lights
},
+20 -20
View File
@@ -814,7 +814,7 @@ PlayerNumber InputMapper::ControllerToPlayerNumber( GameController controller )
return (PlayerNumber) controller;
}
MenuButton InputMapper::GameButtonToMenuButton( GameButton gb )
GameButton InputMapper::GameButtonToMenuButton( GameButton gb )
{
return m_pInputScheme->GameButtonToMenuButton( gb );
}
@@ -828,7 +828,7 @@ void InputMapper::SetJoinControllers( PlayerNumber pn )
}
void InputMapper::MenuToGame( MenuButton MenuI, PlayerNumber pn, GameInput GameIout[4] )
void InputMapper::MenuToGame( GameButton MenuI, PlayerNumber pn, GameInput GameIout[4] )
{
if( g_JoinControllers != PLAYER_INVALID )
pn = PLAYER_INVALID;
@@ -855,7 +855,7 @@ bool InputMapper::IsBeingPressed( const GameInput &GameI, MultiPlayer mp, const
return false;
}
bool InputMapper::IsBeingPressed( MenuButton MenuI, PlayerNumber pn )
bool InputMapper::IsBeingPressed( GameButton MenuI, PlayerNumber pn )
{
GameInput GameI[4];
MenuToGame( MenuI, pn, GameI );
@@ -877,7 +877,7 @@ void InputMapper::RepeatStopKey( const GameInput &GameI )
}
}
void InputMapper::RepeatStopKey( MenuButton MenuI, PlayerNumber pn )
void InputMapper::RepeatStopKey( GameButton MenuI, PlayerNumber pn )
{
GameInput GameI[4];
MenuToGame( MenuI, pn, GameI );
@@ -904,7 +904,7 @@ float InputMapper::GetSecsHeld( const GameInput &GameI, MultiPlayer mp )
return fMaxSecsHeld;
}
float InputMapper::GetSecsHeld( MenuButton MenuI, PlayerNumber pn )
float InputMapper::GetSecsHeld( GameButton MenuI, PlayerNumber pn )
{
float fMaxSecsHeld = 0;
@@ -927,7 +927,7 @@ void InputMapper::ResetKeyRepeat( const GameInput &GameI )
}
}
void InputMapper::ResetKeyRepeat( MenuButton MenuI, PlayerNumber pn )
void InputMapper::ResetKeyRepeat( GameButton MenuI, PlayerNumber pn )
{
GameInput GameI[4];
MenuToGame( MenuI, pn, GameI );
@@ -959,7 +959,7 @@ GameButton InputScheme::ButtonNameToIndex( const RString &sButtonName ) const
return GameButton_Invalid;
}
MenuButton InputScheme::GameButtonToMenuButton( GameButton gb ) const
GameButton InputScheme::GameButtonToMenuButton( GameButton gb ) const
{
if( gb < GAME_BUTTON_NEXT )
return gb;
@@ -967,12 +967,12 @@ MenuButton InputScheme::GameButtonToMenuButton( GameButton gb ) const
if( !PREFSMAN->m_bOnlyDedicatedMenuButtons )
return GetMenuButtonSecondaryFunction( gb );
return MenuButton_Invalid; // no MenuButton for this GameButton
return GameButton_Invalid; // no GameButton for this GameButton
}
void InputScheme::MenuButtonToGameInputs( MenuButton MenuI, PlayerNumber pn, GameInput GameIout[4] ) const
void InputScheme::MenuButtonToGameInputs( GameButton MenuI, PlayerNumber pn, GameInput GameIout[4] ) const
{
ASSERT( MenuI != MenuButton_Invalid );
ASSERT( MenuI != GameButton_Invalid );
GameIout[0].MakeInvalid(); // initialize
GameIout[1].MakeInvalid();
@@ -1017,22 +1017,22 @@ void InputScheme::MenuButtonToGameInputs( MenuButton MenuI, PlayerNumber pn, Gam
}
}
MenuButton InputScheme::GetMenuButtonSecondaryFunction( GameButton gb ) const
GameButton InputScheme::GetMenuButtonSecondaryFunction( GameButton gb ) const
{
return GetGameButtonInfo(gb)->m_SecondaryMenuButton;
}
static const InputScheme::GameButtonInfo g_CommonGameButtonInfo[] =
{
{ "MenuLeft", MenuButton_Invalid },
{ "MenuRight", MenuButton_Invalid },
{ "MenuUp", MenuButton_Invalid },
{ "MenuDown", MenuButton_Invalid },
{ "Start", MenuButton_Invalid },
{ "Select", MenuButton_Invalid },
{ "Back", MenuButton_Invalid },
{ "Coin", MenuButton_Invalid },
{ "Operator", MenuButton_Invalid },
{ "MenuLeft", GameButton_Invalid },
{ "MenuRight", GameButton_Invalid },
{ "MenuUp", GameButton_Invalid },
{ "MenuDown", GameButton_Invalid },
{ "Start", GameButton_Invalid },
{ "Select", GameButton_Invalid },
{ "Back", GameButton_Invalid },
{ "Coin", GameButton_Invalid },
{ "Operator", GameButton_Invalid },
};
const InputScheme::GameButtonInfo *InputScheme::GetGameButtonInfo( GameButton gb ) const
+10 -10
View File
@@ -41,16 +41,16 @@ public:
struct GameButtonInfo
{
const char *m_szName; // The name used by the button graphics system. e.g. "left", "right", "middle C", "snare"
MenuButton m_SecondaryMenuButton;
GameButton m_SecondaryMenuButton;
};
/* Data for each Game-specific GameButton. This starts at GAME_BUTTON_NEXT. */
GameButtonInfo m_GameButtonInfo[NUM_GameButton];
const InputMapping *m_Maps;
GameButton ButtonNameToIndex( const RString &sButtonName ) const;
MenuButton GameButtonToMenuButton( GameButton gb ) const;
void MenuButtonToGameInputs( MenuButton MenuI, PlayerNumber pn, GameInput GameIout[4] ) const;
MenuButton GetMenuButtonSecondaryFunction( GameButton gb ) const;
GameButton GameButtonToMenuButton( GameButton gb ) const;
void MenuButtonToGameInputs( GameButton MenuI, PlayerNumber pn, GameInput GameIout[4] ) const;
GameButton GetMenuButtonSecondaryFunction( GameButton gb ) const;
const GameButtonInfo *GetGameButtonInfo( GameButton gb ) const;
const char *GetGameButtonName( GameButton gb ) const;
};
@@ -84,21 +84,21 @@ public:
bool DeviceToGame( const DeviceInput &DeviceI, GameInput& GameI ); // return true if there is a mapping from device to pad
bool GameToDevice( const GameInput &GameI, int iSlotNum, DeviceInput& DeviceI ); // return true if there is a mapping from pad to device
MenuButton GameButtonToMenuButton( GameButton gb );
void MenuToGame( MenuButton MenuI, PlayerNumber pn, GameInput GameIout[4] );
GameButton GameButtonToMenuButton( GameButton gb );
void MenuToGame( GameButton MenuI, PlayerNumber pn, GameInput GameIout[4] );
PlayerNumber ControllerToPlayerNumber( GameController controller );
float GetSecsHeld( const GameInput &GameI, MultiPlayer mp = MultiPlayer_Invalid );
float GetSecsHeld( MenuButton MenuI, PlayerNumber pn );
float GetSecsHeld( GameButton MenuI, PlayerNumber pn );
bool IsBeingPressed( const GameInput &GameI, MultiPlayer mp = MultiPlayer_Invalid, const DeviceInputList *pButtonState = NULL );
bool IsBeingPressed( MenuButton MenuI, PlayerNumber pn );
bool IsBeingPressed( GameButton MenuI, PlayerNumber pn );
void ResetKeyRepeat( const GameInput &GameI );
void ResetKeyRepeat( MenuButton MenuI, PlayerNumber pn );
void ResetKeyRepeat( GameButton MenuI, PlayerNumber pn );
void RepeatStopKey( const GameInput &GameI );
void RepeatStopKey( MenuButton MenuI, PlayerNumber pn );
void RepeatStopKey( GameButton MenuI, PlayerNumber pn );
typedef InputMapping Mapping;
+1 -1
View File
@@ -347,7 +347,7 @@ EditButton ScreenEdit::DeviceToEdit( const DeviceInput &DeviceI ) const
}
/* Given a DeviceInput that was just depressed, return an active edit function. */
EditButton ScreenEdit::MenuButtonToEditButton( MenuButton MenuI ) const
EditButton ScreenEdit::MenuButtonToEditButton( GameButton MenuI ) const
{
const MapEditButtonToMenuButton *pCurrentMap = GetCurrentMenuButtonMap();
+1 -1
View File
@@ -104,7 +104,7 @@ void ScreenMapControllers::Init()
pSecondary->LoadFromFont( THEME->GetPathF("Common","title") );
GameButton mb = INPUTMAPPER->GetInputScheme()->GetMenuButtonSecondaryFunction( pKey->m_GameButton );
RString sText;
if( mb != MenuButton_Invalid )
if( mb != GameButton_Invalid )
sText = GameButtonToLocalizedString( INPUTMAPPER->GetInputScheme(), mb );
ActorUtil::LoadAllCommands( *pSecondary, m_sName );
pSecondary->SetText( sText );
+1 -1
View File
@@ -65,7 +65,7 @@ void ScreenSelectMaster::Init()
ScreenSelect::Init();
m_TrackingRepeatingInput = MenuButton_Invalid;
m_TrackingRepeatingInput = GameButton_Invalid;
vector<PlayerNumber> vpns;
if( SHARED_SELECTION )
+1 -1
View File
@@ -60,7 +60,7 @@ class InputList: public BitmapText
if( !PREFSMAN->m_bOnlyDedicatedMenuButtons )
{
GameButton mb = INPUTMAPPER->GetInputScheme()->GetMenuButtonSecondaryFunction( gi.button );
if( mb != MenuButton_Invalid )
if( mb != GameButton_Invalid )
{
RString sGameButtonString = GameButtonToLocalizedString( INPUTMAPPER->GetInputScheme(), mb );
sTemp += ssprintf( " - (%s %s)", sGameButtonString.c_str(), SECONDARY.GetValue().c_str() );