diff options
Diffstat (limited to 'engines/queen')
-rw-r--r-- | engines/queen/input.cpp | 9 | ||||
-rw-r--r-- | engines/queen/input.h | 4 | ||||
-rw-r--r-- | engines/queen/journal.cpp | 4 | ||||
-rw-r--r-- | engines/queen/queen.cpp | 2 |
4 files changed, 11 insertions, 8 deletions
diff --git a/engines/queen/input.cpp b/engines/queen/input.cpp index 146e95bcef..9f03c341c9 100644 --- a/engines/queen/input.cpp +++ b/engines/queen/input.cpp @@ -27,6 +27,7 @@ #include "common/events.h" #include "common/system.h" +#include "queen/queen.h" #include "queen/input.h" namespace Queen { @@ -51,12 +52,12 @@ const Verb Input::_verbKeys[] = { VERB_USE }; -Input::Input(Common::Language language, OSystem *system) : +Input::Input(Common::Language language, OSystem *system, QueenEngine *vm) : _system(system), _eventMan(system->getEventManager()), _fastMode(false), _keyVerb(VERB_NONE), _cutawayRunning(false), _canQuit(false), _cutawayQuit(false), _dialogueRunning(false), _talkQuit(false), _quickSave(false), _quickLoad(false), _debugger(false), _inKey(Common::KEYCODE_INVALID), - _mouseButton(0), _idleTime(0) { + _mouseButton(0), _idleTime(0) , _vm(vm) { switch (language) { case Common::EN_ANY: @@ -119,8 +120,8 @@ void Input::delay(uint amount) { break; case Common::EVENT_QUIT: - _system->quit(); - break; + _vm->quitGame(); + return; default: break; diff --git a/engines/queen/input.h b/engines/queen/input.h index 86092aeed6..43a57729c6 100644 --- a/engines/queen/input.h +++ b/engines/queen/input.h @@ -49,7 +49,7 @@ public: MOUSE_RBUTTON = 2 }; - Input(Common::Language language, OSystem *system); + Input(Common::Language language, OSystem *system, QueenEngine *vm); void delay(uint amount); @@ -99,6 +99,8 @@ private: Common::EventManager *_eventMan; + QueenEngine *_vm; + //! some cutaways require update() run faster bool _fastMode; diff --git a/engines/queen/journal.cpp b/engines/queen/journal.cpp index bfbcfa4e59..0327fb74b8 100644 --- a/engines/queen/journal.cpp +++ b/engines/queen/journal.cpp @@ -85,8 +85,8 @@ void Journal::use() { handleMouseWheel(1); break; case Common::EVENT_QUIT: - _system->quit(); - break; + _vm->quitGame(); + return; default: break; } diff --git a/engines/queen/queen.cpp b/engines/queen/queen.cpp index d1a1247c46..c95e44b477 100644 --- a/engines/queen/queen.cpp +++ b/engines/queen/queen.cpp @@ -418,7 +418,7 @@ int QueenEngine::init() { _display = new Display(this, _system); _graphics = new Graphics(this); _grid = new Grid(this); - _input = new Input(_resource->getLanguage(), _system); + _input = new Input(_resource->getLanguage(), _system, this); if (_resource->isDemo()) { _logic = new LogicDemo(this); |