ScummVM API documentation
debugger.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 ULTIMA_ULTIMA8_ENGINE_DEBUGGER_H
23 #define ULTIMA_ULTIMA8_ENGINE_DEBUGGER_H
24 
25 #include "ultima/ultima8/misc/common_types.h"
26 #include "ultima/shared/std/containers.h"
27 #include "common/debug.h"
28 #include "common/stream.h"
29 #include "gui/debugger.h"
30 
31 namespace Ultima {
32 namespace Ultima8 {
33 
37 class Debugger : public GUI::Debugger {
38 private:
39  const char *strBool(bool flag) {
40  return flag ? "true" : "false";
41  }
42 
43  // Engine
44  bool cmdSaveGame(int argc, const char **argv);
45  bool cmdLoadGame(int argc, const char **argv);
46  bool cmdNewGame(int argc, const char **argv);
47  bool cmdQuit(int argc, const char **argv);
48  bool cmdSetVideoMode(int argc, const char **argv);
49  bool cmdEngineStats(int argc, const char **argv);
50  bool cmdToggleAvatarInStasis(int argc, const char **argv);
51  bool cmdTogglePaintEditorItems(int argc, const char **argv);
52  bool cmdToggleShowTouchingItems(int argc, const char **argv);
53  bool cmdCloseItemGumps(int argc, const char **argv);
54 
55  bool cmdCameraOnAvatar(int argc, const char **argv);
56 
57  // Audio Process
58  bool cmdListSFX(int argc, const char **argv);
59  bool cmdStopSFX(int argc, const char **argv);
60  bool cmdPlaySFX(int argc, const char **argv);
61 
62  // Cheats
63  bool cmdToggleCheatMode(int argc, const char **argv);
64  bool cmdCheatItems(int argc, const char **argv);
65  bool cmdCheatEquip(int argc, const char **argv);
66  bool cmdMaxStats(int argc, const char **argv);
67  bool cmdHeal(int argc, const char **argv);
68  bool cmdToggleInvincibility(int argc, const char **argv);
69 
70  // Game Map Gump
71  bool cmdStartHighlightItems(int argc, const char **argv);
72  bool cmdStopHighlightItems(int argc, const char **argv);
73  bool cmdToggleHighlightItems(int argc, const char **argv);
74  bool cmdToggleFootpads(int argc, const char **argv);
75  bool cmdDumpMap(int argc, const char **argvv);
76  bool cmdDumpAllMaps(int argc, const char **argv);
77  bool cmdIncrementSortOrder(int argc, const char **argv);
78  bool cmdDecrementSortOrder(int argc, const char **argv);
79 
80  // Kernel
81  bool cmdProcessTypes(int argc, const char **argv);
82  bool cmdListProcesses(int argc, const char **argv);
83  bool cmdProcessInfo(int argc, const char **argv);
84  bool cmdToggleFrameByFrame(int argc, const char **argv);
85  bool cmdAdvanceFrame(int argc, const char **argv);
86 
87  // Main Actor
88  bool cmdTeleport(int argc, const char **argv);
89  bool cmdMark(int argc, const char **argv);
90  bool cmdRecall(int argc, const char **argv);
91  bool cmdListMarks(int argc, const char **argv);
92  bool cmdName(int argc, const char **argv);
93  bool cmdUseBackpack(int argc, const char **argv);
94  bool cmdUseInventory(int argc, const char **argv);
95  bool cmdUseRecall(int argc, const char **argv);
96  bool cmdUseBedroll(int argc, const char **argv);
97  bool cmdUseKeyring(int argc, const char **argv);
98  bool cmdNextInventory(int argc, const char **argv);
99  bool cmdNextWeapon(int argc, const char **argv);
100  bool cmdToggleCombat(int argc, const char **argv);
101  bool cmdUseInventoryItem(int argc, const char **argv);
102  bool cmdUseMedikit(int argc, const char **argv);
103  bool cmdUseEnergyCube(int argc, const char **argv);
104  bool cmdDetonateBomb(int argc, const char **argv);
105  bool cmdDropWeapon(int argc, const char **argv);
106  bool cmdStartSelection(int argc, const char **argv);
107  bool cmdUseSelection(int argc, const char **argv);
108  bool cmdGrabItems(int argc, const char **argv);
109 
110  // Object Manager
111  bool cmdObjectTypes(int argc, const char **argv);
112  bool cmdObjectInfo(int argc, const char **argv);
113 
114  // Quick Avatar Mover Process
115  bool cmdStartQuickMoveUp(int argc, const char **argv);
116  bool cmdStartQuickMoveDown(int argc, const char **argv);
117  bool cmdStartQuickMoveLeft(int argc, const char **argv);
118  bool cmdStartQuickMoveRight(int argc, const char **argv);
119  bool cmdStartQuickMoveAscend(int argc, const char **argv);
120  bool cmdStartQuickMoveDescend(int argc, const char **argv);
121  bool cmdStopQuickMoveUp(int argc, const char **argv);
122  bool cmdStopQuickMoveDown(int argc, const char **argv);
123  bool cmdStopQuickMoveLeft(int argc, const char **argv);
124  bool cmdStopQuickMoveRight(int argc, const char **argv);
125  bool cmdStopQuickMoveAscend(int argc, const char **argv);
126  bool cmdStopQuickMoveDescend(int argc, const char **argv);
127  bool cmdToggleQuarterSpeed(int argc, const char **argv);
128  bool cmdToggleClipping(int argc, const char **argv);
129 
130  // UCMachine
131  bool cmdGetGlobal(int argc, const char **argv);
132  bool cmdSetGlobal(int argc, const char **argv);
133  bool cmdTracePID(int argc, const char **argv);
134  bool cmdTraceObjID(int argc, const char **argv);
135  bool cmdTraceClass(int argc, const char **argv);
136  bool cmdTraceAll(int argc, const char **argv);
137  bool cmdStopTrace(int argc, const char **argv);
138 
139  // Miscellaneous
140  bool cmdToggleFastArea(int argc, const char **argv);
141  bool cmdVerifyQuit(int argc, const char **argv);
142  bool cmdU8ShapeViewer(int argc, const char **argv);
143  bool cmdShowMenu(int argc, const char **argv);
144  bool cmdToggleMinimap(int argc, const char **argv);
145  bool cmdGenerateMinimap(int argc, const char **argv);
146  bool cmdClearMinimap(int argc, const char **argv);
147  bool cmdInvertScreen(int argc, const char **argv);
148  bool cmdPlayMovie(int argc, const char **argv);
149  bool cmdPlayMusic(int argc, const char **argv);
150  bool cmdBenchmarkRenderSurface(int argc, const char **argv);
151  bool cmdVisualDebugPathfinder(int argc, const char **argv);
152 
153  void dumpCurrentMap(); // helper function
154 
155 public:
156  Debugger();
157  ~Debugger() override;
158 
159  void executeCommand(const Common::String &args);
160  void executeCommand(const Common::Array<Common::String> &argv);
161 };
162 
163 extern Debugger *g_debugger;
164 
165 } // End of namespace Ultima8
166 } // End of namespace Ultima
167 
168 #endif
Definition: str.h:59
Definition: debugger.h:41
Definition: detection.h:27
Definition: debugger.h:37