diff options
Diffstat (limited to 'engines/made')
| -rw-r--r-- | engines/made/console.cpp | 43 | ||||
| -rw-r--r-- | engines/made/console.h | 50 | ||||
| -rw-r--r-- | engines/made/made.cpp | 9 | ||||
| -rw-r--r-- | engines/made/made.h | 11 | ||||
| -rw-r--r-- | engines/made/module.mk | 1 | ||||
| -rw-r--r-- | engines/made/resource.cpp | 1 | ||||
| -rw-r--r-- | engines/made/screen.cpp | 2 | 
7 files changed, 113 insertions, 4 deletions
diff --git a/engines/made/console.cpp b/engines/made/console.cpp new file mode 100644 index 0000000000..ee85c465e8 --- /dev/null +++ b/engines/made/console.cpp @@ -0,0 +1,43 @@ +/* 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 "made/console.h" +#include "made/made.h" + +namespace Made { + +MadeConsole::MadeConsole(MadeEngine *vm) : GUI::Debugger(), _vm(vm) { +} + +MadeConsole::~MadeConsole() { +} + +void MadeConsole::preEnter() { +} + +void MadeConsole::postEnter() { +} + +} // End of namespace Made diff --git a/engines/made/console.h b/engines/made/console.h new file mode 100644 index 0000000000..9f4632b986 --- /dev/null +++ b/engines/made/console.h @@ -0,0 +1,50 @@ +/* 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 MADE_CONSOLE_H +#define MADE_CONSOLE_H + +#include "gui/debugger.h" + +namespace Made { + +class MadeEngine; + +class MadeConsole : public GUI::Debugger { +public: +	MadeConsole(MadeEngine *vm); +	virtual ~MadeConsole(void); + +protected: +	virtual void preEnter(); +	virtual void postEnter(); + +private: +	MadeEngine *_vm; +}; + +} // End of namespace Made + +#endif diff --git a/engines/made/made.cpp b/engines/made/made.cpp index 4b59723772..4434f5e159 100644 --- a/engines/made/made.cpp +++ b/engines/made/made.cpp @@ -78,6 +78,8 @@ MadeEngine::MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc) : Eng  	_rnd = new Common::RandomSource();  	g_eventRec.registerRandomSource(*_rnd, "made"); +	_console = new MadeConsole(this); +  	int cd_num = ConfMan.getInt("cdrom");  	if (cd_num >= 0)  		_system->getAudioCDManager()->openCD(cd_num); @@ -132,6 +134,7 @@ MadeEngine::~MadeEngine() {  	_system->getAudioCDManager()->stop();  	delete _rnd; +	delete _console;  	delete _pmvPlayer;  	delete _res;  	delete _screen; @@ -233,6 +236,12 @@ void MadeEngine::handleEvents() {  			if (_eventKey == Common::KEYCODE_BACKSPACE)  				_eventKey = 9;  			_eventNum = 5; + +			// Check for Debugger Activation +			if (event.kbd.hasFlags(Common::KBD_CTRL) && event.kbd.keycode == Common::KEYCODE_d) { +				this->getDebugger()->attach(); +				this->getDebugger()->onFrame(); +			}  			break;  		default: diff --git a/engines/made/made.h b/engines/made/made.h index 553476540a..302c8f5275 100644 --- a/engines/made/made.h +++ b/engines/made/made.h @@ -46,14 +46,18 @@  #include "engines/engine.h"  #include "made/sound.h" +#include "made/console.h"  /**   * This is the namespace of the Made engine.   *   * Status of this engine: ???   * - * Supported games: - * - ??? + * Games using this engine: + * - Return to Zork + * - Leather Goddesses of Phobos 2 + * - The Manhole + * - Rodney's Funscreen   */  namespace Made { @@ -97,6 +101,8 @@ public:  	virtual bool hasFeature(EngineFeature f) const;  	virtual void syncSoundSettings(); +	GUI::Debugger *getDebugger() { return _console; } +  	int getGameId() {  		return _gameId;  	} @@ -109,6 +115,7 @@ public:  	Common::Platform getPlatform() const;  private: +	MadeConsole *_console;  public:  	PmvPlayer *_pmvPlayer;  	ResourceReader *_res; diff --git a/engines/made/module.mk b/engines/made/module.mk index 78c906b288..d8c0c9eeb5 100644 --- a/engines/made/module.mk +++ b/engines/made/module.mk @@ -1,6 +1,7 @@  MODULE := engines/made  MODULE_OBJS := \ +	console.o \  	database.o \  	detection.o \  	graphics.o \ diff --git a/engines/made/resource.cpp b/engines/made/resource.cpp index cdcb49f9f9..ecc2378f15 100644 --- a/engines/made/resource.cpp +++ b/engines/made/resource.cpp @@ -295,7 +295,6 @@ void MenuResource::load(byte *source, int size) {  		_strings.push_back(string);  		debug(2, "%02d: %s\n", i, string);  	} -	fflush(stdout);  	delete sourceS;  } diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index 81c18ef64b..773e3d17ed 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -204,7 +204,7 @@ void Screen::drawSurface(Graphics::Surface *sourceSurface, int x, int y, int16 f  	for (int16 yc = 0; yc < clipHeight; yc++) {  		linePtr = source + sourceAdd;  		for (int16 xc = 0; xc < clipWidth; xc++) { -			if (*linePtr && (_vm->getGameID() == GID_RTZ || (mask == 0 || maskp[xc] == 0))) { +			if (*linePtr && (_vm->getGameID() == GID_RTZ || (mask == 0 || (maskp && maskp[xc] == 0)))) {  				if (*linePtr)  					dest[xc] = *linePtr;  			}  | 
