[Scummvm-cvs-logs] scummvm master -> 189d8048f3007f677eea538bb7d7cc4c525a3424

digitall dgturner at iee.org
Fri Dec 6 23:29:09 CET 2013


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
189d8048f3 COMPOSER: Add debug console to engine.


Commit: 189d8048f3007f677eea538bb7d7cc4c525a3424
    https://github.com/scummvm/scummvm/commit/189d8048f3007f677eea538bb7d7cc4c525a3424
Author: D G Turner (digitall at scummvm.org)
Date: 2013-12-06T14:32:18-08:00

Commit Message:
COMPOSER: Add debug console to engine.

Changed paths:
  A engines/composer/console.cpp
  A engines/composer/console.h
    engines/composer/composer.cpp
    engines/composer/composer.h
    engines/composer/module.mk



diff --git a/engines/composer/composer.cpp b/engines/composer/composer.cpp
index 2d7075c..1090648 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 7d80224..f945df8 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/console.cpp b/engines/composer/console.cpp
new file mode 100644
index 0000000..74cf8ee
--- /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 Agi
diff --git a/engines/composer/console.h b/engines/composer/console.h
new file mode 100644
index 0000000..0567d8b
--- /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 8bfaf93..c879d53 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 \






More information about the Scummvm-git-logs mailing list