From modemhero at users.sourceforge.net Fri Jan 12 12:06:58 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 12 Jan 2007 18:06:58 +0000 Subject: [netrek-cvs] client/netrekxp/src mswindow.c,1.39,1.40 Message-ID: <20070112180707.34C75B3F6@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv1224/src Modified Files: mswindow.c Log Message: Documentation/todo list updates. Fix to message window bug - if a message window was unmapped, but it received a message of greater than half window height (i.e. an all board macro when all board isn't mapped, due to user instead using the all in one review window), the call to UpdateWindow was not painting the unmapped window, thus the added string count was not decremented, thus the program was trying to repeatedly trying and failing to redraw/flush the unmapped window. Thus it seems best to just go through the normal flush function for these unmapped windows, rather than break out of the function early in hopes the redraw scrolling function gets called. Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- mswindow.c 29 Nov 2006 13:06:41 -0000 1.39 +++ mswindow.c 12 Jan 2007 18:06:55 -0000 1.40 @@ -4554,8 +4554,8 @@ win->AddedStrings = 0; return; } - //Do full redraw if faster - if (win->AddedStrings > (win->TextHeight / 2)) + //Do full redraw if faster, only works for mapped windows + if (win->AddedStrings > (win->TextHeight / 2) && W_IsMapped(window)) { InvalidateRect (win->hwnd, NULL, FALSE); UpdateWindow (win->hwnd); //Generates paint msg, which calls RedrawScrolling @@ -5440,7 +5440,7 @@ int x, y, width, height; int result, scrollpos; - FNHEADER_VOID; + FNHEADER_VOID; loc.length = sizeof (WINDOWPLACEMENT); /* Have to set this */ From modemhero at users.sourceforge.net Fri Jan 12 12:06:57 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 12 Jan 2007 18:06:57 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C, 1.88, 1.89 clientr.suo, 1.55, 1.56 Message-ID: <20070112180709.73DA2B3FC@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv1224 Modified Files: NetrekXP to do list.C clientr.suo Log Message: Documentation/todo list updates. Fix to message window bug - if a message window was unmapped, but it received a message of greater than half window height (i.e. an all board macro when all board isn't mapped, due to user instead using the all in one review window), the call to UpdateWindow was not painting the unmapped window, thus the added string count was not decremented, thus the program was trying to repeatedly trying and failing to redraw/flush the unmapped window. Thus it seems best to just go through the normal flush function for these unmapped windows, rather than break out of the function early in hopes the redraw scrolling function gets called. Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.88 retrieving revision 1.89 diff -u -d -r1.88 -r1.89 --- NetrekXP to do list.C 21 Dec 2006 13:48:21 -0000 1.88 +++ NetrekXP to do list.C 12 Jan 2007 18:06:54 -0000 1.89 @@ -3,7 +3,6 @@ which then maps windows accordingly. 2) fix netrekrc append so that it doesn't keep adding new lines to the netrekrc 3) Get source code for installer from Joe. -4) Add a Cambot playback and Cambot record shortcut links to the installation package. Things not gonna happen, or server problems: 2) torp_other and plasma_other not working right due to lack of torp fuse info @@ -40,13 +39,14 @@ down there at bottom of screen. Apprently the native windows function doesn't properly scroll text that is outside the viewable window. 6) Pop-up dialog box for bad version response -7) new UDP metaserver code has 2 problems -Possible corruption with loading/saving metacache -Possible that status field not updating due to refresh not happening when it should +7) new UDP metaserver code has issue if 2nd metaserver responding has more servers, can be +awkward to resize window if user going to click on a server 8) Fix generic_32 size check 9) Some sort of click action on player list brings up a menu with settings for that player's candock, cantranswarp, ban, ignore, etc. 10) add auto guest# name generation for INL server +11) Maybe fix galactic new planet bitmap redraw sequence, caused incredible lag on a P166 +Win98 xp computer Stas's list: - color coded playerlist. Index: clientr.suo =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.suo,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 Binary files /tmp/cvs67luy2 and /tmp/cvsdSrRcP differ From modemhero at users.sourceforge.net Fri Jan 12 12:06:57 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 12 Jan 2007 18:06:57 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs README for Win95, Win98, and WinME.TXT, 1.5, 1.6 Message-ID: <20070112180707.38EB828EF8@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv1224/resources/docs Modified Files: README for Win95, Win98, and WinME.TXT Log Message: Documentation/todo list updates. Fix to message window bug - if a message window was unmapped, but it received a message of greater than half window height (i.e. an all board macro when all board isn't mapped, due to user instead using the all in one review window), the call to UpdateWindow was not painting the unmapped window, thus the added string count was not decremented, thus the program was trying to repeatedly trying and failing to redraw/flush the unmapped window. Thus it seems best to just go through the normal flush function for these unmapped windows, rather than break out of the function early in hopes the redraw scrolling function gets called. Index: README for Win95, Win98, and WinME.TXT =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/README for Win95, Win98, and WinME.TXT,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- README for Win95, Win98, and WinME.TXT 23 Jun 2006 08:50:14 -0000 1.5 +++ README for Win95, Win98, and WinME.TXT 12 Jan 2007 18:06:55 -0000 1.6 @@ -1,8 +1,15 @@ The following options will NOT work with Windows 95/98/ME, due to the use of a native Windows transform function that was not added until Windows 2000: -newClock: on +newQuit: on colorClient: 4 +In addition on older, slow computers you may not want to use + +planetBitmapGalaxy: 3 + +as there are more frequent planet redraws on the galactic, and it may cause a +performance hit. + So in conclusion, don't have any of those above options in your netrekrc, and the client should work fine! \ No newline at end of file From modemhero at users.sourceforge.net Fri Jan 12 20:53:29 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 13 Jan 2007 02:53:29 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt,1.98,1.99 Message-ID: <20070113025341.D93AEB3F0@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv484/resources/docs Modified Files: changes.txt Log Message: Changing email address. Finalizing changes list and cleaning up todo list for release. Fix for messages that are printed outside viewable area - ScrollDC garbles scrolling in such cases, so instead we shall use a full window redraw if the window is beyond the client borders. Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.98 retrieving revision 1.99 diff -u -d -r1.98 -r1.99 --- changes.txt 21 Dec 2006 13:48:26 -0000 1.98 +++ changes.txt 13 Jan 2007 02:53:26 -0000 1.99 @@ -1,4 +1,6 @@ -Netrek XP 2006, Version 1.2: +Netrek XP 2006, Version 1.2: (Released Jan-2007) +- fixed several bugs relating to message windows, most noticeably, messages that are + printed off the viewable screen will no longer garble scrolling text - changed default metaStatusLevel from 3 to 2, so as not to include timed out servers - new engine sound that replaces the old static-like engine sound, the sound file is still not used in normal gameplay though @@ -8,7 +10,8 @@ - support for new server feature packet SP_GENERIC_32. This is a great upgrade to the server as it allows for future data to be sent in this packet (lots of empty room). Currently it sends your ship's repair time..removing the need for the client side repair time - calculation, which had several flaws and didn't work well with observers. + calculation, which had several flaws and didn't work well with observers. It also + sends info on which planet you are orbitting. - added "UseFullShipInfo: (on)/off" to choose whether to use short or long type packets for other player info. Default is on. This netrekrc setting controls whether the feature packet FULL_DIRECTION_RESOLUTION is used. From modemhero at users.sourceforge.net Fri Jan 12 20:53:29 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 13 Jan 2007 02:53:29 +0000 Subject: [netrek-cvs] client/netrekxp/win32 config.h,1.11,1.12 Message-ID: <20070113025341.EE02B28EFD@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/win32 In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv484/win32 Modified Files: config.h Log Message: Changing email address. Finalizing changes list and cleaning up todo list for release. Fix for messages that are printed outside viewable area - ScrollDC garbles scrolling in such cases, so instead we shall use a full window redraw if the window is beyond the client borders. Index: config.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/win32/config.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- config.h 21 May 2006 09:56:39 -0000 1.11 +++ config.h 13 Jan 2007 02:53:27 -0000 1.12 @@ -20,7 +20,7 @@ ################################################################################ */ -#define CBUGS "Send bugs/suggestion to: williamb at its.caltech.edu" +#define CBUGS "Send bugs/suggestion to: billbalcerski at hotmail.com" /* ################################################################################ From modemhero at users.sourceforge.net Fri Jan 12 20:53:29 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 13 Jan 2007 02:53:29 +0000 Subject: [netrek-cvs] client/netrekxp/src getname.c, 1.6, 1.7 mswindow.c, 1.40, 1.41 Message-ID: <20070113025341.ECBD128EFA@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv484/src Modified Files: getname.c mswindow.c Log Message: Changing email address. Finalizing changes list and cleaning up todo list for release. Fix for messages that are printed outside viewable area - ScrollDC garbles scrolling in such cases, so instead we shall use a full window redraw if the window is beyond the client borders. Index: getname.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/getname.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- getname.c 12 May 2006 01:58:37 -0000 1.6 +++ getname.c 13 Jan 2007 02:53:27 -0000 1.7 @@ -79,11 +79,11 @@ " No one takes responsibility for lost INL games etc.", " Use at your own risk! If you don't like it, don't use it.", "", - "Comments, suggestions, bugreports to: williamb at its.caltech.edu", + "Comments, suggestions, bugreports to: billbalcerski at hotmail.com", "", "Include version and architecture info in bug reports", "", - "Patches to: williamb at its.caltech.edu", + "Patches to: billbalcerski at hotmail.com", "", }; int i, length; Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- mswindow.c 12 Jan 2007 18:06:55 -0000 1.40 +++ mswindow.c 13 Jan 2007 02:53:27 -0000 1.41 @@ -4539,6 +4539,9 @@ struct stringList *p; int HiddenLines; int y; + int clipped = 0; + RECT r; + WINDOWPLACEMENT loc; FNHEADER_VOID; if (!win->AddedStrings) @@ -4546,6 +4549,8 @@ y = win->NumItems - win->TextHeight; y = max (0, y); + + loc.length = sizeof (WINDOWPLACEMENT); /* Have to set this */ // Just update scrollbar if we are looking back if ((y - win->AddedStrings) > GetScrollPos (win->hwnd, SB_VERT)) @@ -4554,12 +4559,22 @@ win->AddedStrings = 0; return; } - //Do full redraw if faster, only works for mapped windows - if (win->AddedStrings > (win->TextHeight / 2) && W_IsMapped(window)) + // For mapped windows, do full redraw if more than half of window content + // is changed, or if part of window is outside viewable area, because + // ScrollDC fails to properly scroll text in such cases + if (W_IsMapped(window)) { - InvalidateRect (win->hwnd, NULL, FALSE); - UpdateWindow (win->hwnd); //Generates paint msg, which calls RedrawScrolling - return; + GetWindowPlacement (win->hwnd, &loc); + GetWindowRect (((Window *) baseWin)->hwnd, &r); + if (loc.rcNormalPosition.left < r.left || loc.rcNormalPosition.right > r.right + || loc.rcNormalPosition.top < r.top || loc.rcNormalPosition.bottom > r.bottom) + clipped = 1; + if (win->AddedStrings > (win->TextHeight / 2) || clipped) + { + InvalidateRect (win->hwnd, NULL, FALSE); + UpdateWindow (win->hwnd); //Generates paint msg, which calls RedrawScrolling + return; + } } //Setup the HDC From modemhero at users.sourceforge.net Fri Jan 12 20:53:28 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 13 Jan 2007 02:53:28 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C, 1.89, 1.90 clientr.suo, 1.56, 1.57 Message-ID: <20070113025341.E9CEC28EF8@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv484 Modified Files: NetrekXP to do list.C clientr.suo Log Message: Changing email address. Finalizing changes list and cleaning up todo list for release. Fix for messages that are printed outside viewable area - ScrollDC garbles scrolling in such cases, so instead we shall use a full window redraw if the window is beyond the client borders. Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.89 retrieving revision 1.90 diff -u -d -r1.89 -r1.90 --- NetrekXP to do list.C 12 Jan 2007 18:06:54 -0000 1.89 +++ NetrekXP to do list.C 13 Jan 2007 02:53:25 -0000 1.90 @@ -17,6 +17,7 @@ 10) end game bots are stupid, and on timericide don't act right 11) if obs in game when merlin quits, queues still open..should be closed dammit 12) final planet count and cscore would be nice in pw_stats +13) add auto guest# name generation for INL server Things that are sorta fixed, but could use improvement: 1) Border issue - quite complex problem, how to know the borders to obey after the bitmap @@ -31,22 +32,15 @@ to save settings. Text in windows should adjust to new window size. 2) Save options for observer/servernick/servertype need to be saved 3) Get square planet bitmaps so I can turn them into mapped rotating globes. -4) problem with message windows, text getting garbled near top, goes away with -flushing with scroll button. Doesn't show up initially, but do something like use -scroll button, alt-enter, change to review all..and it shows up. -4a) review all scrolling messes up text, if bottom of window is below the visible -bottom border of netrek window. Actually will happen to whatever window is mapped -down there at bottom of screen. Apprently the native windows function doesn't properly -scroll text that is outside the viewable window. -6) Pop-up dialog box for bad version response -7) new UDP metaserver code has issue if 2nd metaserver responding has more servers, can be +4) Pop-up dialog box for bad version response +5) new UDP metaserver code has issue if 2nd metaserver responding has more servers, can be awkward to resize window if user going to click on a server -8) Fix generic_32 size check -9) Some sort of click action on player list brings up a menu with settings for that +6) Fix generic_32 size check +7) Some sort of click action on player list brings up a menu with settings for that player's candock, cantranswarp, ban, ignore, etc. -10) add auto guest# name generation for INL server -11) Maybe fix galactic new planet bitmap redraw sequence, caused incredible lag on a P166 +8) Maybe fix galactic new planet bitmap redraw sequence, caused incredible lag on a P166 Win98 xp computer +9) fix metaping to work if server has multiple entries, ie home and away inl ports Stas's list: - color coded playerlist. Index: clientr.suo =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.suo,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 Binary files /tmp/cvsIetYkw and /tmp/cvsPDtGnP differ From modemhero at users.sourceforge.net Tue Jan 23 05:12:08 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 23 Jan 2007 11:12:08 +0000 Subject: [netrek-cvs] client/netrekxp/src mswindow.c, 1.41, 1.42 parsemeta.c, 1.26, 1.27 Message-ID: <20070123111216.BBC7DB402@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv26036/src Modified Files: mswindow.c parsemeta.c Log Message: Fixed regression that was causing UDP metacache to not load. Reversed order of load UDP metacache and send request, so that cache is loaded first. Removed redundant metasort from user request for metaserver refresh, if a metaserver packet is received, metasort called already. Added check if message window is totally clipped instead of just partially clipped - if totally clipped, window behaves as an unmapped window. If server list has multiple servers with same IP, metaping will now display correct for all servers, as they will all use the same ping response packets. Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- mswindow.c 13 Jan 2007 02:53:27 -0000 1.41 +++ mswindow.c 23 Jan 2007 11:12:04 -0000 1.42 @@ -4540,6 +4540,7 @@ int HiddenLines; int y; int clipped = 0; + int totally_clipped = 0; RECT r; WINDOWPLACEMENT loc; FNHEADER_VOID; @@ -4562,14 +4563,19 @@ // For mapped windows, do full redraw if more than half of window content // is changed, or if part of window is outside viewable area, because // ScrollDC fails to properly scroll text in such cases - if (W_IsMapped(window)) + if (W_IsMapped (window) && W_IsMapped (baseWin)) { GetWindowPlacement (win->hwnd, &loc); GetWindowRect (((Window *) baseWin)->hwnd, &r); + // At least partially clipped if (loc.rcNormalPosition.left < r.left || loc.rcNormalPosition.right > r.right || loc.rcNormalPosition.top < r.top || loc.rcNormalPosition.bottom > r.bottom) clipped = 1; - if (win->AddedStrings > (win->TextHeight / 2) || clipped) + // Totally clipped, treat like unmapped window + if (loc.rcNormalPosition.right < r.left || loc.rcNormalPosition.left > r.right + || loc.rcNormalPosition.bottom < r.top || loc.rcNormalPosition.top > r.bottom) + totally_clipped = 1; + if (win->AddedStrings > (win->TextHeight / 2) || (clipped && !totally_clipped)) { InvalidateRect (win->hwnd, NULL, FALSE); UpdateWindow (win->hwnd); //Generates paint msg, which calls RedrawScrolling Index: parsemeta.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/parsemeta.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- parsemeta.c 21 Dec 2006 13:48:27 -0000 1.26 +++ parsemeta.c 23 Jan 2007 11:12:05 -0000 1.27 @@ -881,13 +881,13 @@ num_servers = 0; return; } - - cache = fopen(cacheFileName, "r"); - if (cache == NULL) - { + if (!findfile (metaUDPCache, cacheFileName) + || !(cache = fopen (cacheFileName, "r"))) + { num_servers = 0; return; } + /* Obtain file size. */ fseek (cache , 0 , SEEK_END); lSize = ftell (cache); @@ -1281,8 +1281,8 @@ switch (type) { case 1: - ReadMetasSend(); LoadMetasCache(); + ReadMetasSend(); if (num_servers == 0) ReadMetasRecv(-1); if (num_servers != 0) { /* Allocate 4 spots for header/refresh/quit/link */ @@ -1687,7 +1687,6 @@ { W_WriteText(metaWin, 0, metaHeight-3, W_Red, "Asking for refresh from metaservers and nearby servers", 54, 0); ReadMetasSend(); - metasort(); } else if (data->y == (metaHeight-2)) /* Quit selected */ { @@ -2066,13 +2065,13 @@ // Receive reply if (!metaPing_recvEchoReply(rawSocket, &saSrc, &rtt, &nSeq)) { - //printf("\nReply from: %s: rtt=%ldms seq=%d", inet_ntoa(saSrc.sin_addr), rtt, nSeq); + //LineToConsole("\nReply from: %s: rtt=%ldms seq=%d", inet_ntoa(saSrc.sin_addr), rtt, nSeq); for (i = 0; i < num_servers; ++i) + { + // Support multiple servers with same IP - update every server entry with latest ping time if (saSrc.sin_addr.s_addr == serverlist[i].ip_addr) - { serverlist[i].pkt_rtt[nSeq % RTT_AVG_BUFLEN] = rtt; - break; - } + } } } } From modemhero at users.sourceforge.net Tue Jan 23 05:12:07 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 23 Jan 2007 11:12:07 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C, 1.90, 1.91 clientr.suo, 1.57, 1.58 Message-ID: <20070123111216.904AEB400@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv26036 Modified Files: NetrekXP to do list.C clientr.suo Log Message: Fixed regression that was causing UDP metacache to not load. Reversed order of load UDP metacache and send request, so that cache is loaded first. Removed redundant metasort from user request for metaserver refresh, if a metaserver packet is received, metasort called already. Added check if message window is totally clipped instead of just partially clipped - if totally clipped, window behaves as an unmapped window. If server list has multiple servers with same IP, metaping will now display correct for all servers, as they will all use the same ping response packets. Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.90 retrieving revision 1.91 diff -u -d -r1.90 -r1.91 --- NetrekXP to do list.C 13 Jan 2007 02:53:25 -0000 1.90 +++ NetrekXP to do list.C 23 Jan 2007 11:12:04 -0000 1.91 @@ -18,6 +18,7 @@ 11) if obs in game when merlin quits, queues still open..should be closed dammit 12) final planet count and cscore would be nice in pw_stats 13) add auto guest# name generation for INL server +14) sysdef option for base orbit enemy planets Things that are sorta fixed, but could use improvement: 1) Border issue - quite complex problem, how to know the borders to obey after the bitmap @@ -35,12 +36,14 @@ 4) Pop-up dialog box for bad version response 5) new UDP metaserver code has issue if 2nd metaserver responding has more servers, can be awkward to resize window if user going to click on a server +5b) Metaping on a Unknown server is causing unseemly delay due to threading. 6) Fix generic_32 size check 7) Some sort of click action on player list brings up a menu with settings for that player's candock, cantranswarp, ban, ignore, etc. 8) Maybe fix galactic new planet bitmap redraw sequence, caused incredible lag on a P166 Win98 xp computer -9) fix metaping to work if server has multiple entries, ie home and away inl ports +9) Out of bounds message window calcs don't work with taskbar or menu bar, basewin +rect doesn't take these into account. Stas's list: - color coded playerlist. Index: clientr.suo =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.suo,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 Binary files /tmp/cvs09irXr and /tmp/cvsJey245 differ From modemhero at users.sourceforge.net Mon Jan 29 04:34:25 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 29 Jan 2007 10:34:25 +0000 Subject: [netrek-cvs] client/netrekxp/src parsemeta.c,1.27,1.28 Message-ID: <20070129103435.690F228ECC@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23403/src Modified Files: parsemeta.c Log Message: Reduced lifetime for a server in cache from 20 to 5 client attempts to use metaserver. 20 was just too long especially in light of INL servers that pop on and off the metaserver on a frequent basis. Added check in savemetascache to not save servers that aren't responding to ping requests, as they are either defunct, or the metacache entry for that server name is somehow corrupted. Undid the change in order of loading metacache and receiving metaserver info, didn't see any change in performance from the change. Index: parsemeta.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/parsemeta.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- parsemeta.c 23 Jan 2007 11:12:05 -0000 1.27 +++ parsemeta.c 29 Jan 2007 10:34:23 -0000 1.28 @@ -581,7 +581,7 @@ sp->port = port; sp->age = age; sp->when = now; - sp->lifetime = 4; + sp->lifetime = 2; #ifdef METAPING sp->ip_lookup = 0; /* Initialize the ping rtt fields */ @@ -595,12 +595,12 @@ sp->age = (int)now - (int)(sp->when-sp->age); sp->when = now; sp->refresh = 1; - sp->lifetime = 20; + sp->lifetime = 5; continue; } else { sp->age = age; sp->when = now; - sp->lifetime = 20; + sp->lifetime = 5; } } /* Use converted status and player values */ @@ -686,7 +686,7 @@ sp->age = 0; sp->when = now; sp->refresh = 1; - sp->lifetime = 20; + sp->lifetime = 5; sp->players = players; sp->status = statusOpen; sp->typeflag = type; @@ -839,6 +839,12 @@ instead they default to "Active". */ for (i = 0; i < num_servers; i++) { +#ifdef METAPING + /* Don't cache servers that aren't responding to ping, they are likely + defunct. */ + if (metaPing && serverlist[i].pkt_rtt[0] == -2) + continue; +#endif sprintf(str,"%s,%d,%lld,%d,%d,%d,%d,%c\n", serverlist[i].address, serverlist[i].port, @@ -1281,8 +1287,8 @@ switch (type) { case 1: - LoadMetasCache(); ReadMetasSend(); + LoadMetasCache(); if (num_servers == 0) ReadMetasRecv(-1); if (num_servers != 0) { /* Allocate 4 spots for header/refresh/quit/link */ From modemhero at users.sourceforge.net Mon Jan 29 04:34:25 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 29 Jan 2007 10:34:25 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C, 1.91, 1.92 clientr.suo, 1.58, 1.59 Message-ID: <20070129103434.42070B3EE@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23403 Modified Files: NetrekXP to do list.C clientr.suo Log Message: Reduced lifetime for a server in cache from 20 to 5 client attempts to use metaserver. 20 was just too long especially in light of INL servers that pop on and off the metaserver on a frequent basis. Added check in savemetascache to not save servers that aren't responding to ping requests, as they are either defunct, or the metacache entry for that server name is somehow corrupted. Undid the change in order of loading metacache and receiving metaserver info, didn't see any change in performance from the change. Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.91 retrieving revision 1.92 diff -u -d -r1.91 -r1.92 --- NetrekXP to do list.C 23 Jan 2007 11:12:04 -0000 1.91 +++ NetrekXP to do list.C 29 Jan 2007 10:34:20 -0000 1.92 @@ -19,6 +19,9 @@ 12) final planet count and cscore would be nice in pw_stats 13) add auto guest# name generation for INL server 14) sysdef option for base orbit enemy planets +15) phaser misses have the client computer phaser length, but with phaser upgrades, +this causes a mismatch in the actual phaser length for other players. Server needs +to somehow relay phaser damage values for other ships, perhaps in generic_32? Things that are sorta fixed, but could use improvement: 1) Border issue - quite complex problem, how to know the borders to obey after the bitmap @@ -35,7 +38,9 @@ 3) Get square planet bitmaps so I can turn them into mapped rotating globes. 4) Pop-up dialog box for bad version response 5) new UDP metaserver code has issue if 2nd metaserver responding has more servers, can be -awkward to resize window if user going to click on a server +awkward to resize window if user going to click on a server. However if cache is working +properly, after the first connect, all servers should be stored and the metaserver window +should not resize due to differences between the metaservers. 5b) Metaping on a Unknown server is causing unseemly delay due to threading. 6) Fix generic_32 size check 7) Some sort of click action on player list brings up a menu with settings for that Index: clientr.suo =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.suo,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 Binary files /tmp/cvs19wE66 and /tmp/cvsyBJGZs differ From modemhero at users.sourceforge.net Mon Jan 29 04:34:25 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 29 Jan 2007 10:34:25 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.99, 1.100 Message-ID: <20070129103434.4326828ED2@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23403/resources/docs Modified Files: changes.txt Log Message: Reduced lifetime for a server in cache from 20 to 5 client attempts to use metaserver. 20 was just too long especially in light of INL servers that pop on and off the metaserver on a frequent basis. Added check in savemetascache to not save servers that aren't responding to ping requests, as they are either defunct, or the metacache entry for that server name is somehow corrupted. Undid the change in order of loading metacache and receiving metaserver info, didn't see any change in performance from the change. Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.99 retrieving revision 1.100 diff -u -d -r1.99 -r1.100 --- changes.txt 13 Jan 2007 02:53:26 -0000 1.99 +++ changes.txt 29 Jan 2007 10:34:23 -0000 1.100 @@ -1,6 +1,10 @@ Netrek XP 2006, Version 1.2: (Released Jan-2007) -- fixed several bugs relating to message windows, most noticeably, messages that are - printed off the viewable screen will no longer garble scrolling text +- servers that don't respond to metaping are not saved in the UDPcache, as they are likely + defunct +- fixed some bugs relating to message windows, most noticeably, messages that are + printed off the viewable screen will no longer garble scrolling text. Still doesn't + work for certain cases, most noticeable if the windows taskbar is covering part + of a message window - changed default metaStatusLevel from 3 to 2, so as not to include timed out servers - new engine sound that replaces the old static-like engine sound, the sound file is still not used in normal gameplay though From modemhero at users.sourceforge.net Wed Jan 31 01:06:38 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 31 Jan 2007 07:06:38 +0000 Subject: [netrek-cvs] client/netrekxp/include data.h, 1.43, 1.44 proto.h, 1.27, 1.28 sound.h, 1.10, 1.11 Message-ID: <20070131070652.28E4E4CD9A@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv30543/include Modified Files: data.h proto.h sound.h Log Message: Fixed bug with metaserver - if server entry in metacache indicated one status, and we receive a new server packet with a different status, that packet is no long rejected based on packet age, new packets are considered priority in case of such a difference. Added 9 new star trek theme songs. Added 3 new netrekrc options (newSoundEffects, newSoundMusic, and newSoundMusicBkgd) that allow for sound effect and music playback to be toggled separately. Random intro sounds (instead of just the typical Kirk intro) - now all 5 trek series are represented. Random genocide sounds (4 end themes from the trek series). Music now fades out over 5 seconds upon entering game, rather than ending abruptly. Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- data.h 13 Dec 2006 00:00:00 -0000 1.43 +++ data.h 31 Jan 2007 07:06:36 -0000 1.44 @@ -527,6 +527,7 @@ #include "sound.h" extern int sound_init; extern int sound_toggle; +extern int music_toggle; extern char *sounddir; extern W_Window soundWin; @@ -688,10 +689,13 @@ extern WNDPROC lpfnDefRichEditWndProc; /* default window procedure for our richedit controls */ -extern int richText; /* temporary variable to enable/disable rich text windows */ -extern int newQuit; /* new quit clock */ -extern int newSound; /* Use new SDL sound interface */ -extern int newSoundAngles; /* Use SDL with angular 3D sound */ +extern int richText; /* temporary variable to enable/disable rich text windows */ +extern int newQuit; /* new quit clock */ +extern int newSound; /* Use new SDL sound interface */ +extern int newSoundEffects; /* Use SDL sound effects playback */ +extern int newSoundMusic; /* Use SDL music playback */ +extern int newSoundMusicBkgd; /* Play random background music continuously */ +extern int newSoundAngles; /* Use SDL with angular 3D sound */ extern int useFullShipInfo; /* Prefer SP_PLAYER packets over SP_S_PLAYER packets */ #endif /* _h_data */ Index: sound.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/sound.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- sound.h 20 Sep 2006 13:04:52 -0000 1.10 +++ sound.h 31 Jan 2007 07:06:36 -0000 1.11 @@ -59,6 +59,8 @@ extern void Play_Sound (int type); extern void Play_Sound_Loc (int type, int angle, int distance); +extern void Play_Music (int type); +extern void Play_Music_Bkgd (void); extern void Abort_Sound (int type); extern void Init_Sound (void); extern void Exit_Sound (void); @@ -101,4 +103,18 @@ NUM_WAVES }; +enum { + INTRO1_MUSIC, + INTRO2_MUSIC, + INTRO3_MUSIC, + INTRO4_MUSIC, + INTRO5_MUSIC, + END1_MUSIC, + END2_MUSIC, + END3_MUSIC, + END4_MUSIC, + NUM_MUSIC, +}; +#define MUSIC_OFFSET END1_MUSIC /* Offset for end music */ + #endif /* __SOUND_H */ Index: proto.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/proto.h,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- proto.h 13 Dec 2006 07:16:28 -0000 1.27 +++ proto.h 31 Jan 2007 07:06:36 -0000 1.28 @@ -1146,6 +1146,7 @@ extern void Init_Sound (void); extern void Play_Sound (int type); extern void Play_Sound_Loc (int type, int angle, int distance); + extern void Play_Music (int type); void Group_Sound (int type, int channel); extern void Abort_Sound (int type); extern void soundwindow (void); From modemhero at users.sourceforge.net Wed Jan 31 01:06:39 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 31 Jan 2007 07:06:39 +0000 Subject: [netrek-cvs] client/netrekxp/src cowmain.c, 1.19, 1.20 data.c, 1.47, 1.48 death.c, 1.11, 1.12 defaults.c, 1.37, 1.38 newwin.c, 1.45, 1.46 parsemeta.c, 1.28, 1.29 sound.c, 1.19, 1.20 Message-ID: <20070131070652.258C64CD99@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv30543/src Modified Files: cowmain.c data.c death.c defaults.c newwin.c parsemeta.c sound.c Log Message: Fixed bug with metaserver - if server entry in metacache indicated one status, and we receive a new server packet with a different status, that packet is no long rejected based on packet age, new packets are considered priority in case of such a difference. Added 9 new star trek theme songs. Added 3 new netrekrc options (newSoundEffects, newSoundMusic, and newSoundMusicBkgd) that allow for sound effect and music playback to be toggled separately. Random intro sounds (instead of just the typical Kirk intro) - now all 5 trek series are represented. Random genocide sounds (4 end themes from the trek series). Music now fades out over 5 seconds upon entering game, rather than ending abruptly. Index: sound.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/sound.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- sound.c 13 Dec 2006 03:14:55 -0000 1.19 +++ sound.c 31 Jan 2007 07:06:37 -0000 1.20 @@ -29,6 +29,7 @@ #include "proto.h" Mix_Chunk *newsounds[NUM_WAVES]; +Mix_Music *newmusic[NUM_MUSIC]; /* Each sound has a priority which controls what can override what Currently these are set as follows: @@ -144,6 +145,32 @@ return(1); } +/* + * Load the .ogg files into the music arrays + */ +int loadMusic(void) { + int i; + + newmusic[INTRO1_MUSIC] = Mix_LoadMUS(DATAFILE("intro_theme_TOS.ogg")); + newmusic[INTRO2_MUSIC] = Mix_LoadMUS(DATAFILE("intro_theme_TNG.ogg")); + newmusic[INTRO3_MUSIC] = Mix_LoadMUS(DATAFILE("intro_theme_VOY.ogg")); + newmusic[INTRO4_MUSIC] = Mix_LoadMUS(DATAFILE("intro_theme_DS9.ogg")); + newmusic[INTRO5_MUSIC] = Mix_LoadMUS(DATAFILE("intro_theme_ENT.ogg")); + newmusic[END1_MUSIC] = Mix_LoadMUS(DATAFILE("end_theme_TOS.ogg")); + newmusic[END2_MUSIC] = Mix_LoadMUS(DATAFILE("end_theme_TNG.ogg")); + newmusic[END3_MUSIC] = Mix_LoadMUS(DATAFILE("end_theme_VOY.ogg")); + newmusic[END4_MUSIC] = Mix_LoadMUS(DATAFILE("end_theme_DS9.ogg")); + + for (i=0; i < NUM_MUSIC; i++) { + if (!newmusic[i]) { + LineToConsole("Mix_LoadMUS newmusic[%d] could not be loaded. Check soundDir in your .netrekrc: %s\n", i, Mix_GetError()); + return(-1); + } + } + + return(1); +} + extern void Exit_Sound (void) { if (sound_init) @@ -174,6 +201,8 @@ if (newSound) { + int i; + #ifdef DEBUG LineToConsole ("Init_Sound using SDL\n"); #endif @@ -188,15 +217,15 @@ if (Mix_OpenAudio(22050, AUDIO_S16SYS, 2, 1024) < 0) LineToConsole("Mix_OpenAudio: %s\n", Mix_GetError()); - /* If we successfully loaded the wav files, so shut-off sound_init and play - * the introduction - */ - if (loadSounds()) - { - if (Mix_PlayChannel(-1, newsounds[INTRO_WAV], 0) < 0) - LineToConsole("Mix_PlayChannel: %s\n", Mix_GetError()); - } + /* Toggle on sound, and load sound files */ sound_toggle = 1; + loadSounds(); + + /* Toggle on music, load music files, and play random intro music */ + music_toggle = 1; + loadMusic(); + i = RANDOM() % MUSIC_OFFSET; + Play_Music(i); /* See if volume is adjustable */ CheckVolumeSettings (); /* Default of 8 channels not enough */ @@ -236,7 +265,7 @@ { int channel; - if (!sound_init || !sound_toggle) + if (!sound_init || !newSoundEffects || !sound_toggle) return; if ((type >= NUM_WAVES) || (type < 0)) @@ -278,11 +307,12 @@ current_sound = NO_SOUND; } } + extern void Play_Sound_Loc (int type, int angle, int distance) { int channel; - if (!sound_init || !sound_toggle) + if (!sound_init || !newSoundEffects || !sound_toggle) return; if ((type >= NUM_WAVES) || (type < 0)) @@ -324,6 +354,48 @@ return; } +/* Only works with SDL, i.e. newSound */ +extern void Play_Music (int type) +{ + if (!sound_init || !newSound || !newSoundMusic || !music_toggle) + return; + + if ((type >= NUM_MUSIC) || (type < 0)) + { + LineToConsole("Invalid music type %d\n", type); + return; + } + + if (Mix_PlayMusic(newmusic[type], 1) < 0) + { + LineToConsole("Mix_PlayMusic: %s\n", Mix_GetError()); + return; + } +} + +/* Only works with SDL, i.e. newSound */ +extern void Play_Music_Bkgd (void) +{ + int i; + + if (!sound_init || !newSound || !newSoundMusic || !newSoundMusicBkgd|| !music_toggle) + return; + + if (Mix_PlayingMusic()) + return; + + i = RANDOM() % NUM_MUSIC; + + if (Mix_PlayMusic(newmusic[i], 1) < 0) + { + LineToConsole("Mix_PlayMusic: %s\n", Mix_GetError()); + return; + } + /* So we play another one when done */ + Mix_HookMusicFinished(Play_Music_Bkgd); + +} + void Group_Sound (int type, int channel) { // Add channel to group by type, useful for aborting specific sounds @@ -375,8 +447,11 @@ #define SOUND_INIT MESSAGE_SOUND + 2 #define SOUND_DONE MESSAGE_SOUND + 3 -#define SDL_SOUND_ANGLE 1 -#define SDL_SOUND_DONE 2 +#define SDL_EFFECTS_TOGGLE 1 +#define SDL_MUSIC_TOGGLE 2 +#define SDL_MUSIC_BKGD 3 +#define SDL_SOUND_ANGLE 4 +#define SDL_SOUND_DONE 5 static void soundrefresh (int i); static void sdlsoundrefresh (int i); @@ -408,6 +483,21 @@ sprintf (buf, "Sound is turned %s", (sound_toggle == 1) ? "ON" : "OFF"); } + else if (i == SDL_EFFECTS_TOGGLE) + { + sprintf (buf, "Sound effects are turned %s", + (newSoundEffects == 1) ? "ON" : "OFF"); + } + else if (i == SDL_MUSIC_TOGGLE) + { + sprintf (buf, "Music is turned %s", + (newSoundMusic == 1) ? "ON" : "OFF"); + } + else if (i == SDL_MUSIC_BKGD) + { + sprintf (buf, "Background music is turned %s", + (newSoundMusicBkgd == 1) ? "ON" : "OFF"); + } else if (i == SDL_SOUND_ANGLE) { sprintf (buf, "Angular sound is turned %s", @@ -544,8 +634,40 @@ { if (sound_init) sound_toggle = (sound_toggle == 1) ? 0 : 1; + // Halt all sounds if toggled off + if (!sound_toggle) + { + Mix_HaltChannel(-1); + Mix_HaltMusic(); + } sdlsoundrefresh (SOUND_TOGGLE); } + else if (i == SDL_EFFECTS_TOGGLE) + { + if (sound_init) + newSoundEffects = (newSoundEffects) ? 0 : 1; + if (!newSoundEffects) + Mix_HaltChannel(-1); + sdlsoundrefresh (SDL_EFFECTS_TOGGLE); + } + else if (i == SDL_MUSIC_TOGGLE) + { + if (sound_init) + newSoundMusic = (newSoundMusic) ? 0 : 1; + if (!newSoundMusic) + Mix_HaltMusic(); + sdlsoundrefresh (SDL_MUSIC_TOGGLE); + } + else if (i == SDL_MUSIC_BKGD) + { + if (sound_init) + newSoundMusicBkgd = (newSoundMusicBkgd) ? 0 : 1; + if (!newSoundMusicBkgd) + Mix_HaltMusic(); + else + Play_Music_Bkgd(); + sdlsoundrefresh (SDL_MUSIC_BKGD); + } else if (i == SDL_SOUND_ANGLE) { newSoundAngles = (newSoundAngles) ? 0 : 1; Index: newwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/newwin.c,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- newwin.c 30 Nov 2006 11:28:57 -0000 1.45 +++ newwin.c 31 Jan 2007 07:06:37 -0000 1.46 @@ -1012,8 +1012,8 @@ { if (newSound) { - soundWin = W_MakeMenu("sound", WINSIDE + 20, -BORDER + 10, 30, - 3, NULL, 2); + soundWin = W_MakeMenu("sound", WINSIDE + 20, -BORDER + 10, 33, + 6, NULL, 2); W_SetWindowKeyDownHandler(soundWin, sdlsoundaction); W_SetWindowButtonHandler(soundWin, sdlsoundaction); W_DefineArrowCursor(soundWin); Index: cowmain.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/cowmain.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- cowmain.c 10 Dec 2006 02:49:14 -0000 1.19 +++ cowmain.c 31 Jan 2007 07:06:37 -0000 1.20 @@ -1083,7 +1083,11 @@ #ifdef SOUND if (newSound) { - Mix_HaltChannel(-1); /* Kill all currently playing sounds when entering game */ + /* Kill all currently playing sounds when entering game */ + Mix_HaltChannel(-1); + /* Fade out any music playing over 5 seconds */ + if (Mix_PlayingMusic()) + Mix_FadeOutMusic(5000); Play_Sound(ENTER_SHIP_WAV); } else Index: death.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/death.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- death.c 11 Jun 2006 20:53:52 -0000 1.11 +++ death.c 31 Jan 2007 07:06:37 -0000 1.12 @@ -152,6 +152,13 @@ W_TileWindow (mapw, genopic2); break; } +#ifdef SOUND + if (newSound) + { + i = MUSIC_OFFSET + (RANDOM() % MUSIC_OFFSET); // Play random end theme + Play_Music(i); + } +#endif break; case KGHOST: strcpy (deathmessage, "You were killed by a confused daemon."); @@ -176,6 +183,13 @@ W_TileWindow (mapw, genopic2); break; } +#ifdef SOUND + if (newSound) + { + i = MUSIC_OFFSET + (RANDOM() % MUSIC_OFFSET); // Play random end theme + Play_Music(i); + } +#endif break; case KPROVIDENCE: strcpy (deathmessage, "You were nuked by GOD."); Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- defaults.c 13 Dec 2006 03:14:53 -0000 1.37 +++ defaults.c 31 Jan 2007 07:06:37 -0000 1.38 @@ -339,6 +339,24 @@ NULL } }, + {"newSoundEffects", &newSoundEffects, RC_BOOL, + { + "Play sound effects (newSound only)", + NULL + } + }, + {"newSoundMusic", &newSoundMusic, RC_BOOL, + { + "Play music (newSound only)", + NULL + } + }, + {"newSoundMusicBkgd", &newSoundMusicBkgd, RC_BOOL, + { + "Play theme music in background (requires newSound and newSoundMusic)", + NULL + } + }, {"newSoundAngles", &newSoundAngles, RC_BOOL, { "Use 3D sound effects (only works if newSound is on)", @@ -1498,6 +1516,9 @@ allowWheelActions = booleanDefault ("allowWheelActions", allowWheelActions); newQuit = booleanDefault ("newQuit", newQuit); newSound = booleanDefault ("newSound", newSound); + newSoundEffects= booleanDefault ("newMusic", newSoundEffects); + newSoundMusic = booleanDefault ("newMusicPlayRandom", newSoundMusic); + newSoundMusicBkgd = booleanDefault ("newSoundMusicBkgd", newSoundMusicBkgd); newSoundAngles = booleanDefault ("newSoundAngles", newSoundAngles); useFullShipInfo = booleanDefault ("useFullShipInfo", useFullShipInfo); tpDotDist = intDefault ("tpDotDist", tpDotDist); Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- data.c 13 Dec 2006 00:00:00 -0000 1.47 +++ data.c 31 Jan 2007 07:06:37 -0000 1.48 @@ -632,6 +632,7 @@ #ifdef SOUND int sound_init = 1; int sound_toggle = 0; +int music_toggle = 0; char *sounddir = NULL; W_Window soundWin = NULL; @@ -786,9 +787,12 @@ WNDPROC lpfnDefRichEditWndProc; /* default window proc */ -int richText = 0; /* temporary variable to select rich text message windows */ -int newQuit = 0; /* new quit clock */ -int newSound = 1; /* use new SDL sound */ -int newSoundAngles = 1; /* use new SDL sound with angular 3d component */ +int richText = 0; /* temporary variable to select rich text message windows */ +int newQuit = 0; /* new quit clock */ +int newSound = 1; /* Use new SDL sound interface */ +int newSoundEffects = 1; /* Use SDL sound effects playback */ +int newSoundMusic = 1; /* Use SDL music playback */ +int newSoundMusicBkgd = 0; /* Play random background music continuously */ +int newSoundAngles = 1; /* Use SDL with angular 3D sound */ int useFullShipInfo = 1; /* Prefer SP_PLAYER packets over SP_S_PLAYER packets */ \ No newline at end of file Index: parsemeta.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/parsemeta.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- parsemeta.c 29 Jan 2007 10:34:23 -0000 1.28 +++ parsemeta.c 31 Jan 2007 07:06:37 -0000 1.29 @@ -589,9 +589,11 @@ sp->pkt_rtt[j] = (unsigned long) -1; #endif } - /* if it was found, check age */ + /* if it was found, check age. Don't update if old entry is newer or + of the same age. However, make sure status hasn't changed. If status + differs, we want to use the new information packet regardless of age. */ else { - if ((now-age) < (sp->when-sp->age)) { + if ((now-age) < (sp->when-sp->age) && (sp->status == tempstatus)) { sp->age = (int)now - (int)(sp->when-sp->age); sp->when = now; sp->refresh = 1; From modemhero at users.sourceforge.net Wed Jan 31 01:06:39 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 31 Jan 2007 07:06:39 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.100, 1.101 netrekrc, 1.16, 1.17 netrekrc_options.txt, 1.20, 1.21 Message-ID: <20070131070652.33B41B3EE@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv30543/resources/docs Modified Files: changes.txt netrekrc netrekrc_options.txt Log Message: Fixed bug with metaserver - if server entry in metacache indicated one status, and we receive a new server packet with a different status, that packet is no long rejected based on packet age, new packets are considered priority in case of such a difference. Added 9 new star trek theme songs. Added 3 new netrekrc options (newSoundEffects, newSoundMusic, and newSoundMusicBkgd) that allow for sound effect and music playback to be toggled separately. Random intro sounds (instead of just the typical Kirk intro) - now all 5 trek series are represented. Random genocide sounds (4 end themes from the trek series). Music now fades out over 5 seconds upon entering game, rather than ending abruptly. Index: netrekrc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- netrekrc 21 Dec 2006 13:48:26 -0000 1.16 +++ netrekrc 31 Jan 2007 07:06:36 -0000 1.17 @@ -173,6 +173,15 @@ # Use new layered, stereo sound newSound: on +# Play sound effects (newSound only) +newSoundEffects: on + +# Play music (newSound only) +newSoundMusic: on + +# Play theme music in background (requires newSound and newSoundMusic) +newSoundMusicBkgd: off + # Use 3D sound effects (only works if newSound is on) newSoundAngles: off Index: netrekrc_options.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc_options.txt,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- netrekrc_options.txt 21 Dec 2006 13:48:26 -0000 1.20 +++ netrekrc_options.txt 31 Jan 2007 07:06:36 -0000 1.21 @@ -121,7 +121,11 @@ # off - old style newQuit: (on/off) use new quit window -newSound: (on/off) use layered, stereo sound +newSound: (on/off) use layered, stereo sound +newSoundEffects: (on/off) play sound effects (newSound only) +newSoundMusic: (on/off) play music (newSound only) +newSoundMusicBkgd: (on/off) play theme music in background + (this option requires newSound and newSoundMusic to be on) newSoundAngles: (on/off) use 3D sound effects (only works if newSound is on) omitTeamLetter: (on/off) omit team letter on galaxy orishipbmpfile: (path) - old color bitmaps Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.100 retrieving revision 1.101 diff -u -d -r1.100 -r1.101 --- changes.txt 29 Jan 2007 10:34:23 -0000 1.100 +++ changes.txt 31 Jan 2007 07:06:36 -0000 1.101 @@ -1,4 +1,13 @@ Netrek XP 2006, Version 1.2: (Released Jan-2007) +- three new netrekrc options, which are newSoundEffects, newSoundMusic, and newSoundMusicBkgd. + The first toggles sound effects on/off, the second toggles music on/off, the third plays + a mix of star trek theme music continually in the background. Thus, if you wish to play + with only music, you can. If you want to play with only sound effects, you can. Or both. + Or neither. Defaults are on for sound effects and music, and off for background music. +- the client can now play music files, 9 star trek themed music files from the various + star trek series have been added. Random intro themes will play on client connect, and + random end credits themes will play on genocide. Music is only available with the newSound + option on, as it uses SDL. These new music files are in the .ogg format. - servers that don't respond to metaping are not saved in the UDPcache, as they are likely defunct - fixed some bugs relating to message windows, most noticeably, messages that are From modemhero at users.sourceforge.net Wed Jan 31 01:06:39 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 31 Jan 2007 07:06:39 +0000 Subject: [netrek-cvs] client/netrekxp/resources/htmlhelp/html generalconfig.html, 1.22, 1.23 Message-ID: <20070131070652.2FCA0B3ED@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv30543/resources/htmlhelp/html Modified Files: generalconfig.html Log Message: Fixed bug with metaserver - if server entry in metacache indicated one status, and we receive a new server packet with a different status, that packet is no long rejected based on packet age, new packets are considered priority in case of such a difference. Added 9 new star trek theme songs. Added 3 new netrekrc options (newSoundEffects, newSoundMusic, and newSoundMusicBkgd) that allow for sound effect and music playback to be toggled separately. Random intro sounds (instead of just the typical Kirk intro) - now all 5 trek series are represented. Random genocide sounds (4 end themes from the trek series). Music now fades out over 5 seconds upon entering game, rather than ending abruptly. Index: generalconfig.html =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html/generalconfig.html,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- generalconfig.html 21 Dec 2006 13:48:27 -0000 1.22 +++ generalconfig.html 31 Jan 2007 07:06:37 -0000 1.23 @@ -604,7 +604,27 @@ newSound -Use new layered, stereo sound effects +Use new layered, stereo sound + + + + + +newSoundEffects +Use sound effects + + + + + +newSoundMusic +Use music