[Scummvm-cvs-logs] SF.net SVN: scummvm:[41155] scummvm/trunk/engines/sci

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Thu Jun 4 10:28:20 CEST 2009


Revision: 41155
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41155&view=rev
Author:   thebluegr
Date:     2009-06-04 08:28:20 +0000 (Thu, 04 Jun 2009)

Log Message:
-----------
Reordered the numpad keys so that they make more sense, and simplified the code which returns the values of shifted function keys

Modified Paths:
--------------
    scummvm/trunk/engines/sci/gfx/operations.cpp
    scummvm/trunk/engines/sci/uinput.h

Modified: scummvm/trunk/engines/sci/gfx/operations.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/operations.cpp	2009-06-04 08:25:48 UTC (rev 41154)
+++ scummvm/trunk/engines/sci/gfx/operations.cpp	2009-06-04 08:28:20 UTC (rev 41155)
@@ -1326,28 +1326,8 @@
 		}
 	}
 
-	switch (c) {
-	case SCI_K_F1 :
-		return SCI_K_SHIFT_F1;
-	case SCI_K_F2 :
-		return SCI_K_SHIFT_F2;
-	case SCI_K_F3 :
-		return SCI_K_SHIFT_F3;
-	case SCI_K_F4 :
-		return SCI_K_SHIFT_F4;
-	case SCI_K_F5 :
-		return SCI_K_SHIFT_F5;
-	case SCI_K_F6 :
-		return SCI_K_SHIFT_F6;
-	case SCI_K_F7 :
-		return SCI_K_SHIFT_F7;
-	case SCI_K_F8 :
-		return SCI_K_SHIFT_F8;
-	case SCI_K_F9 :
-		return SCI_K_SHIFT_F9;
-	case SCI_K_F10 :
-		return SCI_K_SHIFT_F10;
-	}
+	if (c >= SCI_K_F1 && c <= SCI_K_F10)
+		return c + 25;
 
 	return c;
 }
@@ -1488,7 +1468,7 @@
 				// SCI_K_SHIFT_F1 == 84 << 8
 				input.data = SCI_K_F1 + ((input.data - Common::KEYCODE_F1)<<8);
 				if (input.buckybits & (SCI_EVM_LSHIFT | SCI_EVM_RSHIFT))
-					input.character = input.data + SCI_K_SHIFT_F1 - SCI_K_F1;
+					input.character = input.data + 25;
 				else
 					input.character = input.data;
 			} else {

Modified: scummvm/trunk/engines/sci/uinput.h
===================================================================
--- scummvm/trunk/engines/sci/uinput.h	2009-06-04 08:25:48 UTC (rev 41154)
+++ scummvm/trunk/engines/sci/uinput.h	2009-06-04 08:28:20 UTC (rev 41155)
@@ -72,17 +72,20 @@
 #define SCI_K_TAB '\t'
 #define SCI_K_SHIFT_TAB (0xf << 8)
 
-#define SCI_K_END (79 << 8)
-#define SCI_K_DOWN (80 << 8)
-#define SCI_K_PGDOWN (81 << 8)
-#define SCI_K_LEFT (75 << 8)
-#define SCI_K_CENTER (76 << 8)
-#define SCI_K_RIGHT (77 << 8)
-#define SCI_K_HOME (71 << 8)
-#define SCI_K_UP (72 << 8)
-#define SCI_K_PGUP (73 << 8)
-#define SCI_K_INSERT (82 << 8)
-#define SCI_K_DELETE (83 << 8)
+#define SCI_K_HOME (71 << 8)	// 7
+#define SCI_K_UP (72 << 8)		// 8
+#define SCI_K_PGUP (73 << 8)	// 9
+//
+#define SCI_K_LEFT (75 << 8)	// 4 
+#define SCI_K_CENTER (76 << 8)	// 5
+#define SCI_K_RIGHT (77 << 8)	// 6
+//
+#define SCI_K_END (79 << 8)		// 1
+#define SCI_K_DOWN (80 << 8)	// 2
+#define SCI_K_PGDOWN (81 << 8)	// 3
+//
+#define SCI_K_INSERT (82 << 8)	// 0
+#define SCI_K_DELETE (83 << 8)	// .
 
 #define SCI_K_F1 (59<<8)
 #define SCI_K_F2 (60<<8)
@@ -95,17 +98,6 @@
 #define SCI_K_F9 (67<<8)
 #define SCI_K_F10 (68<<8)
 
-#define SCI_K_SHIFT_F1 (84<<8)
-#define SCI_K_SHIFT_F2 (85<<8)
-#define SCI_K_SHIFT_F3 (86<<8)
-#define SCI_K_SHIFT_F4 (87<<8)
-#define SCI_K_SHIFT_F5 (88<<8)
-#define SCI_K_SHIFT_F6 (89<<8)
-#define SCI_K_SHIFT_F7 (90<<8)
-#define SCI_K_SHIFT_F8 (91<<8)
-#define SCI_K_SHIFT_F9 (92<<8)
-#define SCI_K_SHIFT_F10 (93<<8)
-
 /*Values for buckybits */
 #define SCI_EVM_RSHIFT          (1<<0)
 #define SCI_EVM_LSHIFT          (1<<1)


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