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-2021 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 PLAYBACK, 26 PAUSE, 27 LAUNCHER, 28 OPTIONSMENU, 29 CMDMENU, 30 HIGHSCORESMENU, 31 MESSAGEMENU, 32 PLUSROMSMENU, 33 DEBUGGER, 34 NONE 35 }; 36 37 enum class MouseButton { 38 LEFT, 39 RIGHT, 40 WHEELDOWN, 41 WHEELUP, 42 NONE 43 }; 44 45 static constexpr int JOY_CTRL_NONE = -1; 46 47 enum class JoyAxis { 48 X = 0, // make sure these are set correctly, 49 Y = 1, // since they'll be used as array indices 50 Z = 2, 51 A3 = 3, 52 NONE = JOY_CTRL_NONE 53 }; 54 55 enum class JoyDir { 56 NEG = -1, 57 POS = 1, 58 NONE = 0, 59 ANALOG = 2 60 }; 61 62 enum class JoyHatDir { 63 UP = 0, // make sure these are set correctly, 64 DOWN = 1, // since they'll be used as array indices 65 LEFT = 2, 66 RIGHT = 3, 67 CENTER = 4 68 }; 69 70 // TODO - add bitmask class for 'enum class' and convert this 71 enum JoyHatMask { 72 EVENT_HATUP_M = 1<<0, 73 EVENT_HATDOWN_M = 1<<1, 74 EVENT_HATLEFT_M = 1<<2, 75 EVENT_HATRIGHT_M = 1<<3, 76 EVENT_HATCENTER_M = 1<<4 77 }; 78 79 enum class EventMode { 80 kEmulationMode, // active mapping used for emulation 81 kMenuMode, // mapping used for dialogs 82 kJoystickMode, // 4 extra modes for mapping controller keys separately for emulation mode 83 kPaddlesMode, 84 kKeyboardMode, 85 kCompuMateMode, // cannot be remapped 86 kCommonMode, // mapping common between controllers 87 kEditMode, // mapping used in editable widgets 88 kPromptMode, // extra mappings used in debugger's prompt widget 89 kNumModes 90 }; 91 92 namespace GUI 93 { 94 #ifdef RETRON77 95 static const string SELECT = "Mode"; 96 static const string LEFT_DIFFICULTY = "P1 skill"; 97 static const string RIGHT_DIFFICULTY = "P2 skill"; 98 static const string LEFT_DIFF = "P1 Skill"; 99 static const string RIGHT_DIFF = "P2 Skill"; 100 #else 101 static const string SELECT = "Select"; 102 static const string LEFT_DIFFICULTY = "Left difficulty"; 103 static const string RIGHT_DIFFICULTY = "Right difficulty"; 104 static const string LEFT_DIFF = "Left Diff"; 105 static const string RIGHT_DIFF = "Right Diff"; 106 #endif 107 } 108 109 #endif // EVENTHANDLER_CONSTANTS_HXX 110