diff options
author | Max Horn | 2007-06-23 16:46:00 +0000 |
---|---|---|
committer | Max Horn | 2007-06-23 16:46:00 +0000 |
commit | 24f080ab561670839cfa954ba2f111e50c18a0d6 (patch) | |
tree | e91b876c19a269156334a8f2972dfe6658bf5317 /engines/scumm | |
parent | f0a25f7a9b221f7f7a4ae38cbc1df13b78589b42 (diff) | |
download | scummvm-rg350-24f080ab561670839cfa954ba2f111e50c18a0d6.tar.gz scummvm-rg350-24f080ab561670839cfa954ba2f111e50c18a0d6.tar.bz2 scummvm-rg350-24f080ab561670839cfa954ba2f111e50c18a0d6.zip |
Cleanup; also fixed Alt-F5 (orig. saveload menu) in COMI
svn-id: r27677
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/input.cpp | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp index a2a90d4cf9..8b2a5e8862 100644 --- a/engines/scumm/input.cpp +++ b/engines/scumm/input.cpp @@ -341,7 +341,7 @@ void ScummEngine::processInput() { if (lastKeyHit.ascii == KEY_ALL_SKIP) { // Skip talk if (VAR_TALKSTOP_KEY != 0xFF && _talkDelay > 0) { - lastKeyHit = Common::KeyState(Common::KEYCODE_PERIOD, '.'); + lastKeyHit = Common::KeyState(Common::KEYCODE_PERIOD); } else { lastKeyHit = Common::KeyState(Common::KEYCODE_ESCAPE); } @@ -360,17 +360,17 @@ void ScummEngine_v8::processKeyboard(Common::KeyState lastKeyHit) { if (!(_game.features & GF_DEMO)) { // F1 (the trigger for the original save/load dialog) is mapped to F5 if (lastKeyHit.keycode == Common::KEYCODE_F1 && lastKeyHit.flags == 0) { - lastKeyHit = Common::KeyState(Common::KEYCODE_F5); + lastKeyHit = Common::KeyState(Common::KEYCODE_F5, 319); } // Alt-F5 brings up the original save/load dialog if (lastKeyHit.keycode == Common::KEYCODE_F5 && lastKeyHit.flags == Common::KBD_ALT) { - lastKeyHit = Common::KeyState(Common::KEYCODE_F1); + lastKeyHit = Common::KeyState(Common::KEYCODE_F1, 315); } } // If a key script was specified (a V8 feature), and it's trigger - // key was pressed, run it. + // key was pressed, run it. Usually used to display the built-in menu. if (_keyScriptNo && (_keyScriptKey == lastKeyHit.ascii)) { runScript(_keyScriptNo, 0, 0, 0); return; @@ -381,6 +381,7 @@ void ScummEngine_v8::processKeyboard(Common::KeyState lastKeyHit) { } void ScummEngine_v7::processKeyboard(Common::KeyState lastKeyHit) { + const bool cutsceneExitKeyEnabled = (VAR_CUTSCENEEXIT_KEY == 0xFF || VAR(VAR_CUTSCENEEXIT_KEY) != 0); // VAR_VERSION_KEY (usually ctrl-v) is used in COMI, Dig and FT to trigger // a version dialog, unless VAR_VERSION_KEY is set to 0. However, the COMI @@ -389,12 +390,8 @@ void ScummEngine_v7::processKeyboard(Common::KeyState lastKeyHit) { if (_game.id != GID_CMI && 0 != VAR(VAR_VERSION_KEY) && lastKeyHit.keycode == Common::KEYCODE_v && lastKeyHit.flags == Common::KBD_CTRL) { versionDialog(); - return; - } - - const bool cutsceneExitKeyEnabled = (VAR_CUTSCENEEXIT_KEY == 0xFF || VAR(VAR_CUTSCENEEXIT_KEY) != 0); - if (cutsceneExitKeyEnabled && lastKeyHit.keycode == Common::KEYCODE_ESCAPE) { + } else if (cutsceneExitKeyEnabled && lastKeyHit.keycode == Common::KEYCODE_ESCAPE) { // Skip cutscene (or active SMUSH video). if (_smushActive) { if (_game.id == GID_FT) @@ -406,11 +403,11 @@ void ScummEngine_v7::processKeyboard(Common::KeyState lastKeyHit) { abortCutscene(); _mouseAndKeyboardStat = Common::ASCII_ESCAPE; - return; - } - // Fall back to V6 behavior - ScummEngine_v6::processKeyboard(lastKeyHit); + } else { + // Fall back to V6 behavior + ScummEngine_v6::processKeyboard(lastKeyHit); + } } #endif @@ -511,12 +508,7 @@ void ScummEngine::processKeyboard(Common::KeyState lastKeyHit) { mainmenuKeyEnabled = true; */ - // Alt-F5 should bring up the original save/load dialog, if any. - // Hence remap it to F5 - if ((_game.version > 2 && _game.version < 8) && (lastKeyHit.keycode == Common::KEYCODE_F5 && lastKeyHit.flags == Common::KBD_ALT)) { - _mouseAndKeyboardStat = 319; // SCUMM encoding for F5 - - } else if (mainmenuKeyEnabled && (lastKeyHit.keycode == Common::KEYCODE_F5 && lastKeyHit.flags == 0)) { + if (mainmenuKeyEnabled && (lastKeyHit.keycode == Common::KEYCODE_F5 && lastKeyHit.flags == 0)) { if (VAR_SAVELOAD_SCRIPT != 0xFF && _currentRoom != 0) runScript(VAR(VAR_SAVELOAD_SCRIPT), 0, 0, 0); |