improved/fixed some event renaming (sorry)

This commit is contained in:
Thomas Jentzsch 2021-05-12 23:31:29 +02:00
parent bd56e31b45
commit 20aa94f4fc
16 changed files with 312 additions and 312 deletions

View File

@ -54,42 +54,42 @@ MouseControl::MouseControl(Console& console, const string& mode)
case MouseControl::Type::NoControl:
msg << "not used";
break;
case MouseControl::Type::PaddleLeftA:
case MouseControl::Type::LeftPaddleA:
type = Controller::Type::Paddles;
id = 0;
msg << "Left Paddle A";
break;
case MouseControl::Type::PaddleLeftB:
case MouseControl::Type::LeftPaddleB:
type = Controller::Type::Paddles;
id = 1;
msg << "Left Paddle B";
break;
case MouseControl::Type::PaddleRightA:
case MouseControl::Type::RightPaddleA:
type = Controller::Type::Paddles;
id = 2;
msg << "Right Paddle A";
break;
case MouseControl::Type::PaddleRightB:
case MouseControl::Type::RightPaddleB:
type = Controller::Type::Paddles;
id = 3;
msg << "Right Paddle B";
break;
case MouseControl::Type::DrivingLeft:
case MouseControl::Type::LeftDriving:
type = Controller::Type::Driving;
id = 0;
msg << "Left Driving";
break;
case MouseControl::Type::DrivingRight:
case MouseControl::Type::RightDriving:
type = Controller::Type::Driving;
id = 1;
msg << "Right Driving";
break;
case MouseControl::Type::MindLinkLeft:
case MouseControl::Type::LeftMindLink:
type = Controller::Type::MindLink;
id = 0;
msg << "Left MindLink";
break;
case MouseControl::Type::MindLinkRight:
case MouseControl::Type::RightMindLink:
type = Controller::Type::MindLink;
id = 1;
msg << "Right MindLink";

View File

@ -43,8 +43,8 @@ class MouseControl
*/
enum class Type
{
PaddleLeftA = 0, PaddleLeftB, PaddleRightA, PaddleRightB,
DrivingLeft, DrivingRight, MindLinkLeft, MindLinkRight,
LeftPaddleA = 0, LeftPaddleB, RightPaddleA, RightPaddleB,
LeftDriving, RightDriving, LeftMindLink, RightMindLink,
NoControl
};

View File

