| 1 | //============================================================================ |
| 2 | // |
| 3 | // SSSS tt lll lll |
| 4 | // SS SS tt ll ll |
| 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 |
| 10 | // |
| 11 | // Copyright (c) 1995-2019 by Bradford W. Mott, Stephen Anthony |
| 12 | // and the Stella Team |
| 13 | // |
| 14 | // See the file "License.txt" for information on usage and redistribution of |
| 15 | // this file, and for a DISCLAIMER OF ALL WARRANTIES. |
| 16 | //============================================================================ |
| 17 | |
| 18 | #ifndef EVENTHANDLER_CONSTANTS_HXX |
| 19 | #define EVENTHANDLER_CONSTANTS_HXX |
| 20 | |
| 21 | // Enumeration representing the different states of operation |
| 22 | enum class EventHandlerState { |
| 23 | EMULATION, |
| 24 | TIMEMACHINE, |
| 25 | PAUSE, |
| 26 | LAUNCHER, |
| 27 | OPTIONSMENU, |
| 28 | CMDMENU, |
| 29 | DEBUGGER, |
| 30 | NONE |
| 31 | }; |
| 32 | |
| 33 | enum class MouseButton { |
| 34 | LEFT, |
| 35 | RIGHT, |
| 36 | WHEELDOWN, |
| 37 | WHEELUP, |
| 38 | NONE |
| 39 | }; |
| 40 | |
| 41 | static constexpr int JOY_CTRL_NONE = -1; |
| 42 | |
| 43 | enum class JoyAxis { |
| 44 | X = 0, // make sure these are set correctly, |
| 45 | Y = 1, // since they'll be used as array indices |
| 46 | Z = 2, |
| 47 | NONE = JOY_CTRL_NONE |
| 48 | }; |
| 49 | |
| 50 | enum class JoyDir { |
| 51 | NEG = -1, |
| 52 | POS = 1, |
| 53 | NONE = 0, |
| 54 | ANALOG = 2 |
| 55 | }; |
| 56 | |
| 57 | enum class JoyHatDir { |
| 58 | UP = 0, // make sure these are set correctly, |
| 59 | DOWN = 1, // since they'll be used as array indices |
| 60 | LEFT = 2, |
| 61 | RIGHT = 3, |
| 62 | CENTER = 4 |
| 63 | }; |
| 64 | |
| 65 | // TODO - add bitmask class for 'enum class' and convert this |
| 66 | enum JoyHatMask { |
| 67 | EVENT_HATUP_M = 1<<0, |
| 68 | EVENT_HATDOWN_M = 1<<1, |
| 69 | EVENT_HATLEFT_M = 1<<2, |
| 70 | EVENT_HATRIGHT_M = 1<<3, |
| 71 | EVENT_HATCENTER_M = 1<<4 |
| 72 | }; |
| 73 | |
| 74 | static const int NUM_PORTS = 2; |
| 75 | |
| 76 | enum class EventMode { |
| 77 | kEmulationMode, // active mapping used for emulation |
| 78 | , // mapping used for dialogs |
| 79 | kJoystickMode, // 4 extra modes for mapping controller keys separately for emulation mode |
| 80 | kPaddlesMode, |
| 81 | kKeypadMode, |
| 82 | kCompuMateMode, // cannot be remapped |
| 83 | kCommonMode // mapping common between controllers |
| 84 | }; |
| 85 | |
| 86 | namespace GUI |
| 87 | { |
| 88 | #ifdef RETRON77 |
| 89 | static const string SELECT = "Mode" ; |
| 90 | static const string LEFT_DIFFICULTY = "P1 skill" ; |
| 91 | static const string RIGHT_DIFFICULTY = "P2 skill" ; |
| 92 | static const string LEFT_DIFF = "P1 Skill" ; |
| 93 | static const string RIGHT_DIFF = "P2 Skill" ; |
| 94 | #else |
| 95 | static const string SELECT = "Select" ; |
| 96 | static const string LEFT_DIFFICULTY = "Left difficulty" ; |
| 97 | static const string RIGHT_DIFFICULTY = "Right difficulty" ; |
| 98 | static const string LEFT_DIFF = "Left Diff" ; |
| 99 | static const string RIGHT_DIFF = "Right Diff" ; |
| 100 | #endif |
| 101 | } |
| 102 | |
| 103 | #endif // EVENTHANDLER_CONSTANTS_HXX |
| 104 | |