aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/input.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/scumm/input.cpp')
-rw-r--r--engines/scumm/input.cpp32
1 files changed, 21 insertions, 11 deletions
diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp
index ee2de49475..3ce053f6bc 100644
--- a/engines/scumm/input.cpp
+++ b/engines/scumm/input.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -23,6 +23,7 @@
#include "common/config-manager.h"
#include "common/events.h"
#include "common/system.h"
+#include "common/translation.h"
#include "gui/message.h"
#include "gui/gui-manager.h"
@@ -435,8 +436,9 @@ void ScummEngine_v6::processKeyboard(Common::KeyState lastKeyHit) {
break;
}
- if (VAR_VOICE_MODE != 0xFF)
- VAR(VAR_VOICE_MODE) = _voiceMode;
+ // We need to sync the current sound settings here to make sure that
+ // we actually update the mute state of speech properly.
+ syncSoundSettings();
return;
}
@@ -451,8 +453,16 @@ void ScummEngine_v2::processKeyboard(Common::KeyState lastKeyHit) {
lastKeyHit = Common::KeyState(Common::KEYCODE_ESCAPE);
// F7 is used to skip cutscenes in the Commodote 64 version of Maniac Mansion
} else if (_game.id == GID_MANIAC &&_game.platform == Common::kPlatformC64) {
- if (lastKeyHit.keycode == Common::KEYCODE_F7 && lastKeyHit.hasFlags(0))
- lastKeyHit = Common::KeyState(Common::KEYCODE_ESCAPE);
+ // Demo always F7 to be pressed to restart
+ if (_game.features & GF_DEMO) {
+ if (_roomResource != 0x2D && lastKeyHit.keycode == Common::KEYCODE_F7 && lastKeyHit.hasFlags(0)) {
+ restart();
+ return;
+ }
+ } else {
+ if (lastKeyHit.keycode == Common::KEYCODE_F7 && lastKeyHit.hasFlags(0))
+ lastKeyHit = Common::KeyState(Common::KEYCODE_ESCAPE);
+ }
// 'B' is used to skip cutscenes in the NES version of Maniac Mansion
} else if (_game.id == GID_MANIAC &&_game.platform == Common::kPlatformNES) {
if (lastKeyHit.keycode == Common::KEYCODE_b && lastKeyHit.hasFlags(Common::KBD_SHIFT))
@@ -535,7 +545,7 @@ void ScummEngine::processKeyboard(Common::KeyState lastKeyHit) {
openMainMenuDialog(); // Display global main menu
- if (VAR_SAVELOAD_SCRIPT != 0xFF && _currentRoom != 0)
+ if (VAR_SAVELOAD_SCRIPT2 != 0xFF && _currentRoom != 0)
runScript(VAR(VAR_SAVELOAD_SCRIPT2), 0, 0, 0);
} else if (restartKeyEnabled && (lastKeyHit.keycode == Common::KEYCODE_F8 && lastKeyHit.hasFlags(0))) {
@@ -559,9 +569,9 @@ void ScummEngine::processKeyboard(Common::KeyState lastKeyHit) {
lastKeyHit.hasFlags(Common::KBD_CTRL)) {
_snapScroll ^= 1;
if (_snapScroll) {
- messageDialog("Snap scroll on");
+ messageDialog(_("Snap scroll on"));
} else {
- messageDialog("Snap scroll off");
+ messageDialog(_("Snap scroll off"));
}
if (VAR_CAMERA_FAST_X != 0xFF)
@@ -574,7 +584,7 @@ void ScummEngine::processKeyboard(Common::KeyState lastKeyHit) {
vol--;
// Display the music volume
- ValueDisplayDialog dlg("Music volume: ", 0, 16, vol, ']', '[');
+ ValueDisplayDialog dlg(_("Music volume: "), 0, 16, vol, ']', '[');
vol = runDialog(dlg);
vol *= 16;
@@ -591,7 +601,7 @@ void ScummEngine::processKeyboard(Common::KeyState lastKeyHit) {
_defaultTalkDelay++;
// Display the talk speed
- ValueDisplayDialog dlg("Subtitle speed: ", 0, 9, 9 - _defaultTalkDelay, '+', '-');
+ ValueDisplayDialog dlg(_("Subtitle speed: "), 0, 9, 9 - _defaultTalkDelay, '+', '-');
_defaultTalkDelay = 9 - runDialog(dlg);
// Save the new talkspeed value to ConfMan