From 696ed52959e7853ff2039fb0ce1063cebb9a1cd2 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 16 Dec 2008 17:40:34 +0000 Subject: Switched kyra1 to use the same input functionality as kyra2 and kyra3. svn-id: r35393 --- engines/kyra/text_lok.cpp | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) (limited to 'engines/kyra/text_lok.cpp') diff --git a/engines/kyra/text_lok.cpp b/engines/kyra/text_lok.cpp index 150ec59a23..8c0980005b 100644 --- a/engines/kyra/text_lok.cpp +++ b/engines/kyra/text_lok.cpp @@ -114,22 +114,11 @@ void KyraEngine_LoK::waitForChatToFinish(int vocFile, int16 chatDuration, const uint32 nextTime = loopStart + _tickLength; while (_system->getMillis() < nextTime) { - while (_eventMan->pollEvent(event)) { - switch (event.type) { - case Common::EVENT_KEYDOWN: - if (event.kbd.keycode == '.') - _skipFlag = true; - break; - case Common::EVENT_RTL: - case Common::EVENT_QUIT: - runLoop = false; - break; - case Common::EVENT_LBUTTONDOWN: - runLoop = false; - break; - default: - break; - } + updateInput(); + + if (skipFlag()) { + runLoop = false; + break; } if (nextTime - _system->getMillis() >= 10) { @@ -137,13 +126,12 @@ void KyraEngine_LoK::waitForChatToFinish(int vocFile, int16 chatDuration, const _system->updateScreen(); } } - - if (_skipFlag) - runLoop = false; } - if (_skipFlag) + if (skipFlag()) { + resetSkipFlag(); snd_stopVoice(); + } _timer->enable(14); _timer->enable(15); -- cgit v1.2.3