8
8
// SS SS tt ee ll ll aa aa
9
9
// SSSS ttt eeeee llll llll aaaaa
11
// Copyright (c) 1995-2011 by Bradford W. Mott, Stephen Anthony
11
// Copyright (c) 1995-2012 by Bradford W. Mott, Stephen Anthony
12
12
// and the Stella Team
14
14
// See the file "License.txt" for information on usage and redistribution of
15
15
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
17
// $Id: Paddles.hxx 2296 2011-12-26 21:40:28Z stephena $
17
// $Id: Paddles.hxx 2371 2012-01-29 17:08:51Z stephena $
18
18
//============================================================================
20
20
#ifndef PADDLES_HXX
28
28
The standard Atari 2600 pair of paddle controllers.
30
30
@author Bradford W. Mott
31
@version $Id: Paddles.hxx 2296 2011-12-26 21:40:28Z stephena $
31
@version $Id: Paddles.hxx 2371 2012-01-29 17:08:51Z stephena $
33
33
class Paddles : public Controller
40
40
@param event The event object to use for events
41
41
@param system The system using this controller
43
@param swapport Whether to swap the paddles plugged into this jack
44
@param swapaxis Whether to swap the axis on the paddle (x <-> y)
45
@param swapdir Whether to swap the direction for which an axis
46
causes movement (lesser axis values cause paddle
47
resistance to decrease instead of increase)
43
@param swappaddle Whether to swap the paddles plugged into this jack
44
@param swapaxis Whether to swap the axis on the paddle (x <-> y)
45
@param swapdir Whether to swap the direction for which an axis
46
causes movement (lesser axis values cause paddle
47
resistance to decrease instead of increase)
49
49
Paddles(Jack jack, const Event& event, const System& system,
50
bool swapport, bool swapaxis, bool swapdir);
50
bool swappaddle, bool swapaxis, bool swapdir);
65
65
Determines how this controller will treat values received from the
66
X and Y axis of the mouse. Since not all controllers use the mouse,
67
it's up to the specific class to decide how to use this data.
66
X/Y axis and left/right buttons of the mouse. Since not all controllers
67
use the mouse, it's up to the specific class to decide how to use this data.
69
69
If either of the axis is set to 'Automatic', then we automatically
70
use this number for the control type as follows:
71
0 - paddle 0, joystick 0 (and controllers similar to a joystick)
72
1 - paddle 1, joystick 1 (and controllers similar to a joystick)
73
2 - paddle 2, joystick 0 (and controllers similar to a joystick)
74
3 - paddle 3, joystick 1 (and controllers similar to a joystick)
70
use the ctrlID for the control type.
72
In the current implementation, the left button is tied to the X axis,
73
and the right one tied to the Y axis.
76
75
@param xaxis How the controller should use x-axis data
77
76
@param yaxis How the controller should use y-axis data
78
77
@param ctrlID The controller ID to use axis 'auto' mode
80
79
void setMouseControl(
81
MouseAxisControl xaxis, MouseAxisControl yaxis, int ctrlID = -1);
80
MouseControl::Axis xaxis, MouseControl::Axis yaxis, int ctrlID = -1);
84
83
Sets the sensitivity for digital emulation of paddle movement.
127
126
int myLastAxisX, myLastAxisY;
128
127
int myAxisDigitalZero, myAxisDigitalOne;
130
131
static int _DIGITAL_SENSITIVITY, _DIGITAL_DISTANCE;
131
132
static int _MOUSE_SENSITIVITY;