diff options
author | Johannes Schickel | 2008-12-16 17:40:34 +0000 |
---|---|---|
committer | Johannes Schickel | 2008-12-16 17:40:34 +0000 |
commit | 696ed52959e7853ff2039fb0ce1063cebb9a1cd2 (patch) | |
tree | 4e199ac773eb917ef0be0c8e5500ac36119d6138 /engines/kyra/text_lok.cpp | |
parent | 2706e527c214cfcc77502b3bdb639d5a341d3c1a (diff) | |
download | scummvm-rg350-696ed52959e7853ff2039fb0ce1063cebb9a1cd2.tar.gz scummvm-rg350-696ed52959e7853ff2039fb0ce1063cebb9a1cd2.tar.bz2 scummvm-rg350-696ed52959e7853ff2039fb0ce1063cebb9a1cd2.zip |
Switched kyra1 to use the same input functionality as kyra2 and kyra3.
svn-id: r35393
Diffstat (limited to 'engines/kyra/text_lok.cpp')
-rw-r--r-- | engines/kyra/text_lok.cpp | 28 |
1 files changed, 8 insertions, 20 deletions
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); |