GameController enum cleanup

This commit is contained in:
Chris Danford
2009-03-22 20:14:56 +00:00
parent a4dd16da5a
commit bb17b6ff29
7 changed files with 14 additions and 14 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ ControllerStateDisplay::ControllerStateDisplay()
void ControllerStateDisplay::LoadMultiPlayer( RString sType, MultiPlayer mp )
{
LoadInternal( sType, mp, GAME_CONTROLLER_1 );
LoadInternal( sType, mp, GameController_1 );
}
void ControllerStateDisplay::LoadGameController( RString sType, GameController gc )
+2 -2
View File
@@ -7,8 +7,8 @@
static const char *GameControllerNames[] = {
"Controller1",
"Controller2",
"1",
"2",
};
XToString( GameController );
StringToX( GameController );
+2 -2
View File
@@ -9,8 +9,8 @@ class InputScheme;
enum GameController
{
GAME_CONTROLLER_1 = 0, // left controller
GAME_CONTROLLER_2, // right controller
GameController_1 = 0, // left controller
GameController_2, // right controller
NUM_GameController, // leave this at the end
GameController_Invalid,
};
+4 -4
View File
@@ -93,7 +93,7 @@ void InputMapper::AddDefaultMappingsForCurrentGameIfUnmapped()
{
DeviceButton key = m->m_deviceButton;
DeviceInput DeviceI( DEVICE_KEYBOARD, key );
GameInput GameI( m->m_bSecondController ? GAME_CONTROLLER_2 : GAME_CONTROLLER_1, m->m_gb );
GameInput GameI( m->m_bSecondController ? GameController_2 : GameController_1, m->m_gb );
if( !IsMapped(DeviceI) ) // if this key isn't already being used by another user-made mapping
{
if( !GameI.IsValid() )
@@ -583,7 +583,7 @@ void InputMapper::AutoMapJoysticksForCurrentGame()
if( !DeviceI.IsValid() )
continue;
AutoMappingEntry im( s, DeviceI.button, b, c > GAME_CONTROLLER_1 );
AutoMappingEntry im( s, DeviceI.button, b, c > GameController_1 );
mapping.m_vMaps.push_back( im );
}
}
@@ -971,8 +971,8 @@ void InputScheme::MenuButtonToGameInputs( GameButton MenuI, PlayerNumber pn, vec
{
if( pn == PLAYER_INVALID )
{
GameIout.push_back( GameInput(GAME_CONTROLLER_1, *gb) );
GameIout.push_back( GameInput(GAME_CONTROLLER_2, *gb) );
GameIout.push_back( GameInput(GameController_1, *gb) );
GameIout.push_back( GameInput(GameController_2, *gb) );
}
else
{
+2 -2
View File
@@ -65,9 +65,9 @@ static void DWIcharToNote( char c, GameController i, int &note1Out, int &note2Ou
switch( i )
{
case GAME_CONTROLLER_1:
case GameController_1:
break;
case GAME_CONTROLLER_2:
case GameController_2:
if( note1Out != DANCE_NOTE_NONE )
note1Out += 6;
if( note2Out != DANCE_NOTE_NONE )
+1 -1
View File
@@ -62,7 +62,7 @@ void ScreenGameplaySyncMachine::Input( const InputEventPlus &input )
InputEventPlus _input = input;
if( _input.GameI.controller != GameController_Invalid )
_input.GameI.controller = GAME_CONTROLLER_1;
_input.GameI.controller = GameController_1;
if( _input.pn != PLAYER_INVALID )
_input.pn = PLAYER_1;
@@ -201,14 +201,14 @@ void LightsDriver_LinuxWeedTech::Set( const LightsState *ls )
// Only send the command if the light has changed states (on/off)
bool bOn = ls->m_bGameButtonLights[gc][gb];
if(bOn != CurLights.m_bGameButtonLights[gc][gb]) {
if(gc == GAME_CONTROLLER_1) {
if(gc == GameController_1) {
if(gb == DANCE_BUTTON_LEFT) {str[0] = 'A'; str[2] = 'I';}
if(gb == DANCE_BUTTON_RIGHT) {str[0] = 'A'; str[2] = 'J';}
if(gb == DANCE_BUTTON_UP) {str[0] = 'A'; str[2] = 'K';}
if(gb == DANCE_BUTTON_DOWN) {str[0] = 'A'; str[2] = 'L';}
if(gb == GAME_BUTTON_START) {str[0] = 'A'; str[2] = 'E';}
}
else if(gc == GAME_CONTROLLER_2) {
else if(gc == GameController_2) {
if(gb == DANCE_BUTTON_LEFT) {str[0] = 'A'; str[2] = 'M';}
if(gb == DANCE_BUTTON_RIGHT) {str[0] = 'A'; str[2] = 'N';}
if(gb == DANCE_BUTTON_UP) {str[0] = 'B'; str[2] = 'A';}