[Scummvm-cvs-logs] SF.net SVN: scummvm: [27678] scummvm/trunk/engines/scumm/input.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sat Jun 23 18:51:07 CEST 2007


Revision: 27678
          http://scummvm.svn.sourceforge.net/scummvm/?rev=27678&view=rev
Author:   fingolfin
Date:     2007-06-23 09:51:06 -0700 (Sat, 23 Jun 2007)

Log Message:
-----------
More cleanup

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/input.cpp

Modified: scummvm/trunk/engines/scumm/input.cpp
===================================================================
--- scummvm/trunk/engines/scumm/input.cpp	2007-06-23 16:46:00 UTC (rev 27677)
+++ scummvm/trunk/engines/scumm/input.cpp	2007-06-23 16:51:06 UTC (rev 27678)
@@ -87,29 +87,30 @@
 				else
 					_keyPressed = event.kbd;	// Normal key press, pass on to the game.
 			} else if (event.kbd.flags & Common::KBD_ALT) {
-				// The result must be 273 for Alt-W
-				// because that's what MI2 looks for in
-				// its "instant win" cheat.
-				// FIXME: Handle this specific property inside processKeyboard ?
+				// Handle KBD_ALT combos. We know that the result must be 273 for Alt-W
+				// because that's what MI2 looks for in its "instant win" cheat.
+
+				// FIXME: Handle this specific property of MI2 inside processKeyboard ?
 				_keyPressed = event.kbd;
 				_keyPressed.ascii = event.kbd.keycode + 154;
-			} else if (event.kbd.keycode < Common::KEYCODE_UP || event.kbd.keycode > Common::KEYCODE_LEFT || _game.version >= 7) {
-				// FIXME: Handle this specific property inside processKeyboard ?
-
-				// don't let game have arrow keys as we currently steal them
-				// for keyboard cursor control
-				// this fixes bug with up arrow (273) corresponding to
-				// "instant win" cheat in MI2 mentioned above
-				//
-				// This is not applicable to Full Throttle as it processes keyboard
-				// cursor control by itself. Also it fixes derby scene
-				_keyPressed = event.kbd;	// Normal key press, pass on to the game.
+			} else {
+				// Normal key press, pass on to the game.
+				_keyPressed = event.kbd;
 			}
 
-			if (_game.id == GID_MONKEY && _game.platform == Common::kPlatformSegaCD) {
-				if (event.kbd.keycode >= Common::KEYCODE_UP && event.kbd.keycode <= Common::KEYCODE_LEFT) {
+			if (event.kbd.keycode >= Common::KEYCODE_UP && event.kbd.keycode <= Common::KEYCODE_LEFT) {
+				if (_game.id == GID_MONKEY && _game.platform == Common::kPlatformSegaCD) {
 					_keyPressed = event.kbd;
 					_keyPressed.ascii = event.kbd.ascii - Common::KEYCODE_UP + 54;
+				} else if (_game.version < 7) {
+					// FIXME: Handle this specific property inside processKeyboard ?
+	
+					// Don't let game see arrow keys. This fixes bug with up arrow (273)
+					// corresponding to the "instant win" cheat in MI2 mentioned above.
+					//
+					// This is not applicable to V7+ games, which need to see the arrow keys,
+					// too, else certain things (derby scene, asterorid lander) won't work.
+					_keyPressed.reset();
 				}
 			}
 
@@ -363,7 +364,7 @@
 			lastKeyHit = Common::KeyState(Common::KEYCODE_F5, 319);
 		}
 	
-		// Alt-F5 brings up the original save/load dialog
+		// Alt-F5 should bring up the original save/load dialog, so map it to F1.
 		if (lastKeyHit.keycode == Common::KEYCODE_F5 && lastKeyHit.flags == Common::KBD_ALT) {
 			lastKeyHit = Common::KeyState(Common::KEYCODE_F1, 315);
 		}


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list