diff options
Diffstat (limited to 'engines/composer')
-rw-r--r-- | engines/composer/composer.cpp | 9 | ||||
-rw-r--r-- | engines/composer/composer.h | 6 | ||||
-rw-r--r-- | engines/composer/configure.engine | 3 | ||||
-rw-r--r-- | engines/composer/console.cpp | 31 | ||||
-rw-r--r-- | engines/composer/console.h | 40 | ||||
-rw-r--r-- | engines/composer/module.mk | 1 |
6 files changed, 88 insertions, 2 deletions
diff --git a/engines/composer/composer.cpp b/engines/composer/composer.cpp index 2d7075cba1..10906480fe 100644 --- a/engines/composer/composer.cpp +++ b/engines/composer/composer.cpp @@ -42,6 +42,7 @@ #include "composer/composer.h" #include "composer/graphics.h" #include "composer/resource.h" +#include "composer/console.h" namespace Composer { @@ -57,6 +58,7 @@ ComposerEngine::ComposerEngine(OSystem *syst, const ComposerGameDescription *gam _mouseEnabled = false; _mouseSpriteId = 0; _lastButton = NULL; + _console = NULL; } ComposerEngine::~ComposerEngine() { @@ -73,6 +75,7 @@ ComposerEngine::~ComposerEngine() { i->_surface.free(); delete _rnd; + delete _console; } Common::Error ComposerEngine::run() { @@ -113,6 +116,8 @@ Common::Error ComposerEngine::run() { CursorMan.replaceCursorPalette(cursor->getPalette(), cursor->getPaletteStartIndex(), cursor->getPaletteCount()); delete cursor; + _console = new Console(this); + loadLibrary(0); uint fps = atoi(getStringFromConfig("Common", "FPS").c_str()); @@ -190,11 +195,11 @@ Common::Error ComposerEngine::run() { case Common::EVENT_KEYDOWN: switch (event.kbd.keycode) { case Common::KEYCODE_d: - /*if (event.kbd.hasFlags(Common::KBD_CTRL)) { + if (event.kbd.hasFlags(Common::KBD_CTRL)) { // Start the debugger getDebugger()->attach(); getDebugger()->onFrame(); - }*/ + } break; case Common::KEYCODE_q: diff --git a/engines/composer/composer.h b/engines/composer/composer.h index 7d8022455a..f945df8bb1 100644 --- a/engines/composer/composer.h +++ b/engines/composer/composer.h @@ -34,11 +34,14 @@ #include "engines/engine.h" #include "engines/util.h" +#include "gui/debugger.h" + #include "graphics/surface.h" #include "audio/mixer.h" #include "composer/resource.h" +#include "composer/console.h" namespace Audio { class QueuingAudioStream; @@ -159,6 +162,9 @@ public: const ComposerGameDescription *_gameDescription; + Console *_console; + GUI::Debugger *getDebugger() { return _console; } + private: Common::RandomSource *_rnd; diff --git a/engines/composer/configure.engine b/engines/composer/configure.engine new file mode 100644 index 0000000000..71a79acb5d --- /dev/null +++ b/engines/composer/configure.engine @@ -0,0 +1,3 @@ +# This file is included from the main "configure" script +# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps] +add_engine composer "Magic Composer" yes diff --git a/engines/composer/console.cpp b/engines/composer/console.cpp new file mode 100644 index 0000000000..8c68b3205b --- /dev/null +++ b/engines/composer/console.cpp @@ -0,0 +1,31 @@ +/* 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 "composer/composer.h" + +namespace Composer { + +Console::Console(ComposerEngine *vm) : GUI::Debugger() { + _vm = vm; +} + +} // End of namespace Composer diff --git a/engines/composer/console.h b/engines/composer/console.h new file mode 100644 index 0000000000..0567d8bc6f --- /dev/null +++ b/engines/composer/console.h @@ -0,0 +1,40 @@ +/* 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. + * + */ + +#ifndef COMPOSER_CONSOLE_H +#define COMPOSER_CONSOLE_H + +namespace Composer { + +class ComposerEngine; + +class Console : public GUI::Debugger { +public: + Console(ComposerEngine *vm); + +private: + ComposerEngine *_vm; +}; + +} // End of namespace Composer + +#endif /* COMPOSER_CONSOLE_H */ diff --git a/engines/composer/module.mk b/engines/composer/module.mk index 8bfaf932e8..c879d53630 100644 --- a/engines/composer/module.mk +++ b/engines/composer/module.mk @@ -1,6 +1,7 @@ MODULE := engines/composer MODULE_OBJS = \ + console.o \ composer.o \ detection.o \ graphics.o \ |