[Scummvm-git-logs] scummvm master -> 390565727f8e80a1812451ae67b85afa66bc8fe7

sev- sev at scummvm.org
Mon Aug 30 21:13:38 UTC 2021


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:
390565727f SCUMM: Fix handling of Ctrl+Key in monkey1 and monkey2


Commit: 390565727f8e80a1812451ae67b85afa66bc8fe7
    https://github.com/scummvm/scummvm/commit/390565727f8e80a1812451ae67b85afa66bc8fe7
Author: Orgad Shaneh (orgads at gmail.com)
Date: 2021-08-30T23:13:35+02:00

Commit Message:
SCUMM: Fix handling of Ctrl+Key in monkey1 and monkey2

There are several Ctrl+Key combinations that are accepted by the engine.
Most famous one is Ctrl+W, which is Instant Win on monkey1 (monkey2 uses
Alt+W, and has a similar hack for passing it correctly).

This used to work with ScummVM 1.9.0/SDL1, but broke with SDL2, and was
later broken further even for SDL1 in f5ed14e93d85.

Fixes #10644.

Changed paths:
    engines/scumm/input.cpp


diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp
index 46de5fd2f6..3fb0a16c67 100644
--- a/engines/scumm/input.cpp
+++ b/engines/scumm/input.cpp
@@ -619,6 +619,10 @@ void ScummEngine::processKeyboard(Common::KeyState lastKeyHit) {
 		    lastKeyHit.keycode <= Common::KEYCODE_F9) {
 			_mouseAndKeyboardStat = lastKeyHit.keycode - Common::KEYCODE_F1 + 315;
 
+		} else if ((_game.id == GID_MONKEY || _game.id == GID_MONKEY2) &&
+				   (lastKeyHit.flags & Common::KBD_CTRL) &&
+				   (lastKeyHit.keycode >= Common::KEYCODE_a && lastKeyHit.keycode <= Common::KEYCODE_z)) {
+			_mouseAndKeyboardStat = lastKeyHit.keycode - Common::KEYCODE_a + 1;
 		} else if (_game.id == GID_MONKEY2 && (lastKeyHit.flags & Common::KBD_ALT)) {
 			// Handle KBD_ALT combos in MI2. We know that the result must be 273 for Alt-W
 			// because that's what MI2 looks for in its "instant win" cheat.




More information about the Scummvm-git-logs mailing list