[Scummvm-cvs-logs] SF.net SVN: scummvm:[54115] scummvm/trunk/engines/cine
tdhs at users.sourceforge.net
tdhs at users.sourceforge.net
Sun Nov 7 16:02:42 CET 2010
Revision: 54115
http://scummvm.svn.sourceforge.net/scummvm/?rev=54115&view=rev
Author: tdhs
Date: 2010-11-07 15:02:41 +0000 (Sun, 07 Nov 2010)
Log Message:
-----------
CINE: Added basic debugging console to engine
Since CINE uses Debug Channels, this allows for the interactive setting of debugflags as well as providing a base for adding further debugging commands.
Modified Paths:
--------------
scummvm/trunk/engines/cine/cine.cpp
scummvm/trunk/engines/cine/cine.h
scummvm/trunk/engines/cine/main_loop.cpp
scummvm/trunk/engines/cine/module.mk
Added Paths:
-----------
scummvm/trunk/engines/cine/console.cpp
scummvm/trunk/engines/cine/console.h
Modified: scummvm/trunk/engines/cine/cine.cpp
===================================================================
--- scummvm/trunk/engines/cine/cine.cpp 2010-11-07 12:09:53 UTC (rev 54114)
+++ scummvm/trunk/engines/cine/cine.cpp 2010-11-07 15:02:41 UTC (rev 54115)
@@ -56,6 +56,7 @@
DebugMan.addDebugChannel(kCineDebugScript, "Script", "Script debug level");
DebugMan.addDebugChannel(kCineDebugPart, "Part", "Part debug level");
DebugMan.addDebugChannel(kCineDebugSound, "Sound", "Sound debug level");
+ _console = new CineConsole(this);
// Setup mixer
_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
@@ -74,7 +75,9 @@
if (getGameType() == Cine::GType_OS) {
freeErrmessDat();
}
+
DebugMan.clearAllDebugChannels();
+ delete _console;
}
Common::Error CineEngine::run() {
Modified: scummvm/trunk/engines/cine/cine.h
===================================================================
--- scummvm/trunk/engines/cine/cine.h 2010-11-07 12:09:53 UTC (rev 54114)
+++ scummvm/trunk/engines/cine/cine.h 2010-11-07 15:02:41 UTC (rev 54115)
@@ -49,6 +49,7 @@
#include "cine/anim.h"
#include "cine/bg_list.h"
#include "cine/various.h"
+#include "cine/console.h"
//#define DUMP_SCRIPTS
@@ -99,6 +100,8 @@
typedef Common::HashMap<Common::String, const char *> StringPtrHashMap;
+class CineConsole;
+
class CineEngine : public Engine {
protected:
@@ -137,6 +140,8 @@
StringPtrHashMap _volumeEntriesMap;
TextHandler _textHandler;
+ GUI::Debugger *getDebugger() { return _console; }
+
bool _restartRequested;
private:
@@ -151,6 +156,7 @@
void mainLoop(int bootScriptIdx);
void readVolCnf();
+ CineConsole *_console;
bool _preLoad;
int _timerDelayMultiplier;
Added: scummvm/trunk/engines/cine/console.cpp
===================================================================
--- scummvm/trunk/engines/cine/console.cpp (rev 0)
+++ scummvm/trunk/engines/cine/console.cpp 2010-11-07 15:02:41 UTC (rev 54115)
@@ -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 "cine/console.h"
+#include "cine/cine.h"
+
+namespace Cine {
+
+CineConsole::CineConsole(CineEngine *vm) : GUI::Debugger(), _vm(vm) {
+}
+
+CineConsole::~CineConsole() {
+}
+
+void CineConsole::preEnter() {
+}
+
+void CineConsole::postEnter() {
+}
+
+} // End of namespace Cine
Property changes on: scummvm/trunk/engines/cine/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/cine/console.h
===================================================================
--- scummvm/trunk/engines/cine/console.h (rev 0)
+++ scummvm/trunk/engines/cine/console.h 2010-11-07 15:02:41 UTC (rev 54115)
@@ -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 CINE_CONSOLE_H
+#define CINE_CONSOLE_H
+
+#include "gui/debugger.h"
+
+namespace Cine {
+
+class CineEngine;
+
+class CineConsole : public GUI::Debugger {
+public:
+ CineConsole(CineEngine *vm);
+ virtual ~CineConsole(void);
+
+protected:
+ virtual void preEnter();
+ virtual void postEnter();
+
+private:
+ CineEngine *_vm;
+};
+
+} // End of namespace Cine
+
+#endif
Property changes on: scummvm/trunk/engines/cine/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/cine/main_loop.cpp
===================================================================
--- scummvm/trunk/engines/cine/main_loop.cpp 2010-11-07 12:09:53 UTC (rev 54114)
+++ scummvm/trunk/engines/cine/main_loop.cpp 2010-11-07 15:02:41 UTC (rev 54115)
@@ -161,6 +161,12 @@
case Common::KEYCODE_KP3:
moveUsingKeyboard(+1, -1); // Down & Right
break;
+ case Common::KEYCODE_d:
+ if (event.kbd.hasFlags(Common::KBD_CTRL)) {
+ g_cine->getDebugger()->attach();
+ g_cine->getDebugger()->onFrame();
+ }
+ // No Break to allow fallthrough to process 'd' without CTRL
default:
lastKeyStroke = event.kbd.keycode;
break;
Modified: scummvm/trunk/engines/cine/module.mk
===================================================================
--- scummvm/trunk/engines/cine/module.mk 2010-11-07 12:09:53 UTC (rev 54114)
+++ scummvm/trunk/engines/cine/module.mk 2010-11-07 15:02:41 UTC (rev 54115)
@@ -4,6 +4,7 @@
anim.o \
bg.o \
bg_list.o \
+ console.o \
cine.o \
detection.o \
gfx.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