diff options
author | Strangerke | 2017-01-24 23:52:57 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2017-01-25 22:42:27 +0100 |
commit | a8a142cfe4521bae210cc4a7c7b4891030d1de39 (patch) | |
tree | 73e41c576aacbb56a1f5e1a9709fd606664f9a93 /engines/cryo/debugger.cpp | |
parent | 0e34cec17a6fbd8944c485929b6746e18ce56913 (diff) | |
download | scummvm-rg350-a8a142cfe4521bae210cc4a7c7b4891030d1de39.tar.gz scummvm-rg350-a8a142cfe4521bae210cc4a7c7b4891030d1de39.tar.bz2 scummvm-rg350-a8a142cfe4521bae210cc4a7c7b4891030d1de39.zip |
CRYO: Introduce debugger, remove console initialisation
Diffstat (limited to 'engines/cryo/debugger.cpp')
-rw-r--r-- | engines/cryo/debugger.cpp | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/engines/cryo/debugger.cpp b/engines/cryo/debugger.cpp new file mode 100644 index 0000000000..11a3fb9ec2 --- /dev/null +++ b/engines/cryo/debugger.cpp @@ -0,0 +1,47 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "common/coroutines.h" +#include "cryo/debugger.h" +#include "cryo/cryo.h" + +namespace Cryo { + +Debugger::Debugger(CryoEngine *vm) : GUI::Debugger(), _vm(vm) { + registerCmd("showHotspots", WRAP_METHOD(Debugger, Cmd_ShowHotspots)); +} + +/** + * This command enables/disables hotspot display + */ +bool Debugger::Cmd_ShowHotspots(int argc, const char **argv) { + if (argc != 1) { + debugPrintf("Usage: %s\n", argv[0]); + return true; + } + + _vm->_showHotspots ^= 1; + + return false; +} + +} // End of namespace Cryo |