diff options
author | Thierry Crozat | 2017-03-29 22:02:34 +0100 |
---|---|---|
committer | Thierry Crozat | 2018-11-04 21:42:50 +0000 |
commit | d46e0d8ab0d93102cea0d3573e54e8bfa00fcffe (patch) | |
tree | 95f89d8f3301d9e496dc14b1374438541e8d0da5 /engines/drascula | |
parent | 79a4e3f8131fa8e3f2b3041e2a440236093cb76d (diff) | |
download | scummvm-rg350-d46e0d8ab0d93102cea0d3573e54e8bfa00fcffe.tar.gz scummvm-rg350-d46e0d8ab0d93102cea0d3573e54e8bfa00fcffe.tar.bz2 scummvm-rg350-d46e0d8ab0d93102cea0d3573e54e8bfa00fcffe.zip |
DRASCULA: Add option to pause speech using space or pause key
Diffstat (limited to 'engines/drascula')
-rw-r--r-- | engines/drascula/talk.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 7ae06c9cf8..eb4f543532 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -39,7 +39,15 @@ bool DrasculaEngine::isTalkFinished() { return true; } - if (getScan() != 0) + Common::KeyCode key = getScan(); + if (key == Common::KEYCODE_SPACE || key == Common::KEYCODE_PAUSE) { + // Pause speech until space is pressed again + // Note: an alternative is to implement a PauseDialog as is done in engines/scumm/dialogs.cpp + do { + pause(10); + key = getScan(); + } while (key != Common::KEYCODE_SPACE && key != Common::KEYCODE_PAUSE && !shouldQuit()); + } else if (key != 0) stopSound(); if (soundIsActive()) return false; |