[Scummvm-cvs-logs] SF.net SVN: scummvm:[39195] scummvm/trunk/engines/sci

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sat Mar 7 18:32:11 CET 2009


Revision: 39195
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39195&view=rev
Author:   thebluegr
Date:     2009-03-07 17:32:11 +0000 (Sat, 07 Mar 2009)

Log Message:
-----------
The ScummVM debug console is now working (though only the "version" command is assigned, for now)

Modified Paths:
--------------
    scummvm/trunk/engines/sci/gfx/gfx_driver.cpp
    scummvm/trunk/engines/sci/sci.h

Modified: scummvm/trunk/engines/sci/gfx/gfx_driver.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_driver.cpp	2009-03-07 17:27:18 UTC (rev 39194)
+++ scummvm/trunk/engines/sci/gfx/gfx_driver.cpp	2009-03-07 17:32:11 UTC (rev 39195)
@@ -28,6 +28,7 @@
 #include "common/events.h"
 #include "graphics/primitives.h"
 
+#include "sci/sci.h"
 #include "sci/gfx/gfx_driver.h"
 #include "sci/gfx/gfx_tools.h"
 
@@ -385,6 +386,21 @@
 			input.data = ev.kbd.keycode;
 			input.character = ev.kbd.ascii;
 
+			// Debug console
+			if (ev.kbd.flags == Common::KBD_CTRL && ev.kbd.keycode == Common::KEYCODE_d) {
+
+				((Sci::SciEngine*)g_engine)->_console->attach();
+				((Sci::SciEngine*)g_engine)->_console->onFrame();
+
+				// Clear keyboard event
+				input.type = SCI_EVT_NONE;
+				input.character = 0;
+				input.data = 0;
+				input.buckybits = 0;
+
+				return input;
+			}
+
 			if (!(input.data & 0xFF00)) {
 				// Directly accept most common keys without conversion
 				input.type = SCI_EVT_KEYBOARD;

Modified: scummvm/trunk/engines/sci/sci.h
===================================================================
--- scummvm/trunk/engines/sci/sci.h	2009-03-07 17:27:18 UTC (rev 39194)
+++ scummvm/trunk/engines/sci/sci.h	2009-03-07 17:32:11 UTC (rev 39195)
@@ -98,10 +98,10 @@
 	/** Remove the 'TARGET-' prefix of the given filename, if present. */
 	Common::String unwrapFilename(const Common::String &name) const;
 
+	Console *_console;
 
 private:
 	const SciGameDescription *_gameDescription;
-	Console *_console;
 	ResourceManager *_resmgr;
 };
 


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