ScummVM API documentation
console.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  * Additional copyright for this file:
8  * Copyright (C) 1994-1998 Revolution Software Ltd.
9  *
10  * This program is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation, either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program. If not, see <http://www.gnu.org/licenses/>.
22  */
23 
24 #ifndef SWORD2_CONSOLE_H
25 #define SWORD2_CONSOLE_H
26 
27 #include "gui/debugger.h"
28 #include "sword2/debug.h"
29 
30 namespace Sword2 {
31 
32 class Debugger : public GUI::Debugger {
33 private:
34  void varGet(int var);
35  void varSet(int var, int val);
36 
37  bool _displayDebugText;
38  bool _displayWalkGrid;
39  bool _displayMouseMarker;
40  bool _displayTime;
41  bool _displayPlayerMarker;
42  bool _displayTextNumbers;
43 
44  bool _rectFlicker;
45 
46  int32 _startTime;
47 
48  int32 _showVar[MAX_SHOWVARS];
49 
50  byte _debugTextBlocks[MAX_DEBUG_TEXTS];
51 
52  void clearDebugTextBlocks();
53  void makeDebugTextBlock(char *text, int16 x, int16 y);
54 
55  void plotCrossHair(int16 x, int16 y, uint8 pen);
56  void drawRect(int16 x, int16 y, int16 x2, int16 y2, uint8 pen);
57 
58 public:
60 
61  int16 _rectX1, _rectY1;
62  int16 _rectX2, _rectY2;
63 
64  uint8 _draggingRectangle;
65  bool _definingRectangles;
66 
67  bool _testingSnR;
68 
69  int32 _speechScriptWaiting;
70 
71  int32 _textNumber;
72 
73  int32 _graphType;
74  int32 _graphAnimRes;
75  int32 _graphAnimPc;
76  uint32 _graphNoFrames;
77 
78  void buildDebugText();
79  void drawDebugGraphics();
80 
81 private:
82  void preEnter() override;
83  void postEnter() override;
84 
85 private:
86  Sword2Engine *_vm;
87 
88  // Commands
89  bool Cmd_Mem(int argc, const char **argv);
90  bool Cmd_Tony(int argc, const char **argv);
91  bool Cmd_Res(int argc, const char **argv);
92  bool Cmd_ResList(int argc, const char **argv);
93  bool Cmd_Starts(int argc, const char **argv);
94  bool Cmd_Start(int argc, const char **argv);
95  bool Cmd_Info(int argc, const char **argv);
96  bool Cmd_WalkGrid(int argc, const char **argv);
97  bool Cmd_Mouse(int argc, const char **argv);
98  bool Cmd_Player(int argc, const char **argv);
99  bool Cmd_ResLook(int argc, const char **argv);
100  bool Cmd_CurrentInfo(int argc, const char **argv);
101  bool Cmd_RunList(int argc, const char **argv);
102  bool Cmd_Kill(int argc, const char **argv);
103  bool Cmd_Nuke(int argc, const char **argv);
104  bool Cmd_Var(int argc, const char **argv);
105  bool Cmd_Rect(int argc, const char **argv);
106  bool Cmd_Clear(int argc, const char **argv);
107  bool Cmd_DebugOn(int argc, const char **argv);
108  bool Cmd_DebugOff(int argc, const char **argv);
109  bool Cmd_SaveRest(int argc, const char **argv);
110  bool Cmd_TimeOn(int argc, const char **argv);
111  bool Cmd_TimeOff(int argc, const char **argv);
112  bool Cmd_Text(int argc, const char **argv);
113  bool Cmd_ShowVar(int argc, const char **argv);
114  bool Cmd_HideVar(int argc, const char **argv);
115  bool Cmd_Version(int argc, const char **argv);
116  bool Cmd_AnimTest(int argc, const char **argv);
117  bool Cmd_TextTest(int argc, const char **argv);
118  bool Cmd_LineTest(int argc, const char **argv);
119  bool Cmd_Events(int argc, const char **argv);
120  bool Cmd_Sfx(int argc, const char **argv);
121  bool Cmd_English(int argc, const char **argv);
122  bool Cmd_Finnish(int argc, const char **argv);
123  bool Cmd_Polish(int argc, const char **argv);
124  bool Cmd_FxQueue(int argc, const char **argv);
125 };
126 
127 } // End of namespace Sword2
128 
129 #endif
Definition: animation.h:37
Definition: debugger.h:41
Definition: sword2.h:99
Definition: console.h:32