Update of /cvsroot/netrek/client/netrekxp/src
In directory sc8-pr-cvs16:/tmp/cvs-serv14959/src

Modified Files:
	input.c mswindow.c 
Log Message:
Added functionality to arrow pad.  Left and right arrow now turn left
and right by 1/16th of a turn, and up and down arrow are +/-1 warp.
Two new key functions, control+[ and control+] to handle the new
turn key actions.  To turn effectively, one has to hold down the turn
key, however if any other keyboard key is pressed during that time,
it cancels the key repeat on the turn key, making keyboard turning
awkward at best.  Completely useless at worst.  Does provide the
ability to move without a mouse however.  Still need the mouse to
aim however.

Index: input.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/input.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- input.c	9 Apr 2007 11:07:20 -0000	1.35
+++ input.c	14 Apr 2007 07:44:35 -0000	1.36
@@ -261,9 +261,9 @@
     emptyKey,                   /* 31 */
     emptyKey,                   /* 31 */
     emptyKey,                   /* 31 */
+    Key187,                     /* ^[ */
     emptyKey,                   /* 31 */
-    emptyKey,                   /* 31 */
-    emptyKey,                   /* 31 */
+    Key189,                     /* ^] */
     emptyKey,                   /* 31 */
     emptyKey,                   /* 31 */
     emptyKey,                   /* 31 */
@@ -3538,6 +3538,38 @@
 }
 
 /******************************************************************************/
+/***  Key187() - turn left 1/16 turn                                        ***/
+/******************************************************************************/
+void
+Key187 (void)
+{
+    unsigned char course;
+
+    /* Observers can't turn */
+    if (me->p_flags & PFOBSERV) return;
+
+    course = (unsigned char) (me->p_dir - 16);
+    set_course (course);
+    me->p_flags &= ~(PFPLOCK | PFPLLOCK);
+}
+
+/******************************************************************************/
+/***  Key189() - turn right 1/16 turn                                       ***/
+/******************************************************************************/
+void
+Key189 (void)
+{
+    unsigned char course;
+
+    /* Observers can't turn */
+    if (me->p_flags & PFOBSERV) return;
+
+    course = (unsigned char) (me->p_dir + 16);
+    set_course (course);
+    me->p_flags &= ~(PFPLOCK | PFPLLOCK);
+}
+
+/******************************************************************************/
 /***  Key193()                                                              ***/
 /******************************************************************************/
 void

Index: mswindow.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -d -r1.72 -r1.73
--- mswindow.c	14 Apr 2007 05:14:23 -0000	1.72
+++ mswindow.c	14 Apr 2007 07:44:35 -0000	1.73
@@ -820,6 +820,10 @@
     }
     VKMap[VK_ESCAPE] = 27;      // 27 is mapped as Ctrl-[ by Windows
     VKMap[VK_TAB] = (char) 201; //'i'+96;     // Make it look like '^i' so macroKey: TAB will work
+    VKMap[VK_UP] = '>'; // accelerate
+    VKMap[VK_DOWN] = '<'; // decelerate
+    VKMap[VK_LEFT] = 187; // turn left ^[
+    VKMap[VK_RIGHT] = 189; // turn right ^]
     VKMap[VK_NUMPAD0] = '0';    // I want to use Numeric Keypad!
     VKMap[VK_NUMPAD1] = '1';    // Added these mappings SRS 4/10/98
     VKMap[VK_NUMPAD2] = '2';