diff options
author | Max Horn | 2004-11-21 14:48:17 +0000 |
---|---|---|
committer | Max Horn | 2004-11-21 14:48:17 +0000 |
commit | fb32e12095d14cde2407ac4375ad06511d96b168 (patch) | |
tree | 3806685ae6d53de6daebc800182b8e57eff0d354 | |
parent | 879431e76b57db9d7efbe993c1edd11d712d2747 (diff) | |
download | scummvm-rg350-fb32e12095d14cde2407ac4375ad06511d96b168.tar.gz scummvm-rg350-fb32e12095d14cde2407ac4375ad06511d96b168.tar.bz2 scummvm-rg350-fb32e12095d14cde2407ac4375ad06511d96b168.zip |
Fix for bug #1052660 (FOA: No keyboard shortcuts for dialogs) - moved hack enabling keyboard fights to allow controlling conversations via number keys again
svn-id: r15853
-rw-r--r-- | scumm/input.cpp | 11 | ||||
-rw-r--r-- | scumm/verbs.cpp | 14 |
2 files changed, 14 insertions, 11 deletions
diff --git a/scumm/input.cpp b/scumm/input.cpp index ed809142d7..6263c00d06 100644 --- a/scumm/input.cpp +++ b/scumm/input.cpp @@ -75,17 +75,6 @@ void ScummEngine::parseEvents() { } else if (event.kbd.ascii == 315 && (_gameId == GID_CMI && !(_features & GF_DEMO))) { // FIXME: support in-game menu screen. For now, this remaps F1 to F5 in COMI _keyPressed = 319; - } else if (_gameId == GID_INDY4 && event.kbd.ascii >= '0' && event.kbd.ascii <= '9') { - // To support keyboard fighting in FOA, we need to remap the number keys. - // FOA apparently expects PC scancode values (see script 46 if you want - // to know where I got these numbers from). - static const int numpad[10] = { - '0', - 335, 336, 337, - 331, 332, 333, - 327, 328, 329 - }; - _keyPressed = numpad[event.kbd.ascii - '0']; } else if (event.kbd.ascii < 273 || event.kbd.ascii > 276 || _version >= 7) { // don't let game have arrow keys as we currently steal them // for keyboard cursor control diff --git a/scumm/verbs.cpp b/scumm/verbs.cpp index 9095edf07e..f530c0bb5f 100644 --- a/scumm/verbs.cpp +++ b/scumm/verbs.cpp @@ -297,6 +297,20 @@ void ScummEngine::checkExecVerbs() { } } } + + if (_gameId == GID_INDY4 && _mouseButStat >= '0' && _mouseButStat <= '9') { + // To support keyboard fighting in FOA, we need to remap the number keys. + // FOA apparently expects PC scancode values (see script 46 if you want + // to know where I got these numbers from). + static const int numpad[10] = { + '0', + 335, 336, 337, + 331, 332, 333, + 327, 328, 329 + }; + _mouseButStat = numpad[_mouseButStat - '0']; + } + // Generic keyboard input runInputScript(4, _mouseButStat, 1); } else if (_mouseButStat & MBS_MOUSE_MASK) { |