ScummVM API documentation
debug.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 LASTEXPRESS_DEBUG_H
23 #define LASTEXPRESS_DEBUG_H
24 
25 #include "gui/debugger.h"
26 
27 #include "lastexpress/data/snd.h"
28 
29 #include "lastexpress/shared.h"
30 
31 namespace LastExpress {
32 
33 enum {
34  kLastExpressDebugGraphics = 1 << 0,
35  kLastExpressDebugResource = 1 << 1,
36  kLastExpressDebugCursor = 1 << 2,
37  kLastExpressDebugSound = 1 << 3,
38  kLastExpressDebugSubtitle = 1 << 4,
39  kLastExpressDebugSavegame = 1 << 5,
40  kLastExpressDebugLogic = 1 << 6,
41  kLastExpressDebugScenes = 1 << 7,
42  kLastExpressDebugUnknown = 1 << 8
43 };
44 
45 class LastExpressEngine;
46 
47 class Debugger : public GUI::Debugger {
48 public:
49  Debugger(LastExpressEngine *engine);
50  ~Debugger() override;
51 
52  bool hasCommand() const;
53  void callCommand();
54 
55 private:
56  LastExpressEngine *_engine;
57 
58  bool cmdHelp(int argc, const char **argv);
59 
60  bool cmdListFiles(int argc, const char **argv);
61  bool cmdDumpFiles(int argc, const char **argv);
62 
63  bool cmdShowFrame(int argc, const char **argv);
64  bool cmdShowBg(int argc, const char **argv);
65  bool cmdPlaySeq(int argc, const char **argv);
66  bool cmdPlaySnd(int argc, const char **argv);
67  bool cmdPlaySbe(int argc, const char **argv);
68  bool cmdPlayNis(int argc, const char **argv);
69 
70  bool cmdLoadScene(int argc, const char **argv);
71  bool cmdFight(int argc, const char **argv);
72  bool cmdBeetle(int argc, const char **argv);
73 
74  bool cmdTimeDelta(int argc, const char **argv);
75  bool cmdTime(int argc, const char **argv);
76  bool cmdShow(int argc, const char **argv);
77  bool cmdEntity(int argc, const char **argv);
78 
79  bool cmdSwitchChapter(int argc, const char **argv);
80  bool cmdClear(int argc, const char **argv);
81 
82  void resetCommand();
83  void copyCommand(int argc, const char **argv);
84  int getNumber(const char *arg) const;
85 
86  bool loadArchive(int index);
87  void restoreArchive() const;
88 
89  Debuglet *_command;
90  int _numParams;
91  char **_commandParams;
92 
93  // Special sound stream for playing sounds
94  StreamedSound *_soundStream;
95 };
96 
97 } // End of namespace LastExpress
98 
99 #endif // LASTEXPRESS_DEBUG_H
Definition: lastexpress.h:69
Definition: debugger.h:41
Definition: animation.h:45
Definition: snd.h:77
Definition: debug.h:47
Definition: func.h:473