~ubuntu-branches/debian/sid/stella/sid

« back to all changes in this revision

Viewing changes to src/emucore/Driving.hxx

  • Committer: Package Import Robot
  • Author(s): Stephen Kitt
  • Date: 2012-02-05 08:09:05 UTC
  • mfrom: (1.1.12)
  • Revision ID: package-import@ubuntu.com-20120205080905-9ej05rmkibowsm7j
Tags: 3.5.5-1
* New upstream version.
* Rewrite debian/copyright, using DEP-5 and updating for 2012.
* Update manpage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
//  SS  SS   tt   ee      ll   ll  aa  aa
9
9
//   SSSS     ttt  eeeee llll llll  aaaaa
10
10
//
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
13
13
//
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.
16
16
//
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
//============================================================================
19
19
 
20
20
#ifndef DRIVING_HXX
28
28
  The standard Atari 2600 Indy 500 driving controller.
29
29
 
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 $
32
32
*/
33
33
class Driving : public Controller
34
34
{
57
57
 
58
58
    /**
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.
62
62
 
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.
 
65
 
 
66
      In the current implementation, the left button is tied to the X axis,
 
67
      and the right one tied to the Y axis.
69
68
 
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
73
72
    */
74
73
    void setMouseControl(
75
 
        MouseAxisControl xaxis, MouseAxisControl yaxis, int ctrlID = -1);
 
74
        MouseControl::Axis xaxis, MouseControl::Axis yaxis, int ctrlID = -1);
76
75
 
77
76
  private:
78
77
    // Counter to iterate through the gray codes
91
90
                myXAxisValue, myYAxisValue, myAxisMouseMotion;
92
91
 
93
92
    // Controller to emulate in mouse axis 'automatic' mode
94
 
    int myControlID;  
 
93
    int myControlID;
 
94
 
 
95
    // Controller to emulate in mouse axis 'specific' mode
 
96
    int myControlIDX, myControlIDY;
95
97
};
96
98
 
97
99
#endif