[Scummvm-cvs-logs] SF.net SVN: scummvm:[54123] scummvm/trunk/engines/toon
tdhs at users.sourceforge.net
tdhs at users.sourceforge.net
Sun Nov 7 18:19:00 CET 2010
Revision: 54123
http://scummvm.svn.sourceforge.net/scummvm/?rev=54123&view=rev
Author: tdhs
Date: 2010-11-07 17:18:59 +0000 (Sun, 07 Nov 2010)
Log Message:
-----------
TOON: Added basic debugging console to engine
Since Toon uses Debug Channels, this allows for the interactive setting of debugflags as well as providing a base for adding further debugging commands.
However, the hotkey for this is currently disabled as it causes a segfault. Not sure why.
Modified Paths:
--------------
scummvm/trunk/engines/toon/module.mk
scummvm/trunk/engines/toon/toon.cpp
scummvm/trunk/engines/toon/toon.h
Added Paths:
-----------
scummvm/trunk/engines/toon/console.cpp
scummvm/trunk/engines/toon/console.h
Added: scummvm/trunk/engines/toon/console.cpp
===================================================================
--- scummvm/trunk/engines/toon/console.cpp (rev 0)
+++ scummvm/trunk/engines/toon/console.cpp 2010-11-07 17:18:59 UTC (rev 54123)
@@ -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 "toon/console.h"
+#include "toon/toon.h"
+
+namespace Toon {
+
+ToonConsole::ToonConsole(ToonEngine *vm) : GUI::Debugger(), _vm(vm) {
+}
+
+ToonConsole::~ToonConsole() {
+}
+
+void ToonConsole::preEnter() {
+}
+
+void ToonConsole::postEnter() {
+}
+
+} // End of namespace Toon
Property changes on: scummvm/trunk/engines/toon/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/toon/console.h
===================================================================
--- scummvm/trunk/engines/toon/console.h (rev 0)
+++ scummvm/trunk/engines/toon/console.h 2010-11-07 17:18:59 UTC (rev 54123)
@@ -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 TOON_CONSOLE_H
+#define TOON_CONSOLE_H
+
+#include "gui/debugger.h"
+
+namespace Toon {
+
+class ToonEngine;
+
+class ToonConsole : public GUI::Debugger {
+public:
+ ToonConsole(ToonEngine *vm);
+ virtual ~ToonConsole(void);
+
+protected:
+ virtual void preEnter();
+ virtual void postEnter();
+
+private:
+ ToonEngine *_vm;
+};
+
+} // End of namespace Toon
+
+#endif
Property changes on: scummvm/trunk/engines/toon/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/toon/module.mk
===================================================================
--- scummvm/trunk/engines/toon/module.mk 2010-11-07 17:17:21 UTC (rev 54122)
+++ scummvm/trunk/engines/toon/module.mk 2010-11-07 17:18:59 UTC (rev 54123)
@@ -4,6 +4,7 @@
anim.o \
audio.o \
character.o \
+ console.o \
conversation.o \
detection.o \
drew.o \
Modified: scummvm/trunk/engines/toon/toon.cpp
===================================================================
--- scummvm/trunk/engines/toon/toon.cpp 2010-11-07 17:17:21 UTC (rev 54122)
+++ scummvm/trunk/engines/toon/toon.cpp 2010-11-07 17:18:59 UTC (rev 54123)
@@ -239,6 +239,11 @@
dialog.runModal();
}
}
+ // FIXME - Triggering Debug Console currently causes a segfault.
+ //if (event.kbd.keycode == Common::KEYCODE_d) {
+ // this->getDebugger()->attach();
+ // this->getDebugger()->onFrame();
+ //}
}
break;
// Strangerke - Commented (not used)
@@ -750,6 +755,8 @@
DebugMan.addDebugChannel(kDebugTools, "Tools", "Tools debug level");
DebugMan.addDebugChannel(kDebugText, "Text", "Text debug level");
+ _console = new ToonConsole(this);
+
switch (_language) {
case Common::EN_GRB:
case Common::EN_USA:
@@ -776,7 +783,8 @@
}
ToonEngine::~ToonEngine() {
-
+ DebugMan.clearAllDebugChannels();
+ delete _console;
}
void ToonEngine::flushPalette() {
Modified: scummvm/trunk/engines/toon/toon.h
===================================================================
--- scummvm/trunk/engines/toon/toon.h 2010-11-07 17:17:21 UTC (rev 54122)
+++ scummvm/trunk/engines/toon/toon.h 2010-11-07 17:18:59 UTC (rev 54123)
@@ -41,6 +41,7 @@
#include "toon/font.h"
#include "toon/text.h"
#include "toon/audio.h"
+#include "toon/console.h"
#define TOON_DAT_VER_MAJ 0 // 1 byte
#define TOON_DAT_VER_MIN 3 // 1 byte
@@ -417,6 +418,8 @@
bool _firstFrame;
bool _isDemo;
bool _showConversationText;
+private:
+ ToonConsole *_console;
};
} // End of namespace Toon
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