[Scummvm-git-logs] scummvm master -> d46e0d8ab0d93102cea0d3573e54e8bfa00fcffe
criezy
criezy at scummvm.org
Sun Nov 4 22:48:27 CET 2018
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
d46e0d8ab0 DRASCULA: Add option to pause speech using space or pause key
Commit: d46e0d8ab0d93102cea0d3573e54e8bfa00fcffe
https://github.com/scummvm/scummvm/commit/d46e0d8ab0d93102cea0d3573e54e8bfa00fcffe
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2018-11-04T21:42:50Z
Commit Message:
DRASCULA: Add option to pause speech using space or pause key
Changed paths:
engines/drascula/talk.cpp
diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp
index 7ae06c9..eb4f543 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;
More information about the Scummvm-git-logs
mailing list