[Scummvm-cvs-logs] scummvm master -> 4e849da06d9e68f5fb7da5df3123f7c620ad886b

digitall dgturner at iee.org
Sat Dec 7 01:13:52 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:
4e849da06d FULLPIPE: Add debug console.


Commit: 4e849da06d9e68f5fb7da5df3123f7c620ad886b
    https://github.com/scummvm/scummvm/commit/4e849da06d9e68f5fb7da5df3123f7c620ad886b
Author: D G Turner (digitall at scummvm.org)
Date: 2013-12-06T16:16:56-08:00

Commit Message:
FULLPIPE: Add debug console.

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



diff --git a/engines/fullpipe/console.cpp b/engines/fullpipe/console.cpp
new file mode 100644
index 0000000..587f3dc
--- /dev/null
+++ b/engines/fullpipe/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 "fullpipe/fullpipe.h"
+
+namespace Fullpipe {
+
+Console::Console(FullpipeEngine *vm) : GUI::Debugger() {
+	_vm = vm;
+}
+
+} // End of namespace Fullpipe
diff --git a/engines/fullpipe/console.h b/engines/fullpipe/console.h
new file mode 100644
index 0000000..9c03081
--- /dev/null
+++ b/engines/fullpipe/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 FULLPIPE_CONSOLE_H
+#define FULLPIPE_CONSOLE_H
+
+namespace Fullpipe {
+
+class FullpipeEngine;
+
+class Console : public GUI::Debugger {
+public:
+	Console(FullpipeEngine *vm);
+
+private:
+	FullpipeEngine *_vm;
+};
+
+} // End of namespace Fullpipe
+
+#endif /* FULLPIPE_CONSOLE_H */
diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp
index 7dedaf3..a254ea6 100644
--- a/engines/fullpipe/fullpipe.cpp
+++ b/engines/fullpipe/fullpipe.cpp
@@ -35,6 +35,7 @@
 #include "fullpipe/input.h"
 #include "fullpipe/scenes.h"
 #include "fullpipe/floaters.h"
+#include "fullpipe/console.h"
 
 namespace Fullpipe {
 
@@ -51,6 +52,7 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc)
 	_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
 
 	_rnd = new Common::RandomSource("fullpipe");
+	_console = 0;
 
 	_gameProjectVersion = 0;
 	_pictureScale = 8;
@@ -152,6 +154,7 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc)
 
 FullpipeEngine::~FullpipeEngine() {
 	delete _rnd;
+	delete _console;
 	delete _globalMessageQueueList;
 }
 
@@ -174,6 +177,8 @@ Common::Error FullpipeEngine::run() {
 
 	_backgroundSurface.create(800, 600, format);
 
+	_console = new Console(this);
+
 	initialize();
 
 	_isSaveAllowed = false;
@@ -272,6 +277,11 @@ void FullpipeEngine::updateEvents() {
 				return;
 				break;
 			default:
+				if (event.kbd.keycode == Common::KEYCODE_d && event.kbd.hasFlags(Common::KBD_CTRL)) {
+					// Start the debugger
+					getDebugger()->attach();
+					getDebugger()->onFrame();
+				}
 				ex = new ExCommand(0, 17, 36, 0, 0, 0, 1, 0, 0, 0);
 				ex->_keyCode = event.kbd.keycode;
 				ex->_excFlags |= 3;
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index 84354e5..ca025a4 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -36,6 +36,9 @@
 
 #include "engines/engine.h"
 
+#include "gui/debugger.h"
+#include "fullpipe/console.h"
+
 struct ADGameDescription;
 
 namespace Fullpipe {
@@ -80,6 +83,9 @@ public:
 	FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc);
 	virtual ~FullpipeEngine();
 
+	Console *_console;
+	GUI::Debugger *getDebugger() { return _console; }
+
 	void initialize();
 
 	void setMusicAllowed(int val) { _musicAllowed = val; }
diff --git a/engines/fullpipe/module.mk b/engines/fullpipe/module.mk
index 88e3ac5..bd948b7 100644
--- a/engines/fullpipe/module.mk
+++ b/engines/fullpipe/module.mk
@@ -2,6 +2,7 @@ MODULE := engines/fullpipe
 
 MODULE_OBJS = \
 	behavior.o \
+	console.o \
 	detection.o \
 	floaters.o \
 	fullpipe.o \






More information about the Scummvm-git-logs mailing list