aboutsummaryrefslogtreecommitdiff
path: root/engines/adl/adl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/adl/adl.cpp')
-rw-r--r--engines/adl/adl.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/engines/adl/adl.cpp b/engines/adl/adl.cpp
index db2d9d69c5..c9673bd1d5 100644
--- a/engines/adl/adl.cpp
+++ b/engines/adl/adl.cpp
@@ -47,6 +47,7 @@ AdlEngine::~AdlEngine() {
delete _display;
delete _graphics;
delete _speaker;
+ delete _console;
}
AdlEngine::AdlEngine(OSystem *syst, const AdlGameDescription *gd) :
@@ -64,7 +65,9 @@ AdlEngine::AdlEngine(OSystem *syst, const AdlGameDescription *gd) :
_canRestoreNow(false) {
}
-bool AdlEngine::pollEvent(Common::Event &event) {
+bool AdlEngine::pollEvent(Common::Event &event) const {
+ _console->onFrame();
+
if (g_system->getEventManager()->pollEvent(event)) {
if (event.type != Common::EVENT_KEYDOWN)
return false;
@@ -74,6 +77,11 @@ bool AdlEngine::pollEvent(Common::Event &event) {
quitGame();
return false;
}
+
+ if (event.kbd.keycode == Common::KEYCODE_d) {
+ _console->attach();
+ return false;
+ }
}
return true;
@@ -493,6 +501,7 @@ void AdlEngine::dropItem(byte noun) {
}
Common::Error AdlEngine::run() {
+ _console = new Console(this);
_speaker = new Speaker();
_display = new Display();