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

« back to all changes in this revision

Viewing changes to src/emucore/Paddles.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: Paddles.hxx 2296 2011-12-26 21:40:28Z stephena $
 
17
// $Id: Paddles.hxx 2371 2012-01-29 17:08:51Z stephena $
18
18
//============================================================================
19
19
 
20
20
#ifndef PADDLES_HXX
28
28
  The standard Atari 2600 pair of paddle controllers.
29
29
 
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 $
32
32
*/
33
33
class Paddles : public Controller
34
34
{
40
40
      @param event  The event object to use for events
41
41
      @param system The system using this controller
42
42
 
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)
48
48
    */
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);
51
51
 
52
52
    /**
53
53
      Destructor
63
63
 
64
64
    /**
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.
68
68
 
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.
 
71
 
 
72
      In the current implementation, the left button is tied to the X axis,
 
73
      and the right one tied to the Y axis.
75
74
 
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
79
78
    */
80
79
    void setMouseControl(
81
 
        MouseAxisControl xaxis, MouseAxisControl yaxis, int ctrlID = -1);
 
80
        MouseControl::Axis xaxis, MouseControl::Axis yaxis, int ctrlID = -1);
82
81
 
83
82
    /**
84
83
      Sets the sensitivity for digital emulation of paddle movement.
127
126
    int myLastAxisX, myLastAxisY;
128
127
    int myAxisDigitalZero, myAxisDigitalOne;
129
128
 
 
129
    bool mySwapPorts;
 
130
 
130
131
    static int _DIGITAL_SENSITIVITY, _DIGITAL_DISTANCE;
131
132
    static int _MOUSE_SENSITIVITY;
132
133