[Scummvm-cvs-logs] SF.net SVN: scummvm:[54141] scummvm/trunk/engines/tucker

tdhs at users.sourceforge.net tdhs at users.sourceforge.net
Mon Nov 8 13:24:18 CET 2010


Revision: 54141
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54141&view=rev
Author:   tdhs
Date:     2010-11-08 12:24:18 +0000 (Mon, 08 Nov 2010)

Log Message:
-----------
TUCKER: Added basic debugging console to engine

Tucker does not currently use Debug Channels, but this does provide a base for adding them along with any other debugging commands.

Modified Paths:
--------------
    scummvm/trunk/engines/tucker/module.mk
    scummvm/trunk/engines/tucker/tucker.cpp
    scummvm/trunk/engines/tucker/tucker.h

Added Paths:
-----------
    scummvm/trunk/engines/tucker/console.cpp
    scummvm/trunk/engines/tucker/console.h

Added: scummvm/trunk/engines/tucker/console.cpp
===================================================================
--- scummvm/trunk/engines/tucker/console.cpp	                        (rev 0)
+++ scummvm/trunk/engines/tucker/console.cpp	2010-11-08 12:24:18 UTC (rev 54141)
@@ -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 "tucker/console.h"
+#include "tucker/tucker.h"
+
+namespace Tucker {
+
+TuckerConsole::TuckerConsole(TuckerEngine *vm) : GUI::Debugger(), _vm(vm) {
+}
+
+TuckerConsole::~TuckerConsole() {
+}
+
+void TuckerConsole::preEnter() {
+}
+
+void TuckerConsole::postEnter() {
+}
+
+} // End of namespace Tucker


Property changes on: scummvm/trunk/engines/tucker/console.cpp
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Added: scummvm/trunk/engines/tucker/console.h
===================================================================
--- scummvm/trunk/engines/tucker/console.h	                        (rev 0)
+++ scummvm/trunk/engines/tucker/console.h	2010-11-08 12:24:18 UTC (rev 54141)
@@ -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 TUCKER_CONSOLE_H
+#define TUCKER_CONSOLE_H
+
+#include "gui/debugger.h"
+
+namespace Tucker {
+
+class TuckerEngine;
+
+class TuckerConsole : public GUI::Debugger {
+public:
+	TuckerConsole(TuckerEngine *vm);
+	virtual ~TuckerConsole(void);
+
+protected:
+	virtual void preEnter();
+	virtual void postEnter();
+
+private:
+	TuckerEngine *_vm;
+};
+
+} // End of namespace Tucker
+
+#endif


Property changes on: scummvm/trunk/engines/tucker/console.h
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Modified: scummvm/trunk/engines/tucker/module.mk
===================================================================
--- scummvm/trunk/engines/tucker/module.mk	2010-11-08 12:22:58 UTC (rev 54140)
+++ scummvm/trunk/engines/tucker/module.mk	2010-11-08 12:24:18 UTC (rev 54141)
@@ -1,6 +1,7 @@
 MODULE := engines/tucker
 
 MODULE_OBJS := \
+	console.o \
 	detection.o \
 	graphics.o \
 	locations.o \

Modified: scummvm/trunk/engines/tucker/tucker.cpp
===================================================================
--- scummvm/trunk/engines/tucker/tucker.cpp	2010-11-08 12:22:58 UTC (rev 54140)
+++ scummvm/trunk/engines/tucker/tucker.cpp	2010-11-08 12:24:18 UTC (rev 54141)
@@ -38,9 +38,11 @@
 
 TuckerEngine::TuckerEngine(OSystem *system, Common::Language language, uint32 flags)
 	: Engine(system), _gameLang(language), _gameFlags(flags) {
+	_console = new TuckerConsole(this);
 }
 
 TuckerEngine::~TuckerEngine() {
+	delete _console;
 }
 
 bool TuckerEngine::hasFeature(EngineFeature f) const {
@@ -628,6 +630,12 @@
 			case Common::KEYCODE_ESCAPE:
 				_inputKeys[kInputKeyEscape] = true;
 				break;
+			case Common::KEYCODE_d:
+				if (ev.kbd.hasFlags(Common::KBD_CTRL)) {
+					this->getDebugger()->attach();
+					this->getDebugger()->onFrame();
+				}
+				break;
 			default:
 				break;
 			}

Modified: scummvm/trunk/engines/tucker/tucker.h
===================================================================
--- scummvm/trunk/engines/tucker/tucker.h	2010-11-08 12:22:58 UTC (rev 54140)
+++ scummvm/trunk/engines/tucker/tucker.h	2010-11-08 12:24:18 UTC (rev 54141)
@@ -39,6 +39,8 @@
 
 #include "engines/engine.h"
 
+#include "tucker/console.h"
+
 /**
  * This is the namespace of the Tucker engine.
  *
@@ -275,6 +277,7 @@
 	virtual Common::Error run();
 	virtual bool hasFeature(EngineFeature f) const;
 	virtual void syncSoundSettings();
+	GUI::Debugger *getDebugger() { return _console; }
 
 protected:
 
@@ -566,6 +569,8 @@
 	virtual bool canLoadGameStateCurrently();
 	virtual bool canSaveGameStateCurrently();
 
+	TuckerConsole *_console;
+
 	void handleIntroSequence();
 	void handleCreditsSequence();
 	void handleCongratulationsSequence();


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list