mirror of https://github.com/stella-emu/stella.git
made port naming (left/right) consistent (see #796)
This commit is contained in:
parent
82e1430598
commit
69740f25f8
|
@ -785,8 +785,8 @@
|
|||
|
||||
<table BORDER=2>
|
||||
<tr>
|
||||
<th>Left Joystick (Joy0)</th>
|
||||
<th>Right Joystick (Joy1)</th>
|
||||
<th>Left Joystick</th>
|
||||
<th>Right Joystick</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
@ -898,32 +898,32 @@
|
|||
|
||||
<tr>
|
||||
<td>Pad Up</td>
|
||||
<td>Same as 'Joy0 Up'</td>
|
||||
<td>Same as Left Joystick 'Up'</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Pad Down</td>
|
||||
<td>Same as 'Joy0 Down'</td>
|
||||
<td>Same as Left Joystick 'Down'</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Pad Left</td>
|
||||
<td>Same as 'Joy0 Left'</td>
|
||||
<td>Same as Left Joystick 'Left'</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Pad Right</td>
|
||||
<td>Same as 'Joy0 Right'</td>
|
||||
<td>Same as Left Joystick 'Right'</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Button 'B'</td>
|
||||
<td>Same as 'Joy0 Fire'</td>
|
||||
<td>Same as Left Joystick 'Fire'</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Button 'C'</td>
|
||||
<td>Same as 'Joy0 Top Booster Button'</td>
|
||||
<td>Same as Left Joystick 'Top Booster Button'</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
@ -937,32 +937,32 @@
|
|||
|
||||
<tr>
|
||||
<td>Pad Up</td>
|
||||
<td>Same as 'Joy1 Up'</td>
|
||||
<td>Same as Right Joystick 'Up'</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Pad Down</td>
|
||||
<td>Same as 'Joy1 Down'</td>
|
||||
<td>Same as Right Joystick 'Down'</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Pad Left</td>
|
||||
<td>Same as 'Joy1 Left'</td>
|
||||
<td>Same as Right Joystick 'Left'</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Pad Right</td>
|
||||
<td>Same as 'Joy1 Right'</td>
|
||||
<td>Same as Right Joystick 'Right'</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Button 'B'</td>
|
||||
<td>Same as 'Joy1 Fire'</td>
|
||||
<td>Same as Right Joystick 'Fire'</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Button 'C'</td>
|
||||
<td>Same as 'Joy1 Top Booster Button'</td>
|
||||
<td>Same as Right Joystick 'Top Booster Button'</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
@ -987,17 +987,17 @@
|
|||
|
||||
<tr>
|
||||
<td>Left Direction</td>
|
||||
<td>Same as 'Joy0 Left'</td>
|
||||
<td>Same as Left Joystick 'Left'</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Right Direction</td>
|
||||
<td>Same as 'Joy0 Right'</td>
|
||||
<td>Same as Left Joystick 'Right'</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Fire Button</td>
|
||||
<td>Same as 'Joy0 Fire'</td>
|
||||
<td>Same as Left Joystick 'Fire'</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
@ -1011,17 +1011,17 @@
|
|||
|
||||
<tr>
|
||||
<td>Left Direction</td>
|
||||
<td>Same as 'Joy1 Left'</td>
|
||||
<td>Same as Right Joystick 'Left'</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Right Direction</td>
|
||||
<td>Same as 'Joy1 Right'</td>
|
||||
<td>Same as Right Joystick 'Right'</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Fire Button</td>
|
||||
<td>Same as 'Joy1 Fire'</td>
|
||||
<td>Same as Right Joystick 'Fire'</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
@ -1043,7 +1043,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>Fire Button</td>
|
||||
<td>Same as 'Joy0 Fire'</td>
|
||||
<td>Same as Left Joystick 'Fire'</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
@ -1065,7 +1065,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>Fire Button</td>
|
||||
<td>Same as 'Joy0 Fire'</td>
|
||||
<td>Same as Left Joystick 'Fire'</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
@ -1089,32 +1089,32 @@
|
|||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Paddle 0 Turn Left</td>
|
||||
<td>Paddle A Turn Left</td>
|
||||
<td>Left arrow</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Paddle 0 Turn Right</td>
|
||||
<td>Paddle A Turn Right</td>
|
||||
<td>Right arrow</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Paddle 0 Fire</td>
|
||||
<td>Paddle A Fire</td>
|
||||
<td>Left Control, Space</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Paddle 1 Turn Left</td>
|
||||
<td>Paddle B Turn Left</td>
|
||||
<td>Up arrow</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Paddle 1 Turn Right</td>
|
||||
<td>Paddle B Turn Right</td>
|
||||
<td>Down arrow</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Paddle 1 Fire</td>
|
||||
<td>Paddle B Fire</td>
|
||||
<td>4</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -1128,32 +1128,32 @@
|
|||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Paddle 2 Turn Left</td>
|
||||
<td>Paddle A Turn Left</td>
|
||||
<td>G</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Paddle 2 Turn Right</td>
|
||||
<td>Paddle A Turn Right</td>
|
||||
<td>J</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Paddle 2 Fire</td>
|
||||
<td>Paddle A Fire</td>
|
||||
<td>F</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Paddle 3 Turn Left</td>
|
||||
<td>Paddle B Turn Left</td>
|
||||
<td>Y</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Paddle 3 Turn Right</td>
|
||||
<td>Paddle B Turn Right</td>
|
||||
<td>H</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Paddle 3 Fire</td>
|
||||
<td>Paddle B Fire</td>
|
||||
<td>6</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -3913,7 +3913,7 @@
|
|||
Notes:<ul>
|
||||
<li>If nothing seems to happen, either Stella can't see the input device, or the
|
||||
selected event doesn't support being remapped to the input device.</li>
|
||||
<li>The same input can be used for multiple controller types (e.g. 'Right' for 'P0 Joystick Right' and 'Paddle 0 Turn Right').</li>
|
||||
<li>The same input can be used for multiple controller types (e.g. 'Right' for 'Left Joystick Right' and 'Left Paddle A Turn Right').</li>
|
||||
<li>If the same input is used again for the same controller type, the old mapping will be removed.</li>
|
||||
<li>Events which are available in both event modes can be remapped individually.</li>
|
||||
<li>Left and right modifiers are mapped separately when used alone.</li>
|
||||
|
@ -4152,12 +4152,12 @@
|
|||
<ul>
|
||||
<li>The first device found will act as the <b>left game port</b>
|
||||
on a real Atari. Depending on the device, Stella will detect it as
|
||||
either the left joystick, paddles 0 & 1, the left driving controller,
|
||||
either the left joystick, left paddles A & B, the left driving controller,
|
||||
left keypad, etc.</li>
|
||||
|
||||
<li>The second device found will act as the <b>right game port</b>
|
||||
on a real Atari. Depending on the device, Stella will detect it as
|
||||
either the right joystick, paddles 2 & 3, the right driving controller,
|
||||
either the right joystick, right paddles A & B, the right driving controller,
|
||||
right keypad, etc.</li>
|
||||
|
||||
<li>Any other devices will be ignored.</li>
|
||||
|
@ -4870,7 +4870,7 @@ Ms Pac-Man (Stella extended codes):
|
|||
<td VALIGN="TOP"><i>Console.SwapPorts</i></td>
|
||||
<td>Indicates that the left and right ports should be
|
||||
swapped internally. This is used for ROMs like 'Raiders of the Lost Ark' where the
|
||||
Player 0 joystick is plugged into the right joystick port.
|
||||
1st player's joystick is plugged into the right joystick port.
|
||||
The value must be <b>Yes</b> or <b>No</b>.</td>
|
||||
</tr>
|
||||
|
||||
|
@ -4878,8 +4878,8 @@ Ms Pac-Man (Stella extended codes):
|
|||
<td VALIGN="TOP"><i>Controller.SwapPaddles</i></td>
|
||||
<td>Indicates that the left and right paddles in
|
||||
a particular port should be swapped. This is used for ROMs like
|
||||
'Demons to Diamonds' where the default paddle is paddle 1, not
|
||||
paddle 0. Other ROMs such as 'Tac-Scan' default to paddle 3,
|
||||
'Demons to Diamonds' where the default paddle is left paddle B, not
|
||||
left paddle A. Other ROMs such as 'Tac-Scan' default to right paddle B,
|
||||
which can be set using both 'Controller.SwapPaddles' and
|
||||
'Console.SwapPorts'. The value must be <b>Yes</b> or <b>No</b>.</td>
|
||||
</tr>
|
||||
|
@ -4903,14 +4903,14 @@ Ms Pac-Man (Stella extended codes):
|
|||
Y-axis and right button. The value must be <b>Auto</b> or <b>XY</b>, as follows:
|
||||
<table cellpadding="2" border="1">
|
||||
<tr><th> Id </th><th>Controller</th></tr>
|
||||
<tr><td>0 </td><td>Paddle 0</td></tr>
|
||||
<tr><td>1 </td><td>Paddle 1</td></tr>
|
||||
<tr><td>2 </td><td>Paddle 2</td></tr>
|
||||
<tr><td>3 </td><td>Paddle 3</td></tr>
|
||||
<tr><td>4 </td><td>Driving 0</td></tr>
|
||||
<tr><td>5 </td><td>Driving 1</td></tr>
|
||||
<tr><td>6 </td><td>MindLink 0</td></tr>
|
||||
<tr><td>7 </td><td>MindLink 1</td></tr>
|
||||
<tr><td>0 </td><td>Left Paddle A</td></tr>
|
||||
<tr><td>1 </td><td>Left Paddle B</td></tr>
|
||||
<tr><td>2 </td><td>Right Paddle A</td></tr>
|
||||
<tr><td>3 </td><td>Right Paddle B</td></tr>
|
||||
<tr><td>4 </td><td>Left Driving</td></tr>
|
||||
<tr><td>5 </td><td>Right Driving</td></tr>
|
||||
<tr><td>6 </td><td>Left MindLink</td></tr>
|
||||
<tr><td>7 </td><td>Right MindLink</td></tr>
|
||||
</table>
|
||||
An <I>optional</I> second parameter (default of 100) indicates how much
|
||||
of the paddle range the mouse should emulate.
|
||||
|
|
|
@ -54,45 +54,45 @@ MouseControl::MouseControl(Console& console, const string& mode)
|
|||
case MouseControl::Type::NoControl:
|
||||
msg << "not used";
|
||||
break;
|
||||
case MouseControl::Type::Paddle0:
|
||||
case MouseControl::Type::PaddleLeftA:
|
||||
type = Controller::Type::Paddles;
|
||||
id = 0;
|
||||
msg << "Paddle 0";
|
||||
msg << "Left Paddle A";
|
||||
break;
|
||||
case MouseControl::Type::Paddle1:
|
||||
case MouseControl::Type::PaddleLeftB:
|
||||
type = Controller::Type::Paddles;
|
||||
id = 1;
|
||||
msg << "Paddle 1";
|
||||
msg << "Left Paddle B";
|
||||
break;
|
||||
case MouseControl::Type::Paddle2:
|
||||
case MouseControl::Type::PaddleRightA:
|
||||
type = Controller::Type::Paddles;
|
||||
id = 2;
|
||||
msg << "Paddle 2";
|
||||
msg << "Right Paddle A";
|
||||
break;
|
||||
case MouseControl::Type::Paddle3:
|
||||
case MouseControl::Type::PaddleRightB:
|
||||
type = Controller::Type::Paddles;
|
||||
id = 3;
|
||||
msg << "Paddle 3";
|
||||
msg << "Right Paddle B";
|
||||
break;
|
||||
case MouseControl::Type::Driving0:
|
||||
case MouseControl::Type::DrivingLeft:
|
||||
type = Controller::Type::Driving;
|
||||
id = 0;
|
||||
msg << "Driving 0";
|
||||
msg << "Left Driving";
|
||||
break;
|
||||
case MouseControl::Type::Driving1:
|
||||
case MouseControl::Type::DrivingRight:
|
||||
type = Controller::Type::Driving;
|
||||
id = 1;
|
||||
msg << "Driving 1";
|
||||
msg << "Right Driving";
|
||||
break;
|
||||
case MouseControl::Type::MindLink0:
|
||||
case MouseControl::Type::MindLinkLeft:
|
||||
type = Controller::Type::MindLink;
|
||||
id = 0;
|
||||
msg << "MindLink 0";
|
||||
msg << "Left MindLink";
|
||||
break;
|
||||
case MouseControl::Type::MindLink1:
|
||||
case MouseControl::Type::MindLinkRight:
|
||||
type = Controller::Type::MindLink;
|
||||
id = 1;
|
||||
msg << "MindLink 1";
|
||||
msg << "Right MindLink";
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -43,8 +43,8 @@ class MouseControl
|
|||
*/
|
||||
enum class Type
|
||||
{
|
||||
Paddle0 = 0, Paddle1, Paddle2, Paddle3,
|
||||
Driving0, Driving1, MindLink0, MindLink1,
|
||||
PaddleLeftA = 0, PaddleLeftB, PaddleRightA, PaddleRightB,
|
||||
DrivingLeft, DrivingRight, MindLinkLeft, MindLinkRight,
|
||||
NoControl
|
||||
};
|
||||
|
||||
|
|
|
@ -1068,113 +1068,113 @@ void PhysicalJoystickHandler::changeDrivingSensitivity(int direction)
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
PhysicalJoystickHandler::EventMappingArray PhysicalJoystickHandler::DefaultLeftJoystickMapping = {
|
||||
// Left joystick (assume buttons zero..two)
|
||||
{Event::JoystickZeroFire, 0},
|
||||
{Event::JoystickZeroFire5, 1},
|
||||
{Event::JoystickZeroFire9, 2},
|
||||
{Event::JoystickLeftFire, 0},
|
||||
{Event::JoystickLeftFire5, 1},
|
||||
{Event::JoystickLeftFire9, 2},
|
||||
// Left joystick left/right directions
|
||||
{Event::JoystickZeroLeft, JOY_CTRL_NONE, JoyAxis::X, JoyDir::NEG},
|
||||
{Event::JoystickZeroRight, JOY_CTRL_NONE, JoyAxis::X, JoyDir::POS},
|
||||
{Event::JoystickLeftLeft, JOY_CTRL_NONE, JoyAxis::X, JoyDir::NEG},
|
||||
{Event::JoystickLeftRight, JOY_CTRL_NONE, JoyAxis::X, JoyDir::POS},
|
||||
// Left joystick up/down directions
|
||||
{Event::JoystickZeroUp, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::NEG},
|
||||
{Event::JoystickZeroDown, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::POS},
|
||||
{Event::JoystickLeftUp, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::NEG},
|
||||
{Event::JoystickLeftDown, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::POS},
|
||||
// Left joystick left/right directions (assume hat 0)
|
||||
{Event::JoystickZeroLeft, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::LEFT},
|
||||
{Event::JoystickZeroRight, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::RIGHT},
|
||||
{Event::JoystickLeftLeft, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::LEFT},
|
||||
{Event::JoystickLeftRight, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::RIGHT},
|
||||
// Left joystick up/down directions (assume hat 0)
|
||||
{Event::JoystickZeroUp, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::UP},
|
||||
{Event::JoystickZeroDown, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::DOWN},
|
||||
{Event::JoystickLeftUp, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::UP},
|
||||
{Event::JoystickLeftDown, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::DOWN},
|
||||
};
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
PhysicalJoystickHandler::EventMappingArray PhysicalJoystickHandler::DefaultRightJoystickMapping = {
|
||||
// Right joystick (assume buttons zero..two)
|
||||
{Event::JoystickOneFire, 0},
|
||||
{Event::JoystickOneFire5, 1},
|
||||
{Event::JoystickOneFire9, 2},
|
||||
{Event::JoystickRightFire, 0},
|
||||
{Event::JoystickRightFire5, 1},
|
||||
{Event::JoystickRightFire9, 2},
|
||||
// Right joystick left/right directions
|
||||
{Event::JoystickOneLeft, JOY_CTRL_NONE, JoyAxis::X, JoyDir::NEG},
|
||||
{Event::JoystickOneRight, JOY_CTRL_NONE, JoyAxis::X, JoyDir::POS},
|
||||
{Event::JoystickRightLeft, JOY_CTRL_NONE, JoyAxis::X, JoyDir::NEG},
|
||||
{Event::JoystickRightRight, JOY_CTRL_NONE, JoyAxis::X, JoyDir::POS},
|
||||
// Right joystick up/down directions
|
||||
{Event::JoystickOneUp, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::NEG},
|
||||
{Event::JoystickOneDown, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::POS},
|
||||
{Event::JoystickRightUp, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::NEG},
|
||||
{Event::JoystickRightDown, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::POS},
|
||||
// Right joystick left/right directions (assume hat 0)
|
||||
{Event::JoystickOneLeft, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::LEFT},
|
||||
{Event::JoystickOneRight, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::RIGHT},
|
||||
{Event::JoystickRightLeft, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::LEFT},
|
||||
{Event::JoystickRightRight, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::RIGHT},
|
||||
// Right joystick up/down directions (assume hat 0)
|
||||
{Event::JoystickOneUp, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::UP},
|
||||
{Event::JoystickOneDown, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::DOWN},
|
||||
{Event::JoystickRightUp, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::UP},
|
||||
{Event::JoystickRightDown, JOY_CTRL_NONE, JoyAxis::NONE, JoyDir::NONE, 0, JoyHatDir::DOWN},
|
||||
};
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
PhysicalJoystickHandler::EventMappingArray PhysicalJoystickHandler::DefaultLeftPaddlesMapping = {
|
||||
{Event::PaddleZeroAnalog, JOY_CTRL_NONE, JoyAxis::X, JoyDir::ANALOG},
|
||||
{Event::PaddleLeftAAnalog, JOY_CTRL_NONE, JoyAxis::X, JoyDir::ANALOG},
|
||||
#if defined(RETRON77)
|
||||
{Event::PaddleZeroAnalog, JOY_CTRL_NONE, JoyAxis::Z, JoyDir::ANALOG},
|
||||
{Event::PaddleLeftAAnalog, 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::PaddleZeroDecrease, JOY_CTRL_NONE, JoyAxis::X, JoyDir::POS},
|
||||
//{Event::PaddleZeroIncrease, JOY_CTRL_NONE, JoyAxis::X, JoyDir::NEG},
|
||||
{Event::PaddleZeroFire, 0},
|
||||
{Event::PaddleOneAnalog, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::ANALOG},
|
||||
//{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},
|
||||
#if defined(RETRON77)
|
||||
{Event::PaddleOneAnalog, JOY_CTRL_NONE, JoyAxis::A3, JoyDir::ANALOG},
|
||||
{Event::PaddleLeftBAnalog, 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::PaddleOneDecrease, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::POS},
|
||||
//{Event::PaddleOneIncrease, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::NEG},
|
||||
{Event::PaddleOneFire, 1},
|
||||
//{Event::PaddleLeftBDecrease, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::POS},
|
||||
//{Event::PaddleLeftBIncrease, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::NEG},
|
||||
{Event::PaddleLeftBFire, 1},
|
||||
};
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
PhysicalJoystickHandler::EventMappingArray PhysicalJoystickHandler::DefaultRightPaddlesMapping = {
|
||||
{Event::PaddleTwoAnalog, JOY_CTRL_NONE, JoyAxis::X, JoyDir::ANALOG},
|
||||
{Event::PaddleRightAAnalog, JOY_CTRL_NONE, JoyAxis::X, JoyDir::ANALOG},
|
||||
#if defined(RETRON77)
|
||||
{Event::PaddleTwoAnalog, JOY_CTRL_NONE, JoyAxis::Z, JoyDir::ANALOG},
|
||||
{Event::PaddleRightAAnalog, 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::PaddleTwoDecrease, JOY_CTRL_NONE, JoyAxis::X, JoyDir::POS},
|
||||
//{Event::PaddleTwoIncrease, JOY_CTRL_NONE, JoyAxis::X, JoyDir::NEG},
|
||||
{Event::PaddleTwoFire, 0},
|
||||
{Event::PaddleThreeAnalog, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::ANALOG},
|
||||
//{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},
|
||||
#if defined(RETRON77)
|
||||
{Event::PaddleThreeAnalog, JOY_CTRL_NONE, JoyAxis::A3, JoyDir::ANALOG},
|
||||
{Event::PaddleRightBAnalog, 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::PaddleThreeDecrease,JOY_CTRL_NONE, JoyAxis::Y, JoyDir::POS},
|
||||
//{Event::PaddleThreeIncrease,JOY_CTRL_NONE, JoyAxis::Y, JoyDir::NEG},
|
||||
{Event::PaddleThreeFire, 1},
|
||||
//{Event::PaddleRightBDecrease,JOY_CTRL_NONE, JoyAxis::Y, JoyDir::POS},
|
||||
//{Event::PaddleRightBIncrease,JOY_CTRL_NONE, JoyAxis::Y, JoyDir::NEG},
|
||||
{Event::PaddleRightBFire, 1},
|
||||
};
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
PhysicalJoystickHandler::EventMappingArray PhysicalJoystickHandler::DefaultLeftKeypadMapping = {
|
||||
{Event::KeyboardZero1, 0},
|
||||
{Event::KeyboardZero2, 1},
|
||||
{Event::KeyboardZero3, 2},
|
||||
{Event::KeyboardZero4, 3},
|
||||
{Event::KeyboardZero5, 4},
|
||||
{Event::KeyboardZero6, 5},
|
||||
{Event::KeyboardZero7, 6},
|
||||
{Event::KeyboardZero8, 7},
|
||||
{Event::KeyboardZero9, 8},
|
||||
{Event::KeyboardZeroStar, 9},
|
||||
{Event::KeyboardZero0, 10},
|
||||
{Event::KeyboardZeroPound, 11},
|
||||
{Event::LeftKeyboard1, 0},
|
||||
{Event::LeftKeyboard2, 1},
|
||||
{Event::LeftKeyboard3, 2},
|
||||
{Event::LeftKeyboard4, 3},
|
||||
{Event::LeftKeyboard5, 4},
|
||||
{Event::LeftKeyboard6, 5},
|
||||
{Event::LeftKeyboard7, 6},
|
||||
{Event::LeftKeyboard8, 7},
|
||||
{Event::LeftKeyboard9, 8},
|
||||
{Event::LeftKeyboardStar, 9},
|
||||
{Event::LeftKeyboard0, 10},
|
||||
{Event::LeftKeyboardPound, 11},
|
||||
};
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
PhysicalJoystickHandler::EventMappingArray PhysicalJoystickHandler::DefaultRightKeypadMapping = {
|
||||
{Event::KeyboardOne1, 0},
|
||||
{Event::KeyboardOne2, 1},
|
||||
{Event::KeyboardOne3, 2},
|
||||
{Event::KeyboardOne4, 3},
|
||||
{Event::KeyboardOne5, 4},
|
||||
{Event::KeyboardOne6, 5},
|
||||
{Event::KeyboardOne7, 6},
|
||||
{Event::KeyboardOne8, 7},
|
||||
{Event::KeyboardOne9, 8},
|
||||
{Event::KeyboardOneStar, 9},
|
||||
{Event::KeyboardOne0, 10},
|
||||
{Event::KeyboardOnePound, 11},
|
||||
{Event::RightKeyboard1, 0},
|
||||
{Event::RightKeyboard2, 1},
|
||||
{Event::RightKeyboard3, 2},
|
||||
{Event::RightKeyboard4, 3},
|
||||
{Event::RightKeyboard5, 4},
|
||||
{Event::RightKeyboard6, 5},
|
||||
{Event::RightKeyboard7, 6},
|
||||
{Event::RightKeyboard8, 7},
|
||||
{Event::RightKeyboard9, 8},
|
||||
{Event::RightKeyboardStar, 9},
|
||||
{Event::RightKeyboard0, 10},
|
||||
{Event::RightKeyboardPound, 11},
|
||||
};
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -292,28 +292,28 @@ void PhysicalKeyboardHandler::enableEmulationMappings()
|
|||
switch(myRight2ndMode)
|
||||
{
|
||||
case EventMode::kPaddlesMode:
|
||||
enableMappings(Right2PaddlesEvents, EventMode::kPaddlesMode);
|
||||
enableMappings(QTPaddles4Events, EventMode::kPaddlesMode);
|
||||
break;
|
||||
|
||||
case EventMode::kEmulationMode: // no QuadTari
|
||||
break;
|
||||
|
||||
default:
|
||||
enableMappings(Right2JoystickEvents, EventMode::kJoystickMode);
|
||||
enableMappings(QTJoystick4Events, EventMode::kJoystickMode);
|
||||
break;
|
||||
}
|
||||
|
||||
switch(myLeft2ndMode)
|
||||
{
|
||||
case EventMode::kPaddlesMode:
|
||||
enableMappings(Left2PaddlesEvents, EventMode::kPaddlesMode);
|
||||
enableMappings(QTPaddles3Events, EventMode::kPaddlesMode);
|
||||
break;
|
||||
|
||||
case EventMode::kEmulationMode: // no QuadTari
|
||||
break;
|
||||
|
||||
default:
|
||||
enableMappings(Left2JoystickEvents, EventMode::kJoystickMode);
|
||||
enableMappings(QTJoystick3Events, EventMode::kJoystickMode);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -414,18 +414,18 @@ EventMode PhysicalKeyboardHandler::getEventMode(const Event::Type event,
|
|||
bool PhysicalKeyboardHandler::isJoystickEvent(const Event::Type event) const
|
||||
{
|
||||
return LeftJoystickEvents.find(event) != LeftJoystickEvents.end()
|
||||
|| Left2JoystickEvents.find(event) != Left2JoystickEvents.end()
|
||||
|| QTJoystick3Events.find(event) != QTJoystick3Events.end()
|
||||
|| RightJoystickEvents.find(event) != RightJoystickEvents.end()
|
||||
|| Right2JoystickEvents.find(event) != Right2JoystickEvents.end();
|
||||
|| QTJoystick4Events.find(event) != QTJoystick4Events.end();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool PhysicalKeyboardHandler::isPaddleEvent(const Event::Type event) const
|
||||
{
|
||||
return LeftPaddlesEvents.find(event) != LeftPaddlesEvents.end()
|
||||
|| Left2PaddlesEvents.find(event) != Left2PaddlesEvents.end()
|
||||
|| QTPaddles3Events.find(event) != QTPaddles3Events.end()
|
||||
|| RightPaddlesEvents.find(event) != RightPaddlesEvents.end()
|
||||
|| Right2PaddlesEvents.find(event) != Right2PaddlesEvents.end();
|
||||
|| QTPaddles4Events.find(event) != QTPaddles4Events.end();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -936,107 +936,107 @@ PhysicalKeyboardHandler::FixedPromptMapping = {
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
PhysicalKeyboardHandler::EventMappingArray PhysicalKeyboardHandler::DefaultJoystickMapping = {
|
||||
{Event::JoystickZeroUp, KBDK_UP},
|
||||
{Event::JoystickZeroDown, KBDK_DOWN},
|
||||
{Event::JoystickZeroLeft, KBDK_LEFT},
|
||||
{Event::JoystickZeroRight, KBDK_RIGHT},
|
||||
{Event::JoystickZeroUp, KBDK_KP_8},
|
||||
{Event::JoystickZeroDown, KBDK_KP_2},
|
||||
{Event::JoystickZeroLeft, KBDK_KP_4},
|
||||
{Event::JoystickZeroRight, KBDK_KP_6},
|
||||
{Event::JoystickZeroFire, KBDK_SPACE},
|
||||
{Event::JoystickZeroFire, KBDK_LCTRL},
|
||||
{Event::JoystickZeroFire, KBDK_KP_5},
|
||||
{Event::JoystickZeroFire5, KBDK_4},
|
||||
{Event::JoystickZeroFire5, KBDK_RSHIFT},
|
||||
{Event::JoystickZeroFire5, KBDK_KP_9},
|
||||
{Event::JoystickZeroFire9, KBDK_5},
|
||||
{Event::JoystickZeroFire9, KBDK_RCTRL},
|
||||
{Event::JoystickZeroFire9, KBDK_KP_3},
|
||||
{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::JoystickOneUp, KBDK_Y},
|
||||
{Event::JoystickOneDown, KBDK_H},
|
||||
{Event::JoystickOneLeft, KBDK_G},
|
||||
{Event::JoystickOneRight, KBDK_J},
|
||||
{Event::JoystickOneFire, KBDK_F},
|
||||
{Event::JoystickOneFire5, KBDK_6},
|
||||
{Event::JoystickOneFire9, KBDK_7},
|
||||
{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},
|
||||
|
||||
// Same as Joysticks Zero & One + SHIFT
|
||||
{Event::JoystickTwoUp, KBDK_UP, KBDM_SHIFT},
|
||||
{Event::JoystickTwoDown, KBDK_DOWN, KBDM_SHIFT},
|
||||
{Event::JoystickTwoLeft, KBDK_LEFT, KBDM_SHIFT},
|
||||
{Event::JoystickTwoRight, KBDK_RIGHT, KBDM_SHIFT},
|
||||
{Event::JoystickTwoUp, KBDK_KP_8, KBDM_SHIFT},
|
||||
{Event::JoystickTwoDown, KBDK_KP_2, KBDM_SHIFT},
|
||||
{Event::JoystickTwoLeft, KBDK_KP_4, KBDM_SHIFT},
|
||||
{Event::JoystickTwoRight, KBDK_KP_6, KBDM_SHIFT},
|
||||
{Event::JoystickTwoFire, KBDK_SPACE, KBDM_SHIFT},
|
||||
{Event::QTJoystickThreeUp, KBDK_UP, KBDM_SHIFT},
|
||||
{Event::QTJoystickThreeDown, KBDK_DOWN, KBDM_SHIFT},
|
||||
{Event::QTJoystickThreeLeft, KBDK_LEFT, KBDM_SHIFT},
|
||||
{Event::QTJoystickThreeRight, KBDK_RIGHT, KBDM_SHIFT},
|
||||
{Event::QTJoystickThreeUp, KBDK_KP_8, KBDM_SHIFT},
|
||||
{Event::QTJoystickThreeDown, KBDK_KP_2, KBDM_SHIFT},
|
||||
{Event::QTJoystickThreeLeft, KBDK_KP_4, KBDM_SHIFT},
|
||||
{Event::QTJoystickThreeRight, KBDK_KP_6, KBDM_SHIFT},
|
||||
{Event::QTJoystickThreeFire, KBDK_SPACE, KBDM_SHIFT},
|
||||
|
||||
{Event::JoystickThreeUp, KBDK_Y, KBDM_SHIFT},
|
||||
{Event::JoystickThreeDown, KBDK_H, KBDM_SHIFT},
|
||||
{Event::JoystickThreeLeft, KBDK_G, KBDM_SHIFT},
|
||||
{Event::JoystickThreeRight, KBDK_J, KBDM_SHIFT},
|
||||
{Event::JoystickThreeFire, KBDK_F, KBDM_SHIFT},
|
||||
{Event::QTJoystickFourUp, KBDK_Y, KBDM_SHIFT},
|
||||
{Event::QTJoystickFourDown, KBDK_H, KBDM_SHIFT},
|
||||
{Event::QTJoystickFourLeft, KBDK_G, KBDM_SHIFT},
|
||||
{Event::QTJoystickFourRight, KBDK_J, KBDM_SHIFT},
|
||||
{Event::QTJoystickFourFire, KBDK_F, KBDM_SHIFT},
|
||||
};
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
PhysicalKeyboardHandler::EventMappingArray
|
||||
PhysicalKeyboardHandler::DefaultPaddleMapping = {
|
||||
{Event::PaddleZeroDecrease, KBDK_RIGHT},
|
||||
{Event::PaddleZeroIncrease, KBDK_LEFT},
|
||||
{Event::PaddleZeroFire, KBDK_SPACE},
|
||||
{Event::PaddleZeroFire, KBDK_LCTRL},
|
||||
{Event::PaddleZeroFire, KBDK_KP_5},
|
||||
{Event::PaddleLeftADecrease, KBDK_RIGHT},
|
||||
{Event::PaddleLeftAIncrease, KBDK_LEFT},
|
||||
{Event::PaddleLeftAFire, KBDK_SPACE},
|
||||
{Event::PaddleLeftAFire, KBDK_LCTRL},
|
||||
{Event::PaddleLeftAFire, KBDK_KP_5},
|
||||
|
||||
{Event::PaddleOneDecrease, KBDK_DOWN},
|
||||
{Event::PaddleOneIncrease, KBDK_UP},
|
||||
{Event::PaddleOneFire, KBDK_4},
|
||||
{Event::PaddleOneFire, KBDK_RCTRL},
|
||||
{Event::PaddleLeftBDecrease, KBDK_DOWN},
|
||||
{Event::PaddleLeftBIncrease, KBDK_UP},
|
||||
{Event::PaddleLeftBFire, KBDK_4},
|
||||
{Event::PaddleLeftBFire, KBDK_RCTRL},
|
||||
|
||||
{Event::PaddleTwoDecrease, KBDK_J},
|
||||
{Event::PaddleTwoIncrease, KBDK_G},
|
||||
{Event::PaddleTwoFire, KBDK_F},
|
||||
{Event::PaddleRightADecrease, KBDK_J},
|
||||
{Event::PaddleRightAIncrease, KBDK_G},
|
||||
{Event::PaddleRightAFire, KBDK_F},
|
||||
|
||||
{Event::PaddleThreeDecrease, KBDK_H},
|
||||
{Event::PaddleThreeIncrease, KBDK_Y},
|
||||
{Event::PaddleThreeFire, KBDK_6},
|
||||
{Event::PaddleRightBDecrease, KBDK_H},
|
||||
{Event::PaddleRightBIncrease, KBDK_Y},
|
||||
{Event::PaddleRightBFire, KBDK_6},
|
||||
|
||||
// Same as Paddles Zero..Three Fire + SHIFT
|
||||
{Event::PaddleFourFire, KBDK_SPACE, KBDM_SHIFT},
|
||||
{Event::PaddleFiveFire, KBDK_4, KBDM_SHIFT},
|
||||
{Event::PaddleSixFire, KBDK_F, KBDM_SHIFT},
|
||||
{Event::PaddleSevenFire, KBDK_6, KBDM_SHIFT},
|
||||
{Event::QTPaddle3AFire, KBDK_SPACE, KBDM_SHIFT},
|
||||
{Event::QTPaddle3BFire, KBDK_4, KBDM_SHIFT},
|
||||
{Event::QTPaddle4AFire, KBDK_F, KBDM_SHIFT},
|
||||
{Event::QTPaddle4BFire, KBDK_6, KBDM_SHIFT},
|
||||
};
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
PhysicalKeyboardHandler::EventMappingArray
|
||||
PhysicalKeyboardHandler::DefaultKeypadMapping = {
|
||||
{Event::KeyboardZero1, KBDK_1},
|
||||
{Event::KeyboardZero2, KBDK_2},
|
||||
{Event::KeyboardZero3, KBDK_3},
|
||||
{Event::KeyboardZero4, KBDK_Q},
|
||||
{Event::KeyboardZero5, KBDK_W},
|
||||
{Event::KeyboardZero6, KBDK_E},
|
||||
{Event::KeyboardZero7, KBDK_A},
|
||||
{Event::KeyboardZero8, KBDK_S},
|
||||
{Event::KeyboardZero9, KBDK_D},
|
||||
{Event::KeyboardZeroStar, KBDK_Z},
|
||||
{Event::KeyboardZero0, KBDK_X},
|
||||
{Event::KeyboardZeroPound, KBDK_C},
|
||||
{Event::LeftKeyboard1, KBDK_1},
|
||||
{Event::LeftKeyboard2, KBDK_2},
|
||||
{Event::LeftKeyboard3, KBDK_3},
|
||||
{Event::LeftKeyboard4, KBDK_Q},
|
||||
{Event::LeftKeyboard5, KBDK_W},
|
||||
{Event::LeftKeyboard6, KBDK_E},
|
||||
{Event::LeftKeyboard7, KBDK_A},
|
||||
{Event::LeftKeyboard8, KBDK_S},
|
||||
{Event::LeftKeyboard9, KBDK_D},
|
||||
{Event::LeftKeyboardStar, KBDK_Z},
|
||||
{Event::LeftKeyboard0, KBDK_X},
|
||||
{Event::LeftKeyboardPound, KBDK_C},
|
||||
|
||||
{Event::KeyboardOne1, KBDK_8},
|
||||
{Event::KeyboardOne2, KBDK_9},
|
||||
{Event::KeyboardOne3, KBDK_0},
|
||||
{Event::KeyboardOne4, KBDK_I},
|
||||
{Event::KeyboardOne5, KBDK_O},
|
||||
{Event::KeyboardOne6, KBDK_P},
|
||||
{Event::KeyboardOne7, KBDK_K},
|
||||
{Event::KeyboardOne8, KBDK_L},
|
||||
{Event::KeyboardOne9, KBDK_SEMICOLON},
|
||||
{Event::KeyboardOneStar, KBDK_COMMA},
|
||||
{Event::KeyboardOne0, KBDK_PERIOD},
|
||||
{Event::KeyboardOnePound, KBDK_SLASH},
|
||||
{Event::RightKeyboard1, KBDK_8},
|
||||
{Event::RightKeyboard2, KBDK_9},
|
||||
{Event::RightKeyboard3, KBDK_0},
|
||||
{Event::RightKeyboard4, KBDK_I},
|
||||
{Event::RightKeyboard5, KBDK_O},
|
||||
{Event::RightKeyboard6, KBDK_P},
|
||||
{Event::RightKeyboard7, KBDK_K},
|
||||
{Event::RightKeyboard8, KBDK_L},
|
||||
{Event::RightKeyboard9, KBDK_SEMICOLON},
|
||||
{Event::RightKeyboardStar, KBDK_COMMA},
|
||||
{Event::RightKeyboard0, KBDK_PERIOD},
|
||||
{Event::RightKeyboardPound, KBDK_SLASH},
|
||||
};
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -73,74 +73,74 @@ NLOHMANN_JSON_SERIALIZE_ENUM(Event::Type, {
|
|||
{Event::ConsoleRightDiffToggle, "ConsoleRightDiffToggle"},
|
||||
{Event::ConsoleSelect, "ConsoleSelect"},
|
||||
{Event::ConsoleReset, "ConsoleReset"},
|
||||
{Event::JoystickZeroUp, "JoystickZeroUp"},
|
||||
{Event::JoystickZeroDown, "JoystickZeroDown"},
|
||||
{Event::JoystickZeroLeft, "JoystickZeroLeft"},
|
||||
{Event::JoystickZeroRight, "JoystickZeroRight"},
|
||||
{Event::JoystickZeroFire, "JoystickZeroFire"},
|
||||
{Event::JoystickZeroFire5, "JoystickZeroFire5"},
|
||||
{Event::JoystickZeroFire9, "JoystickZeroFire9"},
|
||||
{Event::JoystickOneUp, "JoystickOneUp"},
|
||||
{Event::JoystickOneDown, "JoystickOneDown"},
|
||||
{Event::JoystickOneLeft, "JoystickOneLeft"},
|
||||
{Event::JoystickOneRight, "JoystickOneRight"},
|
||||
{Event::JoystickOneFire, "JoystickOneFire"},
|
||||
{Event::JoystickOneFire5, "JoystickOneFire5"},
|
||||
{Event::JoystickOneFire9, "JoystickOneFire9"},
|
||||
{Event::JoystickTwoUp, "JoystickTwoUp"},
|
||||
{Event::JoystickTwoDown, "JoystickTwoDown"},
|
||||
{Event::JoystickTwoLeft, "JoystickTwoLeft"},
|
||||
{Event::JoystickTwoRight, "JoystickTwoRight"},
|
||||
{Event::JoystickTwoFire, "JoystickTwoFire"},
|
||||
{Event::JoystickThreeUp, "JoystickThreeUp"},
|
||||
{Event::JoystickThreeDown, "JoystickThreeDown"},
|
||||
{Event::JoystickThreeLeft, "JoystickThreeLeft"},
|
||||
{Event::JoystickThreeRight, "JoystickThreeRight"},
|
||||
{Event::JoystickThreeFire, "JoystickThreeFire"},
|
||||
{Event::PaddleZeroDecrease, "PaddleZeroDecrease"},
|
||||
{Event::PaddleZeroIncrease, "PaddleZeroIncrease"},
|
||||
{Event::PaddleZeroAnalog, "PaddleZeroAnalog"},
|
||||
{Event::PaddleZeroFire, "PaddleZeroFire"},
|
||||
{Event::PaddleOneDecrease, "PaddleOneDecrease"},
|
||||
{Event::PaddleOneIncrease, "PaddleOneIncrease"},
|
||||
{Event::PaddleOneAnalog, "PaddleOneAnalog"},
|
||||
{Event::PaddleOneFire, "PaddleOneFire"},
|
||||
{Event::PaddleTwoDecrease, "PaddleTwoDecrease"},
|
||||
{Event::PaddleTwoIncrease, "PaddleTwoIncrease"},
|
||||
{Event::PaddleTwoAnalog, "PaddleTwoAnalog"},
|
||||
{Event::PaddleTwoFire, "PaddleTwoFire"},
|
||||
{Event::PaddleThreeDecrease, "PaddleThreeDecrease"},
|
||||
{Event::PaddleThreeIncrease, "PaddleThreeIncrease"},
|
||||
{Event::PaddleThreeAnalog, "PaddleThreeAnalog"},
|
||||
{Event::PaddleThreeFire, "PaddleThreeFire"},
|
||||
{Event::PaddleFourFire, "PaddleFourFire"},
|
||||
{Event::PaddleFiveFire, "PaddleFiveFire"},
|
||||
{Event::PaddleSixFire, "PaddleSixFire"},
|
||||
{Event::PaddleSevenFire, "PaddleSevenFire"},
|
||||
{Event::KeyboardZero1, "KeyboardZero1"},
|
||||
{Event::KeyboardZero2, "KeyboardZero2"},
|
||||
{Event::KeyboardZero3, "KeyboardZero3"},
|
||||
{Event::KeyboardZero4, "KeyboardZero4"},
|
||||
{Event::KeyboardZero5, "KeyboardZero5"},
|
||||
{Event::KeyboardZero6, "KeyboardZero6"},
|
||||
{Event::KeyboardZero7, "KeyboardZero7"},
|
||||
{Event::KeyboardZero8, "KeyboardZero8"},
|
||||
{Event::KeyboardZero9, "KeyboardZero9"},
|
||||
{Event::KeyboardZeroStar, "KeyboardZeroStar"},
|
||||
{Event::KeyboardZero0, "KeyboardZero0"},
|
||||
{Event::KeyboardZeroPound, "KeyboardZeroPound"},
|
||||
{Event::KeyboardOne1, "KeyboardOne1"},
|
||||
{Event::KeyboardOne2, "KeyboardOne2"},
|
||||
{Event::KeyboardOne3, "KeyboardOne3"},
|
||||
{Event::KeyboardOne4, "KeyboardOne4"},
|
||||
{Event::KeyboardOne5, "KeyboardOne5"},
|
||||
{Event::KeyboardOne6, "KeyboardOne6"},
|
||||
{Event::KeyboardOne7, "KeyboardOne7"},
|
||||
{Event::KeyboardOne8, "KeyboardOne8"},
|
||||
{Event::KeyboardOne9, "KeyboardOne9"},
|
||||
{Event::KeyboardOneStar, "KeyboardOneStar"},
|
||||
{Event::KeyboardOne0, "KeyboardOne0"},
|
||||
{Event::KeyboardOnePound, "KeyboardOnePound"},
|
||||
{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::QTJoystickThreeUp, "QTJoystickThreeUp"},
|
||||
{Event::QTJoystickThreeDown, "QTJoystickThreeDown"},
|
||||
{Event::QTJoystickThreeLeft, "QTJoystickThreeLeft"},
|
||||
{Event::QTJoystickThreeRight, "QTJoystickThreeRight"},
|
||||
{Event::QTJoystickThreeFire, "QTJoystickThreeFire"},
|
||||
{Event::QTJoystickFourUp, "QTJoystickFourUp"},
|
||||
{Event::QTJoystickFourDown, "QTJoystickFourDown"},
|
||||
{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::QTPaddle3AFire, "QTPaddle3AFire"},
|
||||
{Event::QTPaddle3BFire, "QTPaddle3BFire"},
|
||||
{Event::QTPaddle4AFire, "QTPaddle4AFire"},
|
||||
{Event::QTPaddle4BFire, "QTPaddle4BFire"},
|
||||
{Event::LeftKeyboard1, "LeftKeyboard1"},
|
||||
{Event::LeftKeyboard2, "LeftKeyboard2"},
|
||||
{Event::LeftKeyboard3, "LeftKeyboard3"},
|
||||
{Event::LeftKeyboard4, "LeftKeyboard4"},
|
||||
{Event::LeftKeyboard5, "LeftKeyboard5"},
|
||||
{Event::LeftKeyboard6, "LeftKeyboard6"},
|
||||
{Event::LeftKeyboard7, "LeftKeyboard7"},
|
||||
{Event::LeftKeyboard8, "LeftKeyboard8"},
|
||||
{Event::LeftKeyboard9, "LeftKeyboard9"},
|
||||
{Event::LeftKeyboardStar, "LeftKeyboardStar"},
|
||||
{Event::LeftKeyboard0, "LeftKeyboard0"},
|
||||
{Event::LeftKeyboardPound, "LeftKeyboardPound"},
|
||||
{Event::RightKeyboard1, "RightKeyboard1"},
|
||||
{Event::RightKeyboard2, "RightKeyboard2"},
|
||||
{Event::RightKeyboard3, "RightKeyboard3"},
|
||||
{Event::RightKeyboard4, "RightKeyboard4"},
|
||||
{Event::RightKeyboard5, "RightKeyboard5"},
|
||||
{Event::RightKeyboard6, "RightKeyboard6"},
|
||||
{Event::RightKeyboard7, "RightKeyboard7"},
|
||||
{Event::RightKeyboard8, "RightKeyboard8"},
|
||||
{Event::RightKeyboard9, "RightKeyboard9"},
|
||||
{Event::RightKeyboardStar, "RightKeyboardStar"},
|
||||
{Event::RightKeyboard0, "RightKeyboard0"},
|
||||
{Event::RightKeyboardPound, "RightKeyboardPound"},
|
||||
{Event::CompuMateFunc, "CompuMateFunc"},
|
||||
{Event::CompuMateShift, "CompuMateShift"},
|
||||
{Event::CompuMate0, "CompuMate0"},
|
||||
|
|
|
@ -33,16 +33,16 @@ class KeyboardWidget : public ControllerWidget
|
|||
const Event::Type* myEvent{nullptr};
|
||||
|
||||
static constexpr std::array<Event::Type, 12> ourLeftEvents = {{
|
||||
Event::KeyboardZero1, Event::KeyboardZero2, Event::KeyboardZero3,
|
||||
Event::KeyboardZero4, Event::KeyboardZero5, Event::KeyboardZero6,
|
||||
Event::KeyboardZero7, Event::KeyboardZero8, Event::KeyboardZero9,
|
||||
Event::KeyboardZeroStar, Event::KeyboardZero0, Event::KeyboardZeroPound
|
||||
Event::LeftKeyboard1, Event::LeftKeyboard2, Event::LeftKeyboard3,
|
||||
Event::LeftKeyboard4, Event::LeftKeyboard5, Event::LeftKeyboard6,
|
||||
Event::LeftKeyboard7, Event::LeftKeyboard8, Event::LeftKeyboard9,
|
||||
Event::LeftKeyboardStar, Event::LeftKeyboard0, Event::LeftKeyboardPound
|
||||
}};
|
||||
static constexpr std::array<Event::Type, 12> ourRightEvents = {{
|
||||
Event::KeyboardOne1, Event::KeyboardOne2, Event::KeyboardOne3,
|
||||
Event::KeyboardOne4, Event::KeyboardOne5, Event::KeyboardOne6,
|
||||
Event::KeyboardOne7, Event::KeyboardOne8, Event::KeyboardOne9,
|
||||
Event::KeyboardOneStar, Event::KeyboardOne0, Event::KeyboardOnePound
|
||||
Event::RightKeyboard1, Event::RightKeyboard2, Event::RightKeyboard3,
|
||||
Event::RightKeyboard4, Event::RightKeyboard5, Event::RightKeyboard6,
|
||||
Event::RightKeyboard7, Event::RightKeyboard8, Event::RightKeyboard9,
|
||||
Event::RightKeyboardStar, Event::RightKeyboard0, Event::RightKeyboardPound
|
||||
}};
|
||||
|
||||
private:
|
||||
|
|
|
@ -488,12 +488,11 @@ string PromptWidget::getLine()
|
|||
{
|
||||
#if defined(PSEUDO_CUT_COPY_PASTE)
|
||||
assert(_promptEndPos >= _promptStartPos);
|
||||
int len = _promptEndPos - _promptStartPos;
|
||||
string text;
|
||||
|
||||
// Copy current line to text
|
||||
for(int i = 0; i < len; i++)
|
||||
text += buffer(_promptStartPos + i) & 0x7f;
|
||||
for(int i = _promptStartPos; i < _promptEndPos; i++)
|
||||
text += buffer(i) & 0x7f;
|
||||
|
||||
return text;
|
||||
#endif
|
||||
|
@ -609,12 +608,7 @@ bool PromptWidget::historyScroll(int direction)
|
|||
|
||||
if(_historyLine == 0)
|
||||
{
|
||||
string input;
|
||||
|
||||
for(int i = _promptStartPos; i < _promptEndPos; i++)
|
||||
input += buffer(i) & 0x7f;
|
||||
|
||||
historyAdd(input);
|
||||
historyAdd(getLine());
|
||||
}
|
||||
|
||||
// Advance to the next/prev line in the history
|
||||
|
@ -668,9 +662,7 @@ bool PromptWidget::execute()
|
|||
if(len > 0)
|
||||
{
|
||||
// Copy the user input to command
|
||||
string command;
|
||||
for(int i = 0; i < len; i++)
|
||||
command += buffer(_promptStartPos + i) & 0x7f;
|
||||
string command = getLine();
|
||||
|
||||
// Add the input to the history
|
||||
addToHistory(command.c_str());
|
||||
|
|
|
@ -90,14 +90,14 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
// SWCHA bits in 'peek' mode
|
||||
xpos = 10; ypos += lineHeight + 5;
|
||||
labels.clear();
|
||||
labels.push_back("P0 right");
|
||||
labels.push_back("P0 left");
|
||||
labels.push_back("P0 down");
|
||||
labels.push_back("P0 up");
|
||||
labels.push_back("P1 right");
|
||||
labels.push_back("P1 left");
|
||||
labels.push_back("P1 down");
|
||||
labels.push_back("P1 up");
|
||||
labels.push_back("Left right");
|
||||
labels.push_back("Left left");
|
||||
labels.push_back("Left down");
|
||||
labels.push_back("Left up");
|
||||
labels.push_back("Right right");
|
||||
labels.push_back("Right left");
|
||||
labels.push_back("Right down");
|
||||
labels.push_back("Right up");
|
||||
CREATE_IO_REGS("SWCHA(R)", mySWCHAReadBits, kSWCHARBitsID, true)
|
||||
|
||||
// SWCHB bits in 'poke' mode
|
||||
|
@ -112,8 +112,8 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
// SWCHB bits in 'peek' mode
|
||||
xpos = 10; ypos += lineHeight + 5;
|
||||
labels.clear();
|
||||
labels.push_back("P1 difficulty");
|
||||
labels.push_back("P0 difficulty");
|
||||
labels.push_back("Right difficulty");
|
||||
labels.push_back("Left difficulty");
|
||||
labels.push_back("");
|
||||
labels.push_back("");
|
||||
labels.push_back("Color/B+W");
|
||||
|
@ -210,19 +210,19 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
|
||||
// PO & P1 difficulty switches
|
||||
int pwidth = lfont.getStringWidth("B/easy");
|
||||
lwidth = lfont.getStringWidth("P0 Diff ");
|
||||
lwidth = lfont.getStringWidth("Right Diff ");
|
||||
xpos = col; ypos += 2 * lineHeight;
|
||||
int col2_ypos = ypos;
|
||||
items.clear();
|
||||
VarList::push_back(items, "B/easy", "b");
|
||||
VarList::push_back(items, "A/hard", "a");
|
||||
myP0Diff = new PopUpWidget(boss, lfont, xpos, ypos, pwidth, lineHeight, items,
|
||||
"P0 Diff ", lwidth, kP0DiffChanged);
|
||||
"Left Diff ", lwidth, kP0DiffChanged);
|
||||
myP0Diff->setTarget(this);
|
||||
addFocusWidget(myP0Diff);
|
||||
ypos += myP0Diff->getHeight() + 5;
|
||||
myP1Diff = new PopUpWidget(boss, lfont, xpos, ypos, pwidth, lineHeight, items,
|
||||
"P1 Diff ", lwidth, kP1DiffChanged);
|
||||
"Right Diff ", lwidth, kP1DiffChanged);
|
||||
myP1Diff->setTarget(this);
|
||||
addFocusWidget(myP1Diff);
|
||||
|
||||
|
|
|
@ -23,13 +23,13 @@ BoosterGrip::BoosterGrip(Jack jack, const Event& event, const System& system)
|
|||
{
|
||||
if(myJack == Jack::Left)
|
||||
{
|
||||
myTriggerEvent = Event::JoystickZeroFire5;
|
||||
myBoosterEvent = Event::JoystickZeroFire9;
|
||||
myTriggerEvent = Event::JoystickLeftFire5;
|
||||
myBoosterEvent = Event::JoystickLeftFire9;
|
||||
}
|
||||
else
|
||||
{
|
||||
myTriggerEvent = Event::JoystickOneFire5;
|
||||
myBoosterEvent = Event::JoystickOneFire9;
|
||||
myTriggerEvent = Event::JoystickRightFire5;
|
||||
myBoosterEvent = Event::JoystickRightFire9;
|
||||
}
|
||||
|
||||
setPin(AnalogPin::Five, AnalogReadout::disconnect());
|
||||
|
|
|
@ -25,15 +25,15 @@ Driving::Driving(Jack jack, const Event& event, const System& system, bool altma
|
|||
{
|
||||
if(!altmap)
|
||||
{
|
||||
myCCWEvent = Event::JoystickZeroLeft;
|
||||
myCWEvent = Event::JoystickZeroRight;
|
||||
myFireEvent = Event::JoystickZeroFire;
|
||||
myCCWEvent = Event::JoystickLeftLeft;
|
||||
myCWEvent = Event::JoystickLeftRight;
|
||||
myFireEvent = Event::JoystickLeftFire;
|
||||
}
|
||||
else
|
||||
{
|
||||
myCCWEvent = Event::JoystickTwoLeft;
|
||||
myCWEvent = Event::JoystickTwoRight;
|
||||
myFireEvent = Event::JoystickTwoFire;
|
||||
myCCWEvent = Event::QTJoystickThreeLeft;
|
||||
myCWEvent = Event::QTJoystickThreeRight;
|
||||
myFireEvent = Event::QTJoystickThreeFire;
|
||||
}
|
||||
myXAxisValue = Event::SALeftAxis0Value; // joystick input
|
||||
myYAxisValue = Event::SALeftAxis1Value; // driving controller input
|
||||
|
@ -42,15 +42,15 @@ Driving::Driving(Jack jack, const Event& event, const System& system, bool altma
|
|||
{
|
||||
if(!altmap)
|
||||
{
|
||||
myCCWEvent = Event::JoystickOneLeft;
|
||||
myCWEvent = Event::JoystickOneRight;
|
||||
myFireEvent = Event::JoystickOneFire;
|
||||
myCCWEvent = Event::JoystickRightLeft;
|
||||
myCWEvent = Event::JoystickRightRight;
|
||||
myFireEvent = Event::JoystickRightFire;
|
||||
}
|
||||
else
|
||||
{
|
||||
myCCWEvent = Event::JoystickThreeLeft;
|
||||
myCWEvent = Event::JoystickThreeRight;
|
||||
myFireEvent = Event::JoystickThreeFire;
|
||||
myCCWEvent = Event::QTJoystickFourLeft;
|
||||
myCWEvent = Event::QTJoystickFourRight;
|
||||
myFireEvent = Event::QTJoystickFourFire;
|
||||
}
|
||||
myXAxisValue = Event::SARightAxis0Value; // joystick input
|
||||
myYAxisValue = Event::SARightAxis1Value; // driving controller input
|
||||
|
|
|
@ -42,25 +42,25 @@ class Event
|
|||
ConsoleRightDiffA, ConsoleRightDiffB, ConsoleRightDiffToggle,
|
||||
ConsoleSelect, ConsoleReset,
|
||||
|
||||
JoystickZeroUp, JoystickZeroDown, JoystickZeroLeft, JoystickZeroRight,
|
||||
JoystickZeroFire, JoystickZeroFire5, JoystickZeroFire9,
|
||||
JoystickOneUp, JoystickOneDown, JoystickOneLeft, JoystickOneRight,
|
||||
JoystickOneFire, JoystickOneFire5, JoystickOneFire9,
|
||||
JoystickLeftUp, JoystickLeftDown, JoystickLeftLeft, JoystickLeftRight,
|
||||
JoystickLeftFire, JoystickLeftFire5, JoystickLeftFire9,
|
||||
JoystickRightUp, JoystickRightDown, JoystickRightLeft, JoystickRightRight,
|
||||
JoystickRightFire, JoystickRightFire5, JoystickRightFire9,
|
||||
|
||||
PaddleZeroDecrease, PaddleZeroIncrease, PaddleZeroAnalog, PaddleZeroFire,
|
||||
PaddleOneDecrease, PaddleOneIncrease, PaddleOneAnalog, PaddleOneFire,
|
||||
PaddleTwoDecrease, PaddleTwoIncrease, PaddleTwoAnalog, PaddleTwoFire,
|
||||
PaddleThreeDecrease, PaddleThreeIncrease, PaddleThreeAnalog, PaddleThreeFire,
|
||||
PaddleLeftADecrease, PaddleLeftAIncrease, PaddleLeftAAnalog, PaddleLeftAFire,
|
||||
PaddleLeftBDecrease, PaddleLeftBIncrease, PaddleLeftBAnalog, PaddleLeftBFire,
|
||||
PaddleRightADecrease, PaddleRightAIncrease, PaddleRightAAnalog, PaddleRightAFire,
|
||||
PaddleRightBDecrease, PaddleRightBIncrease, PaddleRightBAnalog, PaddleRightBFire,
|
||||
|
||||
KeyboardZero1, KeyboardZero2, KeyboardZero3,
|
||||
KeyboardZero4, KeyboardZero5, KeyboardZero6,
|
||||
KeyboardZero7, KeyboardZero8, KeyboardZero9,
|
||||
KeyboardZeroStar, KeyboardZero0, KeyboardZeroPound,
|
||||
LeftKeyboard1, LeftKeyboard2, LeftKeyboard3,
|
||||
LeftKeyboard4, LeftKeyboard5, LeftKeyboard6,
|
||||
LeftKeyboard7, LeftKeyboard8, LeftKeyboard9,
|
||||
LeftKeyboardStar, LeftKeyboard0, LeftKeyboardPound,
|
||||
|
||||
KeyboardOne1, KeyboardOne2, KeyboardOne3,
|
||||
KeyboardOne4, KeyboardOne5, KeyboardOne6,
|
||||
KeyboardOne7, KeyboardOne8, KeyboardOne9,
|
||||
KeyboardOneStar, KeyboardOne0, KeyboardOnePound,
|
||||
RightKeyboard1, RightKeyboard2, RightKeyboard3,
|
||||
RightKeyboard4, RightKeyboard5, RightKeyboard6,
|
||||
RightKeyboard7, RightKeyboard8, RightKeyboard9,
|
||||
RightKeyboardStar, RightKeyboard0, RightKeyboardPound,
|
||||
|
||||
CompuMateFunc, CompuMateShift,
|
||||
CompuMate0, CompuMate1, CompuMate2, CompuMate3, CompuMate4,
|
||||
|
@ -129,10 +129,10 @@ class Event
|
|||
DecreaseAutoFire, IncreaseAutoFire,
|
||||
DecreaseSpeed, IncreaseSpeed,
|
||||
|
||||
JoystickTwoUp, JoystickTwoDown, JoystickTwoLeft, JoystickTwoRight,
|
||||
JoystickTwoFire,
|
||||
JoystickThreeUp, JoystickThreeDown, JoystickThreeLeft, JoystickThreeRight,
|
||||
JoystickThreeFire,
|
||||
QTJoystickThreeUp, QTJoystickThreeDown, QTJoystickThreeLeft, QTJoystickThreeRight,
|
||||
QTJoystickThreeFire,
|
||||
QTJoystickFourUp, QTJoystickFourDown, QTJoystickFourLeft, QTJoystickFourRight,
|
||||
QTJoystickFourFire,
|
||||
|
||||
ToggleCorrectAspectRatio,
|
||||
|
||||
|
@ -167,7 +167,7 @@ class Event
|
|||
DecreaseMouseAxesRange, IncreaseMouseAxesRange,
|
||||
|
||||
SALeftAxis0Value, SALeftAxis1Value, SARightAxis0Value, SARightAxis1Value,
|
||||
PaddleFourFire, PaddleFiveFire, PaddleSixFire, PaddleSevenFire,
|
||||
QTPaddle3AFire, QTPaddle3BFire, QTPaddle4AFire, QTPaddle4BFire,
|
||||
UIHelp,
|
||||
LastType
|
||||
};
|
||||
|
@ -229,10 +229,10 @@ class Event
|
|||
{
|
||||
switch(type)
|
||||
{
|
||||
case Event::PaddleZeroAnalog:
|
||||
case Event::PaddleOneAnalog:
|
||||
case Event::PaddleTwoAnalog:
|
||||
case Event::PaddleThreeAnalog:
|
||||
case Event::PaddleLeftAAnalog:
|
||||
case Event::PaddleLeftBAnalog:
|
||||
case Event::PaddleRightAAnalog:
|
||||
case Event::PaddleRightBAnalog:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
@ -256,62 +256,62 @@ class Event
|
|||
// Hold controller related events
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
static const Event::EventSet LeftJoystickEvents = {
|
||||
Event::JoystickZeroUp, Event::JoystickZeroDown, Event::JoystickZeroLeft, Event::JoystickZeroRight,
|
||||
Event::JoystickZeroFire, Event::JoystickZeroFire5, Event::JoystickZeroFire9,
|
||||
Event::JoystickLeftUp, Event::JoystickLeftDown, Event::JoystickLeftLeft, Event::JoystickLeftRight,
|
||||
Event::JoystickLeftFire, Event::JoystickLeftFire5, Event::JoystickLeftFire9,
|
||||
};
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
static const Event::EventSet Left2JoystickEvents = {
|
||||
Event::JoystickTwoUp, Event::JoystickTwoDown, Event::JoystickTwoLeft, Event::JoystickTwoRight,
|
||||
Event::JoystickTwoFire
|
||||
static const Event::EventSet QTJoystick3Events = {
|
||||
Event::QTJoystickThreeUp, Event::QTJoystickThreeDown, Event::QTJoystickThreeLeft, Event::QTJoystickThreeRight,
|
||||
Event::QTJoystickThreeFire
|
||||
};
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
static const Event::EventSet RightJoystickEvents = {
|
||||
Event::JoystickOneUp, Event::JoystickOneDown, Event::JoystickOneLeft, Event::JoystickOneRight,
|
||||
Event::JoystickOneFire, Event::JoystickOneFire5, Event::JoystickOneFire9,
|
||||
Event::JoystickRightUp, Event::JoystickRightDown, Event::JoystickRightLeft, Event::JoystickRightRight,
|
||||
Event::JoystickRightFire, Event::JoystickRightFire5, Event::JoystickRightFire9,
|
||||
};
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
static const Event::EventSet Right2JoystickEvents = {
|
||||
Event::JoystickThreeUp, Event::JoystickThreeDown, Event::JoystickThreeLeft, Event::JoystickThreeRight,
|
||||
Event::JoystickThreeFire
|
||||
static const Event::EventSet QTJoystick4Events = {
|
||||
Event::QTJoystickFourUp, Event::QTJoystickFourDown, Event::QTJoystickFourLeft, Event::QTJoystickFourRight,
|
||||
Event::QTJoystickFourFire
|
||||
};
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
static const Event::EventSet LeftPaddlesEvents = {
|
||||
Event::PaddleZeroDecrease, Event::PaddleZeroIncrease, Event::PaddleZeroAnalog, Event::PaddleZeroFire,
|
||||
Event::PaddleOneDecrease, Event::PaddleOneIncrease, Event::PaddleOneAnalog, Event::PaddleOneFire,
|
||||
Event::PaddleLeftADecrease, Event::PaddleLeftAIncrease, Event::PaddleLeftAAnalog, Event::PaddleLeftAFire,
|
||||
Event::PaddleLeftBDecrease, Event::PaddleLeftBIncrease, Event::PaddleLeftBAnalog, Event::PaddleLeftBFire,
|
||||
};
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
static const Event::EventSet Left2PaddlesEvents = {
|
||||
static const Event::EventSet QTPaddles3Events = {
|
||||
// Only fire buttons supported by QuadTari
|
||||
Event::PaddleFourFire, Event::PaddleFiveFire
|
||||
Event::QTPaddle3AFire, Event::QTPaddle3BFire
|
||||
};
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
static const Event::EventSet RightPaddlesEvents = {
|
||||
Event::PaddleTwoDecrease, Event::PaddleTwoIncrease, Event::PaddleTwoAnalog, Event::PaddleTwoFire,
|
||||
Event::PaddleThreeDecrease, Event::PaddleThreeIncrease, Event::PaddleThreeAnalog, Event::PaddleThreeFire,
|
||||
Event::PaddleRightADecrease, Event::PaddleRightAIncrease, Event::PaddleRightAAnalog, Event::PaddleRightAFire,
|
||||
Event::PaddleRightBDecrease, Event::PaddleRightBIncrease, Event::PaddleRightBAnalog, Event::PaddleRightBFire,
|
||||
};
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
static const Event::EventSet Right2PaddlesEvents = {
|
||||
static const Event::EventSet QTPaddles4Events = {
|
||||
// Only fire buttons supported by QuadTari
|
||||
Event::PaddleSixFire, Event::PaddleSevenFire
|
||||
Event::QTPaddle4AFire, Event::QTPaddle4BFire
|
||||
};
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
static const Event::EventSet LeftKeypadEvents = {
|
||||
Event::KeyboardZero1, Event::KeyboardZero2, Event::KeyboardZero3,
|
||||
Event::KeyboardZero4, Event::KeyboardZero5, Event::KeyboardZero6,
|
||||
Event::KeyboardZero7, Event::KeyboardZero8, Event::KeyboardZero9,
|
||||
Event::KeyboardZeroStar, Event::KeyboardZero0, Event::KeyboardZeroPound,
|
||||
Event::LeftKeyboard1, Event::LeftKeyboard2, Event::LeftKeyboard3,
|
||||
Event::LeftKeyboard4, Event::LeftKeyboard5, Event::LeftKeyboard6,
|
||||
Event::LeftKeyboard7, Event::LeftKeyboard8, Event::LeftKeyboard9,
|
||||
Event::LeftKeyboardStar, Event::LeftKeyboard0, Event::LeftKeyboardPound,
|
||||
};
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
static const Event::EventSet RightKeypadEvents = {
|
||||
Event::KeyboardOne1, Event::KeyboardOne2, Event::KeyboardOne3,
|
||||
Event::KeyboardOne4, Event::KeyboardOne5, Event::KeyboardOne6,
|
||||
Event::KeyboardOne7, Event::KeyboardOne8, Event::KeyboardOne9,
|
||||
Event::KeyboardOneStar, Event::KeyboardOne0, Event::KeyboardOnePound,
|
||||
Event::RightKeyboard1, Event::RightKeyboard2, Event::RightKeyboard3,
|
||||
Event::RightKeyboard4, Event::RightKeyboard5, Event::RightKeyboard6,
|
||||
Event::RightKeyboard7, Event::RightKeyboard8, Event::RightKeyboard9,
|
||||
Event::RightKeyboardStar, Event::RightKeyboard0, Event::RightKeyboardPound,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -758,84 +758,84 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
|
|||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// If enabled, make sure 'impossible' joystick directions aren't allowed
|
||||
case Event::JoystickZeroUp:
|
||||
case Event::JoystickLeftUp:
|
||||
if(!myAllowAllDirectionsFlag && pressed)
|
||||
myEvent.set(Event::JoystickZeroDown, 0);
|
||||
myEvent.set(Event::JoystickLeftDown, 0);
|
||||
break;
|
||||
|
||||
case Event::JoystickZeroDown:
|
||||
case Event::JoystickLeftDown:
|
||||
if(!myAllowAllDirectionsFlag && pressed)
|
||||
myEvent.set(Event::JoystickZeroUp, 0);
|
||||
myEvent.set(Event::JoystickLeftUp, 0);
|
||||
break;
|
||||
|
||||
case Event::JoystickZeroLeft:
|
||||
case Event::JoystickLeftLeft:
|
||||
if(!myAllowAllDirectionsFlag && pressed)
|
||||
myEvent.set(Event::JoystickZeroRight, 0);
|
||||
myEvent.set(Event::JoystickLeftRight, 0);
|
||||
break;
|
||||
|
||||
case Event::JoystickZeroRight:
|
||||
case Event::JoystickLeftRight:
|
||||
if(!myAllowAllDirectionsFlag && pressed)
|
||||
myEvent.set(Event::JoystickZeroLeft, 0);
|
||||
myEvent.set(Event::JoystickLeftLeft, 0);
|
||||
break;
|
||||
|
||||
case Event::JoystickOneUp:
|
||||
case Event::JoystickRightUp:
|
||||
if(!myAllowAllDirectionsFlag && pressed)
|
||||
myEvent.set(Event::JoystickOneDown, 0);
|
||||
myEvent.set(Event::JoystickRightDown, 0);
|
||||
break;
|
||||
|
||||
case Event::JoystickOneDown:
|
||||
case Event::JoystickRightDown:
|
||||
if(!myAllowAllDirectionsFlag && pressed)
|
||||
myEvent.set(Event::JoystickOneUp, 0);
|
||||
myEvent.set(Event::JoystickRightUp, 0);
|
||||
break;
|
||||
|
||||
case Event::JoystickOneLeft:
|
||||
case Event::JoystickRightLeft:
|
||||
if(!myAllowAllDirectionsFlag && pressed)
|
||||
myEvent.set(Event::JoystickOneRight, 0);
|
||||
myEvent.set(Event::JoystickRightRight, 0);
|
||||
break;
|
||||
|
||||
case Event::JoystickOneRight:
|
||||
case Event::JoystickRightRight:
|
||||
if(!myAllowAllDirectionsFlag && pressed)
|
||||
myEvent.set(Event::JoystickOneLeft, 0);
|
||||
myEvent.set(Event::JoystickRightLeft, 0);
|
||||
break;
|
||||
|
||||
case Event::JoystickTwoUp:
|
||||
case Event::QTJoystickThreeUp:
|
||||
if(!myAllowAllDirectionsFlag && pressed)
|
||||
myEvent.set(Event::JoystickTwoDown, 0);
|
||||
myEvent.set(Event::QTJoystickThreeDown, 0);
|
||||
break;
|
||||
|
||||
case Event::JoystickTwoDown:
|
||||
case Event::QTJoystickThreeDown:
|
||||
if(!myAllowAllDirectionsFlag && pressed)
|
||||
myEvent.set(Event::JoystickTwoUp, 0);
|
||||
myEvent.set(Event::QTJoystickThreeUp, 0);
|
||||
break;
|
||||
|
||||
case Event::JoystickTwoLeft:
|
||||
case Event::QTJoystickThreeLeft:
|
||||
if(!myAllowAllDirectionsFlag && pressed)
|
||||
myEvent.set(Event::JoystickTwoRight, 0);
|
||||
myEvent.set(Event::QTJoystickThreeRight, 0);
|
||||
break;
|
||||
|
||||
case Event::JoystickTwoRight:
|
||||
case Event::QTJoystickThreeRight:
|
||||
if(!myAllowAllDirectionsFlag && pressed)
|
||||
myEvent.set(Event::JoystickTwoLeft, 0);
|
||||
myEvent.set(Event::QTJoystickThreeLeft, 0);
|
||||
break;
|
||||
|
||||
case Event::JoystickThreeUp:
|
||||
case Event::QTJoystickFourUp:
|
||||
if(!myAllowAllDirectionsFlag && pressed)
|
||||
myEvent.set(Event::JoystickThreeDown, 0);
|
||||
myEvent.set(Event::QTJoystickFourDown, 0);
|
||||
break;
|
||||
|
||||
case Event::JoystickThreeDown:
|
||||
case Event::QTJoystickFourDown:
|
||||
if(!myAllowAllDirectionsFlag && pressed)
|
||||
myEvent.set(Event::JoystickThreeUp, 0);
|
||||
myEvent.set(Event::QTJoystickFourUp, 0);
|
||||
break;
|
||||
|
||||
case Event::JoystickThreeLeft:
|
||||
case Event::QTJoystickFourLeft:
|
||||
if(!myAllowAllDirectionsFlag && pressed)
|
||||
myEvent.set(Event::JoystickThreeRight, 0);
|
||||
myEvent.set(Event::QTJoystickFourRight, 0);
|
||||
break;
|
||||
|
||||
case Event::JoystickThreeRight:
|
||||
case Event::QTJoystickFourRight:
|
||||
if(!myAllowAllDirectionsFlag && pressed)
|
||||
myEvent.set(Event::JoystickThreeLeft, 0);
|
||||
myEvent.set(Event::QTJoystickFourLeft, 0);
|
||||
break;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
@ -2087,27 +2087,27 @@ void EventHandler::handleConsoleStartupEvents()
|
|||
const string& holdjoy0 = myOSystem.settings().getString("holdjoy0");
|
||||
|
||||
if(BSPF::containsIgnoreCase(holdjoy0, "U"))
|
||||
handleEvent(Event::JoystickZeroUp);
|
||||
handleEvent(Event::JoystickLeftUp);
|
||||
if(BSPF::containsIgnoreCase(holdjoy0, "D"))
|
||||
handleEvent(Event::JoystickZeroDown);
|
||||
handleEvent(Event::JoystickLeftDown);
|
||||
if(BSPF::containsIgnoreCase(holdjoy0, "L"))
|
||||
handleEvent(Event::JoystickZeroLeft);
|
||||
handleEvent(Event::JoystickLeftLeft);
|
||||
if(BSPF::containsIgnoreCase(holdjoy0, "R"))
|
||||
handleEvent(Event::JoystickZeroRight);
|
||||
handleEvent(Event::JoystickLeftRight);
|
||||
if(BSPF::containsIgnoreCase(holdjoy0, "F"))
|
||||
handleEvent(Event::JoystickZeroFire);
|
||||
handleEvent(Event::JoystickLeftFire);
|
||||
|
||||
const string& holdjoy1 = myOSystem.settings().getString("holdjoy1");
|
||||
if(BSPF::containsIgnoreCase(holdjoy1, "U"))
|
||||
handleEvent(Event::JoystickOneUp);
|
||||
handleEvent(Event::JoystickRightUp);
|
||||
if(BSPF::containsIgnoreCase(holdjoy1, "D"))
|
||||
handleEvent(Event::JoystickOneDown);
|
||||
handleEvent(Event::JoystickRightDown);
|
||||
if(BSPF::containsIgnoreCase(holdjoy1, "L"))
|
||||
handleEvent(Event::JoystickOneLeft);
|
||||
handleEvent(Event::JoystickRightLeft);
|
||||
if(BSPF::containsIgnoreCase(holdjoy1, "R"))
|
||||
handleEvent(Event::JoystickOneRight);
|
||||
handleEvent(Event::JoystickRightRight);
|
||||
if(BSPF::containsIgnoreCase(holdjoy1, "F"))
|
||||
handleEvent(Event::JoystickOneFire);
|
||||
handleEvent(Event::JoystickRightFire);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -3036,12 +3036,12 @@ EventHandler::EmulActionList EventHandler::ourEmulActionList = { {
|
|||
{ Event::ConsoleBlackWhite, "Black & White TV", "" },
|
||||
{ Event::ConsoleColorToggle, "Toggle Color / B&W TV", "" },
|
||||
{ Event::Console7800Pause, "7800 Pause Key", "" },
|
||||
{ Event::ConsoleLeftDiffA, "P0 Difficulty A", "" },
|
||||
{ Event::ConsoleLeftDiffB, "P0 Difficulty B", "" },
|
||||
{ Event::ConsoleLeftDiffToggle, "P0 Toggle Difficulty", "" },
|
||||
{ Event::ConsoleRightDiffA, "P1 Difficulty A", "" },
|
||||
{ Event::ConsoleRightDiffB, "P1 Difficulty B", "" },
|
||||
{ Event::ConsoleRightDiffToggle, "P1 Toggle Difficulty", "" },
|
||||
{ Event::ConsoleLeftDiffA, "Left Difficulty A", "" },
|
||||
{ Event::ConsoleLeftDiffB, "Left Difficulty B", "" },
|
||||
{ Event::ConsoleLeftDiffToggle, "Toggle Left Difficulty", "" },
|
||||
{ Event::ConsoleRightDiffA, "Right Difficulty A", "" },
|
||||
{ Event::ConsoleRightDiffB, "Right Difficulty B", "" },
|
||||
{ Event::ConsoleRightDiffToggle, "Toggle Right Difficulty", "" },
|
||||
{ Event::SaveState, "Save state", "" },
|
||||
{ Event::SaveAllStates, "Save all TM states of current game", "" },
|
||||
{ Event::PreviousState, "Change to previous state slot", "" },
|
||||
|
@ -3056,84 +3056,84 @@ EventHandler::EmulActionList EventHandler::ourEmulActionList = { {
|
|||
{ Event::ToggleContSnapshotsFrame,"Save continuous snapsh. (every frame)", "" },
|
||||
#endif
|
||||
|
||||
{ Event::JoystickZeroUp, "P0 Joystick Up", "" },
|
||||
{ Event::JoystickZeroDown, "P0 Joystick Down", "" },
|
||||
{ Event::JoystickZeroLeft, "P0 Joystick Left", "" },
|
||||
{ Event::JoystickZeroRight, "P0 Joystick Right", "" },
|
||||
{ Event::JoystickZeroFire, "P0 Joystick Fire", "" },
|
||||
{ Event::JoystickZeroFire5, "P0 Booster Top Booster Button", "" },
|
||||
{ Event::JoystickZeroFire9, "P0 Booster Handle Grip Trigger", "" },
|
||||
{ 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::JoystickOneUp, "P1 Joystick Up", "" },
|
||||
{ Event::JoystickOneDown, "P1 Joystick Down", "" },
|
||||
{ Event::JoystickOneLeft, "P1 Joystick Left", "" },
|
||||
{ Event::JoystickOneRight, "P1 Joystick Right", "" },
|
||||
{ Event::JoystickOneFire, "P1 Joystick Fire", "" },
|
||||
{ Event::JoystickOneFire5, "P1 Booster Top Booster Button", "" },
|
||||
{ Event::JoystickOneFire9, "P1 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::JoystickTwoUp, "P2 Joystick Up", "" },
|
||||
{ Event::JoystickTwoDown, "P2 Joystick Down", "" },
|
||||
{ Event::JoystickTwoLeft, "P2 Joystick Left", "" },
|
||||
{ Event::JoystickTwoRight, "P2 Joystick Right", "" },
|
||||
{ Event::JoystickTwoFire, "P2 Joystick Fire", "" },
|
||||
{ Event::QTJoystickThreeUp, "QuadTari Joystick 3 Up", "" },
|
||||
{ Event::QTJoystickThreeDown, "QuadTari Joystick 3 Down", "" },
|
||||
{ Event::QTJoystickThreeLeft, "QuadTari Joystick 3 Left", "" },
|
||||
{ Event::QTJoystickThreeRight, "QuadTari Joystick 3 Right", "" },
|
||||
{ Event::QTJoystickThreeFire, "QuadTari Joystick 3 Fire", "" },
|
||||
|
||||
{ Event::JoystickThreeUp, "P3 Joystick Up", "" },
|
||||
{ Event::JoystickThreeDown, "P3 Joystick Down", "" },
|
||||
{ Event::JoystickThreeLeft, "P3 Joystick Left", "" },
|
||||
{ Event::JoystickThreeRight, "P3 Joystick Right", "" },
|
||||
{ Event::JoystickThreeFire, "P3 Joystick Fire", "" },
|
||||
{ Event::QTJoystickFourUp, "QuadTari Joystick 4 Up", "" },
|
||||
{ Event::QTJoystickFourDown, "QuadTari Joystick 4 Down", "" },
|
||||
{ Event::QTJoystickFourLeft, "QuadTari Joystick 4 Left", "" },
|
||||
{ Event::QTJoystickFourRight, "QuadTari Joystick 4 Right", "" },
|
||||
{ Event::QTJoystickFourFire, "QuadTari Joystick 4 Fire", "" },
|
||||
|
||||
{ Event::PaddleZeroAnalog, "Paddle 0 Analog", "" },
|
||||
{ Event::PaddleZeroIncrease, "Paddle 0 Turn Left", "" },
|
||||
{ Event::PaddleZeroDecrease, "Paddle 0 Turn Right", "" },
|
||||
{ Event::PaddleZeroFire, "Paddle 0 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::PaddleOneAnalog, "Paddle 1 Analog", "" },
|
||||
{ Event::PaddleOneIncrease, "Paddle 1 Turn Left", "" },
|
||||
{ Event::PaddleOneDecrease, "Paddle 1 Turn Right", "" },
|
||||
{ Event::PaddleOneFire, "Paddle 1 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::PaddleTwoAnalog, "Paddle 2 Analog", "" },
|
||||
{ Event::PaddleTwoIncrease, "Paddle 2 Turn Left", "" },
|
||||
{ Event::PaddleTwoDecrease, "Paddle 2 Turn Right", "" },
|
||||
{ Event::PaddleTwoFire, "Paddle 2 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::PaddleThreeAnalog, "Paddle 3 Analog", "" },
|
||||
{ Event::PaddleThreeIncrease, "Paddle 3 Turn Left", "" },
|
||||
{ Event::PaddleThreeDecrease, "Paddle 3 Turn Right", "" },
|
||||
{ Event::PaddleThreeFire, "Paddle 3 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::PaddleFourFire, "Paddle 4 Fire", "" },
|
||||
{ Event::PaddleFiveFire, "Paddle 5 Fire", "" },
|
||||
{ Event::PaddleSixFire, "Paddle 6 Fire", "" },
|
||||
{ Event::PaddleSevenFire, "Paddle 7 Fire", "" },
|
||||
{ Event::QTPaddle3AFire, "QuadTari Paddle 3A Fire", "" },
|
||||
{ Event::QTPaddle3BFire, "QuadTari Paddle 3B Fire", "" },
|
||||
{ Event::QTPaddle4AFire, "QuadTari Paddle 4A Fire", "" },
|
||||
{ Event::QTPaddle4BFire, "QuadTari Paddle 4B Fire", "" },
|
||||
|
||||
{ Event::KeyboardZero1, "P0 Keyboard 1", "" },
|
||||
{ Event::KeyboardZero2, "P0 Keyboard 2", "" },
|
||||
{ Event::KeyboardZero3, "P0 Keyboard 3", "" },
|
||||
{ Event::KeyboardZero4, "P0 Keyboard 4", "" },
|
||||
{ Event::KeyboardZero5, "P0 Keyboard 5", "" },
|
||||
{ Event::KeyboardZero6, "P0 Keyboard 6", "" },
|
||||
{ Event::KeyboardZero7, "P0 Keyboard 7", "" },
|
||||
{ Event::KeyboardZero8, "P0 Keyboard 8", "" },
|
||||
{ Event::KeyboardZero9, "P0 Keyboard 9", "" },
|
||||
{ Event::KeyboardZeroStar, "P0 Keyboard *", "" },
|
||||
{ Event::KeyboardZero0, "P0 Keyboard 0", "" },
|
||||
{ Event::KeyboardZeroPound, "P0 Keyboard #", "" },
|
||||
{ Event::LeftKeyboard1, "Left Keyboard 1", "" },
|
||||
{ Event::LeftKeyboard2, "Left Keyboard 2", "" },
|
||||
{ Event::LeftKeyboard3, "Left Keyboard 3", "" },
|
||||
{ Event::LeftKeyboard4, "Left Keyboard 4", "" },
|
||||
{ Event::LeftKeyboard5, "Left Keyboard 5", "" },
|
||||
{ Event::LeftKeyboard6, "Left Keyboard 6", "" },
|
||||
{ Event::LeftKeyboard7, "Left Keyboard 7", "" },
|
||||
{ Event::LeftKeyboard8, "Left Keyboard 8", "" },
|
||||
{ Event::LeftKeyboard9, "Left Keyboard 9", "" },
|
||||
{ Event::LeftKeyboardStar, "Left Keyboard *", "" },
|
||||
{ Event::LeftKeyboard0, "Left Keyboard 0", "" },
|
||||
{ Event::LeftKeyboardPound, "Left Keyboard #", "" },
|
||||
|
||||
{ Event::KeyboardOne1, "P1 Keyboard 1", "" },
|
||||
{ Event::KeyboardOne2, "P1 Keyboard 2", "" },
|
||||
{ Event::KeyboardOne3, "P1 Keyboard 3", "" },
|
||||
{ Event::KeyboardOne4, "P1 Keyboard 4", "" },
|
||||
{ Event::KeyboardOne5, "P1 Keyboard 5", "" },
|
||||
{ Event::KeyboardOne6, "P1 Keyboard 6", "" },
|
||||
{ Event::KeyboardOne7, "P1 Keyboard 7", "" },
|
||||
{ Event::KeyboardOne8, "P1 Keyboard 8", "" },
|
||||
{ Event::KeyboardOne9, "P1 Keyboard 9", "" },
|
||||
{ Event::KeyboardOneStar, "P1 Keyboard *", "" },
|
||||
{ Event::KeyboardOne0, "P1 Keyboard 0", "" },
|
||||
{ Event::KeyboardOnePound, "P1 Keyboard #", "" },
|
||||
{ Event::RightKeyboard1, "Right Keyboard 1", "" },
|
||||
{ Event::RightKeyboard2, "Right Keyboard 2", "" },
|
||||
{ Event::RightKeyboard3, "Right Keyboard 3", "" },
|
||||
{ Event::RightKeyboard4, "Right Keyboard 4", "" },
|
||||
{ Event::RightKeyboard5, "Right Keyboard 5", "" },
|
||||
{ Event::RightKeyboard6, "Right Keyboard 6", "" },
|
||||
{ Event::RightKeyboard7, "Right Keyboard 7", "" },
|
||||
{ Event::RightKeyboard8, "Right Keyboard 8", "" },
|
||||
{ Event::RightKeyboard9, "Right Keyboard 9", "" },
|
||||
{ Event::RightKeyboardStar, "Right Keyboard *", "" },
|
||||
{ Event::RightKeyboard0, "Right Keyboard 0", "" },
|
||||
{ Event::RightKeyboardPound, "Right Keyboard #", "" },
|
||||
// Video
|
||||
{ Event::ToggleFullScreen, "Toggle fullscreen", "" },
|
||||
#ifdef ADAPTABLE_REFRESH_SUPPORT
|
||||
|
@ -3234,7 +3234,7 @@ EventHandler::EmulActionList EventHandler::ourEmulActionList = { {
|
|||
{ Event::DecreaseDrivingSense, "Decrease driving sensitivity", "" },
|
||||
{ Event::IncreaseDrivingSense, "Increase driving sensitivity", "" },
|
||||
{ Event::PreviousCursorVisbility, "Select prev. cursor visibility mode", "" },
|
||||
{ Event::NextCursorVisbility, "Select next cursor visibility mode" ,"" },
|
||||
{ Event::NextCursorVisbility, "Select next cursor visibility mode", "" },
|
||||
{ Event::ToggleGrabMouse, "Toggle grab mouse", "" },
|
||||
{ Event::PreviousLeftPort, "Select previous left controller", "" },
|
||||
{ Event::NextLeftPort, "Select next left controller", "" },
|
||||
|
@ -3363,35 +3363,35 @@ const Event::EventSet EventHandler::ConsoleEvents = {
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
const Event::EventSet EventHandler::JoystickEvents = {
|
||||
Event::JoystickZeroUp, Event::JoystickZeroDown, Event::JoystickZeroLeft, Event::JoystickZeroRight,
|
||||
Event::JoystickZeroFire, Event::JoystickZeroFire5, Event::JoystickZeroFire9,
|
||||
Event::JoystickOneUp, Event::JoystickOneDown, Event::JoystickOneLeft, Event::JoystickOneRight,
|
||||
Event::JoystickOneFire, Event::JoystickOneFire5, Event::JoystickOneFire9,
|
||||
Event::JoystickTwoUp, Event::JoystickTwoDown, Event::JoystickTwoLeft, Event::JoystickTwoRight,
|
||||
Event::JoystickTwoFire,
|
||||
Event::JoystickThreeUp, Event::JoystickThreeDown, Event::JoystickThreeLeft, Event::JoystickThreeRight,
|
||||
Event::JoystickThreeFire,
|
||||
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::QTJoystickThreeUp, Event::QTJoystickThreeDown, Event::QTJoystickThreeLeft, Event::QTJoystickThreeRight,
|
||||
Event::QTJoystickThreeFire,
|
||||
Event::QTJoystickFourUp, Event::QTJoystickFourDown, Event::QTJoystickFourLeft, Event::QTJoystickFourRight,
|
||||
Event::QTJoystickFourFire,
|
||||
};
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
const Event::EventSet EventHandler::PaddlesEvents = {
|
||||
Event::PaddleZeroDecrease, Event::PaddleZeroIncrease, Event::PaddleZeroAnalog, Event::PaddleZeroFire,
|
||||
Event::PaddleOneDecrease, Event::PaddleOneIncrease, Event::PaddleOneAnalog, Event::PaddleOneFire,
|
||||
Event::PaddleTwoDecrease, Event::PaddleTwoIncrease, Event::PaddleTwoAnalog, Event::PaddleTwoFire,
|
||||
Event::PaddleThreeDecrease, Event::PaddleThreeIncrease, Event::PaddleThreeAnalog, Event::PaddleThreeFire,
|
||||
Event::PaddleFourFire, Event::PaddleFiveFire,Event::PaddleSixFire,Event::PaddleSevenFire,
|
||||
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::QTPaddle3AFire, Event::QTPaddle3BFire,Event::QTPaddle4AFire,Event::QTPaddle4BFire,
|
||||
};
|
||||
|
||||
const Event::EventSet EventHandler::KeyboardEvents = {
|
||||
Event::KeyboardZero1, Event::KeyboardZero2, Event::KeyboardZero3,
|
||||
Event::KeyboardZero4, Event::KeyboardZero5, Event::KeyboardZero6,
|
||||
Event::KeyboardZero7, Event::KeyboardZero8, Event::KeyboardZero9,
|
||||
Event::KeyboardZeroStar, Event::KeyboardZero0, Event::KeyboardZeroPound,
|
||||
Event::LeftKeyboard1, Event::LeftKeyboard2, Event::LeftKeyboard3,
|
||||
Event::LeftKeyboard4, Event::LeftKeyboard5, Event::LeftKeyboard6,
|
||||
Event::LeftKeyboard7, Event::LeftKeyboard8, Event::LeftKeyboard9,
|
||||
Event::LeftKeyboardStar, Event::LeftKeyboard0, Event::LeftKeyboardPound,
|
||||
|
||||
Event::KeyboardOne1, Event::KeyboardOne2, Event::KeyboardOne3,
|
||||
Event::KeyboardOne4, Event::KeyboardOne5, Event::KeyboardOne6,
|
||||
Event::KeyboardOne7, Event::KeyboardOne8, Event::KeyboardOne9,
|
||||
Event::KeyboardOneStar, Event::KeyboardOne0, Event::KeyboardOnePound,
|
||||
Event::RightKeyboard1, Event::RightKeyboard2, Event::RightKeyboard3,
|
||||
Event::RightKeyboard4, Event::RightKeyboard5, Event::RightKeyboard6,
|
||||
Event::RightKeyboard7, Event::RightKeyboard8, Event::RightKeyboard9,
|
||||
Event::RightKeyboardStar, Event::RightKeyboard0, Event::RightKeyboardPound,
|
||||
};
|
||||
|
||||
const Event::EventSet EventHandler::DevicesEvents = {
|
||||
|
|
|
@ -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::JoystickZeroFire5;
|
||||
myButtonCEvent = Event::JoystickLeftFire5;
|
||||
else
|
||||
myButtonCEvent = Event::JoystickOneFire5;
|
||||
myButtonCEvent = Event::JoystickRightFire5;
|
||||
|
||||
setPin(AnalogPin::Five, AnalogReadout::connectToVcc());
|
||||
}
|
||||
|
|
|
@ -32,38 +32,38 @@ Joystick::Joystick(Jack jack, const Event& event, const System& system,
|
|||
{
|
||||
if(!altmap)
|
||||
{
|
||||
myUpEvent = Event::JoystickZeroUp;
|
||||
myDownEvent = Event::JoystickZeroDown;
|
||||
myLeftEvent = Event::JoystickZeroLeft;
|
||||
myRightEvent = Event::JoystickZeroRight;
|
||||
myFireEvent = Event::JoystickZeroFire;
|
||||
myUpEvent = Event::JoystickLeftUp;
|
||||
myDownEvent = Event::JoystickLeftDown;
|
||||
myLeftEvent = Event::JoystickLeftLeft;
|
||||
myRightEvent = Event::JoystickLeftRight;
|
||||
myFireEvent = Event::JoystickLeftFire;
|
||||
}
|
||||
else
|
||||
{
|
||||
myUpEvent = Event::JoystickTwoUp;
|
||||
myDownEvent = Event::JoystickTwoDown;
|
||||
myLeftEvent = Event::JoystickTwoLeft;
|
||||
myRightEvent = Event::JoystickTwoRight;
|
||||
myFireEvent = Event::JoystickTwoFire;
|
||||
myUpEvent = Event::QTJoystickThreeUp;
|
||||
myDownEvent = Event::QTJoystickThreeDown;
|
||||
myLeftEvent = Event::QTJoystickThreeLeft;
|
||||
myRightEvent = Event::QTJoystickThreeRight;
|
||||
myFireEvent = Event::QTJoystickThreeFire;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!altmap)
|
||||
{
|
||||
myUpEvent = Event::JoystickOneUp;
|
||||
myDownEvent = Event::JoystickOneDown;
|
||||
myLeftEvent = Event::JoystickOneLeft;
|
||||
myRightEvent = Event::JoystickOneRight;
|
||||
myFireEvent = Event::JoystickOneFire;
|
||||
myUpEvent = Event::JoystickRightUp;
|
||||
myDownEvent = Event::JoystickRightDown;
|
||||
myLeftEvent = Event::JoystickRightLeft;
|
||||
myRightEvent = Event::JoystickRightRight;
|
||||
myFireEvent = Event::JoystickRightFire;
|
||||
}
|
||||
else
|
||||
{
|
||||
myUpEvent = Event::JoystickThreeUp;
|
||||
myDownEvent = Event::JoystickThreeDown;
|
||||
myLeftEvent = Event::JoystickThreeLeft;
|
||||
myRightEvent = Event::JoystickThreeRight;
|
||||
myFireEvent = Event::JoystickThreeFire;
|
||||
myUpEvent = Event::QTJoystickFourUp;
|
||||
myDownEvent = Event::QTJoystickFourDown;
|
||||
myLeftEvent = Event::QTJoystickFourLeft;
|
||||
myRightEvent = Event::QTJoystickFourRight;
|
||||
myFireEvent = Event::QTJoystickFourFire;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,33 +24,33 @@ Keyboard::Keyboard(Jack jack, const Event& event, const System& system)
|
|||
{
|
||||
if(myJack == Jack::Left)
|
||||
{
|
||||
myOneEvent = Event::KeyboardZero1;
|
||||
myTwoEvent = Event::KeyboardZero2;
|
||||
myThreeEvent = Event::KeyboardZero3;
|
||||
myFourEvent = Event::KeyboardZero4;
|
||||
myFiveEvent = Event::KeyboardZero5;
|
||||
mySixEvent = Event::KeyboardZero6;
|
||||
mySevenEvent = Event::KeyboardZero7;
|
||||
myEightEvent = Event::KeyboardZero8;
|
||||
myNineEvent = Event::KeyboardZero9;
|
||||
myStarEvent = Event::KeyboardZeroStar;
|
||||
myZeroEvent = Event::KeyboardZero0;
|
||||
myPoundEvent = Event::KeyboardZeroPound;
|
||||
myOneEvent = Event::LeftKeyboard1;
|
||||
myTwoEvent = Event::LeftKeyboard2;
|
||||
myThreeEvent = Event::LeftKeyboard3;
|
||||
myFourEvent = Event::LeftKeyboard4;
|
||||
myFiveEvent = Event::LeftKeyboard5;
|
||||
mySixEvent = Event::LeftKeyboard6;
|
||||
mySevenEvent = Event::LeftKeyboard7;
|
||||
myEightEvent = Event::LeftKeyboard8;
|
||||
myNineEvent = Event::LeftKeyboard9;
|
||||
myStarEvent = Event::LeftKeyboardStar;
|
||||
myZeroEvent = Event::LeftKeyboard0;
|
||||
myPoundEvent = Event::LeftKeyboardPound;
|
||||
}
|
||||
else
|
||||
{
|
||||
myOneEvent = Event::KeyboardOne1;
|
||||
myTwoEvent = Event::KeyboardOne2;
|
||||
myThreeEvent = Event::KeyboardOne3;
|
||||
myFourEvent = Event::KeyboardOne4;
|
||||
myFiveEvent = Event::KeyboardOne5;
|
||||
mySixEvent = Event::KeyboardOne6;
|
||||
mySevenEvent = Event::KeyboardOne7;
|
||||
myEightEvent = Event::KeyboardOne8;
|
||||
myNineEvent = Event::KeyboardOne9;
|
||||
myStarEvent = Event::KeyboardOneStar;
|
||||
myZeroEvent = Event::KeyboardOne0;
|
||||
myPoundEvent = Event::KeyboardOnePound;
|
||||
myOneEvent = Event::RightKeyboard1;
|
||||
myTwoEvent = Event::RightKeyboard2;
|
||||
myThreeEvent = Event::RightKeyboard3;
|
||||
myFourEvent = Event::RightKeyboard4;
|
||||
myFiveEvent = Event::RightKeyboard5;
|
||||
mySixEvent = Event::RightKeyboard6;
|
||||
mySevenEvent = Event::RightKeyboard7;
|
||||
myEightEvent = Event::RightKeyboard8;
|
||||
myNineEvent = Event::RightKeyboard9;
|
||||
myStarEvent = Event::RightKeyboardStar;
|
||||
myZeroEvent = Event::RightKeyboard0;
|
||||
myPoundEvent = Event::RightKeyboardPound;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ void KidVid::update()
|
|||
myTape = 0; // rewind Kid Vid tape
|
||||
closeSampleFile();
|
||||
}
|
||||
if(myEvent.get(Event::KeyboardOne1))
|
||||
if(myEvent.get(Event::RightKeyboard1))
|
||||
{
|
||||
myTape = 2;
|
||||
myIdx = myGame == KVBBEARS ? KVBLOCKBITS : 0;
|
||||
|
@ -61,7 +61,7 @@ void KidVid::update()
|
|||
openSampleFile();
|
||||
//cerr << "myTape = " << myTape << endl;
|
||||
}
|
||||
else if(myEvent.get(Event::KeyboardOne2))
|
||||
else if(myEvent.get(Event::RightKeyboard2))
|
||||
{
|
||||
myTape = 3;
|
||||
myIdx = myGame == KVBBEARS ? KVBLOCKBITS : 0;
|
||||
|
@ -70,7 +70,7 @@ void KidVid::update()
|
|||
openSampleFile();
|
||||
//cerr << "myTape = " << myTape << endl;
|
||||
}
|
||||
else if(myEvent.get(Event::KeyboardOne3))
|
||||
else if(myEvent.get(Event::RightKeyboard3))
|
||||
{
|
||||
if(myGame == KVBBEARS) /* Berenstain Bears ? */
|
||||
{
|
||||
|
|
|
@ -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::JoystickZeroFire) != 0;
|
||||
bool firePressed = myEvent.get(Event::JoystickLeftFire) != 0;
|
||||
|
||||
// We allow left and right mouse buttons for fire button
|
||||
firePressed = firePressed
|
||||
|
|
|
@ -49,65 +49,65 @@ Paddles::Paddles(Jack jack, const Event& event, const System& system,
|
|||
{
|
||||
if(!altmap)
|
||||
{
|
||||
// First paddle is 0, second is 1
|
||||
myP0AxisValue = Event::PaddleZeroAnalog;
|
||||
myP1AxisValue = Event::PaddleOneAnalog;
|
||||
myP0FireEvent = Event::PaddleZeroFire;
|
||||
myP1FireEvent = Event::PaddleOneFire;
|
||||
// First paddle is left A, second is left B
|
||||
myAAxisValue = Event::PaddleLeftAAnalog;
|
||||
myBAxisValue = Event::PaddleLeftBAnalog;
|
||||
myLeftAFireEvent = Event::PaddleLeftAFire;
|
||||
myLeftBFireEvent = Event::PaddleLeftBFire;
|
||||
|
||||
// These can be affected by changes in axis orientation
|
||||
myP0DecEvent = Event::PaddleZeroDecrease;
|
||||
myP0IncEvent = Event::PaddleZeroIncrease;
|
||||
myP1DecEvent = Event::PaddleOneDecrease;
|
||||
myP1IncEvent = Event::PaddleOneIncrease;
|
||||
myLeftADecEvent = Event::PaddleLeftADecrease;
|
||||
myLeftAIncEvent = Event::PaddleLeftAIncrease;
|
||||
myLeftBDecEvent = Event::PaddleLeftBDecrease;
|
||||
myLeftBIncEvent = Event::PaddleLeftBIncrease;
|
||||
}
|
||||
else
|
||||
{
|
||||
// First paddle is 4, second is 5 (fire buttons only)
|
||||
myP0FireEvent = Event::PaddleFourFire;
|
||||
myP1FireEvent = Event::PaddleFiveFire;
|
||||
// First paddle is QT 3A, second is QT 3B (fire buttons only)
|
||||
myLeftAFireEvent = Event::QTPaddle3AFire;
|
||||
myLeftBFireEvent = Event::QTPaddle3BFire;
|
||||
|
||||
myP0AxisValue = myP1AxisValue =
|
||||
myP0DecEvent = myP0IncEvent =
|
||||
myP1DecEvent = myP1IncEvent = Event::NoType;
|
||||
myAAxisValue = myBAxisValue =
|
||||
myLeftADecEvent = myLeftAIncEvent =
|
||||
myLeftBDecEvent = myLeftBIncEvent = Event::NoType;
|
||||
}
|
||||
}
|
||||
else // Jack is right port
|
||||
{
|
||||
if(!altmap)
|
||||
{
|
||||
// First paddle is 2, second is 3
|
||||
myP0AxisValue = Event::PaddleTwoAnalog;
|
||||
myP1AxisValue = Event::PaddleThreeAnalog;
|
||||
myP0FireEvent = Event::PaddleTwoFire;
|
||||
myP1FireEvent = Event::PaddleThreeFire;
|
||||
// First paddle is right A, second is right B
|
||||
myAAxisValue = Event::PaddleRightAAnalog;
|
||||
myBAxisValue = Event::PaddleRightBAnalog;
|
||||
myLeftAFireEvent = Event::PaddleRightAFire;
|
||||
myLeftBFireEvent = Event::PaddleRightBFire;
|
||||
|
||||
// These can be affected by changes in axis orientation
|
||||
myP0DecEvent = Event::PaddleTwoDecrease;
|
||||
myP0IncEvent = Event::PaddleTwoIncrease;
|
||||
myP1DecEvent = Event::PaddleThreeDecrease;
|
||||
myP1IncEvent = Event::PaddleThreeIncrease;
|
||||
myLeftADecEvent = Event::PaddleRightADecrease;
|
||||
myLeftAIncEvent = Event::PaddleRightAIncrease;
|
||||
myLeftBDecEvent = Event::PaddleRightBDecrease;
|
||||
myLeftBIncEvent = Event::PaddleRightBIncrease;
|
||||
}
|
||||
else
|
||||
{
|
||||
// First paddle is 6, second is 7 (fire buttons only)
|
||||
myP0FireEvent = Event::PaddleSixFire;
|
||||
myP1FireEvent = Event::PaddleSevenFire;
|
||||
// First paddle is QT 4A, second is QT 4B (fire buttons only)
|
||||
myLeftAFireEvent = Event::QTPaddle4AFire;
|
||||
myLeftBFireEvent = Event::QTPaddle4BFire;
|
||||
|
||||
myP0AxisValue = myP1AxisValue =
|
||||
myP0DecEvent = myP0IncEvent =
|
||||
myP1DecEvent = myP1IncEvent = Event::NoType;
|
||||
myAAxisValue = myBAxisValue =
|
||||
myLeftADecEvent = myLeftAIncEvent =
|
||||
myLeftBDecEvent = myLeftBIncEvent = Event::NoType;
|
||||
}
|
||||
}
|
||||
|
||||
// Some games swap the paddles
|
||||
if(swappaddle)
|
||||
{
|
||||
// First paddle is 1|3, second is 0|2
|
||||
swapEvents(myP0AxisValue, myP1AxisValue);
|
||||
swapEvents(myP0FireEvent, myP1FireEvent);
|
||||
swapEvents(myP0DecEvent, myP1DecEvent);
|
||||
swapEvents(myP0IncEvent, myP1IncEvent);
|
||||
// First paddle is right A|B, second is left A|B
|
||||
swapEvents(myAAxisValue, myBAxisValue);
|
||||
swapEvents(myLeftAFireEvent, myLeftBFireEvent);
|
||||
swapEvents(myLeftADecEvent, myLeftBDecEvent);
|
||||
swapEvents(myLeftAIncEvent, myLeftBIncEvent);
|
||||
}
|
||||
|
||||
// Direction of movement can be swapped
|
||||
|
@ -115,8 +115,8 @@ Paddles::Paddles(Jack jack, const Event& event, const System& system,
|
|||
// result in either increasing or decreasing paddle movement
|
||||
if(swapdir)
|
||||
{
|
||||
swapEvents(myP0DecEvent, myP0IncEvent);
|
||||
swapEvents(myP1DecEvent, myP1IncEvent);
|
||||
swapEvents(myLeftADecEvent, myLeftAIncEvent);
|
||||
swapEvents(myLeftBDecEvent, myLeftBIncEvent);
|
||||
}
|
||||
|
||||
// The following are independent of whether or not the port
|
||||
|
@ -159,8 +159,8 @@ void Paddles::update()
|
|||
setPin(DigitalPin::Four, true);
|
||||
|
||||
// Digital events (from keyboard or joystick hats & buttons)
|
||||
bool firePressedP0 = myEvent.get(myP0FireEvent) != 0;
|
||||
bool firePressedP1 = myEvent.get(myP1FireEvent) != 0;
|
||||
bool firePressedA = myEvent.get(myLeftAFireEvent) != 0;
|
||||
bool firePressedB = myEvent.get(myLeftBFireEvent) != 0;
|
||||
|
||||
// Paddle movement is a very difficult thing to accurately emulate,
|
||||
// since it originally came from an analog device that had very
|
||||
|
@ -175,7 +175,7 @@ void Paddles::update()
|
|||
|
||||
if(!updateAnalogAxes())
|
||||
{
|
||||
updateMouse(firePressedP0, firePressedP1);
|
||||
updateMouse(firePressedA, firePressedB);
|
||||
updateDigitalAxes();
|
||||
|
||||
// Only change state if the charge has actually changed
|
||||
|
@ -191,8 +191,8 @@ void Paddles::update()
|
|||
}
|
||||
}
|
||||
|
||||
setPin(DigitalPin::Four, !getAutoFireState(firePressedP0));
|
||||
setPin(DigitalPin::Three, !getAutoFireStateP1(firePressedP1));
|
||||
setPin(DigitalPin::Four, !getAutoFireState(firePressedA));
|
||||
setPin(DigitalPin::Three, !getAutoFireStateP1(firePressedB));
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -221,8 +221,8 @@ bool Paddles::updateAnalogAxes()
|
|||
const double baseFactor = bFac[DEJITTER_BASE];
|
||||
const double diffFactor = dFac[DEJITTER_DIFF];
|
||||
|
||||
int sa_xaxis = myEvent.get(myP0AxisValue);
|
||||
int sa_yaxis = myEvent.get(myP1AxisValue);
|
||||
int sa_xaxis = myEvent.get(myAAxisValue);
|
||||
int sa_yaxis = myEvent.get(myBAxisValue);
|
||||
bool sa_changed = false;
|
||||
|
||||
if(abs(myLastAxisX - sa_xaxis) > 10)
|
||||
|
@ -261,7 +261,7 @@ bool Paddles::updateAnalogAxes()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Paddles::updateMouse(bool& firePressedP0, bool& firePressedP1)
|
||||
void Paddles::updateMouse(bool& firePressedA, bool& firePressedB)
|
||||
{
|
||||
// Mouse motion events give relative movement
|
||||
// That is, they're only relevant if they're non-zero
|
||||
|
@ -272,11 +272,11 @@ void Paddles::updateMouse(bool& firePressedP0, bool& firePressedP1)
|
|||
(myEvent.get(myAxisMouseMotion) * MOUSE_SENSITIVITY),
|
||||
TRIGMIN, TRIGRANGE);
|
||||
if(myMPaddleID == 0)
|
||||
firePressedP0 = firePressedP0
|
||||
firePressedA = firePressedA
|
||||
|| myEvent.get(Event::MouseButtonLeftValue)
|
||||
|| myEvent.get(Event::MouseButtonRightValue);
|
||||
else
|
||||
firePressedP1 = firePressedP1
|
||||
firePressedB = firePressedB
|
||||
|| myEvent.get(Event::MouseButtonLeftValue)
|
||||
|| myEvent.get(Event::MouseButtonRightValue);
|
||||
}
|
||||
|
@ -290,10 +290,10 @@ void Paddles::updateMouse(bool& firePressedP0, bool& firePressedP1)
|
|||
(myEvent.get(Event::MouseAxisXMove) * MOUSE_SENSITIVITY),
|
||||
TRIGMIN, TRIGRANGE);
|
||||
if(myMPaddleIDX == 0)
|
||||
firePressedP0 = firePressedP0
|
||||
firePressedA = firePressedA
|
||||
|| myEvent.get(Event::MouseButtonLeftValue);
|
||||
else
|
||||
firePressedP1 = firePressedP1
|
||||
firePressedB = firePressedB
|
||||
|| myEvent.get(Event::MouseButtonLeftValue);
|
||||
}
|
||||
if(myMPaddleIDY > -1)
|
||||
|
@ -302,10 +302,10 @@ void Paddles::updateMouse(bool& firePressedP0, bool& firePressedP1)
|
|||
(myEvent.get(Event::MouseAxisYMove) * MOUSE_SENSITIVITY),
|
||||
TRIGMIN, TRIGRANGE);
|
||||
if(myMPaddleIDY == 0)
|
||||
firePressedP0 = firePressedP0
|
||||
firePressedA = firePressedA
|
||||
|| myEvent.get(Event::MouseButtonRightValue);
|
||||
else
|
||||
firePressedP1 = firePressedP1
|
||||
firePressedB = firePressedB
|
||||
|| myEvent.get(Event::MouseButtonRightValue);
|
||||
}
|
||||
}
|
||||
|
@ -316,45 +316,45 @@ void Paddles::updateDigitalAxes()
|
|||
{
|
||||
// Finally, consider digital input, where movement happens
|
||||
// until a digital event is released
|
||||
if(myKeyRepeat0)
|
||||
if(myKeyRepeatA)
|
||||
{
|
||||
myPaddleRepeat0++;
|
||||
if(myPaddleRepeat0 > DIGITAL_SENSITIVITY)
|
||||
myPaddleRepeat0 = DIGITAL_DISTANCE;
|
||||
myPaddleRepeatA++;
|
||||
if(myPaddleRepeatA > DIGITAL_SENSITIVITY)
|
||||
myPaddleRepeatA = DIGITAL_DISTANCE;
|
||||
}
|
||||
if(myKeyRepeat1)
|
||||
if(myKeyRepeatB)
|
||||
{
|
||||
myPaddleRepeat1++;
|
||||
if(myPaddleRepeat1 > DIGITAL_SENSITIVITY)
|
||||
myPaddleRepeat1 = DIGITAL_DISTANCE;
|
||||
myPaddleRepeatB++;
|
||||
if(myPaddleRepeatB > DIGITAL_SENSITIVITY)
|
||||
myPaddleRepeatB = DIGITAL_DISTANCE;
|
||||
}
|
||||
|
||||
myKeyRepeat0 = false;
|
||||
myKeyRepeat1 = false;
|
||||
myKeyRepeatA = false;
|
||||
myKeyRepeatB = false;
|
||||
|
||||
if(myEvent.get(myP0DecEvent))
|
||||
if(myEvent.get(myLeftADecEvent))
|
||||
{
|
||||
myKeyRepeat0 = true;
|
||||
if(myCharge[myAxisDigitalZero] > myPaddleRepeat0)
|
||||
myCharge[myAxisDigitalZero] -= myPaddleRepeat0;
|
||||
myKeyRepeatA = true;
|
||||
if(myCharge[myAxisDigitalZero] > myPaddleRepeatA)
|
||||
myCharge[myAxisDigitalZero] -= myPaddleRepeatA;
|
||||
}
|
||||
if(myEvent.get(myP0IncEvent))
|
||||
if(myEvent.get(myLeftAIncEvent))
|
||||
{
|
||||
myKeyRepeat0 = true;
|
||||
if((myCharge[myAxisDigitalZero] + myPaddleRepeat0) < TRIGRANGE)
|
||||
myCharge[myAxisDigitalZero] += myPaddleRepeat0;
|
||||
myKeyRepeatA = true;
|
||||
if((myCharge[myAxisDigitalZero] + myPaddleRepeatA) < TRIGRANGE)
|
||||
myCharge[myAxisDigitalZero] += myPaddleRepeatA;
|
||||
}
|
||||
if(myEvent.get(myP1DecEvent))
|
||||
if(myEvent.get(myLeftBDecEvent))
|
||||
{
|
||||
myKeyRepeat1 = true;
|
||||
if(myCharge[myAxisDigitalOne] > myPaddleRepeat1)
|
||||
myCharge[myAxisDigitalOne] -= myPaddleRepeat1;
|
||||
myKeyRepeatB = true;
|
||||
if(myCharge[myAxisDigitalOne] > myPaddleRepeatB)
|
||||
myCharge[myAxisDigitalOne] -= myPaddleRepeatB;
|
||||
}
|
||||
if(myEvent.get(myP1IncEvent))
|
||||
if(myEvent.get(myLeftBIncEvent))
|
||||
{
|
||||
myKeyRepeat1 = true;
|
||||
if((myCharge[myAxisDigitalOne] + myPaddleRepeat1) < TRIGRANGE)
|
||||
myCharge[myAxisDigitalOne] += myPaddleRepeat1;
|
||||
myKeyRepeatB = true;
|
||||
if((myCharge[myAxisDigitalOne] + myPaddleRepeatB) < TRIGRANGE)
|
||||
myCharge[myAxisDigitalOne] += myPaddleRepeatB;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -174,18 +174,18 @@ class Paddles : public Controller
|
|||
|
||||
// Pre-compute the events we care about based on given port
|
||||
// This will eliminate test for left or right port in update()
|
||||
Event::Type myP0AxisValue, myP1AxisValue,
|
||||
myP0DecEvent, myP0IncEvent,
|
||||
myP1DecEvent, myP1IncEvent,
|
||||
myP0FireEvent, myP1FireEvent,
|
||||
Event::Type myAAxisValue, myBAxisValue,
|
||||
myLeftADecEvent, myLeftAIncEvent,
|
||||
myLeftBDecEvent, myLeftBIncEvent,
|
||||
myLeftAFireEvent, myLeftBFireEvent,
|
||||
myAxisMouseMotion;
|
||||
|
||||
// The following are used for the various mouse-axis modes
|
||||
int myMPaddleID{-1}; // paddle to emulate in 'automatic' mode
|
||||
int myMPaddleIDX{-1}, myMPaddleIDY{-1}; // paddles to emulate in 'specific axis' mode
|
||||
|
||||
bool myKeyRepeat0{false}, myKeyRepeat1{false};
|
||||
int myPaddleRepeat0{0}, myPaddleRepeat1{0};
|
||||
bool myKeyRepeatA{false}, myKeyRepeatB{false};
|
||||
int myPaddleRepeatA{0}, myPaddleRepeatB{0};
|
||||
std::array<int, 2> myCharge{TRIGRANGE/2, TRIGRANGE/2}, myLastCharge{0};
|
||||
int myLastAxisX{0}, myLastAxisY{0};
|
||||
int myAxisDigitalZero{0}, myAxisDigitalOne{0};
|
||||
|
@ -211,7 +211,7 @@ class Paddles : public Controller
|
|||
/**
|
||||
Update the entire state according to mouse events currently set.
|
||||
*/
|
||||
void updateMouse(bool& firePressedP0, bool& firePressedP1);
|
||||
void updateMouse(bool& firePressedA, bool& firePressedB);
|
||||
|
||||
/**
|
||||
Update the axes pin state according to the keyboard events currently set.
|
||||
|
|
|
@ -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::JoystickZeroFire) ||
|
||||
setPin(DigitalPin::Six, !getAutoFireState(myEvent.get(Event::JoystickLeftFire) ||
|
||||
myEvent.get(Event::MouseButtonLeftValue) || myEvent.get(Event::MouseButtonRightValue)));
|
||||
}
|
||||
|
||||
|
|
|
@ -367,17 +367,17 @@ void GameInfoDialog::addControllersTab()
|
|||
wid.push_back(myMouseControl);
|
||||
|
||||
// Mouse controller specific axis
|
||||
pwidth = _font.getStringWidth("MindLink 0");
|
||||
pwidth = _font.getStringWidth("Right MindLink");
|
||||
ctrls.clear();
|
||||
VarList::push_back(ctrls, "None", static_cast<uInt32>(MouseControl::Type::NoControl));
|
||||
VarList::push_back(ctrls, "Paddle 0", static_cast<uInt32>(MouseControl::Type::Paddle0));
|
||||
VarList::push_back(ctrls, "Paddle 1", static_cast<uInt32>(MouseControl::Type::Paddle1));
|
||||
VarList::push_back(ctrls, "Paddle 2", static_cast<uInt32>(MouseControl::Type::Paddle2));
|
||||
VarList::push_back(ctrls, "Paddle 3", static_cast<uInt32>(MouseControl::Type::Paddle3));
|
||||
VarList::push_back(ctrls, "Driving 0", static_cast<uInt32>(MouseControl::Type::Driving0));
|
||||
VarList::push_back(ctrls, "Driving 1", static_cast<uInt32>(MouseControl::Type::Driving1));
|
||||
VarList::push_back(ctrls, "MindLink 0", static_cast<uInt32>(MouseControl::Type::MindLink0));
|
||||
VarList::push_back(ctrls, "MindLink 1", static_cast<uInt32>(MouseControl::Type::MindLink1));
|
||||
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));
|
||||
|
||||
xpos += CheckboxWidget::prefixSize(_font);
|
||||
ypos += lineHeight + VGAP;
|
||||
|
|
|
@ -72,7 +72,7 @@ QuadTariDialog::QuadTariDialog(GuiObject* boss, const GUI::Font& font, int max_w
|
|||
|
||||
ypos += lineHeight + VGAP * 2;
|
||||
myLeft2Port = new PopUpWidget(this, font, xpos, ypos,
|
||||
pwidth, lineHeight, ctrls, "P2 ");
|
||||
pwidth, lineHeight, ctrls, "P3 ");
|
||||
wid.push_back(myLeft2Port);
|
||||
|
||||
xpos = _w - HBORDER - myLeft1Port->getWidth(); // aligned right
|
||||
|
@ -81,7 +81,7 @@ QuadTariDialog::QuadTariDialog(GuiObject* boss, const GUI::Font& font, int max_w
|
|||
|
||||
ypos += lineHeight + VGAP * 2;
|
||||
myRight1Port = new PopUpWidget(this, font, xpos, ypos,
|
||||
pwidth, lineHeight, ctrls, "P3 ");
|
||||
pwidth, lineHeight, ctrls, "P2 ");
|
||||
wid.push_back(myRight1Port);
|
||||
|
||||
ypos += lineHeight + VGAP * 2;
|
||||
|
|
Loading…
Reference in New Issue