Skip to content

Commit

Permalink
PEGASUS: Add a stub debugger
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Hoops committed May 12, 2011
1 parent 85b2a05 commit 50e43a5
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 0 deletions.
38 changes: 38 additions & 0 deletions 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
46 changes: 46 additions & 0 deletions 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
1 change: 1 addition & 0 deletions engines/pegasus/module.mk
@@ -1,6 +1,7 @@
MODULE := engines/pegasus

MODULE_OBJS = \
console.o \
credits.o \
detection.o \
graphics.o \
Expand Down
7 changes: 7 additions & 0 deletions engines/pegasus/pegasus.cpp
Expand Up @@ -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
Expand All @@ -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);
Expand Down Expand Up @@ -332,4 +335,8 @@ Common::String PegasusEngine::getTimeZoneFolder(TimeZone timeZone) {
return getTimeZoneDesc(timeZone);
}

GUI::Debugger *PegasusEngine::getDebugger() {
return _console;
}

} // End of namespace Pegasus
5 changes: 5 additions & 0 deletions engines/pegasus/pegasus.h
Expand Up @@ -41,6 +41,7 @@ namespace Video {

namespace Pegasus {

class PegasusConsole;
struct PegasusGameDescription;
class SoundManager;
class VideoManager;
Expand Down Expand Up @@ -200,6 +201,7 @@ class PegasusEngine : public ::Engine {

const PegasusGameDescription *_gameDescription;
bool hasFeature(EngineFeature f) const;
GUI::Debugger *getDebugger();

VideoManager *_video;
SoundManager *_sound;
Expand Down Expand Up @@ -257,6 +259,9 @@ class PegasusEngine : public ::Engine {
Common::Array<SoundSpot> _currentSoundSpots;
Common::Array<Zoom> _currentZooms;
Common::Array<Extra> _currentExtras;

// Console
PegasusConsole *_console;
};

} // End of namespace Pegasus
Expand Down

0 comments on commit 50e43a5

Please sign in to comment.