[Scummvm-git-logs] scummvm master -> 38dd15c18312d1eea6e05eab46152438456a5733
AndywinXp
noreply at scummvm.org
Thu May 26 21:02:54 UTC 2022
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:
38dd15c183 SCUMM: INPUT: Implement Enter and Tab substitution as Left and Right click
Commit: 38dd15c18312d1eea6e05eab46152438456a5733
https://github.com/scummvm/scummvm/commit/38dd15c18312d1eea6e05eab46152438456a5733
Author: Andrea Boscarino (andywinxp at gmail.com)
Date: 2022-05-26T23:02:51+02:00
Commit Message:
SCUMM: INPUT: Implement Enter and Tab substitution as Left and Right click
The original interpreters allowed the usage of the Enter key as a substitute for left mouse click, and the Tab key as a substitute for right click; while v7-8 games handle this substitution via scripts, we have to do this manually for the other games.
Changed paths:
engines/scumm/input.cpp
diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp
index 629aa3679d9..b8f83ec098b 100644
--- a/engines/scumm/input.cpp
+++ b/engines/scumm/input.cpp
@@ -687,6 +687,15 @@ void ScummEngine::processKeyboard(Common::KeyState lastKeyHit) {
_mouseAndKeyboardStat = lastKeyHit.ascii;
}
}
+
+ // The original interpreters allowed the usage of the Enter key as a substitute for left mouse click,
+ // and the Tab key as a substitute for right click; while v7-8 games handle this substitution via
+ // scripts, we have to do this manually for the other games.
+ if (_mouseAndKeyboardStat == Common::KEYCODE_RETURN && _cursor.state > 0 && _game.version <= 6) {
+ _mouseAndKeyboardStat = MBS_LEFT_CLICK;
+ } else if (_mouseAndKeyboardStat == Common::KEYCODE_TAB && _cursor.state > 0 && _game.version >= 4 && _game.version <= 6) {
+ _mouseAndKeyboardStat = MBS_RIGHT_CLICK;
+ }
}
} // End of namespace Scumm
More information about the Scummvm-git-logs
mailing list