Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv28441/src Modified Files: dashboard.c defaults.c inform.c input.c newwin.c option.c playerlist.c short.c war.c Log Message: First of what will be several patches recoding Paradise-2000 features. Support for AT ship in playerlist and info window (shows 'AT' instead of '??') Improved explanation of keymap/buttonmap in the netrekrc Main window titlebar now shows your loginname and slot number, in addition to showing the servername New dashboard message for warp 0 ("Stopped") instead of saying "Impulse" War window now says "Re-program" instead of "Save" for changing war settings Added autowar settings to the options menu Index: dashboard.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/dashboard.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- dashboard.c 13 Dec 2006 23:39:33 -0000 1.16 +++ dashboard.c 14 Mar 2007 18:36:07 -0000 1.17 @@ -362,11 +362,18 @@ msgtype = 4; color = W_White; } + /* Ship stopped */ + else if (me->p_speed == 0) + { + sprintf (buf, "Stopped"); + msgtype = 5; + color = W_Grey; + } /* Default impulse text */ else { sprintf (buf, "Impulse"); - msgtype = 5; + msgtype = 6; color = W_Yellow; } Index: newwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/newwin.c,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- newwin.c 11 Mar 2007 22:15:58 -0000 1.51 +++ newwin.c 14 Mar 2007 18:36:07 -0000 1.52 @@ -1402,7 +1402,14 @@ updatedeath (); if (remap[me->p_team] == NOBODY) - RedrawPlayerList (); /* When you first login */ + { + /* When you first login */ + char buf[80]; + + RedrawPlayerList (); + sprintf (buf, "Netrek - %s(%c)@%s", me->p_name, me->p_mapchars[1], serverName); + W_RenameWindow (baseWin, buf); + } else UpdatePlayerList (); /* Otherwise */ Index: input.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/input.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- input.c 28 Feb 2007 12:21:50 -0000 1.26 +++ input.c 14 Mar 2007 18:36:07 -0000 1.27 @@ -624,36 +624,36 @@ case 'c': buttonmap[12] = getctrlkey (&str); break; - case 'd': - buttonmap[13] = getctrlkey (&str); - break; - case 'e': - buttonmap[14] = getctrlkey (&str); - break; - case 'f': - buttonmap[15] = getctrlkey (&str); - break; - case 'g': - buttonmap[16] = getctrlkey (&str); - break; - case 'h': - buttonmap[17] = getctrlkey (&str); - break; - case 'i': - buttonmap[18] = getctrlkey (&str); - break; - case 'j': - buttonmap[19] = getctrlkey (&str); - break; - case 'k': - buttonmap[20] = getctrlkey (&str); - break; - case 'l': - buttonmap[21] = getctrlkey (&str); - break; - case 'm': - buttonmap[22] = getctrlkey (&str); - break; + case 'd': + buttonmap[13] = getctrlkey (&str); + break; + case 'e': + buttonmap[14] = getctrlkey (&str); + break; + case 'f': + buttonmap[15] = getctrlkey (&str); + break; + case 'g': + buttonmap[16] = getctrlkey (&str); + break; + case 'h': + buttonmap[17] = getctrlkey (&str); + break; + case 'i': + buttonmap[18] = getctrlkey (&str); + break; + case 'j': + buttonmap[19] = getctrlkey (&str); + break; + case 'k': + buttonmap[20] = getctrlkey (&str); + break; + case 'l': + buttonmap[21] = getctrlkey (&str); + break; + case 'm': + buttonmap[22] = getctrlkey (&str); + break; #endif /* SHIFTED_MOUSE */ default: Index: short.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/short.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- short.c 26 Feb 2007 06:54:49 -0000 1.16 +++ short.c 14 Mar 2007 18:36:08 -0000 1.17 @@ -222,7 +222,7 @@ char no_memory[] = { "Not enough memory for warning string!" }; /* For INL Server */ -char *shiptype[NUM_TYPES] = { "SC", "DD", "CA", "BB", "AS", "SB", "??" }; +char *shiptype[NUM_TYPES] = { "SC", "DD", "CA", "BB", "AS", "SB", "AT" }; int spwinside = 500; /* WINSIDE from Server */ #define SPWINSIDE 500 /* To make it safe */ Index: playerlist.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/playerlist.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- playerlist.c 21 Feb 2007 15:17:07 -0000 1.10 +++ playerlist.c 14 Mar 2007 18:36:07 -0000 1.11 @@ -107,7 +107,7 @@ static int plistWidth = 0; static int plist2Width = 0; static char *my_classes[NUM_TYPES] = - { "SC", "DD", "CA", "BB", "AS", "SB", "GA", "??" }; + { "SC", "DD", "CA", "BB", "AS", "SB", "GA", "AT" }; /* Local Functions */ Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- defaults.c 13 Mar 2007 18:35:00 -0000 1.54 +++ defaults.c 14 Mar 2007 18:36:07 -0000 1.55 @@ -2010,40 +2010,7 @@ if (saveBig) fputs ("\n", fp); } - - // Let's print buttonmap - str[0] = '\0'; - str1[0] = '\0'; - -#ifdef SHIFTED_MOUSE - for (i = W_LBUTTON; i <= W_XBUTTON2_4; i++) -#else - for (i = W_LBUTTON; i <= W_WHEELDOWN; i++) -#endif - { - if (buttonmap[i] != 0) - { - c = getkeyfromctrl (buttonmap[i]); - if (c == '^') - sprintf (str, "%c^^", getcharfromdec (i)); - else - sprintf (str, "%c%c", getcharfromdec (i), getkeyfromctrl (buttonmap[i])); - strcat (str1, str); - } - } - if (saveBig && strlen (str1) != 0) - fputs ("# Mouse button mapping\n", fp); - if (strlen (str1) != 0) - { - strcpy (str, "buttonmap: "); - strcat (str, str1); - strcat (str, "\n"); - fputs (str, fp); - } - if (saveBig && strlen (str1) != 0) - fputs ("\n", fp); - // keymap part // we're going to print only keymap that differs from standard one // we have to start from second key, because first one is space @@ -2072,7 +2039,16 @@ strcat (str, str1); } if (saveBig && strlen (str) != 0) + { fputs ("# Key mapping\n", fp); + fputs ("# Define you keymap here. The format is newkey defaultkey. For example, the\n", fp); + fputs ("# default key for shield toggle is 's', if you want to remap shield toggle to\n", fp); + fputs ("# 'q', you would put 'qs' in your keymap. Shields would still be mapped to\n", fp); + fputs ("# 's' as well as now being on 'q'. Adding a mapping doesn't delete the old\n", fp); + fputs ("# one. If you want shields on 'w' as well, put 'ws' in your keymap. If you\n", fp); + fputs ("# had instead put 'wq', it would have mapped quit, the default action of 'q',\n", fp); + fputs ("# onto 'w'.\n", fp); + } if (strlen (str) != 0) { strcpy (str1, "keymap: "); @@ -2083,6 +2059,50 @@ if (saveBig && strlen (str) != 0) fputs ("\n", fp); + // Let's print buttonmap + str[0] = '\0'; + str1[0] = '\0'; + +#ifdef SHIFTED_MOUSE + for (i = W_LBUTTON; i <= W_XBUTTON2_4; i++) +#else + for (i = W_LBUTTON; i <= W_WHEELDOWN; i++) +#endif + { + if (buttonmap[i] != 0) + { + c = getkeyfromctrl (buttonmap[i]); + if (c == '^') + sprintf (str, "%c^^", getcharfromdec (i)); + else + sprintf (str, "%c%c", getcharfromdec (i), getkeyfromctrl (buttonmap[i])); + strcat (str1, str); + } + } + + if (saveBig && strlen (str1) != 0) + { + fputs ("# Mouse button mapping\n", fp); + fputs ("# Button map lets you map the mouse buttons. Unfortunately, it works in a\n", fp); + fputs ("# different way than keymap. The format is <mousebutton> <key>. To map\n", fp); + fputs ("# shields onto button 1 (the left one), you would put '1s' in your keymap.\n", fp); + fputs ("# The buttonmap works through the keymap, so if you have shields mapped to\n", fp); + fputs ("# 'q', putting '1q' would make button 1 shields and not quit. Buttons 4 and\n", fp); + fputs ("# 5 are support for Microsoft Xbuttons. If you have a wheel mouse, the up\n", fp); + fputs ("# wheel is button 6 and the down wheel is button 7. There is also support\n", fp); + fputs ("# for shifted, controled, and control-shifted mouse actions, see the netrek\n", fp); + fputs ("# help file for more details.\n", fp); + } + if (strlen (str1) != 0) + { + strcpy (str, "buttonmap: "); + strcat (str, str1); + strcat (str, "\n"); + fputs (str, fp); + } + if (saveBig && strlen (str1) != 0) + fputs ("\n", fp); + // macroKey if (strlen (macroKey) == 0) { Index: war.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/war.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- war.c 13 Dec 2006 00:00:00 -0000 1.3 +++ war.c 14 Mar 2007 18:36:08 -0000 1.4 @@ -36,7 +36,7 @@ static char *roms = "ROM - "; static char *klis = "KLI - "; static char *oris = "ORI - "; -static char *gos = " Save"; +static char *gos = " Re-program"; static char *exs = " Exit - no change"; static char *peaces = "Peace"; Index: inform.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/inform.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- inform.c 16 May 2006 05:10:13 -0000 1.3 +++ inform.c 14 Mar 2007 18:36:07 -0000 1.4 @@ -33,7 +33,7 @@ * care to keep it from extending beyond the main * window boundaries. */ static char *my_classes[NUM_TYPES] = { - "SC", "DD", "CA", "BB", "AS", "SB", "GA", "??" + "SC", "DD", "CA", "BB", "AS", "SB", "GA", "AT" }; /******************************************************************************/ Index: option.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/option.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- option.c 2 Mar 2007 12:57:54 -0000 1.32 +++ option.c 14 Mar 2007 18:36:07 -0000 1.33 @@ -168,6 +168,11 @@ "Show New color bitmaps on galactic map", "" }; +static char *autowarmess[] = { "Don't auto set war declarations", + "Set war with nonzero player teams", + "Set war with largest enemy team", + "" +}; /* Only one of op_option, op_targetwin, and op_string should be defined. If * op_string is defined, op_size should be too and op_text is used without a * "Don't" prefix. if op_range is defined, there should be a %d in op_text @@ -300,6 +305,7 @@ {0, "Control Menu", &MenuPage, 0, 0, 0, NULL, &Menus_Range}, {1, "Page %d (click to change)", &MenuPage, 0, 0, 0, NULL, &Menus_Range}, {1, "stay peaceful when reborn", &keepPeace, 0, 0, 0, NULL, NULL}, + {1, "", &autoSetWar, 0, 0, 0, autowarmess, NULL}, {1, "use new distress", &newDistress, 0, 0, 0, NULL, NULL}, #ifdef MOTION_MOUSE {1, "use continuous mouse", &continuousMouse, 0, 0, 0, NULL, NULL},