1
//============================================================================
5
// SS tttttt eeee ll ll aaaa
6
// SSSS tt ee ee ll ll aa
7
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
8
// SS SS tt ee ll ll aa aa
9
// SSSS ttt eeeee llll llll aaaaa
11
// Copyright (c) 1995-2012 by Bradford W. Mott, Stephen Anthony
12
// and the Stella Team
14
// See the file "License.txt" for information on usage and redistribution of
15
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
17
// $Id: MouseControl.hxx 2371 2012-01-29 17:08:51Z stephena $
18
//============================================================================
20
#ifndef MOUSE_CONTROL_HXX
21
#define MOUSE_CONTROL_HXX
31
The mouse can control various virtual 'controllers' in many different
32
ways. In 'auto' mode, the entire mouse (both axes and buttons) are used
33
as one controller. In per-ROM axis mode, each axis/button may control
34
separate controllers. As well, we'd like to switch dynamically between
35
each of these modes at runtime.
37
This class encapsulates all required info to implement this functionality.
39
@author Stephen Anthony
45
Enumeration of mouse axis control types
49
Paddle0 = 0, Paddle1, Paddle2, Paddle3,
50
Driving0, Driving1, Automatic, NoControl
55
Create a new MouseControl object
57
@param console The console in use by the system
58
@param mode Contains information about how to use the mouse axes/buttons
60
MouseControl(Console& console, const string& mode);
65
virtual ~MouseControl();
69
Cycle through each available mouse control mode
71
@return A message explaining the current mouse mode
76
void addLeftControllerModes(bool noswap);
77
void addRightControllerModes(bool noswap);
78
void addPaddleModes(int lport, int rport, int lname, int rname);
81
const Properties& myProps;
82
Controller& myLeftController;
83
Controller& myRightController;
95
MouseMode(const string& msg)
100
MouseMode(Axis x, Axis y, int id, const string& msg)
105
friend ostream& operator<<(ostream& os, const MouseMode& mm)
107
os << "xaxis=" << mm.xaxis << ", yaxis=" << mm.yaxis
108
<< ", id=" << mm.controlID << ", msg=" << mm.message;
113
int myCurrentModeNum;
114
Common::Array<MouseMode> myModeList;