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 ULTIMA4_CORE_DEBUGGER_H
23 #define ULTIMA4_CORE_DEBUGGER_H
24 
25 #include "ultima/ultima4/core/coords.h"
26 #include "ultima/ultima4/core/types.h"
27 #include "ultima/ultima4/core/debugger_actions.h"
28 #include "ultima/shared/engine/debugger.h"
29 
30 namespace Ultima {
31 namespace Ultima4 {
32 
36 class Debugger : public Shared::Debugger, public DebuggerActions {
37 private:
38  MapTile _horse, _ship, _balloon;
39  bool _dontEndTurn;
40 protected:
44  bool isDebuggerActive() const override {
45  return isActive();
46  }
47 
53  bool handleCommand(int argc, const char **argv, bool &keepRunning) override;
54 
59  void print(const char *fmt, ...) override;
60 
65  void printN(const char *fmt, ...) override;
66 
70  void prompt() override;
71 
75  Direction getDirection(int argc, const char **argv);
76 
81  void dontEndTurn() {
82  _dontEndTurn = true;
83  }
84 private:
88  bool cmdMove(int argc, const char **argv);
89 
93  bool cmdAttack(int argc, const char **argv);
94 
98  bool cmdBoard(int argc, const char **argv);
99 
103  bool cmdCastSpell(int argc, const char **argv);
104 
108  bool cmdClimb(int argc, const char **argv);
109 
113  bool cmdDescend(int argc, const char **argv);
114 
118  bool cmdEnter(int argc, const char **argv);
119 
123  bool cmdExit(int argc, const char **argv);
124 
128  bool cmdFire(int argc, const char **argv);
129 
133  bool cmdGetChest(int argc, const char **argv);
134 
138  bool cmdCamp(int argc, const char **argv);
139 
143  bool cmdIgnite(int argc, const char **argv);
144 
148  bool cmdInteract(int argc, const char **argv);
149 
153  bool cmdJimmy(int argc, const char **argv);
154 
158  bool cmdLocate(int argc, const char **argv);
159 
163  bool cmdMixReagents(int argc, const char **argv);
164 
169  bool cmdNewOrder(int argc, const char **argv);
170 
174  bool cmdOpenDoor(int argc, const char **argv);
175 
179  bool cmdParty(int argc, const char **argv);
180 
184  bool cmdPass(int argc, const char **argv);
185 
189  bool cmdPeer(int argc, const char **argv);
190 
194  bool cmdQuitAndSave(int argc, const char **argv);
195 
200  bool cmdReadyWeapon(int argc, const char **argv);
201 
205  bool cmdSearch(int argc, const char **argv);
206 
210  bool cmdSpeed(int argc, const char **argv);
211 
215  bool cmdCombatSpeed(int argc, const char **argv);
216 
217 
221  bool cmdStats(int argc, const char **argv);
222 
226  bool cmdTalk(int argc, const char **argv);
227 
231  bool cmdUse(int argc, const char **argv);
232 
236  bool cmdWearArmor(int argc, const char **argv);
237 
241  bool cmdYell(int argc, const char **argv);
242 private:
246  bool cmd3d(int argc, const char **argv);
247 
251  bool cmdAbyss(int argc, const char **argv);
252 
256  bool cmdCollisions(int argc, const char **argv);
257 
261  bool cmdCompanions(int argc, const char **argv);
262 
266  bool cmdCombat(int argc, const char **argv);
267 
271  bool cmdDestroy(int argc, const char **argv);
272 
276  bool cmdDestroyCreatures(int argc, const char **argv);
277 
281  bool cmdDungeon(int argc, const char **argv);
282 
286  bool cmdFlee(int argc, const char **argv);
287 
291  bool cmdEquipment(int argc, const char **argv);
292 
296  bool cmdFullStats(int argc, const char **argv);
297 
301  bool cmdHunger(int argc, const char **argv);
302 
306  bool cmdGate(int argc, const char **argv);
307 
311  bool cmdGoto(int argc, const char **argv);
312 
316  bool cmdLorddBritish(int argc, const char **argv);
317 
321  bool cmdKarma(int argc, const char **argv);
322 
326  bool cmdItems(int argc, const char **argv);
327 
331  bool cmdLeave(int argc, const char **argv);
332 
336  bool cmdLocation(int argc, const char **argv);
337 
341  bool cmdMixtures(int argc, const char **argv);
342 
346  bool cmdMoon(int argc, const char **argv);
347 
351  bool cmdOpacity(int argc, const char **argv);
352 
356  bool cmdOverhead(int argc, const char **argv);
357 
361  bool cmdReagents(int argc, const char **argv);
362 
366  bool cmdSummon(int argc, const char **argv);
367 
371  bool cmdTorch(int argc, const char **argv);
372 
376  bool cmdTransport(int argc, const char **argv);
377 
381  bool cmdUp(int argc, const char **argv);
382 
386  bool cmdDown(int argc, const char **argv);
387 
391  bool cmdVirtue(int argc, const char **argv);
392 
396  bool cmdWind(int argc, const char **argv);
397 
401  bool cmdListTriggers(int argc, const char **argv);
402 public:
403  bool _collisionOverride;
404  bool _disableHunger;
405  bool _disableCombat;
406 public:
407  Debugger();
408  ~Debugger() override;
409 
415  void getChest(int player = -2);
416 };
417 
418 extern Debugger *g_debugger;
419 
420 } // End of namespace Ultima4
421 } // End of namespace Ultima
422 
423 #endif
void getChest(int player=-2)
void printN(const char *fmt,...) override
bool isDebuggerActive() const override
Definition: debugger.h:44
Definition: debugger.h:36
Direction getDirection(int argc, const char **argv)
bool handleCommand(int argc, const char **argv, bool &keepRunning) override
Definition: detection.h:27
Definition: map_tile.h:34
void prompt() override
bool isActive() const
Definition: debugger.h:75
Definition: debugger.h:36
void print(const char *fmt,...) override
Definition: debugger_actions.h:38
void dontEndTurn()
Definition: debugger.h:81