ScummVM API documentation
metaengine.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef MM_MM1_META_ENGINE
23 #define MM_MM1_META_ENGINE
24 
25 #include "backends/keymapper/keymapper.h"
26 
27 namespace MM {
28 namespace MM1 {
29 
30 enum KeybindingAction {
31  KEYBIND_ESCAPE,
32  KEYBIND_SELECT,
33 
34  KEYBIND_FORWARDS,
35  KEYBIND_BACKWARDS,
36  KEYBIND_TURN_LEFT,
37  KEYBIND_TURN_RIGHT,
38  KEYBIND_STRAFE_LEFT,
39  KEYBIND_STRAFE_RIGHT,
40  KEYBIND_DELAY,
41  KEYBIND_MAP,
42  KEYBIND_ORDER,
43  KEYBIND_PROTECT,
44  KEYBIND_REST,
45  KEYBIND_SEARCH,
46  KEYBIND_BASH,
47  KEYBIND_SPELL,
48  KEYBIND_UNLOCK,
49  KEYBIND_QUICKREF,
50  KEYBIND_VERSION,
51  KEYBIND_MENU,
52  KEYBIND_MINIMAP,
53  KEYBIND_VIEW_PARTY1,
54  KEYBIND_VIEW_PARTY2,
55  KEYBIND_VIEW_PARTY3,
56  KEYBIND_VIEW_PARTY4,
57  KEYBIND_VIEW_PARTY5,
58  KEYBIND_VIEW_PARTY6,
59 
60  // Encounters
61  KEYBIND_ATTACK,
62  KEYBIND_BRIBE,
63  KEYBIND_RETREAT,
64  KEYBIND_SURRENDER,
65 
66  // Combat
67  KEYBIND_COMBAT_ATTACK,
68  KEYBIND_COMBAT_BLOCK,
69  KEYBIND_COMBAT_CAST,
70  KEYBIND_COMBAT_EXCHANGE,
71  KEYBIND_COMBAT_FIGHT,
72  KEYBIND_COMBAT_RETREAT,
73  KEYBIND_COMBAT_SHOOT,
74  KEYBIND_COMBAT_USE,
75 
76  // Cheats
77  KEYBIND_CHEAT_COLLISIONS, KEYBIND_CHEAT_DESTROY,
78  KEYBIND_CHEAT_DESTROY_CREATURES, KEYBIND_CHEAT_EQUIPMENT,
79  KEYBIND_CHEAT_FLEE, KEYBIND_CHEAT_GOTO, KEYBIND_CHEAT_HELP,
80  KEYBIND_CHEAT_ITEMS, KEYBIND_CHEAT_KARMA, KEYBIND_CHEAT_LEAVE,
81  KEYBIND_CHEAT_MIXTURES, KEYBIND_CHEAT_NO_COMBAT,
82  KEYBIND_CHEAT_OVERHEAD, KEYBIND_CHEAT_PARTY, KEYBIND_CHEAT_REAGENTS,
83  KEYBIND_CHEAT_STATS, KEYBIND_CHEAT_TRANSPORT, KEYBIND_CHEAT_UP,
84  KEYBIND_CHEAT_DOWN, KEYBIND_CHEAT_VIRTUE, KEYBIND_CHEAT_WIND,
85 
86  KEYBIND_NONE
87 };
88 
89 enum KeybindingMode {
90  KBMODE_MENUS,
91  KBMODE_MINIMAL,
92  KBMODE_PARTY_MENUS,
93  KBMODE_NORMAL,
94  KBMODE_COMBAT
95 };
96 
97 class MetaEngine {
98 public:
102  static Common::KeymapArray initKeymaps(KeybindingMode mode = KBMODE_MENUS);
103 
107  static void executeAction(KeybindingAction keyAction);
108 
112  static void setKeybindingMode(KeybindingMode mode);
113 };
114 
115 } // End of namespace MM1
116 } // End of namespace MM
117 
118 #endif
Definition: array.h:52
static Common::KeymapArray initKeymaps(KeybindingMode mode=KBMODE_MENUS)
static void setKeybindingMode(KeybindingMode mode)
Definition: metaengine.h:97
Definition: detection.h:27
static void executeAction(KeybindingAction keyAction)