[Scummvm-cvs-logs] SF.net SVN: scummvm:[54139] scummvm/trunk/engines/made
tdhs at users.sourceforge.net
tdhs at users.sourceforge.net
Mon Nov 8 13:17:20 CET 2010
Revision: 54139
http://scummvm.svn.sourceforge.net/scummvm/?rev=54139&view=rev
Author: tdhs
Date: 2010-11-08 12:17:19 +0000 (Mon, 08 Nov 2010)
Log Message:
-----------
MADE: Added basic debugging console to engine
MADE 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/made/made.cpp
scummvm/trunk/engines/made/made.h
scummvm/trunk/engines/made/module.mk
Added Paths:
-----------
scummvm/trunk/engines/made/console.cpp
scummvm/trunk/engines/made/console.h
Added: scummvm/trunk/engines/made/console.cpp
===================================================================
--- scummvm/trunk/engines/made/console.cpp (rev 0)
+++ scummvm/trunk/engines/made/console.cpp 2010-11-08 12:17:19 UTC (rev 54139)
@@ -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
Property changes on: scummvm/trunk/engines/made/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/made/console.h
===================================================================
--- scummvm/trunk/engines/made/console.h (rev 0)
+++ scummvm/trunk/engines/made/console.h 2010-11-08 12:17:19 UTC (rev 54139)
@@ -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
Property changes on: scummvm/trunk/engines/made/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/made/made.cpp
===================================================================
--- scummvm/trunk/engines/made/made.cpp 2010-11-08 11:02:43 UTC (rev 54138)
+++ scummvm/trunk/engines/made/made.cpp 2010-11-08 12:17:19 UTC (rev 54139)
@@ -79,6 +79,8 @@
_rnd = new Common::RandomSource();
g_eventRec.registerRandomSource(*_rnd, "made");
+ _console = new MadeConsole(this);
+
int cd_num = ConfMan.getInt("cdrom");
if (cd_num >= 0)
_system->openCD(cd_num);
@@ -133,6 +135,7 @@
AudioCD.stop();
delete _rnd;
+ delete _console;
delete _pmvPlayer;
delete _res;
delete _screen;
@@ -234,6 +237,12 @@
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:
Modified: scummvm/trunk/engines/made/made.h
===================================================================
--- scummvm/trunk/engines/made/made.h 2010-11-08 11:02:43 UTC (rev 54138)
+++ scummvm/trunk/engines/made/made.h 2010-11-08 12:17:19 UTC (rev 54139)
@@ -47,6 +47,7 @@
#include "engines/engine.h"
#include "made/sound.h"
+#include "made/console.h"
/**
* This is the namespace of the Made engine.
@@ -101,6 +102,8 @@
virtual bool hasFeature(EngineFeature f) const;
virtual void syncSoundSettings();
+ GUI::Debugger *getDebugger() { return _console; }
+
int getGameId() {
return _gameId;
}
@@ -113,6 +116,7 @@
Common::Platform getPlatform() const;
private:
+ MadeConsole *_console;
public:
PmvPlayer *_pmvPlayer;
ResourceReader *_res;
Modified: scummvm/trunk/engines/made/module.mk
===================================================================
--- scummvm/trunk/engines/made/module.mk 2010-11-08 11:02:43 UTC (rev 54138)
+++ scummvm/trunk/engines/made/module.mk 2010-11-08 12:17:19 UTC (rev 54139)
@@ -1,6 +1,7 @@
MODULE := engines/made
MODULE_OBJS := \
+ console.o \
database.o \
detection.o \
graphics.o \
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