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 11 * modify it under the terms of the GNU General Public License 12 * as published by the Free Software Foundation; either version 2 13 * of the License, or (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, write to the Free Software 22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 23 */ 24 25 #ifndef SWORD2_CONSOLE_H 26 #define SWORD2_CONSOLE_H 27 28 #include "gui/debugger.h" 29 #include "sword2/debug.h" 30 31 namespace Sword2 { 32 33 class Debugger : public GUI::Debugger { 34 private: 35 void varGet(int var); 36 void varSet(int var, int val); 37 38 bool _displayDebugText; 39 bool _displayWalkGrid; 40 bool _displayMouseMarker; 41 bool _displayTime; 42 bool _displayPlayerMarker; 43 bool _displayTextNumbers; 44 45 bool _rectFlicker; 46 47 int32 _startTime; 48 49 int32 _showVar[MAX_SHOWVARS]; 50 51 byte _debugTextBlocks[MAX_DEBUG_TEXTS]; 52 53 void clearDebugTextBlocks(); 54 void makeDebugTextBlock(char *text, int16 x, int16 y); 55 56 void plotCrossHair(int16 x, int16 y, uint8 pen); 57 void drawRect(int16 x, int16 y, int16 x2, int16 y2, uint8 pen); 58 59 public: 60 Debugger(Sword2Engine *vm); 61 62 int16 _rectX1, _rectY1; 63 int16 _rectX2, _rectY2; 64 65 uint8 _draggingRectangle; 66 bool _definingRectangles; 67 68 bool _testingSnR; 69 70 int32 _speechScriptWaiting; 71 72 int32 _textNumber; 73 74 int32 _graphType; 75 int32 _graphAnimRes; 76 int32 _graphAnimPc; 77 uint32 _graphNoFrames; 78 79 void buildDebugText(); 80 void drawDebugGraphics(); 81 82 private: 83 virtual void preEnter(); 84 virtual void postEnter(); 85 86 private: 87 Sword2Engine *_vm; 88 89 // Commands 90 bool Cmd_Mem(int argc, const char **argv); 91 bool Cmd_Tony(int argc, const char **argv); 92 bool Cmd_Res(int argc, const char **argv); 93 bool Cmd_ResList(int argc, const char **argv); 94 bool Cmd_Starts(int argc, const char **argv); 95 bool Cmd_Start(int argc, const char **argv); 96 bool Cmd_Info(int argc, const char **argv); 97 bool Cmd_WalkGrid(int argc, const char **argv); 98 bool Cmd_Mouse(int argc, const char **argv); 99 bool Cmd_Player(int argc, const char **argv); 100 bool Cmd_ResLook(int argc, const char **argv); 101 bool Cmd_CurrentInfo(int argc, const char **argv); 102 bool Cmd_RunList(int argc, const char **argv); 103 bool Cmd_Kill(int argc, const char **argv); 104 bool Cmd_Nuke(int argc, const char **argv); 105 bool Cmd_Var(int argc, const char **argv); 106 bool Cmd_Rect(int argc, const char **argv); 107 bool Cmd_Clear(int argc, const char **argv); 108 bool Cmd_DebugOn(int argc, const char **argv); 109 bool Cmd_DebugOff(int argc, const char **argv); 110 bool Cmd_SaveRest(int argc, const char **argv); 111 bool Cmd_TimeOn(int argc, const char **argv); 112 bool Cmd_TimeOff(int argc, const char **argv); 113 bool Cmd_Text(int argc, const char **argv); 114 bool Cmd_ShowVar(int argc, const char **argv); 115 bool Cmd_HideVar(int argc, const char **argv); 116 bool Cmd_Version(int argc, const char **argv); 117 bool Cmd_AnimTest(int argc, const char **argv); 118 bool Cmd_TextTest(int argc, const char **argv); 119 bool Cmd_LineTest(int argc, const char **argv); 120 bool Cmd_Events(int argc, const char **argv); 121 bool Cmd_Sfx(int argc, const char **argv); 122 bool Cmd_English(int argc, const char **argv); 123 bool Cmd_Finnish(int argc, const char **argv); 124 bool Cmd_Polish(int argc, const char **argv); 125 bool Cmd_FxQueue(int argc, const char **argv); 126 }; 127 128 } // End of namespace Sword2 129 130 #endif 131