diff options
author | Travis Howell | 2005-03-12 00:47:17 +0000 |
---|---|---|
committer | Travis Howell | 2005-03-12 00:47:17 +0000 |
commit | c39a92933d4d66f7436bbaf3b152f906d24ccfd7 (patch) | |
tree | d1b9663a1eef912f2da4471458f894060404865a /scumm/input.cpp | |
parent | a52de03324bf07891be4ff4e161668ed59a78d6e (diff) | |
download | scummvm-rg350-c39a92933d4d66f7436bbaf3b152f906d24ccfd7.tar.gz scummvm-rg350-c39a92933d4d66f7436bbaf3b152f906d24ccfd7.tar.bz2 scummvm-rg350-c39a92933d4d66f7436bbaf3b152f906d24ccfd7.zip |
Add key to toggle speech/subtitles
svn-id: r17082
Diffstat (limited to 'scumm/input.cpp')
-rw-r--r-- | scumm/input.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/scumm/input.cpp b/scumm/input.cpp index 5120c0891d..827eb4c50c 100644 --- a/scumm/input.cpp +++ b/scumm/input.cpp @@ -25,6 +25,9 @@ #include "common/config-manager.h" #include "common/system.h" +#include "gui/message.h" +#include "gui/newgui.h" + #include "scumm/debugger.h" #include "scumm/dialogs.h" #include "scumm/imuse.h" @@ -337,6 +340,39 @@ void ScummEngine::processKbd(bool smushMode) { } #endif + if (_version >= 6 && _lastKeyHit == 20) { + char buf[256]; + + _voiceMode++; + if (_voiceMode == 3) + _voiceMode = 0; + + switch(_voiceMode) { + case 0: + sprintf(buf, "Speech Only"); + ConfMan.set("speech_mute", false); + ConfMan.set("subtitles", false); + break; + case 1: + sprintf(buf, "Speech and Subtitles"); + ConfMan.set("speech_mute", false); + ConfMan.set("subtitles", true); + break; + case 2: + sprintf(buf, "Subtitles Only"); + ConfMan.set("speech_mute", true); + ConfMan.set("subtitles", true); + break; + } + + if (_version >= 7) + VAR(VAR_VOICE_MODE) = _voiceMode; + + GUI::TimedMessageDialog dialog(buf, 1500); + runDialog(dialog); + return; + } + if (VAR_RESTART_KEY != 0xFF && _lastKeyHit == VAR(VAR_RESTART_KEY) || (((_version <= 2) || (_features & GF_FMTOWNS && _version == 3)) && _lastKeyHit == 8)) { confirmrestartDialog(); |