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: Driving.hxx 2296 2011-12-26 21:40:28Z stephena $
17
// $Id: Driving.hxx 2372 2012-01-29 17:33:36Z stephena $
18
18
//============================================================================
20
20
#ifndef DRIVING_HXX
28
28
The standard Atari 2600 Indy 500 driving controller.
30
30
@author Bradford W. Mott
31
@version $Id: Driving.hxx 2296 2011-12-26 21:40:28Z stephena $
31
@version $Id: Driving.hxx 2372 2012-01-29 17:33:36Z stephena $
33
33
class Driving : public Controller
59
59
Determines how this controller will treat values received from the
60
X and Y axis of the mouse. Since not all controllers use the mouse,
61
it's up to the specific class to decide how to use this data.
60
X/Y axis and left/right buttons of the mouse. Since not all controllers
61
use the mouse, it's up to the specific class to decide how to use this data.
63
63
If either of the axis is set to 'Automatic', then we automatically
64
use this number for the control type as follows:
65
0 - paddle 0, joystick 0 (and controllers similar to a joystick)
66
1 - paddle 1, joystick 1 (and controllers similar to a joystick)
67
2 - paddle 2, joystick 0 (and controllers similar to a joystick)
68
3 - paddle 3, joystick 1 (and controllers similar to a joystick)
64
use the ctrlID for the control type.
66
In the current implementation, the left button is tied to the X axis,
67
and the right one tied to the Y axis.
70
69
@param xaxis How the controller should use x-axis data
71
70
@param yaxis How the controller should use y-axis data
72
71
@param ctrlID The controller ID to use axis 'auto' mode
74
73
void setMouseControl(
75
MouseAxisControl xaxis, MouseAxisControl yaxis, int ctrlID = -1);
74
MouseControl::Axis xaxis, MouseControl::Axis yaxis, int ctrlID = -1);
78
77
// Counter to iterate through the gray codes
91
90
myXAxisValue, myYAxisValue, myAxisMouseMotion;
93
92
// Controller to emulate in mouse axis 'automatic' mode
95
// Controller to emulate in mouse axis 'specific' mode
96
int myControlIDX, myControlIDY;