@ -1068,81 +1068,81 @@ void PhysicalJoystickHandler::changeDrivingSensitivity(int direction)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PhysicalJoystickHandler::EventMappingArray PhysicalJoystickHandler::DefaultLeftJoystickMapping = {
// Left joystick (assume buttons zero..two)
{Event::JoystickLeftFire, 0},
{Event::JoystickLeftFire5, 1},
{Event::JoystickLeftFire9, 2},
{Event::LeftJoystickFire, 0},
{Event::LeftJoystickFire5, 1},
{Event::LeftJoystickFire9, 2},
// Left joystick left/right directions
{Event::JoystickLeftLeft, JOY_CTRL_NONE, JoyAxis::X, JoyDir::NEG},
{Event::JoystickLeftRight, JOY_CTRL_NONE, JoyAxis::X, JoyDir::POS},
{Event::LeftJoystickLeft, JOY_CTRL_NONE, JoyAxis::X, JoyDir::NEG},
{Event::LeftJoystickRight, JOY_CTRL_NONE, JoyAxis::X, JoyDir::POS},
// Left joystick up/down directions
{Event::JoystickLeftUp, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::NEG},
{Event::JoystickLeftDown, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::POS},
{Event::LeftJoystickUp, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::NEG},
{Event::LeftJoystickDown, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::POS},
// Left joystick left/right directions (assume hat 0)
{Event::JoystickLeftLeft, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::LEFT},
{Event::JoystickLeftRight, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::RIGHT},
{Event::LeftJoystickLeft, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::LEFT},
{Event::LeftJoystickRight, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::RIGHT},
// Left joystick up/down directions (assume hat 0)
{Event::JoystickLeftUp, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::UP},
{Event::JoystickLeftDown, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::DOWN},
{Event::LeftJoystickUp, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::UP},
{Event::LeftJoystickDown, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::DOWN},
};
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PhysicalJoystickHandler::EventMappingArray PhysicalJoystickHandler::DefaultRightJoystickMapping = {
// Right joystick (assume buttons zero..two)
{Event::JoystickRightFire, 0},
{Event::JoystickRightFire5, 1},
{Event::JoystickRightFire9, 2},
{Event::RightJoystickFire, 0},
{Event::RightJoystickFire5, 1},
{Event::RightJoystickFire9, 2},
// Right joystick left/right directions
{Event::JoystickRightLeft, JOY_CTRL_NONE, JoyAxis::X, JoyDir::NEG},
{Event::JoystickRightRight, JOY_CTRL_NONE, JoyAxis::X, JoyDir::POS},
{Event::RightJoystickLeft, JOY_CTRL_NONE, JoyAxis::X, JoyDir::NEG},
{Event::RightJoystickRight, JOY_CTRL_NONE, JoyAxis::X, JoyDir::POS},
// Right joystick up/down directions
{Event::JoystickRightUp, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::NEG},
{Event::JoystickRightDown, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::POS},
{Event::RightJoystickUp, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::NEG},
{Event::RightJoystickDown, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::POS},
// Right joystick left/right directions (assume hat 0)
{Event::JoystickRightLeft, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::LEFT},
{Event::JoystickRightRight, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::RIGHT},
{Event::RightJoystickLeft, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::LEFT},
{Event::RightJoystickRight, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::RIGHT},
// Right joystick up/down directions (assume hat 0)
{Event::JoystickRightUp, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::UP},
{Event::JoystickRightDown, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::DOWN},
{Event::RightJoystickUp, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::UP},
{Event::RightJoystickDown, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::DOWN},
};
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PhysicalJoystickHandler::EventMappingArray PhysicalJoystickHandler::DefaultLeftPaddlesMapping = {
{Event::PaddleLeftAAnalog, JOY_CTRL_NONE, JoyAxis::X, JoyDir::ANALOG},
{Event::LeftPaddleAAnalog, JOY_CTRL_NONE, JoyAxis::X, JoyDir::ANALOG},
#if defined(RETRON77)
{Event::PaddleLeftAAnalog, JOY_CTRL_NONE, JoyAxis::Z, JoyDir::ANALOG},
{Event::LeftPaddleAAnalog, JOY_CTRL_NONE, JoyAxis::Z, JoyDir::ANALOG},
#endif
// Current code does NOT allow digital and anlog events on the same axis at the same time
//{Event::PaddleLeftADecrease, JOY_CTRL_NONE, JoyAxis::X, JoyDir::POS},
//{Event::PaddleLeftAIncrease, JOY_CTRL_NONE, JoyAxis::X, JoyDir::NEG},
{Event::PaddleLeftAFire, 0},
{Event::PaddleLeftBAnalog, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::ANALOG},
//{Event::LeftPaddleADecrease, JOY_CTRL_NONE, JoyAxis::X, JoyDir::POS},
//{Event::LeftPaddleAIncrease, JOY_CTRL_NONE, JoyAxis::X, JoyDir::NEG},
{Event::LeftPaddleAFire, 0},
{Event::LeftPaddleBAnalog, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::ANALOG},
#if defined(RETRON77)
{Event::PaddleLeftBAnalog, JOY_CTRL_NONE, JoyAxis::A3, JoyDir::ANALOG},
{Event::LeftPaddleBAnalog, JOY_CTRL_NONE, JoyAxis::A3, JoyDir::ANALOG},
#endif
// Current code does NOT allow digital and anlog events on the same axis at the same
//{Event::PaddleLeftBDecrease, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::POS},
//{Event::PaddleLeftBIncrease, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::NEG},
{Event::PaddleLeftBFire, 1},
//{Event::LeftPaddleBDecrease, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::POS},
//{Event::LeftPaddleBIncrease, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::NEG},
{Event::LeftPaddleBFire, 1},
};
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PhysicalJoystickHandler::EventMappingArray PhysicalJoystickHandler::DefaultRightPaddlesMapping = {
{Event::PaddleRightAAnalog, JOY_CTRL_NONE, JoyAxis::X, JoyDir::ANALOG},
{Event::RightPaddleAAnalog, JOY_CTRL_NONE, JoyAxis::X, JoyDir::ANALOG},
#if defined(RETRON77)
{Event::PaddleRightAAnalog, JOY_CTRL_NONE, JoyAxis::Z, JoyDir::ANALOG},
{Event::RightPaddleAAnalog, JOY_CTRL_NONE, JoyAxis::Z, JoyDir::ANALOG},
#endif
// Current code does NOT allow digital and anlog events on the same axis at the same
//{Event::PaddleRightADecrease, JOY_CTRL_NONE, JoyAxis::X, JoyDir::POS},
//{Event::PaddleRightAIncrease, JOY_CTRL_NONE, JoyAxis::X, JoyDir::NEG},
{Event::PaddleRightAFire, 0},
{Event::PaddleRightBAnalog, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::ANALOG},
//{Event::RightPaddleADecrease, JOY_CTRL_NONE, JoyAxis::X, JoyDir::POS},
//{Event::RightPaddleAIncrease, JOY_CTRL_NONE, JoyAxis::X, JoyDir::NEG},
{Event::RightPaddleAFire, 0},
{Event::RightPaddleBAnalog, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::ANALOG},
#if defined(RETRON77)
{Event::PaddleRightBAnalog, JOY_CTRL_NONE, JoyAxis::A3, JoyDir::ANALOG},
{Event::RightPaddleBAnalog, JOY_CTRL_NONE, JoyAxis::A3, JoyDir::ANALOG},
#endif
// Current code does NOT allow digital and anlog events on the same axis at the same
//{Event::PaddleRightBDecrease,JOY_CTRL_NONE, JoyAxis::Y, JoyDir::POS},
//{Event::PaddleRightBIncrease,JOY_CTRL_NONE, JoyAxis::Y, JoyDir::NEG},
{Event::PaddleRightBFire, 1},
//{Event::RightPaddleBDecrease,JOY_CTRL_NONE, JoyAxis::Y, JoyDir::POS},
//{Event::RightPaddleBIncrease,JOY_CTRL_NONE, JoyAxis::Y, JoyDir::NEG},
{Event::RightPaddleBFire, 1},
};
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -936,31 +936,31 @@ PhysicalKeyboardHandler::FixedPromptMapping = {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PhysicalKeyboardHandler::EventMappingArray PhysicalKeyboardHandler::DefaultJoystickMapping = {
{Event::JoystickLeftUp, KBDK_UP},
{Event::JoystickLeftDown, KBDK_DOWN},
{Event::JoystickLeftLeft, KBDK_LEFT},
{Event::JoystickLeftRight, KBDK_RIGHT},
{Event::JoystickLeftUp, KBDK_KP_8},
{Event::JoystickLeftDown, KBDK_KP_2},
{Event::JoystickLeftLeft, KBDK_KP_4},
{Event::JoystickLeftRight, KBDK_KP_6},
{Event::JoystickLeftFire, KBDK_SPACE},
{Event::JoystickLeftFire, KBDK_LCTRL},
{Event::JoystickLeftFire, KBDK_KP_5},
{Event::JoystickLeftFire5, KBDK_4},
{Event::JoystickLeftFire5, KBDK_RSHIFT},
{Event::JoystickLeftFire5, KBDK_KP_9},
{Event::JoystickLeftFire9, KBDK_5},
{Event::JoystickLeftFire9, KBDK_RCTRL},
{Event::JoystickLeftFire9, KBDK_KP_3},
{Event::LeftJoystickUp, KBDK_UP},
{Event::LeftJoystickDown, KBDK_DOWN},
{Event::LeftJoystickLeft, KBDK_LEFT},
{Event::LeftJoystickRight, KBDK_RIGHT},
{Event::LeftJoystickUp, KBDK_KP_8},
{Event::LeftJoystickDown, KBDK_KP_2},
{Event::LeftJoystickLeft, KBDK_KP_4},
{Event::LeftJoystickRight, KBDK_KP_6},
{Event::LeftJoystickFire, KBDK_SPACE},
{Event::LeftJoystickFire, KBDK_LCTRL},
{Event::LeftJoystickFire, KBDK_KP_5},
{Event::LeftJoystickFire5, KBDK_4},
{Event::LeftJoystickFire5, KBDK_RSHIFT},
{Event::LeftJoystickFire5, KBDK_KP_9},
{Event::LeftJoystickFire9, KBDK_5},
{Event::LeftJoystickFire9, KBDK_RCTRL},
{Event::LeftJoystickFire9, KBDK_KP_3},
{Event::JoystickRightUp, KBDK_Y},
{Event::JoystickRightDown, KBDK_H},
{Event::JoystickRightLeft, KBDK_G},
{Event::JoystickRightRight, KBDK_J},
{Event::JoystickRightFire, KBDK_F},
{Event::JoystickRightFire5, KBDK_6},
{Event::JoystickRightFire9, KBDK_7},
{Event::RightJoystickUp, KBDK_Y},
{Event::RightJoystickDown, KBDK_H},
{Event::RightJoystickLeft, KBDK_G},
{Event::RightJoystickRight, KBDK_J},
{Event::RightJoystickFire, KBDK_F},
{Event::RightJoystickFire5, KBDK_6},
{Event::RightJoystickFire9, KBDK_7},
// Same as Joysticks Zero & One + SHIFT
{Event::QTJoystickThreeUp, KBDK_UP, KBDM_SHIFT},
@ -983,24 +983,24 @@ PhysicalKeyboardHandler::EventMappingArray PhysicalKeyboardHandler::DefaultJoyst
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PhysicalKeyboardHandler::EventMappingArray
PhysicalKeyboardHandler::DefaultPaddleMapping = {
{Event::PaddleLeftADecrease, KBDK_RIGHT},
{Event::PaddleLeftAIncrease, KBDK_LEFT},
{Event::PaddleLeftAFire, KBDK_SPACE},
{Event::PaddleLeftAFire, KBDK_LCTRL},
{Event::PaddleLeftAFire, KBDK_KP_5},
{Event::LeftPaddleADecrease, KBDK_RIGHT},
{Event::LeftPaddleAIncrease, KBDK_LEFT},
{Event::LeftPaddleAFire, KBDK_SPACE},
{Event::LeftPaddleAFire, KBDK_LCTRL},
{Event::LeftPaddleAFire, KBDK_KP_5},
{Event::PaddleLeftBDecrease, KBDK_DOWN},
{Event::PaddleLeftBIncrease, KBDK_UP},
{Event::PaddleLeftBFire, KBDK_4},
{Event::PaddleLeftBFire, KBDK_RCTRL},
{Event::LeftPaddleBDecrease, KBDK_DOWN},
{Event::LeftPaddleBIncrease, KBDK_UP},
{Event::LeftPaddleBFire, KBDK_4},
{Event::LeftPaddleBFire, KBDK_RCTRL},
{Event::PaddleRightADecrease, KBDK_J},
{Event::PaddleRightAIncrease, KBDK_G},
{Event::PaddleRightAFire, KBDK_F},
{Event::RightPaddleADecrease, KBDK_J},
{Event::RightPaddleAIncrease, KBDK_G},
{Event::RightPaddleAFire, KBDK_F},
{Event::PaddleRightBDecrease, KBDK_H},
{Event::PaddleRightBIncrease, KBDK_Y},
{Event::PaddleRightBFire, KBDK_6},
{Event::RightPaddleBDecrease, KBDK_H},
{Event::RightPaddleBIncrease, KBDK_Y},
{Event::RightPaddleBFire, KBDK_6},
// Same as Paddles Zero..Three Fire + SHIFT
{Event::QTPaddle3AFire, KBDK_SPACE, KBDM_SHIFT},

View File

@ -73,20 +73,20 @@ NLOHMANN_JSON_SERIALIZE_ENUM(Event::Type, {
{Event::ConsoleRightDiffToggle, "ConsoleRightDiffToggle"},
{Event::ConsoleSelect, "ConsoleSelect"},
{Event::ConsoleReset, "ConsoleReset"},
{Event::JoystickLeftUp, "JoystickLeftUp"},
{Event::JoystickLeftDown, "JoystickLeftDown"},
{Event::JoystickLeftLeft, "JoystickLeftLeft"},
{Event::JoystickLeftRight, "JoystickLeftRight"},
{Event::JoystickLeftFire, "JoystickLeftFire"},
{Event::JoystickLeftFire5, "JoystickLeftFire5"},
{Event::JoystickLeftFire9, "JoystickLeftFire9"},
{Event::JoystickRightUp, "JoystickRightUp"},
{Event::JoystickRightDown, "JoystickRightDown"},
{Event::JoystickRightLeft, "JoystickRightLeft"},
{Event::JoystickRightRight, "JoystickRightRight"},
{Event::JoystickRightFire, "JoystickRightFire"},
{Event::JoystickRightFire5, "JoystickRightFire5"},
{Event::JoystickRightFire9, "JoystickRightFire9"},
{Event::LeftJoystickUp, "LeftJoystickUp"},
{Event::LeftJoystickDown, "LeftJoystickDown"},
{Event::LeftJoystickLeft, "LeftJoystickLeft"},
{Event::LeftJoystickRight, "LeftJoystickRight"},
{Event::LeftJoystickFire, "LeftJoystickFire"},
{Event::LeftJoystickFire5, "LeftJoystickFire5"},
{Event::LeftJoystickFire9, "LeftJoystickFire9"},
{Event::RightJoystickUp, "RightJoystickUp"},
{Event::RightJoystickDown, "RightJoystickDown"},
{Event::RightJoystickLeft, "RightJoystickLeft"},
{Event::RightJoystickRight, "RightJoystickRight"},
{Event::RightJoystickFire, "RightJoystickFire"},
{Event::RightJoystickFire5, "RightJoystickFire5"},
{Event::RightJoystickFire9, "RightJoystickFire9"},
{Event::QTJoystickThreeUp, "QTJoystickThreeUp"},
{Event::QTJoystickThreeDown, "QTJoystickThreeDown"},
{Event::QTJoystickThreeLeft, "QTJoystickThreeLeft"},
@ -97,22 +97,22 @@ NLOHMANN_JSON_SERIALIZE_ENUM(Event::Type, {
{Event::QTJoystickFourLeft, "QTJoystickFourLeft"},
{Event::QTJoystickFourRight, "QTJoystickFourRight"},
{Event::QTJoystickFourFire, "QTJoystickFourFire"},
{Event::PaddleLeftADecrease, "PaddleLeftADecrease"},
{Event::PaddleLeftAIncrease, "PaddleLeftAIncrease"},
{Event::PaddleLeftAAnalog, "PaddleLeftAAnalog"},
{Event::PaddleLeftAFire, "PaddleLeftAFire"},
{Event::PaddleLeftBDecrease, "PaddleLeftBDecrease"},
{Event::PaddleLeftBIncrease, "PaddleLeftBIncrease"},
{Event::PaddleLeftBAnalog, "PaddleLeftBAnalog"},
{Event::PaddleLeftBFire, "PaddleLeftBFire"},
{Event::PaddleRightADecrease, "PaddleRightADecrease"},
{Event::PaddleRightAIncrease, "PaddleRightAIncrease"},
{Event::PaddleRightAAnalog, "PaddleRightAAnalog"},
{Event::PaddleRightAFire, "PaddleRightAFire"},
{Event::PaddleRightBDecrease, "PaddleRightBDecrease"},
{Event::PaddleRightBIncrease, "PaddleRightBIncrease"},
{Event::PaddleRightBAnalog, "PaddleRightBAnalog"},
{Event::PaddleRightBFire, "PaddleRightBFire"},
{Event::LeftPaddleADecrease, "LeftPaddleADecrease"},
{Event::LeftPaddleAIncrease, "LeftPaddleAIncrease"},
{Event::LeftPaddleAAnalog, "LeftPaddleAAnalog"},
{Event::LeftPaddleAFire, "LeftPaddleAFire"},
{Event::LeftPaddleBDecrease, "LeftPaddleBDecrease"},
{Event::LeftPaddleBIncrease, "LeftPaddleBIncrease"},
{Event::LeftPaddleBAnalog, "LeftPaddleBAnalog"},
{Event::LeftPaddleBFire, "LeftPaddleBFire"},
{Event::RightPaddleADecrease, "RightPaddleADecrease"},
{Event::RightPaddleAIncrease, "RightPaddleAIncrease"},
{Event::RightPaddleAAnalog, "RightPaddleAAnalog"},
{Event::RightPaddleAFire, "RightPaddleAFire"},
{Event::RightPaddleBDecrease, "RightPaddleBDecrease"},
{Event::RightPaddleBIncrease, "RightPaddleBIncrease"},
{Event::RightPaddleBAnalog, "RightPaddleBAnalog"},
{Event::RightPaddleBFire, "RightPaddleBFire"},
{Event::QTPaddle3AFire, "QTPaddle3AFire"},
{Event::QTPaddle3BFire, "QTPaddle3BFire"},
{Event::QTPaddle4AFire, "QTPaddle4AFire"},

View File

@ -23,13 +23,13 @@ BoosterGrip::BoosterGrip(Jack jack, const Event& event, const System& system)
{
if(myJack == Jack::Left)
{
myTriggerEvent = Event::JoystickLeftFire5;
myBoosterEvent = Event::JoystickLeftFire9;
myTriggerEvent = Event::LeftJoystickFire5;
myBoosterEvent = Event::LeftJoystickFire9;
}
else
{
myTriggerEvent = Event::JoystickRightFire5;
myBoosterEvent = Event::JoystickRightFire9;
myTriggerEvent = Event::RightJoystickFire5;
myBoosterEvent = Event::RightJoystickFire9;
}
setPin(AnalogPin::Five, AnalogReadout::disconnect());

View File

@ -25,9 +25,9 @@ Driving::Driving(Jack jack, const Event& event, const System& system, bool altma
{
if(!altmap)
{
myCCWEvent = Event::JoystickLeftLeft;
myCWEvent = Event::JoystickLeftRight;
myFireEvent = Event::JoystickLeftFire;
myCCWEvent = Event::LeftJoystickLeft;
myCWEvent = Event::LeftJoystickRight;
myFireEvent = Event::LeftJoystickFire;
}
else
{
@ -42,9 +42,9 @@ Driving::Driving(Jack jack, const Event& event, const System& system, bool altma
{
if(!altmap)
{
myCCWEvent = Event::JoystickRightLeft;
myCWEvent = Event::JoystickRightRight;
myFireEvent = Event::JoystickRightFire;
myCCWEvent = Event::RightJoystickLeft;
myCWEvent = Event::RightJoystickRight;
myFireEvent = Event::RightJoystickFire;
}
else
{

View File

@ -42,15 +42,15 @@ class Event
ConsoleRightDiffA, ConsoleRightDiffB, ConsoleRightDiffToggle,
ConsoleSelect, ConsoleReset,
JoystickLeftUp, JoystickLeftDown, JoystickLeftLeft, JoystickLeftRight,
JoystickLeftFire, JoystickLeftFire5, JoystickLeftFire9,
JoystickRightUp, JoystickRightDown, JoystickRightLeft, JoystickRightRight,
JoystickRightFire, JoystickRightFire5, JoystickRightFire9,
LeftJoystickUp, LeftJoystickDown, LeftJoystickLeft, LeftJoystickRight,
LeftJoystickFire, LeftJoystickFire5, LeftJoystickFire9,
RightJoystickUp, RightJoystickDown, RightJoystickLeft, RightJoystickRight,
RightJoystickFire, RightJoystickFire5, RightJoystickFire9,
PaddleLeftADecrease, PaddleLeftAIncrease, PaddleLeftAAnalog, PaddleLeftAFire,
PaddleLeftBDecrease, PaddleLeftBIncrease, PaddleLeftBAnalog, PaddleLeftBFire,
PaddleRightADecrease, PaddleRightAIncrease, PaddleRightAAnalog, PaddleRightAFire,
PaddleRightBDecrease, PaddleRightBIncrease, PaddleRightBAnalog, PaddleRightBFire,
LeftPaddleADecrease, LeftPaddleAIncrease, LeftPaddleAAnalog, LeftPaddleAFire,
LeftPaddleBDecrease, LeftPaddleBIncrease, LeftPaddleBAnalog, LeftPaddleBFire,
RightPaddleADecrease, RightPaddleAIncrease, RightPaddleAAnalog, RightPaddleAFire,
RightPaddleBDecrease, RightPaddleBIncrease, RightPaddleBAnalog, RightPaddleBFire,
LeftKeyboard1, LeftKeyboard2, LeftKeyboard3,
LeftKeyboard4, LeftKeyboard5, LeftKeyboard6,
@ -229,10 +229,10 @@ class Event
{
switch(type)
{
case Event::PaddleLeftAAnalog:
case Event::PaddleLeftBAnalog:
case Event::PaddleRightAAnalog:
case Event::PaddleRightBAnalog:
case Event::LeftPaddleAAnalog:
case Event::LeftPaddleBAnalog:
case Event::RightPaddleAAnalog:
case Event::RightPaddleBAnalog:
return true;
default:
return false;
@ -256,8 +256,8 @@ class Event
// Hold controller related events
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static const Event::EventSet LeftJoystickEvents = {
Event::JoystickLeftUp, Event::JoystickLeftDown, Event::JoystickLeftLeft, Event::JoystickLeftRight,
Event::JoystickLeftFire, Event::JoystickLeftFire5, Event::JoystickLeftFire9,
Event::LeftJoystickUp, Event::LeftJoystickDown, Event::LeftJoystickLeft, Event::LeftJoystickRight,
Event::LeftJoystickFire, Event::LeftJoystickFire5, Event::LeftJoystickFire9,
};
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static const Event::EventSet QTJoystick3Events = {
@ -267,8 +267,8 @@ static const Event::EventSet QTJoystick3Events = {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static const Event::EventSet RightJoystickEvents = {
Event::JoystickRightUp, Event::JoystickRightDown, Event::JoystickRightLeft, Event::JoystickRightRight,
Event::JoystickRightFire, Event::JoystickRightFire5, Event::JoystickRightFire9,
Event::RightJoystickUp, Event::RightJoystickDown, Event::RightJoystickLeft, Event::RightJoystickRight,
Event::RightJoystickFire, Event::RightJoystickFire5, Event::RightJoystickFire9,
};
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static const Event::EventSet QTJoystick4Events = {
@ -278,8 +278,8 @@ static const Event::EventSet QTJoystick4Events = {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static const Event::EventSet LeftPaddlesEvents = {
Event::PaddleLeftADecrease, Event::PaddleLeftAIncrease, Event::PaddleLeftAAnalog, Event::PaddleLeftAFire,
Event::PaddleLeftBDecrease, Event::PaddleLeftBIncrease, Event::PaddleLeftBAnalog, Event::PaddleLeftBFire,
Event::LeftPaddleADecrease, Event::LeftPaddleAIncrease, Event::LeftPaddleAAnalog, Event::LeftPaddleAFire,
Event::LeftPaddleBDecrease, Event::LeftPaddleBIncrease, Event::LeftPaddleBAnalog, Event::LeftPaddleBFire,
};
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static const Event::EventSet QTPaddles3Events = {
@ -289,8 +289,8 @@ static const Event::EventSet QTPaddles3Events = {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static const Event::EventSet RightPaddlesEvents = {
Event::PaddleRightADecrease, Event::PaddleRightAIncrease, Event::PaddleRightAAnalog, Event::PaddleRightAFire,
Event::PaddleRightBDecrease, Event::PaddleRightBIncrease, Event::PaddleRightBAnalog, Event::PaddleRightBFire,
Event::RightPaddleADecrease, Event::RightPaddleAIncrease, Event::RightPaddleAAnalog, Event::RightPaddleAFire,
Event::RightPaddleBDecrease, Event::RightPaddleBIncrease, Event::RightPaddleBAnalog, Event::RightPaddleBFire,
};
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static const Event::EventSet QTPaddles4Events = {

View File

@ -758,44 +758,44 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
////////////////////////////////////////////////////////////////////////
// If enabled, make sure 'impossible' joystick directions aren't allowed
case Event::JoystickLeftUp:
case Event::LeftJoystickUp:
if(!myAllowAllDirectionsFlag && pressed)
myEvent.set(Event::JoystickLeftDown, 0);
myEvent.set(Event::LeftJoystickDown, 0);
break;
case Event::JoystickLeftDown:
case Event::LeftJoystickDown:
if(!myAllowAllDirectionsFlag && pressed)
myEvent.set(Event::JoystickLeftUp, 0);
myEvent.set(Event::LeftJoystickUp, 0);
break;
case Event::JoystickLeftLeft:
case Event::LeftJoystickLeft:
if(!myAllowAllDirectionsFlag && pressed)
myEvent.set(Event::JoystickLeftRight, 0);
myEvent.set(Event::LeftJoystickRight, 0);
break;
case Event::JoystickLeftRight:
case Event::LeftJoystickRight:
if(!myAllowAllDirectionsFlag && pressed)
myEvent.set(Event::JoystickLeftLeft, 0);
myEvent.set(Event::LeftJoystickLeft, 0);
break;
case Event::JoystickRightUp:
case Event::RightJoystickUp:
if(!myAllowAllDirectionsFlag && pressed)
myEvent.set(Event::JoystickRightDown, 0);
myEvent.set(Event::RightJoystickDown, 0);
break;
case Event::JoystickRightDown:
case Event::RightJoystickDown:
if(!myAllowAllDirectionsFlag && pressed)
myEvent.set(Event::JoystickRightUp, 0);
myEvent.set(Event::RightJoystickUp, 0);
break;
case Event::JoystickRightLeft:
case Event::RightJoystickLeft:
if(!myAllowAllDirectionsFlag && pressed)
myEvent.set(Event::JoystickRightRight, 0);
myEvent.set(Event::RightJoystickRight, 0);
break;
case Event::JoystickRightRight:
case Event::RightJoystickRight:
if(!myAllowAllDirectionsFlag && pressed)
myEvent.set(Event::JoystickRightLeft, 0);
myEvent.set(Event::RightJoystickLeft, 0);
break;
case Event::QTJoystickThreeUp:
@ -2087,27 +2087,27 @@ void EventHandler::handleConsoleStartupEvents()
const string& holdjoy0 = myOSystem.settings().getString("holdjoy0");
if(BSPF::containsIgnoreCase(holdjoy0, "U"))
handleEvent(Event::JoystickLeftUp);
handleEvent(Event::LeftJoystickUp);
if(BSPF::containsIgnoreCase(holdjoy0, "D"))
handleEvent(Event::JoystickLeftDown);
handleEvent(Event::LeftJoystickDown);
if(BSPF::containsIgnoreCase(holdjoy0, "L"))
handleEvent(Event::JoystickLeftLeft);
handleEvent(Event::LeftJoystickLeft);
if(BSPF::containsIgnoreCase(holdjoy0, "R"))
handleEvent(Event::JoystickLeftRight);
handleEvent(Event::LeftJoystickRight);
if(BSPF::containsIgnoreCase(holdjoy0, "F"))
handleEvent(Event::JoystickLeftFire);
handleEvent(Event::LeftJoystickFire);
const string& holdjoy1 = myOSystem.settings().getString("holdjoy1");
if(BSPF::containsIgnoreCase(holdjoy1, "U"))
handleEvent(Event::JoystickRightUp);
handleEvent(Event::RightJoystickUp);
if(BSPF::containsIgnoreCase(holdjoy1, "D"))
handleEvent(Event::JoystickRightDown);
handleEvent(Event::RightJoystickDown);
if(BSPF::containsIgnoreCase(holdjoy1, "L"))
handleEvent(Event::JoystickRightLeft);
handleEvent(Event::RightJoystickLeft);
if(BSPF::containsIgnoreCase(holdjoy1, "R"))
handleEvent(Event::JoystickRightRight);
handleEvent(Event::RightJoystickRight);
if(BSPF::containsIgnoreCase(holdjoy1, "F"))
handleEvent(Event::JoystickRightFire);
handleEvent(Event::RightJoystickFire);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -3056,21 +3056,21 @@ EventHandler::EmulActionList EventHandler::ourEmulActionList = { {
{ Event::ToggleContSnapshotsFrame,"Save continuous snapsh. (every frame)", "" },
#endif
{ Event::JoystickLeftUp, "Left Joystick Up", "" },
{ Event::JoystickLeftDown, "Left Joystick Down", "" },
{ Event::JoystickLeftLeft, "Left Joystick Left", "" },
{ Event::JoystickLeftRight, "Left Joystick Right", "" },
{ Event::JoystickLeftFire, "Left Joystick Fire", "" },
{ Event::JoystickLeftFire5, "Left Booster Top Booster Button", "" },
{ Event::JoystickLeftFire9, "Left Booster Handle Grip Trigger", "" },
{ Event::LeftJoystickUp, "Left Joystick Up", "" },
{ Event::LeftJoystickDown, "Left Joystick Down", "" },
{ Event::LeftJoystickLeft, "Left Joystick Left", "" },
{ Event::LeftJoystickRight, "Left Joystick Right", "" },
{ Event::LeftJoystickFire, "Left Joystick Fire", "" },
{ Event::LeftJoystickFire5, "Left Booster Top Booster Button", "" },
{ Event::LeftJoystickFire9, "Left Booster Handle Grip Trigger", "" },
{ Event::JoystickRightUp, "Right Joystick Up", "" },
{ Event::JoystickRightDown, "Right Joystick Down", "" },
{ Event::JoystickRightLeft, "Right Joystick Left", "" },
{ Event::JoystickRightRight, "Right Joystick Right", "" },
{ Event::JoystickRightFire, "Right Joystick Fire", "" },
{ Event::JoystickRightFire5, "Right Booster Top Booster Button", "" },
{ Event::JoystickRightFire9, "Right Booster Handle Grip Trigger", "" },
{ Event::RightJoystickUp, "Right Joystick Up", "" },
{ Event::RightJoystickDown, "Right Joystick Down", "" },
{ Event::RightJoystickLeft, "Right Joystick Left", "" },
{ Event::RightJoystickRight, "Right Joystick Right", "" },
{ Event::RightJoystickFire, "Right Joystick Fire", "" },
{ Event::RightJoystickFire5, "Right Booster Top Booster Button", "" },
{ Event::RightJoystickFire9, "Right Booster Handle Grip Trigger", "" },
{ Event::QTJoystickThreeUp, "QuadTari Joystick 3 Up", "" },
{ Event::QTJoystickThreeDown, "QuadTari Joystick 3 Down", "" },
@ -3084,25 +3084,25 @@ EventHandler::EmulActionList EventHandler::ourEmulActionList = { {
{ Event::QTJoystickFourRight, "QuadTari Joystick 4 Right", "" },
{ Event::QTJoystickFourFire, "QuadTari Joystick 4 Fire", "" },
{ Event::PaddleLeftAAnalog, "Left Paddle A Analog", "" },
{ Event::PaddleLeftAIncrease, "Left Paddle A Turn Left", "" },
{ Event::PaddleLeftADecrease, "Left Paddle A Turn Right", "" },
{ Event::PaddleLeftAFire, "Left Paddle A Fire", "" },
{ Event::LeftPaddleAAnalog, "Left Paddle A Analog", "" },
{ Event::LeftPaddleAIncrease, "Left Paddle A Turn Left", "" },
{ Event::LeftPaddleADecrease, "Left Paddle A Turn Right", "" },
{ Event::LeftPaddleAFire, "Left Paddle A Fire", "" },
{ Event::PaddleLeftBAnalog, "Left Paddle B Analog", "" },
{ Event::PaddleLeftBIncrease, "Left Paddle B Turn Left", "" },
{ Event::PaddleLeftBDecrease, "Left Paddle B Turn Right", "" },
{ Event::PaddleLeftBFire, "Left Paddle B Fire", "" },
{ Event::LeftPaddleBAnalog, "Left Paddle B Analog", "" },
{ Event::LeftPaddleBIncrease, "Left Paddle B Turn Left", "" },
{ Event::LeftPaddleBDecrease, "Left Paddle B Turn Right", "" },
{ Event::LeftPaddleBFire, "Left Paddle B Fire", "" },
{ Event::PaddleRightAAnalog, "Right Paddle A Analog", "" },
{ Event::PaddleRightAIncrease, "Right Paddle A Turn Left", "" },
{ Event::PaddleRightADecrease, "Right Paddle A Turn Right", "" },
{ Event::PaddleRightAFire, "Right Paddle A Fire", "" },
{ Event::RightPaddleAAnalog, "Right Paddle A Analog", "" },
{ Event::RightPaddleAIncrease, "Right Paddle A Turn Left", "" },
{ Event::RightPaddleADecrease, "Right Paddle A Turn Right", "" },
{ Event::RightPaddleAFire, "Right Paddle A Fire", "" },
{ Event::PaddleRightBAnalog, "Right Paddle B Analog", "" },
{ Event::PaddleRightBIncrease, "Right Paddle B Turn Left", "" },
{ Event::PaddleRightBDecrease, "Right Paddle B Turn Right", "" },
{ Event::PaddleRightBFire, "Right Paddle B Fire", "" },
{ Event::RightPaddleBAnalog, "Right Paddle B Analog", "" },
{ Event::RightPaddleBIncrease, "Right Paddle B Turn Left", "" },
{ Event::RightPaddleBDecrease, "Right Paddle B Turn Right", "" },
{ Event::RightPaddleBFire, "Right Paddle B Fire", "" },
{ Event::QTPaddle3AFire, "QuadTari Paddle 3A Fire", "" },
{ Event::QTPaddle3BFire, "QuadTari Paddle 3B Fire", "" },
@ -3363,10 +3363,10 @@ const Event::EventSet EventHandler::ConsoleEvents = {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const Event::EventSet EventHandler::JoystickEvents = {
Event::JoystickLeftUp, Event::JoystickLeftDown, Event::JoystickLeftLeft, Event::JoystickLeftRight,
Event::JoystickLeftFire, Event::JoystickLeftFire5, Event::JoystickLeftFire9,
Event::JoystickRightUp, Event::JoystickRightDown, Event::JoystickRightLeft, Event::JoystickRightRight,
Event::JoystickRightFire, Event::JoystickRightFire5, Event::JoystickRightFire9,
Event::LeftJoystickUp, Event::LeftJoystickDown, Event::LeftJoystickLeft, Event::LeftJoystickRight,
Event::LeftJoystickFire, Event::LeftJoystickFire5, Event::LeftJoystickFire9,
Event::RightJoystickUp, Event::RightJoystickDown, Event::RightJoystickLeft, Event::RightJoystickRight,
Event::RightJoystickFire, Event::RightJoystickFire5, Event::RightJoystickFire9,
Event::QTJoystickThreeUp, Event::QTJoystickThreeDown, Event::QTJoystickThreeLeft, Event::QTJoystickThreeRight,
Event::QTJoystickThreeFire,
Event::QTJoystickFourUp, Event::QTJoystickFourDown, Event::QTJoystickFourLeft, Event::QTJoystickFourRight,
@ -3375,10 +3375,10 @@ const Event::EventSet EventHandler::JoystickEvents = {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const Event::EventSet EventHandler::PaddlesEvents = {
Event::PaddleLeftADecrease, Event::PaddleLeftAIncrease, Event::PaddleLeftAAnalog, Event::PaddleLeftAFire,
Event::PaddleLeftBDecrease, Event::PaddleLeftBIncrease, Event::PaddleLeftBAnalog, Event::PaddleLeftBFire,
Event::PaddleRightADecrease, Event::PaddleRightAIncrease, Event::PaddleRightAAnalog, Event::PaddleRightAFire,
Event::PaddleRightBDecrease, Event::PaddleRightBIncrease, Event::PaddleRightBAnalog, Event::PaddleRightBFire,
Event::LeftPaddleADecrease, Event::LeftPaddleAIncrease, Event::LeftPaddleAAnalog, Event::LeftPaddleAFire,
Event::LeftPaddleBDecrease, Event::LeftPaddleBIncrease, Event::LeftPaddleBAnalog, Event::LeftPaddleBFire,
Event::RightPaddleADecrease, Event::RightPaddleAIncrease, Event::RightPaddleAAnalog, Event::RightPaddleAFire,
Event::RightPaddleBDecrease, Event::RightPaddleBIncrease, Event::RightPaddleBAnalog, Event::RightPaddleBFire,
Event::QTPaddle3AFire, Event::QTPaddle3BFire,Event::QTPaddle4AFire,Event::QTPaddle4BFire,
};

View File

@ -22,9 +22,9 @@ Genesis::Genesis(Jack jack, const Event& event, const System& system)
: Joystick(jack, event, system, Controller::Type::Genesis)
{
if(myJack == Jack::Left)
myButtonCEvent = Event::JoystickLeftFire5;
myButtonCEvent = Event::LeftJoystickFire5;
else
myButtonCEvent = Event::JoystickRightFire5;
myButtonCEvent = Event::RightJoystickFire5;
setPin(AnalogPin::Five, AnalogReadout::connectToVcc());
}

View File

@ -32,11 +32,11 @@ Joystick::Joystick(Jack jack, const Event& event, const System& system,
{
if(!altmap)
{
myUpEvent = Event::JoystickLeftUp;
myDownEvent = Event::JoystickLeftDown;
myLeftEvent = Event::JoystickLeftLeft;
myRightEvent = Event::JoystickLeftRight;
myFireEvent = Event::JoystickLeftFire;
myUpEvent = Event::LeftJoystickUp;
myDownEvent = Event::LeftJoystickDown;
myLeftEvent = Event::LeftJoystickLeft;
myRightEvent = Event::LeftJoystickRight;
myFireEvent = Event::LeftJoystickFire;
}
else
{
@ -51,11 +51,11 @@ Joystick::Joystick(Jack jack, const Event& event, const System& system,
{
if(!altmap)
{
myUpEvent = Event::JoystickRightUp;
myDownEvent = Event::JoystickRightDown;
myLeftEvent = Event::JoystickRightLeft;
myRightEvent = Event::JoystickRightRight;
myFireEvent = Event::JoystickRightFire;
myUpEvent = Event::RightJoystickUp;
myDownEvent = Event::RightJoystickDown;
myLeftEvent = Event::RightJoystickLeft;
myRightEvent = Event::RightJoystickRight;
myFireEvent = Event::RightJoystickFire;
}
else
{

View File

@ -116,7 +116,7 @@ bool Lightgun::read(DigitalPin pin)
void Lightgun::update()
{
// Digital events (from keyboard or joystick hats & buttons)
bool firePressed = myEvent.get(Event::JoystickLeftFire) != 0;
bool firePressed = myEvent.get(Event::LeftJoystickFire) != 0;
// We allow left and right mouse buttons for fire button
firePressed = firePressed

View File

@ -50,16 +50,16 @@ Paddles::Paddles(Jack jack, const Event& event, const System& system,
if(!altmap)
{
// First paddle is left A, second is left B
myAAxisValue = Event::PaddleLeftAAnalog;
myBAxisValue = Event::PaddleLeftBAnalog;
myLeftAFireEvent = Event::PaddleLeftAFire;
myLeftBFireEvent = Event::PaddleLeftBFire;
myAAxisValue = Event::LeftPaddleAAnalog;
myBAxisValue = Event::LeftPaddleBAnalog;
myLeftAFireEvent = Event::LeftPaddleAFire;
myLeftBFireEvent = Event::LeftPaddleBFire;
// These can be affected by changes in axis orientation
myLeftADecEvent = Event::PaddleLeftADecrease;
myLeftAIncEvent = Event::PaddleLeftAIncrease;
myLeftBDecEvent = Event::PaddleLeftBDecrease;
myLeftBIncEvent = Event::PaddleLeftBIncrease;
myLeftADecEvent = Event::LeftPaddleADecrease;
myLeftAIncEvent = Event::LeftPaddleAIncrease;
myLeftBDecEvent = Event::LeftPaddleBDecrease;
myLeftBIncEvent = Event::LeftPaddleBIncrease;
}
else
{
@ -77,16 +77,16 @@ Paddles::Paddles(Jack jack, const Event& event, const System& system,
if(!altmap)
{
// First paddle is right A, second is right B
myAAxisValue = Event::PaddleRightAAnalog;
myBAxisValue = Event::PaddleRightBAnalog;
myLeftAFireEvent = Event::PaddleRightAFire;
myLeftBFireEvent = Event::PaddleRightBFire;
myAAxisValue = Event::RightPaddleAAnalog;
myBAxisValue = Event::RightPaddleBAnalog;
myLeftAFireEvent = Event::RightPaddleAFire;
myLeftBFireEvent = Event::RightPaddleBFire;
// These can be affected by changes in axis orientation
myLeftADecEvent = Event::PaddleRightADecrease;
myLeftAIncEvent = Event::PaddleRightAIncrease;
myLeftBDecEvent = Event::PaddleRightBDecrease;
myLeftBIncEvent = Event::PaddleRightBIncrease;
myLeftADecEvent = Event::RightPaddleADecrease;
myLeftAIncEvent = Event::RightPaddleAIncrease;
myLeftBDecEvent = Event::RightPaddleBDecrease;
myLeftBIncEvent = Event::RightPaddleBIncrease;
}
else
{

View File

@ -90,7 +90,7 @@ void PointingDevice::update()
myTrackBallDown, myTrackBallLinesV, myScanCountV, myFirstScanOffsetV);
// We allow left and right mouse buttons for fire button
setPin(DigitalPin::Six, !getAutoFireState(myEvent.get(Event::JoystickLeftFire) ||
setPin(DigitalPin::Six, !getAutoFireState(myEvent.get(Event::LeftJoystickFire) ||
myEvent.get(Event::MouseButtonLeftValue) || myEvent.get(Event::MouseButtonRightValue)));
}

View File

@ -369,15 +369,15 @@ void GameInfoDialog::addControllersTab()
// Mouse controller specific axis
pwidth = _font.getStringWidth("Right MindLink");
ctrls.clear();
VarList::push_back(ctrls, "None", static_cast<uInt32>(MouseControl::Type::NoControl));
VarList::push_back(ctrls, "Left Paddle A", static_cast<uInt32>(MouseControl::Type::PaddleLeftA));
VarList::push_back(ctrls, "Left Paddle B", static_cast<uInt32>(MouseControl::Type::PaddleLeftB));
VarList::push_back(ctrls, "Right Paddle A", static_cast<uInt32>(MouseControl::Type::PaddleRightA));
VarList::push_back(ctrls, "Right Paddle B", static_cast<uInt32>(MouseControl::Type::PaddleRightB));
VarList::push_back(ctrls, "Left Driving", static_cast<uInt32>(MouseControl::Type::DrivingLeft));
VarList::push_back(ctrls, "Right Driving", static_cast<uInt32>(MouseControl::Type::DrivingRight));
VarList::push_back(ctrls, "Left MindLink", static_cast<uInt32>(MouseControl::Type::MindLinkLeft));
VarList::push_back(ctrls, "Right MindLink", static_cast<uInt32>(MouseControl::Type::MindLinkRight));
VarList::push_back(ctrls, "None", static_cast<uInt32>(MouseControl::Type::NoControl));
VarList::push_back(ctrls, "Left Paddle A", static_cast<uInt32>(MouseControl::Type::LeftPaddleA));
VarList::push_back(ctrls, "Left Paddle B", static_cast<uInt32>(MouseControl::Type::LeftPaddleB));
VarList::push_back(ctrls, "Right Paddle A", static_cast<uInt32>(MouseControl::Type::RightPaddleA));
VarList::push_back(ctrls, "Right Paddle B", static_cast<uInt32>(MouseControl::Type::RightPaddleB));
VarList::push_back(ctrls, "Left Driving", static_cast<uInt32>(MouseControl::Type::LeftDriving));
VarList::push_back(ctrls, "Right Driving", static_cast<uInt32>(MouseControl::Type::RightDriving));
VarList::push_back(ctrls, "Left MindLink", static_cast<uInt32>(MouseControl::Type::LeftMindLink));
VarList::push_back(ctrls, "Right MindLink", static_cast<uInt32>(MouseControl::Type::RightMindLink));
xpos += CheckboxWidget::prefixSize(_font);
ypos += lineHeight + VGAP;

View File

@ -80,50 +80,50 @@ int32_t input_bitmask[4];
switch(input_type[0])
{
case Controller::Type::Joystick:
EVENT(Event::JoystickLeftLeft, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
EVENT(Event::JoystickLeftRight, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
EVENT(Event::JoystickLeftUp, pad, RETRO_DEVICE_ID_JOYPAD_UP);
EVENT(Event::JoystickLeftDown, pad, RETRO_DEVICE_ID_JOYPAD_DOWN);
EVENT(Event::JoystickLeftFire, pad, RETRO_DEVICE_ID_JOYPAD_B);
EVENT(Event::LeftJoystickLeft, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
EVENT(Event::LeftJoystickRight, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
EVENT(Event::LeftJoystickUp, pad, RETRO_DEVICE_ID_JOYPAD_UP);
EVENT(Event::LeftJoystickDown, pad, RETRO_DEVICE_ID_JOYPAD_DOWN);
EVENT(Event::LeftJoystickFire, pad, RETRO_DEVICE_ID_JOYPAD_B);
break;
case Controller::Type::Paddles:
EVENT(Event::PaddleLeftAIncrease, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
EVENT(Event::PaddleLeftADecrease, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
EVENT(Event::PaddleLeftAFire, pad, RETRO_DEVICE_ID_JOYPAD_B);
//EVENT(Event::PaddleLeftAAnalog, pad, RETRO_DEVICE_ID_JOYPAD_B);
EVENT(Event::LeftPaddleAIncrease, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
EVENT(Event::LeftPaddleADecrease, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
EVENT(Event::LeftPaddleAFire, pad, RETRO_DEVICE_ID_JOYPAD_B);
//EVENT(Event::LeftPaddleAAnalog, pad, RETRO_DEVICE_ID_JOYPAD_B);
pad++;
GET_BITMASK(pad)
EVENT(Event::PaddleLeftBIncrease, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
EVENT(Event::PaddleLeftBDecrease, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
EVENT(Event::PaddleLeftBFire, pad, RETRO_DEVICE_ID_JOYPAD_B);
//EVENT(Event::PaddleLeftBAnalog, pad, RETRO_DEVICE_ID_JOYPAD_B);
EVENT(Event::LeftPaddleBIncrease, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
EVENT(Event::LeftPaddleBDecrease, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
EVENT(Event::LeftPaddleBFire, pad, RETRO_DEVICE_ID_JOYPAD_B);
//EVENT(Event::LeftPaddleBAnalog, pad, RETRO_DEVICE_ID_JOYPAD_B);
break;
case Controller::Type::Driving:
EVENT(Event::JoystickLeftLeft, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
EVENT(Event::JoystickLeftRight, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
EVENT(Event::JoystickLeftFire, pad, RETRO_DEVICE_ID_JOYPAD_B);
EVENT(Event::LeftJoystickLeft, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
EVENT(Event::LeftJoystickRight, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
EVENT(Event::LeftJoystickFire, pad, RETRO_DEVICE_ID_JOYPAD_B);
break;
case Controller::Type::Genesis:
EVENT(Event::JoystickLeftLeft, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
EVENT(Event::JoystickLeftRight, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
EVENT(Event::JoystickLeftUp, pad, RETRO_DEVICE_ID_JOYPAD_UP);
EVENT(Event::JoystickLeftDown, pad, RETRO_DEVICE_ID_JOYPAD_DOWN);
EVENT(Event::JoystickLeftFire, pad, RETRO_DEVICE_ID_JOYPAD_B);
EVENT(Event::JoystickLeftFire5, pad, RETRO_DEVICE_ID_JOYPAD_A);
EVENT(Event::LeftJoystickLeft, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
EVENT(Event::LeftJoystickRight, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
EVENT(Event::LeftJoystickUp, pad, RETRO_DEVICE_ID_JOYPAD_UP);
EVENT(Event::LeftJoystickDown, pad, RETRO_DEVICE_ID_JOYPAD_DOWN);
EVENT(Event::LeftJoystickFire, pad, RETRO_DEVICE_ID_JOYPAD_B);
EVENT(Event::LeftJoystickFire5, pad, RETRO_DEVICE_ID_JOYPAD_A);
break;
case Controller::Type::BoosterGrip:
EVENT(Event::JoystickLeftLeft, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
EVENT(Event::JoystickLeftRight, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
EVENT(Event::JoystickLeftUp, pad, RETRO_DEVICE_ID_JOYPAD_UP);
EVENT(Event::JoystickLeftDown, pad, RETRO_DEVICE_ID_JOYPAD_DOWN);
EVENT(Event::JoystickLeftFire, pad, RETRO_DEVICE_ID_JOYPAD_B);
EVENT(Event::JoystickLeftFire5, pad, RETRO_DEVICE_ID_JOYPAD_A);
EVENT(Event::JoystickLeftFire9, pad, RETRO_DEVICE_ID_JOYPAD_Y);
EVENT(Event::LeftJoystickLeft, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
EVENT(Event::LeftJoystickRight, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
EVENT(Event::LeftJoystickUp, pad, RETRO_DEVICE_ID_JOYPAD_UP);
EVENT(Event::LeftJoystickDown, pad, RETRO_DEVICE_ID_JOYPAD_DOWN);
EVENT(Event::LeftJoystickFire, pad, RETRO_DEVICE_ID_JOYPAD_B);
EVENT(Event::LeftJoystickFire5, pad, RETRO_DEVICE_ID_JOYPAD_A);
EVENT(Event::LeftJoystickFire9, pad, RETRO_DEVICE_ID_JOYPAD_Y);
break;
default:
@ -136,50 +136,50 @@ int32_t input_bitmask[4];
switch(input_type[1])
{
case Controller::Type::Joystick:
EVENT(Event::JoystickRightLeft, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
EVENT(Event::JoystickRightRight, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
EVENT(Event::JoystickRightUp, pad, RETRO_DEVICE_ID_JOYPAD_UP);
EVENT(Event::JoystickRightDown, pad, RETRO_DEVICE_ID_JOYPAD_DOWN);
EVENT(Event::JoystickRightFire, pad, RETRO_DEVICE_ID_JOYPAD_B);
EVENT(Event::RightJoystickLeft, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
EVENT(Event::RightJoystickRight, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
EVENT(Event::RightJoystickUp, pad, RETRO_DEVICE_ID_JOYPAD_UP);
EVENT(Event::RightJoystickDown, pad, RETRO_DEVICE_ID_JOYPAD_DOWN);
EVENT(Event::RightJoystickFire, pad, RETRO_DEVICE_ID_JOYPAD_B);
break;
case Controller::Type::Paddles:
EVENT(Event::PaddleRightAIncrease, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
EVENT(Event::PaddleRightADecrease, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
EVENT(Event::PaddleRightAFire, pad, RETRO_DEVICE_ID_JOYPAD_B);
//EVENT(Event::PaddleRightAAnalog, pad, RETRO_DEVICE_ID_JOYPAD_B);
EVENT(Event::RightPaddleAIncrease, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
EVENT(Event::RightPaddleADecrease, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
EVENT(Event::RightPaddleAFire, pad, RETRO_DEVICE_ID_JOYPAD_B);
//EVENT(Event::RightPaddleAAnalog, pad, RETRO_DEVICE_ID_JOYPAD_B);
pad++;
GET_BITMASK(pad)
EVENT(Event::PaddleRightBIncrease, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
EVENT(Event::PaddleRightBDecrease, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
EVENT(Event::PaddleRightBFire, pad, RETRO_DEVICE_JOYPAD);
//EVENT(Event::PaddleRightBAnalog, pad, RETRO_DEVICE_ID_JOYPAD_B);
EVENT(Event::RightPaddleBIncrease, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
EVENT(Event::RightPaddleBDecrease, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
EVENT(Event::RightPaddleBFire, pad, RETRO_DEVICE_JOYPAD);
//EVENT(Event::RightPaddleBAnalog, pad, RETRO_DEVICE_ID_JOYPAD_B);
break;
case Controller::Type::Driving:
EVENT(Event::JoystickRightLeft, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
EVENT(Event::JoystickRightRight, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
EVENT(Event::JoystickRightFire, pad, RETRO_DEVICE_ID_JOYPAD_B);
EVENT(Event::RightJoystickLeft, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
EVENT(Event::RightJoystickRight, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
EVENT(Event::RightJoystickFire, pad, RETRO_DEVICE_ID_JOYPAD_B);
break;
case Controller::Type::Genesis:
EVENT(Event::JoystickRightLeft, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
EVENT(Event::JoystickRightRight, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
EVENT(Event::JoystickRightUp, pad, RETRO_DEVICE_ID_JOYPAD_UP);
EVENT(Event::JoystickRightDown, pad, RETRO_DEVICE_ID_JOYPAD_DOWN);
EVENT(Event::JoystickRightFire, pad, RETRO_DEVICE_ID_JOYPAD_B);
EVENT(Event::JoystickRightFire5, pad, RETRO_DEVICE_ID_JOYPAD_A);
EVENT(Event::RightJoystickLeft, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
EVENT(Event::RightJoystickRight, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
EVENT(Event::RightJoystickUp, pad, RETRO_DEVICE_ID_JOYPAD_UP);
EVENT(Event::RightJoystickDown, pad, RETRO_DEVICE_ID_JOYPAD_DOWN);
EVENT(Event::RightJoystickFire, pad, RETRO_DEVICE_ID_JOYPAD_B);
EVENT(Event::RightJoystickFire5, pad, RETRO_DEVICE_ID_JOYPAD_A);
break;
case Controller::Type::BoosterGrip:
EVENT(Event::JoystickRightLeft, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
EVENT(Event::JoystickRightRight, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
EVENT(Event::JoystickRightUp, pad, RETRO_DEVICE_ID_JOYPAD_UP);
EVENT(Event::JoystickRightDown, pad, RETRO_DEVICE_ID_JOYPAD_DOWN);
EVENT(Event::JoystickRightFire, pad, RETRO_DEVICE_ID_JOYPAD_B);
EVENT(Event::JoystickRightFire5, pad, RETRO_DEVICE_ID_JOYPAD_A);
EVENT(Event::JoystickRightFire9, pad, RETRO_DEVICE_ID_JOYPAD_Y);
EVENT(Event::RightJoystickLeft, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
EVENT(Event::RightJoystickRight, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
EVENT(Event::RightJoystickUp, pad, RETRO_DEVICE_ID_JOYPAD_UP);
EVENT(Event::RightJoystickDown, pad, RETRO_DEVICE_ID_JOYPAD_DOWN);
EVENT(Event::RightJoystickFire, pad, RETRO_DEVICE_ID_JOYPAD_B);
EVENT(Event::RightJoystickFire5, pad, RETRO_DEVICE_ID_JOYPAD_A);
EVENT(Event::RightJoystickFire9, pad, RETRO_DEVICE_ID_JOYPAD_Y);
break;
default: