aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/platform_osystem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/wintermute/platform_osystem.cpp')
-rw-r--r--engines/wintermute/platform_osystem.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/engines/wintermute/platform_osystem.cpp b/engines/wintermute/platform_osystem.cpp
index 0bd99b11cd..f13bdd2a3c 100644
--- a/engines/wintermute/platform_osystem.cpp
+++ b/engines/wintermute/platform_osystem.cpp
@@ -26,6 +26,7 @@
* Copyright (c) 2011 Jan Nedoma
*/
+#include "engines/wintermute/wintermute.h"
#include "engines/wintermute/base/base_game.h"
#include "engines/wintermute/base/gfx/osystem/base_render_osystem.h"
#include "engines/wintermute/platform_osystem.h"
@@ -36,13 +37,20 @@
namespace Wintermute {
BaseGame *BasePlatform::_gameRef = NULL;
+WintermuteEngine *BasePlatform::_engineRef = NULL;
#define CLASS_NAME "GF_FRAME"
-int BasePlatform::initialize(BaseGame *inGame, int argc, char *argv[]) {
+int BasePlatform::initialize(WintermuteEngine *engineRef, BaseGame *inGame, int argc, char *argv[]) {
_gameRef = inGame;
+ _engineRef = engineRef;
return true;
}
+void BasePlatform::deinit() {
+ _gameRef = NULL;
+ _engineRef = NULL;
+}
+
//////////////////////////////////////////////////////////////////////////
void BasePlatform::handleEvent(Common::Event *event) {
switch (event->type) {
@@ -86,6 +94,11 @@ void BasePlatform::handleEvent(Common::Event *event) {
}
break;
case Common::EVENT_KEYDOWN:
+ if (event->kbd.flags & Common::KBD_CTRL) {
+ if (event->kbd.keycode == Common::KEYCODE_d) {
+ _engineRef->trigDebugger();
+ }
+ }
if (_gameRef) {
_gameRef->handleKeypress(event);
}