diff options
author | Filippos Karapetis | 2009-03-07 17:32:11 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-03-07 17:32:11 +0000 |
commit | cdb4cdf070e72ed1da539df6cf16df01af6d8df9 (patch) | |
tree | c1b75e74f9adae14718377856caa12a99f5e6a73 | |
parent | 041af01f7d2053cad29f022865325602cb44d39b (diff) | |
download | scummvm-rg350-cdb4cdf070e72ed1da539df6cf16df01af6d8df9.tar.gz scummvm-rg350-cdb4cdf070e72ed1da539df6cf16df01af6d8df9.tar.bz2 scummvm-rg350-cdb4cdf070e72ed1da539df6cf16df01af6d8df9.zip |
The ScummVM debug console is now working (though only the "version" command is assigned, for now)
svn-id: r39195
-rw-r--r-- | engines/sci/gfx/gfx_driver.cpp | 16 | ||||
-rw-r--r-- | engines/sci/sci.h | 2 |
2 files changed, 17 insertions, 1 deletions
diff --git a/engines/sci/gfx/gfx_driver.cpp b/engines/sci/gfx/gfx_driver.cpp index 5951ef252f..7b9c890a05 100644 --- a/engines/sci/gfx/gfx_driver.cpp +++ b/engines/sci/gfx/gfx_driver.cpp @@ -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 @@ static sci_event_t scummvm_get_event(gfx_driver_t *drv) { 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; diff --git a/engines/sci/sci.h b/engines/sci/sci.h index 7a8d328112..a92356a396 100644 --- a/engines/sci/sci.h +++ b/engines/sci/sci.h @@ -98,10 +98,10 @@ public: /** 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; }; |