Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv8178/src Modified Files: data.c defaults.c docwin.c feature.c helpwin.c local.c main.c map.c option.c parsemeta.c playback.c sound.c Log Message: The default configuration file has been changed from netrekrc to netrekrc.txt to make life easier on Windows users. Extensionless filenames are a unix artifact and it's just for the better this way, in the long run. Moved netrekrc.txt file from docs folder to a new folder called netrekrc, just makes for easier/more logical build routine. Previously, text files in the same source docs folder were copied to different destination folders. Now each source folder only has items that get sent to the same destination folder. Cambot playback speed 9 is now halfway between speed 8 and max speed, to provide a finer control over speed at the highest playback speeds. Of course > and < work just fine too. Default playback speed now assumes 10 updates/sec instead of 6.5/sec. Double buffering now used for cambot playback. Fixes the issue with border redraw so that's turned back on too. Moved cambot playback delay variable pbdelay from local to global, so that receiving a FPS feature packet will set the playback speed. Index: sound.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/sound.c,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- sound.c 10 Apr 2007 05:43:45 -0000 1.40 +++ sound.c 14 May 2007 02:56:42 -0000 1.41 @@ -91,7 +91,7 @@ for (i=0; i < NUM_WAVES; i++) { if (!sounds[i]) { - LineToConsole("Mix_LoadWAV sounds[%d] could not be loaded. Check soundDir in your .netrekrc: %s\n", i, Mix_GetError()); + LineToConsole("Mix_LoadWAV sounds[%d] could not be loaded. Check soundDir in your netrekrc.txt: %s\n", i, Mix_GetError()); return(-1); } } @@ -117,7 +117,7 @@ for (i=0; i < NUM_MUSIC; i++) { if (!music[i]) { - LineToConsole("Mix_LoadMUS music[%d] could not be loaded. Check soundDir in your .netrekrc: %s\n", i, Mix_GetError()); + LineToConsole("Mix_LoadMUS music[%d] could not be loaded. Check soundDir in your netrekrc.txt: %s\n", i, Mix_GetError()); return(-1); } } Index: main.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/main.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- main.c 12 May 2007 20:26:58 -0000 1.13 +++ main.c 14 May 2007 02:56:41 -0000 1.14 @@ -279,7 +279,7 @@ servertmp = argv[i + 1]; if (metablock(servertmp)) { - LineToConsole ("Default logins not welcome there, please edit your netrekrc file and add a 'login: yourhandle' line\n"); + LineToConsole ("Default logins not welcome there, please edit your netrekrc.txt file and add a 'login: yourhandle' line\n"); exit (0); } usemeta = 0; Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.100 retrieving revision 1.101 diff -u -d -r1.100 -r1.101 --- local.c 14 Apr 2007 09:49:35 -0000 1.100 +++ local.c 14 May 2007 02:56:41 -0000 1.101 @@ -2733,12 +2733,8 @@ /* Force a border redraw? Bitmaps rotated realtime as well as viewRange circles will overwrite the border. Since it is very CPU expensive to write rectangles (drawborder function) to the active window, especially if double - buffering is off, let's slow down redraws to at most 10 per second. - Turned off during playback due to excessive CPU usage. */ + buffering is off, let's slow down redraws to at most 10 per second. */ else -#ifdef RECORDGAME - if (!playback) -#endif { static int border_refresh = 0; @@ -2858,13 +2854,8 @@ Draw out the 'tactical' map */ { -#ifdef RECORDGAME - if (doubleBuffering && !inplayback) - W_Win2Mem (localSDB); -#else if (doubleBuffering) W_Win2Mem (localSDB); -#endif clearLocal (); /* Keep redrawing for double buffered observers who get set out of normal gameplay bounds, @@ -2895,13 +2886,9 @@ weaponUpdate = 0; DrawMisc (); -#ifdef RECORDGAME - if (doubleBuffering && !inplayback) - W_Mem2Win (localSDB); -#else if (doubleBuffering) W_Mem2Win (localSDB); -#endif + /* Fade all sounds on quit */ if (me->p_whydead == KQUIT && me->p_status == PEXPLODE) Mix_FadeOutChannel(-1, 1000); Index: playback.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/playback.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- playback.c 5 Apr 2007 12:57:22 -0000 1.20 +++ playback.c 14 May 2007 02:56:41 -0000 1.21 @@ -44,8 +44,6 @@ extern jmp_buf env; -int pbdelay = 150; - struct player dummyme; struct player *packetsme; @@ -359,6 +357,8 @@ Play_Sound(ENTER_SHIP_WAV, SF_INFO); #endif + ingame = 1; + while (1) { #ifdef BRMH @@ -422,6 +422,8 @@ pbdelay = 6; break; case '9': + pbdelay = 3; + break; case '#': case '!': case '@': @@ -433,6 +435,8 @@ break; case '>': pbdelay *= 2; + if (pbdelay == 0) + pbdelay = 3; if (pbdelay > 600) pbdelay = 600; break; @@ -511,6 +515,7 @@ case SP_S_PHASER: case SP_S_KILLS: case SP_S_STATS: + case SP_FEATURE: return 1; } Index: option.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/option.c,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- option.c 14 Apr 2007 02:56:19 -0000 1.48 +++ option.c 14 May 2007 02:56:41 -0000 1.49 @@ -379,7 +379,7 @@ {1, "show xtrekrc defaults window", 0, &defWin, 0, 0, NULL, NULL}, #endif #ifdef DOC_WIN - {1, "show netrekrc", 0, &xtrekrcwin, 0, 0, NULL, NULL}, + {1, "show netrekrc.txt", 0, &xtrekrcwin, 0, 0, NULL, NULL}, {1, "show documentation window", 0, &docwin, 0, 0, NULL, NULL}, #endif #ifdef TOOLS Index: docwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/docwin.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- docwin.c 13 Apr 2007 07:52:41 -0000 1.6 +++ docwin.c 14 May 2007 02:56:40 -0000 1.7 @@ -318,7 +318,7 @@ filename[0] = '\0'; - if (!findfile ("netrekrc", filename) && !findfile ("xtrekrc", filename)) + if (!findfile ("netrekrc.txt", filename) && !findfile ("netrekrc", filename)) return; if ((fptr = fopen (filename, "r")) == NULL) Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.90 retrieving revision 1.91 diff -u -d -r1.90 -r1.91 --- data.c 28 Apr 2007 12:09:51 -0000 1.90 +++ data.c 14 May 2007 02:56:40 -0000 1.91 @@ -175,6 +175,7 @@ * here */ int playback = 0; int inplayback = 0; +int pbdelay = 100; /* default sleep time in ms */ #endif FILE *logFile = NULL; /* log messages to this file */ Index: feature.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/feature.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- feature.c 25 Apr 2007 07:21:50 -0000 1.17 +++ feature.c 14 May 2007 02:56:40 -0000 1.18 @@ -192,6 +192,9 @@ } if (strcmpi(packet->name, "UPS") == 0 && value != -1) { lastUpdateSpeed = updatesPerSec = server_ups = value; +#ifdef RECORDGAME + pbdelay = 100 * 10 / server_ups; +#endif LineToConsole("Server actually sending %d updates per second.\n", value); return; } Index: parsemeta.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/parsemeta.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- parsemeta.c 17 Mar 2007 17:12:09 -0000 1.37 +++ parsemeta.c 14 May 2007 02:56:41 -0000 1.38 @@ -1176,7 +1176,7 @@ if (!metaCache) { - LineToConsole ("You must define the netrekrc variable `metaCache' in\n"); + LineToConsole ("You must define the netrekrc.txt variable `metaCache' in\n"); LineToConsole ("order to use the `show known servers' option.\n"); return 0; } Index: helpwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/helpwin.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- helpwin.c 17 Apr 2007 07:48:50 -0000 1.9 +++ helpwin.c 14 May 2007 02:56:40 -0000 1.10 @@ -177,11 +177,11 @@ "6 Set playback speed", "7 Set playback speed", "8 Set playback speed", - "9 Set playback speed (fast)", - "! Set playback speed (as 9)", - "@ Set playback speed (as 9)", - "% Set playback speed (as 9)", - "# Set playback speed (as 9)", + "9 Set playback speed", + "! Set playback speed (fastest)", + "@ Set playback speed (as !)", + "% Set playback speed (as !)", + "# Set playback speed (as !)", "< Speed up playback", "> Speed down playback", "R Start from the beginning", Index: map.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- map.c 25 Apr 2007 06:50:43 -0000 1.54 +++ map.c 14 May 2007 02:56:41 -0000 1.55 @@ -856,13 +856,9 @@ int view = TWINSIDE * scaleFactor / 2; int mvx, mvy; -#ifdef RECORDGAME - if (doubleBuffering && !inplayback) - W_Win2Mem (mapSDB); -#else if (doubleBuffering) W_Win2Mem (mapSDB); -#endif + clearMap (); if (GWINSIDE == 0) @@ -1449,13 +1445,8 @@ } } -#ifdef RECORDGAME - if (doubleBuffering && !inplayback) - W_Mem2Win (mapSDB); -#else if (doubleBuffering) W_Mem2Win (mapSDB); -#endif } Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.84 retrieving revision 1.85 diff -u -d -r1.84 -r1.85 --- defaults.c 12 May 2007 20:26:58 -0000 1.84 +++ defaults.c 14 May 2007 02:56:40 -0000 1.85 @@ -171,8 +171,8 @@ { "Allow switching of ship bitmaps in game. With this option disabled", "not all bitmaps load into memory. This option is thus not changeable", - "in game. Do not attempt to edit your netrekrc to turn dynamic bitmaps", - "on and then reload the netrekrc with the & key - restart the client instead.", + "in game. Do not attempt to edit your netrekrc.txt to turn dynamic bitmaps", + "on and then reload netrekrc.txt with the & key - restart the client instead.", NULL } }, @@ -1694,18 +1694,18 @@ { /* Check base names */ - if (findfile (NETREKRC, file)) - return 1; - if (findfile (NETREKRCTXT, file)) return 1; - if (findfile (XTREKRC, file)) + if (findfile (NETREKRC, file)) return 1; if (findfile (XTREKRCTXT, file)) return 1; + if (findfile (XTREKRC, file)) + return 1; + #ifdef SYSTEM_DEFAULTFILE /* now try for a system default defaults file */ if (findfile (SYSTEM_DEFAULTFILE, file)) @@ -2170,7 +2170,7 @@ if (!saveFile) { saveFile = (char *) malloc (sizeof (char) * 13); - sprintf (saveFile, "%s", "netrekrc"); + sprintf (saveFile, "%s", "netrekrc.txt"); } exe_dir = GetExeDir ();