From 7c5d739ba7591c9448d1968b39a8a565b7dee3a2 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 14 Jun 2009 14:24:28 +0000 Subject: [PATCH] Cleanup. svn-id: r41519 --- engines/kyra/gui.cpp | 3 ++- engines/kyra/sprites.cpp | 2 +- engines/kyra/vqa.cpp | 7 ++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/engines/kyra/gui.cpp b/engines/kyra/gui.cpp index 429f76cfe22..12794f288a2 100644 --- a/engines/kyra/gui.cpp +++ b/engines/kyra/gui.cpp @@ -421,8 +421,9 @@ void MainMenu::updateAnimation() { bool MainMenu::getInput() { Common::Event event; + Common::EventManager *eventMan = _vm->getEventManager(); - while (_system->getEventManager()->pollEvent(event)) { + while (eventMan->pollEvent(event)) { switch (event.type) { case Common::EVENT_LBUTTONUP: return true; diff --git a/engines/kyra/sprites.cpp b/engines/kyra/sprites.cpp index 147ded3cfd6..1c9260caaf8 100644 --- a/engines/kyra/sprites.cpp +++ b/engines/kyra/sprites.cpp @@ -47,7 +47,7 @@ Sprites::Sprites(KyraEngine_LoK *vm, OSystem *system) { _spriteDefStart = 0; memset(_drawLayerTable, 0, sizeof(_drawLayerTable)); _sceneAnimatorBeaconFlag = 0; - system->getEventManager()->registerRandomSource(_rnd, "kyraSprites"); + _vm->getEventManager()->registerRandomSource(_rnd, "kyraSprites"); } Sprites::~Sprites() { diff --git a/engines/kyra/vqa.cpp b/engines/kyra/vqa.cpp index 0b8f9c99a2c..2604c5b484b 100644 --- a/engines/kyra/vqa.cpp +++ b/engines/kyra/vqa.cpp @@ -638,6 +638,7 @@ void VQAMovie::play() { } _vm->_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_sound, _stream); + Common::EventManager *eventMan = _vm->getEventManager(); for (uint i = 0; i < _header.numFrames; i++) { displayFrame(i); @@ -656,17 +657,17 @@ void VQAMovie::play() { break; Common::Event event; - - Common::EventManager *eventMan = _system->getEventManager(); while (eventMan->pollEvent(event)) { switch (event.type) { case Common::EVENT_KEYDOWN: - if (event.kbd.ascii == 27) + if (event.kbd.keycode == Common::KEYCODE_ESCAPE) return; break; + case Common::EVENT_RTL: case Common::EVENT_QUIT: return; + default: break; }