From 50e43a56e76ac0fa82560d0e5e42f5dd330313f1 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 12 May 2011 16:17:12 -0400 Subject: PEGASUS: Add a stub debugger --- engines/pegasus/console.cpp | 38 +++++++++++++++++++++++++++++++++++++ engines/pegasus/console.h | 46 +++++++++++++++++++++++++++++++++++++++++++++ engines/pegasus/module.mk | 1 + engines/pegasus/pegasus.cpp | 7 +++++++ engines/pegasus/pegasus.h | 5 +++++ 5 files changed, 97 insertions(+) create mode 100644 engines/pegasus/console.cpp create mode 100644 engines/pegasus/console.h (limited to 'engines/pegasus') diff --git a/engines/pegasus/console.cpp b/engines/pegasus/console.cpp new file mode 100644 index 0000000000..d6a8c1e2ec --- /dev/null +++ b/engines/pegasus/console.cpp @@ -0,0 +1,38 @@ +/* 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. + * + * $URL$ + * $Id$ + * + */ + +#include "pegasus/console.h" +#include "pegasus/pegasus.h" + +namespace Pegasus { + +PegasusConsole::PegasusConsole(PegasusEngine *vm) : GUI::Debugger(), _vm(vm) { + // TODO! :P +} + +PegasusConsole::~PegasusConsole() { +} + +} // End of namespace Pegasus diff --git a/engines/pegasus/console.h b/engines/pegasus/console.h new file mode 100644 index 0000000000..f544344c24 --- /dev/null +++ b/engines/pegasus/console.h @@ -0,0 +1,46 @@ +/* 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. + * + * $URL$ + * $Id$ + * + */ + +#ifndef PEGASUS_CONSOLE_H +#define PEGASUS_CONSOLE_H + +#include "gui/debugger.h" + +namespace Pegasus { + +class PegasusEngine; + +class PegasusConsole : public GUI::Debugger { +public: + PegasusConsole(PegasusEngine *vm); + virtual ~PegasusConsole(); + +private: + PegasusEngine *_vm; +}; + +} // End of namespace Pegasus + +#endif diff --git a/engines/pegasus/module.mk b/engines/pegasus/module.mk index 507c6b19ab..585575022f 100644 --- a/engines/pegasus/module.mk +++ b/engines/pegasus/module.mk @@ -1,6 +1,7 @@ MODULE := engines/pegasus MODULE_OBJS = \ + console.o \ credits.o \ detection.o \ graphics.o \ diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp index bd281cdae5..ae83a058c6 100644 --- a/engines/pegasus/pegasus.cpp +++ b/engines/pegasus/pegasus.cpp @@ -30,6 +30,7 @@ #include "base/version.h" #include "gui/saveload.h" +#include "pegasus/console.h" #include "pegasus/pegasus.h" //#define RUN_SUB_MOVIE // :D :D :D :D :D :D @@ -47,9 +48,11 @@ PegasusEngine::~PegasusEngine() { delete _resFork; delete _inventoryLid; delete _biochipLid; + delete _console; } Common::Error PegasusEngine::run() { + _console = new PegasusConsole(this); _gfx = new GraphicsManager(this); _video = new VideoManager(this); _sound = new SoundManager(this); @@ -332,4 +335,8 @@ Common::String PegasusEngine::getTimeZoneFolder(TimeZone timeZone) { return getTimeZoneDesc(timeZone); } +GUI::Debugger *PegasusEngine::getDebugger() { + return _console; +} + } // End of namespace Pegasus diff --git a/engines/pegasus/pegasus.h b/engines/pegasus/pegasus.h index ad069eb802..2e07862c30 100644 --- a/engines/pegasus/pegasus.h +++ b/engines/pegasus/pegasus.h @@ -41,6 +41,7 @@ namespace Video { namespace Pegasus { +class PegasusConsole; struct PegasusGameDescription; class SoundManager; class VideoManager; @@ -200,6 +201,7 @@ public: const PegasusGameDescription *_gameDescription; bool hasFeature(EngineFeature f) const; + GUI::Debugger *getDebugger(); VideoManager *_video; SoundManager *_sound; @@ -257,6 +259,9 @@ private: Common::Array _currentSoundSpots; Common::Array _currentZooms; Common::Array _currentExtras; + + // Console + PegasusConsole *_console; }; } // End of namespace Pegasus -- cgit v1.2.3