[Scummvm-cvs-logs] CVS: scummvm/scumm input.cpp,2.6,2.7 verbs.cpp,1.113,1.114
Max Horn
fingolfin at users.sourceforge.net
Sun Nov 21 06:54:25 CET 2004
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31751
Modified Files:
input.cpp verbs.cpp
Log Message:
Fix for bug #1052660 (FOA: No keyboard shortcuts for dialogs) - moved hack enabling keyboard fights to allow controlling conversations via number keys again
Index: input.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/input.cpp,v
retrieving revision 2.6
retrieving revision 2.7
diff -u -d -r2.6 -r2.7
--- input.cpp 20 Nov 2004 23:49:10 -0000 2.6
+++ input.cpp 21 Nov 2004 14:48:17 -0000 2.7
@@ -75,17 +75,6 @@
} 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
Index: verbs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/verbs.cpp,v
retrieving revision 1.113
retrieving revision 1.114
diff -u -d -r1.113 -r1.114
--- verbs.cpp 30 Sep 2004 22:39:12 -0000 1.113
+++ verbs.cpp 21 Nov 2004 14:48:17 -0000 1.114
@@ -297,6 +297,20 @@
}
}
}
+
+ 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) {
More information about the Scummvm-git-logs
mailing list