From modemhero at users.sourceforge.net Sun Apr 1 05:11:38 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sun, 01 Apr 2007 10:11:38 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.152, 1.153 Message-ID: <20070401101147.E76CF18683B@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23244/resources/docs Modified Files: changes.txt Log Message: Heading tic default to off for the places I missed (whoops). Changed to format of sendShortReq, now passes a 2nd argument which tells whether to display the warning message confirming the packet request was sent. More bug fixes for phasers and checking against out of bounds. Added a quiet request for small update if you are alive, but out of galactic bounds. At high packet loss, it's not uncommon to lose your ship position packet upon reentry into game. And since your position is not resent until you move, it was causing draw problems (in fact local window wasn't redrawing at all because client thought you were out of bounds). This will probably mitigate problems with alert borders not updating on death and stray weapons on map, more testing needed however. Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.152 retrieving revision 1.153 diff -u -d -r1.152 -r1.153 --- changes.txt 1 Apr 2007 01:25:50 -0000 1.152 +++ changes.txt 1 Apr 2007 10:11:36 -0000 1.153 @@ -1,9 +1,12 @@ Netrek XP 2006, Version 1.3: +- fixed annoying bug where tactical would sometimes seem to disappear on reentry into game + after death, was due to losing your position packet and not requesting a new one (you now + WILL request a position update if alive but seemingly off the map) - dist.taking (used in older netrekrc files) will now work, though dist.take is still the preferred name for that distress call - sound can now be initialized via sound menu if program starts with sound off - fixed bug with self phasers where they would sometimes stretch across the screen - upon death. + upon death - added "clickDelay: (0-50)" to allow for a delay between continuous mouse clicks, range is in # of updates - added "packetLights: (on)/off" to show packets sent and received via blinking lights @@ -39,7 +42,7 @@ - left clicking the planet list window will toggle between a sorted and unsorted planet list, right clicking will close the planet window. Team's starting planets are now separated by a white line. -- added "headingTic: (on)/off" to draw a tick mark indicating your ship's heading, as well +- added "headingTic: on/(off)" to draw a tick mark indicating your ship's heading, as well as a smaller secondary mark indicating where you are turning to, or in the case of when you are locked on to a player/planet, indicating the direction to that player/planet. This option helps with aiming in hockey and hitting cloaked ships you are locked on to. From modemhero at users.sourceforge.net Sun Apr 1 05:11:38 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sun, 01 Apr 2007 10:11:38 +0000 Subject: [netrek-cvs] client/netrekxp/include defs.h, 1.16, 1.17 proto.h, 1.42, 1.43 Message-ID: <20070401101147.E588D186824@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23244/include Modified Files: defs.h proto.h Log Message: Heading tic default to off for the places I missed (whoops). Changed to format of sendShortReq, now passes a 2nd argument which tells whether to display the warning message confirming the packet request was sent. More bug fixes for phasers and checking against out of bounds. Added a quiet request for small update if you are alive, but out of galactic bounds. At high packet loss, it's not uncommon to lose your ship position packet upon reentry into game. And since your position is not resent until you move, it was causing draw problems (in fact local window wasn't redrawing at all because client thought you were out of bounds). This will probably mitigate problems with alert borders not updating on death and stray weapons on map, more testing needed however. Index: defs.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/defs.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- defs.h 19 Mar 2007 00:05:12 -0000 1.16 +++ defs.h 1 Apr 2007 10:11:36 -0000 1.17 @@ -286,10 +286,6 @@ #define sendResetStatsReq(verify) sendShortPacket(CP_RESETSTATS, (char) verify) #define sendScanReq(who) sendShortPacket(CP_SCAN, (char) who) /* ATM */ -#ifdef SHORT_PACKETS -/* #define sendShortReq(state) sendShortPacket(CP_S_REQ, state) */ -#endif - /* This macro allows us to time things based upon # frames / sec. */ #define ticks(x) ((x)*200000/timerDelay) Index: proto.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/proto.h,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- proto.h 26 Mar 2007 04:40:51 -0000 1.42 +++ proto.h 1 Apr 2007 10:11:36 -0000 1.43 @@ -994,7 +994,7 @@ void handleVTorpInfo (unsigned char *sbuf); void handleVPlanet (unsigned char *sbuf); void resetWeaponInfo (void); -void sendShortReq (char state); +void sendShortReq (char state, int showmess); struct warning_s_spacket; void handleSWarning (struct warning_s_spacket *packet); void add_whydead (char *s, From modemhero at users.sourceforge.net Sun Apr 1 05:11:38 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sun, 01 Apr 2007 10:11:38 +0000 Subject: [netrek-cvs] client/netrekxp/resources/htmlhelp/html generalconfig.html, 1.43, 1.44 Message-ID: <20070401101147.E4F38B45E@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23244/resources/htmlhelp/html Modified Files: generalconfig.html Log Message: Heading tic default to off for the places I missed (whoops). Changed to format of sendShortReq, now passes a 2nd argument which tells whether to display the warning message confirming the packet request was sent. More bug fixes for phasers and checking against out of bounds. Added a quiet request for small update if you are alive, but out of galactic bounds. At high packet loss, it's not uncommon to lose your ship position packet upon reentry into game. And since your position is not resent until you move, it was causing draw problems (in fact local window wasn't redrawing at all because client thought you were out of bounds). This will probably mitigate problems with alert borders not updating on death and stray weapons on map, more testing needed however. Index: generalconfig.html =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html/generalconfig.html,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- generalconfig.html 25 Mar 2007 23:44:37 -0000 1.43 +++ generalconfig.html 1 Apr 2007 10:11:36 -0000 1.44 @@ -336,8 +336,8 @@ Draw a tic mark indicating your ship's direction From modemhero at users.sourceforge.net Sun Apr 1 05:11:38 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sun, 01 Apr 2007 10:11:38 +0000 Subject: [netrek-cvs] client/netrekxp clientr.suo,1.110,1.111 Message-ID: <20070401101148.07651B462@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23244 Modified Files: clientr.suo Log Message: Heading tic default to off for the places I missed (whoops). Changed to format of sendShortReq, now passes a 2nd argument which tells whether to display the warning message confirming the packet request was sent. More bug fixes for phasers and checking against out of bounds. Added a quiet request for small update if you are alive, but out of galactic bounds. At high packet loss, it's not uncommon to lose your ship position packet upon reentry into game. And since your position is not resent until you move, it was causing draw problems (in fact local window wasn't redrawing at all because client thought you were out of bounds). This will probably mitigate problems with alert borders not updating on death and stray weapons on map, more testing needed however. Index: clientr.suo =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.suo,v retrieving revision 1.110 retrieving revision 1.111 diff -u -d -r1.110 -r1.111 Binary files /tmp/cvsygHyaL and /tmp/cvsEjIIsu differ From modemhero at users.sourceforge.net Sun Apr 1 05:11:39 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sun, 01 Apr 2007 10:11:39 +0000 Subject: [netrek-cvs] client/netrekxp/src cowmain.c, 1.29, 1.30 data.c, 1.72, 1.73 input.c, 1.29, 1.30 local.c, 1.81, 1.82 map.c, 1.37, 1.38 short.c, 1.17, 1.18 spopt.c, 1.2, 1.3 Message-ID: <20070401101150.6AE66B45E@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23244/src Modified Files: cowmain.c data.c input.c local.c map.c short.c spopt.c Log Message: Heading tic default to off for the places I missed (whoops). Changed to format of sendShortReq, now passes a 2nd argument which tells whether to display the warning message confirming the packet request was sent. More bug fixes for phasers and checking against out of bounds. Added a quiet request for small update if you are alive, but out of galactic bounds. At high packet loss, it's not uncommon to lose your ship position packet upon reentry into game. And since your position is not resent until you move, it was causing draw problems (in fact local window wasn't redrawing at all because client thought you were out of bounds). This will probably mitigate problems with alert borders not updating on death and stray weapons on map, more testing needed however. Index: input.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/input.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- input.c 16 Mar 2007 17:24:16 -0000 1.29 +++ input.c 1 Apr 2007 10:11:37 -0000 1.30 @@ -2336,7 +2336,7 @@ Key45 (void) { #ifdef SHORT_PACKETS - sendShortReq (SPK_SALL); + sendShortReq (SPK_SALL, 1); #endif } @@ -3456,7 +3456,7 @@ { #ifdef SHORT_PACKETS - sendShortReq (SPK_ALL); + sendShortReq (SPK_ALL, 1); #endif } Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.81 retrieving revision 1.82 diff -u -d -r1.81 -r1.82 --- local.c 30 Mar 2007 02:50:53 -0000 1.81 +++ local.c 1 Apr 2007 10:11:37 -0000 1.82 @@ -1495,7 +1495,7 @@ and your target's ship is no longer visible to your team. Best solution seems to be to not draw the phaser by setting phaser length to 0. */ - if (players[php->ph_target].p_x < 0 || players[php->ph_target].p_y < 0) + if (players[php->ph_target].p_x < 0 || players[php->ph_target].p_x > GWIDTH) { tx = dx; ty = dy; @@ -2607,9 +2607,17 @@ /* Keep redrawing for double buffered observers who get set out of normal gameplay bounds, whether due to locking onto an ineligible planet, or observing a player who dies - - otherwise screen doesn't refresh*/ + otherwise screen doesn't refresh */ if ((me->p_x < 0 || me->p_x >= GWIDTH) && !(doubleBuffering && (me->p_flags & PFOBSERV))) + { + /* If alive but out of bounds, we probably missed a packet giving our location, + so quietly request a new one */ +#ifdef SHORT_PACKETS + if (me->p_status == PALIVE) + sendShortReq (SPK_SALL, 0); +#endif return; + } DrawPlanets (); Index: short.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/short.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- short.c 14 Mar 2007 18:36:08 -0000 1.17 +++ short.c 1 Apr 2007 10:11:37 -0000 1.18 @@ -204,7 +204,6 @@ #define NUMVARITEXTS ( sizeof vari_texts / sizeof vari_texts[0]) #define NUMDAEMONTEXTS ( sizeof daemon_texts / sizeof daemon_texts[0]) -extern void sendShortReq (char); void new_flags (unsigned int data, int which); @@ -910,7 +909,7 @@ { /* retry for S_P 1 */ LineToConsole ("Using Short Packet Version 1.\n"); shortversion = OLDSHORTVERSION; - sendShortReq (SPK_VON); + sendShortReq (SPK_VON, 1); } else { @@ -936,7 +935,7 @@ * when you first enter and to fix other loss if short packets * have just been turned back on. */ - sendShortReq (SPK_SALL); + sendShortReq (SPK_SALL, 1); break; case SPK_MOFF: recv_mesg = 0; @@ -1226,7 +1225,7 @@ void -sendShortReq (char state) +sendShortReq (char state, int showmess) { struct shortreq_cpacket shortReq; @@ -1250,13 +1249,15 @@ /* Let the client do the work, and not the network :-) */ resetWeaponInfo (); - - if (state == SPK_SALL) - warning ("Sent request for small update (weapons+planets+kills)"); - else if (state == SPK_ALL) - warning ("Sent request for medium update (all except stats)"); - else - warning ("Sent some unknown request..."); + if (showmess) + { + if (state == SPK_SALL) + warning ("Sent request for small update (weapons+planets+kills)"); + else if (state == SPK_ALL) + warning ("Sent request for medium update (all except stats)"); + else + warning ("Sent some unknown request..."); + } } sendServerPacket ((struct player_spacket *) &shortReq); Index: spopt.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/spopt.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- spopt.c 12 Apr 2006 04:20:04 -0000 1.2 +++ spopt.c 1 Apr 2007 10:11:37 -0000 1.3 @@ -86,9 +86,9 @@ if (data->type == W_EV_BUTTON) { if (recv_short) - sendShortReq (SPK_VOFF); + sendShortReq (SPK_VOFF, 1); else - sendShortReq (SPK_VON); + sendShortReq (SPK_VON, 1); } break; @@ -96,9 +96,9 @@ if (data->type == W_EV_BUTTON) { if (recv_mesg) - sendShortReq (SPK_MOFF); + sendShortReq (SPK_MOFF, 1); else - sendShortReq (SPK_MON); + sendShortReq (SPK_MON, 1); } break; @@ -106,9 +106,9 @@ if (data->type == W_EV_BUTTON) { if (recv_kmesg) - sendShortReq (SPK_M_NOKILLS); + sendShortReq (SPK_M_NOKILLS, 1); else - sendShortReq (SPK_M_KILLS); + sendShortReq (SPK_M_KILLS, 1); } break; @@ -116,9 +116,9 @@ if (data->type == W_EV_BUTTON) { if (recv_warn) - sendShortReq (SPK_M_NOWARN); + sendShortReq (SPK_M_NOWARN, 1); else - sendShortReq (SPK_M_WARN); + sendShortReq (SPK_M_WARN, 1); } break; Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.72 retrieving revision 1.73 diff -u -d -r1.72 -r1.73 --- data.c 25 Mar 2007 23:44:37 -0000 1.72 +++ data.c 1 Apr 2007 10:11:37 -0000 1.73 @@ -814,7 +814,7 @@ int useFullShipInfo = 1; /* Prefer SP_PLAYER packets over SP_S_PLAYER packets */ int useFullWeapInfo = 1; /* Receive larger torp packets, get self torp info beyond tactical, allow observer to see all weapons fire */ -int headingTic = 1; /* show ship heading tic */ +int headingTic = 0; /* show ship heading tic */ int tractorID = 1; /* show ID of player you are tractoring */ int lockLine = 1; /* draw dashed line on map from you to lock target */ int weaponsOnMap = 1; /* draw weapons fire on map */ Index: cowmain.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/cowmain.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- cowmain.c 13 Mar 2007 18:35:00 -0000 1.29 +++ cowmain.c 1 Apr 2007 10:11:36 -0000 1.30 @@ -1040,7 +1040,7 @@ #ifdef SHORT_PACKETS /* should we be checking for * udp on here? */ if (tryShort) - sendShortReq (SPK_VON); + sendShortReq (SPK_VON, 1); else { /* Index: map.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- map.c 30 Mar 2007 02:50:53 -0000 1.37 +++ map.c 1 Apr 2007 10:11:37 -0000 1.38 @@ -1105,7 +1105,7 @@ ph = &phasers[j->p_no]; if (ph->ph_status != PHFREE && (j->p_status == PALIVE || j->p_status == PEXPLODE || j->p_status == PDEAD) && - !(j->p_x < 0 || j->p_x >= GWIDTH)) + !(j->p_x < 0 || j->p_x > GWIDTH)) { switch(ph->ph_status) { @@ -1122,7 +1122,7 @@ break; default: /* Don't draw phasers to ships out of galactic bounds */ - if (players[ph->ph_target].p_x < 0 || players[ph->ph_target].p_y < 0) + if (players[ph->ph_target].p_x < 0 || players[ph->ph_target].p_x > GWIDTH) { tx = dx; ty = dy; From modemhero at users.sourceforge.net Mon Apr 2 05:12:40 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 02 Apr 2007 10:12:40 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.153, 1.154 netrekrc, 1.48, 1.49 Message-ID: <20070402101250.404EB18683B@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv12206/resources/docs Modified Files: changes.txt netrekrc Log Message: Default buttonmap now uses mouse wheel for accel/decel, scroll up to accelerate to max, scroll down to decelerate to warp 0. Expanded size of rank window, recentered it on local window. Added new functionality to rank window - showing DI needed for next rank. Follows server logic. Index: netrekrc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- netrekrc 1 Apr 2007 01:25:50 -0000 1.48 +++ netrekrc 2 Apr 2007 10:12:38 -0000 1.49 @@ -24,7 +24,7 @@ # wheel is button 6 and the down wheel is button 7. There is also support # for shifted, controled, and control-shifted mouse actions, see the netrek # help file for more details. -buttonmap: 1P2f3k +buttonmap: 1P2f3k6%70 # Key to switch to macro mode # TAB, ESC could be used too @@ -584,7 +584,7 @@ planet.mapped: off rank.parent: netrek -rank.geometry: 65x18+50+300 +rank.geometry: 80x18+10+300 rank.mapped: off player.parent: netrek Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.153 retrieving revision 1.154 diff -u -d -r1.153 -r1.154 --- changes.txt 1 Apr 2007 10:11:36 -0000 1.153 +++ changes.txt 2 Apr 2007 10:12:38 -0000 1.154 @@ -1,4 +1,6 @@ Netrek XP 2006, Version 1.3: +- default buttonmap now uses mouse wheel for accel/decel, scroll up to accelerate to max, + scroll down to decelerate to warp 0. - fixed annoying bug where tactical would sometimes seem to disappear on reentry into game after death, was due to losing your position packet and not requesting a new one (you now WILL request a position update if alive but seemingly off the map) From modemhero at users.sourceforge.net Mon Apr 2 05:12:40 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 02 Apr 2007 10:12:40 +0000 Subject: [netrek-cvs] client/netrekxp clientr.suo,1.111,1.112 Message-ID: <20070402101250.36E62186837@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv12206 Modified Files: clientr.suo Log Message: Default buttonmap now uses mouse wheel for accel/decel, scroll up to accelerate to max, scroll down to decelerate to warp 0. Expanded size of rank window, recentered it on local window. Added new functionality to rank window - showing DI needed for next rank. Follows server logic. Index: clientr.suo =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.suo,v retrieving revision 1.111 retrieving revision 1.112 diff -u -d -r1.111 -r1.112 Binary files /tmp/cvstUNw1I and /tmp/cvsWRt361 differ From modemhero at users.sourceforge.net Mon Apr 2 05:12:41 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 02 Apr 2007 10:12:41 +0000 Subject: [netrek-cvs] client/netrekxp/src newwin.c, 1.56, 1.57 ranklist.c, 1.1.1.1, 1.2 Message-ID: <20070402101250.3B09EB44D@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv12206/src Modified Files: newwin.c ranklist.c Log Message: Default buttonmap now uses mouse wheel for accel/decel, scroll up to accelerate to max, scroll down to decelerate to warp 0. Expanded size of rank window, recentered it on local window. Added new functionality to rank window - showing DI needed for next rank. Follows server logic. Index: newwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/newwin.c,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- newwin.c 26 Mar 2007 04:40:52 -0000 1.56 +++ newwin.c 2 Apr 2007 10:12:38 -0000 1.57 @@ -836,7 +836,7 @@ planetw = W_MakeTextWindow ("planet", WINSIDE + 160, 10, 57, MAXPLANETS + 3, baseWin, 2); W_SetWindowExposeHandler (planetw, planetlist); - rankw = W_MakeTextWindow ("rank", 50, 300, 65, NUMRANKS + 9, baseWin, 2); + rankw = W_MakeTextWindow ("rank", 10, 300, 80, NUMRANKS + 9, baseWin, 2); W_SetWindowExposeHandler (rankw, ranklist); playerw = W_MakeTextWindow ("player", 0, WINSIDE + 50, PlistMaxWidth (), 32, baseWin, 2); Index: ranklist.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/ranklist.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- ranklist.c 21 Jan 2003 21:28:42 -0000 1.1.1.1 +++ ranklist.c 2 Apr 2007 10:12:38 -0000 1.2 @@ -21,11 +21,62 @@ #include "data.h" #include "proto.h" +/* Calculate DI to next rank, following server logic */ +float toNextRank(int rank) +{ + int hourratio; + float rankDI, myDI, oRating, pRating, bRating, Ratings; + + /* TODO: add support for INL mode */ + if (!strcmp(me->p_name, "guest") || !strcmp(me->p_name, "Guest")) + hourratio = 5; + else + hourratio = 1; + + oRating = offenseRating (me); + pRating = planetRating (me); + bRating = bombingRating (me); + Ratings = oRating + pRating + bRating; + myDI = (float) (Ratings * (me->p_stats.st_tticks / 36000.0)); + rankDI = ranks[rank].ratings * ranks[rank].hours / hourratio; + + if (Ratings > ranks[rank].ratings) + { + if (myDI > rankDI) + return (0.0); + else + return (rankDI - myDI); + } + else if (Ratings > (ranks[rank-1].ratings)) + { + if (myDI > 2*rankDI) + return (0.0); + else + return (2*rankDI - myDI); + } + else if (me->p_stats.st_rank > 0 && Ratings > (ranks[rank-2].ratings)) + { + if (myDI > 4*rankDI) + return (0.0); + else + return (4*rankDI - myDI); + } + else if (me->p_stats.st_rank >= 4 && Ratings > (ranks[rank-3].ratings)) + { + if (myDI > 8*rankDI) + return (0.0); + else + return (8*rankDI - myDI); + } + else + return (-1); +} + void ranklist (void) { register int i; - char buf[80]; + char buf[100]; /* W_ClearWindow(rankw); */ (void) strcpy (buf, " Rank Hours Defense Ratings DI"); @@ -39,6 +90,18 @@ ranks[i].ratings, ranks[i].ratings * ranks[i].hours); if (mystats->st_rank == i) { + if (i < NUMRANKS-1) + { + char buf2[35]; + float DI; + if ((DI = toNextRank(i+1)) != -1) + { + sprintf(buf2, " (%.2f DI until next rank)", DI); + strcat(buf, buf2); + } + else + strcat(buf, " Need higher ratings for next rank"); + } W_WriteText (rankw, 1, i + 2, W_Cyan, buf, strlen (buf), W_BoldFont); } @@ -54,17 +117,13 @@ strcpy (buf, "in less than the hours allowed."); W_WriteText (rankw, 1, i + 4, textColor, buf, strlen (buf), W_RegularFont); - strcpy (buf, - "OR, get offense+boming+planets above corresponding Ratings"); + strcpy (buf, "OR, get offense+boming+planets above corresponding Ratings"); W_WriteText (rankw, 1, i + 5, textColor, buf, strlen (buf), W_RegularFont); strcpy (buf, "Promotions also occur at 2xDI with Ratings - 1"); W_WriteText (rankw, 1, i + 6, textColor, buf, strlen (buf), W_RegularFont); - strcpy (buf, "and at 4xDI with Ratings - 2"); + strcpy (buf, "4xDI with Ratings - 2, and 8xDI with Ratings - 3"); W_WriteText (rankw, 1, i + 7, textColor, buf, strlen (buf), W_RegularFont); - strcpy (buf, " also, some servers require .8 defense for promotion."); - W_WriteText (rankw, 1, i + 8, textColor, buf, strlen (buf), - W_RegularFont); } From modemhero at users.sourceforge.net Mon Apr 2 16:12:43 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 02 Apr 2007 21:12:43 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C,1.121,1.122 Message-ID: <20070402211252.D5F8E186866@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv31529 Modified Files: NetrekXP to do list.C Log Message: Moved message HUD display into local DrawMisc() function rather than updating local independently, as it was causing problems with double buffering. Added HUDbuf and showHUD variables to let local.c interact with smessage.c for displaying messages on tactical. Made HUDoffset a global variable. Removed unused mdisplayed variable. Readded some BlankChar calls that had been removed (no idea why), these missing calls were causing message cursor to not be erased properly on delete/backspace/ctrl-u. Fixed wrong info in hints about SB phaser cycling. Message window will now say "Click here to send a message to ALL" until any message is sent, then it will be blank as usual. Left clicking on message window will either a) start a new message to ALL board or b) continue current pending message. Added explanation of what DI is in the rank window. Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.121 retrieving revision 1.122 diff -u -d -r1.121 -r1.122 --- NetrekXP to do list.C 28 Mar 2007 11:17:55 -0000 1.121 +++ NetrekXP to do list.C 2 Apr 2007 21:12:41 -0000 1.122 @@ -46,7 +46,6 @@ 10) sendto() error: 10049 on metaserver connect to a bad server, believe it's due to hostname not resolving. Currently fixed by using mulitple attempts to resolve bad host names. -11) _ bug with backspace and messages in HUD Stas's list: - color coded (?) and scrollable playerlist. From modemhero at users.sourceforge.net Mon Apr 2 16:12:43 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 02 Apr 2007 21:12:43 +0000 Subject: [netrek-cvs] client/netrekxp/include data.h,1.66,1.67 Message-ID: <20070402211252.D3FE1186862@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv31529/include Modified Files: data.h Log Message: Moved message HUD display into local DrawMisc() function rather than updating local independently, as it was causing problems with double buffering. Added HUDbuf and showHUD variables to let local.c interact with smessage.c for displaying messages on tactical. Made HUDoffset a global variable. Removed unused mdisplayed variable. Readded some BlankChar calls that had been removed (no idea why), these missing calls were causing message cursor to not be erased properly on delete/backspace/ctrl-u. Fixed wrong info in hints about SB phaser cycling. Message window will now say "Click here to send a message to ALL" until any message is sent, then it will be blank as usual. Left clicking on message window will either a) start a new message to ALL board or b) continue current pending message. Added explanation of what DI is in the rank window. Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.66 retrieving revision 1.67 diff -u -d -r1.66 -r1.67 --- data.h 25 Mar 2007 23:44:35 -0000 1.66 +++ data.h 2 Apr 2007 21:12:41 -0000 1.67 @@ -61,11 +61,13 @@ extern int messpend; #ifdef XTRA_MESSAGE_UI extern int messageHUD; /* Show message being typed on the local display */ -extern int messageHoldThresh; /* Threshold value for putting a message on hold */ -extern int messMouseDelta; /* To keep track of mouse movement delta */ +extern char HUDbuf[90]; /* Buffer to hold current message for display */ +extern int showHUD; /* Internal variable to control when to display message */ +extern int HUDoffset; /* Internal variable that determines message offset */ +extern int messageHoldThresh; /* Threshold value for putting a message on hold */ +extern int messMouseDelta; /* To keep track of mouse movement delta */ #endif extern int lastcount; -extern int mdisplayed; extern int lastm; extern time_t delay; extern time_t rdelay; From modemhero at users.sourceforge.net Mon Apr 2 16:12:43 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 02 Apr 2007 21:12:43 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.154, 1.155 hints.dat, 1.9, 1.10 Message-ID: <20070402211252.D5992B475@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv31529/resources/docs Modified Files: changes.txt hints.dat Log Message: Moved message HUD display into local DrawMisc() function rather than updating local independently, as it was causing problems with double buffering. Added HUDbuf and showHUD variables to let local.c interact with smessage.c for displaying messages on tactical. Made HUDoffset a global variable. Removed unused mdisplayed variable. Readded some BlankChar calls that had been removed (no idea why), these missing calls were causing message cursor to not be erased properly on delete/backspace/ctrl-u. Fixed wrong info in hints about SB phaser cycling. Message window will now say "Click here to send a message to ALL" until any message is sent, then it will be blank as usual. Left clicking on message window will either a) start a new message to ALL board or b) continue current pending message. Added explanation of what DI is in the rank window. Index: hints.dat =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/hints.dat,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- hints.dat 2 Dec 2006 11:24:42 -0000 1.9 +++ hints.dat 2 Apr 2007 21:12:41 -0000 1.10 @@ -108,7 +108,7 @@ destroyers are best used only by experienced players. In most situations, a cruiser is the right ship choice. scouts offer the fastest speed and maneuverability, but are best used for bombing or taking. They are too brittle to be used for space controlling. starbases are the strongest ships in terms of fire power and can only be killed by a concentrated team effort. -starbases can fire phasers twice as fast as any other ship. +starbases can fire phasers more than twice as fast as any other ship. "to ogg" means, the process of cloaking and appearing adjacent to an enemy while firing torps and tractoring on to him, with the purpose to kill that player, without caring about dying in the process. "to doosh" means, killing an enemy ship which is carrying armies. People often yell "doosh!" after they kill a huge carrier. a "planet scum" is someone who only cares about taking planets so he gets good ratings. This often hurts the team because the wrong planets are taken, or the planets are taken with little armies and easily captured back. \ No newline at end of file Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.154 retrieving revision 1.155 diff -u -d -r1.154 -r1.155 --- changes.txt 2 Apr 2007 10:12:38 -0000 1.154 +++ changes.txt 2 Apr 2007 21:12:41 -0000 1.155 @@ -1,4 +1,11 @@ Netrek XP 2006, Version 1.3: +- changed how message HUD works, it now is refreshed during the redraw of the local map + rather than updated independently, should fix some redraw bugs with message HUD +- message window will now say "Click here to send a message to ALL" until any message + is sent, then it will be blank as usual +- left clicking on message window will either a) start a new message to all board or + b) continue current pending message +- rank window now shows DI needed for next rank - default buttonmap now uses mouse wheel for accel/decel, scroll up to accelerate to max, scroll down to decelerate to warp 0. - fixed annoying bug where tactical would sometimes seem to disappear on reentry into game @@ -35,7 +42,7 @@ - new Options menus for Hockey and Weapons - planet window no longer gets unmapped on death - fixed macro crash bug with sending macros to invisible players on the playerlist -- added "mapSort: (on)/off" to sort the planet list, with your planets first, then the planets +- added "sortPlanets: (on)/off" to sort the planet list, with your planets first, then the planets of the other teams, starting with the team with the most players. Within a team, planets are sorted from low to high army count. - the planet list window can now be used with info, lock and certain RCDs. In other words, From modemhero at users.sourceforge.net Mon Apr 2 16:12:44 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 02 Apr 2007 21:12:44 +0000 Subject: [netrek-cvs] client/netrekxp/src cowmain.c, 1.30, 1.31 data.c, 1.73, 1.74 local.c, 1.82, 1.83 newwin.c, 1.57, 1.58 ranklist.c, 1.2, 1.3 smessage.c, 1.6, 1.7 Message-ID: <20070402211252.D2199B43C@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv31529/src Modified Files: cowmain.c data.c local.c newwin.c ranklist.c smessage.c Log Message: Moved message HUD display into local DrawMisc() function rather than updating local independently, as it was causing problems with double buffering. Added HUDbuf and showHUD variables to let local.c interact with smessage.c for displaying messages on tactical. Made HUDoffset a global variable. Removed unused mdisplayed variable. Readded some BlankChar calls that had been removed (no idea why), these missing calls were causing message cursor to not be erased properly on delete/backspace/ctrl-u. Fixed wrong info in hints about SB phaser cycling. Message window will now say "Click here to send a message to ALL" until any message is sent, then it will be blank as usual. Left clicking on message window will either a) start a new message to ALL board or b) continue current pending message. Added explanation of what DI is in the rank window. Index: smessage.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/smessage.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- smessage.c 22 Mar 2007 06:40:21 -0000 1.6 +++ smessage.c 2 Apr 2007 21:12:42 -0000 1.7 @@ -21,7 +21,6 @@ #include "proto.h" static int lcount; -static int HUDoffset; static char buf[MAX_MLENGTH]; static char cursor = '_'; static char mbuf[80]; @@ -32,7 +31,7 @@ DisplayMessage () { int length; - char tmp[1024]; + char tmp[90]; length = strlen (outmessage); @@ -53,10 +52,7 @@ #ifdef XTRA_MESSAGE_UI if (HUDoffset) - { - //W_WriteText (w, 5 + W_Textwidth * length, HUDoffset, textColor, " ", 1, W_RegularFont); - W_WriteText (w, 5, HUDoffset, textColor, tmp, length, W_RegularFont); - } + strcpy (HUDbuf, tmp); #endif W_WriteText (messagew, 5, 5, textColor, tmp, length, W_RegularFont); } @@ -127,6 +123,7 @@ if (messpend == 0) { + showHUD = 1; messpend = 1; #ifdef XTRA_MESSAGE_UI /* Figure out where to put the message on the local */ @@ -199,6 +196,7 @@ lcount = ADDRLEN; break; } + BlankChar(lcount + 1, 1); outmessage[lcount + 1] = '\0'; outmessage[lcount] = cursor; DisplayMessage (); @@ -206,7 +204,7 @@ case '\033': /* abort message */ BlankChar (0, lcount + 1); - mdisplayed = 0; + showHUD = 0; messpend = 0; message_off (); for (i = 0; i < MAX_MLENGTH; i++) @@ -252,6 +250,7 @@ case 23: while (--lcount >= ADDRLEN) { + BlankChar(lcount + 1, 1); outmessage[lcount + 1] = '\0'; outmessage[lcount] = cursor; } @@ -349,7 +348,7 @@ warning ("Not legal recipient"); } BlankChar (0, lcount + 1); - mdisplayed = 0; + showHUD = 0; lcount = 0; break; Index: newwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/newwin.c,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- newwin.c 2 Apr 2007 10:12:38 -0000 1.57 +++ newwin.c 2 Apr 2007 21:12:42 -0000 1.58 @@ -791,6 +791,22 @@ static void handleMessageWindowButton (W_Event * event) { + switch (event->key) + { + case W_LBUTTON: + if (messageon == 0) + { +#ifdef SOUND + Play_Sound(MESSAGE_WAV, SF_MESSAGE); +#endif + message_on (); + if (messpend == 0) + smessage ('A'); + } + return; + default: + return; + } } /******************************************************************************/ Index: cowmain.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/cowmain.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- cowmain.c 1 Apr 2007 10:11:36 -0000 1.30 +++ cowmain.c 2 Apr 2007 21:12:41 -0000 1.31 @@ -1065,6 +1065,10 @@ /* Set up autowar settings */ do_autosetwar(team); + /* Click me sign on message window (for newbies) */ + sprintf(buf, "Click here to send a message to ALL"); + W_WriteText (messagew, 5, 5, textColor, buf, strlen(buf), W_RegularFont); + isFirstEntry = 0; } Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- local.c 1 Apr 2007 10:11:37 -0000 1.82 +++ local.c 2 Apr 2007 21:12:42 -0000 1.83 @@ -2587,6 +2587,20 @@ clearcount++; } } + +#ifdef XTRA_MESSAGE_UI + /* Display message HUD */ + if (HUDoffset && showHUD) + { + W_WriteText (w, 5, HUDoffset, textColor, HUDbuf, strlen(HUDbuf), W_RegularFont); + clearzone[0][clearcount] = 5; + clearzone[1][clearcount] = HUDoffset; + clearzone[2][clearcount] = W_Textwidth * strlen(HUDbuf); + clearzone[3][clearcount] = W_Textheight; + clearcount++; + } +#endif + } Index: ranklist.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/ranklist.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ranklist.c 2 Apr 2007 10:12:38 -0000 1.2 +++ ranklist.c 2 Apr 2007 21:12:42 -0000 1.3 @@ -114,7 +114,7 @@ strcpy (buf, "To achieve a rank, you need the corresponding DI"); W_WriteText (rankw, 1, i + 3, textColor, buf, strlen (buf), W_RegularFont); - strcpy (buf, "in less than the hours allowed."); + strcpy (buf, "in less than the hours allowed (DI = ratings x hours)."); W_WriteText (rankw, 1, i + 4, textColor, buf, strlen (buf), W_RegularFont); strcpy (buf, "OR, get offense+boming+planets above corresponding Ratings"); Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.73 retrieving revision 1.74 diff -u -d -r1.73 -r1.74 --- data.c 1 Apr 2007 10:11:37 -0000 1.73 +++ data.c 2 Apr 2007 21:12:41 -0000 1.74 @@ -70,11 +70,13 @@ int messpend = 0; #ifdef XTRA_MESSAGE_UI int messageHUD = 0; /* Show message being typed on the local display */ +char HUDbuf[90] = ""; /* Buffer to hold current message for display */ +int showHUD = 0; /* Internal variable to control when to display message */ +int HUDoffset; /* Internal variable that determines message offset */ int messageHoldThresh = 0; /* Threshold value for putting a message on hold (squared) */ int messMouseDelta = 0; /* To keep track of mouse movement delta */ #endif int lastcount = 0; -int mdisplayed = 0; int udcounter = 0; int showTractorPressor = 1; int showAllTractorPressor = 1; /* Enable SHOW_ALL_TRACTORS feature */ From modemhero at users.sourceforge.net Mon Apr 2 19:36:34 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 03 Apr 2007 00:36:34 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.155, 1.156 netrekrc, 1.49, 1.50 netrekrc_options.txt, 1.43, 1.44 Message-ID: <20070403003643.542E5186866@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv27391/resources/docs Modified Files: changes.txt netrekrc netrekrc_options.txt Log Message: New netrekrc option "showOtherSpeed: (on)/off" to show speed next to other players, only works if server has the new feature packet SHOW_OTHER_SPEED on. Changed showArmy option to be a range (0-3), to take advantage of new server feature packet SHOW_ARMY_COUNT. Can draw army counts on either local, galactic, or both. Noted the outdated comment regarding planet flicker when ships pick armies, and flagged planets that pop as needing redraw if SHOW_ARMY_COUNT is enabled. Index: netrekrc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- netrekrc 2 Apr 2007 10:12:38 -0000 1.49 +++ netrekrc 3 Apr 2007 00:36:32 -0000 1.50 @@ -331,8 +331,15 @@ # Server god decides whether to enable it on server showAllTractorPressor: on -# Show army count of planet you are orbiting (or locked on as observer) -showArmy: on +# Where to show army counts next to planets +# Server god decides whether to fully enable this feature +# If server god has feature off, army counts will only show on +# planet you are orbiting (or locked onto as an observer) +# 0 - don't show army counts +# 1 - show army counts on local map only (default) +# 2 - show army counts on galactic map only +# 3 - show army counts on both maps +showArmy: 1 # Show hints window showHints: on @@ -365,6 +372,10 @@ # Show my speed on local showMySpeed: on +# Show other player's speed on local +# Server god decides whether to enable this feature +showOtherSpeed: on + # Show planet names on local showPlanetNames: on Index: netrekrc_options.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc_options.txt,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- netrekrc_options.txt 25 Mar 2007 23:44:36 -0000 1.43 +++ netrekrc_options.txt 3 Apr 2007 00:36:32 -0000 1.44 @@ -240,7 +240,12 @@ server.: (address) is a nickname for (address) shiftedMouse: (on/off) shift+mouse buttons will work as commands showAllTractorPressor: (on/off) show each player's tractor/pressor beams (requires server support) -showArmy: (on/off) show army count of planet you are orbiting (or locked on as observer) +showArmy: (0-3) show army count next to planets +# 0 - don't show army counts +# 1 - show army counts on local map only (default) +# 2 - show army counts on galactic map only +# 3 - show army counts on both maps + showHints: (on/off) show hints window showHockeyLinesLocal: (on/off) show hockey lines on tactical showHockeyLinesMap: (on/off) show hockey lines on galactic @@ -252,6 +257,7 @@ # 2 - tactical # 3 - both (default) +showOtherSpeed: (on/off) show other player's speed on tactical showMySpeed: (on/off) show my speed on tactical showMotd: (on/off) show Motd if waiting on queue showPlanetNames: (on/off) show planet names on tactical Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.155 retrieving revision 1.156 diff -u -d -r1.155 -r1.156 --- changes.txt 2 Apr 2007 21:12:41 -0000 1.155 +++ changes.txt 3 Apr 2007 00:36:32 -0000 1.156 @@ -1,4 +1,12 @@ Netrek XP 2006, Version 1.3: +- new netrekrc option "showOtherSpeed: (on)/off" to show speed next to other players, + only works if server has the new feature packet SHOW_OTHER_SPEED on. +- changed showArmy option to be a range (0-3), to take advantage of new server feature + packet SHOW_ARMY_COUNT. Range of values is now as follows: +# 0 - don't show army counts +# 1 - show army counts on local map only (default) +# 2 - show army counts on galactic map only +# 3 - show army counts on both maps - changed how message HUD works, it now is refreshed during the redraw of the local map rather than updated independently, should fix some redraw bugs with message HUD - message window will now say "Click here to send a message to ALL" until any message From modemhero at users.sourceforge.net Mon Apr 2 19:36:34 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 03 Apr 2007 00:36:34 +0000 Subject: [netrek-cvs] client/netrekxp/resources/htmlhelp/html generalconfig.html, 1.44, 1.45 Message-ID: <20070403003643.518C4B46E@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv27391/resources/htmlhelp/html Modified Files: generalconfig.html Log Message: New netrekrc option "showOtherSpeed: (on)/off" to show speed next to other players, only works if server has the new feature packet SHOW_OTHER_SPEED on. Changed showArmy option to be a range (0-3), to take advantage of new server feature packet SHOW_ARMY_COUNT. Can draw army counts on either local, galactic, or both. Noted the outdated comment regarding planet flicker when ships pick armies, and flagged planets that pop as needing redraw if SHOW_ARMY_COUNT is enabled. Index: generalconfig.html =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html/generalconfig.html,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- generalconfig.html 1 Apr 2007 10:11:36 -0000 1.44 +++ generalconfig.html 3 Apr 2007 00:36:32 -0000 1.45 @@ -1058,11 +1058,13 @@ showArmy -Show army count of planet you are orbiting (or locked on as observer) +Show army count next to planets @@ -1143,8 +1145,18 @@ Show your ship speed on tactical
    -
  • on
  • -
  • off (default)
  • +
  • on (default)
  • +
  • off
  • +
+ + + +showOtherSpeed +Show other ship's speed on tactical + +
    +
  • on (default)
  • +
  • off
From modemhero at users.sourceforge.net Mon Apr 2 19:36:34 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 03 Apr 2007 00:36:34 +0000 Subject: [netrek-cvs] client/netrekxp/include data.h,1.67,1.68 Message-ID: <20070403003643.65BCB186867@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv27391/include Modified Files: data.h Log Message: New netrekrc option "showOtherSpeed: (on)/off" to show speed next to other players, only works if server has the new feature packet SHOW_OTHER_SPEED on. Changed showArmy option to be a range (0-3), to take advantage of new server feature packet SHOW_ARMY_COUNT. Can draw army counts on either local, galactic, or both. Noted the outdated comment regarding planet flicker when ships pick armies, and flagged planets that pop as needing redraw if SHOW_ARMY_COUNT is enabled. Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.67 retrieving revision 1.68 diff -u -d -r1.67 -r1.68 --- data.h 2 Apr 2007 21:12:41 -0000 1.67 +++ data.h 3 Apr 2007 00:36:32 -0000 1.68 @@ -150,6 +150,7 @@ extern int SBhours; extern int showMySpeed; +extern int showOtherSpeed; #ifdef JUBILEE_PHASERS extern int colorfulPhasers; @@ -574,6 +575,8 @@ extern int F_sp_generic_32; extern int F_full_direction_resolution; extern int F_full_weapon_resolution; +extern int F_show_army_count; +extern int F_show_other_speed; #ifdef RECORDGAME extern int F_many_self; From modemhero at users.sourceforge.net Mon Apr 2 19:36:34 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 03 Apr 2007 00:36:34 +0000 Subject: [netrek-cvs] client/netrekxp/src data.c, 1.74, 1.75 defaults.c, 1.65, 1.66 feature.c, 1.10, 1.11 local.c, 1.83, 1.84 map.c, 1.38, 1.39 option.c, 1.42, 1.43 short.c, 1.18, 1.19 socket.c, 1.24, 1.25 Message-ID: <20070403003643.7DBE018686A@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv27391/src Modified Files: data.c defaults.c feature.c local.c map.c option.c short.c socket.c Log Message: New netrekrc option "showOtherSpeed: (on)/off" to show speed next to other players, only works if server has the new feature packet SHOW_OTHER_SPEED on. Changed showArmy option to be a range (0-3), to take advantage of new server feature packet SHOW_ARMY_COUNT. Can draw army counts on either local, galactic, or both. Noted the outdated comment regarding planet flicker when ships pick armies, and flagged planets that pop as needing redraw if SHOW_ARMY_COUNT is enabled. Index: map.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- map.c 1 Apr 2007 10:11:37 -0000 1.38 +++ map.c 3 Apr 2007 00:36:32 -0000 1.39 @@ -654,6 +654,38 @@ l->pl_name, 3, planetFont (l)); } + if (F_show_army_count && (showArmy == 2 || showArmy == 3) && (l->pl_info & me->p_team)) + { + char armbuf[4]; + int armbuflen; + + if (l->pl_armies < 10) + { + armbuf[0] = (char) (l->pl_armies + '0'); + armbuf[1] = '\0'; + armbuflen = 2; + } + else if (l->pl_armies < 100) + { + armbuf[0] = (char) (l->pl_armies / 10 + '0'); + armbuf[1] = (char) (l->pl_armies % 10 + '0'); + armbuf[2] = '\0'; + armbuflen = 3; + } + else + { + armbuf[0] = (char) (l->pl_armies / 100 + '0'); + armbuf[1] = (char) ((l->pl_armies / 10) % 10 + '0'); + armbuf[2] = (char) (l->pl_armies % 10 + '0'); + armbuf[3] = '\0'; + armbuflen = 4; + } + + W_MaskText (mapw, dx - (BMP_MPLANET_WIDTH / 4) - 2*(armbuflen - 2), + dy - (BMP_MPLANET_HEIGHT / 4), W_White, + armbuf, armbuflen, W_BoldFont); + } + if (showIND && ((l->pl_info & me->p_team) #ifdef RECORDGAME || playback Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.83 retrieving revision 1.84 diff -u -d -r1.83 -r1.84 --- local.c 2 Apr 2007 21:12:42 -0000 1.83 +++ local.c 3 Apr 2007 00:36:32 -0000 1.84 @@ -563,10 +563,11 @@ } /* Allow army display if player/observer is orbitting a planet, or alternatively - if observer is locked onto a planet */ - if (showArmy && + if observer is locked onto a planet, or is show_army_count feature packet is on */ + if ((showArmy == 1 || showArmy == 3) && (l->pl_info & me->p_team) + && (F_show_army_count || ( (me->p_flags & PFORBIT) && (F_sp_generic_32 ? me->pl_orbit : get_closest_planet(me->p_x, me->p_y)) == l->pl_no) - || ((me->p_flags & PFPLLOCK) && (me->p_flags & PFOBSERV) && (me->p_planet == l->pl_no)) ) + || ((me->p_flags & PFPLLOCK) && (me->p_flags & PFOBSERV) && (me->p_planet == l->pl_no)) )) { char armbuf[4]; int armbuflen; @@ -1331,6 +1332,24 @@ } } } + else if (F_show_other_speed && showOtherSpeed) + { + if (j->p_speed < 10) + { + idbuf[1] = ','; + idbuf[2] = (char) (j->p_speed + '0'); + idbuf[3] = '\0'; + buflen = 3; + } + else + { + idbuf[1] = ','; + idbuf[2] = (char) (j->p_speed / 10 + '0'); + idbuf[3] = (char) (j->p_speed % 10 + '0'); + idbuf[4] = '\0'; + buflen = 4; + } + } W_MaskText (w, dx + (j->p_ship.s_width / 2), dy - (j->p_ship.s_height / 2), color, idbuf, buflen, shipFont (j)); Index: short.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/short.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- short.c 1 Apr 2007 10:11:37 -0000 1.18 +++ short.c 3 Apr 2007 00:36:32 -0000 1.19 @@ -1170,11 +1170,16 @@ #ifdef EM /* don't redraw when armies change unless it crosses the '4' * army * limit. Keeps people from watching for planet 'flicker' * when - * players are beaming */ + * players are beaming. */ + /* Above comment kept for historic purposes, but flicker issue has + * been solved by double buffering. Added in redraw for any planet + * that changes army count if feature packet to display army count + * is on. BB 04/07 */ int planetarmies = (unsigned char) packet->armies; if ((plan->pl_armies < 5 && planetarmies > 4) || - (plan->pl_armies > 4 && planetarmies < 5)) + (plan->pl_armies > 4 && planetarmies < 5) || + F_show_army_count) #endif redraw = 1; Index: socket.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- socket.c 26 Mar 2007 04:40:52 -0000 1.24 +++ socket.c 3 Apr 2007 00:36:32 -0000 1.25 @@ -1670,13 +1670,12 @@ if (plan->pl_armies != (signed int) ntohl (packet->armies)) { - /* don't redraw when armies change unless it crosses the '4' * army - * limit. Keeps people from watching for planet 'flicker' * when - * players are beaming */ + /* See comment in short.c for explanation of redraw */ int planetarmies = ntohl (packet->armies); if ((plan->pl_armies < 5 && planetarmies > 4) || - (plan->pl_armies > 4 && planetarmies < 5)) + (plan->pl_armies > 4 && planetarmies < 5) || + F_show_army_count ) redraw = 1; } plan->pl_armies = ntohl (packet->armies); Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.74 retrieving revision 1.75 diff -u -d -r1.74 -r1.75 --- data.c 2 Apr 2007 21:12:41 -0000 1.74 +++ data.c 3 Apr 2007 00:36:32 -0000 1.75 @@ -439,7 +439,8 @@ int playerListMessaging = 1; int messageKeyOnly = 1; -int showMySpeed = 0; +int showMySpeed = 1; +int showOtherSpeed = 1; #ifdef JUBILEE_PHASERS int colorfulPhasers = 0; @@ -679,6 +680,8 @@ int F_sp_generic_32 = 0; int F_full_direction_resolution = 0; int F_full_weapon_resolution = 0; +int F_show_army_count = 0; +int F_show_other_speed = 0; #ifdef RECORDGAME int F_many_self = 0; Index: feature.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/feature.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- feature.c 19 Mar 2007 04:33:51 -0000 1.10 +++ feature.c 3 Apr 2007 00:36:32 -0000 1.11 @@ -93,6 +93,8 @@ #endif {"SHOW_ALL_TRACTORS", &F_show_all_tractors, 'S', 1, 0, 0}, + {"SHOW_ARMY_COUNT", &F_show_army_count, 'S', 1, 0, 0}, + {"SHOW_OTHER_SPEED", &F_show_other_speed, 'S', 1, 0, 0}, {0, 0, 0, 0, 0, 0} }; Index: option.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/option.c,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- option.c 25 Mar 2007 23:44:37 -0000 1.42 +++ option.c 3 Apr 2007 00:36:32 -0000 1.43 @@ -183,6 +183,13 @@ "" }; +static char *armycountmess[] = { "Don't show army counts", + "Show army counts on local", + "Show army counts on map", + "Show army counts on local and map", + "" +}; + /* 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 @@ -270,7 +277,8 @@ #endif {1, "use warning shields", &warnShields, 0, 0, 0, NULL, NULL}, {1, "use warning hull", &vary_hull, 0, 0, 0, NULL, NULL}, - {1, "show speed on tactical", &showMySpeed, 0, 0, 0, NULL, NULL}, + {1, "show my speed on local", &showMySpeed, 0, 0, 0, NULL, NULL}, + {1, "show other's speed on local", &showOtherSpeed, 0, 0, 0, NULL, NULL}, {1, "show tractor/pressor beams", &showTractorPressor, 0, 0, 0, NULL, NULL}, {1, "show tractors after lock", &continueTractor, 0, 0, 0, NULL, NULL}, {1, "show tractor target ID", &tractorID, 0, 0, 0, NULL, NULL}, @@ -309,7 +317,7 @@ {1, "highlight planets", &planetHighlighting, 0, 0, 0, NULL, NULL}, {1, "rotate new planets", &rotatePlanets, 0, 0, 0, NULL, NULL}, {1, "show planet names on local", &showPlanetNames, 0, 0, 0, NULL, NULL}, - {1, "show army count on orbit", &showArmy, 0, 0, 0, NULL, NULL}, + {1, "", &showArmy, 0, 0, 0, armycountmess, NULL}, {1, "show owner on galactic", &showPlanetOwner, 0, 0, 0, NULL, NULL}, {1, "show IND planets", &showIND, 0, 0, 0, NULL, NULL}, {1, "show AGRI in caps on map", &agriCAPS, 0, 0, 0, NULL, NULL}, Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- defaults.c 1 Apr 2007 01:25:50 -0000 1.65 +++ defaults.c 3 Apr 2007 00:36:32 -0000 1.66 @@ -617,9 +617,16 @@ NULL } }, - {"showArmy", &showArmy, RC_BOOL, + {"showArmy", &showArmy, RC_INT, { - "Show army count of planet you are orbiting (or locked on as observer)", + "Where to show army counts next to planets", + "Server god decides whether to fully enable this feature", + "If server god has feature off, army counts will only show on", + "planet you are orbiting (or locked onto as an observer)", + "0 - don't show army counts", + "1 - show army counts on local map only (default)", + "2 - show army counts on galactic map only", + "3 - show army counts on both maps", NULL } }, @@ -680,6 +687,13 @@ NULL } }, + {"showOtherSpeed", &showOtherSpeed, RC_BOOL, + { + "Show other player's speed on local", + "Server god decides whether to enable this feature", + NULL + } + }, {"showPlanetNames", &showPlanetNames, RC_BOOL, { "Show planet names on local", @@ -1689,7 +1703,7 @@ detCircle = booleanDefault ("detCircle", detCircle); puckCircle = booleanDefault ("puckCircle", puckCircle); puckArrow = booleanDefault ("puckArrow", puckArrow); - showArmy = booleanDefault ("showArmy", showArmy); + showArmy = intDefault ("showArmy", showArmy); redrawDelay = intDefault ("redrawDelay", redrawDelay); planetHighlighting = booleanDefault ("planetHighlighting", planetHighlighting); rotatePlanets = booleanDefault ("rotatePlanets", rotatePlanets); @@ -1825,6 +1839,7 @@ ignoreCaps = booleanDefault ("ignoreCaps", ignoreCaps); showMySpeed = booleanDefault ("showMySpeed", showMySpeed); + showOtherSpeed = booleanDefault ("showOtherSpeed", showOtherSpeed); #ifdef JUBILEE_PHASERS colorfulPhasers = booleanDefault ("colorfulPhasers", colorfulPhasers); From modemhero at users.sourceforge.net Tue Apr 3 23:06:40 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 04 Apr 2007 04:06:40 +0000 Subject: [netrek-cvs] client/netrekxp/src data.c, 1.75, 1.76 defaults.c, 1.66, 1.67 feature.c, 1.11, 1.12 local.c, 1.84, 1.85 map.c, 1.39, 1.40 option.c, 1.43, 1.44 short.c, 1.19, 1.20 socket.c, 1.25, 1.26 Message-ID: <20070404040651.76BAD18686B@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23500/src Modified Files: data.c defaults.c feature.c local.c map.c option.c short.c socket.c Log Message: Added new entries to torp and plasma struct, t_clear and pt_clear, to mark an exploding plasma or torp as needing to be freed once its explosion cycle is over. Covers the case where a torp explodes, but the free packet is lost. Previously, the torp would never clear until it was no longer in the local map range. If weaponsOnMap option is on, internal timer to determine when it's safe to expire weapons is moved to map draw routine. Fixes problem where observers who are not locked onto anyone but still getting weapons drawn on map would have problems with weapons (like phasers) not expiring correctly due to packet loss enemy torps which are off local screen are no longer automatically freed (since this data is now sent for observers). Also changed exploding torps to use the time of explosion cycle rather than an arbitrary timer of 100 for expiry. Added support for SHOW_CLOAKERS feature packet. New netrekrc option "showCloakers: (on)/off" to show other cloakers on tactical, only works if server has the new feature packet SHOW_CLOAKERS on. Index: map.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- map.c 3 Apr 2007 00:36:32 -0000 1.39 +++ map.c 4 Apr 2007 04:06:38 -0000 1.40 @@ -1116,7 +1116,7 @@ } } - /* Draw weapons */ + /* Draw (and expire) weapons */ if (weaponsOnMap) { register int h; @@ -1135,6 +1135,17 @@ /* phasers */ ph = &phasers[j->p_no]; + + if ((ph->ph_updateFuse -= weaponUpdate) == 0) + { + /* Expire the phaser */ + ph->ph_status = PHFREE; +#ifdef SOUND + ph->sound_phaser = 0; +#endif + ph->ph_fuse = 0; + } + if (ph->ph_status != PHFREE && (j->p_status == PALIVE || j->p_status == PEXPLODE || j->p_status == PDEAD) && !(j->p_x < 0 || j->p_x > GWIDTH)) @@ -1187,6 +1198,30 @@ continue; if (k->t_x < 0 || k->t_y < 0) continue; + + /* Age a torp only if some weapon has been updated + * (eg this is not a pause). */ + if ((k->t_updateFuse -= weaponUpdate) == 0) + { + if (k->t_status != TEXPLODE || k->t_clear == 1) + { + /* Expire the torp */ +#if 0 + fputs ("[torp]", stderr); + fflush (stderr); +#endif + k->t_status = TFREE; + j->p_ntorp--; + continue; + } + else + { + /* Leave the torp to explode on its own */ + k->t_updateFuse = BMP_TORPDET_FRAMES * server_ups / 10; + k->t_clear = 1; + } + } + dx = k->t_x * WINSIDE / GWIDTH; dy = k->t_y * WINSIDE / GWIDTH; @@ -1220,6 +1255,28 @@ continue; if (pt->pt_x < 0 || pt->pt_y < 0) continue; + + if ((pt->pt_updateFuse -= weaponUpdate) == 0) + { + if (pt->pt_status != PTEXPLODE || pt->pt_clear == 1) + { + /* Expire the plasma */ +#if 0 + fputs ("[plasma]", stderr); + fflush (stderr); +#endif + pt->pt_status = PTFREE; + players[pt->pt_owner].p_nplasmatorp--; + continue; + } + else + { + /* Leave the plasma to explode on its own */ + pt->pt_updateFuse = BMP_TORPDET_FRAMES * server_ups / 10; + pt->pt_clear = 1; + } + } + dx = pt->pt_x * WINSIDE / GWIDTH; dy = pt->pt_y * WINSIDE / GWIDTH; @@ -1251,6 +1308,8 @@ } } } + /* Reset weapon update marker */ + weaponUpdate = 0; /* Draw the lock symbol (if needed) */ Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.84 retrieving revision 1.85 diff -u -d -r1.84 -r1.85 --- local.c 3 Apr 2007 00:36:32 -0000 1.84 +++ local.c 4 Apr 2007 04:06:37 -0000 1.85 @@ -794,7 +794,7 @@ the ship drawing code with the goto statement */ if (j->p_flags & PFCLOAK && (j->p_cloakphase == (cloak_phases - 1))) { - if (myPlayer (j) + if (myPlayer (j) || (showCloakers && F_show_cloakers) #ifdef RECORDGAME || playback #endif @@ -1478,14 +1478,17 @@ } #endif - if ((php->ph_updateFuse -= weaponUpdate) == 0) + if (!weaponsOnMap) { - /* Expire the phaser */ - php->ph_status = PHFREE; + if ((php->ph_updateFuse -= weaponUpdate) == 0) + { + /* Expire the phaser */ + php->ph_status = PHFREE; #ifdef SOUND - php->sound_phaser = 0; + php->sound_phaser = 0; #endif - php->ph_fuse = 0; + php->ph_fuse = 0; + } } else { @@ -1856,26 +1859,29 @@ --torpCount; - /* Age a torp only if some weapon has been updated - * (eg this is not a pause). */ - if ((k->t_updateFuse -= weaponUpdate) == 0) + if (!weaponsOnMap) { - if (k->t_status != TEXPLODE) + /* Age a torp only if some weapon has been updated + * (eg this is not a pause). */ + if ((k->t_updateFuse -= weaponUpdate) == 0) { - /* Expire the torp */ + if (k->t_status != TEXPLODE || k->t_clear == 1) + { + /* Expire the torp */ #if 0 - fputs ("[torp]", stderr); - fflush (stderr); + fputs ("[torp]", stderr); + fflush (stderr); #endif - k->t_status = TFREE; - j->p_ntorp--; - continue; - } - else - { - /* Leave the torp to explode on its own */ - - k->t_updateFuse = 100; + k->t_status = TFREE; + j->p_ntorp--; + continue; + } + else + { + /* Leave the torp to explode on its own */ + k->t_updateFuse = BMP_TORPDET_FRAMES * server_ups / 10; + k->t_clear = 1; + } } } @@ -1883,15 +1889,7 @@ dy = k->t_y - me->p_y; if (dx > view || dx < -view || dy > view || dy < -view) - { - /* Call any torps off screen "free" (if owned by other) */ - if (k->t_status == TEXPLODE && j != me) - { - k->t_status = TFREE; - j->p_ntorp--; - } continue; - } dx = dx / SCALE + WINSIDE / 2; dy = dy / SCALE + WINSIDE / 2; @@ -2091,24 +2089,27 @@ if (pt->pt_owner != me->p_no) num_other_plasmas++; #endif - if ((pt->pt_updateFuse -= weaponUpdate) == 0) + if (!weaponsOnMap) { - if (pt->pt_status != PTEXPLODE) + if ((pt->pt_updateFuse -= weaponUpdate) == 0) { - /* Expire the torp */ -#ifdef DEBUG - fputs ("[plasma]", stderr); - fflush (stderr); + if (pt->pt_status != PTEXPLODE || pt->pt_clear == 1) + { + /* Expire the plasma */ +#if 0 + fputs ("[plasma]", stderr); + fflush (stderr); #endif - pt->pt_status = PTFREE; - players[pt->pt_owner].p_nplasmatorp--; - continue; - } - else - { - /* Leave the torp to explode on its own */ - - pt->pt_updateFuse = 100; + pt->pt_status = PTFREE; + players[pt->pt_owner].p_nplasmatorp--; + continue; + } + else + { + /* Leave the plasma to explode on its own */ + pt->pt_updateFuse = BMP_TORPDET_FRAMES * server_ups / 10; + pt->pt_clear = 1; + } } } @@ -2138,7 +2139,6 @@ if (pt->pt_status == PTEXPLODE) { pt->pt_fuse--; - frame = pt->pt_fuse * 10 / server_ups; if (pt->pt_fuse <= 0) @@ -2662,7 +2662,8 @@ DrawTorps (); DrawPlasmaTorps (); - weaponUpdate = 0; + if (!weaponsOnMap) + weaponUpdate = 0; DrawMisc (); #ifdef RECORDGAME Index: short.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/short.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- short.c 3 Apr 2007 00:36:32 -0000 1.19 +++ short.c 4 Apr 2007 04:06:38 -0000 1.20 @@ -275,6 +275,7 @@ /* Updatefuse requires minimum value of 2 to ensure a redraw, updateFuse decremented before drawing torp in local.c */ thetorp->t_updateFuse = MAX(2, TORP_UPDATE_FUSE * server_ups / 10); + thetorp->t_clear = 0; if (bitset & 01) { @@ -1002,6 +1003,7 @@ /* Updatefuse requires minimum value of 2 to ensure a redraw, updateFuse decremented before drawing torp in local.c */ thetorp->t_updateFuse = MAX(2, TORP_UPDATE_FUSE * server_ups / 10); + thetorp->t_clear = 0; if (*bitset & 01) { Index: socket.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- socket.c 3 Apr 2007 00:36:32 -0000 1.25 +++ socket.c 4 Apr 2007 04:06:38 -0000 1.26 @@ -1213,6 +1213,7 @@ /* Updatefuse requires minimum value of 2 to ensure a redraw, updateFuse decremented before drawing torp in local.c */ thetorp->t_updateFuse = MAX(2, TORP_UPDATE_FUSE * server_ups / 10); + thetorp->t_clear = 0; #ifdef ROTATERACE @@ -1243,6 +1244,7 @@ /* Updatefuse requires minimum value of 2 to ensure a redraw, updateFuse decremented before drawing torp in local.c */ thetorp->t_updateFuse = MAX(2, TORP_UPDATE_FUSE * server_ups / 10); + thetorp->t_clear = 0; if (packet->status == TEXPLODE && thetorp->t_status == TFREE) { @@ -1878,6 +1880,7 @@ /* Updatefuse requires minimum value of 2 to ensure a redraw, updateFuse decremented before drawing torp in local.c */ thetorp->pt_updateFuse = MAX(2, PLASMA_UPDATE_FUSE * server_ups / 10); + thetorp->pt_clear = 0; if (packet->status == PTEXPLODE && thetorp->pt_status == PTFREE) { /* FAT: redundant explosion; don't update p_nplasmatorp */ @@ -1925,6 +1928,7 @@ /* Updatefuse requires minimum value of 2 to ensure a redraw, updateFuse decremented before drawing torp in local.c */ thetorp->pt_updateFuse = MAX(2, PLASMA_UPDATE_FUSE * server_ups / 10); + thetorp->pt_clear = 0; #ifdef ROTATERACE if (rotate) Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.75 retrieving revision 1.76 diff -u -d -r1.75 -r1.76 --- data.c 3 Apr 2007 00:36:32 -0000 1.75 +++ data.c 4 Apr 2007 04:06:37 -0000 1.76 @@ -57,6 +57,7 @@ int showdetCircle = 0; /* Det circle toggles on only when det is hit */ int puckCircle = 0; /* Show maximum puck shooting distance on tactical */ int showArmy = 1; /* Show army count of planet you are orbiting */ +int showCloakers = 1; /* Show cloakers on tactical */ int fastQuit = 0; int gen_distress = 0; /* generic distress/macro * system support */ @@ -682,6 +683,7 @@ int F_full_weapon_resolution = 0; int F_show_army_count = 0; int F_show_other_speed = 0; +int F_show_cloakers = 0; #ifdef RECORDGAME int F_many_self = 0; Index: feature.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/feature.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- feature.c 3 Apr 2007 00:36:32 -0000 1.11 +++ feature.c 4 Apr 2007 04:06:37 -0000 1.12 @@ -95,6 +95,7 @@ {"SHOW_ALL_TRACTORS", &F_show_all_tractors, 'S', 1, 0, 0}, {"SHOW_ARMY_COUNT", &F_show_army_count, 'S', 1, 0, 0}, {"SHOW_OTHER_SPEED", &F_show_other_speed, 'S', 1, 0, 0}, + {"SHOW_CLOAKERS", &F_show_cloakers, 'S', 1, 0, 0}, {0, 0, 0, 0, 0, 0} }; Index: option.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/option.c,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- option.c 3 Apr 2007 00:36:32 -0000 1.43 +++ option.c 4 Apr 2007 04:06:38 -0000 1.44 @@ -279,6 +279,7 @@ {1, "use warning hull", &vary_hull, 0, 0, 0, NULL, NULL}, {1, "show my speed on local", &showMySpeed, 0, 0, 0, NULL, NULL}, {1, "show other's speed on local", &showOtherSpeed, 0, 0, 0, NULL, NULL}, + {1, "show cloakers on local", &showCloakers, 0, 0, 0, NULL, NULL}, {1, "show tractor/pressor beams", &showTractorPressor, 0, 0, 0, NULL, NULL}, {1, "show tractors after lock", &continueTractor, 0, 0, 0, NULL, NULL}, {1, "show tractor target ID", &tractorID, 0, 0, 0, NULL, NULL}, Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.66 retrieving revision 1.67 diff -u -d -r1.66 -r1.67 --- defaults.c 3 Apr 2007 00:36:32 -0000 1.66 +++ defaults.c 4 Apr 2007 04:06:37 -0000 1.67 @@ -630,6 +630,13 @@ NULL } }, + {"showCloakers", &showCloakers, RC_BOOL, + { + "Show other cloakers on local", + "Server god decides whether to enable it on server", + NULL + } + }, {"showHints", &showHints, RC_BOOL, { "Show hints window", @@ -1704,6 +1711,7 @@ puckCircle = booleanDefault ("puckCircle", puckCircle); puckArrow = booleanDefault ("puckArrow", puckArrow); showArmy = intDefault ("showArmy", showArmy); + showCloakers = booleanDefault ("showCloakers", showCloakers); redrawDelay = intDefault ("redrawDelay", redrawDelay); planetHighlighting = booleanDefault ("planetHighlighting", planetHighlighting); rotatePlanets = booleanDefault ("rotatePlanets", rotatePlanets); From modemhero at users.sourceforge.net Tue Apr 3 23:06:38 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 04 Apr 2007 04:06:38 +0000 Subject: [netrek-cvs] client/netrekxp/include data.h, 1.68, 1.69 struct.h, 1.15, 1.16 Message-ID: <20070404040648.784F6B49A@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23500/include Modified Files: data.h struct.h Log Message: Added new entries to torp and plasma struct, t_clear and pt_clear, to mark an exploding plasma or torp as needing to be freed once its explosion cycle is over. Covers the case where a torp explodes, but the free packet is lost. Previously, the torp would never clear until it was no longer in the local map range. If weaponsOnMap option is on, internal timer to determine when it's safe to expire weapons is moved to map draw routine. Fixes problem where observers who are not locked onto anyone but still getting weapons drawn on map would have problems with weapons (like phasers) not expiring correctly due to packet loss enemy torps which are off local screen are no longer automatically freed (since this data is now sent for observers). Also changed exploding torps to use the time of explosion cycle rather than an arbitrary timer of 100 for expiry. Added support for SHOW_CLOAKERS feature packet. New netrekrc option "showCloakers: (on)/off" to show other cloakers on tactical, only works if server has the new feature packet SHOW_CLOAKERS on. Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.68 retrieving revision 1.69 diff -u -d -r1.68 -r1.69 --- data.h 3 Apr 2007 00:36:32 -0000 1.68 +++ data.h 4 Apr 2007 04:06:36 -0000 1.69 @@ -189,6 +189,7 @@ extern int showdetCircle; extern int puckCircle; extern int showArmy; +extern int showCloakers; extern int niftyNewMessages; extern int fastQuit; extern char *shipnos; @@ -577,6 +578,7 @@ extern int F_full_weapon_resolution; extern int F_show_army_count; extern int F_show_other_speed; +extern int F_show_cloakers; #ifdef RECORDGAME extern int F_many_self; Index: struct.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/struct.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- struct.h 27 Feb 2007 08:37:06 -0000 1.15 +++ struct.h 4 Apr 2007 04:06:36 -0000 1.16 @@ -317,6 +317,7 @@ short t_fuse; /* Life left in current state */ unsigned char t_updateFuse; /* Updates before torp will expire */ unsigned char t_dir; /* direction */ + int t_clear; /* Flag to clear exploding torps */ }; @@ -337,6 +338,7 @@ short pt_updateFuse; /* Time till expiry */ int pt_x; int pt_y; + int pt_clear; /* Flag to clear exploding plasmas */ }; #define PHFREE 0x00 From modemhero at users.sourceforge.net Tue Apr 3 23:06:39 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 04 Apr 2007 04:06:39 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.156, 1.157 netrekrc, 1.50, 1.51 netrekrc_options.txt, 1.44, 1.45 Message-ID: <20070404040648.47EE3B47F@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23500/resources/docs Modified Files: changes.txt netrekrc netrekrc_options.txt Log Message: Added new entries to torp and plasma struct, t_clear and pt_clear, to mark an exploding plasma or torp as needing to be freed once its explosion cycle is over. Covers the case where a torp explodes, but the free packet is lost. Previously, the torp would never clear until it was no longer in the local map range. If weaponsOnMap option is on, internal timer to determine when it's safe to expire weapons is moved to map draw routine. Fixes problem where observers who are not locked onto anyone but still getting weapons drawn on map would have problems with weapons (like phasers) not expiring correctly due to packet loss enemy torps which are off local screen are no longer automatically freed (since this data is now sent for observers). Also changed exploding torps to use the time of explosion cycle rather than an arbitrary timer of 100 for expiry. Added support for SHOW_CLOAKERS feature packet. New netrekrc option "showCloakers: (on)/off" to show other cloakers on tactical, only works if server has the new feature packet SHOW_CLOAKERS on. Index: netrekrc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- netrekrc 3 Apr 2007 00:36:32 -0000 1.50 +++ netrekrc 4 Apr 2007 04:06:37 -0000 1.51 @@ -341,6 +341,10 @@ # 3 - show army counts on both maps showArmy: 1 +# Show other cloakers on local +# Server god decides whether to enable this feature +showCloakers: on + # Show hints window showHints: on Index: netrekrc_options.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc_options.txt,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- netrekrc_options.txt 3 Apr 2007 00:36:32 -0000 1.44 +++ netrekrc_options.txt 4 Apr 2007 04:06:37 -0000 1.45 @@ -246,6 +246,7 @@ # 2 - show army counts on galactic map only # 3 - show army counts on both maps +showCloakers: (on/off) show cloakers on tactical showHints: (on/off) show hints window showHockeyLinesLocal: (on/off) show hockey lines on tactical showHockeyLinesMap: (on/off) show hockey lines on galactic Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.156 retrieving revision 1.157 diff -u -d -r1.156 -r1.157 --- changes.txt 3 Apr 2007 00:36:32 -0000 1.156 +++ changes.txt 4 Apr 2007 04:06:36 -0000 1.157 @@ -1,4 +1,13 @@ Netrek XP 2006, Version 1.3: +- if weaponsOnMap option is on, internal timer to determine when it's safe to expire + weapons is moved to map draw routine. Fixes problem where observers who are not + locked onto anyone but still getting weapons drawn on map would have problems + with weapons (like phasers) not expiring correctly due to packet loss +- enemy torps which are off local screen are no longer automatically freed (since + this data is now sent for observers). Also fixed an issue with exploding torps + that would not clear properly. +- new netrekrc option "showCloakers: (on)/off" to show other cloakers on tactical, + only works if server has the new feature packet SHOW_CLOAKERS on. - new netrekrc option "showOtherSpeed: (on)/off" to show speed next to other players, only works if server has the new feature packet SHOW_OTHER_SPEED on. - changed showArmy option to be a range (0-3), to take advantage of new server feature From modemhero at users.sourceforge.net Tue Apr 3 23:06:39 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 04 Apr 2007 04:06:39 +0000 Subject: [netrek-cvs] client/netrekxp/resources/htmlhelp/html generalconfig.html, 1.45, 1.46 Message-ID: <20070404040648.3C6CF18686B@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23500/resources/htmlhelp/html Modified Files: generalconfig.html Log Message: Added new entries to torp and plasma struct, t_clear and pt_clear, to mark an exploding plasma or torp as needing to be freed once its explosion cycle is over. Covers the case where a torp explodes, but the free packet is lost. Previously, the torp would never clear until it was no longer in the local map range. If weaponsOnMap option is on, internal timer to determine when it's safe to expire weapons is moved to map draw routine. Fixes problem where observers who are not locked onto anyone but still getting weapons drawn on map would have problems with weapons (like phasers) not expiring correctly due to packet loss enemy torps which are off local screen are no longer automatically freed (since this data is now sent for observers). Also changed exploding torps to use the time of explosion cycle rather than an arbitrary timer of 100 for expiry. Added support for SHOW_CLOAKERS feature packet. New netrekrc option "showCloakers: (on)/off" to show other cloakers on tactical, only works if server has the new feature packet SHOW_CLOAKERS on. Index: generalconfig.html =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html/generalconfig.html,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- generalconfig.html 3 Apr 2007 00:36:32 -0000 1.45 +++ generalconfig.html 4 Apr 2007 04:06:37 -0000 1.46 @@ -1069,6 +1069,16 @@ +showCloakers +Show cloakers on tactical + +
    +
  • on (default)
  • +
  • off
  • +
+ + + showHints Show hints window From modemhero at users.sourceforge.net Tue Apr 3 23:06:38 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 04 Apr 2007 04:06:38 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C, 1.122, 1.123 clientr.suo, 1.112, 1.113 Message-ID: <20070404040648.49E7CB486@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23500 Modified Files: NetrekXP to do list.C clientr.suo Log Message: Added new entries to torp and plasma struct, t_clear and pt_clear, to mark an exploding plasma or torp as needing to be freed once its explosion cycle is over. Covers the case where a torp explodes, but the free packet is lost. Previously, the torp would never clear until it was no longer in the local map range. If weaponsOnMap option is on, internal timer to determine when it's safe to expire weapons is moved to map draw routine. Fixes problem where observers who are not locked onto anyone but still getting weapons drawn on map would have problems with weapons (like phasers) not expiring correctly due to packet loss enemy torps which are off local screen are no longer automatically freed (since this data is now sent for observers). Also changed exploding torps to use the time of explosion cycle rather than an arbitrary timer of 100 for expiry. Added support for SHOW_CLOAKERS feature packet. New netrekrc option "showCloakers: (on)/off" to show other cloakers on tactical, only works if server has the new feature packet SHOW_CLOAKERS on. Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.122 retrieving revision 1.123 diff -u -d -r1.122 -r1.123 --- NetrekXP to do list.C 2 Apr 2007 21:12:41 -0000 1.122 +++ NetrekXP to do list.C 4 Apr 2007 04:06:34 -0000 1.123 @@ -46,6 +46,7 @@ 10) sendto() error: 10049 on metaserver connect to a bad server, believe it's due to hostname not resolving. Currently fixed by using mulitple attempts to resolve bad host names. +11) redundancy in planet army count Stas's list: - color coded (?) and scrollable playerlist. Index: clientr.suo =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.suo,v retrieving revision 1.112 retrieving revision 1.113 diff -u -d -r1.112 -r1.113 Binary files /tmp/cvsPFnu09 and /tmp/cvsVtVmn0 differ From modemhero at users.sourceforge.net Wed Apr 4 05:34:24 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 04 Apr 2007 10:34:24 +0000 Subject: [netrek-cvs] client/netrekxp/src data.c, 1.76, 1.77 feature.c, 1.12, 1.13 map.c, 1.40, 1.41 socket.c, 1.26, 1.27 Message-ID: <20070404103433.F0A4BB445@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv3525/src Modified Files: data.c feature.c map.c socket.c Log Message: Support for F_check_planets feature packet, which includes new struct planet_cpacket which cross-checks with server to make sure all planet info is correct. Updated 10 times/sec for planet being orbitted, and every 5 seconds for the other "touched" planets. Reduces need for small update to refresh planets, and minimizes the effect of lost planet packets on gameplay. Index: feature.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/feature.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- feature.c 4 Apr 2007 04:06:37 -0000 1.12 +++ feature.c 4 Apr 2007 10:34:22 -0000 1.13 @@ -79,6 +79,7 @@ {"SP_GENERIC_32", &F_sp_generic_32, 'S', 1, 0, 0}, {"FULL_DIRECTION_RESOLUTION", &F_full_direction_resolution, 'S', 1, 0, 0}, {"FULL_WEAPON_RESOLUTION", &F_full_weapon_resolution, 'S', 1, 0, 0}, + {"CHECK_PLANETS", &F_check_planets, 'S', 1, 0, 0}, #ifdef WARP_DEAD {"DEAD_WARP", &F_dead_warp, 'S', 1, 0, 0}, Index: map.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- map.c 4 Apr 2007 04:06:38 -0000 1.40 +++ map.c 4 Apr 2007 10:34:22 -0000 1.41 @@ -63,6 +63,8 @@ static int mcleararea[4][(MAXTORP + 1) * MAXPLAYER + (MAXPLASMA + 1) * MAXPLAYER]; static int mclearx, mcleary, mclearr; /* x,y,radius for range circle */ static int mclearccount; +static int planet_refresh = 0; +static int orbit_planet_refresh = 0; /* * Global Variables: @@ -502,6 +504,27 @@ for (l = planets + MAXPLANETS - 1; l >= planets; --l) { + /* Synchronize planet info (up to 10 times/second) for current orbitted planet + and once every 5 seconds for all other planets we have info on*/ + if (F_check_planets) + { + if ((me->p_flags & PFORBIT) + && (F_sp_generic_32 ? me->pl_orbit : get_closest_planet(me->p_x, me->p_y)) == l->pl_no) + { + orbit_planet_refresh++; + if ((orbit_planet_refresh * 10 / server_ups) >= 1) + { + sendPlanetsPacket(l->pl_no); + orbit_planet_refresh = 0; + } + } + else if (l->pl_info & me->p_team) + { + if ((planet_refresh * 10 / server_ups) >= 50) + sendPlanetsPacket(l->pl_no); + } + } + if (!(l->pl_flags & PLREDRAW)) continue; @@ -939,6 +962,15 @@ DrawPlanets (); + /* Increment counter for requesting planet sync (F_check_planets) */ + if (F_check_planets) + { + if ((planet_refresh * 10 / server_ups) >= 50) + planet_refresh = 0; + else + planet_refresh++; + } + #ifdef DEBUG_SHOW_REGIONS /* Debugging code */ showRegions(); #endif Index: socket.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- socket.c 4 Apr 2007 04:06:38 -0000 1.26 +++ socket.c 4 Apr 2007 10:34:22 -0000 1.27 @@ -261,7 +261,7 @@ 0, /* 37 */ #endif - 0, /* 38 */ + sizeof (struct planet_cpacket), /* CP_PLANET */ 0, /* 39 */ 0, /* 40 */ 0, /* 41 */ @@ -1586,6 +1586,7 @@ case CP_SHIELD: case CP_REPAIR: case CP_ORBIT: + case CP_PLANET: case CP_PLANLOCK: case CP_PLAYLOCK: case CP_BOMB: @@ -2110,6 +2111,23 @@ } void +sendPlanetsPacket (int pnum) +{ + struct planet_cpacket planPacket; + struct planet *pl; + + pl = &planets[pnum]; + + planPacket.type = CP_PLANET; + planPacket.pnum = pl->pl_no; + planPacket.owner = pl->pl_owner; + planPacket.info = pl->pl_info; + planPacket.armies = htonl (pl->pl_armies); + planPacket.flags = htons ((short) (pl->pl_flags)); + sendServerPacket ((struct player_spacket *) &planPacket); +} + +void pickSocket (int old) { int newsocket; @@ -3976,7 +3994,7 @@ LineToConsole("\nC->S CP_REPAIR\t"); if (log_packets > 1) LineToConsole(" state=%d,", - ((struct repair_cpacket *) packet)-> state ); + ((struct repair_cpacket *) packet)->state ); break; case CP_ORBIT : /* orbit planet/starbase */ LineToConsole("\nC->S CP_ORBIT\t"); @@ -3984,6 +4002,12 @@ LineToConsole(" state=%d,", ((struct orbit_cpacket *) packet)->state ); break; + case CP_PLANET : /* planet info */ + LineToConsole("\nC->S CP_PLANET\t"); + if (log_packets > 1) + LineToConsole(" pnum=%d,", + ((struct planet_cpacket *) packet)->pnum ); + break; case CP_PLANLOCK : /* lock on planet */ LineToConsole("\nC->S CP_PLANLOCK\t"); if (log_packets > 1) Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.76 retrieving revision 1.77 diff -u -d -r1.76 -r1.77 --- data.c 4 Apr 2007 04:06:37 -0000 1.76 +++ data.c 4 Apr 2007 10:34:22 -0000 1.77 @@ -681,6 +681,7 @@ int F_sp_generic_32 = 0; int F_full_direction_resolution = 0; int F_full_weapon_resolution = 0; +int F_check_planets = 0; int F_show_army_count = 0; int F_show_other_speed = 0; int F_show_cloakers = 0; From modemhero at users.sourceforge.net Wed Apr 4 05:34:23 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 04 Apr 2007 10:34:23 +0000 Subject: [netrek-cvs] client/netrekxp/include data.h, 1.69, 1.70 packets.h, 1.5, 1.6 proto.h, 1.43, 1.44 Message-ID: <20070404103433.94A67B435@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv3525/include Modified Files: data.h packets.h proto.h Log Message: Support for F_check_planets feature packet, which includes new struct planet_cpacket which cross-checks with server to make sure all planet info is correct. Updated 10 times/sec for planet being orbitted, and every 5 seconds for the other "touched" planets. Reduces need for small update to refresh planets, and minimizes the effect of lost planet packets on gameplay. Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.69 retrieving revision 1.70 diff -u -d -r1.69 -r1.70 --- data.h 4 Apr 2007 04:06:36 -0000 1.69 +++ data.h 4 Apr 2007 10:34:21 -0000 1.70 @@ -576,6 +576,7 @@ extern int F_sp_generic_32; extern int F_full_direction_resolution; extern int F_full_weapon_resolution; +extern int F_check_planets; extern int F_show_army_count; extern int F_show_other_speed; extern int F_show_cloakers; Index: packets.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/packets.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- packets.h 18 Dec 2006 00:13:05 -0000 1.5 +++ packets.h 4 Apr 2007 10:34:21 -0000 1.6 @@ -175,6 +175,8 @@ * verification */ #endif +#define CP_PLANET 38 /* cross-check planet info */ + #define CP_PING_RESPONSE 42 /* client response */ #ifdef SHORT_PACKETS @@ -426,6 +428,16 @@ char pad2; }; +struct planet_cpacket +{ + char type; /* CP_PLANET */ + char pnum; + char owner; + char info; + unsigned short flags; + int armies; +}; + struct practr_cpacket { char type; /* CP_PRACTR */ Index: proto.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/proto.h,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- proto.h 1 Apr 2007 10:11:36 -0000 1.43 +++ proto.h 4 Apr 2007 10:34:21 -0000 1.44 @@ -1096,6 +1096,7 @@ struct mask_spacket; void handleMask (struct mask_spacket *packet); void sendOptionsPacket (void); +void sendPlanetsPacket (int pnum); void pickSocket (int old); struct badversion_spacket; void handleBadVersion (struct badversion_spacket *packet); From modemhero at users.sourceforge.net Wed Apr 4 05:34:23 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 04 Apr 2007 10:34:23 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C, 1.123, 1.124 clientr.suo, 1.113, 1.114 Message-ID: <20070404103433.A81EAB444@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv3525 Modified Files: NetrekXP to do list.C clientr.suo Log Message: Support for F_check_planets feature packet, which includes new struct planet_cpacket which cross-checks with server to make sure all planet info is correct. Updated 10 times/sec for planet being orbitted, and every 5 seconds for the other "touched" planets. Reduces need for small update to refresh planets, and minimizes the effect of lost planet packets on gameplay. Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.123 retrieving revision 1.124 diff -u -d -r1.123 -r1.124 --- NetrekXP to do list.C 4 Apr 2007 04:06:34 -0000 1.123 +++ NetrekXP to do list.C 4 Apr 2007 10:34:19 -0000 1.124 @@ -46,7 +46,6 @@ 10) sendto() error: 10049 on metaserver connect to a bad server, believe it's due to hostname not resolving. Currently fixed by using mulitple attempts to resolve bad host names. -11) redundancy in planet army count Stas's list: - color coded (?) and scrollable playerlist. Index: clientr.suo =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.suo,v retrieving revision 1.113 retrieving revision 1.114 diff -u -d -r1.113 -r1.114 Binary files /tmp/cvsWU0DAb and /tmp/cvsqHwti4 differ From modemhero at users.sourceforge.net Wed Apr 4 05:34:24 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 04 Apr 2007 10:34:24 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.157, 1.158 Message-ID: <20070404103433.7C2EBB434@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv3525/resources/docs Modified Files: changes.txt Log Message: Support for F_check_planets feature packet, which includes new struct planet_cpacket which cross-checks with server to make sure all planet info is correct. Updated 10 times/sec for planet being orbitted, and every 5 seconds for the other "touched" planets. Reduces need for small update to refresh planets, and minimizes the effect of lost planet packets on gameplay. Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.157 retrieving revision 1.158 diff -u -d -r1.157 -r1.158 --- changes.txt 4 Apr 2007 04:06:36 -0000 1.157 +++ changes.txt 4 Apr 2007 10:34:21 -0000 1.158 @@ -1,4 +1,11 @@ Netrek XP 2006, Version 1.3: +- added support for CHECK_PLANETS feature packet, this is a nice packet that checks + with the server to make sure your planet info is up to date, so no more phantom + armies on a planet or delay on bombing a planet flat because you lost a planet + packet. Also no more wondering if you missed a planet packet while dropping. + if planet army count doesn't go down. This cross-check with server occurs 10 times/ + second for a planet you are orbitting (critical) and every 5 seconds for all the + planets your team has info on (non-critical). - if weaponsOnMap option is on, internal timer to determine when it's safe to expire weapons is moved to map draw routine. Fixes problem where observers who are not locked onto anyone but still getting weapons drawn on map would have problems From modemhero at users.sourceforge.net Thu Apr 5 07:57:24 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 05 Apr 2007 12:57:24 +0000 Subject: [netrek-cvs] client/netrekxp/include data.h, 1.70, 1.71 defs.h, 1.17, 1.18 proto.h, 1.44, 1.45 wlib.h, 1.10, 1.11 Message-ID: <20070405125734.81315186807@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv14570/include Modified Files: data.h defs.h proto.h wlib.h Log Message: This lengthy patch contains one groundbreaking item - allowing user to configure directly the size of the local and map windows. Most of this patch fixes all the problems that needed to be solved to make this happen. First off, it was necessary to have the netrekrc defaults read in BEFORE windows are generated. So in both cowmain. and playback.c, the order of newwin() and resetdefaults() were exchanged. This created a problem though in the netrekrc Windows Allowed Message settings required the window to actually exist first, so this was yanked out of the resetdefaults() routine and placed into newwin(). It was also copied over to the reread netrekrc function, so that rereading netrekrc will update the WAMs. Half-finished code for rechecking windows geometry after reading defaults is now obsolete, and a comment has been left to that effect. This exchange also fixes one of the problems with richText. The netrekrc richText option now works, as it controls what sort of message windows are created. Still buggy, but at least it's mostly functional. Getting back to the initial goal, WINSIDE and SCALE were moved from defines to variables. This required some changes to be made. Any static variable which relied on WINSIDE had to be moved into functions. This was not so difficult, as it just required some view/fullview variables to be redefined in the star redraw functions, and tts_ypos had to be changed a bit so that the preferred value was not the value in data.c but rather a value based on WINSIDE. With WINSIDE now a variable, the checkGeometry function can now set WINSIDE to match the geometry in the user's netrekrc file. Some (ok a LOT) of work still needs to be done, to separate WINSIDE into 2 variables, TWINSIDE and GWINSIDE, so local and map can be different size squares. Testing WINSIDE=1000 revealed that the star sectors did not scale properly, and indeed it was a design flaw which needed to be fixed. Star sectors now are defined to be the size of the local window, and the star density remains constant no matter what size window. As it is now possible to have GWIDTH divided by star sectors != integer, it was necessary to put in some additonal checks against drawing stars outside of galactic bounds, and to add an additional star sector in either direction to handle the case where we need a fraction of a star sector to fill in space (i.e if WINSIDE = 1000, local stretches 40000 galactic units, that makes galaxy 2.5 star sectors wide, and since most things get rounded down, we need to create 2.5 + 1 = 3 star sectors). It turns out the old code made 4x as many star sectors as there was galaxy, for some odd reason, so this is a nice improvement actually! Since the local window can now be expanded, I added in a dashed line to show the old 20000x20000 local scale, because some data is not sent beyond this (ie other people's weapons). A new INFORANGE constant is defined, and if WINSIDE > INFORANGE, we draw these dashed lines to indicate fog of war. The SMALL_SCREEN option, which wasn't functional anyways, was removed as it is now obsolete. New draw line function W_MakeDashedLine for making a line using the dashed pen. Added in a debug statement to ignore feature packet settings to test the new infoborg features. Index: wlib.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/wlib.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- wlib.h 19 Mar 2007 00:05:13 -0000 1.10 +++ wlib.h 5 Apr 2007 12:57:22 -0000 1.11 @@ -149,6 +149,12 @@ int x1, int y1, W_Color color); +extern void W_MakeDashedLine (W_Window window, + int x0, + int y0, + int x1, + int y1, + W_Color color); extern void W_MapWindow (W_Window window); extern void W_UnmapWindow (W_Window window); extern int W_EventsPending (void); Index: defs.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/defs.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- defs.h 1 Apr 2007 10:11:36 -0000 1.17 +++ defs.h 5 Apr 2007 12:57:22 -0000 1.18 @@ -27,14 +27,6 @@ #define MAXPLASMA 1 #define PKEY 128 - -#ifdef SMALL_SCREEN -#define WINSIDE 400 -#else -#define WINSIDE 500 /* Size of strategic and - * tactical windows */ -#endif - #define CORNER_DIST (int)(sqrt)(WINSIDE*WINSIDE/2) #define BORDER 1 /* border width for option @@ -57,8 +49,6 @@ * on a side */ #define WARP1 20 /* warp one will move 20 * spaces per update */ -#define SCALE 40 /* Window will be one pixel - * for 20 spaces */ #define EXPDIST 350 /* At this range a torp will * explode */ #define DETDIST 1700 /* At this range a player Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.70 retrieving revision 1.71 diff -u -d -r1.70 -r1.71 --- data.h 4 Apr 2007 10:34:21 -0000 1.70 +++ data.h 5 Apr 2007 12:57:22 -0000 1.71 @@ -48,6 +48,9 @@ extern struct memory universe; extern struct planet pdata[]; +extern int WINSIDE; /* This used to be a define ... */ +extern int SCALE; /* and so was this ... */ + extern unsigned int oldalert; extern unsigned char oldtourn; extern unsigned int oldengflag; Index: proto.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/proto.h,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- proto.h 4 Apr 2007 10:34:21 -0000 1.44 +++ proto.h 5 Apr 2007 12:57:22 -0000 1.45 @@ -560,6 +560,12 @@ int x1, int y1, W_Color color); +void W_MakeDashedLine (W_Window window, + int x0, + int y0, + int x1, + int y1, + W_Color color); void W_CacheLine (W_Window window, int x0, int y0, From modemhero at users.sourceforge.net Thu Apr 5 07:57:24 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 05 Apr 2007 12:57:24 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs netrekrc,1.51,1.52 Message-ID: <20070405125734.7A803B430@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv14570/resources/docs Modified Files: netrekrc Log Message: This lengthy patch contains one groundbreaking item - allowing user to configure directly the size of the local and map windows. Most of this patch fixes all the problems that needed to be solved to make this happen. First off, it was necessary to have the netrekrc defaults read in BEFORE windows are generated. So in both cowmain. and playback.c, the order of newwin() and resetdefaults() were exchanged. This created a problem though in the netrekrc Windows Allowed Message settings required the window to actually exist first, so this was yanked out of the resetdefaults() routine and placed into newwin(). It was also copied over to the reread netrekrc function, so that rereading netrekrc will update the WAMs. Half-finished code for rechecking windows geometry after reading defaults is now obsolete, and a comment has been left to that effect. This exchange also fixes one of the problems with richText. The netrekrc richText option now works, as it controls what sort of message windows are created. Still buggy, but at least it's mostly functional. Getting back to the initial goal, WINSIDE and SCALE were moved from defines to variables. This required some changes to be made. Any static variable which relied on WINSIDE had to be moved into functions. This was not so difficult, as it just required some view/fullview variables to be redefined in the star redraw functions, and tts_ypos had to be changed a bit so that the preferred value was not the value in data.c but rather a value based on WINSIDE. With WINSIDE now a variable, the checkGeometry function can now set WINSIDE to match the geometry in the user's netrekrc file. Some (ok a LOT) of work still needs to be done, to separate WINSIDE into 2 variables, TWINSIDE and GWINSIDE, so local and map can be different size squares. Testing WINSIDE=1000 revealed that the star sectors did not scale properly, and indeed it was a design flaw which needed to be fixed. Star sectors now are defined to be the size of the local window, and the star density remains constant no matter what size window. As it is now possible to have GWIDTH divided by star sectors != integer, it was necessary to put in some additonal checks against drawing stars outside of galactic bounds, and to add an additional star sector in either direction to handle the case where we need a fraction of a star sector to fill in space (i.e if WINSIDE = 1000, local stretches 40000 galactic units, that makes galaxy 2.5 star sectors wide, and since most things get rounded down, we need to create 2.5 + 1 = 3 star sectors). It turns out the old code made 4x as many star sectors as there was galaxy, for some odd reason, so this is a nice improvement actually! Since the local window can now be expanded, I added in a dashed line to show the old 20000x20000 local scale, because some data is not sent beyond this (ie other people's weapons). A new INFORANGE constant is defined, and if WINSIDE > INFORANGE, we draw these dashed lines to indicate fog of war. The SMALL_SCREEN option, which wasn't functional anyways, was removed as it is now obsolete. New draw line function W_MakeDashedLine for making a line using the dashed pen. Added in a debug statement to ignore feature packet settings to test the new infoborg features. Index: netrekrc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- netrekrc 4 Apr 2007 04:06:37 -0000 1.51 +++ netrekrc 5 Apr 2007 12:57:22 -0000 1.52 @@ -574,6 +574,9 @@ # Window placements section +# Local and map windows MUST be square. Size can be adjusted. +# If sizing downwards, don't forget to remap any windows nested +# inside these windows, such as team select and quit windows. netrek.parent: netrek netrek.geometry: 1024x768 @@ -822,7 +825,7 @@ # Keys that will trigger macro without going to macro mode singleMacro: EF -macro.0.A:% __ __ ______ __ Bug fixes, hockey improvements, +macro.0.A:% __ __ ______ __ Bug fixes, anti-packet loss stuff, macro.0.A:% / \ / /__/_ __/______ / /__ observers see all weapons, etc. macro.0.A:% / /\ \/ / -_)/ / / __/ -_) '_/ Plus 50 updates/sec support! macro.0.A:% /_/ \__/\__//_/ /_/ \__/_/\_\ XP 2006, v1.3, released March 2007 From modemhero at users.sourceforge.net Thu Apr 5 07:57:24 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 05 Apr 2007 12:57:24 +0000 Subject: [netrek-cvs] client/netrekxp/win32 config.h,1.15,1.16 Message-ID: <20070405125734.7E962186800@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/win32 In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv14570/win32 Modified Files: config.h Log Message: This lengthy patch contains one groundbreaking item - allowing user to configure directly the size of the local and map windows. Most of this patch fixes all the problems that needed to be solved to make this happen. First off, it was necessary to have the netrekrc defaults read in BEFORE windows are generated. So in both cowmain. and playback.c, the order of newwin() and resetdefaults() were exchanged. This created a problem though in the netrekrc Windows Allowed Message settings required the window to actually exist first, so this was yanked out of the resetdefaults() routine and placed into newwin(). It was also copied over to the reread netrekrc function, so that rereading netrekrc will update the WAMs. Half-finished code for rechecking windows geometry after reading defaults is now obsolete, and a comment has been left to that effect. This exchange also fixes one of the problems with richText. The netrekrc richText option now works, as it controls what sort of message windows are created. Still buggy, but at least it's mostly functional. Getting back to the initial goal, WINSIDE and SCALE were moved from defines to variables. This required some changes to be made. Any static variable which relied on WINSIDE had to be moved into functions. This was not so difficult, as it just required some view/fullview variables to be redefined in the star redraw functions, and tts_ypos had to be changed a bit so that the preferred value was not the value in data.c but rather a value based on WINSIDE. With WINSIDE now a variable, the checkGeometry function can now set WINSIDE to match the geometry in the user's netrekrc file. Some (ok a LOT) of work still needs to be done, to separate WINSIDE into 2 variables, TWINSIDE and GWINSIDE, so local and map can be different size squares. Testing WINSIDE=1000 revealed that the star sectors did not scale properly, and indeed it was a design flaw which needed to be fixed. Star sectors now are defined to be the size of the local window, and the star density remains constant no matter what size window. As it is now possible to have GWIDTH divided by star sectors != integer, it was necessary to put in some additonal checks against drawing stars outside of galactic bounds, and to add an additional star sector in either direction to handle the case where we need a fraction of a star sector to fill in space (i.e if WINSIDE = 1000, local stretches 40000 galactic units, that makes galaxy 2.5 star sectors wide, and since most things get rounded down, we need to create 2.5 + 1 = 3 star sectors). It turns out the old code made 4x as many star sectors as there was galaxy, for some odd reason, so this is a nice improvement actually! Since the local window can now be expanded, I added in a dashed line to show the old 20000x20000 local scale, because some data is not sent beyond this (ie other people's weapons). A new INFORANGE constant is defined, and if WINSIDE > INFORANGE, we draw these dashed lines to indicate fog of war. The SMALL_SCREEN option, which wasn't functional anyways, was removed as it is now obsolete. New draw line function W_MakeDashedLine for making a line using the dashed pen. Added in a debug statement to ignore feature packet settings to test the new infoborg features. Index: config.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/win32/config.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- config.h 26 Feb 2007 06:54:50 -0000 1.15 +++ config.h 5 Apr 2007 12:57:22 -0000 1.16 @@ -105,9 +105,6 @@ /* HOCKEY_LINES - allow showing of hockey lines */ #define HOCKEY_LINES -/* SMALL_SCREEN - for 800x600 resolution screens */ -#undef SMALL_SCREEN - /* BEEPLITE - player and planets highlighting */ #define BEEPLITE From modemhero at users.sourceforge.net Thu Apr 5 07:57:24 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 05 Apr 2007 12:57:24 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C,1.124,1.125 Message-ID: <20070405125734.85E0DB433@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv14570 Modified Files: NetrekXP to do list.C Log Message: This lengthy patch contains one groundbreaking item - allowing user to configure directly the size of the local and map windows. Most of this patch fixes all the problems that needed to be solved to make this happen. First off, it was necessary to have the netrekrc defaults read in BEFORE windows are generated. So in both cowmain. and playback.c, the order of newwin() and resetdefaults() were exchanged. This created a problem though in the netrekrc Windows Allowed Message settings required the window to actually exist first, so this was yanked out of the resetdefaults() routine and placed into newwin(). It was also copied over to the reread netrekrc function, so that rereading netrekrc will update the WAMs. Half-finished code for rechecking windows geometry after reading defaults is now obsolete, and a comment has been left to that effect. This exchange also fixes one of the problems with richText. The netrekrc richText option now works, as it controls what sort of message windows are created. Still buggy, but at least it's mostly functional. Getting back to the initial goal, WINSIDE and SCALE were moved from defines to variables. This required some changes to be made. Any static variable which relied on WINSIDE had to be moved into functions. This was not so difficult, as it just required some view/fullview variables to be redefined in the star redraw functions, and tts_ypos had to be changed a bit so that the preferred value was not the value in data.c but rather a value based on WINSIDE. With WINSIDE now a variable, the checkGeometry function can now set WINSIDE to match the geometry in the user's netrekrc file. Some (ok a LOT) of work still needs to be done, to separate WINSIDE into 2 variables, TWINSIDE and GWINSIDE, so local and map can be different size squares. Testing WINSIDE=1000 revealed that the star sectors did not scale properly, and indeed it was a design flaw which needed to be fixed. Star sectors now are defined to be the size of the local window, and the star density remains constant no matter what size window. As it is now possible to have GWIDTH divided by star sectors != integer, it was necessary to put in some additonal checks against drawing stars outside of galactic bounds, and to add an additional star sector in either direction to handle the case where we need a fraction of a star sector to fill in space (i.e if WINSIDE = 1000, local stretches 40000 galactic units, that makes galaxy 2.5 star sectors wide, and since most things get rounded down, we need to create 2.5 + 1 = 3 star sectors). It turns out the old code made 4x as many star sectors as there was galaxy, for some odd reason, so this is a nice improvement actually! Since the local window can now be expanded, I added in a dashed line to show the old 20000x20000 local scale, because some data is not sent beyond this (ie other people's weapons). A new INFORANGE constant is defined, and if WINSIDE > INFORANGE, we draw these dashed lines to indicate fog of war. The SMALL_SCREEN option, which wasn't functional anyways, was removed as it is now obsolete. New draw line function W_MakeDashedLine for making a line using the dashed pen. Added in a debug statement to ignore feature packet settings to test the new infoborg features. Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.124 retrieving revision 1.125 diff -u -d -r1.124 -r1.125 --- NetrekXP to do list.C 4 Apr 2007 10:34:19 -0000 1.124 +++ NetrekXP to do list.C 5 Apr 2007 12:57:22 -0000 1.125 @@ -7,8 +7,6 @@ Things not gonna happen, or server problems: 2) torp_other and plasma_other not working right due to lack of torp fuse info 3) twarping to base docked on base causes the twarp problem, but hard to reproduce -4) Server sometimes not updating tract/press flags for observers, several instances -where a ship is seen to have pressors on constantly, even when they are off 5) Triple mode blanks planet names, if you vote to dogfight or hockey, names are not restored 6) "The 0 0 20 minutes before empire collapses" - with surrenderstart = 1 7) mars - lose nb_robots From modemhero at users.sourceforge.net Thu Apr 5 07:57:24 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 05 Apr 2007 12:57:24 +0000 Subject: [netrek-cvs] client/netrekxp/src cowmain.c, 1.31, 1.32 data.c, 1.77, 1.78 defaults.c, 1.67, 1.68 feature.c, 1.13, 1.14 input.c, 1.30, 1.31 local.c, 1.85, 1.86 map.c, 1.41, 1.42 mswindow.c, 1.53, 1.54 newwin.c, 1.58, 1.59 playback.c, 1.19, 1.20 Message-ID: <20070405125734.ABBFE18680D@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv14570/src Modified Files: cowmain.c data.c defaults.c feature.c input.c local.c map.c mswindow.c newwin.c playback.c Log Message: This lengthy patch contains one groundbreaking item - allowing user to configure directly the size of the local and map windows. Most of this patch fixes all the problems that needed to be solved to make this happen. First off, it was necessary to have the netrekrc defaults read in BEFORE windows are generated. So in both cowmain. and playback.c, the order of newwin() and resetdefaults() were exchanged. This created a problem though in the netrekrc Windows Allowed Message settings required the window to actually exist first, so this was yanked out of the resetdefaults() routine and placed into newwin(). It was also copied over to the reread netrekrc function, so that rereading netrekrc will update the WAMs. Half-finished code for rechecking windows geometry after reading defaults is now obsolete, and a comment has been left to that effect. This exchange also fixes one of the problems with richText. The netrekrc richText option now works, as it controls what sort of message windows are created. Still buggy, but at least it's mostly functional. Getting back to the initial goal, WINSIDE and SCALE were moved from defines to variables. This required some changes to be made. Any static variable which relied on WINSIDE had to be moved into functions. This was not so difficult, as it just required some view/fullview variables to be redefined in the star redraw functions, and tts_ypos had to be changed a bit so that the preferred value was not the value in data.c but rather a value based on WINSIDE. With WINSIDE now a variable, the checkGeometry function can now set WINSIDE to match the geometry in the user's netrekrc file. Some (ok a LOT) of work still needs to be done, to separate WINSIDE into 2 variables, TWINSIDE and GWINSIDE, so local and map can be different size squares. Testing WINSIDE=1000 revealed that the star sectors did not scale properly, and indeed it was a design flaw which needed to be fixed. Star sectors now are defined to be the size of the local window, and the star density remains constant no matter what size window. As it is now possible to have GWIDTH divided by star sectors != integer, it was necessary to put in some additonal checks against drawing stars outside of galactic bounds, and to add an additional star sector in either direction to handle the case where we need a fraction of a star sector to fill in space (i.e if WINSIDE = 1000, local stretches 40000 galactic units, that makes galaxy 2.5 star sectors wide, and since most things get rounded down, we need to create 2.5 + 1 = 3 star sectors). It turns out the old code made 4x as many star sectors as there was galaxy, for some odd reason, so this is a nice improvement actually! Since the local window can now be expanded, I added in a dashed line to show the old 20000x20000 local scale, because some data is not sent beyond this (ie other people's weapons). A new INFORANGE constant is defined, and if WINSIDE > INFORANGE, we draw these dashed lines to indicate fog of war. The SMALL_SCREEN option, which wasn't functional anyways, was removed as it is now obsolete. New draw line function W_MakeDashedLine for making a line using the dashed pen. Added in a debug statement to ignore feature packet settings to test the new infoborg features. Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- mswindow.c 26 Mar 2007 02:47:18 -0000 1.53 +++ mswindow.c 5 Apr 2007 12:57:22 -0000 1.54 @@ -3043,6 +3043,35 @@ ReleaseDC (win->hwnd, hdc); } +void +W_MakeDashedLine (W_Window window, + int x0, + int y0, + int x1, + int y1, + W_Color color) +{ + register int border; + DBHEADER_VOID; + + border = win->border; + + if (NetrekPalette) + { + SelectPalette (hdc, NetrekPalette, FALSE); + RealizePalette (hdc); + } + SetBkColor (hdc, colortable[BLACK].rgb); + SelectObject (hdc, colortable[color].dashedpen); + MoveTo (hdc, x0 + border, y0 + border); + LineTo (hdc, x1 + border, y1 + border); + /* Get that last point in there ... -SAC */ + SetPixel (hdc, x1 + border, y1 + border, colortable[color].rgb); + + if (!sdb || !doubleBuffering || !ingame) + ReleaseDC (win->hwnd, hdc); +} + //We don't need to cache... void W_CacheLine (W_Window window, @@ -4797,6 +4826,12 @@ while (*s != 'x' && *s != 0) s++; *width = atoi (geom_default); + if (!strcmp("local", name)) + WINSIDE = *width; +/* Need to separate WINSIDE into TWINSIDE and GWINSIDE + else if (!strcmp("map", name)) + WINSIDE = *width; +*/ result |= G_SET_WIDTH; if (*s == 0) return result; @@ -4805,6 +4840,18 @@ while (*s != '+' && *s != '-' && *s != 0) s++; *height = atoi (geom_default); + if (!strcmp("local", name)) + { + if (*height > *width) + WINSIDE = *height; + } +/* + else if (!strcmp("map", name)) + { + if (*height > *width) + WINSIDE = *height; + } +*/ result |= G_SET_HEIGHT; if (*s == 0) return result; Index: newwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/newwin.c,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- newwin.c 2 Apr 2007 21:12:42 -0000 1.58 +++ newwin.c 5 Apr 2007 12:57:22 -0000 1.59 @@ -942,6 +942,9 @@ W_SetWindowKeyDownHandler (reviewWin, handleMessageWindowKeyDown); } /* End of Message windows */ + /* Now let's set Window Allowed Messages for all message windows */ + for (i = 0; i < 6; i++) + W_SetWAM (wam_windows[i]); pStats = W_MakeWindow ("pingStats", 500, 4, pStatsWidth (), pStatsHeight (), baseWin, 1, foreColor); Index: input.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/input.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- input.c 1 Apr 2007 10:11:37 -0000 1.30 +++ input.c 5 Apr 2007 12:57:22 -0000 1.31 @@ -3502,6 +3502,7 @@ void reread_defaults (void) { + int i; char mbuf[80]; if (strlen (defaultsFile) > 0) @@ -3510,6 +3511,9 @@ warning (mbuf); initDefaults (defaultsFile); resetdefaults (); + /* Set Window Allowed Messages ( since it got moved to newwin() )*/ + for (i = 0; i < 6; i++) + W_SetWAM (wam_windows[i]); initkeymap (); } else Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.85 retrieving revision 1.86 diff -u -d -r1.85 -r1.86 --- local.c 4 Apr 2007 04:06:37 -0000 1.85 +++ local.c 5 Apr 2007 12:57:22 -0000 1.86 @@ -68,8 +68,8 @@ #define scaleLocal(pt) ((pt)/SCALE + (WINSIDE/2)) -int fullview = WINSIDE * SCALE; -int view = WINSIDE * SCALE / 2; +#define STARSIDE 500 /* Used to normalize star density */ +#define INFORANGE 500 /* Range at which server stops sending some data */ static struct _star stars[10][10][16]; @@ -123,11 +123,12 @@ { register int i, j, k; - for (i = 0; i < 10; i++) { - for (j = 0; j < 10; j++) { - for (k = 0; k < 16; k++) { - stars[i][j][k].s_x = RANDOM() % 20000; - stars[i][j][k].s_y = RANDOM() % 20000; + /* Star density: 16 stars per 20000 x 20000 galactic region */ + for (i = 0; i < (5 * STARSIDE / WINSIDE + 1); i++) { + for (j = 0; j < (5 * STARSIDE / WINSIDE + 1); j++) { + for (k = 0; k < (16 * (WINSIDE / STARSIDE) * (WINSIDE / STARSIDE)); k++) { + stars[i][j][k].s_x = RANDOM() % 20000 * WINSIDE / STARSIDE; + stars[i][j][k].s_y = RANDOM() % 20000 * WINSIDE / STARSIDE; stars[i][j][k].s_color = randcolor(); } } @@ -138,6 +139,8 @@ void DrawStars() { + const int fullview = WINSIDE * SCALE; + const int view = WINSIDE * SCALE / 2; /* note: cpp symbols in expressions (WINSIDE*SCALE) will be precalculated by any C optimizer @@ -168,7 +171,7 @@ sector_offy += fullview; } -#define MAXSECTOR (GWIDTH/(fullview)) +#define MAXSECTOR (5 * STARSIDE / WINSIDE) + 1 /* at worst we have to redraw 4 star sectors */ @@ -228,6 +231,8 @@ static void redrawStarSector (int sectorx, int sectory) { + const int fullview = WINSIDE * SCALE; + const int view = WINSIDE * SCALE / 2; register int i, dx, dy, dxx, dyy; register int xbase = sectorx * fullview; register int ybase = sectory * fullview; @@ -287,8 +292,11 @@ } dxx = (int) (Cos[mydir] * streaklength / 10); dyy = (int) (Sin[mydir] * streaklength / 10); - for (i = 0, s = star_sector; i < 16; i++, s++) + for (i = 0, s = star_sector; i < (16 * (WINSIDE / STARSIDE) * (WINSIDE / STARSIDE)); i++, s++) { + if (s->s_x + xbase > GWIDTH || s->s_y + ybase > GWIDTH) + continue; + dx = (s->s_x + xbase) - (me->p_x - (me->p_x % SCALE)); dy = (s->s_y + ybase) - (me->p_y - (me->p_y % SCALE)); if (ABS(dx) > (view) || ABS(dy) > (view)) @@ -307,8 +315,11 @@ return; } } - for (i = 0, s = star_sector; i < 16; i++, s++) + for (i = 0, s = star_sector; i < (16 * (WINSIDE / STARSIDE) * (WINSIDE / STARSIDE)); i++, s++) { + if (s->s_x + xbase > GWIDTH || s->s_y + ybase > GWIDTH) + continue; + dx = (s->s_x + xbase) - (me->p_x - (me->p_x % SCALE)); dy = (s->s_y + ybase) - (me->p_y - (me->p_y % SCALE)); if (ABS(dx) > (view) || ABS(dy) > (view)) @@ -2372,6 +2383,50 @@ * Ends the if, too */ #endif /* HOCKEY_LINES */ + /* Draw inforange box (if necessary) */ + if ( WINSIDE > INFORANGE ) + { + dx = (WINSIDE / 2) + (INFORANGE / 2); + sy = (WINSIDE / 2) - (INFORANGE / 2); + ey = (WINSIDE / 2) + (INFORANGE / 2); + W_MakeDashedLine (w, dx, sy, dx, ey, W_White); + clearline[0][clearlcount] = dx; + clearline[1][clearlcount] = sy; + clearline[2][clearlcount] = dx; + clearline[3][clearlcount] = ey; + clearlcount++; + + dx = (WINSIDE / 2) - (INFORANGE / 2); + sy = (WINSIDE / 2) - (INFORANGE / 2); + ey = (WINSIDE / 2) + (INFORANGE / 2); + W_MakeDashedLine (w, dx, sy, dx, ey, W_White); + clearline[0][clearlcount] = dx; + clearline[1][clearlcount] = sy; + clearline[2][clearlcount] = dx; + clearline[3][clearlcount] = ey; + clearlcount++; + + dy = (WINSIDE / 2) + (INFORANGE / 2); + sx = (WINSIDE / 2) - (INFORANGE / 2); + ex = (WINSIDE / 2) + (INFORANGE / 2); + W_MakeDashedLine (w, sx, dy, ex, dy, W_White); + clearline[0][clearlcount] = sx; + clearline[1][clearlcount] = dy; + clearline[2][clearlcount] = ex; + clearline[3][clearlcount] = dy; + clearlcount++; + + dy = (WINSIDE / 2) - (INFORANGE / 2); + sx = (WINSIDE / 2) - (INFORANGE / 2); + ex = (WINSIDE / 2) + (INFORANGE / 2); + W_MakeDashedLine (w, sx, dy, ex, dy, W_White); + clearline[0][clearlcount] = sx; + clearline[1][clearlcount] = dy; + clearline[2][clearlcount] = ex; + clearline[3][clearlcount] = dy; + clearlcount++; + } + /* Draw Edges */ if (me->p_x < (WINSIDE / 2) * SCALE) { Index: playback.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/playback.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- playback.c 11 Mar 2007 22:15:58 -0000 1.19 +++ playback.c 5 Apr 2007 12:57:22 -0000 1.20 @@ -199,9 +199,10 @@ if ((stringDefault ("indshipHRbmpfile")) != NULL) ind_ship_bmp_HR = stringDefault ("indshipHRbmpfile"); - newwin (display_host, name); resetdefaults (); + newwin (display_host, name); + savebitmaps (); /* open memory...? */ Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.67 retrieving revision 1.68 diff -u -d -r1.67 -r1.68 --- defaults.c 4 Apr 2007 04:06:37 -0000 1.67 +++ defaults.c 5 Apr 2007 12:57:22 -0000 1.68 @@ -1660,7 +1660,7 @@ doubleBuffering = booleanDefault ("doubleBuffering", doubleBuffering); allowWheelActions = booleanDefault ("allowWheelActions", allowWheelActions); - //richText = booleanDefault ("richText", richText); + richText = booleanDefault ("richText", richText); newQuit = booleanDefault ("newQuit", newQuit); newTeams = booleanDefault ("newTeams", newTeams); soundVolume= intDefault ("soundVolume", soundVolume); @@ -1774,10 +1774,6 @@ phaserStats = booleanDefault ("phaserStats", phaserStats); #endif - /* Now let's set Window Allowed Messages for all message windows */ - for (i = 0; i < 6; i++) - W_SetWAM (wam_windows[i]); - #ifdef XTRA_MESSAGE_UI messageHUD = intDefault ("messageHUD", messageHUD); messageHoldThresh = intDefault ("messageHoldThresh", messageHoldThresh); @@ -1879,7 +1875,7 @@ tts_time = intDefault("tts_time", tts_time); tts_max_len = intDefault("tts_max_len", tts_max_len); - tts_ypos = intDefault("tts_ypos", tts_ypos); + tts_ypos = intDefault("tts_ypos", WINSIDE / 2 - 16); #endif /* BEEPLITE */ shipdefaults[DEFAULTSHIP].keymap = (unsigned char *) stringDefault ("keymap"); @@ -1919,7 +1915,9 @@ myshipdef = &shipdefaults[myshiptype]; /* Let's check whether windows settings had changed */ -/* Not working yet + /* Read in defaults was moved before window generation, thus this + code is obsolete and not worth fixing - BB 04/07 */ +/* updateWindowsGeometry (baseWin); updateWindowsGeometry (w); updateWindowsGeometry (mapw); @@ -2382,6 +2380,9 @@ if (saveBig) { fputs ("# Window placements section\n", fp); + fputs ("# Local and map windows MUST be square. Size can be adjusted.\n", fp); + fputs ("# If sizing downwards, don't forget to remap any windows nested\n", fp); + fputs ("# inside these windows, such as team select and quit windows.\n", fp); fputs ("\n", fp); } Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.77 retrieving revision 1.78 diff -u -d -r1.77 -r1.78 --- data.c 4 Apr 2007 10:34:22 -0000 1.77 +++ data.c 5 Apr 2007 12:57:22 -0000 1.78 @@ -32,7 +32,9 @@ struct mctl *mctl; struct memory universe; -int ingame = 0; /* If player is in game - to distinguish between whether +int WINSIDE = 500; /* Size of strategic and tactical windows */ +int SCALE = 40; /* Window will be one pixel for these # spaces */ +int ingame = 0; /* If player is in game - to distinguish between whether to use double buffering on the local and map window */ int ghoststart = 0; /* is this a ghostbust * restart? */ @@ -555,10 +557,7 @@ int last_tts_width = 0; int tts_timer = 0; int tts_time = 25; -int tts_ypos = WINSIDE / 2 - 16; /* as found in redraw.c * - - * - * * originally */ +int tts_ypos = 234; /* was WINSIDE / 2 - 16 */ char lastIn[100]; #endif /* BEEPLITE */ Index: feature.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/feature.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- feature.c 4 Apr 2007 10:34:22 -0000 1.13 +++ feature.c 5 Apr 2007 12:57:22 -0000 1.14 @@ -273,6 +273,12 @@ break; } } + /* Ignore these feature packets for testing purposes */ +#if DEBUG + F_show_army_count = 1; + F_show_other_speed = 1; + F_show_cloakers = 1; +#endif #endif /* BEEPLITE */ } Index: cowmain.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/cowmain.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- cowmain.c 2 Apr 2007 21:12:41 -0000 1.31 +++ cowmain.c 5 Apr 2007 12:57:22 -0000 1.32 @@ -779,6 +779,7 @@ if ((stringDefault ("indshipHRbmpfile")) != NULL) ind_ship_bmp_HR = stringDefault ("indshipHRbmpfile"); + resetdefaults (); newwin (display_host, name); #ifdef META @@ -800,7 +801,6 @@ /* Set observer flag as soon as we know port number */ setObserverMode (xtrekPort); - resetdefaults (); savebitmaps (); #if defined(SOUND) Index: map.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- map.c 4 Apr 2007 10:34:22 -0000 1.41 +++ map.c 5 Apr 2007 12:57:22 -0000 1.42 @@ -505,7 +505,7 @@ for (l = planets + MAXPLANETS - 1; l >= planets; --l) { /* Synchronize planet info (up to 10 times/second) for current orbitted planet - and once every 5 seconds for all other planets we have info on*/ + and once every 5 seconds for all other planets we have info on */ if (F_check_planets) { if ((me->p_flags & PFORBIT) From modemhero at users.sourceforge.net Fri Apr 6 01:46:34 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 06 Apr 2007 06:46:34 +0000 Subject: [netrek-cvs] client/netrekxp/src dashboard3.c, 1.8, 1.9 data.c, 1.78, 1.79 death.c, 1.17, 1.18 defaults.c, 1.68, 1.69 docwin.c, 1.3, 1.4 enter.c, 1.9, 1.10 findslot.c, 1.7, 1.8 input.c, 1.31, 1.32 local.c, 1.86, 1.87 macrowin.c, 1.2, 1.3 map.c, 1.42, 1.43 mswindow.c, 1.54, 1.55 newwin.c, 1.59, 1.60 option.c, 1.44, 1.45 redraw.c, 1.11, 1.12 short.c, 1.20, 1.21 sound.c, 1.38, 1.39 util.c, 1.4, 1.5 Message-ID: <20070406064644.890FF1867DF@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv30991/src Modified Files: dashboard3.c data.c death.c defaults.c docwin.c enter.c findslot.c input.c local.c macrowin.c map.c mswindow.c newwin.c option.c redraw.c short.c sound.c util.c Log Message: This large patch continues the work on allowing resizeable local and map windows. WINSIDE is now history, having been split into TWINSIDE and GWINSIDE. A few WINSIDE based defines were modified. Visible ship range (MAXDISTCLOAK and MAXDISTVIS) were converted to galactic units. The CORNER_DIST variable was renamed to SOUND_MAXRANGE and now goes off of INFORANGE scale rather than WINSIDE scale. This keeps the scaling factor for sounds the same no matter what size tactical is used (sounds fall off to nothing at the same distance as before). New function sound_window_height to calculate size of sound window (trivial really, but makes it so no more editing newwin every time a new option is added to the sound menu). Commented out most of the windows geometry entries in the netrekrc, and updated them to match the new default settings for a normal 500x500 local and 500x500 map window. Reason being, newwin entry routine now does a good job adjusting window sizes to match local and map windows, so let's not have the user worry about changing all the geometries. Ideally users will change tactical and map size, and have program do most of the adjusting for them. On that note, changed a whole bunch of window default geometries to use exact math so windows line up perfectly, and so they all scale proper (compare old message win placements to new ones and you will see the difference). New netrekrc option infoRange to show a box around your ship showing the limit on which server sends weapons data. Box is "smart" and doesn't draw sections that fall outside galaxy bounds. Changed a few dashboard timers to no longer be located based on WINSIDE (that was a mistake in the first place). Dashboards do NOT scale with tactical though, and it will be a MAJOR project to add that ability. The header for docwin is no longer centered on WINSIDE, since the actual docwin size is hard coded to 500x500, made no sense to have header to use WINSIDE in the first place. MOTD window now is fixed at 500 pixels wide, no point in making it wider, cause the text isn't going to extend due to the server limiting its textwidth. A bunch of bitmaps which were never anticipated to scale, now scale. Geno bitmaps now scale to fit map window, and are properly defined in bitmaps.h as to their bitmap size. Team and quit window bitmaps now scale. Index: redraw.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/redraw.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- redraw.c 26 Mar 2007 04:40:52 -0000 1.11 +++ redraw.c 6 Apr 2007 06:46:32 -0000 1.12 @@ -161,7 +161,7 @@ oldbuf = buf1; } /* TIMER */ - db_timer (flag, WINSIDE - 12 * W_Textwidth, 27); + db_timer (flag, 428, 27); light_erase(); Index: death.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/death.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- death.c 17 Mar 2007 03:05:44 -0000 1.17 +++ death.c 6 Apr 2007 06:46:31 -0000 1.18 @@ -149,11 +149,17 @@ switch (i) { case 0: - W_TileWindow (mapw, genopic); + W_WriteScaleBitmap(0, 0, GWINSIDE, GWINSIDE, + BMP_GENO_WIDTH, + BMP_GENO_HEIGHT, + 0, genopic, foreColor, mapw); break; case 1: default: - W_TileWindow (mapw, genopic2); + W_WriteScaleBitmap(0, 0, GWINSIDE, GWINSIDE, + BMP_GENO_WIDTH, + BMP_GENO_HEIGHT, + 0, genopic2, foreColor, mapw); break; } #ifdef SOUND Index: findslot.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/findslot.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- findslot.c 28 Feb 2007 09:35:20 -0000 1.7 +++ findslot.c 6 Apr 2007 06:46:31 -0000 1.8 @@ -142,8 +142,8 @@ W_MapWindow (waitqWin); if (showMotd) { - motdWin = W_MakeWindow ("waitmotd", 1, WAITWIDTH + 1, WINSIDE, - WINSIDE, 0, 2, foreColor); + motdWin = W_MakeWindow ("waitmotd", 1, WAITWIDTH + 1, 500, + 500, 0, 2, foreColor); W_MapWindow (motdWin); showMotdWin (motdWin, WaitMotdLine); } @@ -199,7 +199,7 @@ else { motdWin = W_MakeWindow ("waitmotd", 1, WAITWIDTH + 1, - WINSIDE, WINSIDE, 0, 2, + 500, 500, 0, 2, foreColor); W_MapWindow (motdWin); showMotdWin (motdWin, WaitMotdLine); Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- mswindow.c 5 Apr 2007 12:57:22 -0000 1.54 +++ mswindow.c 6 Apr 2007 06:46:32 -0000 1.55 @@ -4827,11 +4827,9 @@ s++; *width = atoi (geom_default); if (!strcmp("local", name)) - WINSIDE = *width; -/* Need to separate WINSIDE into TWINSIDE and GWINSIDE + TWINSIDE = *width; else if (!strcmp("map", name)) - WINSIDE = *width; -*/ + GWINSIDE = *width; result |= G_SET_WIDTH; if (*s == 0) return result; @@ -4843,15 +4841,13 @@ if (!strcmp("local", name)) { if (*height > *width) - WINSIDE = *height; + TWINSIDE = *height; } -/* else if (!strcmp("map", name)) { if (*height > *width) - WINSIDE = *height; + GWINSIDE = *height; } -*/ result |= G_SET_HEIGHT; if (*s == 0) return result; Index: sound.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/sound.c,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- sound.c 30 Mar 2007 02:50:53 -0000 1.38 +++ sound.c 6 Apr 2007 06:46:32 -0000 1.39 @@ -467,6 +467,11 @@ W_MapWindow (soundWin); } +extern int sound_window_height (void) +{ + return SOUND_DONE + 1; +} + static void soundrefresh (int i) { char buf[BUFSIZ]; Index: newwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/newwin.c,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- newwin.c 5 Apr 2007 12:57:22 -0000 1.59 +++ newwin.c 6 Apr 2007 06:46:32 -0000 1.60 @@ -42,11 +42,12 @@ #define SIZEOF(a) (sizeof (a) / sizeof (*(a))) -#define BOXSIDE (WINSIDE / 5) +#define BOXSIDE (TWINSIDE / 5) +#define MENU_PAD 4 #define TILESIDE 16 #define MESSAGESIZE 20 -#define STATSIZE (MESSAGESIZE * 2 + BORDER) -#define YOFF -25 +#define STATSIZE (MESSAGESIZE * 2 + BORDER * 2) +#define YOFF 0 /* Local function prototypes */ void loadbitmaps (void); @@ -822,54 +823,54 @@ baseWin = W_MakeWindow ("netrek", 0, 0, 1024, 768, NULL, BORDER, gColor); - w = W_MakeWindow ("local", 0, 0, WINSIDE, WINSIDE, baseWin, THICKBORDER, foreColor); + w = W_MakeWindow ("local", 0, 0, TWINSIDE, TWINSIDE, baseWin, THICKBORDER, foreColor); localSDB = W_InitSDB (w); - mapw = W_MakeWindow ("map", WINSIDE + 6, 0, WINSIDE, WINSIDE, baseWin, + mapw = W_MakeWindow ("map", TWINSIDE + 2 * THICKBORDER, 0, GWINSIDE, GWINSIDE, baseWin, THICKBORDER, foreColor); mapSDB = W_InitSDB (mapw); - tstatw = W_MakeWindow ("tstat", 0, WINSIDE + 6, WINSIDE + 5, - STATSIZE + 2, baseWin, BORDER, foreColor); + tstatw = W_MakeWindow ("tstat", 0, TWINSIDE + 2 * THICKBORDER, TWINSIDE + (2 * THICKBORDER - 2 * BORDER), + STATSIZE, baseWin, BORDER, foreColor); W_SetWindowExposeHandler (tstatw, redrawTstats); - - warnw = W_MakeWindow ("warn", WINSIDE + 6, WINSIDE + 23, WINSIDE + 4, MESSAGESIZE - 4, - baseWin, BORDER, foreColor); - W_SetWindowKeyDownHandler (warnw, handleMessageWindowKeyDown); - - messagew = W_MakeWindow ("message", WINSIDE + 6, WINSIDE + 6, - WINSIDE + 4, MESSAGESIZE - 4, baseWin, BORDER, - foreColor); + messagew = W_MakeWindow ("message", TWINSIDE + 2 * THICKBORDER, GWINSIDE + 2 * THICKBORDER, + GWINSIDE + (2 * THICKBORDER - 2 * BORDER), MESSAGESIZE, baseWin, BORDER, foreColor); W_SetWindowKeyDownHandler (messagew, handleMessageWindowKeyDown); W_SetWindowButtonHandler (messagew, handleMessageWindowButton); W_SetWindowExposeHandler (messagew, DisplayMessage); + + warnw = W_MakeWindow ("warn", TWINSIDE + 2 * THICKBORDER, GWINSIDE + 2 * THICKBORDER + MESSAGESIZE + 2 * BORDER, + GWINSIDE + (2 * THICKBORDER - 2 * BORDER), MESSAGESIZE, baseWin, BORDER, foreColor); - planetw = W_MakeTextWindow ("planet", WINSIDE + 160, 10, 57, MAXPLANETS + 3, baseWin, 2); + W_SetWindowKeyDownHandler (warnw, handleMessageWindowKeyDown); + + planetw = W_MakeTextWindow ("planet", TWINSIDE + 2 * THICKBORDER + 10, 10, 57, MAXPLANETS + 3, baseWin, 2); W_SetWindowExposeHandler (planetw, planetlist); rankw = W_MakeTextWindow ("rank", 10, 300, 80, NUMRANKS + 9, baseWin, 2); W_SetWindowExposeHandler (rankw, ranklist); - playerw = W_MakeTextWindow ("player", 0, WINSIDE + 50, PlistMaxWidth (), 32, baseWin, 2); + playerw = W_MakeTextWindow ("player", 0, TWINSIDE + 2 * THICKBORDER + STATSIZE + 2 * BORDER, + PlistMaxWidth (), MAXPLAYER + 3, baseWin, 2); W_SetWindowExposeHandler (playerw, RedrawPlayerList); - playerw2 = W_MakeTextWindow ("player2", 140, 100, PlistMaxWidth2 (), 32, baseWin, 2); + playerw2 = W_MakeTextWindow ("player2", 140, 100, PlistMaxWidth2 (), MAXPLAYER + 3, baseWin, 2); W_SetWindowExposeHandler (playerw2, RedrawPlayerList); #ifdef RECORDGAME if (playback) helpWin = W_MakeTextWindow ("help", 286, - YOFF + WINSIDE + 2 * BORDER + 2 * MESSAGESIZE + 50, + TWINSIDE + 2 * THICKBORDER + STATSIZE + 2 * BORDER, 72, 15, NULL, BORDER); else #endif helpWin = W_MakeTextWindow ("help", 20, - YOFF + WINSIDE + 2 * BORDER + 2 * MESSAGESIZE + 30, + TWINSIDE + 2 * THICKBORDER + STATSIZE + 2 * BORDER - 5, 160, 21, NULL, BORDER); #ifdef RECORDGAME @@ -889,55 +890,79 @@ #endif /* Message windows */ - if (richText) + if (richText +#ifdef RECORDGAME + && !playback +#endif + ) { - messwa = W_MakeScrollingRichTextWindow ("review_all", 506, 658, 81, 5, baseWin, BORDER); + messwa = W_MakeScrollingRichTextWindow ("review_all", TWINSIDE + 2 * THICKBORDER, + GWINSIDE + 2 * THICKBORDER + 2 * MESSAGESIZE + 8 * BORDER + 4 * MENU_PAD + 9 * W_Textheight, + 81, 5, baseWin, BORDER); wam_windows[0] = messwa; W_SetWindowKeyDownHandler (messwa, handleMessageWindowKeyDown); - messwt = W_MakeScrollingRichTextWindow ("review_team", 506, 579, 81, 7, baseWin, BORDER); + messwt = W_MakeScrollingRichTextWindow ("review_team", TWINSIDE + 2 * THICKBORDER, + GWINSIDE + 2 * THICKBORDER + 2 * MESSAGESIZE + 6 * BORDER + 2 * MENU_PAD + 3 * W_Textheight, + 81, 6, baseWin, BORDER); wam_windows[1] = messwt; W_SetWindowKeyDownHandler (messwt, handleMessageWindowKeyDown); - messwi = W_MakeScrollingRichTextWindow ("review_your", 506, 540, 81, 3, baseWin, BORDER); + messwi = W_MakeScrollingRichTextWindow ("review_your", TWINSIDE + 2 * THICKBORDER, + GWINSIDE + 2 * THICKBORDER + 2 * MESSAGESIZE + 4 * BORDER, + 81, 3, baseWin, BORDER); wam_windows[2] = messwi; W_SetWindowKeyDownHandler (messwi, handleMessageWindowKeyDown); - messwk = W_MakeScrollingRichTextWindow ("review_kill", 506, 717, 81, 3, baseWin, BORDER); + messwk = W_MakeScrollingRichTextWindow ("review_kill", TWINSIDE + 2 * THICKBORDER, + GWINSIDE + 2 * THICKBORDER + 2 * MESSAGESIZE + 10 * BORDER + 6 * MENU_PAD + 14 * W_Textheight, + 81, 3, baseWin, BORDER); wam_windows[3] = messwk; - phaserwin = W_MakeScrollingRichTextWindow ("review_phaser", WINSIDE + 6, YOFF + - WINSIDE + 3 * BORDER + 2 * MESSAGESIZE + - 15 * W_Textheight + 16, 81, 4, baseWin, BORDER); + phaserwin = W_MakeScrollingRichTextWindow ("review_phaser", TWINSIDE + 2 * THICKBORDER, + GWINSIDE + 2 * THICKBORDER + 2 * MESSAGESIZE + 12 * BORDER + 8 * MENU_PAD + 17 * W_Textheight, + 81, 4, baseWin, BORDER); wam_windows[4] = phaserwin; - reviewWin = W_MakeScrollingRichTextWindow ("review", 506, 540, 81, 22, baseWin, BORDER); + reviewWin = W_MakeScrollingRichTextWindow ("review", TWINSIDE + 2 * THICKBORDER, + GWINSIDE + 2 * THICKBORDER + 2 * MESSAGESIZE + 4 * BORDER, + 81, 20, baseWin, BORDER); wam_windows[5] = reviewWin; W_SetWindowKeyDownHandler (reviewWin, handleMessageWindowKeyDown); } else { - messwa = W_MakeScrollingWindow ("review_all", 506, 658, 81, 5, baseWin, BORDER); + messwa = W_MakeScrollingWindow ("review_all", TWINSIDE + 2 * THICKBORDER, + GWINSIDE + 2 * THICKBORDER + 2 * MESSAGESIZE + 8 * BORDER + 4 * MENU_PAD + 9 * W_Textheight, + 81, 5, baseWin, BORDER); wam_windows[0] = messwa; W_SetWindowKeyDownHandler (messwa, handleMessageWindowKeyDown); - messwt = W_MakeScrollingWindow ("review_team", 506, 579, 81, 7, baseWin, BORDER); + messwt = W_MakeScrollingWindow ("review_team", TWINSIDE + 2 * THICKBORDER, + GWINSIDE + 2 * THICKBORDER + 2 * MESSAGESIZE + 6 * BORDER + 2 * MENU_PAD + 3 * W_Textheight, + 81, 6, baseWin, BORDER); wam_windows[1] = messwt; W_SetWindowKeyDownHandler (messwt, handleMessageWindowKeyDown); - messwi = W_MakeScrollingWindow ("review_your", 506, 540, 81, 3, baseWin, BORDER); + messwi = W_MakeScrollingWindow ("review_your", TWINSIDE + 2 * THICKBORDER, + GWINSIDE + 2 * THICKBORDER + 2 * MESSAGESIZE + 4 * BORDER, + 81, 3, baseWin, BORDER); wam_windows[2] = messwi; W_SetWindowKeyDownHandler (messwi, handleMessageWindowKeyDown); - messwk = W_MakeScrollingWindow ("review_kill", 506, 717, 81, 3, baseWin, BORDER); + messwk = W_MakeScrollingWindow ("review_kill", TWINSIDE + 2 * THICKBORDER, + GWINSIDE + 2 * THICKBORDER + 2 * MESSAGESIZE + 10 * BORDER + 6 * MENU_PAD + 14 * W_Textheight, + 81, 3, baseWin, BORDER); wam_windows[3] = messwk; - phaserwin = W_MakeScrollingWindow ("review_phaser", WINSIDE + 6, YOFF + - WINSIDE + 3 * BORDER + 2 * MESSAGESIZE + - 15 * W_Textheight + 16, 81, 4, baseWin, BORDER); + phaserwin = W_MakeScrollingWindow ("review_phaser", TWINSIDE + 2 * THICKBORDER, + GWINSIDE + 2 * THICKBORDER + 2 * MESSAGESIZE + 12 * BORDER + 8 * MENU_PAD + 17 * W_Textheight, + 81, 4, baseWin, BORDER); wam_windows[4] = phaserwin; - reviewWin = W_MakeScrollingWindow ("review", 506, 540, 81, 22, baseWin, BORDER); + reviewWin = W_MakeScrollingWindow ("review", TWINSIDE + 2 * THICKBORDER, + GWINSIDE + 2 * THICKBORDER + 2 * MESSAGESIZE + 4 * BORDER, + 81, 20, baseWin, BORDER); wam_windows[5] = reviewWin; W_SetWindowKeyDownHandler (reviewWin, handleMessageWindowKeyDown); } @@ -946,29 +971,29 @@ for (i = 0; i < 6; i++) W_SetWAM (wam_windows[i]); - pStats = W_MakeWindow ("pingStats", 500, 4, pStatsWidth (), pStatsHeight (), + pStats = W_MakeWindow ("pingStats", TWINSIDE + 10, 4, pStatsWidth (), pStatsHeight (), baseWin, 1, foreColor); W_SetWindowExposeHandler (pStats, redrawPStats); - udpWin = W_MakeMenu ("UDP", WINSIDE + 10, -BORDER + 10, 40, UDP_NUMOPTS, NULL, 2); + udpWin = W_MakeMenu ("UDP", TWINSIDE + 10, -BORDER + 10, 40, UDP_NUMOPTS, NULL, 2); W_SetWindowButtonHandler (udpWin, udpaction); #ifdef SHORT_PACKETS - spWin = W_MakeMenu ("network", WINSIDE + 10, -BORDER + 10, 40, SPK_NUMFIELDS, NULL, 2); + spWin = W_MakeMenu ("network", TWINSIDE + 10, -BORDER + 10, 40, SPK_NUMFIELDS, NULL, 2); W_SetWindowKeyDownHandler (spWin, spaction); W_SetWindowButtonHandler (spWin, spaction); #endif #if defined(SOUND) - soundWin = W_MakeMenu("sound", WINSIDE + 20, -BORDER + 10, 33, - 14, NULL, 2); + soundWin = W_MakeMenu("sound", TWINSIDE + 20, -BORDER + 10, 33, + sound_window_height(), NULL, 2); W_SetWindowKeyDownHandler(soundWin, soundaction); W_SetWindowButtonHandler(soundWin, soundaction); W_DefineArrowCursor(soundWin); #endif #ifdef TOOLS - toolsWin = W_MakeScrollingWindow ("tools", WINSIDE + BORDER, BORDER, + toolsWin = W_MakeScrollingWindow ("tools", TWINSIDE + BORDER, BORDER, 80, TOOLSWINLEN, NULL, BORDER); W_DefineTrekCursor (toolsWin); #endif @@ -984,13 +1009,14 @@ for (i = 0; i < 4; i++) { - teamWin[i] = W_MakeWindow (teamshort[1 << i], i * BOXSIDE, WINSIDE - BOXSIDE, + teamWin[i] = W_MakeWindow (teamshort[1 << i], i * BOXSIDE, TWINSIDE - BOXSIDE, BOXSIDE, BOXSIDE, w, 1, foreColor); } - qwin = W_MakeWindow ("quit", 4 * BOXSIDE, WINSIDE - BOXSIDE, BOXSIDE, + qwin = W_MakeWindow ("quit", 4 * BOXSIDE, TWINSIDE - BOXSIDE, BOXSIDE, BOXSIDE, w, 1, foreColor); - statwin = W_MakeWindow ("stats", 405, 506, 100, 80, baseWin, BORDER, foreColor); + statwin = W_MakeWindow ("stats", TWINSIDE + 2 * THICKBORDER - 100, TWINSIDE + 2 * THICKBORDER, + 100, 80, baseWin, BORDER, foreColor); W_SetWindowExposeHandler (statwin, redrawStats); W_DefineTrekCursor (baseWin); @@ -1033,7 +1059,7 @@ #define WARWIDTH 20 #define WARBORDER 2 - war = W_MakeMenu ("war", WINSIDE + 10, -BORDER + 10, WARWIDTH, 6, baseWin, WARBORDER); + war = W_MakeMenu ("war", TWINSIDE + 10, -BORDER + 10, WARWIDTH, 6, baseWin, WARBORDER); W_SetWindowButtonHandler (war, waraction); W_DefineArrowCursor (war); @@ -1366,12 +1392,12 @@ W_StoreBitmap3 ("bitmaps/misclib/color/oriteam.bmp", BMP_TEAM_SELECT_WIDTH, BMP_TEAM_SELECT_HEIGHT, BMP_ORITEAM, w, LR_DEFAULTCOLOR); genopic = - W_StoreBitmap3 ("bitmaps/misclib/color/genocide.bmp", WINSIDE, - WINSIDE, BMP_GENO, w, LR_DEFAULTCOLOR); + W_StoreBitmap3 ("bitmaps/misclib/color/genocide.bmp", BMP_GENO_WIDTH, + BMP_GENO_HEIGHT, BMP_GENO, w, LR_DEFAULTCOLOR); genopic2 = - W_StoreBitmap3 ("bitmaps/misclib/color/genocide2.bmp", WINSIDE, - WINSIDE, BMP_GENO2, w, LR_DEFAULTCOLOR); + W_StoreBitmap3 ("bitmaps/misclib/color/genocide2.bmp", BMP_GENO_WIDTH, + BMP_GENO_HEIGHT, BMP_GENO2, w, LR_DEFAULTCOLOR); } @@ -1909,12 +1935,12 @@ sprintf (buf, "--- %s ---", (char *) query_cowid ()); length = strlen (buf); - center = WINSIDE / 2 - (length * W_Textwidth) / 2; + center = 250 - (length * W_Textwidth) / 2; W_WriteText (motdwin, center, W_Textheight, textColor, buf, length, W_BoldFont); sprintf (buf, CBUGS); length = strlen (buf); - center = WINSIDE / 2 - (length * W_Textwidth) / 2; + center = 250 - (length * W_Textwidth) / 2; W_WriteText (motdwin, center, 3 * W_Textheight, textColor, buf, length, W_RegularFont); @@ -2095,16 +2121,24 @@ switch (teamNo) { case 0: - W_WriteBitmap ( 0, 0, fedteam, foreColor, win); + W_WriteScaleBitmap ( 0, 0, BOXSIDE, BOXSIDE, + BMP_TEAM_SELECT_WIDTH, BMP_TEAM_SELECT_HEIGHT, + 0, fedteam, foreColor, win); break; case 1: - W_WriteBitmap ( 0, 0, romteam, foreColor, win); + W_WriteScaleBitmap ( 0, 0, BOXSIDE, BOXSIDE, + BMP_TEAM_SELECT_WIDTH, BMP_TEAM_SELECT_HEIGHT, + 0, romteam, foreColor, win); break; case 2: - W_WriteBitmap ( 0, 0, kliteam, foreColor, win); + W_WriteScaleBitmap ( 0, 0, BOXSIDE, BOXSIDE, + BMP_TEAM_SELECT_WIDTH, BMP_TEAM_SELECT_HEIGHT, + 0, kliteam, foreColor, win); break; case 3: - W_WriteBitmap ( 0, 0, oriteam, foreColor, win); + W_WriteScaleBitmap ( 0, 0, BOXSIDE, BOXSIDE, + BMP_TEAM_SELECT_WIDTH, BMP_TEAM_SELECT_HEIGHT, + 0, oriteam, foreColor, win); break; } } @@ -2125,7 +2159,14 @@ void redrawQuit (void) { - W_WriteText (qwin, 5, 5, textColor, "Quit Netrek XP", 14, W_RegularFont); + int xoff; + + xoff = (BOXSIDE / 2) - 7 * W_Textwidth; + if (xoff < 1) + xoff = 5; + + W_WriteText (qwin, xoff, 5, textColor, + "Quit Netrek XP", 14, W_RegularFont); } #define CLOCK_BDR 0 @@ -2170,8 +2211,10 @@ cy = CLOCK_Y + CLOCK_HEI / 2; angle = (int)(-360 * time / max); - W_WriteBitmap ( CLOCK_BDR, CLOCK_BDR, clockpic, foreColor, qwin); - W_OverlayScaleBitmap (CLOCK_BDR, CLOCK_BDR, BMP_CHAND_WIDTH, BMP_CHAND_HEIGHT, + W_WriteScaleBitmap (CLOCK_BDR, CLOCK_BDR, BOXSIDE, BOXSIDE, + BMP_CCLOCK_WIDTH, BMP_CCLOCK_HEIGHT, + 0, clockpic, foreColor, qwin); + W_OverlayScaleBitmap (CLOCK_BDR, CLOCK_BDR, BOXSIDE, BOXSIDE, BMP_CHAND_WIDTH, BMP_CHAND_HEIGHT, angle, clockhandpic, foreColor, qwin); sprintf (buf, "%d", max - time); Index: input.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/input.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- input.c 5 Apr 2007 12:57:22 -0000 1.31 +++ input.c 6 Apr 2007 06:46:31 -0000 1.32 @@ -345,13 +345,13 @@ if (ww == mapw) { - g_x = x * GWIDTH / WINSIDE; - g_y = y * GWIDTH / WINSIDE; + g_x = x * GWIDTH / GWINSIDE; + g_y = y * GWIDTH / GWINSIDE; } else { - g_x = me->p_x + ((x - WINSIDE / 2) * SCALE); - g_y = me->p_y + ((y - WINSIDE / 2) * SCALE); + g_x = me->p_x + ((x - TWINSIDE / 2) * SCALE); + g_y = me->p_y + ((y - TWINSIDE / 2) * SCALE); } closedist = GWIDTH; @@ -1872,16 +1872,16 @@ { int me_x, me_y; - me_x = me->p_x * WINSIDE / GWIDTH; - me_y = me->p_y * WINSIDE / GWIDTH; + me_x = me->p_x * GWINSIDE / GWIDTH; + me_y = me->p_y * GWINSIDE / GWIDTH; return ((unsigned char) nint ((atan2 ((double) (x - me_x), (double) (me_y - y)) / 3.14159 * 128.) + 0.5)); } else - return ((unsigned char) nint ((atan2 ((double) (x - WINSIDE / 2), - (double) (WINSIDE / 2 - y)) + return ((unsigned char) nint ((atan2 ((double) (x - TWINSIDE / 2), + (double) (TWINSIDE / 2 - y)) / 3.14159 * 128.) + 0.5)); } Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.86 retrieving revision 1.87 diff -u -d -r1.86 -r1.87 --- local.c 5 Apr 2007 12:57:22 -0000 1.86 +++ local.c 6 Apr 2007 06:46:31 -0000 1.87 @@ -66,10 +66,12 @@ static void redrawStarSector(int sectorx, int sectory); -#define scaleLocal(pt) ((pt)/SCALE + (WINSIDE/2)) +#define scaleLocal(pt) ((pt)/SCALE + (TWINSIDE/2)) #define STARSIDE 500 /* Used to normalize star density */ #define INFORANGE 500 /* Range at which server stops sending some data */ +/* Max range at which other's torps can be seen, used in scaling sound volume */ +#define SOUND_MAXRANGE (int)(sqrt)(INFORANGE * INFORANGE/2) static struct _star stars[10][10][16]; @@ -81,14 +83,20 @@ { int newdx, newdy; - newdx = dx - WINSIDE/2; - newdy = dy - WINSIDE/2; + newdx = dx - TWINSIDE/2; + newdy = dy - TWINSIDE/2; distance = (int) sqrt((newdx)*(newdx) + (newdy)*(newdy)); // Normalize from 0 to 255, 0 being on top of player, 255 being max distance - // which would be a diagonal from player to corner of tactical - // Reason for normalization is Mix_SetDistance requires that range - distance = (int)((255 * distance)/CORNER_DIST); + // which would be a diagonal from player to corner of window where server + // stops sending some information (INFORANGE). This normalization assumes that + // the local window (TWINSIDE) matches the range at which some data is sent + // (INFORANGE). If TWINSIDE is increased, distances can now exceed SOUND_MAXRANGE + // causing the normalization to not quite work. These far distance events (such + // as a ship cloaking, explosions, etc) will play at minimum sound volume + // (essentially inaudible) due to a bounds check in Play_Sound_Loc(). + // Reason for normalization is Mix_SetDistance requires that range. + distance = (int)((255 * distance)/SOUND_MAXRANGE); // Calculate angle, then adjust as necessary for Mix_SetDistance if (distance != 0) { @@ -124,11 +132,11 @@ register int i, j, k; /* Star density: 16 stars per 20000 x 20000 galactic region */ - for (i = 0; i < (5 * STARSIDE / WINSIDE + 1); i++) { - for (j = 0; j < (5 * STARSIDE / WINSIDE + 1); j++) { - for (k = 0; k < (16 * (WINSIDE / STARSIDE) * (WINSIDE / STARSIDE)); k++) { - stars[i][j][k].s_x = RANDOM() % 20000 * WINSIDE / STARSIDE; - stars[i][j][k].s_y = RANDOM() % 20000 * WINSIDE / STARSIDE; + for (i = 0; i < (5 * STARSIDE / TWINSIDE + 1); i++) { + for (j = 0; j < (5 * STARSIDE / TWINSIDE + 1); j++) { + for (k = 0; k < (16 * (TWINSIDE / STARSIDE) * (TWINSIDE / STARSIDE)); k++) { + stars[i][j][k].s_x = RANDOM() % 20000 * TWINSIDE / STARSIDE; + stars[i][j][k].s_y = RANDOM() % 20000 * TWINSIDE / STARSIDE; stars[i][j][k].s_color = randcolor(); } } @@ -139,10 +147,10 @@ void DrawStars() { - const int fullview = WINSIDE * SCALE; - const int view = WINSIDE * SCALE / 2; + const int fullview = TWINSIDE * SCALE; + const int view = TWINSIDE * SCALE / 2; /* - note: cpp symbols in expressions (WINSIDE*SCALE) will be precalculated + note: cpp symbols in expressions (TWINSIDE*SCALE) will be precalculated by any C optimizer */ int sectorx = me->p_x / (fullview); @@ -171,7 +179,7 @@ sector_offy += fullview; } -#define MAXSECTOR (5 * STARSIDE / WINSIDE) + 1 +#define MAXSECTOR (5 * STARSIDE / TWINSIDE) + 1 /* at worst we have to redraw 4 star sectors */ @@ -231,8 +239,8 @@ static void redrawStarSector (int sectorx, int sectory) { - const int fullview = WINSIDE * SCALE; - const int view = WINSIDE * SCALE / 2; + const int fullview = TWINSIDE * SCALE; + const int view = TWINSIDE * SCALE / 2; register int i, dx, dy, dxx, dyy; register int xbase = sectorx * fullview; register int ybase = sectory * fullview; @@ -292,7 +300,7 @@ } dxx = (int) (Cos[mydir] * streaklength / 10); dyy = (int) (Sin[mydir] * streaklength / 10); - for (i = 0, s = star_sector; i < (16 * (WINSIDE / STARSIDE) * (WINSIDE / STARSIDE)); i++, s++) + for (i = 0, s = star_sector; i < (16 * (TWINSIDE / STARSIDE) * (TWINSIDE / STARSIDE)); i++, s++) { if (s->s_x + xbase > GWIDTH || s->s_y + ybase > GWIDTH) continue; @@ -315,7 +323,7 @@ return; } } - for (i = 0, s = star_sector; i < (16 * (WINSIDE / STARSIDE) * (WINSIDE / STARSIDE)); i++, s++) + for (i = 0, s = star_sector; i < (16 * (TWINSIDE / STARSIDE) * (TWINSIDE / STARSIDE)); i++, s++) { if (s->s_x + xbase > GWIDTH || s->s_y + ybase > GWIDTH) continue; @@ -512,7 +520,7 @@ { register int dx, dy; register struct planet *l; - const int view = SCALE * WINSIDE / 2 + BMP_PLANET_WIDTH * SCALE / 2; + const int view = SCALE * TWINSIDE / 2 + BMP_PLANET_WIDTH * SCALE / 2; for (l = planets + MAXPLANETS - 1; l >= planets; --l) { @@ -521,8 +529,8 @@ if (dx > view || dx < -view || dy > view || dy < -view) continue; - dx = dx / SCALE + WINSIDE / 2; - dy = dy / SCALE + WINSIDE / 2; + dx = dx / SCALE + TWINSIDE / 2; + dy = dy / SCALE + TWINSIDE / 2; if (planetBitmap == 3) { @@ -676,7 +684,7 @@ int buflen = 1; static int ph_col = 0; static int scaled_ph_col = 0; - const int view = SCALE * WINSIDE / 2 + BMP_SHIELD_WIDTH * SCALE / 2; + const int view = SCALE * TWINSIDE / 2 + BMP_SHIELD_WIDTH * SCALE / 2; int dx, dy, px, py, wx, wy, tx, ty, lx, ly; int new_dx, new_dy; int startx, starty, endx, endy; @@ -746,8 +754,8 @@ if (dx > view || dx < -view || dy > view || dy < -view) continue; - dx = dx / SCALE + WINSIDE / 2; - dy = dy / SCALE + WINSIDE / 2; + dx = dx / SCALE + TWINSIDE / 2; + dy = dy / SCALE + TWINSIDE / 2; cloak_phases = CLOAK_PHASES * server_ups / 10; if (j->p_flags & PFCLOAK) @@ -1170,9 +1178,9 @@ { if (myPlayer(j)) { - W_WriteCircle(w, WINSIDE/2, WINSIDE/2, DETDIST/SCALE, 0, 0, W_Red); - clearzone[0][clearcount] = WINSIDE/2 - (DETDIST/SCALE); - clearzone[1][clearcount] = WINSIDE/2 - (DETDIST/SCALE); + W_WriteCircle(w, TWINSIDE/2, TWINSIDE/2, DETDIST/SCALE, 0, 0, W_Red); + clearzone[0][clearcount] = TWINSIDE/2 - (DETDIST/SCALE); + clearzone[1][clearcount] = TWINSIDE/2 - (DETDIST/SCALE); clearzone[2][clearcount] = 2*DETDIST/SCALE + 1; clearzone[3][clearcount] = 2*DETDIST/SCALE + 1; clearcount++; @@ -1232,9 +1240,9 @@ { if (myPlayer(j) || isObsLockPlayer(j)) { - W_WriteCircle(w, WINSIDE/2, WINSIDE/2, SHOTRANGE/SCALE, 0, 0, W_Grey); - clearzone[0][clearcount] = WINSIDE/2 - (SHOTRANGE/SCALE); - clearzone[1][clearcount] = WINSIDE/2 - (SHOTRANGE/SCALE); + W_WriteCircle(w, TWINSIDE/2, TWINSIDE/2, SHOTRANGE/SCALE, 0, 0, W_Grey); + clearzone[0][clearcount] = TWINSIDE/2 - (SHOTRANGE/SCALE); + clearzone[1][clearcount] = TWINSIDE/2 - (SHOTRANGE/SCALE); clearzone[2][clearcount] = 2*SHOTRANGE/SCALE + 1; clearzone[3][clearcount] = 2*SHOTRANGE/SCALE + 1; clearcount++; @@ -1274,7 +1282,7 @@ else { /* draw */ - W_WriteTTSText(w, WINSIDE, tts_ypos, lastIn, tts_len); + W_WriteTTSText(w, TWINSIDE, tts_ypos, lastIn, tts_len); clearzone[0][clearcount] = last_tts_xpos; clearzone[1][clearcount] = tts_ypos - W_Textheight; clearzone[2][clearcount] = last_tts_width; @@ -1512,13 +1520,13 @@ ty = (int) (PHASEDIST * j->p_ship.s_phaserdamage / 100 * Sin[php->ph_dir]); - tx = (j->p_x + tx - me->p_x) / SCALE + WINSIDE / 2; - ty = (j->p_y + ty - me->p_y) / SCALE + WINSIDE / 2; + tx = (j->p_x + tx - me->p_x) / SCALE + TWINSIDE / 2; + ty = (j->p_y + ty - me->p_y) / SCALE + TWINSIDE / 2; } else if (php->ph_status == PHHIT2) { - tx = (php->ph_x - me->p_x) / SCALE + WINSIDE / 2; - ty = (php->ph_y - me->p_y) / SCALE + WINSIDE / 2; + tx = (php->ph_x - me->p_x) / SCALE + TWINSIDE / 2; + ty = (php->ph_y - me->p_y) / SCALE + TWINSIDE / 2; } else { @@ -1536,9 +1544,9 @@ else { tx = (players[php->ph_target].p_x - me->p_x) / - SCALE + WINSIDE / 2; + SCALE + TWINSIDE / 2; ty = (players[php->ph_target].p_y - me->p_y) / - SCALE + WINSIDE / 2; + SCALE + TWINSIDE / 2; } } @@ -1766,8 +1774,8 @@ px = (tractee->p_x - me->p_x); py = (tractee->p_y - me->p_y); - px = px / SCALE + WINSIDE / 2; - py = py / SCALE + WINSIDE / 2; + px = px / SCALE + TWINSIDE / 2; + py = py / SCALE + TWINSIDE / 2; if (px == dx && py == dy) continue; /* this had better be last @@ -1847,7 +1855,7 @@ int torpCount; int torpTeam; int frame; - const int view = SCALE * WINSIDE / 2; + const int view = SCALE * TWINSIDE / 2; for (t = torps, j = players; j != players + MAXPLAYER; t += MAXTORP, ++j) { @@ -1902,8 +1910,8 @@ if (dx > view || dx < -view || dy > view || dy < -view) continue; - dx = dx / SCALE + WINSIDE / 2; - dy = dy / SCALE + WINSIDE / 2; + dx = dx / SCALE + TWINSIDE / 2; + dy = dy / SCALE + TWINSIDE / 2; #ifdef SOUND if (j != me) @@ -2085,7 +2093,7 @@ { register struct plasmatorp *pt; register int dx, dy; - const int view = SCALE * WINSIDE / 2; + const int view = SCALE * TWINSIDE / 2; int ptorpTeam; int frame; @@ -2130,8 +2138,8 @@ if (dx > view || dx < -view || dy > view || dy < -view) continue; - dx = dx / SCALE + WINSIDE / 2; - dy = dy / SCALE + WINSIDE / 2; + dx = dx / SCALE + TWINSIDE / 2; + dy = dy / SCALE + TWINSIDE / 2; #ifdef SOUND if (pt->pt_owner != me->p_no) @@ -2309,11 +2317,11 @@ { register struct player *j; register int dx, dy; - const int view = SCALE * WINSIDE / 2; + const int view = SCALE * TWINSIDE / 2; #ifdef HOCKEY_LINES register struct s_line *sl; - const int HALF_WINSIDE = WINSIDE / 2; + const int HALF_WINSIDE = TWINSIDE / 2; int ex, ey, sx, sy; #endif @@ -2333,13 +2341,13 @@ if ((sy = HALF_WINSIDE - (me->p_y - sl->begin_y) / SCALE) < 0) sy = 0; - if (sy > (WINSIDE - 1)) - sy = WINSIDE - 1; + if (sy > (TWINSIDE - 1)) + sy = TWINSIDE - 1; if ((ey = HALF_WINSIDE - (me->p_y - sl->end_y) / SCALE) < 0) ey = 0; - if (ey > (WINSIDE - 1)) - ey = WINSIDE - 1; + if (ey > (TWINSIDE - 1)) + ey = TWINSIDE - 1; if (sy == ey) continue; } @@ -2357,13 +2365,13 @@ if ((sx = HALF_WINSIDE - (me->p_x - sl->begin_x) / SCALE) < 0) sx = 0; - if (sx > (WINSIDE - 1)) - sx = WINSIDE - 1; + if (sx > (TWINSIDE - 1)) + sx = TWINSIDE - 1; if ((ex = HALF_WINSIDE - (me->p_x - sl->end_x) / SCALE) < 0) ex = 0; - if (ex > (WINSIDE - 1)) - ex = WINSIDE - 1; + if (ex > (TWINSIDE - 1)) + ex = TWINSIDE - 1; if (sx == ex) continue; } @@ -2384,59 +2392,110 @@ #endif /* HOCKEY_LINES */ /* Draw inforange box (if necessary) */ - if ( WINSIDE > INFORANGE ) + if ( infoRange && TWINSIDE > INFORANGE && !(me->p_x < 0 || me->p_x > GWIDTH)) { - dx = (WINSIDE / 2) + (INFORANGE / 2); - sy = (WINSIDE / 2) - (INFORANGE / 2); - ey = (WINSIDE / 2) + (INFORANGE / 2); - W_MakeDashedLine (w, dx, sy, dx, ey, W_White); - clearline[0][clearlcount] = dx; - clearline[1][clearlcount] = sy; - clearline[2][clearlcount] = dx; - clearline[3][clearlcount] = ey; - clearlcount++; - - dx = (WINSIDE / 2) - (INFORANGE / 2); - sy = (WINSIDE / 2) - (INFORANGE / 2); - ey = (WINSIDE / 2) + (INFORANGE / 2); - W_MakeDashedLine (w, dx, sy, dx, ey, W_White); - clearline[0][clearlcount] = dx; - clearline[1][clearlcount] = sy; - clearline[2][clearlcount] = dx; - clearline[3][clearlcount] = ey; - clearlcount++; - - dy = (WINSIDE / 2) + (INFORANGE / 2); - sx = (WINSIDE / 2) - (INFORANGE / 2); - ex = (WINSIDE / 2) + (INFORANGE / 2); - W_MakeDashedLine (w, sx, dy, ex, dy, W_White); - clearline[0][clearlcount] = sx; - clearline[1][clearlcount] = dy; - clearline[2][clearlcount] = ex; - clearline[3][clearlcount] = dy; - clearlcount++; - - dy = (WINSIDE / 2) - (INFORANGE / 2); - sx = (WINSIDE / 2) - (INFORANGE / 2); - ex = (WINSIDE / 2) + (INFORANGE / 2); - W_MakeDashedLine (w, sx, dy, ex, dy, W_White); - clearline[0][clearlcount] = sx; - clearline[1][clearlcount] = dy; - clearline[2][clearlcount] = ex; - clearline[3][clearlcount] = dy; - clearlcount++; + const int LEFT = (TWINSIDE / 2) - (INFORANGE / 2); + const int RIGHT = (TWINSIDE / 2) + (INFORANGE / 2); + const int TOP = (TWINSIDE / 2) - (INFORANGE / 2); + const int BOTTOM = (TWINSIDE / 2) + (INFORANGE / 2); + + long dist; + + if (me->p_x > (INFORANGE / 2) * SCALE) + { + dx = LEFT; + dist = me->p_y - ((INFORANGE / 2) * SCALE); + if (dist < 0) + sy = (TOP - dist/SCALE); + else + sy = TOP; + dist = me->p_y + ((INFORANGE / 2) * SCALE); + if (dist > GWIDTH) + ey = (BOTTOM - (dist - GWIDTH)/SCALE); + else + ey = BOTTOM; + W_MakeDashedLine (w, dx, sy, dx, ey, W_White); + clearline[0][clearlcount] = dx; + clearline[1][clearlcount] = sy; + clearline[2][clearlcount] = dx; + clearline[3][clearlcount] = ey; + clearlcount++; + } + + if ((GWIDTH - me->p_x) > (INFORANGE / 2) * SCALE) + { + dx = RIGHT; + dist = me->p_y - ((INFORANGE / 2) * SCALE); + if (dist < 0) + sy = (TOP - dist/SCALE); + else + sy = TOP; + dist = me->p_y + ((INFORANGE / 2) * SCALE); + if (dist > GWIDTH) + ey = (BOTTOM - (dist - GWIDTH)/SCALE); + else + ey = BOTTOM; + W_MakeDashedLine (w, dx, sy, dx, ey, W_White); + clearline[0][clearlcount] = dx; + clearline[1][clearlcount] = sy; + clearline[2][clearlcount] = dx; + clearline[3][clearlcount] = ey; + clearlcount++; + } + + if (me->p_y > (INFORANGE / 2) * SCALE) + { + dy = TOP; + dist = me->p_x - ((INFORANGE / 2) * SCALE); + if (dist < 0) + sx = (LEFT - dist/SCALE); + else + sx = LEFT; + dist = me->p_x + ((INFORANGE / 2) * SCALE); + if (dist > GWIDTH) + ex = (RIGHT - (dist - GWIDTH)/SCALE); + else + ex = RIGHT; + W_MakeDashedLine (w, sx, dy, ex, dy, W_White); + clearline[0][clearlcount] = sx; + clearline[1][clearlcount] = dy; + clearline[2][clearlcount] = ex; + clearline[3][clearlcount] = dy; + clearlcount++; + } + + if ((GWIDTH - me->p_y) > (INFORANGE/ 2) * SCALE) + { + dy = BOTTOM; + dist = me->p_x - ((INFORANGE / 2) * SCALE); + if (dist < 0) + sx = (LEFT - dist/SCALE); + else + sx = LEFT; + dist = me->p_x + ((INFORANGE / 2) * SCALE); + if (dist > GWIDTH) + ex = (RIGHT - (dist - GWIDTH)/SCALE); + else + ex = RIGHT; + W_MakeDashedLine (w, sx, dy, ex, dy, W_White); + clearline[0][clearlcount] = sx; + clearline[1][clearlcount] = dy; + clearline[2][clearlcount] = ex; + clearline[3][clearlcount] = dy; + clearlcount++; + } } /* Draw Edges */ - if (me->p_x < (WINSIDE / 2) * SCALE) + if (me->p_x < (TWINSIDE / 2) * SCALE) { - dx = (WINSIDE / 2) - (me->p_x) / SCALE; - sy = (WINSIDE / 2) + (0 - me->p_y) / SCALE; - ey = (WINSIDE / 2) + (GWIDTH - me->p_y) / SCALE; + dx = (TWINSIDE / 2) - (me->p_x) / SCALE; + sy = (TWINSIDE / 2) + (0 - me->p_y) / SCALE; + ey = (TWINSIDE / 2) + (GWIDTH - me->p_y) / SCALE; if (sy < 0) sy = 0; - if (ey > WINSIDE - 1) - ey = WINSIDE - 1; + if (ey > TWINSIDE - 1) + ey = TWINSIDE - 1; /* XFIX */ W_CacheLine (w, dx, sy, dx, ey, warningColor); clearline[0][clearlcount] = dx; @@ -2446,15 +2505,15 @@ clearlcount++; } - if ((GWIDTH - me->p_x) < (WINSIDE / 2) * SCALE) + if ((GWIDTH - me->p_x) < (TWINSIDE / 2) * SCALE) { - dx = (WINSIDE / 2) + (GWIDTH - me->p_x) / SCALE; - sy = (WINSIDE / 2) + (0 - me->p_y) / SCALE; - ey = (WINSIDE / 2) + (GWIDTH - me->p_y) / SCALE; + dx = (TWINSIDE / 2) + (GWIDTH - me->p_x) / SCALE; + sy = (TWINSIDE / 2) + (0 - me->p_y) / SCALE; + ey = (TWINSIDE / 2) + (GWIDTH - me->p_y) / SCALE; if (sy < 0) sy = 0; - if (ey > WINSIDE - 1) - ey = WINSIDE - 1; + if (ey > TWINSIDE - 1) + ey = TWINSIDE - 1; /* XFIX */ W_CacheLine (w, dx, sy, dx, ey, warningColor); clearline[0][clearlcount] = dx; @@ -2464,15 +2523,15 @@ clearlcount++; } - if (me->p_y < (WINSIDE / 2) * SCALE) + if (me->p_y < (TWINSIDE / 2) * SCALE) { - dy = (WINSIDE / 2) - (me->p_y) / SCALE; - sx = (WINSIDE / 2) + (0 - me->p_x) / SCALE; - ex = (WINSIDE / 2) + (GWIDTH - me->p_x) / SCALE; + dy = (TWINSIDE / 2) - (me->p_y) / SCALE; + sx = (TWINSIDE / 2) + (0 - me->p_x) / SCALE; + ex = (TWINSIDE / 2) + (GWIDTH - me->p_x) / SCALE; if (sx < 0) sx = 0; - if (ex > WINSIDE - 1) - ex = WINSIDE - 1; + if (ex > TWINSIDE - 1) + ex = TWINSIDE - 1; /* XFIX */ W_CacheLine (w, sx, dy, ex, dy, warningColor); clearline[0][clearlcount] = sx; @@ -2482,15 +2541,15 @@ clearlcount++; } - if ((GWIDTH - me->p_y) < (WINSIDE / 2) * SCALE) + if ((GWIDTH - me->p_y) < (TWINSIDE / 2) * SCALE) { - dy = (WINSIDE / 2) + (GWIDTH - me->p_y) / SCALE; - sx = (WINSIDE / 2) + (0 - me->p_x) / SCALE; - ex = (WINSIDE / 2) + (GWIDTH - me->p_x) / SCALE; + dy = (TWINSIDE / 2) + (GWIDTH - me->p_y) / SCALE; + sx = (TWINSIDE / 2) + (0 - me->p_x) / SCALE; + ex = (TWINSIDE / 2) + (GWIDTH - me->p_x) / SCALE; if (sx < 0) sx = 0; - if (ex > WINSIDE - 1) - ex = WINSIDE - 1; + if (ex > TWINSIDE - 1) + ex = TWINSIDE - 1; /* XFIX */ W_CacheLine (w, sx, dy, ex, dy, warningColor); clearline[0][clearlcount] = sx; @@ -2597,9 +2656,9 @@ Play_Sound_Loc(FIRE_PLASMA_OTHER_WAV, SF_OTHER|SF_WEAPONS, other_plasma_angle, other_plasma_dist); } // Reset locations and fuses of other's closest torps and plasmas - other_torp_dist = CORNER_DIST; + other_torp_dist = SOUND_MAXRANGE; other_torp_angle = 0; - other_plasma_dist = CORNER_DIST; + other_plasma_dist = SOUND_MAXRANGE; other_plasma_angle = 0; sound_flags = me->p_flags; @@ -2627,8 +2686,8 @@ dy = j->p_y - me->p_y; if (ABS (dx) < view && ABS (dy) < view) { - dx = dx / SCALE + WINSIDE / 2; - dy = dy / SCALE + WINSIDE / 2; + dx = dx / SCALE + TWINSIDE / 2; + dy = dy / SCALE + TWINSIDE / 2; tri_x = dx + 0; tri_y = dy + 20; /* below ship */ facing = 1; @@ -2644,8 +2703,8 @@ dy = l->pl_y - me->p_y; if (ABS (dx) < view && ABS (dy) < view) { - dx = dx / SCALE + WINSIDE / 2; - dy = dy / SCALE + WINSIDE / 2; + dx = dx / SCALE + TWINSIDE / 2; + dy = dy / SCALE + TWINSIDE / 2; tri_x = dx; tri_y = dy - 20; /* below planet */ facing = 0; Index: enter.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/enter.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- enter.c 14 Mar 2007 23:24:08 -0000 1.9 +++ enter.c 6 Apr 2007 06:46:31 -0000 1.10 @@ -325,12 +325,12 @@ /* This part defines galaxy lines */ #define G_RINK_TOP 0 -#define G_RINK_BOTTOM (WINSIDE) +#define G_RINK_BOTTOM (GWINSIDE) #define G_TENTH (((G_RINK_BOTTOM - G_RINK_TOP)/10)) #define G_R_MID (((G_RINK_BOTTOM - G_RINK_TOP)/2)-1) /* center (red) line */ #define G_RINK_LENGTH ((G_RINK_BOTTOM - G_RINK_TOP)) -#define G_RINK_WIDTH ((WINSIDE*2/3)) -#define G_G_MID ((WINSIDE/2)) /* center of goal */ +#define G_RINK_WIDTH ((GWINSIDE*2/3)) +#define G_G_MID ((GWINSIDE/2)) /* center of goal */ #define G_RINK_LEFT ((G_G_MID-(G_RINK_WIDTH/2))-2) #define G_RINK_RIGHT ((G_G_MID+(G_RINK_WIDTH/2))-1) #define G_G_LFT (G_R_MID-G_TENTH) /* left edge of goal */ @@ -589,7 +589,7 @@ /* Right rink boundary */ map_hockey_lines[i].begin_x = map_hockey_lines[i].end_x = G_RINK_RIGHT; map_hockey_lines[i].begin_y = 0; - map_hockey_lines[i].end_y = WINSIDE - 1; + map_hockey_lines[i].end_y = GWINSIDE - 1; map_hockey_lines[i].color = W_Grey; map_hockey_lines[i].flag = &showHockeyLinesMap; map_hockey_lines[i++].orientation = S_LINE_VERTICAL; @@ -597,7 +597,7 @@ /* Left rink boundary */ map_hockey_lines[i].begin_x = map_hockey_lines[i].end_x = G_RINK_LEFT; map_hockey_lines[i].begin_y = 0; - map_hockey_lines[i].end_y = WINSIDE - 1; + map_hockey_lines[i].end_y = GWINSIDE - 1; map_hockey_lines[i].color = W_Grey; map_hockey_lines[i].flag = &showHockeyLinesMap; map_hockey_lines[i++].orientation = S_LINE_VERTICAL; Index: short.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/short.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- short.c 4 Apr 2007 04:06:38 -0000 1.20 +++ short.c 6 Apr 2007 06:46:32 -0000 1.21 @@ -736,10 +736,10 @@ pl->p_x = my_x = x; pl->p_y = my_y = y; - Plx[me->p_no] = WINSIDE / 2; - Ply[me->p_no] = WINSIDE / 2; - Pgx[me->p_no] = pl->p_x * WINSIDE / GWIDTH; - Pgy[me->p_no] = pl->p_y * WINSIDE / GWIDTH; + Plx[me->p_no] = TWINSIDE / 2; + Ply[me->p_no] = TWINSIDE / 2; + Pgx[me->p_no] = pl->p_x * GWINSIDE / GWIDTH; + Pgy[me->p_no] = pl->p_y * GWINSIDE / GWIDTH; redrawPlayer[me->p_no] = 1; #ifdef ROTATERACE Index: util.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/util.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- util.c 16 Mar 2007 01:44:24 -0000 1.4 +++ util.c 6 Apr 2007 06:46:32 -0000 1.5 @@ -81,13 +81,13 @@ if (ww == mapw) { - g_x = x * GWIDTH / WINSIDE; - g_y = y * GWIDTH / WINSIDE; + g_x = x * GWIDTH / GWINSIDE; + g_y = y * GWIDTH / GWINSIDE; } else { - g_x = me->p_x + ((x - WINSIDE / 2) * SCALE); - g_y = me->p_y + ((y - WINSIDE / 2) * SCALE); + g_x = me->p_x + ((x - TWINSIDE / 2) * SCALE); + g_y = me->p_y + ((y - TWINSIDE / 2) * SCALE); } targ = gettarget2 (g_x, g_y, targtype); Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.68 retrieving revision 1.69 diff -u -d -r1.68 -r1.69 --- defaults.c 5 Apr 2007 12:57:22 -0000 1.68 +++ defaults.c 6 Apr 2007 06:46:31 -0000 1.69 @@ -224,6 +224,13 @@ NULL } }, + {"infoRange", &infoRange, RC_BOOL, + { + "Show weapon's range boundary as a dashed white box if tactical", + "size is increased beyond the standard 500x500", + NULL + } + }, {"keepInfo", &keepInfo, RC_INT, { "How many tenths of seconds to keep info window on (default 15)", @@ -1842,6 +1849,7 @@ /* SRS 12/94, ignore the Capslock key */ ignoreCaps = booleanDefault ("ignoreCaps", ignoreCaps); + infoRange = booleanDefault ("infoRange", infoRange); showMySpeed = booleanDefault ("showMySpeed", showMySpeed); showOtherSpeed = booleanDefault ("showOtherSpeed", showOtherSpeed); @@ -1875,7 +1883,7 @@ tts_time = intDefault("tts_time", tts_time); tts_max_len = intDefault("tts_max_len", tts_max_len); - tts_ypos = intDefault("tts_ypos", WINSIDE / 2 - 16); + tts_ypos = intDefault("tts_ypos", TWINSIDE / 2 - 16); #endif /* BEEPLITE */ shipdefaults[DEFAULTSHIP].keymap = (unsigned char *) stringDefault ("keymap"); @@ -2383,6 +2391,9 @@ fputs ("# Local and map windows MUST be square. Size can be adjusted.\n", fp); fputs ("# If sizing downwards, don't forget to remap any windows nested\n", fp); fputs ("# inside these windows, such as team select and quit windows.\n", fp); + fputs ("# Most windows will autoadjust to the right spot if local or\n", fp); + fputs ("# map size are changed, so most window placements are commented\n", fp); + fputs ("# out. Uncomment them if you wish to customize.\n", fp); fputs ("\n", fp); } @@ -2438,19 +2449,6 @@ } fputs ("\n", fp); - // Warning window - always mapped - if ((adefault = stringDefault ("warn.parent")) != NULL) - { - sprintf (str, "warn.parent: %s\n", adefault); - fputs (str, fp); - } - if ((adefault = stringDefault ("warn.geometry")) != NULL) - { - sprintf (str, "warn.geometry: %s\n", adefault); - fputs (str, fp); - } - fputs ("\n", fp); - // Message window - preferred mapped if ((adefault = stringDefault ("message.parent")) != NULL) { @@ -2469,6 +2467,19 @@ fputs (str, fp); fputs ("\n", fp); + // Warning window - always mapped + if ((adefault = stringDefault ("warn.parent")) != NULL) + { + sprintf (str, "warn.parent: %s\n", adefault); + fputs (str, fp); + } + if ((adefault = stringDefault ("warn.geometry")) != NULL) + { + sprintf (str, "warn.geometry: %s\n", adefault); + fputs (str, fp); + } + fputs ("\n", fp); + // Planet window if ((adefault = stringDefault ("planet.parent")) != NULL) { Index: map.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- map.c 5 Apr 2007 12:57:22 -0000 1.42 +++ map.c 6 Apr 2007 06:46:32 -0000 1.43 @@ -97,8 +97,8 @@ int endX, endY; struct planet *pl; int pRadius; - const int tHeight = W_Textheight * GWIDTH / WINSIDE; - const int tWidth = W_Textwidth * GWIDTH / WINSIDE; + const int tHeight = W_Textheight * GWIDTH / GWINSIDE; + const int tWidth = W_Textwidth * GWIDTH / GWINSIDE; for (x = 0; x < DETAIL; x++) { @@ -116,9 +116,9 @@ assigned to a x,y point and that is intersected with the rough planet map in a checkredraw call, which doesn't work so good if the player ship is beeplite highlited */ #ifdef BEEPLITE - pRadius = 3 * BMP_MPLANET_WIDTH * GWIDTH / WINSIDE / 5; + pRadius = 3 * BMP_MPLANET_WIDTH * GWIDTH / GWINSIDE / 5; #else - pRadius = BMP_MPLANET_WIDTH * GWIDTH / WINSIDE / 2; + pRadius = BMP_MPLANET_WIDTH * GWIDTH / GWINSIDE / 2; #endif for (k = 0, pl = planets; k < MAXPLANETS; k++, pl++) { @@ -159,7 +159,7 @@ } } /* Now loop for the new planet bitmaps, which are roughly 50% wider */ - pRadius = 3 * BMP_MPLANET_WIDTH * GWIDTH / WINSIDE / 4; + pRadius = 3 * BMP_MPLANET_WIDTH * GWIDTH / GWINSIDE / 4; for (k = 0, pl = planets; k < MAXPLANETS; k++, pl++) { /* @@ -214,12 +214,12 @@ int endX, endY; struct planet *pl; #ifdef BEEPLITE - const int pRadius = 3 * BMP_MPLANET_WIDTH * GWIDTH / WINSIDE / 5; + const int pRadius = 3 * BMP_MPLANET_WIDTH * GWIDTH / GWINSIDE / 5; #else - const int pRadius = BMP_MPLANET_WIDTH * GWIDTH / WINSIDE / 2; + const int pRadius = BMP_MPLANET_WIDTH * GWIDTH / GWINSIDE / 2; #endif - const int tHeight = W_Textheight * GWIDTH / WINSIDE; - const int tWidth = W_Textwidth * GWIDTH / WINSIDE; + const int tHeight = W_Textheight * GWIDTH / GWINSIDE; + const int tWidth = W_Textwidth * GWIDTH / GWINSIDE; for (k = 0, pl = planets; k < MAXPLANETS; k++, pl++) { @@ -241,10 +241,10 @@ if (endY >= DETAIL) endY = DETAIL - 1; - startX = startX * SIZE * WINSIDE / GWIDTH; - startY = startY * SIZE * WINSIDE / GWIDTH; - endX = (endX * SIZE + SIZE - 1) * WINSIDE / GWIDTH; - endY = (endY * SIZE + SIZE - 1) * WINSIDE / GWIDTH; + startX = startX * SIZE * GWINSIDE / GWIDTH; + startY = startY * SIZE * GWINSIDE / GWIDTH; + endX = (endX * SIZE + SIZE - 1) * GWINSIDE / GWIDTH; + endY = (endY * SIZE + SIZE - 1) * GWINSIDE / GWIDTH; W_MakeLine(mapw, startX, startY, startX, endY, W_White); W_MakeLine(mapw, startX, startY, endX, startY, W_White); @@ -530,8 +530,8 @@ l->pl_flags &= ~PLREDRAW; /* Turn redraw flag off! */ - dx = l->pl_x * WINSIDE / GWIDTH; - dy = l->pl_y * WINSIDE / GWIDTH; + dx = l->pl_x * GWINSIDE / GWIDTH; + dy = l->pl_y * GWINSIDE / GWIDTH; /* Erase the planet first */ @@ -542,8 +542,8 @@ int odx, ody; - odx = pl_update[l->pl_no].plu_x * WINSIDE / GWIDTH; - ody = pl_update[l->pl_no].plu_y * WINSIDE / GWIDTH; + odx = pl_update[l->pl_no].plu_x * GWINSIDE / GWIDTH; + ody = pl_update[l->pl_no].plu_y * GWINSIDE / GWIDTH; /* XFIX */ if (planetBitmapGalaxy == 3) // Needs adjusting @@ -838,8 +838,8 @@ static int viewx = 0, viewy = 0; static char clearviewbox = 0; static char viewboxcleared = 0; - int viewdist = (WINSIDE / 2 * SCALE) / (GWIDTH / WINSIDE); - int view = WINSIDE * SCALE / 2; + int viewdist = (TWINSIDE / 2 * SCALE) / (GWIDTH / GWINSIDE); + int view = TWINSIDE * SCALE / 2; int mvx, mvy; #ifdef RECORDGAME @@ -851,8 +851,8 @@ #endif clearMap (); - dx = (me->p_x) / (GWIDTH / WINSIDE); - dy = (me->p_y) / (GWIDTH / WINSIDE); + dx = (me->p_x) / (GWIDTH / GWINSIDE); + dy = (me->p_y) / (GWIDTH / GWINSIDE); if (redrawall) { @@ -906,17 +906,17 @@ { clearviewbox = 0; /* clear old dots - placed here for less flicker */ - if (viewx + viewdist < WINSIDE && viewy + viewdist < WINSIDE) + if (viewx + viewdist < GWINSIDE && viewy + viewdist < GWINSIDE) W_MakePoint (mapw, viewx + viewdist, viewy + viewdist, backColor); - if (viewx + viewdist < WINSIDE && viewy - viewdist > 0) + if (viewx + viewdist < GWINSIDE && viewy - viewdist > 0) W_MakePoint (mapw, viewx + viewdist, viewy - viewdist, backColor); - if (viewx - viewdist > 0 && viewy + viewdist < WINSIDE) + if (viewx - viewdist > 0 && viewy + viewdist < GWINSIDE) W_MakePoint (mapw, viewx - viewdist, viewy + viewdist, backColor); if (viewx - viewdist > 0 && viewy - viewdist > 0) W_MakePoint (mapw, viewx - viewdist, viewy - viewdist, backColor); /* redraw any planets they overwrote */ - mvx = viewx * (GWIDTH / WINSIDE); /* correct from view scale */ - mvy = viewy * (GWIDTH / WINSIDE); + mvx = viewx * (GWIDTH / GWINSIDE); /* correct from view scale */ + mvy = viewy * (GWIDTH / GWINSIDE); checkRedraw(mvx + view, mvy + view); checkRedraw(mvx + view, mvy - view); checkRedraw(mvx - view, mvy + view); @@ -981,11 +981,11 @@ if (viewboxcleared || viewx != dx || viewy != dy) { /* draw the new points */ - if (dx + viewdist < WINSIDE && dy + viewdist < WINSIDE) + if (dx + viewdist < GWINSIDE && dy + viewdist < GWINSIDE) W_MakePoint (mapw, dx + viewdist, dy + viewdist, W_White); - if (dx + viewdist < WINSIDE && dy - viewdist > 0) + if (dx + viewdist < GWINSIDE && dy - viewdist > 0) W_MakePoint (mapw, dx + viewdist, dy - viewdist, W_White); - if (dx - viewdist > 0 && dy + viewdist < WINSIDE) + if (dx - viewdist > 0 && dy + viewdist < GWINSIDE) W_MakePoint (mapw, dx - viewdist, dy + viewdist, W_White); if (dx - viewdist > 0 && dy - viewdist > 0) W_MakePoint (mapw, dx - viewdist, dy - viewdist, W_White); @@ -1027,8 +1027,8 @@ continue; - dx = j->p_x * WINSIDE / GWIDTH; - dy = j->p_y * WINSIDE / GWIDTH; + dx = j->p_x * GWINSIDE / GWIDTH; + dy = j->p_y * GWINSIDE / GWIDTH; if (j->p_flags & PFCLOAK) @@ -1119,12 +1119,12 @@ #endif if (j->p_flags & PFCLOAK) { - rad = MAXDISTCLOAK; + rad = MAXDISTCLOAK * GWINSIDE / GWIDTH; color = W_Red; } else { - rad = MAXDISTVIS; + rad = MAXDISTVIS * GWINSIDE / GWIDTH; color = W_White; } W_WriteCircle(mapw, dx, dy, rad, 0, 1, color); @@ -1137,8 +1137,8 @@ /* Redraw check - redraw all planets in range. Have to adjust distance to account for planet radius and text of planet name */ - planx = pl->pl_x * WINSIDE / GWIDTH; - plany = pl->pl_y * WINSIDE / GWIDTH; + planx = pl->pl_x * GWINSIDE / GWIDTH; + plany = pl->pl_y * GWINSIDE / GWIDTH; distx = ABS(planx - dx) - pRadius - W_Textwidth; disty = ABS(plany - dy) - pRadius - W_Textheight; if (distx*distx + disty*disty < (rad*rad)) @@ -1162,8 +1162,8 @@ if (j->p_status == PFREE) continue; - dx = j->p_x * WINSIDE / GWIDTH; - dy = j->p_y * WINSIDE / GWIDTH; + dx = j->p_x * GWINSIDE / GWIDTH; + dy = j->p_y * GWINSIDE / GWIDTH; /* phasers */ ph = &phasers[j->p_no]; @@ -1187,13 +1187,13 @@ case PHMISS: /* Here I will have to compute end coordinate */ tx = (int) (j->p_x + PHASEDIST * j->p_ship.s_phaserdamage / 100 - * Cos[ph->ph_dir]) * WINSIDE / GWIDTH; + * Cos[ph->ph_dir]) * GWINSIDE / GWIDTH; ty = (int) (j->p_y + PHASEDIST * j->p_ship.s_phaserdamage / 100 - * Sin[ph->ph_dir]) * WINSIDE / GWIDTH; + * Sin[ph->ph_dir]) * GWINSIDE / GWIDTH; break; case PHHIT2: - tx = ph->ph_x * WINSIDE / GWIDTH; - ty = ph->ph_y * WINSIDE / GWIDTH; + tx = ph->ph_x * GWINSIDE / GWIDTH; + ty = ph->ph_y * GWINSIDE / GWIDTH; break; default: /* Don't draw phasers to ships out of galactic bounds */ @@ -1204,8 +1204,8 @@ } else { - tx = players[ph->ph_target].p_x * WINSIDE / GWIDTH; - ty = players[ph->ph_target].p_y * WINSIDE / GWIDTH; + tx = players[ph->ph_target].p_x * GWINSIDE / GWIDTH; + ty = players[ph->ph_target].p_y * GWINSIDE / GWIDTH; } break; } @@ -1217,7 +1217,7 @@ mclearlcount++; /* Check for overwriting planets, corrected from view scale*/ checkRedraw(j->p_x, j->p_y); - checkRedraw(tx * (GWIDTH / WINSIDE), ty * (GWIDTH / WINSIDE)); + checkRedraw(tx * (GWIDTH / GWINSIDE), ty * (GWIDTH / GWINSIDE)); } if (!j->p_ntorp && !j->p_nplasmatorp) @@ -1254,8 +1254,8 @@ } } - dx = k->t_x * WINSIDE / GWIDTH; - dy = k->t_y * WINSIDE / GWIDTH; + dx = k->t_x * GWINSIDE / GWIDTH; + dy = k->t_y * GWINSIDE / GWIDTH; if (k->t_status == TEXPLODE) { @@ -1309,8 +1309,8 @@ } } - dx = pt->pt_x * WINSIDE / GWIDTH; - dy = pt->pt_y * WINSIDE / GWIDTH; + dx = pt->pt_x * GWINSIDE / GWIDTH; + dy = pt->pt_y * GWINSIDE / GWIDTH; if (pt->pt_status == TEXPLODE) { @@ -1349,8 +1349,8 @@ { j = &players[me->p_playerl]; - dx = j->p_x * WINSIDE / GWIDTH; - dy = j->p_y * WINSIDE / GWIDTH; + dx = j->p_x * GWINSIDE / GWIDTH; + dy = j->p_y * GWINSIDE / GWIDTH; if (j->p_status == PALIVE && !(j->p_flags & PFCLOAK)) { @@ -1366,8 +1366,8 @@ { int mydx, mydy; - mydx = me->p_x * WINSIDE / GWIDTH; - mydy = me->p_y * WINSIDE / GWIDTH; + mydx = me->p_x * GWINSIDE / GWIDTH; + mydy = me->p_y * GWINSIDE / GWIDTH; W_MakeTractLine (mapw, mydx, mydy, @@ -1387,8 +1387,8 @@ { struct planet *l = &planets[me->p_planet]; - dx = l->pl_x * WINSIDE / GWIDTH; - dy = l->pl_y * WINSIDE / GWIDTH; + dx = l->pl_x * GWINSIDE / GWIDTH; + dy = l->pl_y * GWINSIDE / GWIDTH; W_WriteTriangle (mapw, dx, dy - (BMP_MPLANET_HEIGHT) / 2 - 4, 4, 0, foreColor); clearlmark[0] = dx; @@ -1401,8 +1401,8 @@ { int mydx, mydy; - mydx = me->p_x * WINSIDE / GWIDTH; - mydy = me->p_y * WINSIDE / GWIDTH; + mydx = me->p_x * GWINSIDE / GWIDTH; + mydy = me->p_y * GWINSIDE / GWIDTH; W_MakeTractLine (mapw, mydx, mydy, Index: dashboard3.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/dashboard3.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- dashboard3.c 26 Mar 2007 04:40:52 -0000 1.8 +++ dashboard3.c 6 Apr 2007 06:46:31 -0000 1.9 @@ -377,7 +377,7 @@ db_special (fr, 160, 32); /* TIMER */ - db_timer (fr, WINSIDE - 12 * W_Textwidth, 32); + db_timer (fr, 428, 32); light_erase(); Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.78 retrieving revision 1.79 diff -u -d -r1.78 -r1.79 --- data.c 5 Apr 2007 12:57:22 -0000 1.78 +++ data.c 6 Apr 2007 06:46:31 -0000 1.79 @@ -32,7 +32,8 @@ struct mctl *mctl; struct memory universe; -int WINSIDE = 500; /* Size of strategic and tactical windows */ +int TWINSIDE = 500; /* Size of tactical window */ +int GWINSIDE = 500; /* Size of galactic window */ int SCALE = 40; /* Window will be one pixel for these # spaces */ int ingame = 0; /* If player is in game - to distinguish between whether to use double buffering on the local and map window */ @@ -826,4 +827,5 @@ int lockLine = 1; /* draw dashed line on map from you to lock target */ int weaponsOnMap = 1; /* draw weapons fire on map */ int sortPlanets = 1; /* sort planet list by team and army count */ -int packetLights = 1; /* show packet send/receive via dashboard */ \ No newline at end of file +int packetLights = 1; /* show packet send/receive via dashboard */ +int infoRange = 1; /* show limit on info with large tactical windows */ \ No newline at end of file Index: docwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/docwin.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- docwin.c 7 May 2006 16:59:27 -0000 1.3 +++ docwin.c 6 Apr 2007 06:46:31 -0000 1.4 @@ -61,12 +61,12 @@ sprintf (buf, "--- %s ---", (char *) query_cowid ()); length = strlen (buf); - center = WINSIDE / 2 - (length * W_Textwidth) / 2; + center = 250 - (length * W_Textwidth) / 2; W_WriteText (docwin, center, W_Textheight, textColor, buf, length, W_BoldFont); sprintf (buf, CBUGS); length = strlen (buf); - center = WINSIDE / 2 - (length * W_Textwidth) / 2; + center = 250 - (length * W_Textwidth) / 2; W_WriteText (docwin, center, 3 * W_Textheight, textColor, buf, length, W_RegularFont); @@ -239,12 +239,12 @@ sprintf (buf, "--- %s ---", (char *) query_cowid ()); length = strlen (buf); - center = WINSIDE / 2 - (length * W_Textwidth) / 2; + center = 250 - (length * W_Textwidth) / 2; W_WriteText (xtrekrcwin, center, W_Textheight, textColor, buf, length, W_BoldFont); sprintf (buf, CBUGS); length = strlen (buf); - center = WINSIDE / 2 - (length * W_Textwidth) / 2; + center = 250 - (length * W_Textwidth) / 2; W_WriteText (xtrekrcwin, center, 3 * W_Textheight, textColor, buf, length, W_RegularFont); Index: option.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/option.c,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- option.c 4 Apr 2007 04:06:38 -0000 1.44 +++ option.c 6 Apr 2007 06:46:32 -0000 1.45 @@ -422,6 +422,7 @@ {1, "omit team letter on map", &omitTeamLetter, 0, 0, 0, NULL, NULL}, {1, "draw view box on map", &viewBox, 0, 0, 0, NULL, NULL}, {1, "", &viewRange, 0, 0, 0, viewrangemess, NULL}, + {1, "show info limits on local", &infoRange, 0, 0, 0, NULL, NULL}, {1, "draw stars on local", &showStars, 0, 0, 0, NULL, NULL}, {1, "draw warp streaks", &warpStreaks, 0, 0, 0, NULL, NULL}, {1, "alert on extra border(s)", &extraAlertBorder, 0, 0, 0, NULL, NULL}, @@ -500,7 +501,7 @@ if (optionWin == NULL) { - optionWin = W_MakeMenu ("option", WINSIDE + 10, -BORDER + 10, OPTIONLEN, + optionWin = W_MakeMenu ("option", TWINSIDE + 10, -BORDER + 10, OPTIONLEN, MaxOptions, baseWin, OPTIONBORDER); W_ResizeMenuToNumItems (optionWin, CurrentMenu->numopt); W_SetWindowKeyDownHandler (optionWin, optionaction); Index: macrowin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/macrowin.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- macrowin.c 12 Apr 2006 04:20:03 -0000 1.2 +++ macrowin.c 6 Apr 2007 06:46:32 -0000 1.3 @@ -330,7 +330,7 @@ if (num >= NUMLINES) num = NUMLINES; - macroWin = W_MakeTextWindow ("macrow", WINSIDE + BORDER + 25, BORDER + 5, + macroWin = W_MakeTextWindow ("macrow", TWINSIDE + BORDER + 25, BORDER + 5, 80, num, NULL, BORDER); W_ResizeTextWindow (macroWin, 80, num); From modemhero at users.sourceforge.net Fri Apr 6 01:46:33 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 06 Apr 2007 06:46:33 +0000 Subject: [netrek-cvs] client/netrekxp/resources/htmlhelp/html generalconfig.html, 1.46, 1.47 Message-ID: <20070406064644.A3C801867E0@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv30991/resources/htmlhelp/html Modified Files: generalconfig.html Log Message: This large patch continues the work on allowing resizeable local and map windows. WINSIDE is now history, having been split into TWINSIDE and GWINSIDE. A few WINSIDE based defines were modified. Visible ship range (MAXDISTCLOAK and MAXDISTVIS) were converted to galactic units. The CORNER_DIST variable was renamed to SOUND_MAXRANGE and now goes off of INFORANGE scale rather than WINSIDE scale. This keeps the scaling factor for sounds the same no matter what size tactical is used (sounds fall off to nothing at the same distance as before). New function sound_window_height to calculate size of sound window (trivial really, but makes it so no more editing newwin every time a new option is added to the sound menu). Commented out most of the windows geometry entries in the netrekrc, and updated them to match the new default settings for a normal 500x500 local and 500x500 map window. Reason being, newwin entry routine now does a good job adjusting window sizes to match local and map windows, so let's not have the user worry about changing all the geometries. Ideally users will change tactical and map size, and have program do most of the adjusting for them. On that note, changed a whole bunch of window default geometries to use exact math so windows line up perfectly, and so they all scale proper (compare old message win placements to new ones and you will see the difference). New netrekrc option infoRange to show a box around your ship showing the limit on which server sends weapons data. Box is "smart" and doesn't draw sections that fall outside galaxy bounds. Changed a few dashboard timers to no longer be located based on WINSIDE (that was a mistake in the first place). Dashboards do NOT scale with tactical though, and it will be a MAJOR project to add that ability. The header for docwin is no longer centered on WINSIDE, since the actual docwin size is hard coded to 500x500, made no sense to have header to use WINSIDE in the first place. MOTD window now is fixed at 500 pixels wide, no point in making it wider, cause the text isn't going to extend due to the server limiting its textwidth. A bunch of bitmaps which were never anticipated to scale, now scale. Geno bitmaps now scale to fit map window, and are properly defined in bitmaps.h as to their bitmap size. Team and quit window bitmaps now scale. Index: generalconfig.html =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html/generalconfig.html,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- generalconfig.html 4 Apr 2007 04:06:37 -0000 1.46 +++ generalconfig.html 6 Apr 2007 06:46:31 -0000 1.47 @@ -387,6 +387,16 @@ +infoRange +Show weapon's range boundary with large tacticals windows + +
    +
  • on (default)
  • +
  • off
  • +
+ + + keepInfo Number of tenths of seconds to keep Info window integer
default: 15
to disable: 0 From modemhero at users.sourceforge.net Fri Apr 6 01:46:33 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 06 Apr 2007 06:46:33 +0000 Subject: [netrek-cvs] client/netrekxp/include bitmaps.h, 1.15, 1.16 data.h, 1.71, 1.72 defs.h, 1.18, 1.19 sound.h, 1.19, 1.20 Message-ID: <20070406064644.80435B42A@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv30991/include Modified Files: bitmaps.h data.h defs.h sound.h Log Message: This large patch continues the work on allowing resizeable local and map windows. WINSIDE is now history, having been split into TWINSIDE and GWINSIDE. A few WINSIDE based defines were modified. Visible ship range (MAXDISTCLOAK and MAXDISTVIS) were converted to galactic units. The CORNER_DIST variable was renamed to SOUND_MAXRANGE and now goes off of INFORANGE scale rather than WINSIDE scale. This keeps the scaling factor for sounds the same no matter what size tactical is used (sounds fall off to nothing at the same distance as before). New function sound_window_height to calculate size of sound window (trivial really, but makes it so no more editing newwin every time a new option is added to the sound menu). Commented out most of the windows geometry entries in the netrekrc, and updated them to match the new default settings for a normal 500x500 local and 500x500 map window. Reason being, newwin entry routine now does a good job adjusting window sizes to match local and map windows, so let's not have the user worry about changing all the geometries. Ideally users will change tactical and map size, and have program do most of the adjusting for them. On that note, changed a whole bunch of window default geometries to use exact math so windows line up perfectly, and so they all scale proper (compare old message win placements to new ones and you will see the difference). New netrekrc option infoRange to show a box around your ship showing the limit on which server sends weapons data. Box is "smart" and doesn't draw sections that fall outside galaxy bounds. Changed a few dashboard timers to no longer be located based on WINSIDE (that was a mistake in the first place). Dashboards do NOT scale with tactical though, and it will be a MAJOR project to add that ability. The header for docwin is no longer centered on WINSIDE, since the actual docwin size is hard coded to 500x500, made no sense to have header to use WINSIDE in the first place. MOTD window now is fixed at 500 pixels wide, no point in making it wider, cause the text isn't going to extend due to the server limiting its textwidth. A bunch of bitmaps which were never anticipated to scale, now scale. Geno bitmaps now scale to fit map window, and are properly defined in bitmaps.h as to their bitmap size. Team and quit window bitmaps now scale. Index: defs.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/defs.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- defs.h 5 Apr 2007 12:57:22 -0000 1.18 +++ defs.h 6 Apr 2007 06:46:31 -0000 1.19 @@ -27,8 +27,6 @@ #define MAXPLASMA 1 #define PKEY 128 -#define CORNER_DIST (int)(sqrt)(WINSIDE*WINSIDE/2) - #define BORDER 1 /* border width for option * windows */ #define THICKBORDER 3 /* Thicker border for windows */ @@ -66,10 +64,10 @@ * person can go into orbit */ #define PFIREDIST 1500 /* At this range a planet * will shoot at a player */ -#define MAXDISTCLOAK (WINSIDE/7) +#define MAXDISTCLOAK (GWIDTH/7) /* At this range a player can be seen while cloaked */ -#define MAXDISTVIS (WINSIDE/3) +#define MAXDISTVIS (GWIDTH/3) /* At this range a player can be seen while visible (uncloaked) */ Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- data.h 5 Apr 2007 12:57:22 -0000 1.71 +++ data.h 6 Apr 2007 06:46:31 -0000 1.72 @@ -48,8 +48,10 @@ extern struct memory universe; extern struct planet pdata[]; -extern int WINSIDE; /* This used to be a define ... */ -extern int SCALE; /* and so was this ... */ +/* These used to be defines ... */ +extern int TWINSIDE; +extern int GWINSIDE; +extern int SCALE; extern unsigned int oldalert; extern unsigned char oldtourn; @@ -735,4 +737,5 @@ extern int weaponsOnMap; /* draw weapons fire on map */ extern int sortPlanets; /* sort planet list by team and army count */ extern int packetLights; /* show packet send/receive via dashboard */ +extern int infoRange; /* show limit on info with large tactical windows */ #endif /* _h_data */ Index: bitmaps.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/bitmaps.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- bitmaps.h 14 Mar 2007 23:24:05 -0000 1.15 +++ bitmaps.h 6 Apr 2007 06:46:31 -0000 1.16 @@ -109,6 +109,8 @@ #define BMP_CLOAK_HEIGHT 20 #define BMP_TEAM_SELECT_WIDTH 100 #define BMP_TEAM_SELECT_HEIGHT 100 +#define BMP_GENO_WIDTH 500 +#define BMP_GENO_HEIGHT 500 #define BMP_SHIELD_WIDTH 20 #define BMP_SHIELD_HEIGHT 20 #define BMP_STIPPLE_WIDTH 16 Index: sound.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/sound.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- sound.h 18 Mar 2007 01:46:49 -0000 1.19 +++ sound.h 6 Apr 2007 06:46:31 -0000 1.20 @@ -14,6 +14,7 @@ extern void Group_Sound (int type, int channel); extern void ChangeVolume (int vol); extern void Init_Sound (void); +extern int sound_window_height (void); #define SF_EXPLOSIONS 0x001 #define SF_WEAPONS 0x002 From modemhero at users.sourceforge.net Fri Apr 6 01:46:33 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 06 Apr 2007 06:46:33 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C,1.125,1.126 Message-ID: <20070406064644.871D51867DD@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv30991 Modified Files: NetrekXP to do list.C Log Message: This large patch continues the work on allowing resizeable local and map windows. WINSIDE is now history, having been split into TWINSIDE and GWINSIDE. A few WINSIDE based defines were modified. Visible ship range (MAXDISTCLOAK and MAXDISTVIS) were converted to galactic units. The CORNER_DIST variable was renamed to SOUND_MAXRANGE and now goes off of INFORANGE scale rather than WINSIDE scale. This keeps the scaling factor for sounds the same no matter what size tactical is used (sounds fall off to nothing at the same distance as before). New function sound_window_height to calculate size of sound window (trivial really, but makes it so no more editing newwin every time a new option is added to the sound menu). Commented out most of the windows geometry entries in the netrekrc, and updated them to match the new default settings for a normal 500x500 local and 500x500 map window. Reason being, newwin entry routine now does a good job adjusting window sizes to match local and map windows, so let's not have the user worry about changing all the geometries. Ideally users will change tactical and map size, and have program do most of the adjusting for them. On that note, changed a whole bunch of window default geometries to use exact math so windows line up perfectly, and so they all scale proper (compare old message win placements to new ones and you will see the difference). New netrekrc option infoRange to show a box around your ship showing the limit on which server sends weapons data. Box is "smart" and doesn't draw sections that fall outside galaxy bounds. Changed a few dashboard timers to no longer be located based on WINSIDE (that was a mistake in the first place). Dashboards do NOT scale with tactical though, and it will be a MAJOR project to add that ability. The header for docwin is no longer centered on WINSIDE, since the actual docwin size is hard coded to 500x500, made no sense to have header to use WINSIDE in the first place. MOTD window now is fixed at 500 pixels wide, no point in making it wider, cause the text isn't going to extend due to the server limiting its textwidth. A bunch of bitmaps which were never anticipated to scale, now scale. Geno bitmaps now scale to fit map window, and are properly defined in bitmaps.h as to their bitmap size. Team and quit window bitmaps now scale. Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.125 retrieving revision 1.126 diff -u -d -r1.125 -r1.126 --- NetrekXP to do list.C 5 Apr 2007 12:57:22 -0000 1.125 +++ NetrekXP to do list.C 6 Apr 2007 06:46:31 -0000 1.126 @@ -2,7 +2,6 @@ 1) there should be some sort of chance to give default resolution in GUI, 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. Things not gonna happen, or server problems: 2) torp_other and plasma_other not working right due to lack of torp fuse info @@ -44,6 +43,11 @@ 10) sendto() error: 10049 on metaserver connect to a bad server, believe it's due to hostname not resolving. Currently fixed by using mulitple attempts to resolve bad host names. +11) CPU profile cambot +12) Solve richtext issue with keyboard/mouse action over richtext windows.. +12a) minor richtext issue with scrolling - extra line at the end +13) With expanded tactical ..can now see ships at galactic coordinates (-500,-500), +if you fly into the NW corner of the galaxy. this was never anticipated! Stas's list: - color coded (?) and scrollable playerlist. From modemhero at users.sourceforge.net Fri Apr 6 01:46:33 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 06 Apr 2007 06:46:33 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.158, 1.159 netrekrc, 1.52, 1.53 netrekrc_options.txt, 1.45, 1.46 Message-ID: <20070406064644.9C68DB42B@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv30991/resources/docs Modified Files: changes.txt netrekrc netrekrc_options.txt Log Message: This large patch continues the work on allowing resizeable local and map windows. WINSIDE is now history, having been split into TWINSIDE and GWINSIDE. A few WINSIDE based defines were modified. Visible ship range (MAXDISTCLOAK and MAXDISTVIS) were converted to galactic units. The CORNER_DIST variable was renamed to SOUND_MAXRANGE and now goes off of INFORANGE scale rather than WINSIDE scale. This keeps the scaling factor for sounds the same no matter what size tactical is used (sounds fall off to nothing at the same distance as before). New function sound_window_height to calculate size of sound window (trivial really, but makes it so no more editing newwin every time a new option is added to the sound menu). Commented out most of the windows geometry entries in the netrekrc, and updated them to match the new default settings for a normal 500x500 local and 500x500 map window. Reason being, newwin entry routine now does a good job adjusting window sizes to match local and map windows, so let's not have the user worry about changing all the geometries. Ideally users will change tactical and map size, and have program do most of the adjusting for them. On that note, changed a whole bunch of window default geometries to use exact math so windows line up perfectly, and so they all scale proper (compare old message win placements to new ones and you will see the difference). New netrekrc option infoRange to show a box around your ship showing the limit on which server sends weapons data. Box is "smart" and doesn't draw sections that fall outside galaxy bounds. Changed a few dashboard timers to no longer be located based on WINSIDE (that was a mistake in the first place). Dashboards do NOT scale with tactical though, and it will be a MAJOR project to add that ability. The header for docwin is no longer centered on WINSIDE, since the actual docwin size is hard coded to 500x500, made no sense to have header to use WINSIDE in the first place. MOTD window now is fixed at 500 pixels wide, no point in making it wider, cause the text isn't going to extend due to the server limiting its textwidth. A bunch of bitmaps which were never anticipated to scale, now scale. Geno bitmaps now scale to fit map window, and are properly defined in bitmaps.h as to their bitmap size. Team and quit window bitmaps now scale. Index: netrekrc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- netrekrc 5 Apr 2007 12:57:22 -0000 1.52 +++ netrekrc 6 Apr 2007 06:46:31 -0000 1.53 @@ -129,6 +129,10 @@ # Ignore Caps Lock key state ignoreCaps: on +# Show weapon's range boundary as a dashed white box if tactical +# size is increased beyond the standard 500x500 +infoRange: on + # How many tenths of seconds to keep info window on (default 15) keepInfo: 15 @@ -577,115 +581,118 @@ # Local and map windows MUST be square. Size can be adjusted. # If sizing downwards, don't forget to remap any windows nested # inside these windows, such as team select and quit windows. +# Most windows will autoadjust to the right spot if local or +# map size are changed, so most window placements are commented +# out. Uncomment them if you wish to customize. netrek.parent: netrek netrek.geometry: 1024x768 local.parent: netrek -local.geometry: 500x500+0+0 +local.geometry: 500x500 map.parent: netrek -map.geometry: 500x500+506+0 +map.geometry: 500x500 tstat.parent: netrek -tstat.geometry: 505x43+0+506 - -warn.parent: netrek -warn.geometry: 504x16+506+523 +#tstat.geometry: 504x42+0+506 message.parent: netrek -message.geometry: 504x16+506+506 +#message.geometry: 504x20+506+506 message.mapped: on +warn.parent: netrek +#warn.geometry: 504x20+506+526 + planet.parent: netrek -planet.geometry: 57x43+660+0 +#planet.geometry: 57x43+516+10 planet.mapped: off rank.parent: netrek -rank.geometry: 80x18+10+300 +#rank.geometry: 80x18+10+300 rank.mapped: off player.parent: netrek -player.geometry: +0+550 +#player.geometry: +0+550 player.mapped: on player2.parent: netrek -player2.geometry: +140+100 +#player2.geometry: +140+100 player2.mapped: off help.parent: netrek -help.mapped: off +#help.mapped: off review_all.parent: netrek -review_all.geometry: 81x5+506+658 +#review_all.geometry: 81x5+506+660 review_all.mapped: on review_team.parent: netrek -review_team.geometry: 81x7+506+579 +#review_team.geometry: 81x6+506+590 review_team.mapped: on review_your.parent: netrek -review_your.geometry: 81x3+506+540 +#review_your.geometry: 81x3+506+550 review_your.mapped: on review_kill.parent: netrek -review_kill.geometry: 81x3+506+717 +#review_kill.geometry: 81x3+506+720 review_kill.mapped: on review_kill.allow: KP review_phaser.parent: netrek -review_phaser.geometry: 81x4+506+676 +#review_phaser.geometry: 81x4+506+750 review_phaser.mapped: off review.parent: netrek -review.geometry: 81x22+506+540 +#review.geometry: 81x20+506+550 review.mapped: off pingStats.parent: netrek -pingStats.geometry: +500+4 +#pingStats.geometry: +500+4 pingStats.mapped: off UDP.parent: netrek -UDP.geometry: +510+9 +#UDP.geometry: +510+9 UDP.mapped: off network.parent: netrek -network.geometry: +510+9 +#network.geometry: +510+9 network.mapped: off DocWin.parent: netrek -DocWin.geometry: 500x500+0+181 +#DocWin.geometry: 500x500+0+181 DocWin.mapped: off xtrekrcWin.parent: netrek -xtrekrcWin.geometry: 500x500+0+200 +#xtrekrcWin.geometry: 500x500+0+200 xtrekrcWin.mapped: off fed.parent: local -fed.geometry: 100x100+0+400 +#fed.geometry: 100x100+0+400 kli.parent: local -kli.geometry: 100x100+200+400 +#kli.geometry: 100x100+200+400 ori.parent: local -ori.geometry: 100x100+300+400 +#ori.geometry: 100x100+300+400 rom.parent: local -rom.geometry: 100x100+100+400 +#rom.geometry: 100x100+100+400 quit.parent: local -quit.geometry: 100x100+400+400 +#quit.geometry: 100x100+400+400 stats.parent: netrek -stats.geometry: 100x80+405+506 +#stats.geometry: 100x80+406+506 stats.mapped: off war.parent: netrek -war.geometry: 20x6+510+9 +#war.geometry: 20x6+510+9 war.mapped: off sound.parent: netrek -sound.geometry: +520+9 +#sound.geometry: +520+9 sound.mapped: off Index: netrekrc_options.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc_options.txt,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- netrekrc_options.txt 4 Apr 2007 04:06:37 -0000 1.45 +++ netrekrc_options.txt 6 Apr 2007 06:46:31 -0000 1.46 @@ -72,6 +72,7 @@ indshipGbmpfile: (path) - your own ship's grayscale bitmaps indshipTbmpfile: (path) - shaded color bitmaps indshipMbmpfile: (path) - mono bitmaps +infoRange: (on/off) show weapon's range boundary with large tacticals windows keepInfo: (0-100) number of tenths of seconds to keep info (default 15) keepPeace: (on/off) stays in peace after being killed keymap: (string) change keymap Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.158 retrieving revision 1.159 diff -u -d -r1.158 -r1.159 --- changes.txt 4 Apr 2007 10:34:21 -0000 1.158 +++ changes.txt 6 Apr 2007 06:46:31 -0000 1.159 @@ -1,4 +1,17 @@ Netrek XP 2006, Version 1.3: +- added the ability to change the size of the local or map windows! This is a huge improvement, + and is probably the most often requested feature. There really is no limit on how big or small + you can make the windows. As you increase local window size, you can see further, giving + somewhat of a gameplay advantage - you can see ships, shields, explosions, but not weapons + fire other than your own torps. Just as important, you can now choose a different size + for local vs map window. A typical user may want a 750x750 local but only a 400x400 map. +- most netrekrc window's geometries are now commented out (all except map and local), this + is because adjusting the size of local or map will now do a pretty good job of autoplacing + all the other windows for you +- new netrekrc option "infoRange: (on)/off" to draw a dashed white box on your tactical + if you increase the tactical size beyond 500 x 500. This box is drawn to show the 500 + x 500 range, which is important because other people's weapons data is not sent beyond + this range (box essentially shows limit of fog of war for weapons). - added support for CHECK_PLANETS feature packet, this is a nice packet that checks with the server to make sure your planet info is up to date, so no more phantom armies on a planet or delay on bombing a planet flat because you lost a planet From modemhero at users.sourceforge.net Sat Apr 7 00:17:41 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 07 Apr 2007 05:17:41 +0000 Subject: [netrek-cvs] client/netrekxp/src data.c, 1.79, 1.80 defaults.c, 1.69, 1.70 input.c, 1.32, 1.33 local.c, 1.87, 1.88 map.c, 1.43, 1.44 mswindow.c, 1.55, 1.56 util.c, 1.5, 1.6 Message-ID: <20070407051751.9C449B440@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv16681/src Modified Files: data.c defaults.c input.c local.c map.c mswindow.c util.c Log Message: This patch adds scalability to the local window. New netrekrc option scaleFactor controls the scale, which can go from normal to 4x zoom. Control-a and control-z keys are now used to zoom in/out. SCALE was replaced by scaleFactor in many places, though SCALE is still used extensively. Many bitmap drawing functions now are scaled via a SCALE / scaleFactor. Also, many bitmaps that were never scaled before, i.e. the old bitmap sets, shield, cloak, explosions, etc..are now scaled. This has the added bonus of making the old ship bitmap sets show ships to 256 positions. Fixed some inconsistencies in how clearzones were defined in local.c, such as in the case of warnHull option. Fixed stars and inforange box to work at different zooms. Fixed the scalebitmap functions to use the color/palette on the globalmemdc2 for the first stretch bitmap operation, otherwise color info was lost. Allowing keyboard actions in richtext windows - this allows for copy /paste, however still the major problem of the richtext window proc not doing anything, thus keystrokes are ignored. Army/wrench/fuel icons were replaced by the unused art icons I had made but never used, since these now scale up to 4x (the old army/ wrench/fuel didn't look good at 4x zoom). Cleaned up a bunch of stray pixels in the highres ship bitmap sets, that were noticeable at higher zooms. Fixed the planet resource location and clearzones for both local and galactic planets with the new planet bitmaps. Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 --- mswindow.c 6 Apr 2007 06:46:32 -0000 1.55 +++ mswindow.c 7 Apr 2007 05:17:39 -0000 1.56 @@ -4049,7 +4049,17 @@ SelectObject (GlobalMemDC, bitmap->bm); SelectObject (GlobalMemDC2, newbmp); - + + // Need to setup colors and stuff + if (NetrekPalette) + { + SelectPalette (GlobalMemDC2, NetrekPalette, FALSE); + RealizePalette (GlobalMemDC2); + } + + SetBkColor (GlobalMemDC2, colortable[color].rgb); + SetTextColor (GlobalMemDC2, colortable[BLACK].rgb); + // Copy selected section of main bitmap into newbmp before rotation SetStretchBltMode(GlobalMemDC2, COLORONCOLOR); StretchBlt(GlobalMemDC2, 0, 0, destwidth, destheight, GlobalMemDC, @@ -4841,12 +4851,18 @@ if (!strcmp("local", name)) { if (*height > *width) + { + *width = *height; TWINSIDE = *height; + } } else if (!strcmp("map", name)) { if (*height > *width) + { + *width = *height; GWINSIDE = *height; + } } result |= G_SET_HEIGHT; if (*s == 0) @@ -5264,6 +5280,16 @@ SelectObject (GlobalMemDC, bitmap->bm); SelectObject (GlobalMemDC2, newbmp); + // Need to setup colors and stuff + if (NetrekPalette) + { + SelectPalette (GlobalMemDC2, NetrekPalette, FALSE); + RealizePalette (GlobalMemDC2); + } + + SetBkColor (GlobalMemDC2, colortable[color].rgb); + SetTextColor (GlobalMemDC2, colortable[BLACK].rgb); + // Copy selected section of main bitmap into newbmp before rotation SetStretchBltMode(GlobalMemDC2, COLORONCOLOR); StretchBlt(GlobalMemDC2, 0, 0, destwidth, destheight, GlobalMemDC, @@ -5937,8 +5963,8 @@ W_ChangeBorder ((W_Window) win, W_White); break;*/ - case WM_KEYDOWN: - return (0); + // case WM_KEYDOWN: + // return (0); case WM_LBUTTONDOWN: BringWindowToTop (hwnd); break; Index: input.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/input.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- input.c 6 Apr 2007 06:46:31 -0000 1.32 +++ input.c 7 Apr 2007 05:17:39 -0000 1.33 @@ -267,7 +267,7 @@ emptyKey, /* 31 */ emptyKey, /* 31 */ emptyKey, /* 31 */ - emptyKey, /* 31 */ + Key193, /* ^a */ Key194, /* ^b */ Key195, /* ^c */ emptyKey, /* 31 */ @@ -292,7 +292,7 @@ emptyKey, /* 31 */ emptyKey, /* 31 */ emptyKey, /* 31 */ - emptyKey, /* 31 */ + Key218, /* ^z */ emptyKey, /* 31 */ emptyKey, /* 31 */ emptyKey, /* 31 */ @@ -350,8 +350,8 @@ } else { - g_x = me->p_x + ((x - TWINSIDE / 2) * SCALE); - g_y = me->p_y + ((y - TWINSIDE / 2) * SCALE); + g_x = me->p_x + ((x - TWINSIDE / 2) * scaleFactor); + g_y = me->p_y + ((y - TWINSIDE / 2) * scaleFactor); } closedist = GWIDTH; @@ -3541,6 +3541,34 @@ } /******************************************************************************/ +/*** Key193() ***/ +/******************************************************************************/ +void +Key193 (void) +{ + scaleFactor -= 5; + if (scaleFactor < 10) + scaleFactor = 10; + W_FastClear = 1; + if (viewBox) + redrawall = 1; +} + +/******************************************************************************/ +/*** Key218() ***/ +/******************************************************************************/ +void +Key218 (void) +{ + scaleFactor += 5; + if (scaleFactor > 40) + scaleFactor = 40; + W_FastClear = 1; + if (viewBox) + redrawall = 1; +} + +/******************************************************************************/ /*** Key207() ***/ /******************************************************************************/ void Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.87 retrieving revision 1.88 diff -u -d -r1.87 -r1.88 --- local.c 6 Apr 2007 06:46:31 -0000 1.87 +++ local.c 7 Apr 2007 05:17:39 -0000 1.88 @@ -66,7 +66,7 @@ static void redrawStarSector(int sectorx, int sectory); -#define scaleLocal(pt) ((pt)/SCALE + (TWINSIDE/2)) +#define scaleLocal(pt) ((pt)/scaleFactor + (TWINSIDE/2)) #define STARSIDE 500 /* Used to normalize star density */ #define INFORANGE 500 /* Range at which server stops sending some data */ @@ -305,8 +305,8 @@ if (s->s_x + xbase > GWIDTH || s->s_y + ybase > GWIDTH) continue; - dx = (s->s_x + xbase) - (me->p_x - (me->p_x % SCALE)); - dy = (s->s_y + ybase) - (me->p_y - (me->p_y % SCALE)); + dx = (s->s_x + xbase) - (me->p_x - (me->p_x % scaleFactor)); + dy = (s->s_y + ybase) - (me->p_y - (me->p_y % scaleFactor)); if (ABS(dx) > (view) || ABS(dy) > (view)) continue; @@ -328,8 +328,8 @@ if (s->s_x + xbase > GWIDTH || s->s_y + ybase > GWIDTH) continue; - dx = (s->s_x + xbase) - (me->p_x - (me->p_x % SCALE)); - dy = (s->s_y + ybase) - (me->p_y - (me->p_y % SCALE)); + dx = (s->s_x + xbase) - (me->p_x - (me->p_x % scaleFactor)); + dy = (s->s_y + ybase) - (me->p_y - (me->p_y % scaleFactor)); if (ABS(dx) > (view) || ABS(dy) > (view)) continue; @@ -468,7 +468,10 @@ planetResourcesC (register struct planet *p, int destwidth, int destheight, int dx, int dy, W_Window window) /* - * Draw the resources for a colorized planet. + * Draw the resources for a colorized planet. Destwidth and destheight + * are the dimensions of the planet (not the resources) bitmap. Dx and + * dy are the coordinates of the upper left corner of the planet bitmap. + * Resources are aligned based on those factors. */ { if ((p->pl_info & me->p_team) @@ -479,8 +482,8 @@ { /* Select resources */ if (p->pl_armies > 4) - W_WriteScaleBitmap(dx - 7 * destwidth / 8, - dy - (destheight / 2), + W_WriteScaleBitmap(dx - destwidth/3, + dy, destwidth/3, destheight, BMP_ARMY_WIDTH, @@ -489,8 +492,8 @@ army_bitmap, planetColor(p), window); if (p->pl_flags & PLREPAIR) - W_WriteScaleBitmap(dx - (destwidth / 2), - dy - (5 * destheight / 6), + W_WriteScaleBitmap(dx, + dy - destheight/3, destwidth, destheight/3, BMP_WRENCH_WIDTH, @@ -499,8 +502,8 @@ wrench_bitmap, planetColor(p), window); if (p->pl_flags & PLFUEL) - W_WriteScaleBitmap(dx + 3 * destwidth / 5, - dy - (destheight / 2), + W_WriteScaleBitmap(dx + destwidth, + dy, destwidth/3, destheight, BMP_FUEL_WIDTH, @@ -520,7 +523,7 @@ { register int dx, dy; register struct planet *l; - const int view = SCALE * TWINSIDE / 2 + BMP_PLANET_WIDTH * SCALE / 2; + const int view = scaleFactor * TWINSIDE / 2 + BMP_PLANET_WIDTH * SCALE / 2; for (l = planets + MAXPLANETS - 1; l >= planets; --l) { @@ -529,15 +532,15 @@ if (dx > view || dx < -view || dy > view || dy < -view) continue; - dx = dx / SCALE + TWINSIDE / 2; - dy = dy / SCALE + TWINSIDE / 2; + dx = dx / scaleFactor + TWINSIDE / 2; + dy = dy / scaleFactor + TWINSIDE / 2; if (planetBitmap == 3) { - W_WriteScaleBitmap (dx - (BMP_PLANET_WIDTH / 2), - dy - (BMP_PLANET_HEIGHT / 2), - BMP_PLANET_WIDTH, - BMP_PLANET_HEIGHT, + W_WriteScaleBitmap (dx - (BMP_PLANET_WIDTH / 2) * SCALE / scaleFactor, + dy - (BMP_PLANET_HEIGHT / 2) * SCALE / scaleFactor, + BMP_PLANET_WIDTH * SCALE / scaleFactor, + BMP_PLANET_HEIGHT * SCALE / scaleFactor, BMP_CPLANET_WIDTH, BMP_CPLANET_HEIGHT, 0, @@ -545,13 +548,25 @@ planetColor (l), w); /* Draw planet resources */ - planetResourcesC(l, BMP_PLANET_WIDTH, BMP_PLANET_HEIGHT, dx, dy, w); + planetResourcesC(l, + BMP_PLANET_WIDTH * SCALE / scaleFactor, + BMP_PLANET_HEIGHT * SCALE / scaleFactor, + dx - (BMP_PLANET_WIDTH / 2) * SCALE / scaleFactor, + dy - (BMP_PLANET_HEIGHT / 2) * SCALE / scaleFactor, + w); } else { - W_WriteBitmap (dx - (BMP_PLANET_WIDTH / 2), - dy - (BMP_PLANET_HEIGHT / 2), getPlanetBitmap (l), - planetColor (l), w); + W_WriteScaleBitmap (dx - (BMP_PLANET_WIDTH / 2) * SCALE / scaleFactor, + dy - (BMP_PLANET_HEIGHT / 2) * SCALE / scaleFactor, + BMP_PLANET_WIDTH * SCALE / scaleFactor, + BMP_PLANET_HEIGHT * SCALE / scaleFactor, + BMP_PLANET_WIDTH, + BMP_PLANET_HEIGHT, + 0, + getPlanetBitmap (l), + planetColor (l), + w); } if (showIND && ((l->pl_info & me->p_team) #ifdef RECORDGAME @@ -559,23 +574,27 @@ #endif ) && (l->pl_owner == NOBODY)) { - W_CacheLine (w, dx - (BMP_PLANET_WIDTH / 2), - dy - (BMP_PLANET_HEIGHT / 2), - dx + (BMP_PLANET_WIDTH / 2 - 1), - dy + (BMP_PLANET_HEIGHT / 2 - 1), W_White); - W_CacheLine (w, dx + (BMP_PLANET_WIDTH / 2 - 1), - dy - (BMP_PLANET_HEIGHT / 2), - dx - (BMP_PLANET_WIDTH / 2), - dy + (BMP_PLANET_HEIGHT / 2 - 1), W_White); + W_CacheLine (w, dx - (BMP_PLANET_WIDTH / 2) * SCALE / scaleFactor, + dy - (BMP_PLANET_HEIGHT / 2) * SCALE / scaleFactor, + dx + (BMP_PLANET_WIDTH / 2 - 1) * SCALE / scaleFactor, + dy + (BMP_PLANET_HEIGHT / 2 - 1)* SCALE / scaleFactor, + W_White); + W_CacheLine (w, dx + (BMP_PLANET_WIDTH / 2 - 1) * SCALE / scaleFactor, + dy - (BMP_PLANET_HEIGHT / 2) * SCALE / scaleFactor, + dx - (BMP_PLANET_WIDTH / 2) * SCALE / scaleFactor, + dy + (BMP_PLANET_HEIGHT / 2 - 1) * SCALE / scaleFactor, + W_White); } if (showPlanetNames) { - W_MaskText (w, dx - (BMP_PLANET_WIDTH / 2), - dy + (BMP_PLANET_HEIGHT / 2), planetColor (l), + /* Center name */ + W_MaskText (w, dx - (W_Textwidth * l->pl_namelen / 2), + dy + (BMP_PLANET_HEIGHT / 2) * SCALE / scaleFactor, + planetColor (l), l->pl_name, l->pl_namelen, planetFont (l)); - clearzone[0][clearcount] = dx - (BMP_PLANET_WIDTH / 2); - clearzone[1][clearcount] = dy + (BMP_PLANET_HEIGHT / 2); + clearzone[0][clearcount] = dx - (W_Textwidth * l->pl_namelen / 2); + clearzone[1][clearcount] = dy + (BMP_PLANET_HEIGHT / 2) * SCALE / scaleFactor; clearzone[2][clearcount] = W_Textwidth * l->pl_namelen; clearzone[3][clearcount] = W_Textheight; clearcount++; @@ -612,28 +631,29 @@ armbuf[3] = '\0'; armbuflen = 4; } - W_MaskText (w, dx - (7 * BMP_PLANET_WIDTH / 8), - dy - (5 * BMP_PLANET_HEIGHT / 6), planetColor (l), + W_MaskText (w, dx - (7 * BMP_PLANET_WIDTH / 8) * SCALE / scaleFactor, + dy - (5 * BMP_PLANET_HEIGHT / 6) * SCALE / scaleFactor, + planetColor (l), armbuf, armbuflen, planetFont (l)); - clearzone[0][clearcount] = dx - (7 * BMP_PLANET_WIDTH / 8); - clearzone[1][clearcount] = dy - (5 * BMP_PLANET_HEIGHT / 6); + clearzone[0][clearcount] = dx - (7 * BMP_PLANET_WIDTH / 8) * SCALE / scaleFactor; + clearzone[1][clearcount] = dy - (5 * BMP_PLANET_HEIGHT / 6) * SCALE / scaleFactor; clearzone[2][clearcount] = W_Textwidth * armbuflen; clearzone[3][clearcount] = W_Textheight; clearcount++; } - if (planetBitmap == 3) // Needs adjusting + if (planetBitmap == 3) { - clearzone[0][clearcount] = dx - (7 * BMP_PLANET_WIDTH / 8 + 1); - clearzone[1][clearcount] = dy - (5 * BMP_PLANET_HEIGHT / 6); - clearzone[2][clearcount] = 7 * BMP_PLANET_WIDTH / 4 + 2; - clearzone[3][clearcount] = 4 * BMP_PLANET_HEIGHT / 3; + clearzone[0][clearcount] = dx - (5 * BMP_PLANET_WIDTH / 6 * SCALE / scaleFactor); + clearzone[1][clearcount] = dy - (5 * BMP_PLANET_HEIGHT / 6 * SCALE / scaleFactor); + clearzone[2][clearcount] = (5 * BMP_PLANET_WIDTH / 3 * SCALE / scaleFactor); + clearzone[3][clearcount] = (4 * BMP_PLANET_HEIGHT / 3 * SCALE / scaleFactor); } else { - clearzone[0][clearcount] = dx - (BMP_PLANET_WIDTH / 2); - clearzone[1][clearcount] = dy - (BMP_PLANET_HEIGHT / 2); - clearzone[2][clearcount] = BMP_PLANET_WIDTH; - clearzone[3][clearcount] = BMP_PLANET_HEIGHT; + clearzone[0][clearcount] = dx - (BMP_PLANET_WIDTH / 2) * SCALE / scaleFactor; + clearzone[1][clearcount] = dy - (BMP_PLANET_HEIGHT / 2) * SCALE / scaleFactor; + clearzone[2][clearcount] = BMP_PLANET_WIDTH * SCALE / scaleFactor; + clearzone[3][clearcount] = BMP_PLANET_HEIGHT * SCALE / scaleFactor; } clearcount++; } @@ -684,7 +704,7 @@ int buflen = 1; static int ph_col = 0; static int scaled_ph_col = 0; - const int view = SCALE * TWINSIDE / 2 + BMP_SHIELD_WIDTH * SCALE / 2; + const int view = scaleFactor * TWINSIDE / 2 + BMP_SHIELD_WIDTH * SCALE / 2; int dx, dy, px, py, wx, wy, tx, ty, lx, ly; int new_dx, new_dy; int startx, starty, endx, endy; @@ -754,8 +774,8 @@ if (dx > view || dx < -view || dy > view || dy < -view) continue; - dx = dx / SCALE + TWINSIDE / 2; - dy = dy / SCALE + TWINSIDE / 2; + dx = dx / scaleFactor + TWINSIDE / 2; + dy = dy / scaleFactor + TWINSIDE / 2; cloak_phases = CLOAK_PHASES * server_ups / 10; if (j->p_flags & PFCLOAK) @@ -819,12 +839,17 @@ #endif ) { - W_WriteBitmap (dx - (cloak_width / 2), - dy - (cloak_height / 2), cloakicon, myColor, w); - clearzone[0][clearcount] = dx - (shield_width / 2); - clearzone[1][clearcount] = dy - (shield_height / 2); - clearzone[2][clearcount] = shield_width; - clearzone[3][clearcount] = shield_height; + W_WriteScaleBitmap (dx - (BMP_CLOAK_WIDTH / 2) * SCALE / scaleFactor, + dy - (BMP_CLOAK_HEIGHT / 2) * SCALE / scaleFactor, + BMP_CLOAK_WIDTH * SCALE / scaleFactor, + BMP_CLOAK_HEIGHT * SCALE / scaleFactor, + BMP_CLOAK_WIDTH, + BMP_CLOAK_HEIGHT, + 0, cloakicon, myColor, w); + clearzone[0][clearcount] = dx - (BMP_CLOAK_WIDTH / 2) * SCALE / scaleFactor; + clearzone[1][clearcount] = dy - (BMP_CLOAK_HEIGHT / 2) * SCALE / scaleFactor; + clearzone[2][clearcount] = BMP_CLOAK_WIDTH * SCALE / scaleFactor; + clearzone[3][clearcount] = BMP_CLOAK_HEIGHT * SCALE / scaleFactor; clearcount++; goto shieldlabel; /* draw the shield even when @@ -837,16 +862,16 @@ if (j->p_status == PALIVE) { #if defined (BEEPLITE) - clearzone[0][clearcount] = dx - (shield_width / 2 + 6); - clearzone[1][clearcount] = dy - (shield_height / 2 + 6); - clearzone[2][clearcount] = shield_width + 12; - clearzone[3][clearcount] = shield_height + 12; + clearzone[0][clearcount] = dx - (shield_width / 2 + 6) * SCALE / scaleFactor; + clearzone[1][clearcount] = dy - (shield_height / 2 + 6) * SCALE / scaleFactor; + clearzone[2][clearcount] = (shield_width + 12) * SCALE / scaleFactor; + clearzone[3][clearcount] = (shield_height + 12) * SCALE / scaleFactor; clearcount++; #else - clearzone[0][clearcount] = dx - (shield_width / 2); - clearzone[1][clearcount] = dy - (shield_height / 2); - clearzone[2][clearcount] = shield_width; - clearzone[3][clearcount] = shield_height; + clearzone[0][clearcount] = dx - (shield_width / 2) * SCALE / scaleFactor; + clearzone[1][clearcount] = dy - (shield_height / 2) * SCALE / scaleFactor); + clearzone[2][clearcount] = shield_width * SCALE / scaleFactor; + clearzone[3][clearcount] = shield_height * SCALE / scaleFactor; clearcount++; #endif @@ -988,17 +1013,23 @@ if (colorClient != 4) { - W_WriteBitmap (dx - (j->p_ship.s_width / 2), - dy - (j->p_ship.s_height / 2), - ship_bits[j->p_ship.s_type][rosette (j->p_dir)], - playerColor (j), w); + W_WriteScaleBitmap (dx - (j->p_ship.s_width / 2) * SCALE / scaleFactor, + dy - (j->p_ship.s_height / 2) * SCALE / scaleFactor, + j->p_ship.s_width * SCALE / scaleFactor, + j->p_ship.s_height * SCALE / scaleFactor, + BMP_SHIP_WIDTH, + BMP_SHIP_HEIGHT, + (360 * j->p_dir/255), // Converted to angle + ship_bits[j->p_ship.s_type][0], // Use pointing "up" bitmap + playerColor (j), + w); } else { - W_OverlayScaleBitmap (dx - (j->p_ship.s_width / 2), - dy - (j->p_ship.s_height / 2), - j->p_ship.s_width, - j->p_ship.s_height, + W_OverlayScaleBitmap (dx - (j->p_ship.s_width / 2) * SCALE / scaleFactor, + dy - (j->p_ship.s_height / 2) * SCALE / scaleFactor, + j->p_ship.s_width * SCALE / scaleFactor, + j->p_ship.s_height * SCALE / scaleFactor, BMP_SHIP_WIDTH_HR, BMP_SHIP_HEIGHT_HR, (360 * j->p_dir/255), // Converted to angle @@ -1011,9 +1042,13 @@ of the ship icon */ if (j->p_cloakphase > 0) { - W_WriteBitmap (dx - (cloak_width / 2), - dy - (cloak_height / 2), cloakicon, - playerColor (j), w); + W_WriteScaleBitmap (dx - (BMP_CLOAK_WIDTH / 2) * SCALE / scaleFactor, + dy - (BMP_CLOAK_HEIGHT / 2) * SCALE / scaleFactor, + BMP_CLOAK_WIDTH * SCALE / scaleFactor, + BMP_CLOAK_HEIGHT * SCALE / scaleFactor, + BMP_CLOAK_WIDTH, + BMP_CLOAK_HEIGHT, + 0, cloakicon, playerColor (j), w); if (!myPlayer (j) && !isObsLockPlayer(j)) /* If not my player, or not observing that player, we exit the draw function here */ @@ -1027,10 +1062,15 @@ && (liteflag & LITE_PLAYERS_LOCAL)) { int seq_n = (emph_player_seq_n[j->p_no] * 10 / server_ups) % emph_player_seql_frames; - W_WriteBitmap (dx - (emph_player_seql_width / 2), - dy - (emph_player_seql_height / 2), - emph_player_seql[seq_n], - W_White, w); + W_WriteScaleBitmap (dx - (emph_player_seql_width / 2) * SCALE / scaleFactor, + dy - (emph_player_seql_height / 2) * SCALE / scaleFactor, + emph_player_seql_width * SCALE / scaleFactor, + emph_player_seql_height * SCALE / scaleFactor, + emph_player_seql_width, + emph_player_seql_height, + 0, + emph_player_seql[seq_n], + W_White, w); } #endif @@ -1106,12 +1146,21 @@ } #ifdef VSHIELD_BITMAPS - W_WriteBitmap (dx - (shield_width / 2), - dy - (shield_height / 2), shield[shieldnum], - color, w); + W_WriteScaleBitmap (dx - (BMP_SHIELD_WIDTH / 2) * SCALE / scaleFactor, + dy - (BMP_SHIELD_HEIGHT / 2) * SCALE / scaleFactor, + BMP_SHIELD_WIDTH * SCALE / scaleFactor, + BMP_SHIELD_HEIGHT * SCALE / scaleFactor, + BMP_SHIELD_WIDTH, + BMP_SHIELD_HEIGHT, + 0, shield[shieldnum], color, w); #else - W_WriteBitmap (dx - (shield_width / 2), - dy - (shield_height / 2), shield, color, w); + W_WriteScaleBitmap (dx - (BMP_SHIELD_WIDTH / 2) * SCALE / scaleFactor, + dy - (BMP_SHIELD_HEIGHT / 2) * SCALE / scaleFactor, + BMP_SHIELD_WIDTH * SCALE / scaleFactor, + BMP_SHIELD_HEIGHT * SCALE / scaleFactor, + BMP_SHIELD_WIDTH, + BMP_SHIELD_HEIGHT, + 0, shield, color, w); #endif } /* Warning hull */ @@ -1162,14 +1211,18 @@ else hull_color = playerColor(j); - W_WriteBitmap(dx - (shield_width / 2 + 1), - dy - (shield_height / 2 + 1), - hull[hull_num], hull_color, w); + W_WriteScaleBitmap (dx - (hull_width / 2) * SCALE / scaleFactor, + dy - (hull_height / 2) * SCALE / scaleFactor, + hull_width * SCALE / scaleFactor, + hull_height * SCALE / scaleFactor, + hull_width, + hull_height, + 0, hull[hull_num], hull_color, w); - clearzone[0][clearcount] = dx - (shield_width / 2 + 1); - clearzone[1][clearcount] = dy - (shield_height / 2 + 1); - clearzone[2][clearcount] = shield_width + 2; - clearzone[3][clearcount] = shield_height + 2; + clearzone[0][clearcount] = dx - (hull_width / 2) * SCALE / scaleFactor; + clearzone[1][clearcount] = dy - (hull_height / 2) * SCALE / scaleFactor; + clearzone[2][clearcount] = hull_width * SCALE / scaleFactor; + clearzone[3][clearcount] = hull_height * SCALE / scaleFactor; clearcount++; } } @@ -1178,11 +1231,11 @@ { if (myPlayer(j)) { - W_WriteCircle(w, TWINSIDE/2, TWINSIDE/2, DETDIST/SCALE, 0, 0, W_Red); - clearzone[0][clearcount] = TWINSIDE/2 - (DETDIST/SCALE); - clearzone[1][clearcount] = TWINSIDE/2 - (DETDIST/SCALE); - clearzone[2][clearcount] = 2*DETDIST/SCALE + 1; - clearzone[3][clearcount] = 2*DETDIST/SCALE + 1; + W_WriteCircle(w, TWINSIDE/2, TWINSIDE/2, DETDIST/scaleFactor, 0, 0, W_Red); + clearzone[0][clearcount] = TWINSIDE/2 - (DETDIST/scaleFactor); + clearzone[1][clearcount] = TWINSIDE/2 - (DETDIST/scaleFactor); + clearzone[2][clearcount] = 2*DETDIST/scaleFactor + 1; + clearzone[3][clearcount] = 2*DETDIST/scaleFactor + 1; clearcount++; showdetCircle--; } @@ -1192,8 +1245,8 @@ { if (myPlayer(j) || isObsLockPlayer(j)) { - startx = dx + (int) (TIC_DIST/SCALE * Cos[j->p_dir]); - starty = dy + (int) (TIC_DIST/SCALE * Sin[j->p_dir]); + startx = dx + (int) (TIC_DIST/scaleFactor * Cos[j->p_dir]); + starty = dy + (int) (TIC_DIST/scaleFactor * Sin[j->p_dir]); endx = startx + (int) (TIC_LEN * Cos[j->p_dir]); endy = starty + (int) (TIC_LEN * Sin[j->p_dir]); @@ -1219,8 +1272,8 @@ if (j == me && j->p_dir != j->p_desdir && !(j->p_flags & (PFORBIT | PFDOCK | PFOBSERV))) { - startx = dx + (int) (TIC_DIST/SCALE * Cos[j->p_desdir]); - starty = dy + (int) (TIC_DIST/SCALE * Sin[j->p_desdir]); + startx = dx + (int) (TIC_DIST/scaleFactor * Cos[j->p_desdir]); + starty = dy + (int) (TIC_DIST/scaleFactor * Sin[j->p_desdir]); endx = startx + (int) (DESIRED_TIC_LEN * Cos[j->p_desdir]); endy = starty + (int) (DESIRED_TIC_LEN * Sin[j->p_desdir]); @@ -1240,11 +1293,11 @@ { if (myPlayer(j) || isObsLockPlayer(j)) { - W_WriteCircle(w, TWINSIDE/2, TWINSIDE/2, SHOTRANGE/SCALE, 0, 0, W_Grey); - clearzone[0][clearcount] = TWINSIDE/2 - (SHOTRANGE/SCALE); - clearzone[1][clearcount] = TWINSIDE/2 - (SHOTRANGE/SCALE); - clearzone[2][clearcount] = 2*SHOTRANGE/SCALE + 1; - clearzone[3][clearcount] = 2*SHOTRANGE/SCALE + 1; + W_WriteCircle(w, TWINSIDE/2, TWINSIDE/2, SHOTRANGE/scaleFactor, 0, 0, W_Grey); + clearzone[0][clearcount] = TWINSIDE/2 - (SHOTRANGE/scaleFactor); + clearzone[1][clearcount] = TWINSIDE/2 - (SHOTRANGE/scaleFactor); + clearzone[2][clearcount] = 2*SHOTRANGE/scaleFactor + 1; + clearzone[3][clearcount] = 2*SHOTRANGE/scaleFactor + 1; clearcount++; } } @@ -1256,8 +1309,8 @@ j->p_team == NOBODY && j->p_ship.s_type == SCOUT) { - startx = dx + (int) ((shield_width / 2) * Cos[j->p_dir]); - starty = dy + (int) ((shield_width / 2) * Sin[j->p_dir]); + startx = dx + (int) ((shield_width / 2) * SCALE / scaleFactor * Cos[j->p_dir]); + starty = dy + (int) ((shield_width / 2) * SCALE / scaleFactor * Sin[j->p_dir]); endx = startx + (int) (PUCKARROW_LEN * Cos[j->p_dir]); endy = starty + (int) (PUCKARROW_LEN * Sin[j->p_dir]); @@ -1369,11 +1422,12 @@ buflen = 4; } } - W_MaskText (w, dx + (j->p_ship.s_width / 2), - dy - (j->p_ship.s_height / 2), color, + W_MaskText (w, dx + (j->p_ship.s_width / 2) * SCALE / scaleFactor, + dy - (j->p_ship.s_height / 2) * SCALE / scaleFactor, + color, idbuf, buflen, shipFont (j)); - clearzone[0][clearcount] = dx + (j->p_ship.s_width / 2); - clearzone[1][clearcount] = dy - (j->p_ship.s_height / 2); + clearzone[0][clearcount] = dx + (j->p_ship.s_width / 2) * SCALE / scaleFactor; + clearzone[1][clearcount] = dy - (j->p_ship.s_height / 2) * SCALE / scaleFactor; clearzone[2][clearcount] = buflen * W_Textwidth; clearzone[3][clearcount] = W_Textheight; clearcount++; @@ -1385,12 +1439,12 @@ { idbuf[0] = *(shipnos + players[j->p_tractor].p_no); buflen = 1; - W_MaskText (w, dx - (j->p_ship.s_width / 2), - dy + (j->p_ship.s_height / 2), + W_MaskText (w, dx - (j->p_ship.s_width / 2) * SCALE / scaleFactor, + dy + (j->p_ship.s_height / 2) * SCALE / scaleFactor, (j->p_flags & PFPRESS) ? yColor : gColor, idbuf, buflen, shipFont (j)); - clearzone[0][clearcount] = dx - (j->p_ship.s_width / 2); - clearzone[1][clearcount] = dy + (j->p_ship.s_height / 2); + clearzone[0][clearcount] = dx - (j->p_ship.s_width / 2) * SCALE / scaleFactor; + clearzone[1][clearcount] = dy + (j->p_ship.s_height / 2) * SCALE / scaleFactor; clearzone[2][clearcount] = buflen * W_Textwidth; clearzone[3][clearcount] = W_Textheight; clearcount++; @@ -1443,23 +1497,33 @@ if (j->p_ship.s_type == STARBASE) { - W_WriteBitmap (dx - (BMP_SBEXPL_WIDTH / 2), - dy - (BMP_SBEXPL_HEIGHT / 2), sbexpview[i], - playerColor (j), w); - clearzone[0][clearcount] = dx - (BMP_SBEXPL_WIDTH / 2); - clearzone[1][clearcount] = dy - (BMP_SBEXPL_HEIGHT / 2); - clearzone[2][clearcount] = BMP_SBEXPL_WIDTH; - clearzone[3][clearcount] = BMP_SBEXPL_HEIGHT; + W_WriteScaleBitmap (dx - (BMP_SBEXPL_WIDTH / 2) * SCALE / scaleFactor, + dy - (BMP_SBEXPL_HEIGHT / 2) * SCALE / scaleFactor, + BMP_SBEXPL_WIDTH * SCALE / scaleFactor, + BMP_SBEXPL_HEIGHT * SCALE / scaleFactor, + BMP_SBEXPL_WIDTH, + BMP_SBEXPL_HEIGHT, + 0, sbexpview[i], + playerColor (j), w); + clearzone[0][clearcount] = dx - (BMP_SBEXPL_WIDTH / 2) * SCALE / scaleFactor; + clearzone[1][clearcount] = dy - (BMP_SBEXPL_HEIGHT / 2) * SCALE / scaleFactor; + clearzone[2][clearcount] = BMP_SBEXPL_WIDTH * SCALE / scaleFactor; + clearzone[3][clearcount] = BMP_SBEXPL_HEIGHT * SCALE / scaleFactor; } else { - W_WriteBitmap (dx - (BMP_SHIPEXPL_WIDTH / 2), - dy - (BMP_SHIPEXPL_HEIGHT / 2), expview[i], - playerColor (j), w); - clearzone[0][clearcount] = dx - (BMP_SHIPEXPL_WIDTH / 2); - clearzone[1][clearcount] = dy - (BMP_SHIPEXPL_HEIGHT / 2); - clearzone[2][clearcount] = BMP_SHIPEXPL_WIDTH; - clearzone[3][clearcount] = BMP_SHIPEXPL_HEIGHT; + W_WriteScaleBitmap (dx - (BMP_SHIPEXPL_WIDTH / 2) * SCALE / scaleFactor, + dy - (BMP_SHIPEXPL_HEIGHT / 2) * SCALE / scaleFactor, + BMP_SHIPEXPL_WIDTH * SCALE / scaleFactor, + BMP_SHIPEXPL_HEIGHT * SCALE / scaleFactor, + BMP_SHIPEXPL_WIDTH, + BMP_SHIPEXPL_HEIGHT, + 0, expview[i], + playerColor (j), w); + clearzone[0][clearcount] = dx - (BMP_SHIPEXPL_WIDTH / 2) * SCALE / scaleFactor; + clearzone[1][clearcount] = dy - (BMP_SHIPEXPL_HEIGHT / 2) * SCALE / scaleFactor; + clearzone[2][clearcount] = BMP_SHIPEXPL_WIDTH * SCALE / scaleFactor; + clearzone[3][clearcount] = BMP_SHIPEXPL_HEIGHT * SCALE / scaleFactor; } clearcount++; } @@ -1520,13 +1584,13 @@ ty = (int) (PHASEDIST * j->p_ship.s_phaserdamage / 100 * Sin[php->ph_dir]); - tx = (j->p_x + tx - me->p_x) / SCALE + TWINSIDE / 2; - ty = (j->p_y + ty - me->p_y) / SCALE + TWINSIDE / 2; + tx = (j->p_x + tx - me->p_x) / scaleFactor + TWINSIDE / 2; + ty = (j->p_y + ty - me->p_y) / scaleFactor + TWINSIDE / 2; } else if (php->ph_status == PHHIT2) { - tx = (php->ph_x - me->p_x) / SCALE + TWINSIDE / 2; - ty = (php->ph_y - me->p_y) / SCALE + TWINSIDE / 2; + tx = (php->ph_x - me->p_x) / scaleFactor + TWINSIDE / 2; + ty = (php->ph_y - me->p_y) / scaleFactor + TWINSIDE / 2; } else { @@ -1544,9 +1608,9 @@ else { tx = (players[php->ph_target].p_x - me->p_x) / - SCALE + TWINSIDE / 2; + scaleFactor + TWINSIDE / 2; ty = (players[php->ph_target].p_y - me->p_y) / - SCALE + TWINSIDE / 2; + scaleFactor + TWINSIDE / 2; } } @@ -1774,8 +1838,8 @@ px = (tractee->p_x - me->p_x); py = (tractee->p_y - me->p_y); - px = px / SCALE + TWINSIDE / 2; - py = py / SCALE + TWINSIDE / 2; + px = px / scaleFactor + TWINSIDE / 2; + py = py / scaleFactor + TWINSIDE / 2; if (px == dx && py == dy) continue; /* this had better be last @@ -1785,10 +1849,10 @@ (double) (dy - py)) + XPI / 2.0; dir = (unsigned char) nint (theta / XPI * 128.0); if (tractee->p_flags & PFSHIELD) - target_width = shield_width; + target_width = shield_width * SCALE / scaleFactor; else { - target_width = tractee->p_ship.s_width / 2; + target_width = tractee->p_ship.s_width / 2 * SCALE / scaleFactor; } lx[0] = (int) (px + (Cos[dir] * (target_width / 2))); ly[0] = (int) (py + (Sin[dir] * (target_width / 2))); @@ -1855,7 +1919,7 @@ int torpCount; int torpTeam; int frame; - const int view = SCALE * TWINSIDE / 2; + const int view = scaleFactor * TWINSIDE / 2; for (t = torps, j = players; j != players + MAXPLAYER; t += MAXTORP, ++j) { @@ -1910,8 +1974,8 @@ if (dx > view || dx < -view || dy > view || dy < -view) continue; - dx = dx / SCALE + TWINSIDE / 2; - dy = dy / SCALE + TWINSIDE / 2; + dx = dx / scaleFactor + TWINSIDE / 2; + dy = dy / scaleFactor + TWINSIDE / 2; #ifdef SOUND if (j != me) @@ -2093,7 +2157,7 @@ { register struct plasmatorp *pt; register int dx, dy; - const int view = SCALE * TWINSIDE / 2; + const int view = scaleFactor * TWINSIDE / 2; int ptorpTeam; int frame; @@ -2138,8 +2202,8 @@ if (dx > view || dx < -view || dy > view || dy < -view) continue; - dx = dx / SCALE + TWINSIDE / 2; - dy = dy / SCALE + TWINSIDE / 2; + dx = dx / scaleFactor + TWINSIDE / 2; + dy = dy / scaleFactor + TWINSIDE / 2; #ifdef SOUND if (pt->pt_owner != me->p_no) @@ -2317,7 +2381,7 @@ { register struct player *j; register int dx, dy; - const int view = SCALE * TWINSIDE / 2; + const int view = scaleFactor * TWINSIDE / 2; #ifdef HOCKEY_LINES register struct s_line *sl; @@ -2333,18 +2397,18 @@ /* Treat the line differently based on the orientation */ if (sl->orientation == S_LINE_VERTICAL) { - if (((sx = (sl->begin_x - me->p_x) / SCALE) < HALF_WINSIDE) + if (((sx = (sl->begin_x - me->p_x) / scaleFactor) < HALF_WINSIDE) && (sx > -HALF_WINSIDE)) { sx += HALF_WINSIDE; ex = sx; if ((sy = - HALF_WINSIDE - (me->p_y - sl->begin_y) / SCALE) < 0) + HALF_WINSIDE - (me->p_y - sl->begin_y) / scaleFactor) < 0) sy = 0; if (sy > (TWINSIDE - 1)) sy = TWINSIDE - 1; if ((ey = - HALF_WINSIDE - (me->p_y - sl->end_y) / SCALE) < 0) + HALF_WINSIDE - (me->p_y - sl->end_y) / scaleFactor) < 0) ey = 0; if (ey > (TWINSIDE - 1)) ey = TWINSIDE - 1; @@ -2357,18 +2421,18 @@ else if (sl->orientation == S_LINE_HORIZONTAL) { - if (((sy = (sl->begin_y - me->p_y) / SCALE) < HALF_WINSIDE) + if (((sy = (sl->begin_y - me->p_y) / scaleFactor) < HALF_WINSIDE) && (sy > -HALF_WINSIDE)) { sy += HALF_WINSIDE; ey = sy; if ((sx = - HALF_WINSIDE - (me->p_x - sl->begin_x) / SCALE) < 0) + HALF_WINSIDE - (me->p_x - sl->begin_x) / scaleFactor) < 0) sx = 0; if (sx > (TWINSIDE - 1)) sx = TWINSIDE - 1; if ((ex = - HALF_WINSIDE - (me->p_x - sl->end_x) / SCALE) < 0) + HALF_WINSIDE - (me->p_x - sl->end_x) / scaleFactor) < 0) ex = 0; if (ex > (TWINSIDE - 1)) ex = TWINSIDE - 1; @@ -2392,12 +2456,13 @@ #endif /* HOCKEY_LINES */ /* Draw inforange box (if necessary) */ - if ( infoRange && TWINSIDE > INFORANGE && !(me->p_x < 0 || me->p_x > GWIDTH)) + if ( infoRange && TWINSIDE > (INFORANGE * SCALE / scaleFactor) + && !(me->p_x < 0 || me->p_x > GWIDTH)) { - const int LEFT = (TWINSIDE / 2) - (INFORANGE / 2); - const int RIGHT = (TWINSIDE / 2) + (INFORANGE / 2); - const int TOP = (TWINSIDE / 2) - (INFORANGE / 2); - const int BOTTOM = (TWINSIDE / 2) + (INFORANGE / 2); + const int LEFT = (TWINSIDE / 2) - (INFORANGE / 2) * SCALE / scaleFactor; + const int RIGHT = (TWINSIDE / 2) + (INFORANGE / 2) * SCALE / scaleFactor; + const int TOP = (TWINSIDE / 2) - (INFORANGE / 2) * SCALE / scaleFactor; + const int BOTTOM = (TWINSIDE / 2) + (INFORANGE / 2) * SCALE / scaleFactor; long dist; @@ -2406,12 +2471,12 @@ dx = LEFT; dist = me->p_y - ((INFORANGE / 2) * SCALE); if (dist < 0) - sy = (TOP - dist/SCALE); + sy = (TOP - dist/scaleFactor); else sy = TOP; dist = me->p_y + ((INFORANGE / 2) * SCALE); if (dist > GWIDTH) - ey = (BOTTOM - (dist - GWIDTH)/SCALE); + ey = (BOTTOM - (dist - GWIDTH)/scaleFactor); else ey = BOTTOM; W_MakeDashedLine (w, dx, sy, dx, ey, W_White); @@ -2427,12 +2492,12 @@ dx = RIGHT; dist = me->p_y - ((INFORANGE / 2) * SCALE); if (dist < 0) - sy = (TOP - dist/SCALE); + sy = (TOP - dist/scaleFactor); else sy = TOP; dist = me->p_y + ((INFORANGE / 2) * SCALE); if (dist > GWIDTH) - ey = (BOTTOM - (dist - GWIDTH)/SCALE); + ey = (BOTTOM - (dist - GWIDTH)/scaleFactor); else ey = BOTTOM; W_MakeDashedLine (w, dx, sy, dx, ey, W_White); @@ -2448,12 +2513,12 @@ dy = TOP; dist = me->p_x - ((INFORANGE / 2) * SCALE); if (dist < 0) - sx = (LEFT - dist/SCALE); + sx = (LEFT - dist/scaleFactor); else sx = LEFT; dist = me->p_x + ((INFORANGE / 2) * SCALE); if (dist > GWIDTH) - ex = (RIGHT - (dist - GWIDTH)/SCALE); + ex = (RIGHT - (dist - GWIDTH)/scaleFactor); else ex = RIGHT; W_MakeDashedLine (w, sx, dy, ex, dy, W_White); @@ -2469,12 +2534,12 @@ dy = BOTTOM; dist = me->p_x - ((INFORANGE / 2) * SCALE); if (dist < 0) - sx = (LEFT - dist/SCALE); + sx = (LEFT - dist/scaleFactor); else sx = LEFT; dist = me->p_x + ((INFORANGE / 2) * SCALE); if (dist > GWIDTH) - ex = (RIGHT - (dist - GWIDTH)/SCALE); + ex = (RIGHT - (dist - GWIDTH)/scaleFactor); else ex = RIGHT; W_MakeDashedLine (w, sx, dy, ex, dy, W_White); @@ -2487,11 +2552,11 @@ } /* Draw Edges */ - if (me->p_x < (TWINSIDE / 2) * SCALE) + if (me->p_x < (TWINSIDE / 2) * scaleFactor) { - dx = (TWINSIDE / 2) - (me->p_x) / SCALE; - sy = (TWINSIDE / 2) + (0 - me->p_y) / SCALE; - ey = (TWINSIDE / 2) + (GWIDTH - me->p_y) / SCALE; + dx = (TWINSIDE / 2) - (me->p_x) / scaleFactor; + sy = (TWINSIDE / 2) + (0 - me->p_y) / scaleFactor; + ey = (TWINSIDE / 2) + (GWIDTH - me->p_y) / scaleFactor; if (sy < 0) sy = 0; if (ey > TWINSIDE - 1) @@ -2505,11 +2570,11 @@ clearlcount++; } - if ((GWIDTH - me->p_x) < (TWINSIDE / 2) * SCALE) + if ((GWIDTH - me->p_x) < (TWINSIDE / 2) * scaleFactor) { - dx = (TWINSIDE / 2) + (GWIDTH - me->p_x) / SCALE; - sy = (TWINSIDE / 2) + (0 - me->p_y) / SCALE; - ey = (TWINSIDE / 2) + (GWIDTH - me->p_y) / SCALE; + dx = (TWINSIDE / 2) + (GWIDTH - me->p_x) / scaleFactor; + sy = (TWINSIDE / 2) + (0 - me->p_y) / scaleFactor; + ey = (TWINSIDE / 2) + (GWIDTH - me->p_y) / scaleFactor; if (sy < 0) sy = 0; if (ey > TWINSIDE - 1) @@ -2523,11 +2588,11 @@ clearlcount++; } - if (me->p_y < (TWINSIDE / 2) * SCALE) + if (me->p_y < (TWINSIDE / 2) * scaleFactor) { - dy = (TWINSIDE / 2) - (me->p_y) / SCALE; - sx = (TWINSIDE / 2) + (0 - me->p_x) / SCALE; - ex = (TWINSIDE / 2) + (GWIDTH - me->p_x) / SCALE; + dy = (TWINSIDE / 2) - (me->p_y) / scaleFactor; + sx = (TWINSIDE / 2) + (0 - me->p_x) / scaleFactor; + ex = (TWINSIDE / 2) + (GWIDTH - me->p_x) / scaleFactor; if (sx < 0) sx = 0; if (ex > TWINSIDE - 1) @@ -2541,11 +2606,11 @@ clearlcount++; } - if ((GWIDTH - me->p_y) < (TWINSIDE / 2) * SCALE) + if ((GWIDTH - me->p_y) < (TWINSIDE / 2) * scaleFactor) { - dy = (TWINSIDE / 2) + (GWIDTH - me->p_y) / SCALE; - sx = (TWINSIDE / 2) + (0 - me->p_x) / SCALE; - ex = (TWINSIDE / 2) + (GWIDTH - me->p_x) / SCALE; + dy = (TWINSIDE / 2) + (GWIDTH - me->p_y) / scaleFactor; + sx = (TWINSIDE / 2) + (0 - me->p_x) / scaleFactor; + ex = (TWINSIDE / 2) + (GWIDTH - me->p_x) / scaleFactor; if (sx < 0) sx = 0; if (ex > TWINSIDE - 1) @@ -2686,10 +2751,10 @@ dy = j->p_y - me->p_y; if (ABS (dx) < view && ABS (dy) < view) { - dx = dx / SCALE + TWINSIDE / 2; - dy = dy / SCALE + TWINSIDE / 2; + dx = dx / scaleFactor + TWINSIDE / 2; + dy = dy / scaleFactor + TWINSIDE / 2; tri_x = dx + 0; - tri_y = dy + 20; /* below ship */ + tri_y = dy + 20 * SCALE / scaleFactor; /* below ship */ facing = 1; } } @@ -2703,10 +2768,10 @@ dy = l->pl_y - me->p_y; if (ABS (dx) < view && ABS (dy) < view) { - dx = dx / SCALE + TWINSIDE / 2; - dy = dy / SCALE + TWINSIDE / 2; + dx = dx / scaleFactor + TWINSIDE / 2; + dy = dy / scaleFactor + TWINSIDE / 2; tri_x = dx; - tri_y = dy - 20; /* below planet */ + tri_y = dy - 20 * SCALE / scaleFactor; /* above planet */ facing = 0; } } @@ -2807,6 +2872,7 @@ clearcount = 0; clearlcount = 0; tractcurrent = tracthead; + W_FastClear = 0; } else { Index: util.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/util.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- util.c 6 Apr 2007 06:46:32 -0000 1.5 +++ util.c 7 Apr 2007 05:17:39 -0000 1.6 @@ -86,8 +86,8 @@ } else { - g_x = me->p_x + ((x - TWINSIDE / 2) * SCALE); - g_y = me->p_y + ((y - TWINSIDE / 2) * SCALE); + g_x = me->p_x + ((x - TWINSIDE / 2) * scaleFactor); + g_y = me->p_y + ((y - TWINSIDE / 2) * scaleFactor); } targ = gettarget2 (g_x, g_y, targtype); Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.69 retrieving revision 1.70 diff -u -d -r1.69 -r1.70 --- defaults.c 6 Apr 2007 06:46:31 -0000 1.69 +++ defaults.c 7 Apr 2007 05:17:38 -0000 1.70 @@ -600,6 +600,13 @@ } }, #endif + {"scaleFactor", &scaleFactor, RC_INT, + { + "Scale of local map graphics", + "10-40 range", + NULL + } + }, #ifdef TOOLS {"shellTools", &shellTools, RC_BOOL, { @@ -1690,6 +1697,11 @@ viewRange = intDefault ("viewRange", viewRange); warpStreaks = booleanDefault ("warpStreaks", warpStreaks); showStars = booleanDefault ("showStars", showStars); + scaleFactor = intDefault ("scaleFactor", scaleFactor); + if (scaleFactor > 40) + scaleFactor = 40; + else if (scaleFactor < 10) + scaleFactor = 10; #ifdef HOCKEY_LINES showHockeyLinesLocal = booleanDefault ("showHockeyLinesLocal", showHockeyLinesLocal); Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.79 retrieving revision 1.80 diff -u -d -r1.79 -r1.80 --- data.c 6 Apr 2007 06:46:31 -0000 1.79 +++ data.c 7 Apr 2007 05:17:38 -0000 1.80 @@ -34,7 +34,6 @@ int TWINSIDE = 500; /* Size of tactical window */ int GWINSIDE = 500; /* Size of galactic window */ -int SCALE = 40; /* Window will be one pixel for these # spaces */ int ingame = 0; /* If player is in game - to distinguish between whether to use double buffering on the local and map window */ int ghoststart = 0; /* is this a ghostbust @@ -828,4 +827,5 @@ int weaponsOnMap = 1; /* draw weapons fire on map */ int sortPlanets = 1; /* sort planet list by team and army count */ int packetLights = 1; /* show packet send/receive via dashboard */ -int infoRange = 1; /* show limit on info with large tactical windows */ \ No newline at end of file +int infoRange = 1; /* show limit on info with large tactical windows */ +int scaleFactor = 40; /* allows for scaling of graphics */ \ No newline at end of file Index: map.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- map.c 6 Apr 2007 06:46:32 -0000 1.43 +++ map.c 7 Apr 2007 05:17:39 -0000 1.44 @@ -432,7 +432,10 @@ mplanetResourcesC (register struct planet *p, int destwidth, int destheight, int dx, int dy, W_Window window) /* - * Draw the map resources for a colorized planet. + * Draw the map resources for a colorized planet. Destwidth and destheight + * are the dimensions of the planet (not the resources) bitmap. Dx and + * dy are the coordinates of the upper left corner of the planet bitmap. + * Resources are aligned based on those factors. */ { if ((p->pl_info & me->p_team) @@ -443,9 +446,9 @@ { /* Select resources */ if (p->pl_armies > 4) - W_WriteScaleBitmap(dx - 7 * destwidth / 8 - 1, - dy - (destheight / 2), - destwidth/3 + 1, + W_WriteScaleBitmap(dx - destwidth/3, + dy, + destwidth/3, destheight, BMP_ARMY_WIDTH, BMP_ARMY_HEIGHT, @@ -453,19 +456,19 @@ marmy_bitmap, planetColor(p), window); if (p->pl_flags & PLREPAIR) - W_WriteScaleBitmap(dx - (destwidth / 2), - dy - (5 * destheight / 6), + W_WriteScaleBitmap(dx, + dy - destheight/3, destwidth, - destheight/3 + 1, + destheight/3, BMP_WRENCH_WIDTH, BMP_WRENCH_HEIGHT, 0, mwrench_bitmap, planetColor(p), window); if (p->pl_flags & PLFUEL) - W_WriteScaleBitmap(dx + 3 * destwidth / 5 - 1, - dy - (destheight / 2), - destwidth/3 + 1, + W_WriteScaleBitmap(dx + destwidth, + dy, + destwidth/3, destheight, BMP_FUEL_WIDTH, BMP_FUEL_HEIGHT, @@ -546,14 +549,16 @@ ody = pl_update[l->pl_no].plu_y * GWINSIDE / GWIDTH; /* XFIX */ - if (planetBitmapGalaxy == 3) // Needs adjusting - W_ClearArea (mapw, odx - (7 * BMP_MPLANET_WIDTH / 8 + 1), + if (planetBitmapGalaxy == 3) + W_ClearArea (mapw, odx - (5 * BMP_MPLANET_WIDTH / 6), ody - (5 * BMP_MPLANET_HEIGHT / 6), - 7 * BMP_MPLANET_WIDTH / 4 + 2, 4 * BMP_MPLANET_HEIGHT / 3); + 5 * BMP_MPLANET_WIDTH / 3, + 4 * BMP_MPLANET_HEIGHT / 3); else W_ClearArea (mapw, odx - (BMP_MPLANET_WIDTH / 2), ody - (BMP_MPLANET_HEIGHT / 2), - BMP_MPLANET_WIDTH, BMP_MPLANET_HEIGHT); + BMP_MPLANET_WIDTH, + BMP_MPLANET_HEIGHT); W_WriteText (mapw, odx - (BMP_MPLANET_WIDTH / 2), ody + (BMP_MPLANET_HEIGHT / 2), backColor, l->pl_name, 3, planetFont (l)); @@ -564,15 +569,18 @@ /* Clear the planet normally */ /* XFIX */ - if (planetBitmapGalaxy == 3) // Needs adjusting - W_ClearArea (mapw, dx - (7 * BMP_MPLANET_WIDTH / 8 + 5), - dy - (5 * BMP_MPLANET_HEIGHT / 6 + 4), - 7 * BMP_MPLANET_WIDTH / 4 + 10, 4 * BMP_MPLANET_HEIGHT / 3 + 8); - + if (planetBitmapGalaxy == 3) + W_ClearArea (mapw, dx - (5 * BMP_MPLANET_WIDTH / 6), + dy - (5 * BMP_MPLANET_HEIGHT / 6), + 5 * BMP_MPLANET_WIDTH / 3, + 4 * BMP_MPLANET_HEIGHT / 3 + 4); else + /* The +4 and +8 are for beeplite, as it uses a + 24x24 overlay bitmap compared to 16x16 planet */ W_ClearArea (mapw, dx - (BMP_MPLANET_WIDTH / 2 + 4), dy - (BMP_MPLANET_HEIGHT / 2 + 4), - BMP_MPLANET_WIDTH + 8, BMP_MPLANET_HEIGHT + 8); + BMP_MPLANET_WIDTH + 8, + BMP_MPLANET_HEIGHT + 8); l->pl_flags &= ~PLCLEAR; } @@ -602,7 +610,12 @@ mapw); /* Draw planet resources */ - mplanetResourcesC(l, BMP_MPLANET_WIDTH, BMP_MPLANET_HEIGHT, dx, dy, mapw); + mplanetResourcesC(l, + BMP_MPLANET_WIDTH , + BMP_MPLANET_HEIGHT, + dx - (BMP_MPLANET_WIDTH / 2), + dy - (BMP_MPLANET_HEIGHT / 2), + mapw); } else { @@ -636,7 +649,12 @@ planetColor (l), mapw); /* Draw planet resources */ - mplanetResourcesC(l, BMP_MPLANET_WIDTH, BMP_MPLANET_HEIGHT, dx, dy, mapw); + mplanetResourcesC(l, + BMP_MPLANET_WIDTH , + BMP_MPLANET_HEIGHT, + dx - (BMP_MPLANET_WIDTH / 2), + dy - (BMP_MPLANET_HEIGHT / 2), + mapw); } else { @@ -838,8 +856,8 @@ static int viewx = 0, viewy = 0; static char clearviewbox = 0; static char viewboxcleared = 0; - int viewdist = (TWINSIDE / 2 * SCALE) / (GWIDTH / GWINSIDE); - int view = TWINSIDE * SCALE / 2; + int viewdist = (TWINSIDE / 2 * scaleFactor) / (GWIDTH / GWINSIDE); + int view = TWINSIDE * scaleFactor / 2; int mvx, mvy; #ifdef RECORDGAME From modemhero at users.sourceforge.net Sat Apr 7 00:17:40 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 07 Apr 2007 05:17:40 +0000 Subject: [netrek-cvs] client/netrekxp/resources/ships/highres fedshipHR.bmp, 1.1, 1.2 indshipHR.bmp, 1.5, 1.6 klishipHR.bmp, 1.3, 1.4 orishipHR.bmp, 1.3, 1.4 romshipHR.bmp, 1.2, 1.3 Message-ID: <20070407051751.8DBDD186810@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/ships/highres In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv16681/resources/ships/highres Modified Files: fedshipHR.bmp indshipHR.bmp klishipHR.bmp orishipHR.bmp romshipHR.bmp Log Message: This patch adds scalability to the local window. New netrekrc option scaleFactor controls the scale, which can go from normal to 4x zoom. Control-a and control-z keys are now used to zoom in/out. SCALE was replaced by scaleFactor in many places, though SCALE is still used extensively. Many bitmap drawing functions now are scaled via a SCALE / scaleFactor. Also, many bitmaps that were never scaled before, i.e. the old bitmap sets, shield, cloak, explosions, etc..are now scaled. This has the added bonus of making the old ship bitmap sets show ships to 256 positions. Fixed some inconsistencies in how clearzones were defined in local.c, such as in the case of warnHull option. Fixed stars and inforange box to work at different zooms. Fixed the scalebitmap functions to use the color/palette on the globalmemdc2 for the first stretch bitmap operation, otherwise color info was lost. Allowing keyboard actions in richtext windows - this allows for copy /paste, however still the major problem of the richtext window proc not doing anything, thus keystrokes are ignored. Army/wrench/fuel icons were replaced by the unused art icons I had made but never used, since these now scale up to 4x (the old army/ wrench/fuel didn't look good at 4x zoom). Cleaned up a bunch of stray pixels in the highres ship bitmap sets, that were noticeable at higher zooms. Fixed the planet resource location and clearzones for both local and galactic planets with the new planet bitmaps. Index: klishipHR.bmp =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/ships/highres/klishipHR.bmp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 Binary files /tmp/cvsrdXXgF and /tmp/cvsKISfoK differ Index: orishipHR.bmp =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/ships/highres/orishipHR.bmp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 Binary files /tmp/cvs3V2ZKR and /tmp/cvs0XzRcX differ Index: fedshipHR.bmp =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/ships/highres/fedshipHR.bmp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsTBxCrZ and /tmp/cvsLNPH54 differ Index: romshipHR.bmp =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/ships/highres/romshipHR.bmp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 Binary files /tmp/cvsBzpWP7 and /tmp/cvsUHGRDd differ Index: indshipHR.bmp =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/ships/highres/indshipHR.bmp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 Binary files /tmp/cvsyiLYtb and /tmp/cvsQm3Wrh differ From modemhero at users.sourceforge.net Sat Apr 7 00:17:40 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 07 Apr 2007 05:17:40 +0000 Subject: [netrek-cvs] client/netrekxp/resources/planlibm/color army.bmp, 1.1, 1.2 fuel.bmp, 1.1, 1.2 wrench.bmp, 1.1, 1.2 Message-ID: <20070407051751.6659518680E@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/planlibm/color In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv16681/resources/planlibm/color Modified Files: army.bmp fuel.bmp wrench.bmp Log Message: This patch adds scalability to the local window. New netrekrc option scaleFactor controls the scale, which can go from normal to 4x zoom. Control-a and control-z keys are now used to zoom in/out. SCALE was replaced by scaleFactor in many places, though SCALE is still used extensively. Many bitmap drawing functions now are scaled via a SCALE / scaleFactor. Also, many bitmaps that were never scaled before, i.e. the old bitmap sets, shield, cloak, explosions, etc..are now scaled. This has the added bonus of making the old ship bitmap sets show ships to 256 positions. Fixed some inconsistencies in how clearzones were defined in local.c, such as in the case of warnHull option. Fixed stars and inforange box to work at different zooms. Fixed the scalebitmap functions to use the color/palette on the globalmemdc2 for the first stretch bitmap operation, otherwise color info was lost. Allowing keyboard actions in richtext windows - this allows for copy /paste, however still the major problem of the richtext window proc not doing anything, thus keystrokes are ignored. Army/wrench/fuel icons were replaced by the unused art icons I had made but never used, since these now scale up to 4x (the old army/ wrench/fuel didn't look good at 4x zoom). Cleaned up a bunch of stray pixels in the highres ship bitmap sets, that were noticeable at higher zooms. Fixed the planet resource location and clearzones for both local and galactic planets with the new planet bitmaps. Index: army.bmp =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/planlibm/color/army.bmp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvs5DD1hF and /tmp/cvsiPMHoK differ Index: wrench.bmp =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/planlibm/color/wrench.bmp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvshvBHaT and /tmp/cvstSfoBY differ Index: fuel.bmp =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/planlibm/color/fuel.bmp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsvIajeZ and /tmp/cvsfCNeS4 differ From modemhero at users.sourceforge.net Sat Apr 7 00:17:40 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 07 Apr 2007 05:17:40 +0000 Subject: [netrek-cvs] client/netrekxp/resources/htmlhelp/html generalconfig.html, 1.47, 1.48 Message-ID: <20070407051751.4CA95B442@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv16681/resources/htmlhelp/html Modified Files: generalconfig.html Log Message: This patch adds scalability to the local window. New netrekrc option scaleFactor controls the scale, which can go from normal to 4x zoom. Control-a and control-z keys are now used to zoom in/out. SCALE was replaced by scaleFactor in many places, though SCALE is still used extensively. Many bitmap drawing functions now are scaled via a SCALE / scaleFactor. Also, many bitmaps that were never scaled before, i.e. the old bitmap sets, shield, cloak, explosions, etc..are now scaled. This has the added bonus of making the old ship bitmap sets show ships to 256 positions. Fixed some inconsistencies in how clearzones were defined in local.c, such as in the case of warnHull option. Fixed stars and inforange box to work at different zooms. Fixed the scalebitmap functions to use the color/palette on the globalmemdc2 for the first stretch bitmap operation, otherwise color info was lost. Allowing keyboard actions in richtext windows - this allows for copy /paste, however still the major problem of the richtext window proc not doing anything, thus keystrokes are ignored. Army/wrench/fuel icons were replaced by the unused art icons I had made but never used, since these now scale up to 4x (the old army/ wrench/fuel didn't look good at 4x zoom). Cleaned up a bunch of stray pixels in the highres ship bitmap sets, that were noticeable at higher zooms. Fixed the planet resource location and clearzones for both local and galactic planets with the new planet bitmaps. Index: generalconfig.html =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html/generalconfig.html,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- generalconfig.html 6 Apr 2007 06:46:31 -0000 1.47 +++ generalconfig.html 7 Apr 2007 05:17:38 -0000 1.48 @@ -1041,6 +1041,12 @@ +scaleFactor +Scale of local map graphics +integer (10-40)
default: 40 + + + server Server name to connect to by default hostname From modemhero at users.sourceforge.net Sat Apr 7 00:17:40 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 07 Apr 2007 05:17:40 +0000 Subject: [netrek-cvs] client/netrekxp/include bitmaps.h, 1.16, 1.17 data.h, 1.72, 1.73 defs.h, 1.19, 1.20 proto.h, 1.45, 1.46 Message-ID: <20070407051751.1645E1867FF@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv16681/include Modified Files: bitmaps.h data.h defs.h proto.h Log Message: This patch adds scalability to the local window. New netrekrc option scaleFactor controls the scale, which can go from normal to 4x zoom. Control-a and control-z keys are now used to zoom in/out. SCALE was replaced by scaleFactor in many places, though SCALE is still used extensively. Many bitmap drawing functions now are scaled via a SCALE / scaleFactor. Also, many bitmaps that were never scaled before, i.e. the old bitmap sets, shield, cloak, explosions, etc..are now scaled. This has the added bonus of making the old ship bitmap sets show ships to 256 positions. Fixed some inconsistencies in how clearzones were defined in local.c, such as in the case of warnHull option. Fixed stars and inforange box to work at different zooms. Fixed the scalebitmap functions to use the color/palette on the globalmemdc2 for the first stretch bitmap operation, otherwise color info was lost. Allowing keyboard actions in richtext windows - this allows for copy /paste, however still the major problem of the richtext window proc not doing anything, thus keystrokes are ignored. Army/wrench/fuel icons were replaced by the unused art icons I had made but never used, since these now scale up to 4x (the old army/ wrench/fuel didn't look good at 4x zoom). Cleaned up a bunch of stray pixels in the highres ship bitmap sets, that were noticeable at higher zooms. Fixed the planet resource location and clearzones for both local and galactic planets with the new planet bitmaps. Index: defs.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/defs.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- defs.h 6 Apr 2007 06:46:31 -0000 1.19 +++ defs.h 7 Apr 2007 05:17:38 -0000 1.20 @@ -45,6 +45,8 @@ #define GWIDTH 100000 /* galaxy is 100000 spaces * on a side */ +#define SCALE 40 /* Window will be one pixel for + these # spaces */ #define WARP1 20 /* warp one will move 20 * spaces per update */ #define EXPDIST 350 /* At this range a torp will Index: bitmaps.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/bitmaps.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- bitmaps.h 6 Apr 2007 06:46:31 -0000 1.16 +++ bitmaps.h 7 Apr 2007 05:17:38 -0000 1.17 @@ -176,14 +176,14 @@ // Resources #define BMP_ARMYBMP 10 -#define BMP_ARMY_WIDTH 10 -#define BMP_ARMY_HEIGHT 30 +#define BMP_ARMY_WIDTH 40 +#define BMP_ARMY_HEIGHT 120 #define BMP_WRENCHBMP 11 -#define BMP_WRENCH_WIDTH 30 -#define BMP_WRENCH_HEIGHT 10 +#define BMP_WRENCH_WIDTH 120 +#define BMP_WRENCH_HEIGHT 40 #define BMP_FUELBMP 12 -#define BMP_FUEL_WIDTH 10 -#define BMP_FUEL_HEIGHT 30 +#define BMP_FUEL_WIDTH 40 +#define BMP_FUEL_HEIGHT 120 #define BMP_CPLANET_WIDTH 120 #define BMP_CPLANET_HEIGHT 120 Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.72 retrieving revision 1.73 diff -u -d -r1.72 -r1.73 --- data.h 6 Apr 2007 06:46:31 -0000 1.72 +++ data.h 7 Apr 2007 05:17:38 -0000 1.73 @@ -51,7 +51,6 @@ /* These used to be defines ... */ extern int TWINSIDE; extern int GWINSIDE; -extern int SCALE; extern unsigned int oldalert; extern unsigned char oldtourn; @@ -738,4 +737,5 @@ extern int sortPlanets; /* sort planet list by team and army count */ extern int packetLights; /* show packet send/receive via dashboard */ extern int infoRange; /* show limit on info with large tactical windows */ +extern int scaleFactor; /* allows for scaling of graphics */ #endif /* _h_data */ Index: proto.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/proto.h,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- proto.h 5 Apr 2007 12:57:22 -0000 1.45 +++ proto.h 7 Apr 2007 05:17:38 -0000 1.46 @@ -387,6 +387,7 @@ Key163 (W_Event * data), Key175 (W_Event * data), Key180 (W_Event * data), + Key193 (void), Key194 (W_Event * data), Key195 (W_Event * data), Key197 (W_Event * data), @@ -397,7 +398,8 @@ Key204 (W_Event * data), Key205 (W_Event * data), Key208 (W_Event * data), - Key212 (W_Event * data); + Key212 (W_Event * data), + Key218 (void); /******************************************************************************/ /*** interface.c From modemhero at users.sourceforge.net Sat Apr 7 00:17:40 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 07 Apr 2007 05:17:40 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.159, 1.160 netrekrc, 1.53, 1.54 netrekrc_options.txt, 1.46, 1.47 Message-ID: <20070407051751.59E48186802@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv16681/resources/docs Modified Files: changes.txt netrekrc netrekrc_options.txt Log Message: This patch adds scalability to the local window. New netrekrc option scaleFactor controls the scale, which can go from normal to 4x zoom. Control-a and control-z keys are now used to zoom in/out. SCALE was replaced by scaleFactor in many places, though SCALE is still used extensively. Many bitmap drawing functions now are scaled via a SCALE / scaleFactor. Also, many bitmaps that were never scaled before, i.e. the old bitmap sets, shield, cloak, explosions, etc..are now scaled. This has the added bonus of making the old ship bitmap sets show ships to 256 positions. Fixed some inconsistencies in how clearzones were defined in local.c, such as in the case of warnHull option. Fixed stars and inforange box to work at different zooms. Fixed the scalebitmap functions to use the color/palette on the globalmemdc2 for the first stretch bitmap operation, otherwise color info was lost. Allowing keyboard actions in richtext windows - this allows for copy /paste, however still the major problem of the richtext window proc not doing anything, thus keystrokes are ignored. Army/wrench/fuel icons were replaced by the unused art icons I had made but never used, since these now scale up to 4x (the old army/ wrench/fuel didn't look good at 4x zoom). Cleaned up a bunch of stray pixels in the highres ship bitmap sets, that were noticeable at higher zooms. Fixed the planet resource location and clearzones for both local and galactic planets with the new planet bitmaps. Index: netrekrc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- netrekrc 6 Apr 2007 06:46:31 -0000 1.53 +++ netrekrc 7 Apr 2007 05:17:38 -0000 1.54 @@ -327,6 +327,10 @@ # Save RCM to saveFile saveRCM: on +# Scale of local map graphics +# 10-40 range +scaleFactor: 40 + # Shift+Mouse gives additional commands shiftedMouse: on Index: netrekrc_options.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc_options.txt,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- netrekrc_options.txt 6 Apr 2007 06:46:31 -0000 1.46 +++ netrekrc_options.txt 7 Apr 2007 05:17:38 -0000 1.47 @@ -237,6 +237,7 @@ saveRCD: (on/off) save receiver configurable distresses to saveFile saveRCM: (on/off) save receiver configurable messages to saveFile saveWindow: (on/off) save window placements to saveFile +scaleFactor: (10-40) scale of local map graphics server: (address) default server (only listed on TCP metaserver) server.: (address) is a nickname for (address) shiftedMouse: (on/off) shift+mouse buttons will work as commands Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.159 retrieving revision 1.160 diff -u -d -r1.159 -r1.160 --- changes.txt 6 Apr 2007 06:46:31 -0000 1.159 +++ changes.txt 7 Apr 2007 05:17:38 -0000 1.160 @@ -1,4 +1,13 @@ Netrek XP 2006, Version 1.3: +- added new function keys, control-z and control-a, for zooming. Control-z zooms in, + and control-a zooms out. As part of the benefit of having all graphics scale, ALL ship + bitmap sets now show ships to 256 positions. +- added netrekrc option "scaleFactor: (10-40)" that allows you to zoom in the local map + to get more detail! Turn on those high resolution bitmaps, pump up your tactical size + to 1000x1000 and see the great graphics! Default scale is 40 (this is the traditional + scale used in clients, changing scale to 20 will effectively double the scale). +- added netrekrc option "richText: (on)/off" to allow stuff like cut/paste from message + windows and clickable URLs. The 2nd part works, the first part..not so much yet. - added the ability to change the size of the local or map windows! This is a huge improvement, and is probably the most often requested feature. There really is no limit on how big or small you can make the windows. As you increase local window size, you can see further, giving From modemhero at users.sourceforge.net Sat Apr 7 00:17:42 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 07 Apr 2007 05:17:42 +0000 Subject: [netrek-cvs] client/netrekxp/resources/unused art federation.png, 1.1, NONE klingon.png, 1.1, NONE orion.png, 1.1, NONE romulan.png, 1.1, NONE Message-ID: <20070407051750.CEE831867FA@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/unused art In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv16681/resources/unused art Removed Files: federation.png klingon.png orion.png romulan.png Log Message: This patch adds scalability to the local window. New netrekrc option scaleFactor controls the scale, which can go from normal to 4x zoom. Control-a and control-z keys are now used to zoom in/out. SCALE was replaced by scaleFactor in many places, though SCALE is still used extensively. Many bitmap drawing functions now are scaled via a SCALE / scaleFactor. Also, many bitmaps that were never scaled before, i.e. the old bitmap sets, shield, cloak, explosions, etc..are now scaled. This has the added bonus of making the old ship bitmap sets show ships to 256 positions. Fixed some inconsistencies in how clearzones were defined in local.c, such as in the case of warnHull option. Fixed stars and inforange box to work at different zooms. Fixed the scalebitmap functions to use the color/palette on the globalmemdc2 for the first stretch bitmap operation, otherwise color info was lost. Allowing keyboard actions in richtext windows - this allows for copy /paste, however still the major problem of the richtext window proc not doing anything, thus keystrokes are ignored. Army/wrench/fuel icons were replaced by the unused art icons I had made but never used, since these now scale up to 4x (the old army/ wrench/fuel didn't look good at 4x zoom). Cleaned up a bunch of stray pixels in the highres ship bitmap sets, that were noticeable at higher zooms. Fixed the planet resource location and clearzones for both local and galactic planets with the new planet bitmaps. --- klingon.png DELETED --- --- orion.png DELETED --- --- romulan.png DELETED --- --- federation.png DELETED --- From modemhero at users.sourceforge.net Sat Apr 7 00:17:40 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 07 Apr 2007 05:17:40 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C,1.126,1.127 Message-ID: <20070407051750.52CE1B440@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv16681 Modified Files: NetrekXP to do list.C Log Message: This patch adds scalability to the local window. New netrekrc option scaleFactor controls the scale, which can go from normal to 4x zoom. Control-a and control-z keys are now used to zoom in/out. SCALE was replaced by scaleFactor in many places, though SCALE is still used extensively. Many bitmap drawing functions now are scaled via a SCALE / scaleFactor. Also, many bitmaps that were never scaled before, i.e. the old bitmap sets, shield, cloak, explosions, etc..are now scaled. This has the added bonus of making the old ship bitmap sets show ships to 256 positions. Fixed some inconsistencies in how clearzones were defined in local.c, such as in the case of warnHull option. Fixed stars and inforange box to work at different zooms. Fixed the scalebitmap functions to use the color/palette on the globalmemdc2 for the first stretch bitmap operation, otherwise color info was lost. Allowing keyboard actions in richtext windows - this allows for copy /paste, however still the major problem of the richtext window proc not doing anything, thus keystrokes are ignored. Army/wrench/fuel icons were replaced by the unused art icons I had made but never used, since these now scale up to 4x (the old army/ wrench/fuel didn't look good at 4x zoom). Cleaned up a bunch of stray pixels in the highres ship bitmap sets, that were noticeable at higher zooms. Fixed the planet resource location and clearzones for both local and galactic planets with the new planet bitmaps. Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.126 retrieving revision 1.127 diff -u -d -r1.126 -r1.127 --- NetrekXP to do list.C 6 Apr 2007 06:46:31 -0000 1.126 +++ NetrekXP to do list.C 7 Apr 2007 05:17:38 -0000 1.127 @@ -22,8 +22,6 @@ is rotated. Only solution so far is to moderate border refresh with scaled bitmaps. 2) AddFontResourceEx caused problems with win 98 machines. Commented out, and using old AddFontResource function. -3) planet resource placement and refresh (for new planet bitmaps) will need adjusting if -local is scaled Things to do: 1) resizeable message windows. Perhaps memory of window positions if you choose From modemhero at users.sourceforge.net Sat Apr 7 00:43:28 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 07 Apr 2007 05:43:28 +0000 Subject: [netrek-cvs] client/netrekxp/src defaults.c,1.70,1.71 Message-ID: <20070407054336.3033CB440@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv27049/src Modified Files: defaults.c Log Message: Inconsistency fixes found by comparing autogenerated netrek.sav to netrekrc. Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.70 retrieving revision 1.71 diff -u -d -r1.70 -r1.71 --- defaults.c 7 Apr 2007 05:17:38 -0000 1.70 +++ defaults.c 7 Apr 2007 05:43:26 -0000 1.71 @@ -245,7 +245,7 @@ }, {"lockLine", &lockLine, RC_BOOL, { - "Draw dashed green line on map from your ship to lock target," + "Draw dashed green line on map from your ship to lock target,", "requires showLock to be on for map", NULL } @@ -550,7 +550,7 @@ }, {"richText", &richText, RC_BOOL, { - "Use rich text message windows, currently disabled", + "Use rich text message windows", NULL } }, @@ -647,7 +647,7 @@ {"showCloakers", &showCloakers, RC_BOOL, { "Show other cloakers on local", - "Server god decides whether to enable it on server", + "Server god decides whether to enable this feature", NULL } }, @@ -954,10 +954,10 @@ {"viewRange", &viewRange, RC_INT, { "Show range at which enemies can see you as a circle on map", - "0 - Don't show range circle", - "1 - Only show range circle when cloaked", - "2 - Only show range circle when carrying", - "3 - Show range circle at all times", + "0 - don't show range circle", + "1 - only show range circle when cloaked", + "2 - only show range circle when carrying", + "3 - show range circle at all times", NULL } }, @@ -2178,7 +2178,7 @@ 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 ("# Define your 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); From modemhero at users.sourceforge.net Sat Apr 7 00:43:28 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 07 Apr 2007 05:43:28 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs netrekrc,1.54,1.55 Message-ID: <20070407054336.9D149B442@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv27049/resources/docs Modified Files: netrekrc Log Message: Inconsistency fixes found by comparing autogenerated netrek.sav to netrekrc. Index: netrekrc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- netrekrc 7 Apr 2007 05:17:38 -0000 1.54 +++ netrekrc 7 Apr 2007 05:43:26 -0000 1.55 @@ -5,7 +5,7 @@ login: netrek_player # Key mapping -# Define you keymap here. The format is newkey defaultkey. For example, the +# Define your keymap here. The format is newkey defaultkey. For example, the # default key for shield toggle is 's', if you want to remap shield toggle to # 'q', you would put 'qs' in your keymap. Shields would still be mapped to # 's' as well as now being on 'q'. Adding a mapping doesn't delete the old @@ -17,7 +17,7 @@ # Mouse button mapping # Button map lets you map the mouse buttons. Unfortunately, it works in a # different way than keymap. The format is . To map -# shields onto button 1 (the left one), you would put '1s' in your keymap. +# shields onto button 1 (the left one), you would put '1s' in your keymap. # The buttonmap works through the keymap, so if you have shields mapped to # 'q', putting '1q' would make button 1 shields and not quit. Buttons 4 and # 5 are support for Microsoft Xbuttons. If you have a wheel mouse, the up @@ -303,8 +303,8 @@ # Report kills reportKills: on -# Use rich text message windows, currently disabled -richText: off +# Use rich text message windows +richText: on # Rotate planets (only works with new planet bitmaps) rotatePlanets: on @@ -625,7 +625,7 @@ player2.mapped: off help.parent: netrek -#help.mapped: off +help.mapped: off review_all.parent: netrek #review_all.geometry: 81x5+506+660 @@ -836,7 +836,7 @@ # Keys that will trigger macro without going to macro mode singleMacro: EF -macro.0.A:% __ __ ______ __ Bug fixes, anti-packet loss stuff, +macro.0.A:% __ __ ______ __ Zoom in/out! Anti-packet loss, macro.0.A:% / \ / /__/_ __/______ / /__ observers see all weapons, etc. macro.0.A:% / /\ \/ / -_)/ / / __/ -_) '_/ Plus 50 updates/sec support! macro.0.A:% /_/ \__/\__//_/ /_/ \__/_/\_\ XP 2006, v1.3, released March 2007 @@ -1006,27 +1006,26 @@ macro.9.A:% .:>: .> >. :/*/:./.X__ | macro.9.A:% --------------------:--:--**#:-<<:^/^<**#**#**:._/--------/->--- -mac.^y.A:% __ __ _____ _____ _ -mac.^y.A:% \ \_/ /| ___|| ___| | | It's %u (%p) -mac.^y.A:% \ / | ___||___ | |_| Now we will win! -mac.^y.A:% |_| |_____||_____| (_) +macro.^y.A:% __ __ _____ _____ _ +macro.^y.A:% \ \_/ /| ___|| ___| | | It's %u (%p) +macro.^y.A:% \ / | ___||___ | |_| Now we will win! +macro.^y.A:% |_| |_____||_____| (_) -mac.^n.A:% _ _ _____ _____ _ -mac.^n.A:% | \ | || _ || _ | | | It's %u (%p) -mac.^n.A:% | |\| || |_| || |_| | |_| Great, now we're fucked! -mac.^n.A:% |_| \_||_____||_____| (_) +macro.^n.A:% _ _ _____ _____ _ +macro.^n.A:% | \ | || _ || _ | | | It's %u (%p) +macro.^n.A:% | |\| || |_| || |_| | |_| Great, now we're fucked! +macro.^n.A:% |_| \_||_____||_____| (_) macro.).A:/* Join the netrek clue game mailing list today! At */ macro.).A:/* http://groups.google.com/group/netrek-clue-games */ macro.).A:/* INL-style timed bronco games are every Wednesday */ macro.).A:/* 10pm EST/7pm PST */ -macro.(.A: /* Get the latest version of Netrek XP 2006 today! */ -macro.(.A: /* Current version is 1.3, released March 2007 */ -macro.(.A: /* Download it at http://www.netrek.org/files/NetrekXP_2006/ */ -macro.(.A: /* or */ -macro.(.A: /* http://www.playnetrek.org/ */ - +macro.(.A:/* Get the latest version of Netrek XP 2006 today! */ +macro.(.A:/* Current version is 1.3, released April 2007 */ +macro.(.A:/* Download it at http://www.netrek.org/files/NetrekXP_2006/ */ +macro.(.A:/* or */ +macro.(.A:/* http://www.playnetrek.org/ */ mac.e.T: Escorting %g (%d%%D %s%%S %f%%F) mac.V.A: %T%c PING stats: Average: %v ms, Stdv: %V ms, Loss: %y%% From modemhero at users.sourceforge.net Sat Apr 7 04:16:16 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 07 Apr 2007 09:16:16 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs netrekrc,1.55,1.56 Message-ID: <20070407091624.ACDB1B43C@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv15634/resources/docs Modified Files: netrekrc Log Message: Fixed problem with keyboard actions and richtext window, Index: netrekrc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 --- netrekrc 7 Apr 2007 05:43:26 -0000 1.55 +++ netrekrc 7 Apr 2007 09:16:14 -0000 1.56 @@ -162,7 +162,7 @@ # 0 - nowhere # 1 - top of the window # 2 - bottom of the window -messageHUD: 0 +messageHUD: 2 # Only start messages with the actual message key(s) # if cursor is in the message windows From modemhero at users.sourceforge.net Sat Apr 7 04:16:16 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 07 Apr 2007 09:16:16 +0000 Subject: [netrek-cvs] client/netrekxp/src mswindow.c,1.56,1.57 Message-ID: <20070407091624.AE767B43D@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv15634/src Modified Files: mswindow.c Log Message: Fixed problem with keyboard actions and richtext window, Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- mswindow.c 7 Apr 2007 05:17:39 -0000 1.56 +++ mswindow.c 7 Apr 2007 09:16:14 -0000 1.57 @@ -2255,7 +2255,10 @@ hwnd = WindowFromPoint (pos); if (GetWindowLongPtr (hwnd, GWLP_WNDPROC) != (LONG) NetrekWndProc) - return 0; //Mouse is not in one of our windows + { + if (GetWindowLongPtr (hwnd, GWLP_WNDPROC) != (LONG) RichTextWndProc) + return 0; //Mouse is not in one of our windows + } if (!hwnd || hwnd == ((Window *) baseWin)->hwnd) hwnd = ((Window *) w)->hwnd; @@ -5963,8 +5966,6 @@ W_ChangeBorder ((W_Window) win, W_White); break;*/ - // case WM_KEYDOWN: - // return (0); case WM_LBUTTONDOWN: BringWindowToTop (hwnd); break; From modemhero at users.sourceforge.net Sat Apr 7 04:16:16 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 07 Apr 2007 09:16:16 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C,1.127,1.128 Message-ID: <20070407091624.A62451867FA@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv15634 Modified Files: NetrekXP to do list.C Log Message: Fixed problem with keyboard actions and richtext window, Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.127 retrieving revision 1.128 diff -u -d -r1.127 -r1.128 --- NetrekXP to do list.C 7 Apr 2007 05:17:38 -0000 1.127 +++ NetrekXP to do list.C 7 Apr 2007 09:16:14 -0000 1.128 @@ -42,8 +42,7 @@ to hostname not resolving. Currently fixed by using mulitple attempts to resolve bad host names. 11) CPU profile cambot -12) Solve richtext issue with keyboard/mouse action over richtext windows.. -12a) minor richtext issue with scrolling - extra line at the end +12) minor richtext issue with scrolling - extra line at the end 13) With expanded tactical ..can now see ships at galactic coordinates (-500,-500), if you fly into the NW corner of the galaxy. this was never anticipated! From modemhero at users.sourceforge.net Sat Apr 7 06:35:32 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 07 Apr 2007 11:35:32 +0000 Subject: [netrek-cvs] client/netrekxp/resources/unused art earthmap.png, NONE, 1.1 resources.png, NONE, 1.1 army men.jpg, 1.1, NONE gas can.jpg, 1.1, NONE wrench.jpg, 1.1, NONE Message-ID: <20070407113543.943991867FA@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/unused art In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv10113/resources/unused art Added Files: earthmap.png resources.png Removed Files: army men.jpg gas can.jpg wrench.jpg Log Message: Changed back to the old army icon, the new one was just too ugly. Decreased step size of zoom keys. Turned off the extra border redraws during cambot playback. Added a little fudge factor to the planet resources by drawing them all 1 pixel wider, this has a big impact on the quality of the graphics as due to rounding, they tended to get squished. Update the clear routines accordingly. Removed the army men/gas can/wrench from the unused art section as they got used (well 2 of them did). Added 2 pieces of art taken from gltrek. --- gas can.jpg DELETED --- --- wrench.jpg DELETED --- --- army men.jpg DELETED --- --- NEW FILE: resources.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: earthmap.png --- (This appears to be a binary file; contents omitted.) From modemhero at users.sourceforge.net Sat Apr 7 06:35:28 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 07 Apr 2007 11:35:28 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C, 1.128, 1.129 clientr.suo, 1.114, 1.115 Message-ID: <20070407113607.BC913B42C@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv10113 Modified Files: NetrekXP to do list.C clientr.suo Log Message: Changed back to the old army icon, the new one was just too ugly. Decreased step size of zoom keys. Turned off the extra border redraws during cambot playback. Added a little fudge factor to the planet resources by drawing them all 1 pixel wider, this has a big impact on the quality of the graphics as due to rounding, they tended to get squished. Update the clear routines accordingly. Removed the army men/gas can/wrench from the unused art section as they got used (well 2 of them did). Added 2 pieces of art taken from gltrek. Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.128 retrieving revision 1.129 diff -u -d -r1.128 -r1.129 --- NetrekXP to do list.C 7 Apr 2007 09:16:14 -0000 1.128 +++ NetrekXP to do list.C 7 Apr 2007 11:35:20 -0000 1.129 @@ -41,7 +41,9 @@ 10) sendto() error: 10049 on metaserver connect to a bad server, believe it's due to hostname not resolving. Currently fixed by using mulitple attempts to resolve bad host names. -11) CPU profile cambot +11) CPU profile cambot - revealed draw border issue (fixed, turned off extra border +refreshes during playback), the rest is just the usual CPU use from doing very fast +redraws 12) minor richtext issue with scrolling - extra line at the end 13) With expanded tactical ..can now see ships at galactic coordinates (-500,-500), if you fly into the NW corner of the galaxy. this was never anticipated! @@ -52,7 +54,5 @@ - add shiftMouse, controlMouse on/off - fix accelerated scroll for microsoft mice - add msg.phaser to enable formatting of phaser messages -- add copy/paste possibility from message windows (richtext ?) -- add clickable urls from message windows (richtext ?) - parse Announcer messages in hockey games - pasting multiline prints \r\n instead of splitting lines Index: clientr.suo =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.suo,v retrieving revision 1.114 retrieving revision 1.115 diff -u -d -r1.114 -r1.115 Binary files /tmp/cvs1vNF0t and /tmp/cvsHCGsDw differ From modemhero at users.sourceforge.net Sat Apr 7 06:35:29 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 07 Apr 2007 11:35:29 +0000 Subject: [netrek-cvs] client/netrekxp/include bitmaps.h,1.17,1.18 Message-ID: <20070407113607.AE9F11867FA@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv10113/include Modified Files: bitmaps.h Log Message: Changed back to the old army icon, the new one was just too ugly. Decreased step size of zoom keys. Turned off the extra border redraws during cambot playback. Added a little fudge factor to the planet resources by drawing them all 1 pixel wider, this has a big impact on the quality of the graphics as due to rounding, they tended to get squished. Update the clear routines accordingly. Removed the army men/gas can/wrench from the unused art section as they got used (well 2 of them did). Added 2 pieces of art taken from gltrek. Index: bitmaps.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/bitmaps.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- bitmaps.h 7 Apr 2007 05:17:38 -0000 1.17 +++ bitmaps.h 7 Apr 2007 11:35:26 -0000 1.18 @@ -176,8 +176,8 @@ // Resources #define BMP_ARMYBMP 10 -#define BMP_ARMY_WIDTH 40 -#define BMP_ARMY_HEIGHT 120 +#define BMP_ARMY_WIDTH 10 +#define BMP_ARMY_HEIGHT 30 #define BMP_WRENCHBMP 11 #define BMP_WRENCH_WIDTH 120 #define BMP_WRENCH_HEIGHT 40 From modemhero at users.sourceforge.net Sat Apr 7 06:35:29 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 07 Apr 2007 11:35:29 +0000 Subject: [netrek-cvs] client/netrekxp/resources/planlibm/color army.bmp, 1.2, 1.3 Message-ID: <20070407113607.B8301B42B@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/planlibm/color In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv10113/resources/planlibm/color Modified Files: army.bmp Log Message: Changed back to the old army icon, the new one was just too ugly. Decreased step size of zoom keys. Turned off the extra border redraws during cambot playback. Added a little fudge factor to the planet resources by drawing them all 1 pixel wider, this has a big impact on the quality of the graphics as due to rounding, they tended to get squished. Update the clear routines accordingly. Removed the army men/gas can/wrench from the unused art section as they got used (well 2 of them did). Added 2 pieces of art taken from gltrek. Index: army.bmp =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/planlibm/color/army.bmp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 Binary files /tmp/cvsiuWnI5 and /tmp/cvsoWNul9 differ From modemhero at users.sourceforge.net Sat Apr 7 06:35:30 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 07 Apr 2007 11:35:30 +0000 Subject: [netrek-cvs] client/netrekxp/src input.c, 1.33, 1.34 local.c, 1.88, 1.89 map.c, 1.44, 1.45 Message-ID: <20070407113608.763091867FB@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv10113/src Modified Files: input.c local.c map.c Log Message: Changed back to the old army icon, the new one was just too ugly. Decreased step size of zoom keys. Turned off the extra border redraws during cambot playback. Added a little fudge factor to the planet resources by drawing them all 1 pixel wider, this has a big impact on the quality of the graphics as due to rounding, they tended to get squished. Update the clear routines accordingly. Removed the army men/gas can/wrench from the unused art section as they got used (well 2 of them did). Added 2 pieces of art taken from gltrek. Index: input.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/input.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- input.c 7 Apr 2007 05:17:39 -0000 1.33 +++ input.c 7 Apr 2007 11:35:27 -0000 1.34 @@ -3546,7 +3546,7 @@ void Key193 (void) { - scaleFactor -= 5; + scaleFactor -= 2; if (scaleFactor < 10) scaleFactor = 10; W_FastClear = 1; @@ -3560,7 +3560,7 @@ void Key218 (void) { - scaleFactor += 5; + scaleFactor += 2; if (scaleFactor > 40) scaleFactor = 40; W_FastClear = 1; Index: map.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- map.c 7 Apr 2007 05:17:39 -0000 1.44 +++ map.c 7 Apr 2007 11:35:27 -0000 1.45 @@ -446,9 +446,9 @@ { /* Select resources */ if (p->pl_armies > 4) - W_WriteScaleBitmap(dx - destwidth/3, + W_WriteScaleBitmap(dx - destwidth/3 - 1, dy, - destwidth/3, + destwidth/3 + 1, destheight, BMP_ARMY_WIDTH, BMP_ARMY_HEIGHT, @@ -457,9 +457,9 @@ window); if (p->pl_flags & PLREPAIR) W_WriteScaleBitmap(dx, - dy - destheight/3, + dy - destheight/3 - 1, destwidth, - destheight/3, + destheight/3 + 1, BMP_WRENCH_WIDTH, BMP_WRENCH_HEIGHT, 0, @@ -468,7 +468,7 @@ if (p->pl_flags & PLFUEL) W_WriteScaleBitmap(dx + destwidth, dy, - destwidth/3, + destwidth/3 + 1, destheight, BMP_FUEL_WIDTH, BMP_FUEL_HEIGHT, @@ -550,10 +550,10 @@ /* XFIX */ if (planetBitmapGalaxy == 3) - W_ClearArea (mapw, odx - (5 * BMP_MPLANET_WIDTH / 6), - ody - (5 * BMP_MPLANET_HEIGHT / 6), - 5 * BMP_MPLANET_WIDTH / 3, - 4 * BMP_MPLANET_HEIGHT / 3); + W_ClearArea (mapw, odx - (5 * BMP_MPLANET_WIDTH / 6) - 1, + ody - (5 * BMP_MPLANET_HEIGHT / 6) - 1, + 5 * BMP_MPLANET_WIDTH / 3 + 2, + 4 * BMP_MPLANET_HEIGHT / 3 + 1); else W_ClearArea (mapw, odx - (BMP_MPLANET_WIDTH / 2), ody - (BMP_MPLANET_HEIGHT / 2), @@ -570,10 +570,10 @@ /* XFIX */ if (planetBitmapGalaxy == 3) - W_ClearArea (mapw, dx - (5 * BMP_MPLANET_WIDTH / 6), - dy - (5 * BMP_MPLANET_HEIGHT / 6), - 5 * BMP_MPLANET_WIDTH / 3, - 4 * BMP_MPLANET_HEIGHT / 3 + 4); + W_ClearArea (mapw, dx - (5 * BMP_MPLANET_WIDTH / 6) - 1, + dy - (5 * BMP_MPLANET_HEIGHT / 6) - 1, + 5 * BMP_MPLANET_WIDTH / 3 + 2, + 4 * BMP_MPLANET_HEIGHT / 3 + 5); else /* The +4 and +8 are for beeplite, as it uses a 24x24 overlay bitmap compared to 16x16 planet */ Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.88 retrieving revision 1.89 diff -u -d -r1.88 -r1.89 --- local.c 7 Apr 2007 05:17:39 -0000 1.88 +++ local.c 7 Apr 2007 11:35:27 -0000 1.89 @@ -482,9 +482,9 @@ { /* Select resources */ if (p->pl_armies > 4) - W_WriteScaleBitmap(dx - destwidth/3, + W_WriteScaleBitmap(dx - destwidth/3 - 1, dy, - destwidth/3, + destwidth/3 + 1, destheight, BMP_ARMY_WIDTH, BMP_ARMY_HEIGHT, @@ -493,9 +493,9 @@ window); if (p->pl_flags & PLREPAIR) W_WriteScaleBitmap(dx, - dy - destheight/3, + dy - destheight/3 - 1, destwidth, - destheight/3, + destheight/3 + 1, BMP_WRENCH_WIDTH, BMP_WRENCH_HEIGHT, 0, @@ -504,7 +504,7 @@ if (p->pl_flags & PLFUEL) W_WriteScaleBitmap(dx + destwidth, dy, - destwidth/3, + destwidth/3 + 1, destheight, BMP_FUEL_WIDTH, BMP_FUEL_HEIGHT, @@ -643,10 +643,10 @@ } if (planetBitmap == 3) { - clearzone[0][clearcount] = dx - (5 * BMP_PLANET_WIDTH / 6 * SCALE / scaleFactor); - clearzone[1][clearcount] = dy - (5 * BMP_PLANET_HEIGHT / 6 * SCALE / scaleFactor); - clearzone[2][clearcount] = (5 * BMP_PLANET_WIDTH / 3 * SCALE / scaleFactor); - clearzone[3][clearcount] = (4 * BMP_PLANET_HEIGHT / 3 * SCALE / scaleFactor); + clearzone[0][clearcount] = dx - (5 * BMP_PLANET_WIDTH / 6 * SCALE / scaleFactor) - 1; + clearzone[1][clearcount] = dy - (5 * BMP_PLANET_HEIGHT / 6 * SCALE / scaleFactor) - 1; + clearzone[2][clearcount] = (5 * BMP_PLANET_WIDTH / 3 * SCALE / scaleFactor) + 2; + clearzone[3][clearcount] = (4 * BMP_PLANET_HEIGHT / 3 * SCALE / scaleFactor) + 1; } else { @@ -2687,8 +2687,12 @@ /* 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 */ + buffering is off, let's slow down redraws to at most 10 per second. + Turned off during playback due to excessive CPU usage. */ else +#ifdef RECORDGAME + if (!playback) +#endif { static int border_refresh = 0; From modemhero at users.sourceforge.net Sat Apr 7 06:58:42 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 07 Apr 2007 11:58:42 +0000 Subject: [netrek-cvs] client/netrekxp/src smessage.c,1.7,1.8 Message-ID: <20070407115851.470FE1867FB@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv19645/src Modified Files: smessage.c Log Message: Fixed bug where message HUD wasn't getting turned off properly on a misdirected message. Index: smessage.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/smessage.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- smessage.c 2 Apr 2007 21:12:42 -0000 1.7 +++ smessage.c 7 Apr 2007 11:58:40 -0000 1.8 @@ -157,6 +157,7 @@ { /* print error message */ messpend = 0; + showHUD = 0; message_off (); return; } @@ -260,6 +261,7 @@ case '\r': /* send message */ buf[lcount - ADDRLEN] = '\0'; messpend = 0; + showHUD = 0; for (i = 0; i < MAX_MLENGTH; i++) { outmessage[i] = '\0'; @@ -348,7 +350,6 @@ warning ("Not legal recipient"); } BlankChar (0, lcount + 1); - showHUD = 0; lcount = 0; break; From modemhero at users.sourceforge.net Sat Apr 7 06:58:42 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 07 Apr 2007 11:58:42 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C,1.129,1.130 Message-ID: <20070407115851.49A1C1867FF@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv19645 Modified Files: NetrekXP to do list.C Log Message: Fixed bug where message HUD wasn't getting turned off properly on a misdirected message. Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.129 retrieving revision 1.130 diff -u -d -r1.129 -r1.130 --- NetrekXP to do list.C 7 Apr 2007 11:35:20 -0000 1.129 +++ NetrekXP to do list.C 7 Apr 2007 11:58:39 -0000 1.130 @@ -49,7 +49,7 @@ if you fly into the NW corner of the galaxy. this was never anticipated! Stas's list: -- color coded (?) and scrollable playerlist. +- two column and/or scrollable playerlist. - add "reset to defaults" to options menu - add shiftMouse, controlMouse on/off - fix accelerated scroll for microsoft mice From modemhero at users.sourceforge.net Sun Apr 8 17:36:44 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sun, 08 Apr 2007 22:36:44 +0000 Subject: [netrek-cvs] client/netrekxp/src distress.c, 1.5, 1.6 map.c, 1.45, 1.46 mswindow.c, 1.57, 1.58 short.c, 1.21, 1.22 Message-ID: <20070408223653.E5A7418680E@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv16280/src Modified Files: distress.c map.c mswindow.c short.c Log Message: Fixed bug with RCM kill messages where size of kill field was exceeded if kills were greater than 255. Sanity checks on netrekrc window geometries for local and map window. View range circle no longer shows if you are in base (it's not useful in that ship). Index: short.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/short.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- short.c 6 Apr 2007 06:46:32 -0000 1.21 +++ short.c 8 Apr 2007 22:36:42 -0000 1.22 @@ -1510,7 +1510,17 @@ dist.sender = victim; dist.tclose_j = killer; dist.arms = armies; - dist.dam = (unsigned char) (damage / 100); + /* Kills > 255 need to be stuffed into another field */ + if (damage > 25500) + { + dist.dam = (unsigned char) (255); + dist.etmp = (unsigned char) ((damage - 25500) / 100); + } + else + { + dist.dam = (unsigned char) (damage / 100); + dist.etmp = 0; + } dist.shld = (unsigned char) (damage % 100); dist.wtmp = (unsigned char) karg5; makedistress (&dist, msg.mesg, rcm_msg[1].macro); @@ -1735,7 +1745,17 @@ dist.sender = packet->argument; dist.tclose_j = packet->argument; dist.arms = '\0'; - dist.dam = (unsigned char) (damage / 100); + /* Kills > 255 need to be stuffed into another field */ + if (damage > 25500) + { + dist.dam = (unsigned char) (255); + dist.etmp = (unsigned char) ((damage - 25500) / 100); + } + else + { + dist.dam = (unsigned char) (damage / 100); + dist.etmp = 0; + } dist.shld = (unsigned char) (damage % 100); dist.wtmp = (unsigned char) karg5; makedistress (&dist, msg.mesg, rcm_msg[6].macro); Index: distress.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/distress.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- distress.c 15 Aug 2006 07:18:31 -0000 1.5 +++ distress.c 8 Apr 2007 22:36:41 -0000 1.6 @@ -797,7 +797,7 @@ #ifdef RCM if (dist->distype == rcm) { - APPEND_INT (pbuf1, dist->dam); + APPEND_INT (pbuf1, dist->dam + dist->etmp); *pbuf1++ = '.'; itoapad (dist->shld, pbuf1, 1, 2); pbuf1 += 2; Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- mswindow.c 7 Apr 2007 09:16:14 -0000 1.57 +++ mswindow.c 8 Apr 2007 22:36:41 -0000 1.58 @@ -4840,9 +4840,18 @@ s++; *width = atoi (geom_default); if (!strcmp("local", name)) + { TWINSIDE = *width; + /* Sanity checks .. */ + if (TWINSIDE > 5000) + TWINSIDE = 5000; + } else if (!strcmp("map", name)) + { GWINSIDE = *width; + if (GWINSIDE > 5000) + GWINSIDE = 5000; + } result |= G_SET_WIDTH; if (*s == 0) return result; @@ -4857,6 +4866,8 @@ { *width = *height; TWINSIDE = *height; + if (TWINSIDE > 5000) + TWINSIDE = 5000; } } else if (!strcmp("map", name)) @@ -4865,6 +4876,8 @@ { *width = *height; GWINSIDE = *height; + if (GWINSIDE > 5000) + GWINSIDE = 5000; } } result |= G_SET_HEIGHT; Index: map.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- map.c 7 Apr 2007 11:35:27 -0000 1.45 +++ map.c 8 Apr 2007 22:36:41 -0000 1.46 @@ -1111,7 +1111,8 @@ #endif /* Draw range circle */ - if (viewRange && (myPlayer(j) || isObsLockPlayer(j))) + if (viewRange && (myPlayer(j) || isObsLockPlayer(j)) + && j->p_ship.s_type != STARBASE) { /* Orbitting any non-owned planet gets you seen, so don't draw the circle */ From modemhero at users.sourceforge.net Sun Apr 8 17:36:43 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sun, 08 Apr 2007 22:36:43 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.160, 1.161 hints.dat, 1.10, 1.11 Message-ID: <20070408223652.B3077B406@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv16280/resources/docs Modified Files: changes.txt hints.dat Log Message: Fixed bug with RCM kill messages where size of kill field was exceeded if kills were greater than 255. Sanity checks on netrekrc window geometries for local and map window. View range circle no longer shows if you are in base (it's not useful in that ship). Index: hints.dat =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/hints.dat,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- hints.dat 2 Apr 2007 21:12:41 -0000 1.10 +++ hints.dat 8 Apr 2007 22:36:41 -0000 1.11 @@ -3,6 +3,8 @@ most windows (such as this one) can be closed by the unmap special windows key. the red circle you may see flash around your ship when detting is the range at which you can detonate enemy torpedoes, you can turn this circle off through the ship menu. you can use Alt+Enter to toggle the main title bar on and off. +you can use Ctrl+a and Ctrl+z to zoom in/out the tactical window. +you can resize your tactical and map windows via the netrekrc. you can send messages from the player list window. Left click for individual messages, middle mouse button click for all board messages, and right click for team messages. you can remap keys by pointing at the key in the help window and pushing the key you want that option to be. you can open the NetrekXP help program with the F1 key. Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.160 retrieving revision 1.161 diff -u -d -r1.160 -r1.161 --- changes.txt 7 Apr 2007 05:17:38 -0000 1.160 +++ changes.txt 8 Apr 2007 22:36:41 -0000 1.161 @@ -1,4 +1,5 @@ Netrek XP 2006, Version 1.3: +- fixed a bug with RCM kill messages when kills were higher than 255 but less than 320 - added new function keys, control-z and control-a, for zooming. Control-z zooms in, and control-a zooms out. As part of the benefit of having all graphics scale, ALL ship bitmap sets now show ships to 256 positions. @@ -7,13 +8,15 @@ to 1000x1000 and see the great graphics! Default scale is 40 (this is the traditional scale used in clients, changing scale to 20 will effectively double the scale). - added netrekrc option "richText: (on)/off" to allow stuff like cut/paste from message - windows and clickable URLs. The 2nd part works, the first part..not so much yet. + windows and clickable URLs. - added the ability to change the size of the local or map windows! This is a huge improvement, and is probably the most often requested feature. There really is no limit on how big or small you can make the windows. As you increase local window size, you can see further, giving somewhat of a gameplay advantage - you can see ships, shields, explosions, but not weapons fire other than your own torps. Just as important, you can now choose a different size for local vs map window. A typical user may want a 750x750 local but only a 400x400 map. + The upper pixel limit is 5000x5000 for either map or local window, but I don't expect + anyone has a monitor to support even close to that limit. - most netrekrc window's geometries are now commented out (all except map and local), this is because adjusting the size of local or map will now do a pretty good job of autoplacing all the other windows for you @@ -74,7 +77,8 @@ - added "viewRange: (0-3)" option to draw a dashed circle on the map showing the range at which enemies can see you. You can choose to draw it at all times, only when you are cloaked, only when carrying, or not at all. If orbitting a - foreign planet, no circle is drawn, as you are visible to all. + foreign planet, no circle is drawn, as you are visible to all. View range is + disabled if your ship is a starbase. - fixed flicker experienced sometimes seen with stationary ships near a planet on the galactic map - the old mono torps are now default. Big torps are nice and all, but I think From modemhero at users.sourceforge.net Sun Apr 8 17:36:43 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sun, 08 Apr 2007 22:36:43 +0000 Subject: [netrek-cvs] client/netrekxp clientr.suo,1.115,1.116 Message-ID: <20070408223652.D6145B40A@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs16:/tmp/cvs-serv16280 Modified Files: clientr.suo Log Message: Fixed bug with RCM kill messages where size of kill field was exceeded if kills were greater than 255. Sanity checks on netrekrc window geometries for local and map window. View range circle no longer shows if you are in base (it's not useful in that ship). Index: clientr.suo =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.suo,v retrieving revision 1.115 retrieving revision 1.116 diff -u -d -r1.115 -r1.116 Binary files /tmp/cvswlrxBa and /tmp/cvszTjxsB differ From modemhero at users.sourceforge.net Sun Apr 8 21:52:33 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 09 Apr 2007 02:52:33 +0000 Subject: [netrek-cvs] client/netrekxp/src data.c, 1.80, 1.81 defaults.c, 1.71, 1.72 local.c, 1.89, 1.90 map.c, 1.46, 1.47 mswindow.c, 1.58, 1.59 Message-ID: <20070409025242.5CCA118680E@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv8621/src Modified Files: data.c defaults.c local.c map.c mswindow.c Log Message: This patch adds the ability to resize local/map windows on the fly, and fixes some of the problems that came up while doing this. Added code to WM_EXITSIZEMOVE case in main windows proc, that handles changing TWINSIDE/GWINSIDE, reinitializing things that need it (such as SDB and star array), and changing critical window sizes that need to be redone (team select windows, quit window - both based on TWINSIDE). Netrekrc option mainResizeable now allows local/map to be resized too, giving these windows a WS_THICKFRAME border. Variable redrawall and struct stars are now globally defined. New defines to limit # of star sectors and # of stars in a sector. Fixed a bunch of places where view was statically defined, as TWINSIDE can now change during gameplay. Fixed a few places where rounding errors were occuring due to parentheses. Moved initialization of mainResizeable and mainTitleBar into defaults.c as defaults are now called before windows initialization. Fixed a few mistakes in the free resources routine for SDB. Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- mswindow.c 8 Apr 2007 22:36:41 -0000 1.58 +++ mswindow.c 9 Apr 2007 02:52:31 -0000 1.59 @@ -640,11 +640,13 @@ SelectObject (localSDB->mem_dc, localSDB->old_bmp); DeleteObject (localSDB->mem_bmp); ReleaseDC (((Window *)localSDB->window)->hwnd, localSDB->win_dc); + DeleteDC (localSDB->mem_dc); free (localSDB); SelectObject (mapSDB->mem_dc, mapSDB->old_bmp); DeleteObject (mapSDB->mem_bmp); - DeleteDC (mapSDB->win_dc); + ReleaseDC (((Window *)mapSDB->window)->hwnd, mapSDB->win_dc); + DeleteDC (mapSDB->mem_dc); free (mapSDB); //WinKey Kill Library Stop @@ -1137,8 +1139,6 @@ sprintf (title_buff, "Netrek @ %s", serverName); } // WS_THICKFRAME adds resizing frame to window without adding titlebar - mainResizeable = booleanDefault ("mainResizeable", mainResizeable); - mainTitleBar = booleanDefault ("mainTitleBar", mainTitleBar); SpecialStyle |= WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_SYSMENU; if (mainResizeable) SpecialStyle |= WS_THICKFRAME; @@ -1166,6 +1166,12 @@ WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX; parentwin = &myroot; } + else if (strncmp (name, "local", 5) == 0 || strncmp (name, "map", 3) == 0) + { + s = name; + if (mainResizeable) + SpecialStyle = WS_THICKFRAME; + } else s = name; @@ -1960,6 +1966,57 @@ //Disable possibility to move internal windows GET_STRUCT_PTR; + // Adjust TWINSIDE and GWINSIDE + // Reinitialize whatever is necessary (so many things are created based on + // a fixed TWINSIDE) + // Redo critical windows + // Clear window + if (windowMove && (Window *) w != NULL && win->hwnd == ((Window *) w)->hwnd) + { + TWINSIDE = MAX(win->ClipRect.bottom, win->ClipRect.right); + + // Have to reinitialize SDB + SelectObject (localSDB->mem_dc, localSDB->old_bmp); + DeleteObject (localSDB->mem_bmp); + ReleaseDC (((Window *)localSDB->window)->hwnd, localSDB->win_dc); + DeleteDC (localSDB->mem_dc); + free (localSDB); + localSDB = W_InitSDB (w); + // and stars + free (stars); + initStars(); + + // All windows based on TWINSIDE are out of position now, but the team + // select/quit windows are now the wrong size too, so we need to redo them + for (i = 0; i < 4; i++) + { + W_UnmapWindow (teamWin[i]); + teamWin[i] = W_MakeWindow (teamshort[1 << i], i * (TWINSIDE / 5), TWINSIDE - (TWINSIDE / 5), + (TWINSIDE / 5), (TWINSIDE / 5), w, 1, foreColor); + } + W_UnmapWindow (qwin); + qwin = W_MakeWindow ("quit", 4 * (TWINSIDE / 5), TWINSIDE - (TWINSIDE / 5), (TWINSIDE / 5), + (TWINSIDE / 5), w, 1, foreColor); + + W_FastClear = 1; + if (viewBox) + redrawall = 1; + } + else if (windowMove && (Window *) mapw != NULL && win->hwnd == ((Window *) mapw)->hwnd) + { + GWINSIDE = MAX(win->ClipRect.bottom, win->ClipRect.right); + + // Have to reinitialize SDB + SelectObject (mapSDB->mem_dc, mapSDB->old_bmp); + DeleteObject (mapSDB->mem_bmp); + ReleaseDC (((Window *)mapSDB->window)->hwnd, mapSDB->win_dc); + DeleteDC (mapSDB->mem_dc); + free (mapSDB); + mapSDB = W_InitSDB (mapw); + + redrawall = 1; + } + /* this has to be the same as for WM_ENTERSIZEMOVE */ if (windowMove || (win->hwnd == ((Window *) baseWin)->hwnd) || Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.89 retrieving revision 1.90 diff -u -d -r1.89 -r1.90 --- local.c 7 Apr 2007 11:35:27 -0000 1.89 +++ local.c 9 Apr 2007 02:52:31 -0000 1.90 @@ -58,12 +58,6 @@ static int cloak_phases = 0; #endif -/* Background Stars Definitions */ -struct _star { - int s_x, s_y; - int s_color; -}; - static void redrawStarSector(int sectorx, int sectory); #define scaleLocal(pt) ((pt)/scaleFactor + (TWINSIDE/2)) @@ -73,8 +67,6 @@ /* Max range at which other's torps can be seen, used in scaling sound volume */ #define SOUND_MAXRANGE (int)(sqrt)(INFORANGE * INFORANGE/2) -static struct _star stars[10][10][16]; - /* Function Defininitions */ #ifdef SOUND @@ -130,11 +122,22 @@ initStars() { register int i, j, k; + int imax, jmax, kmax; + + imax = 5 * STARSIDE / TWINSIDE + 1; + if (imax > MAXSECTORS) + imax = MAXSECTORS; + jmax = 5 * STARSIDE / TWINSIDE + 1; + if (jmax > MAXSECTORS) + jmax = MAXSECTORS; + kmax = 16 * TWINSIDE / STARSIDE * TWINSIDE / STARSIDE; + if (kmax > MAXSTARS) + kmax = MAXSTARS; /* Star density: 16 stars per 20000 x 20000 galactic region */ - for (i = 0; i < (5 * STARSIDE / TWINSIDE + 1); i++) { - for (j = 0; j < (5 * STARSIDE / TWINSIDE + 1); j++) { - for (k = 0; k < (16 * (TWINSIDE / STARSIDE) * (TWINSIDE / STARSIDE)); k++) { + for (i = 0; i < imax; i++) { + for (j = 0; j < jmax; j++) { + for (k = 0; k < kmax; k++) { stars[i][j][k].s_x = RANDOM() % 20000 * TWINSIDE / STARSIDE; stars[i][j][k].s_y = RANDOM() % 20000 * TWINSIDE / STARSIDE; stars[i][j][k].s_color = randcolor(); @@ -147,8 +150,8 @@ void DrawStars() { - const int fullview = TWINSIDE * SCALE; - const int view = TWINSIDE * SCALE / 2; + int fullview = TWINSIDE * SCALE; + int view = TWINSIDE * SCALE / 2; /* note: cpp symbols in expressions (TWINSIDE*SCALE) will be precalculated by any C optimizer @@ -239,8 +242,8 @@ static void redrawStarSector (int sectorx, int sectory) { - const int fullview = TWINSIDE * SCALE; - const int view = TWINSIDE * SCALE / 2; + int fullview = TWINSIDE * SCALE; + int view = TWINSIDE * SCALE / 2; register int i, dx, dy, dxx, dyy; register int xbase = sectorx * fullview; register int ybase = sectory * fullview; @@ -300,7 +303,7 @@ } dxx = (int) (Cos[mydir] * streaklength / 10); dyy = (int) (Sin[mydir] * streaklength / 10); - for (i = 0, s = star_sector; i < (16 * (TWINSIDE / STARSIDE) * (TWINSIDE / STARSIDE)); i++, s++) + for (i = 0, s = star_sector; i < (16 * TWINSIDE / STARSIDE * TWINSIDE / STARSIDE); i++, s++) { if (s->s_x + xbase > GWIDTH || s->s_y + ybase > GWIDTH) continue; @@ -323,7 +326,7 @@ return; } } - for (i = 0, s = star_sector; i < (16 * (TWINSIDE / STARSIDE) * (TWINSIDE / STARSIDE)); i++, s++) + for (i = 0, s = star_sector; i < (16 * TWINSIDE / STARSIDE * TWINSIDE / STARSIDE); i++, s++) { if (s->s_x + xbase > GWIDTH || s->s_y + ybase > GWIDTH) continue; @@ -523,7 +526,7 @@ { register int dx, dy; register struct planet *l; - const int view = scaleFactor * TWINSIDE / 2 + BMP_PLANET_WIDTH * SCALE / 2; + int view = scaleFactor * TWINSIDE / 2 + BMP_PLANET_WIDTH * SCALE / 2; for (l = planets + MAXPLANETS - 1; l >= planets; --l) { @@ -704,7 +707,7 @@ int buflen = 1; static int ph_col = 0; static int scaled_ph_col = 0; - const int view = scaleFactor * TWINSIDE / 2 + BMP_SHIELD_WIDTH * SCALE / 2; + int view = scaleFactor * TWINSIDE / 2 + BMP_SHIELD_WIDTH * SCALE / 2; int dx, dy, px, py, wx, wy, tx, ty, lx, ly; int new_dx, new_dy; int startx, starty, endx, endy; @@ -1919,7 +1922,7 @@ int torpCount; int torpTeam; int frame; - const int view = scaleFactor * TWINSIDE / 2; + int view = scaleFactor * TWINSIDE / 2; for (t = torps, j = players; j != players + MAXPLAYER; t += MAXTORP, ++j) { @@ -2157,7 +2160,7 @@ { register struct plasmatorp *pt; register int dx, dy; - const int view = scaleFactor * TWINSIDE / 2; + int view = scaleFactor * TWINSIDE / 2; int ptorpTeam; int frame; @@ -2381,11 +2384,11 @@ { register struct player *j; register int dx, dy; - const int view = scaleFactor * TWINSIDE / 2; + int view = scaleFactor * TWINSIDE / 2; #ifdef HOCKEY_LINES register struct s_line *sl; - const int HALF_WINSIDE = TWINSIDE / 2; + int HALF_WINSIDE = TWINSIDE / 2; int ex, ey, sx, sy; #endif @@ -2459,10 +2462,10 @@ if ( infoRange && TWINSIDE > (INFORANGE * SCALE / scaleFactor) && !(me->p_x < 0 || me->p_x > GWIDTH)) { - const int LEFT = (TWINSIDE / 2) - (INFORANGE / 2) * SCALE / scaleFactor; - const int RIGHT = (TWINSIDE / 2) + (INFORANGE / 2) * SCALE / scaleFactor; - const int TOP = (TWINSIDE / 2) - (INFORANGE / 2) * SCALE / scaleFactor; - const int BOTTOM = (TWINSIDE / 2) + (INFORANGE / 2) * SCALE / scaleFactor; + int LEFT = (TWINSIDE / 2) - (INFORANGE / 2) * SCALE / scaleFactor; + int RIGHT = (TWINSIDE / 2) + (INFORANGE / 2) * SCALE / scaleFactor; + int TOP = (TWINSIDE / 2) - (INFORANGE / 2) * SCALE / scaleFactor; + int BOTTOM = (TWINSIDE / 2) + (INFORANGE / 2) * SCALE / scaleFactor; long dist; Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- defaults.c 7 Apr 2007 05:43:26 -0000 1.71 +++ defaults.c 9 Apr 2007 02:52:31 -0000 1.72 @@ -258,7 +258,7 @@ }, {"mainResizeable", &mainResizeable, RC_BOOL, { - "Make main window resizeable", + "Make main window + local/map windows resizeable", NULL } }, @@ -1673,6 +1673,8 @@ timerType = T_SHIP; doubleBuffering = booleanDefault ("doubleBuffering", doubleBuffering); + mainResizeable = booleanDefault ("mainResizeable", mainResizeable); + mainTitleBar = booleanDefault ("mainTitleBar", mainTitleBar); allowWheelActions = booleanDefault ("allowWheelActions", allowWheelActions); richText = booleanDefault ("richText", richText); newQuit = booleanDefault ("newQuit", newQuit); Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.80 retrieving revision 1.81 diff -u -d -r1.80 -r1.81 --- data.c 7 Apr 2007 05:17:38 -0000 1.80 +++ data.c 9 Apr 2007 02:52:31 -0000 1.81 @@ -31,6 +31,7 @@ struct message *messages; struct mctl *mctl; struct memory universe; +struct _star stars[MAXSECTORS][MAXSECTORS][MAXSTARS]; int TWINSIDE = 500; /* Size of tactical window */ int GWINSIDE = 500; /* Size of galactic window */ @@ -97,6 +98,7 @@ time_t rdelay = 0; /* time stamp for refitting */ time_t tdelay = 0; /* time stamp for T mode extension */ int showPlanetNames = 1; +int redrawall = 1; int autoQuit = 60; int showStats = 0; int showHints = 1; Index: map.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- map.c 8 Apr 2007 22:36:41 -0000 1.46 +++ map.c 9 Apr 2007 02:52:31 -0000 1.47 @@ -69,13 +69,10 @@ /* * Global Variables: * - * redrawall -- Erase and redraw the galactic? Must be true - * on first map() call. * redrawPlayer[] -- Flag for each player on whether their position * on the galactic is not out of date. */ -int redrawall = 1; unsigned char redrawPlayer[MAXPLAYER]; From modemhero at users.sourceforge.net Sun Apr 8 21:52:33 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 09 Apr 2007 02:52:33 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.161, 1.162 Message-ID: <20070409025242.243F01867FF@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv8621/resources/docs Modified Files: changes.txt Log Message: This patch adds the ability to resize local/map windows on the fly, and fixes some of the problems that came up while doing this. Added code to WM_EXITSIZEMOVE case in main windows proc, that handles changing TWINSIDE/GWINSIDE, reinitializing things that need it (such as SDB and star array), and changing critical window sizes that need to be redone (team select windows, quit window - both based on TWINSIDE). Netrekrc option mainResizeable now allows local/map to be resized too, giving these windows a WS_THICKFRAME border. Variable redrawall and struct stars are now globally defined. New defines to limit # of star sectors and # of stars in a sector. Fixed a bunch of places where view was statically defined, as TWINSIDE can now change during gameplay. Fixed a few places where rounding errors were occuring due to parentheses. Moved initialization of mainResizeable and mainTitleBar into defaults.c as defaults are now called before windows initialization. Fixed a few mistakes in the free resources routine for SDB. Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.161 retrieving revision 1.162 diff -u -d -r1.161 -r1.162 --- changes.txt 8 Apr 2007 22:36:41 -0000 1.161 +++ changes.txt 9 Apr 2007 02:52:31 -0000 1.162 @@ -1,4 +1,9 @@ Netrek XP 2006, Version 1.3: +- the mainResizeable netrekrc option now allows map/local to be resizeable via dragging + the window border, local/map will now adjust viewable area to match the new window + size. Some windows (team select, quit) will resize properly to match new local size, + others (position of options menu, dashboard, etc.) will not move. Interesting sidenote: + resizing local window will reinitialize background star positions. - fixed a bug with RCM kill messages when kills were higher than 255 but less than 320 - added new function keys, control-z and control-a, for zooming. Control-z zooms in, and control-a zooms out. As part of the benefit of having all graphics scale, ALL ship From modemhero at users.sourceforge.net Sun Apr 8 21:52:33 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 09 Apr 2007 02:52:33 +0000 Subject: [netrek-cvs] client/netrekxp/include data.h, 1.73, 1.74 defs.h, 1.20, 1.21 map.h, 1.1.1.1, 1.2 struct.h, 1.16, 1.17 Message-ID: <20070409025242.214D91867FA@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs16:/tmp/cvs-serv8621/include Modified Files: data.h defs.h map.h struct.h Log Message: This patch adds the ability to resize local/map windows on the fly, and fixes some of the problems that came up while doing this. Added code to WM_EXITSIZEMOVE case in main windows proc, that handles changing TWINSIDE/GWINSIDE, reinitializing things that need it (such as SDB and star array), and changing critical window sizes that need to be redone (team select windows, quit window - both based on TWINSIDE). Netrekrc option mainResizeable now allows local/map to be resized too, giving these windows a WS_THICKFRAME border. Variable redrawall and struct stars are now globally defined. New defines to limit # of star sectors and # of stars in a sector. Fixed a bunch of places where view was statically defined, as TWINSIDE can now change during gameplay. Fixed a few places where rounding errors were occuring due to parentheses. Moved initialization of mainResizeable and mainTitleBar into defaults.c as defaults are now called before windows initialization. Fixed a few mistakes in the free resources routine for SDB. Index: defs.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/defs.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- defs.h 7 Apr 2007 05:17:38 -0000 1.20 +++ defs.h 9 Apr 2007 02:52:30 -0000 1.21 @@ -73,6 +73,9 @@ /* At this range a player can be seen while visible (uncloaked) */ +#define MAXSECTORS 10 /* Max # of star sectors */ +#define MAXSTARS 100 /* Max # of stars in a sector */ + /* 6 minutes is maximum for autoquit -- anything more causes problems in the * server. (?) */ #define AUTOQUIT 9*60 /* auto logout in 5 minutes */ Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.73 retrieving revision 1.74 diff -u -d -r1.73 -r1.74 --- data.h 7 Apr 2007 05:17:38 -0000 1.73 +++ data.h 9 Apr 2007 02:52:30 -0000 1.74 @@ -47,6 +47,7 @@ extern struct ship shipvals[]; extern struct memory universe; extern struct planet pdata[]; +extern struct _star stars[MAXSECTORS][MAXSECTORS][MAXSTARS]; /* These used to be defines ... */ extern int TWINSIDE; @@ -636,6 +637,7 @@ DWORD InputThreadID; // Missing global variables +extern int redrawall; /* Erase and redraw the galactic? */ extern int autoQuit; extern int forceDisplay; Index: struct.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/struct.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- struct.h 4 Apr 2007 04:06:36 -0000 1.16 +++ struct.h 9 Apr 2007 02:52:30 -0000 1.17 @@ -7,6 +7,12 @@ #ifndef _h_struct #define _h_struct +/* Background Stars Definitions */ +struct _star { + int s_x, s_y; + int s_color; +}; + struct distress { unsigned char sender; Index: map.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/map.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- map.h 21 Jan 2003 21:27:54 -0000 1.1.1.1 +++ map.h 9 Apr 2007 02:52:30 -0000 1.2 @@ -15,12 +15,10 @@ /* * Global Variables: * - * redrawall -- Erase and redraw the galactic? * redrawPlayer[] -- Flag for each player on whether their position * on the galactic is not out of date. */ -extern int redrawall; extern unsigned char redrawPlayer[]; From modemhero at users.sourceforge.net Mon Apr 9 02:46:14 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 09 Apr 2007 07:46:14 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C,1.130,1.131 Message-ID: <20070409074623.977F9B402@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs16:/tmp/cvs-serv6737 Modified Files: NetrekXP to do list.C Log Message: Pop up box on bad version response due to setgame terminate. Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.130 retrieving revision 1.131 diff -u -d -r1.130 -r1.131 --- NetrekXP to do list.C 7 Apr 2007 11:58:39 -0000 1.130 +++ NetrekXP to do list.C 9 Apr 2007 07:46:09 -0000 1.131 @@ -28,7 +28,6 @@ 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) Pop-up dialog box for bad version response 5) Metaping on a Unknown server is causing unseemly delay due to threading. I believe this is fixed. 7) Some sort of click action on player list brings up a menu with settings for that @@ -47,6 +46,7 @@ 12) minor richtext issue with scrolling - extra line at the end 13) With expanded tactical ..can now see ships at galactic coordinates (-500,-500), if you fly into the NW corner of the galaxy. this was never anticipated! +14) make richtext windows moveable Stas's list: - two column and/or scrollable playerlist. From modemhero at users.sourceforge.net Mon Apr 9 02:46:14 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 09 Apr 2007 07:46:14 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.162, 1.163 Message-ID: <20070409074623.968401867E9@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv6737/resources/docs Modified Files: changes.txt Log Message: Pop up box on bad version response due to setgame terminate. Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.162 retrieving revision 1.163 diff -u -d -r1.162 -r1.163 --- changes.txt 9 Apr 2007 02:52:31 -0000 1.162 +++ changes.txt 9 Apr 2007 07:46:12 -0000 1.163 @@ -1,4 +1,6 @@ Netrek XP 2006, Version 1.3: +- now get a popup box when client receives a game shutdown message from server, indicating + that the game has been terminated and to try again later - the mainResizeable netrekrc option now allows map/local to be resizeable via dragging the window border, local/map will now adjust viewable area to match the new window size. Some windows (team select, quit) will resize properly to match new local size, From modemhero at users.sourceforge.net Mon Apr 9 02:46:15 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 09 Apr 2007 07:46:15 +0000 Subject: [netrek-cvs] client/netrekxp/src mswindow.c, 1.59, 1.60 socket.c, 1.27, 1.28 Message-ID: <20070409074624.733B21867E9@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv6737/src Modified Files: mswindow.c socket.c Log Message: Pop up box on bad version response due to setgame terminate. Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- mswindow.c 9 Apr 2007 02:52:31 -0000 1.59 +++ mswindow.c 9 Apr 2007 07:46:12 -0000 1.60 @@ -1983,7 +1983,6 @@ free (localSDB); localSDB = W_InitSDB (w); // and stars - free (stars); initStars(); // All windows based on TWINSIDE are out of position now, but the team Index: socket.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- socket.c 4 Apr 2007 10:34:22 -0000 1.27 +++ socket.c 9 Apr 2007 07:46:13 -0000 1.28 @@ -2164,6 +2164,7 @@ case 4: case 5: case 6: + MessageBox(NULL, "Sorry, but you cannot play netrek now.", "Try again later", MB_OK); LineToConsole ("Sorry, but you cannot play netrek now.\n"); LineToConsole ("Try again later.\n"); break; From modemhero at users.sourceforge.net Mon Apr 9 06:07:21 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 09 Apr 2007 11:07:21 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.163, 1.164 netrekrc, 1.56, 1.57 netrekxp.doc, 1.14, 1.15 Message-ID: <20070409110801.775D6B402@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv5270/resources/docs Modified Files: changes.txt netrekrc netrekxp.doc Log Message: This patch gets the in game save feature almost where it needs to be to allow the user to change all options in game and not have to edit the netrekrc. Other benefits are that placement of options in netrekrcs are consistent, duplicate entries are weeded out, and netrekrcs used from 1 client version to the next are standardized by the in game save function and brought up to date with the latest features. The default saveFile is now netrekrc (it was netrekrc.sav before) Fixed typo in printout of the path to the netrekrc during the save process. Added geometryDefault() function that acts like a stringDefault but for geometries. If the string is "auto" it ignores it. In game save function now always saves window geometries, currently it saves any auto or non-entry as "auto". Future enhancement would be to save values that changed from initial values. Removed some outdated beeplite features from the manual. Removed two beeplite cycle_time variables as being netrekrc options, as they were useless and had to be normalized to server update rate anyways to work right. The netrekrc save feature now saves ship specific keymaps/ckeymaps/buttonmaps/netrekrc, and observer/servertype specific options. Saving servernick options is not supported, but I doubt anyone uses those to begin with. The ' key (single quote) is now the default key for toggling on and off the expanded playerlist window Index: netrekrc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- netrekrc 7 Apr 2007 09:16:14 -0000 1.56 +++ netrekrc 9 Apr 2007 11:07:17 -0000 1.57 @@ -10,7 +10,7 @@ # 'q', you would put 'qs' in your keymap. Shields would still be mapped to # 's' as well as now being on 'q'. Adding a mapping doesn't delete the old # one. If you want shields on 'w' as well, put 'ws' in your keymap. If you -# had instead put 'wq', it would have mapped quit, the default action of 'q', +# had instead put 'wq', it would have mapped quit (the default action of 'q') # onto 'w'. keymap: PpW Zva%d_eyftg^jmnrpPrls3tfuwvDwsye d @@ -146,7 +146,7 @@ # Log all messages to file. Requires "logfile" option logging: off -# Make main window resizeable +# Make main window + local/map windows resizeable mainResizeable: on # Start main window with title bar on (can be toggled by alt+enter) @@ -546,6 +546,9 @@ # Sound directory sounddir: .\sounds +# Save file (for using in-game save feature) +saveFile: netrekrc + # Metacache file metaCache: metacache @@ -583,11 +586,11 @@ # Window placements section # Local and map windows MUST be square. Size can be adjusted. -# If sizing downwards, don't forget to remap any windows nested -# inside these windows, such as team select and quit windows. # Most windows will autoadjust to the right spot if local or -# map size are changed, so most window placements are commented -# out. Uncomment them if you wish to customize. +# map size are changed, so most window placements are autoset +# If you wish to customize, window geometry should be of the form +# 502x885+1+1, 502x885, or +1+1. The +1+1 indicates (x,y) point of +# top left corner of window, the 502x885 indicates width x height. netrek.parent: netrek netrek.geometry: 1024x768 @@ -599,104 +602,105 @@ map.geometry: 500x500 tstat.parent: netrek -#tstat.geometry: 504x42+0+506 +tstat.geometry: auto message.parent: netrek -#message.geometry: 504x20+506+506 +message.geometry: auto message.mapped: on warn.parent: netrek -#warn.geometry: 504x20+506+526 +warn.geometry: auto planet.parent: netrek -#planet.geometry: 57x43+516+10 +planet.geometry: auto planet.mapped: off rank.parent: netrek -#rank.geometry: 80x18+10+300 +rank.geometry: auto rank.mapped: off player.parent: netrek -#player.geometry: +0+550 +player.geometry: auto player.mapped: on player2.parent: netrek -#player2.geometry: +140+100 +player2.geometry: auto player2.mapped: off help.parent: netrek +help.geometry: auto help.mapped: off review_all.parent: netrek -#review_all.geometry: 81x5+506+660 +review_all.geometry: auto review_all.mapped: on review_team.parent: netrek -#review_team.geometry: 81x6+506+590 +review_team.geometry: auto review_team.mapped: on review_your.parent: netrek -#review_your.geometry: 81x3+506+550 +review_your.geometry: auto review_your.mapped: on review_kill.parent: netrek -#review_kill.geometry: 81x3+506+720 +review_kill.geometry: auto review_kill.mapped: on review_kill.allow: KP review_phaser.parent: netrek -#review_phaser.geometry: 81x4+506+750 +review_phaser.geometry: auto review_phaser.mapped: off review.parent: netrek -#review.geometry: 81x20+506+550 +review.geometry: auto review.mapped: off pingStats.parent: netrek -#pingStats.geometry: +500+4 +pingStats.geometry: auto pingStats.mapped: off UDP.parent: netrek -#UDP.geometry: +510+9 +UDP.geometry: auto UDP.mapped: off network.parent: netrek -#network.geometry: +510+9 +network.geometry: auto network.mapped: off DocWin.parent: netrek -#DocWin.geometry: 500x500+0+181 +DocWin.geometry: auto DocWin.mapped: off xtrekrcWin.parent: netrek -#xtrekrcWin.geometry: 500x500+0+200 +xtrekrcWin.geometry: auto xtrekrcWin.mapped: off fed.parent: local -#fed.geometry: 100x100+0+400 +fed.geometry: auto kli.parent: local -#kli.geometry: 100x100+200+400 +kli.geometry: auto ori.parent: local -#ori.geometry: 100x100+300+400 +ori.geometry: auto rom.parent: local -#rom.geometry: 100x100+100+400 +rom.geometry: auto quit.parent: local -#quit.geometry: 100x100+400+400 +quit.geometry: auto stats.parent: netrek -#stats.geometry: 100x80+406+506 +stats.geometry: auto stats.mapped: off war.parent: netrek -#war.geometry: 20x6+510+9 +war.geometry: auto war.mapped: off sound.parent: netrek -#sound.geometry: +520+9 +sound.geometry: auto sound.mapped: off @@ -1078,3 +1082,7 @@ msg.destroy: %N->%Z %N destroyed by %i (%T%c) msg.take: %N->%O %N taken by %i (%T%c) msg.ghostbust: GOD->ALL %i (%S) (%T%c) was kill %k for the GhostBusters + +# Esoteric features such as individual ship rcfiles/keymaps +# /ckeymaps/buttonmaps, and observer/servernick/servertype +# options (i.e. keymap.bronco: ) \ No newline at end of file Index: netrekxp.doc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekxp.doc,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- netrekxp.doc 19 Mar 2007 19:59:43 -0000 1.14 +++ netrekxp.doc 9 Apr 2007 11:07:18 -0000 1.15 @@ -1112,11 +1112,6 @@ Additional defaults: -planetCycleTime: highlighting time for planets -playerCycleTime: highlighting time for players - -tts_color: color of TTS message (should be dark) -tts_font: Font (large prefered) tts_max_len: Max length of a message tts_time: Time a TTS message is displayed tts_ypos: y location of the TTS message Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.163 retrieving revision 1.164 diff -u -d -r1.163 -r1.164 --- changes.txt 9 Apr 2007 07:46:12 -0000 1.163 +++ changes.txt 9 Apr 2007 11:07:17 -0000 1.164 @@ -1,4 +1,17 @@ Netrek XP 2006, Version 1.3: +- working on getting window placements and sizes to save with the in-game save key, + For the most part you the user will never need to manually edit the netrekrc again, + well maybe for changing login name or making macros. +- new netrekrc option "saveFile: name" to control what filename you write to when you + save your options in game (either with " key or via the save menu). Default is now + netrekrc, so that means if you save in-game, it will overwrite your netrekrc with + your current settings (I have a feeling the benefits of this strongly outweigh the + negatives such as mistakenly remapping things then mistakenly saving your netrekrc) +- the netrekrc save feature now saves ship specific keymaps/ckeymaps/buttonmaps/netrekrc, + and observer/servertype specific options. Saving servernick options is not supported, + but I doubt anyone uses those to begin with. +- the ' key (single quote) is now the default key for toggling on and off the expanded + playerlist window - now get a popup box when client receives a game shutdown message from server, indicating that the game has been terminated and to try again later - the mainResizeable netrekrc option now allows map/local to be resizeable via dragging From modemhero at users.sourceforge.net Mon Apr 9 06:07:19 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 09 Apr 2007 11:07:19 +0000 Subject: [netrek-cvs] client/netrekxp/include proto.h,1.46,1.47 Message-ID: <20070409110759.5627AB402@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs16:/tmp/cvs-serv5270/include Modified Files: proto.h Log Message: This patch gets the in game save feature almost where it needs to be to allow the user to change all options in game and not have to edit the netrekrc. Other benefits are that placement of options in netrekrcs are consistent, duplicate entries are weeded out, and netrekrcs used from 1 client version to the next are standardized by the in game save function and brought up to date with the latest features. The default saveFile is now netrekrc (it was netrekrc.sav before) Fixed typo in printout of the path to the netrekrc during the save process. Added geometryDefault() function that acts like a stringDefault but for geometries. If the string is "auto" it ignores it. In game save function now always saves window geometries, currently it saves any auto or non-entry as "auto". Future enhancement would be to save values that changed from initial values. Removed some outdated beeplite features from the manual. Removed two beeplite cycle_time variables as being netrekrc options, as they were useless and had to be normalized to server update rate anyways to work right. The netrekrc save feature now saves ship specific keymaps/ckeymaps/buttonmaps/netrekrc, and observer/servertype specific options. Saving servernick options is not supported, but I doubt anyone uses those to begin with. The ' key (single quote) is now the default key for toggling on and off the expanded playerlist window Index: proto.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/proto.h,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- proto.h 7 Apr 2007 05:17:38 -0000 1.46 +++ proto.h 9 Apr 2007 11:07:17 -0000 1.47 @@ -105,6 +105,7 @@ int booleanDefault (char *def, int preferred); int intDefault (char *def, int preferred); char *stringDefault (char *str); +char *geometryDefault (char *str); int findDefaults (char *deffile, char *file); void resetdefaults (void); void shipchange (int type); From modemhero at users.sourceforge.net Mon Apr 9 06:07:19 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 09 Apr 2007 11:07:19 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C,1.131,1.132 Message-ID: <20070409110759.B22651867ED@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs16:/tmp/cvs-serv5270 Modified Files: NetrekXP to do list.C Log Message: This patch gets the in game save feature almost where it needs to be to allow the user to change all options in game and not have to edit the netrekrc. Other benefits are that placement of options in netrekrcs are consistent, duplicate entries are weeded out, and netrekrcs used from 1 client version to the next are standardized by the in game save function and brought up to date with the latest features. The default saveFile is now netrekrc (it was netrekrc.sav before) Fixed typo in printout of the path to the netrekrc during the save process. Added geometryDefault() function that acts like a stringDefault but for geometries. If the string is "auto" it ignores it. In game save function now always saves window geometries, currently it saves any auto or non-entry as "auto". Future enhancement would be to save values that changed from initial values. Removed some outdated beeplite features from the manual. Removed two beeplite cycle_time variables as being netrekrc options, as they were useless and had to be normalized to server update rate anyways to work right. The netrekrc save feature now saves ship specific keymaps/ckeymaps/buttonmaps/netrekrc, and observer/servertype specific options. Saving servernick options is not supported, but I doubt anyone uses those to begin with. The ' key (single quote) is now the default key for toggling on and off the expanded playerlist window Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.131 retrieving revision 1.132 diff -u -d -r1.131 -r1.132 --- NetrekXP to do list.C 9 Apr 2007 07:46:09 -0000 1.131 +++ NetrekXP to do list.C 9 Apr 2007 11:07:14 -0000 1.132 @@ -1,4 +1,4 @@ -List for the netrekrc/installer: +List for the installer: 1) there should be some sort of chance to give default resolution in GUI, which then maps windows accordingly. 2) fix netrekrc append so that it doesn't keep adding new lines to the netrekrc @@ -26,7 +26,6 @@ Things to do: 1) resizeable message windows. Perhaps memory of window positions if you choose 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. 5) Metaping on a Unknown server is causing unseemly delay due to threading. I believe this is fixed. From modemhero at users.sourceforge.net Mon Apr 9 06:07:22 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 09 Apr 2007 11:07:22 +0000 Subject: [netrek-cvs] client/netrekxp/src defaults.c, 1.72, 1.73 input.c, 1.34, 1.35 mswindow.c, 1.60, 1.61 Message-ID: <20070409110740.59E98B402@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv5270/src Modified Files: defaults.c input.c mswindow.c Log Message: This patch gets the in game save feature almost where it needs to be to allow the user to change all options in game and not have to edit the netrekrc. Other benefits are that placement of options in netrekrcs are consistent, duplicate entries are weeded out, and netrekrcs used from 1 client version to the next are standardized by the in game save function and brought up to date with the latest features. The default saveFile is now netrekrc (it was netrekrc.sav before) Fixed typo in printout of the path to the netrekrc during the save process. Added geometryDefault() function that acts like a stringDefault but for geometries. If the string is "auto" it ignores it. In game save function now always saves window geometries, currently it saves any auto or non-entry as "auto". Future enhancement would be to save values that changed from initial values. Removed some outdated beeplite features from the manual. Removed two beeplite cycle_time variables as being netrekrc options, as they were useless and had to be normalized to server update rate anyways to work right. The netrekrc save feature now saves ship specific keymaps/ckeymaps/buttonmaps/netrekrc, and observer/servertype specific options. Saving servernick options is not supported, but I doubt anyone uses those to begin with. The ' key (single quote) is now the default key for toggling on and off the expanded playerlist window Index: input.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/input.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- input.c 7 Apr 2007 11:35:27 -0000 1.34 +++ input.c 9 Apr 2007 11:07:20 -0000 1.35 @@ -2259,7 +2259,10 @@ void Key39 (void) { - emptyKey (); + if (W_IsMapped (playerw2)) + W_UnmapWindow (playerw2); + else + W_MapWindow (playerw2); } /******************************************************************************/ @@ -2567,12 +2570,6 @@ Key65 (W_Event * data) { emptyKey (); -/* - if (W_IsMapped (playerw2)) - W_UnmapWindow (playerw2); - else - W_MapWindow (playerw2); -*/ } /******************************************************************************/ Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- mswindow.c 9 Apr 2007 07:46:12 -0000 1.60 +++ mswindow.c 9 Apr 2007 11:07:20 -0000 1.61 @@ -4886,7 +4886,7 @@ int result = 0; sprintf (buf, "%s.geometry", name); - geom_default = stringDefault (buf); + geom_default = geometryDefault (buf); if (!geom_default) return 0; /* nothing set */ s = geom_default; Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.72 retrieving revision 1.73 diff -u -d -r1.72 -r1.73 --- defaults.c 9 Apr 2007 02:52:31 -0000 1.72 +++ defaults.c 9 Apr 2007 11:07:19 -0000 1.73 @@ -1460,7 +1460,7 @@ getServerNick (char *srvName) { struct stringlist *sl; - char *tmpServerNick; + char *tmpServerNick; sl = defaults; while (sl != NULL) @@ -1573,6 +1573,21 @@ return (NULL); } +/******************************************************************************/ +/*** geometryDefault() ***/ +/******************************************************************************/ +char * +geometryDefault (char *def) +{ + char *str; + + str = getdefault (def); + + if (str && strcmpi(str, "auto") != 0) + return strdup (str); + else + return (NULL); +} /******************************************************************************/ /*** booleanDefault() ***/ @@ -1886,15 +1901,10 @@ #ifdef BEEPLITE defLite = booleanDefault("defLite", defLite); useLite = booleanDefault("useLite", useLite); - + if (defLite) litedefaults(); - - beep_lite_cycle_time_planet = - intDefault("planetCycleTime", beep_lite_cycle_time_planet); - beep_lite_cycle_time_player = - intDefault("playerCycleTime", beep_lite_cycle_time_player); - + tts_time = intDefault("tts_time", tts_time); tts_max_len = intDefault("tts_max_len", tts_max_len); tts_ypos = intDefault("tts_ypos", TWINSIDE / 2 - 16); @@ -2099,9 +2109,11 @@ struct save_options *so; struct dmacro_list *dm; unsigned int i; + int j; unsigned char c; char *adefault; char macroKey[3] = ""; + struct stringlist *sl; if (!saveFile) saveFile = stringDefault ("saveFile"); @@ -2118,7 +2130,7 @@ if (exe_dir[len - 1] == '/' || exe_dir[len - 1] == '\\') sprintf (save_file, "%s%s", exe_dir, saveFile); else - sprintf (save_file, "%s/%s", exe_dir, saveFile); + sprintf (save_file, "%s\\%s", exe_dir, saveFile); } fp = fopen (save_file, "w+"); @@ -2185,7 +2197,7 @@ 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 ("# 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) @@ -2333,6 +2345,16 @@ } #endif + // savefile + if (saveFile != NULL) + { + if (saveBig) + fputs ("# Save file (for using in-game save feature)\n", fp); + sprintf (str, "saveFile: %s\n", saveFile); + fputs (str, fp); + if (saveBig) + fputs ("\n", fp); + } // metacache if (metaCache != NULL) { @@ -2403,11 +2425,11 @@ { fputs ("# Window placements section\n", fp); fputs ("# Local and map windows MUST be square. Size can be adjusted.\n", fp); - fputs ("# If sizing downwards, don't forget to remap any windows nested\n", fp); - fputs ("# inside these windows, such as team select and quit windows.\n", fp); fputs ("# Most windows will autoadjust to the right spot if local or\n", fp); - fputs ("# map size are changed, so most window placements are commented\n", fp); - fputs ("# out. Uncomment them if you wish to customize.\n", fp); + fputs ("# map size are changed, so most window placements are autoset\n", fp); + fputs ("# If you wish to customize, window geometry should be of the form\n", fp); + fputs ("# 502x885+1+1, 502x885, or +1+1. The +1+1 indicates (x,y) point of\n", fp); + fputs ("# top left corner of window, the 502x885 indicates width x height.\n", fp); fputs ("\n", fp); } @@ -2417,11 +2439,10 @@ sprintf (str, "netrek.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("netrek.geometry")) != NULL) - { - sprintf (str, "netrek.geometry: %s\n", adefault); - fputs (str, fp); - } + adefault = geometryDefault ("netrek.geometry"); + sprintf (str, "netrek.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); fputs ("\n", fp); // Local window - always mapped @@ -2430,11 +2451,10 @@ sprintf (str, "local.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("local.geometry")) != NULL) - { - sprintf (str, "local.geometry: %s\n", adefault); - fputs (str, fp); - } + adefault = geometryDefault ("local.geometry"); + sprintf (str, "local.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); fputs ("\n", fp); // Map window - always mapped @@ -2443,11 +2463,10 @@ sprintf (str, "map.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("map.geometry")) != NULL) - { - sprintf (str, "map.geometry: %s\n", adefault); - fputs (str, fp); - } + adefault = geometryDefault ("map.geometry"); + sprintf (str, "map.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); fputs ("\n", fp); // Dashboard window - always mapped @@ -2456,11 +2475,10 @@ sprintf (str, "tstat.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("tstat.geometry")) != NULL) - { - sprintf (str, "tstat.geometry: %s\n", adefault); - fputs (str, fp); - } + adefault = geometryDefault ("tstat.geometry"); + sprintf (str, "tstat.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); fputs ("\n", fp); // Message window - preferred mapped @@ -2469,15 +2487,12 @@ sprintf (str, "message.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("message.geometry")) != NULL) - { - sprintf (str, "message.geometry: %s\n", adefault); - fputs (str, fp); - } - if (booleanDefault ("message.mapped", 1)) - sprintf (str, "message.mapped: on\n"); - else - sprintf (str, "message.mapped: off\n"); + adefault = geometryDefault ("message.geometry"); + sprintf (str, "message.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); + sprintf (str, "message.mapped: %s\n", + booleanDefault ("message.mapped", 1) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); @@ -2487,11 +2502,10 @@ sprintf (str, "warn.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("warn.geometry")) != NULL) - { - sprintf (str, "warn.geometry: %s\n", adefault); - fputs (str, fp); - } + adefault = geometryDefault ("warn.geometry"); + sprintf (str, "warn.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); fputs ("\n", fp); // Planet window @@ -2500,15 +2514,12 @@ sprintf (str, "planet.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("planet.geometry")) != NULL) - { - sprintf (str, "planet.geometry: %s\n", adefault); - fputs (str, fp); - } - if (booleanDefault ("planet.mapped", 0)) - sprintf (str, "planet.mapped: on\n"); - else - sprintf (str, "planet.mapped: off\n"); + adefault = geometryDefault ("planet.geometry"); + sprintf (str, "planet.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); + sprintf (str, "planet.mapped: %s\n", + booleanDefault ("planet.mapped", 0) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); @@ -2518,15 +2529,12 @@ sprintf (str, "rank.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("rank.geometry")) != NULL) - { - sprintf (str, "rank.geometry: %s\n", adefault); - fputs (str, fp); - } - if (booleanDefault ("rank.mapped", 0)) - sprintf (str, "rank.mapped: on\n"); - else - sprintf (str, "rank.mapped: off\n"); + adefault = geometryDefault ("rank.geometry"); + sprintf (str, "rank.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); + sprintf (str, "rank.mapped: %s\n", + booleanDefault ("rank.mapped", 0) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); @@ -2536,15 +2544,12 @@ sprintf (str, "player.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("player.geometry")) != NULL) - { - sprintf (str, "player.geometry: %s\n", adefault); - fputs (str, fp); - } - if (booleanDefault ("player.mapped", 1)) - sprintf (str, "player.mapped: on\n"); - else - sprintf (str, "player.mapped: off\n"); + adefault = geometryDefault ("player.geometry"); + sprintf (str, "player.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); + sprintf (str, "player.mapped: %s\n", + booleanDefault ("player.mapped", 1) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); @@ -2554,15 +2559,12 @@ sprintf (str, "player2.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("player2.geometry")) != NULL) - { - sprintf (str, "player2.geometry: %s\n", adefault); - fputs (str, fp); - } - if (booleanDefault ("player2.mapped", 0)) - sprintf (str, "player2.mapped: on\n"); - else - sprintf (str, "player2.mapped: off\n"); + adefault = geometryDefault ("player2.geometry"); + sprintf (str, "player2.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); + sprintf (str, "player2.mapped: %s\n", + booleanDefault ("player2.mapped", 0) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); @@ -2572,15 +2574,12 @@ sprintf (str, "help.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("help.geometry")) != NULL) - { - sprintf (str, "help.geometry: %s\n", adefault); - fputs (str, fp); - } - if (booleanDefault ("help.mapped", 0)) - sprintf (str, "help.mapped: on\n"); - else - sprintf (str, "help.mapped: off\n"); + adefault = geometryDefault ("help.geometry"); + sprintf (str, "help.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); + sprintf (str, "help.mapped: %s\n", + booleanDefault ("help.mapped", 0) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); @@ -2590,15 +2589,12 @@ sprintf (str, "review_all.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("review_all.geometry")) != NULL) - { - sprintf (str, "review_all.geometry: %s\n", adefault); - fputs (str, fp); - } - if (booleanDefault ("review_all.mapped", 0)) - sprintf (str, "review_all.mapped: on\n"); - else - sprintf (str, "review_all.mapped: off\n"); + adefault = geometryDefault ("review_all.geometry"); + sprintf (str, "review_all.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); + sprintf (str, "review_all.mapped: %s\n", + booleanDefault ("review_all.mapped", 0) ? "on" : "off"); fputs (str, fp); if ((adefault = stringDefault ("review_all.allow")) != NULL) { @@ -2613,15 +2609,12 @@ sprintf (str, "review_team.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("review_team.geometry")) != NULL) - { - sprintf (str, "review_team.geometry: %s\n", adefault); - fputs (str, fp); - } - if (booleanDefault ("review_team.mapped", 0)) - sprintf (str, "review_team.mapped: on\n"); - else - sprintf (str, "review_team.mapped: off\n"); + adefault = geometryDefault ("review_team.geometry"); + sprintf (str, "review_team.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); + sprintf (str, "review_team.mapped: %s\n", + booleanDefault ("review_team.mapped", 0) ? "on" : "off"); fputs (str, fp); if ((adefault = stringDefault ("review_team.allow")) != NULL) { @@ -2636,15 +2629,12 @@ sprintf (str, "review_your.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("review_your.geometry")) != NULL) - { - sprintf (str, "review_your.geometry: %s\n", adefault); - fputs (str, fp); - } - if (booleanDefault ("review_your.mapped", 0)) - sprintf (str, "review_your.mapped: on\n"); - else - sprintf (str, "review_your.mapped: off\n"); + adefault = geometryDefault ("review_your.geometry"); + sprintf (str, "review_your.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); + sprintf (str, "review_your.mapped: %s\n", + booleanDefault ("review_your.mapped", 0) ? "on" : "off"); fputs (str, fp); if ((adefault = stringDefault ("review_your.allow")) != NULL) { @@ -2659,15 +2649,12 @@ sprintf (str, "review_kill.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("review_kill.geometry")) != NULL) - { - sprintf (str, "review_kill.geometry: %s\n", adefault); - fputs (str, fp); - } - if (booleanDefault ("review_kill.mapped", 0)) - sprintf (str, "review_kill.mapped: on\n"); - else - sprintf (str, "review_kill.mapped: off\n"); + adefault = geometryDefault ("review_kill.geometry"); + sprintf (str, "review_kill.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); + sprintf (str, "review_kill.mapped: %s\n", + booleanDefault ("review_kill.mapped", 0) ? "on" : "off"); fputs (str, fp); if ((adefault = stringDefault ("review_kill.allow")) != NULL) { @@ -2682,15 +2669,12 @@ sprintf (str, "review_phaser.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("review_phaser.geometry")) != NULL) - { - sprintf (str, "review_phaser.geometry: %s\n", adefault); - fputs (str, fp); - } - if (booleanDefault ("review_phaser.mapped", 0)) - sprintf (str, "review_phaser.mapped: on\n"); - else - sprintf (str, "review_phaser.mapped: off\n"); + adefault = geometryDefault ("review_phaser.geometry"); + sprintf (str, "review_phaser.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); + sprintf (str, "review_phaser.mapped: %s\n", + booleanDefault ("review_phaser.mapped", 0) ? "on" : "off"); fputs (str, fp); if ((adefault = stringDefault ("review_phaser.allow")) != NULL) { @@ -2705,15 +2689,12 @@ sprintf (str, "review.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("review.geometry")) != NULL) - { - sprintf (str, "review.geometry: %s\n", adefault); - fputs (str, fp); - } - if (booleanDefault ("review.mapped", 1)) - sprintf (str, "review.mapped: on\n"); - else - sprintf (str, "review.mapped: off\n"); + adefault = geometryDefault ("review.geometry"); + sprintf (str, "review.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); + sprintf (str, "review.mapped: %s\n", + booleanDefault ("review.mapped", 1) ? "on" : "off"); fputs (str, fp); if ((adefault = stringDefault ("review.allow")) != NULL) { @@ -2728,15 +2709,12 @@ sprintf (str, "pingStats.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("pingStats.geometry")) != NULL) - { - sprintf (str, "pingStats.geometry: %s\n", adefault); - fputs (str, fp); - } - if (booleanDefault ("pingStats.mapped", 0)) - sprintf (str, "pingStats.mapped: on\n"); - else - sprintf (str, "pingStats.mapped: off\n"); + adefault = geometryDefault ("pingStats.geometry"); + sprintf (str, "pingStats.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); + sprintf (str, "pingStats.mapped: %s\n", + booleanDefault ("pingStats.mapped", 0) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); @@ -2746,15 +2724,12 @@ sprintf (str, "UDP.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("UDP.geometry")) != NULL) - { - sprintf (str, "UDP.geometry: %s\n", adefault); - fputs (str, fp); - } - if (booleanDefault ("UDP.mapped", 0)) - sprintf (str, "UDP.mapped: on\n"); - else - sprintf (str, "UDP.mapped: off\n"); + adefault = geometryDefault ("UDP.geometry"); + sprintf (str, "UDP.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); + sprintf (str, "UDP.mapped: %s\n", + booleanDefault ("UDP.mapped", 0) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); @@ -2765,15 +2740,12 @@ sprintf (str, "network.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("network.geometry")) != NULL) - { - sprintf (str, "network.geometry: %s\n", adefault); - fputs (str, fp); - } - if (booleanDefault ("network.mapped", 0)) - sprintf (str, "network.mapped: on\n"); - else - sprintf (str, "network.mapped: off\n"); + adefault = geometryDefault ("network.geometry"); + sprintf (str, "network.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); + sprintf (str, "network.mapped: %s\n", + booleanDefault ("network.mapped", 0) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); #endif @@ -2785,15 +2757,12 @@ sprintf (str, "tools.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("tools.geometry")) != NULL) - { - sprintf (str, "tools.geometry: %s\n", adefault); - fputs (str, fp); - } - if (booleanDefault ("tools.mapped", 0)) - sprintf (str, "tools.mapped: on\n"); - else - sprintf (str, "tools.mapped: off\n"); + adefault = geometryDefault ("tools.geometry"); + sprintf (str, "tools.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); + sprintf (str, "tools.mapped: %s\n", + booleanDefault ("tools.mapped", 0) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); #endif @@ -2805,15 +2774,12 @@ sprintf (str, "xtrekrc_help.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("xtrekrc_help.geometry")) != NULL) - { - sprintf (str, "xtrekrc_help.geometry: %s\n", adefault); - fputs (str, fp); - } - if (booleanDefault ("xtrekrc_help.mapped", 0)) - sprintf (str, "xtrekrc_help.mapped: on\n"); - else - sprintf (str, "xtrekrc_help.mapped: off\n"); + adefault = geometryDefault ("xtrekrc_help.geometry"); + sprintf (str, "xtrekrc_help.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); + sprintf (str, "xtrekrc_help.mapped: %s\n", + booleanDefault ("xtrekrc_help.mapped", 0) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); #endif @@ -2825,15 +2791,12 @@ sprintf (str, "DocWin.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("DocWin.geometry")) != NULL) - { - sprintf (str, "DocWin.geometry: %s\n", adefault); - fputs (str, fp); - } - if (booleanDefault ("DocWin.mapped", 0)) - sprintf (str, "DocWin.mapped: on\n"); - else - sprintf (str, "DocWin.mapped: off\n"); + adefault = geometryDefault ("DocWin.geometry"); + sprintf (str, "DocWin.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); + sprintf (str, "DocWin.mapped: %s\n", + booleanDefault ("DocWin.mapped", 0) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); @@ -2843,15 +2806,12 @@ sprintf (str, "xtrekrcWin.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("xtrekrcWin.geometry")) != NULL) - { - sprintf (str, "xtrekrcWin.geometry: %s\n", adefault); - fputs (str, fp); - } - if (booleanDefault ("xtrekrcWin.mapped", 0)) - sprintf (str, "xtrekrcWin.mapped: on\n"); - else - sprintf (str, "xtrekrcWin.mapped: off\n"); + adefault = geometryDefault ("xtrekrcWin.geometry"); + sprintf (str, "xtrekrcWin.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); + sprintf (str, "xtrekrcWin.mapped: %s\n", + booleanDefault ("xtrekrcWin.mapped", 0) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); #endif @@ -2862,11 +2822,10 @@ sprintf (str, "fed.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("fed.geometry")) != NULL) - { - sprintf (str, "fed.geometry: %s\n", adefault); - fputs (str, fp); - } + adefault = geometryDefault ("fed.geometry"); + sprintf (str, "fed.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); fputs ("\n", fp); // Kli team window - always mapped @@ -2875,11 +2834,10 @@ sprintf (str, "kli.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("kli.geometry")) != NULL) - { - sprintf (str, "kli.geometry: %s\n", adefault); - fputs (str, fp); - } + adefault = geometryDefault ("kli.geometry"); + sprintf (str, "kli.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); fputs ("\n", fp); // Ori team window - always mapped @@ -2888,11 +2846,10 @@ sprintf (str, "ori.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("ori.geometry")) != NULL) - { - sprintf (str, "ori.geometry: %s\n", adefault); - fputs (str, fp); - } + adefault = geometryDefault ("ori.geometry"); + sprintf (str, "ori.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); fputs ("\n", fp); // Rom team window - always mapped @@ -2901,11 +2858,10 @@ sprintf (str, "rom.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("rom.geometry")) != NULL) - { - sprintf (str, "rom.geometry: %s\n", adefault); - fputs (str, fp); - } + adefault = geometryDefault ("rom.geometry"); + sprintf (str, "rom.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); fputs ("\n", fp); // Quit window - always mapped @@ -2914,11 +2870,10 @@ sprintf (str, "quit.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("quit.geometry")) != NULL) - { - sprintf (str, "quit.geometry: %s\n", adefault); - fputs (str, fp); - } + adefault = geometryDefault ("quit.geometry"); + sprintf (str, "quit.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); fputs ("\n", fp); // Stats window @@ -2927,15 +2882,12 @@ sprintf (str, "stats.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("stats.geometry")) != NULL) - { - sprintf (str, "stats.geometry: %s\n", adefault); - fputs (str, fp); - } - if (booleanDefault ("stats.mapped", 0)) - sprintf (str, "stats.mapped: on\n"); - else - sprintf (str, "stats.mapped: off\n"); + adefault = geometryDefault ("stats.geometry"); + sprintf (str, "stats.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); + sprintf (str, "stats.mapped: %s\n", + booleanDefault ("stats.mapped", 0) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); @@ -2945,15 +2897,12 @@ sprintf (str, "war.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("war.geometry")) != NULL) - { - sprintf (str, "war.geometry: %s\n", adefault); - fputs (str, fp); - } - if (booleanDefault ("war.mapped", 0)) - sprintf (str, "war.mapped: on\n"); - else - sprintf (str, "war.mapped: off\n"); + adefault = geometryDefault ("war.geometry"); + sprintf (str, "war.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); + sprintf (str, "war.mapped: %s\n", + booleanDefault ("war.mapped", 0) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); @@ -2963,15 +2912,12 @@ sprintf (str, "sound.parent: %s\n", adefault); fputs (str, fp); } - if ((adefault = stringDefault ("sound.geometry")) != NULL) - { - sprintf (str, "sound.geometry: %s\n", adefault); - fputs (str, fp); - } - if (booleanDefault ("sound.mapped", 0)) - sprintf (str, "sound.mapped: on\n"); - else - sprintf (str, "sound.mapped: off\n"); + adefault = geometryDefault ("sound.geometry"); + sprintf (str, "sound.geometry: %s\n", + (adefault != NULL) ? adefault : "auto"); + fputs (str, fp); + sprintf (str, "sound.mapped: %s\n", + booleanDefault ("sound.mapped", 0) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); @@ -3341,8 +3287,81 @@ sprintf (str, "msg.%s: %s\n", dm->name, dm->macro); fputs (str, fp); } + fputs ("\n", fp); + + if (saveBig) + fputs ("\n", fp); } #endif + if (saveBig) + { + fputs ("# Esoteric features such as individual ship rcfiles/keymaps\n", fp); + fputs ("# /ckeymaps/buttonmaps (i.e. keymap-ca: ) and observer\n", fp); + fputs ("# /servertype options (i.e. keymap.bronco: )\n", fp); + } + // Individual ship type settings + for (j = NUM_TYPES; j >= 0; j--) + { + STRNCPY (str1, "rcfile-", 8); + strcat (str1, shipdefaults[j].name); + adefault = stringDefault (str1); + if (adefault != NULL) + { + sprintf (str, "%s: %s\n", str1, adefault); + fputs (str, fp); + } + + + STRNCPY (str1, "keymap-", 8); + strcat (str1, shipdefaults[j].name); + adefault = stringDefault (str1); + if (adefault != NULL) + { + sprintf (str, "%s: %s\n", str1, adefault); + fputs (str, fp); + } + + STRNCPY (str1, "ckeymap-", 9); + strcat (str1, shipdefaults[j].name); + adefault = stringDefault (str1); + if (adefault != NULL) + { + sprintf (str, "%s: %s\n", str1, adefault); + fputs (str, fp); + } + + STRNCPY (str1, "buttonmap-", 11); + strcat (str1, shipdefaults[j].name); + adefault = stringDefault (str1); + if (adefault != NULL) + { + sprintf (str, "%s: %s\n", str1, adefault); + fputs (str, fp); + } + } + if (saveBig) + fputs ("\n", fp); + + // Servername/nick/observer settings + sl = defaults; + while (sl != NULL) + { + if (strstr (sl->string, ".observer") + || strstr (sl->string, ".paradise") + || strstr (sl->string, ".bronco") + || strstr (sl->string, ".chaos") + || strstr (sl->string, ".inl") + || strstr (sl->string, ".sturgeon") + || strstr (sl->string, ".hockey") + || strstr (sl->string, ".dogfight") + || strstr (sl->string, ".unknown")) + { + sprintf (str, "%s: %s\n", sl->string, sl->value); + fputs (str, fp); + } + sl = sl->next; + } + fclose (fp); } \ No newline at end of file From modemhero at users.sourceforge.net Mon Apr 9 06:31:38 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 09 Apr 2007 11:31:38 +0000 Subject: [netrek-cvs] client/netrekxp/src defaults.c,1.73,1.74 Message-ID: <20070409113147.026BB1867F1@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv26225/src Modified Files: defaults.c Log Message: Ckeymaps now save. Minor blank-line fixes. Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.73 retrieving revision 1.74 diff -u -d -r1.73 -r1.74 --- defaults.c 9 Apr 2007 11:07:19 -0000 1.73 +++ defaults.c 9 Apr 2007 11:31:36 -0000 1.74 @@ -2210,6 +2210,18 @@ if (saveBig && strlen (str) != 0) fputs ("\n", fp); + // Ckeymap + if (saveBig && (adefault = stringDefault ("ckeymap")) != 0) + fputs ("# Control-key key mapping\n", fp); + + if (adefault) + { + sprintf (str, "ckeymap: %s\n", adefault); + fputs (str, fp); + } + if (saveBig && adefault) + fputs ("\n", fp); + // Let's print buttonmap str[0] = '\0'; str1[0] = '\0'; @@ -3340,8 +3352,6 @@ fputs (str, fp); } } - if (saveBig) - fputs ("\n", fp); // Servername/nick/observer settings sl = defaults; From modemhero at users.sourceforge.net Mon Apr 9 06:31:38 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 09 Apr 2007 11:31:38 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.164, 1.165 netrekrc, 1.57, 1.58 Message-ID: <20070409113147.045F81867FA@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv26225/resources/docs Modified Files: changes.txt netrekrc Log Message: Ckeymaps now save. Minor blank-line fixes. Index: netrekrc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- netrekrc 9 Apr 2007 11:07:17 -0000 1.57 +++ netrekrc 9 Apr 2007 11:31:35 -0000 1.58 @@ -1083,6 +1083,7 @@ msg.take: %N->%O %N taken by %i (%T%c) msg.ghostbust: GOD->ALL %i (%S) (%T%c) was kill %k for the GhostBusters + # Esoteric features such as individual ship rcfiles/keymaps -# /ckeymaps/buttonmaps, and observer/servernick/servertype -# options (i.e. keymap.bronco: ) \ No newline at end of file +# /ckeymaps/buttonmaps (i.e. keymap-ca: ) and observer +# /servertype options (i.e. keymap.bronco: ) Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.164 retrieving revision 1.165 diff -u -d -r1.164 -r1.165 --- changes.txt 9 Apr 2007 11:07:17 -0000 1.164 +++ changes.txt 9 Apr 2007 11:31:35 -0000 1.165 @@ -7,9 +7,9 @@ netrekrc, so that means if you save in-game, it will overwrite your netrekrc with your current settings (I have a feeling the benefits of this strongly outweigh the negatives such as mistakenly remapping things then mistakenly saving your netrekrc) -- the netrekrc save feature now saves ship specific keymaps/ckeymaps/buttonmaps/netrekrc, - and observer/servertype specific options. Saving servernick options is not supported, - but I doubt anyone uses those to begin with. +- the netrekrc save feature now saves all ckeymaps, ship specific keymaps/ckeymap + /buttonmaps/netrekrc, and observer/servertype specific options. Saving servernick + options is not supported, but I doubt anyone uses those to begin with. - the ' key (single quote) is now the default key for toggling on and off the expanded playerlist window - now get a popup box when client receives a game shutdown message from server, indicating From modemhero at users.sourceforge.net Mon Apr 9 19:44:06 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 10 Apr 2007 00:44:06 +0000 Subject: [netrek-cvs] client/netrekxp/src defaults.c, 1.74, 1.75 mswindow.c, 1.61, 1.62 Message-ID: <20070410004415.07D69186828@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv17585/src Modified Files: defaults.c mswindow.c Log Message: This patch focuses on getting windows geometries to save via the in-game save key. Redefined win->orig_* to mean not the values in newwin(), but rather the original values as determined by the netrekrc. New variables to window struct, win->actual_*, which are defined at the exact moment of window creation to get the true screen coordinates of the original window (note that these are NOT the same as the coordinates you put in the netrekrc file! They are modified by things like border, padding, system metrics, etc). New function checkWindowsGeometry() which checks current windows placement vs. the placement that was originally given (win->actual_*). If they differ, to then backwards convert the current screen coordinates into a netrekrc entry, the current coordinates are modified by (win->actual_* - win->orig_*), to take into account things like borders, padding, etc. If they don't differ, then the netrekrc string is used (i.e. "local.geometry: xxxx"). In the in-game save function, a call to checkWindowGeometry is made to get the geometry. Also, the current mapped state of window is used for saving, rather than the one from the netrekrc, so that if people change window mappings, they save. Fixed documentation incorrectness on playerListObserver option. Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- mswindow.c 9 Apr 2007 11:07:20 -0000 1.61 +++ mswindow.c 10 Apr 2007 00:44:03 -0000 1.62 @@ -1118,6 +1118,7 @@ HDC hdc; char title_buff[100]; char *s; + int actual_x, actual_y, actual_width, actual_height; DWORD SpecialStyle = 0; if (!(window = (Window *) malloc (sizeof (Window)))) @@ -1209,22 +1210,26 @@ strcpy (window->name, name); window->parent = parentwin; + /* Preprocess the actual coordinates */ + actual_x = x + parentwin->border; + actual_y = y + parentwin->border; + actual_width = width + border * 2; + actual_height = height + border * 2; + //Actually create the window //Hacked to allow negative create locations -SAC if (window->type == WIN_RICHTEXT) { window->hwnd = CreateWindowEx (0, RICHEDIT_CLASS, "", - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CHILD | + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CHILD | WS_THICKFRAME | WS_VSCROLL | WS_BORDER | ES_READONLY | ES_MULTILINE, - x + parentwin->border, y + parentwin->border, - width + border * 2, height + border * 2, + actual_x, actual_y, actual_width, actual_height, parentwin->hwnd, NULL, MyInstance, (void *) window); } else { window->hwnd = CreateWindow (ClassName, s, WS_CLIPSIBLINGS | WS_CLIPCHILDREN | SpecialStyle, - x + parentwin->border, y + parentwin->border, - width + border * 2, height + border * 2 + + actual_x, actual_y, actual_width, actual_height + ((SpecialStyle & WS_CAPTION) ? GetSystemMetrics (SM_CYCAPTION) : 0), parentwin->hwnd, NULL, MyInstance, (void *) window); //Pass Window struct * as user param @@ -1236,6 +1241,13 @@ return (0); } + /* Set actual locations for later comparison, note we don't + record any height adjustment caused by title bar (WS_CAPTION) */ + window->actual_x = actual_x; + window->actual_y = actual_y; + window->actual_width = actual_width; + window->actual_height = actual_height; + //Select the custom palette if we're in a paletted mode hdc = GetDC (window->hwnd); if (NetrekPalette) @@ -1262,12 +1274,6 @@ W_Color color) { Window *newwin; - int orig_x, orig_y, orig_width, orig_height; - - orig_x = x; - orig_y = y; - orig_width = width; - orig_height = height; //Get the default position, etc. checkGeometry (name, &x, &y, &width, &height); @@ -1282,10 +1288,10 @@ return (0); /* Set original coordinates, so we will be able to restore to them */ - newwin->orig_x = orig_x; - newwin->orig_y = orig_y; - newwin->orig_width = orig_width; - newwin->orig_height = orig_height; + newwin->orig_x = x; + newwin->orig_y = y; + newwin->orig_width = width; + newwin->orig_height = height; //Map (show) the window if the user spec'd it if (checkMapped (name)) @@ -1310,12 +1316,6 @@ int border) { Window *newwin; - int orig_x, orig_y, orig_width, orig_height; - - orig_x = x; - orig_y = y; - orig_width = width; - orig_height = height; //Get the default position, etc. checkGeometry (name, &x, &y, &width, &height); @@ -1334,10 +1334,10 @@ newwin->TextWidth = (short) width; /* Set original coordinates, so we will be able to restore to them */ - newwin->orig_x = orig_x; - newwin->orig_y = orig_y; - newwin->orig_width = orig_width; - newwin->orig_height = orig_height; + newwin->orig_x = x; + newwin->orig_y = y; + newwin->orig_width = width; + newwin->orig_height = height; //Map (show) the window if the user spec'd it if (checkMapped (name)) @@ -1359,12 +1359,6 @@ int border) { Window *newwin; - int orig_x, orig_y, orig_width, orig_height; - - orig_x = x; - orig_y = y; - orig_width = width; - orig_height = height; //Get the default position, etc. checkGeometry (name, &x, &y, &width, &height); @@ -1384,10 +1378,10 @@ newwin->TextWidth = (short) width; /* Set original coordinates, so we will be able to restore to them */ - newwin->orig_x = orig_x; - newwin->orig_y = orig_y; - newwin->orig_width = orig_width; - newwin->orig_height = orig_height; + newwin->orig_x = x; + newwin->orig_y = y; + newwin->orig_width = width; + newwin->orig_height = height; //Give it a scroll bar, and set the range (to zero, initially) SetWindowLongPtr (newwin->hwnd, GWL_STYLE, @@ -1416,14 +1410,7 @@ { struct menuItem *items; Window *newwin; - int i; - int orig_x, orig_y, orig_width, orig_height; - - orig_x = x; - orig_y = y; - orig_width = width; - orig_height = height; //Get the default position, etc. checkGeometry (name, &x, &y, &width, &height); @@ -1453,10 +1440,10 @@ newwin->TextHeight = (short) height; /* Set original coordinates, so we will be able to restore to them */ - newwin->orig_x = orig_x; - newwin->orig_y = orig_y; - newwin->orig_width = orig_width; - newwin->orig_height = orig_height; + newwin->orig_x = x; + newwin->orig_y = y; + newwin->orig_width = width; + newwin->orig_height = height; //Map (show) the window if the user spec'd it if (checkMapped (name)) @@ -1972,8 +1959,8 @@ // Redo critical windows // Clear window if (windowMove && (Window *) w != NULL && win->hwnd == ((Window *) w)->hwnd) - { - TWINSIDE = MAX(win->ClipRect.bottom, win->ClipRect.right); + { + TWINSIDE = MAX(win->ClipRect.bottom, win->ClipRect.right) + win->border; // Have to reinitialize SDB SelectObject (localSDB->mem_dc, localSDB->old_bmp); @@ -2003,7 +1990,7 @@ } else if (windowMove && (Window *) mapw != NULL && win->hwnd == ((Window *) mapw)->hwnd) { - GWINSIDE = MAX(win->ClipRect.bottom, win->ClipRect.right); + GWINSIDE = MAX(win->ClipRect.bottom, win->ClipRect.right) + win->border; // Have to reinitialize SDB SelectObject (mapSDB->mem_dc, mapSDB->old_bmp); @@ -2253,6 +2240,7 @@ r.left -= GetSystemMetrics (SM_CXBORDER); r.top -= GetSystemMetrics (SM_CYBORDER); } + mainTitleBar = !mainTitleBar; SetWindowLongPtr (((Window *) baseWin)->hwnd, GWL_STYLE, wl); // Update the window since the height has changed MoveWindow (((Window *) baseWin)->hwnd, r.left, r.top, @@ -5621,7 +5609,79 @@ return; } -/* Reread rc for geometry changes and update window if geometry was changed */ +/* Check window's original position against current position, if different, + return a char string that is the equivalent of what the netrekrc entry + for that window geometry would be */ + +char * +checkWindowsGeometry (W_Window window) +{ + char str[256]; + WINDOWPLACEMENT loc; + int x, y, width, height; + register Window *win; + + if (!window) + return (NULL); + + win = (Window *)window; + + loc.length = sizeof (WINDOWPLACEMENT); /* Have to set this */ + + if (GetWindowPlacement (win->hwnd, &loc)) + { + x = loc.rcNormalPosition.left; + y = loc.rcNormalPosition.top; + width = loc.rcNormalPosition.right - loc.rcNormalPosition.left; + height = loc.rcNormalPosition.bottom - loc.rcNormalPosition.top; + + if (x != win->actual_x || y != win->actual_y + || width != win->actual_width || height != win->actual_height) + { + /* TODO: fix main window so it takes into account all + the SYS_CAPTION/border size changes, too messy for now */ + if (strcmpi (win->name, "netrek") == 0) + return (geometryDefault (str)); + /* Let's keep local and map windows square! */ + else if (strcmpi (win->name, "local") == 0) + { + if (width > height) + width = height; + else if (height > width) + height = width; + } + else if (strcmpi (win->name, "map") == 0) + { + if (width > height) + width = height; + else if (height > width) + height = width; + } + + /* To convert actual window location into a netrekrc format, + we need to know the inherent conversion difference between + what the netrekrc says (e.g. local.geometry: 500x500+0+0) + and what size/location window is actually created (e.g. + local window is 506x506 pixels at (x,y) = (1,1)). So we + subtract the actual values minus the original values to + get the conversion factor */ + sprintf (str, "%dx%d+%d+%d", + width - (win->actual_width - win->orig_width), + height - (win->actual_height - win->orig_height), + x - (win->actual_x - win->orig_x), + y - (win->actual_y - win->orig_y)); + return strdup (str); + } + } + /* Geometry hasn't changed, so use the default string from netrekrc + if there is one */ + strcpy(str, win->name); + strcat(str, ".geometry"); + return (geometryDefault (str)); +} + +/* Reread rc for geometry changes and update window if geometry was changed, +* currently unused and non-functional */ void updateWindowsGeometry (W_Window window) { @@ -5857,12 +5917,6 @@ int border) { Window *newwin; - int orig_x, orig_y, orig_width, orig_height; - - orig_x = x; - orig_y = y; - orig_width = width; - orig_height = height; //Get the default position, etc. checkGeometry (name, &x, &y, &width, &height); @@ -5890,10 +5944,10 @@ newwin->TextWidth = width; /* Set original coordinates, so we will be able to restore to them */ - newwin->orig_x = orig_x; - newwin->orig_y = orig_y; - newwin->orig_width = orig_width; - newwin->orig_height = orig_height; + newwin->orig_x = x; + newwin->orig_y = y; + newwin->orig_width = width; + newwin->orig_height = height; //Map (show) the window if the user spec'd it if (checkMapped (name)) Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.74 retrieving revision 1.75 diff -u -d -r1.74 -r1.75 --- defaults.c 9 Apr 2007 11:31:36 -0000 1.74 +++ defaults.c 10 Apr 2007 00:44:03 -0000 1.75 @@ -490,6 +490,7 @@ "1 - players", "2 - observers", "3 - players, then observers", + "4 - playerlist is off", NULL } }, @@ -2451,7 +2452,7 @@ sprintf (str, "netrek.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("netrek.geometry"); + adefault = checkWindowsGeometry (baseWin); sprintf (str, "netrek.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); @@ -2463,7 +2464,7 @@ sprintf (str, "local.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("local.geometry"); + adefault = checkWindowsGeometry (w); sprintf (str, "local.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); @@ -2475,7 +2476,7 @@ sprintf (str, "map.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("map.geometry"); + adefault = checkWindowsGeometry (mapw); sprintf (str, "map.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); @@ -2487,24 +2488,24 @@ sprintf (str, "tstat.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("tstat.geometry"); + adefault = checkWindowsGeometry (tstatw); sprintf (str, "tstat.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); fputs ("\n", fp); - // Message window - preferred mapped + // Message window if ((adefault = stringDefault ("message.parent")) != NULL) { sprintf (str, "message.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("message.geometry"); + adefault = checkWindowsGeometry (messagew); sprintf (str, "message.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); sprintf (str, "message.mapped: %s\n", - booleanDefault ("message.mapped", 1) ? "on" : "off"); + W_IsMapped (messagew) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); @@ -2514,7 +2515,7 @@ sprintf (str, "warn.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("warn.geometry"); + adefault = checkWindowsGeometry (warnw); sprintf (str, "warn.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); @@ -2526,12 +2527,12 @@ sprintf (str, "planet.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("planet.geometry"); + adefault = checkWindowsGeometry (planetw); sprintf (str, "planet.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); sprintf (str, "planet.mapped: %s\n", - booleanDefault ("planet.mapped", 0) ? "on" : "off"); + W_IsMapped (planetw) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); @@ -2541,27 +2542,27 @@ sprintf (str, "rank.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("rank.geometry"); + adefault = checkWindowsGeometry (rankw); sprintf (str, "rank.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); sprintf (str, "rank.mapped: %s\n", - booleanDefault ("rank.mapped", 0) ? "on" : "off"); + W_IsMapped (rankw) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); - // Playerlist window - preferred mapped + // Playerlist window if ((adefault = stringDefault ("player.parent")) != NULL) { sprintf (str, "player.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("player.geometry"); + adefault = checkWindowsGeometry (playerw); sprintf (str, "player.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); sprintf (str, "player.mapped: %s\n", - booleanDefault ("player.mapped", 1) ? "on" : "off"); + W_IsMapped (playerw) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); @@ -2571,12 +2572,12 @@ sprintf (str, "player2.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("player2.geometry"); + adefault = checkWindowsGeometry (playerw2); sprintf (str, "player2.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); sprintf (str, "player2.mapped: %s\n", - booleanDefault ("player2.mapped", 0) ? "on" : "off"); + W_IsMapped (playerw2) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); @@ -2586,12 +2587,12 @@ sprintf (str, "help.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("help.geometry"); + adefault = checkWindowsGeometry (helpWin); sprintf (str, "help.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); sprintf (str, "help.mapped: %s\n", - booleanDefault ("help.mapped", 0) ? "on" : "off"); + W_IsMapped (helpWin) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); @@ -2601,12 +2602,12 @@ sprintf (str, "review_all.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("review_all.geometry"); + adefault = checkWindowsGeometry (messwa); sprintf (str, "review_all.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); sprintf (str, "review_all.mapped: %s\n", - booleanDefault ("review_all.mapped", 0) ? "on" : "off"); + W_IsMapped (messwa) ? "on" : "off"); fputs (str, fp); if ((adefault = stringDefault ("review_all.allow")) != NULL) { @@ -2621,12 +2622,12 @@ sprintf (str, "review_team.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("review_team.geometry"); + adefault = checkWindowsGeometry (messwt); sprintf (str, "review_team.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); sprintf (str, "review_team.mapped: %s\n", - booleanDefault ("review_team.mapped", 0) ? "on" : "off"); + W_IsMapped (messwt) ? "on" : "off"); fputs (str, fp); if ((adefault = stringDefault ("review_team.allow")) != NULL) { @@ -2641,12 +2642,12 @@ sprintf (str, "review_your.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("review_your.geometry"); + adefault = checkWindowsGeometry (messwi); sprintf (str, "review_your.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); sprintf (str, "review_your.mapped: %s\n", - booleanDefault ("review_your.mapped", 0) ? "on" : "off"); + W_IsMapped (messwi) ? "on" : "off"); fputs (str, fp); if ((adefault = stringDefault ("review_your.allow")) != NULL) { @@ -2661,12 +2662,12 @@ sprintf (str, "review_kill.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("review_kill.geometry"); + adefault = checkWindowsGeometry (messwk); sprintf (str, "review_kill.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); sprintf (str, "review_kill.mapped: %s\n", - booleanDefault ("review_kill.mapped", 0) ? "on" : "off"); + W_IsMapped (messwk) ? "on" : "off"); fputs (str, fp); if ((adefault = stringDefault ("review_kill.allow")) != NULL) { @@ -2681,12 +2682,12 @@ sprintf (str, "review_phaser.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("review_phaser.geometry"); + adefault = checkWindowsGeometry (phaserwin); sprintf (str, "review_phaser.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); sprintf (str, "review_phaser.mapped: %s\n", - booleanDefault ("review_phaser.mapped", 0) ? "on" : "off"); + W_IsMapped (phaserwin) ? "on" : "off"); fputs (str, fp); if ((adefault = stringDefault ("review_phaser.allow")) != NULL) { @@ -2695,18 +2696,18 @@ } fputs ("\n", fp); - // Review window - preferred mapped + // Review window if ((adefault = stringDefault ("review.parent")) != NULL) { sprintf (str, "review.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("review.geometry"); + adefault = checkWindowsGeometry (reviewWin); sprintf (str, "review.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); sprintf (str, "review.mapped: %s\n", - booleanDefault ("review.mapped", 1) ? "on" : "off"); + W_IsMapped (reviewWin) ? "on" : "off"); fputs (str, fp); if ((adefault = stringDefault ("review.allow")) != NULL) { @@ -2721,12 +2722,12 @@ sprintf (str, "pingStats.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("pingStats.geometry"); + adefault = checkWindowsGeometry (pStats); sprintf (str, "pingStats.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); sprintf (str, "pingStats.mapped: %s\n", - booleanDefault ("pingStats.mapped", 0) ? "on" : "off"); + W_IsMapped (pStats) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); @@ -2736,12 +2737,12 @@ sprintf (str, "UDP.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("UDP.geometry"); + adefault = checkWindowsGeometry (udpWin); sprintf (str, "UDP.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); sprintf (str, "UDP.mapped: %s\n", - booleanDefault ("UDP.mapped", 0) ? "on" : "off"); + W_IsMapped (udpWin) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); @@ -2752,12 +2753,12 @@ sprintf (str, "network.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("network.geometry"); + adefault = checkWindowsGeometry (spWin); sprintf (str, "network.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); sprintf (str, "network.mapped: %s\n", - booleanDefault ("network.mapped", 0) ? "on" : "off"); + W_IsMapped (spWin) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); #endif @@ -2769,12 +2770,12 @@ sprintf (str, "tools.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("tools.geometry"); + adefault = checkWindowsGeometry (toolsWin); sprintf (str, "tools.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); sprintf (str, "tools.mapped: %s\n", - booleanDefault ("tools.mapped", 0) ? "on" : "off"); + W_IsMapped (toolsWin) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); #endif @@ -2786,12 +2787,12 @@ sprintf (str, "xtrekrc_help.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("xtrekrc_help.geometry"); + adefault = checkWindowsGeometry (defWin); sprintf (str, "xtrekrc_help.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); sprintf (str, "xtrekrc_help.mapped: %s\n", - booleanDefault ("xtrekrc_help.mapped", 0) ? "on" : "off"); + W_IsMapped (defWin) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); #endif @@ -2803,12 +2804,12 @@ sprintf (str, "DocWin.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("DocWin.geometry"); + adefault = checkWindowsGeometry (docwin); sprintf (str, "DocWin.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); sprintf (str, "DocWin.mapped: %s\n", - booleanDefault ("DocWin.mapped", 0) ? "on" : "off"); + W_IsMapped (docwin) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); @@ -2818,12 +2819,12 @@ sprintf (str, "xtrekrcWin.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("xtrekrcWin.geometry"); + adefault = checkWindowsGeometry (xtrekrcwin); sprintf (str, "xtrekrcWin.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); sprintf (str, "xtrekrcWin.mapped: %s\n", - booleanDefault ("xtrekrcWin.mapped", 0) ? "on" : "off"); + W_IsMapped (xtrekrcwin) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); #endif @@ -2834,7 +2835,7 @@ sprintf (str, "fed.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("fed.geometry"); + adefault = checkWindowsGeometry (teamWin[0]); sprintf (str, "fed.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); @@ -2846,7 +2847,7 @@ sprintf (str, "kli.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("kli.geometry"); + adefault = checkWindowsGeometry (teamWin[2]); sprintf (str, "kli.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); @@ -2858,7 +2859,7 @@ sprintf (str, "ori.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("ori.geometry"); + adefault = checkWindowsGeometry (teamWin[3]); sprintf (str, "ori.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); @@ -2870,7 +2871,7 @@ sprintf (str, "rom.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("rom.geometry"); + adefault = checkWindowsGeometry (teamWin[1]); sprintf (str, "rom.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); @@ -2882,7 +2883,7 @@ sprintf (str, "quit.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("quit.geometry"); + adefault = checkWindowsGeometry (qwin); sprintf (str, "quit.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); @@ -2894,12 +2895,12 @@ sprintf (str, "stats.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("stats.geometry"); + adefault = checkWindowsGeometry (statwin); sprintf (str, "stats.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); sprintf (str, "stats.mapped: %s\n", - booleanDefault ("stats.mapped", 0) ? "on" : "off"); + W_IsMapped (statwin) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); @@ -2909,12 +2910,12 @@ sprintf (str, "war.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("war.geometry"); + adefault = checkWindowsGeometry (war); sprintf (str, "war.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); sprintf (str, "war.mapped: %s\n", - booleanDefault ("war.mapped", 0) ? "on" : "off"); + W_IsMapped (war) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); @@ -2924,12 +2925,12 @@ sprintf (str, "sound.parent: %s\n", adefault); fputs (str, fp); } - adefault = geometryDefault ("sound.geometry"); + adefault = checkWindowsGeometry (soundWin); sprintf (str, "sound.geometry: %s\n", (adefault != NULL) ? adefault : "auto"); fputs (str, fp); sprintf (str, "sound.mapped: %s\n", - booleanDefault ("sound.mapped", 0) ? "on" : "off"); + W_IsMapped (soundWin) ? "on" : "off"); fputs (str, fp); fputs ("\n", fp); From modemhero at users.sourceforge.net Mon Apr 9 19:44:05 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 10 Apr 2007 00:44:05 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.165, 1.166 netrekrc, 1.58, 1.59 netrekrc_options.txt, 1.47, 1.48 Message-ID: <20070410004415.0BBDFB400@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv17585/resources/docs Modified Files: changes.txt netrekrc netrekrc_options.txt Log Message: This patch focuses on getting windows geometries to save via the in-game save key. Redefined win->orig_* to mean not the values in newwin(), but rather the original values as determined by the netrekrc. New variables to window struct, win->actual_*, which are defined at the exact moment of window creation to get the true screen coordinates of the original window (note that these are NOT the same as the coordinates you put in the netrekrc file! They are modified by things like border, padding, system metrics, etc). New function checkWindowsGeometry() which checks current windows placement vs. the placement that was originally given (win->actual_*). If they differ, to then backwards convert the current screen coordinates into a netrekrc entry, the current coordinates are modified by (win->actual_* - win->orig_*), to take into account things like borders, padding, etc. If they don't differ, then the netrekrc string is used (i.e. "local.geometry: xxxx"). In the in-game save function, a call to checkWindowGeometry is made to get the geometry. Also, the current mapped state of window is used for saving, rather than the one from the netrekrc, so that if people change window mappings, they save. Fixed documentation incorrectness on playerListObserver option. Index: netrekrc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- netrekrc 9 Apr 2007 11:31:35 -0000 1.58 +++ netrekrc 10 Apr 2007 00:44:02 -0000 1.59 @@ -272,6 +272,7 @@ # 1 - players # 2 - observers # 3 - players, then observers +# 4 - playerlist is off playerListObserver: 3 # Predefined player list Index: netrekrc_options.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc_options.txt,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- netrekrc_options.txt 7 Apr 2007 05:17:38 -0000 1.47 +++ netrekrc_options.txt 10 Apr 2007 00:44:03 -0000 1.48 @@ -202,10 +202,12 @@ playerListMessaging: (on/off) allow messages to be sent to players by clicking player on the player list window -playerlistObserver: (0-2) what kind of players to show +playerlistObserver: (0-4) what kind of players to show # 0 - all (default) # 1 - players # 2 - observers +# 3 - players, then observers +# 4 - playerlist is off playerListStyle: (0-4) what player list style to use # 0 - custom style as defined in playerList Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.165 retrieving revision 1.166 diff -u -d -r1.165 -r1.166 --- changes.txt 9 Apr 2007 11:31:35 -0000 1.165 +++ changes.txt 10 Apr 2007 00:44:02 -0000 1.166 @@ -1,7 +1,12 @@ Netrek XP 2006, Version 1.3: -- working on getting window placements and sizes to save with the in-game save key, - For the most part you the user will never need to manually edit the netrekrc again, - well maybe for changing login name or making macros. +- preference for showing main title bar (toggled via alt+enter) is now saved via + in-game save key +- Window placements and sizes to save with the in-game save key. In the special case + of local and map windows, if you set the windows to non-square, and save them, they + will save as squares (those windows really don't work right if they aren't square). + All other windows will obey size and placements you give them. Hopefully this takes + some of the pain out of setting up windows (you should be able to do it without + having to edit netrekrc hopefully). - new netrekrc option "saveFile: name" to control what filename you write to when you save your options in game (either with " key or via the save menu). Default is now netrekrc, so that means if you save in-game, it will overwrite your netrekrc with From modemhero at users.sourceforge.net Mon Apr 9 19:44:04 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 10 Apr 2007 00:44:04 +0000 Subject: [netrek-cvs] client/netrekxp/include proto.h, 1.47, 1.48 struct.h, 1.17, 1.18 Message-ID: <20070410004415.181FAB402@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs16:/tmp/cvs-serv17585/include Modified Files: proto.h struct.h Log Message: This patch focuses on getting windows geometries to save via the in-game save key. Redefined win->orig_* to mean not the values in newwin(), but rather the original values as determined by the netrekrc. New variables to window struct, win->actual_*, which are defined at the exact moment of window creation to get the true screen coordinates of the original window (note that these are NOT the same as the coordinates you put in the netrekrc file! They are modified by things like border, padding, system metrics, etc). New function checkWindowsGeometry() which checks current windows placement vs. the placement that was originally given (win->actual_*). If they differ, to then backwards convert the current screen coordinates into a netrekrc entry, the current coordinates are modified by (win->actual_* - win->orig_*), to take into account things like borders, padding, etc. If they don't differ, then the netrekrc string is used (i.e. "local.geometry: xxxx"). In the in-game save function, a call to checkWindowGeometry is made to get the geometry. Also, the current mapped state of window is used for saving, rather than the one from the netrekrc, so that if people change window mappings, they save. Fixed documentation incorrectness on playerListObserver option. Index: struct.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/struct.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- struct.h 9 Apr 2007 02:52:30 -0000 1.17 +++ struct.h 10 Apr 2007 00:44:02 -0000 1.18 @@ -656,6 +656,10 @@ int orig_y; int orig_width; int orig_height; + int actual_x; + int actual_y; + int actual_width; + int actual_height; int wam; /* Window Allowed Messages */ int sdb_flags; /* SDB flags */ } Index: proto.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/proto.h,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- proto.h 9 Apr 2007 11:07:17 -0000 1.47 +++ proto.h 10 Apr 2007 00:44:02 -0000 1.48 @@ -767,6 +767,7 @@ char *name); inline void ResetSysColors (void); inline void SetTrekSysColors (void); +char * checkWindowsGeometry (W_Window win); void updateWindowsGeometry (W_Window win); void W_MessageAllowedWindows (int messtype, int x, From modemhero at users.sourceforge.net Mon Apr 9 19:44:05 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 10 Apr 2007 00:44:05 +0000 Subject: [netrek-cvs] client/netrekxp/resources/htmlhelp/html generalconfig.html, 1.48, 1.49 Message-ID: <20070410004415.3CE54B403@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html In directory sc8-pr-cvs16:/tmp/cvs-serv17585/resources/htmlhelp/html Modified Files: generalconfig.html Log Message: This patch focuses on getting windows geometries to save via the in-game save key. Redefined win->orig_* to mean not the values in newwin(), but rather the original values as determined by the netrekrc. New variables to window struct, win->actual_*, which are defined at the exact moment of window creation to get the true screen coordinates of the original window (note that these are NOT the same as the coordinates you put in the netrekrc file! They are modified by things like border, padding, system metrics, etc). New function checkWindowsGeometry() which checks current windows placement vs. the placement that was originally given (win->actual_*). If they differ, to then backwards convert the current screen coordinates into a netrekrc entry, the current coordinates are modified by (win->actual_* - win->orig_*), to take into account things like borders, padding, etc. If they don't differ, then the netrekrc string is used (i.e. "local.geometry: xxxx"). In the in-game save function, a call to checkWindowGeometry is made to get the geometry. Also, the current mapped state of window is used for saving, rather than the one from the netrekrc, so that if people change window mappings, they save. Fixed documentation incorrectness on playerListObserver option. Index: generalconfig.html =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html/generalconfig.html,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- generalconfig.html 7 Apr 2007 05:17:38 -0000 1.48 +++ generalconfig.html 10 Apr 2007 00:44:03 -0000 1.49 @@ -854,6 +854,8 @@
  • 0 (default) - show everyone
  • 1 - show only players
  • 2 - show only observers
  • +
  • 3 - show players, then observers
  • +
  • 4 - playerlist is off
  • From modemhero at users.sourceforge.net Mon Apr 9 20:14:34 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 10 Apr 2007 01:14:34 +0000 Subject: [netrek-cvs] client/netrekxp clientr.suo,1.116,1.117 Message-ID: <20070410011442.6B9CB18681F@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs16:/tmp/cvs-serv31037 Modified Files: clientr.suo Log Message: Add ability to change login name via options menu Index: clientr.suo =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.suo,v retrieving revision 1.116 retrieving revision 1.117 diff -u -d -r1.116 -r1.117 Binary files /tmp/cvsEKvOzy and /tmp/cvsohUBVA differ From modemhero at users.sourceforge.net Mon Apr 9 20:14:34 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 10 Apr 2007 01:14:34 +0000 Subject: [netrek-cvs] client/netrekxp/src option.c,1.45,1.46 Message-ID: <20070410011443.14B75B400@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv31037/src Modified Files: option.c Log Message: Add ability to change login name via options menu Index: option.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/option.c,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- option.c 6 Apr 2007 06:46:32 -0000 1.45 +++ option.c 10 Apr 2007 01:14:32 -0000 1.46 @@ -27,6 +27,7 @@ static char newkeys[14]; static char newbuttons[10]; +static char newlogin[PSEUDOSIZE]; char *localmes[] = { "Show owner on local planets", "Show resources on local planets", @@ -347,6 +348,7 @@ {1, "allow wheel actions", &allowWheelActions, 0, 0, 0, NULL, NULL}, {1, "new keymap entries: %s", 0, 0, newkeys, 13, NULL, NULL}, {1, "new buttonmap entries: %s", 0, 0, newbuttons, 9, NULL, NULL}, + {1, "new login name: %s", 0, 0, newlogin, PSEUDOSIZE, NULL, NULL}, {1, "ignore the capslock key", &ignoreCaps, 0, 0, 0, NULL, NULL}, {1, "%d updates per second", &updatesPerSec, 0, 0, 0, 0, &updates_range}, {1, "%d 1/10 sec screen refresh delay", &redrawDelay, 0, 0, 0, 0, @@ -486,6 +488,7 @@ *newkeys = '\0'; *newbuttons = '\0'; + *newlogin = '\0'; if (FirstMenu == NULL) { MaxOptions = InitOptionMenus (); @@ -1125,7 +1128,13 @@ } } *newbuttons = '\0'; - + + /* update login */ + if (newlogin) + { + STRNCPY (login, newlogin, PSEUDOSIZE); + *newlogin = '\0'; + } if (updatesPerSec != lastUpdateSpeed) { sendUpdatePacket (1000000 / updatesPerSec); From modemhero at users.sourceforge.net Tue Apr 10 00:43:47 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 10 Apr 2007 05:43:47 +0000 Subject: [netrek-cvs] client/netrekxp/src local.c, 1.90, 1.91 map.c, 1.47, 1.48 mswindow.c, 1.62, 1.63 option.c, 1.46, 1.47 sound.c, 1.39, 1.40 Message-ID: <20070410054355.B65DDB400@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv20474/src Modified Files: local.c map.c mswindow.c option.c sound.c Log Message: Made showArmy default from 1 to 3 (show army count on all planets if feature enabled). Changed how phaser miss cases are handled - if server sends us the end coordinate (as it now does for sturgeon servers), draw misses based on that end coordinate. Fixes problems where upgraded ships were drawing wrong phaser length on a phaser miss. Remove resizable border from richtext window, as it added bulk and cut down text viewable area. Still can't figure out how to get the richtext windows to move, sadly. Fixed bug with login name capture via options menu. Changed default soundVolume setting if changed by user, so it saves properly. Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- mswindow.c 10 Apr 2007 00:44:03 -0000 1.62 +++ mswindow.c 10 Apr 2007 05:43:45 -0000 1.63 @@ -1221,7 +1221,7 @@ if (window->type == WIN_RICHTEXT) { window->hwnd = CreateWindowEx (0, RICHEDIT_CLASS, "", - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CHILD | WS_THICKFRAME | + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CHILD | WS_VSCROLL | WS_BORDER | ES_READONLY | ES_MULTILINE, actual_x, actual_y, actual_width, actual_height, parentwin->hwnd, NULL, MyInstance, (void *) window); Index: sound.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/sound.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- sound.c 6 Apr 2007 06:46:32 -0000 1.39 +++ sound.c 10 Apr 2007 05:43:45 -0000 1.40 @@ -437,6 +437,9 @@ if (mvolume < 0) mvolume = 0; Mix_VolumeMusic(mvolume); + + // Change default + soundVolume = volume; } /* Sound options window stuff */ Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.90 retrieving revision 1.91 diff -u -d -r1.90 -r1.91 --- local.c 9 Apr 2007 02:52:31 -0000 1.90 +++ local.c 10 Apr 2007 05:43:44 -0000 1.91 @@ -1581,14 +1581,24 @@ if (php->ph_status == PHMISS) { /* Here I will have to compute end coordinate */ - tx = (int) (PHASEDIST * j->p_ship.s_phaserdamage / 100 * - Cos[php->ph_dir]); + /* Server will sometimes send us this information though, + so check if we have it first */ + if (php->ph_x > 0 && php->ph_y > 0) + { + tx = (php->ph_x - me->p_x) / scaleFactor + TWINSIDE / 2; + ty = (php->ph_y - me->p_y) / scaleFactor + TWINSIDE / 2; + } + else + { + tx = (int) (PHASEDIST * j->p_ship.s_phaserdamage / 100 * + Cos[php->ph_dir]); - ty = (int) (PHASEDIST * j->p_ship.s_phaserdamage / 100 * - Sin[php->ph_dir]); + ty = (int) (PHASEDIST * j->p_ship.s_phaserdamage / 100 * + Sin[php->ph_dir]); - tx = (j->p_x + tx - me->p_x) / scaleFactor + TWINSIDE / 2; - ty = (j->p_y + ty - me->p_y) / scaleFactor + TWINSIDE / 2; + tx = (j->p_x + tx - me->p_x) / scaleFactor + TWINSIDE / 2; + ty = (j->p_y + ty - me->p_y) / scaleFactor + TWINSIDE / 2; + } } else if (php->ph_status == PHHIT2) { Index: option.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/option.c,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- option.c 10 Apr 2007 01:14:32 -0000 1.46 +++ option.c 10 Apr 2007 05:43:45 -0000 1.47 @@ -1130,7 +1130,7 @@ *newbuttons = '\0'; /* update login */ - if (newlogin) + if (newlogin[0] != '\0') { STRNCPY (login, newlogin, PSEUDOSIZE); *newlogin = '\0'; Index: map.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- map.c 9 Apr 2007 02:52:31 -0000 1.47 +++ map.c 10 Apr 2007 05:43:45 -0000 1.48 @@ -1202,10 +1202,20 @@ { case PHMISS: /* Here I will have to compute end coordinate */ - tx = (int) (j->p_x + PHASEDIST * j->p_ship.s_phaserdamage / 100 - * Cos[ph->ph_dir]) * GWINSIDE / GWIDTH; - ty = (int) (j->p_y + PHASEDIST * j->p_ship.s_phaserdamage / 100 - * Sin[ph->ph_dir]) * GWINSIDE / GWIDTH; + /* Server will sometimes send us this information though, + so check if we have it first */ + if (ph->ph_x > 0 && ph->ph_y > 0) + { + tx = ph->ph_x * GWINSIDE / GWIDTH; + ty = ph->ph_y * GWINSIDE / GWIDTH; + } + else + { + tx = (int) (j->p_x + PHASEDIST * j->p_ship.s_phaserdamage / 100 + * Cos[ph->ph_dir]) * GWINSIDE / GWIDTH; + ty = (int) (j->p_y + PHASEDIST * j->p_ship.s_phaserdamage / 100 + * Sin[ph->ph_dir]) * GWINSIDE / GWIDTH; + } break; case PHHIT2: tx = ph->ph_x * GWINSIDE / GWIDTH; From modemhero at users.sourceforge.net Tue Apr 10 00:43:46 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 10 Apr 2007 05:43:46 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.166, 1.167 netrekrc, 1.59, 1.60 Message-ID: <20070410054355.71761186808@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv20474/resources/docs Modified Files: changes.txt netrekrc Log Message: Made showArmy default from 1 to 3 (show army count on all planets if feature enabled). Changed how phaser miss cases are handled - if server sends us the end coordinate (as it now does for sturgeon servers), draw misses based on that end coordinate. Fixes problems where upgraded ships were drawing wrong phaser length on a phaser miss. Remove resizable border from richtext window, as it added bulk and cut down text viewable area. Still can't figure out how to get the richtext windows to move, sadly. Fixed bug with login name capture via options menu. Changed default soundVolume setting if changed by user, so it saves properly. Index: netrekrc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- netrekrc 10 Apr 2007 00:44:02 -0000 1.59 +++ netrekrc 10 Apr 2007 05:43:44 -0000 1.60 @@ -348,7 +348,7 @@ # 1 - show army counts on local map only (default) # 2 - show army counts on galactic map only # 3 - show army counts on both maps -showArmy: 1 +showArmy: 3 # Show other cloakers on local # Server god decides whether to enable this feature Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.166 retrieving revision 1.167 diff -u -d -r1.166 -r1.167 --- changes.txt 10 Apr 2007 00:44:02 -0000 1.166 +++ changes.txt 10 Apr 2007 05:43:44 -0000 1.167 @@ -1,9 +1,11 @@ Netrek XP 2006, Version 1.3: +- can now change login name via options menu, saved via in-game save key - preference for showing main title bar (toggled via alt+enter) is now saved via in-game save key - Window placements and sizes to save with the in-game save key. In the special case of local and map windows, if you set the windows to non-square, and save them, they will save as squares (those windows really don't work right if they aren't square). + In the case of the main window, it won't save placement, for now (complicated to do). All other windows will obey size and placements you give them. Hopefully this takes some of the pain out of setting up windows (you should be able to do it without having to edit netrekrc hopefully). From modemhero at users.sourceforge.net Tue Apr 10 03:14:18 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 10 Apr 2007 08:14:18 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.167, 1.168 Message-ID: <20070410081428.3A598B402@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv18781/resources/docs Modified Files: changes.txt Log Message: Make richtext windows moveable by faking a caption hit on main window during left click action. Apparently nothing can be captured by clicking on window border, I think it's cause click actions go to the default windows proc. If window is created with WS_THICKBORDER, then it allows border action to resize it. But then window border is too big, message windows need as small border as possible. Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.167 retrieving revision 1.168 diff -u -d -r1.167 -r1.168 --- changes.txt 10 Apr 2007 05:43:44 -0000 1.167 +++ changes.txt 10 Apr 2007 08:14:16 -0000 1.168 @@ -1,4 +1,8 @@ Netrek XP 2006, Version 1.3: +- richtext message windows are now moveable, it works a little different than moving other + windows. Instead of clicking on border, you click on body of window, hold down mouse, + and move window. +- phaser misses on sturgeon servers now show proper phaser length - can now change login name via options menu, saved via in-game save key - preference for showing main title bar (toggled via alt+enter) is now saved via in-game save key From modemhero at users.sourceforge.net Tue Apr 10 03:14:18 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 10 Apr 2007 08:14:18 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C,1.132,1.133 Message-ID: <20070410081428.18A90B3FF@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs16:/tmp/cvs-serv18781 Modified Files: NetrekXP to do list.C Log Message: Make richtext windows moveable by faking a caption hit on main window during left click action. Apparently nothing can be captured by clicking on window border, I think it's cause click actions go to the default windows proc. If window is created with WS_THICKBORDER, then it allows border action to resize it. But then window border is too big, message windows need as small border as possible. Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.132 retrieving revision 1.133 diff -u -d -r1.132 -r1.133 --- NetrekXP to do list.C 9 Apr 2007 11:07:14 -0000 1.132 +++ NetrekXP to do list.C 10 Apr 2007 08:14:16 -0000 1.133 @@ -13,9 +13,6 @@ 9) on daemon exit in newbie/pret, kill any hosed bot slots 10) end game bots are stupid, and on timericide don't act right 11) feature packet for rank names and requirements -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 @@ -45,7 +42,6 @@ 12) minor richtext issue with scrolling - extra line at the end 13) With expanded tactical ..can now see ships at galactic coordinates (-500,-500), if you fly into the NW corner of the galaxy. this was never anticipated! -14) make richtext windows moveable Stas's list: - two column and/or scrollable playerlist. From modemhero at users.sourceforge.net Tue Apr 10 03:14:19 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 10 Apr 2007 08:14:19 +0000 Subject: [netrek-cvs] client/netrekxp/src mswindow.c,1.63,1.64 Message-ID: <20070410081428.323B0B400@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv18781/src Modified Files: mswindow.c Log Message: Make richtext windows moveable by faking a caption hit on main window during left click action. Apparently nothing can be captured by clicking on window border, I think it's cause click actions go to the default windows proc. If window is created with WS_THICKBORDER, then it allows border action to resize it. But then window border is too big, message windows need as small border as possible. Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- mswindow.c 10 Apr 2007 05:43:45 -0000 1.63 +++ mswindow.c 10 Apr 2007 08:14:16 -0000 1.64 @@ -6084,13 +6084,10 @@ switch (msg) { -/* case WM_PAINT: - GET_STRUCT_PTR; - W_ChangeBorder ((W_Window) win, W_White); - break;*/ - case WM_LBUTTONDOWN: BringWindowToTop (hwnd); + // fake a caption hit to move window + SendMessage(hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0); break; } return CallWindowProc (lpfnDefRichEditWndProc, hwnd, msg, wParam, lParam); From modemhero at users.sourceforge.net Tue Apr 10 06:07:10 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 10 Apr 2007 11:07:10 +0000 Subject: [netrek-cvs] client/netrekxp/src local.c, 1.91, 1.92 mswindow.c, 1.64, 1.65 Message-ID: <20070410110722.8A8331867E0@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv7251/src Modified Files: local.c mswindow.c Log Message: Added ability to resize richtext windows via click/double click to activate/deactivate the sizing border. Fixed bug with observers drawing the ship they are locked onto if it's cloaked and showCloak feature is enabled. Cleaned up todo list. Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -r1.64 -r1.65 --- mswindow.c 10 Apr 2007 08:14:16 -0000 1.64 +++ mswindow.c 10 Apr 2007 11:07:08 -0000 1.65 @@ -6089,6 +6089,16 @@ // fake a caption hit to move window SendMessage(hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0); break; + case WM_NCLBUTTONDOWN: + // set sizing border + SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) | WS_SIZEBOX); + break; + case WM_LBUTTONUP: + case WM_NCLBUTTONUP: + SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) & ~WS_SIZEBOX); + // remove sizing border and redraw + SetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER); + break; } return CallWindowProc (lpfnDefRichEditWndProc, hwnd, msg, wParam, lParam); } Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.91 retrieving revision 1.92 diff -u -d -r1.91 -r1.92 --- local.c 10 Apr 2007 05:43:44 -0000 1.91 +++ local.c 10 Apr 2007 11:07:08 -0000 1.92 @@ -836,7 +836,7 @@ the ship drawing code with the goto statement */ if (j->p_flags & PFCLOAK && (j->p_cloakphase == (cloak_phases - 1))) { - if (myPlayer (j) || (showCloakers && F_show_cloakers) + if (myPlayer (j) || (showCloakers && F_show_cloakers && !isObsLockPlayer(j)) #ifdef RECORDGAME || playback #endif From modemhero at users.sourceforge.net Tue Apr 10 06:07:10 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 10 Apr 2007 11:07:10 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.168, 1.169 Message-ID: <20070410110722.889021867DD@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv7251/resources/docs Modified Files: changes.txt Log Message: Added ability to resize richtext windows via click/double click to activate/deactivate the sizing border. Fixed bug with observers drawing the ship they are locked onto if it's cloaked and showCloak feature is enabled. Cleaned up todo list. Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.168 retrieving revision 1.169 diff -u -d -r1.168 -r1.169 --- changes.txt 10 Apr 2007 08:14:16 -0000 1.168 +++ changes.txt 10 Apr 2007 11:07:08 -0000 1.169 @@ -1,7 +1,15 @@ Netrek XP 2006, Version 1.3: +- richtext message windows are now resizeable, it works a little different than sizing + other windows. First you left click on the window once to activate the sizing border, + then grab border with mouse and size normally. The window will now have a larger border, + which you will probably want to get rid of. To get rid of it, double left-click the + window. The reason the procedure is a little complicated is because having a border + which can both resize the window requires a larger border, which cuts into precious + screen space for messages. So this sizing border needs to be activated first, then + deactivated when the window is done sizing. - richtext message windows are now moveable, it works a little different than moving other windows. Instead of clicking on border, you click on body of window, hold down mouse, - and move window. + and move the window. - phaser misses on sturgeon servers now show proper phaser length - can now change login name via options menu, saved via in-game save key - preference for showing main title bar (toggled via alt+enter) is now saved via From modemhero at users.sourceforge.net Tue Apr 10 06:07:10 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 10 Apr 2007 11:07:10 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C,1.133,1.134 Message-ID: <20070410110722.A55121867E6@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs16:/tmp/cvs-serv7251 Modified Files: NetrekXP to do list.C Log Message: Added ability to resize richtext windows via click/double click to activate/deactivate the sizing border. Fixed bug with observers drawing the ship they are locked onto if it's cloaked and showCloak feature is enabled. Cleaned up todo list. Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.133 retrieving revision 1.134 diff -u -d -r1.133 -r1.134 --- NetrekXP to do list.C 10 Apr 2007 08:14:16 -0000 1.133 +++ NetrekXP to do list.C 10 Apr 2007 11:07:08 -0000 1.134 @@ -21,28 +21,24 @@ old AddFontResource function. Things to do: -1) resizeable message windows. Perhaps memory of window positions if you choose -to save settings. Text in windows should adjust to new window size. -3) Get square planet bitmaps so I can turn them into mapped rotating globes. -5) Metaping on a Unknown server is causing unseemly delay due to threading. I believe +1) Have font in windows adjust as window size increases. +2) Get square planet bitmaps so I can turn them into mapped rotating globes. +3) Metaping on a Unknown server is causing unseemly delay due to threading. I believe this is fixed. -7) Some sort of click action on player list brings up a menu with settings for that +4) 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 (already profiled for CPU usage, not so bad, plus 50 updates/sec has -more impact). -9) Out of bounds message window calcs don't work with taskbar or menu bar, basewin +5) Out of bounds message window calcs don't work with taskbar or menu bar, basewin rect doesn't take these into account. -10) sendto() error: 10049 on metaserver connect to a bad server, believe it's due +6) sendto() error: 10049 on metaserver connect to a bad server, believe it's due to hostname not resolving. Currently fixed by using mulitple attempts to resolve bad host names. -11) CPU profile cambot - revealed draw border issue (fixed, turned off extra border -refreshes during playback), the rest is just the usual CPU use from doing very fast -redraws -12) minor richtext issue with scrolling - extra line at the end -13) With expanded tactical ..can now see ships at galactic coordinates (-500,-500), +7) minor richtext issue with scrolling - extra line at the end +8) With expanded tactical ..can now see ships at galactic coordinates (-500,-500), if you fly into the NW corner of the galaxy. this was never anticipated! +Wish list: +1) Rewrite graphics engine using SDL + Stas's list: - two column and/or scrollable playerlist. - add "reset to defaults" to options menu From modemhero at users.sourceforge.net Tue Apr 10 20:10:06 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 11 Apr 2007 01:10:06 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.169, 1.170 Message-ID: <20070411011016.79DF5B42D@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv16255/resources/docs Modified Files: changes.txt Log Message: Several bug fixes related to resizing map and local windows to very small and even to 0 size. Resizing map and local now only lets you size the windows as squares. Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.169 retrieving revision 1.170 diff -u -d -r1.169 -r1.170 --- changes.txt 10 Apr 2007 11:07:08 -0000 1.169 +++ changes.txt 11 Apr 2007 01:10:04 -0000 1.170 @@ -1,4 +1,5 @@ Netrek XP 2006, Version 1.3: +- resizing the local and map windows now only lets you size them as squares - richtext message windows are now resizeable, it works a little different than sizing other windows. First you left click on the window once to activate the sizing border, then grab border with mouse and size normally. The window will now have a larger border, From modemhero at users.sourceforge.net Tue Apr 10 20:10:07 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 11 Apr 2007 01:10:07 +0000 Subject: [netrek-cvs] client/netrekxp/src local.c, 1.92, 1.93 map.c, 1.48, 1.49 mswindow.c, 1.65, 1.66 Message-ID: <20070411011017.D047A1867ED@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv16255/src Modified Files: local.c map.c mswindow.c Log Message: Several bug fixes related to resizing map and local windows to very small and even to 0 size. Resizing map and local now only lets you size the windows as squares. Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- mswindow.c 10 Apr 2007 11:07:08 -0000 1.65 +++ mswindow.c 11 Apr 2007 01:10:05 -0000 1.66 @@ -1951,16 +1951,21 @@ case WM_EXITSIZEMOVE: //Disable possibility to move internal windows + { // have to add bracket to be able to declare variables + int width, height; + RECT winRect; // current window rectangle + GET_STRUCT_PTR; - // Adjust TWINSIDE and GWINSIDE // Reinitialize whatever is necessary (so many things are created based on // a fixed TWINSIDE) + // Adjust window to be square + // Adjust TWINSIDE and GWINSIDE // Redo critical windows // Clear window if (windowMove && (Window *) w != NULL && win->hwnd == ((Window *) w)->hwnd) { - TWINSIDE = MAX(win->ClipRect.bottom, win->ClipRect.right) + win->border; + GetWindowRect (((Window *) w)->hwnd, &winRect); // Have to reinitialize SDB SelectObject (localSDB->mem_dc, localSDB->old_bmp); @@ -1972,6 +1977,22 @@ // and stars initStars(); + // Keep window square + width = winRect.right - winRect.left; + height = winRect.bottom - winRect.top; + if (width > height) + width = height; + else + height = width; + TWINSIDE = width - 2 * win->border; + + /* In case of WS_CAPTION (titlebar on) we have to subtract caption size */ + if (GetWindowLongPtr (((Window *) baseWin)->hwnd, GWL_STYLE) & WS_CAPTION) + winRect.top -= GetSystemMetrics (SM_CYCAPTION); + + MoveWindow (((Window *) w)->hwnd, winRect.left - win->border, winRect.top - win->border, + width, height, TRUE); + // All windows based on TWINSIDE are out of position now, but the team // select/quit windows are now the wrong size too, so we need to redo them for (i = 0; i < 4; i++) @@ -1980,6 +2001,7 @@ teamWin[i] = W_MakeWindow (teamshort[1 << i], i * (TWINSIDE / 5), TWINSIDE - (TWINSIDE / 5), (TWINSIDE / 5), (TWINSIDE / 5), w, 1, foreColor); } + W_UnmapWindow (qwin); qwin = W_MakeWindow ("quit", 4 * (TWINSIDE / 5), TWINSIDE - (TWINSIDE / 5), (TWINSIDE / 5), (TWINSIDE / 5), w, 1, foreColor); @@ -1990,7 +2012,7 @@ } else if (windowMove && (Window *) mapw != NULL && win->hwnd == ((Window *) mapw)->hwnd) { - GWINSIDE = MAX(win->ClipRect.bottom, win->ClipRect.right) + win->border; + GetWindowRect (((Window *) mapw)->hwnd, &winRect); // Have to reinitialize SDB SelectObject (mapSDB->mem_dc, mapSDB->old_bmp); @@ -2000,6 +2022,22 @@ free (mapSDB); mapSDB = W_InitSDB (mapw); + // Keep window square + width = winRect.right - winRect.left; + height = winRect.bottom - winRect.top; + if (width > height) + width = height; + else + height = width; + GWINSIDE = width - 2 * win->border; + + /* In case of WS_CAPTION (titlebar on) we have to subtract caption size */ + if (GetWindowLongPtr (((Window *) baseWin)->hwnd, GWL_STYLE) & WS_CAPTION) + winRect.top -= GetSystemMetrics (SM_CYCAPTION); + + MoveWindow (((Window *) mapw)->hwnd, winRect.left - win->border, winRect.top - win->border, + width, height, TRUE); + redrawall = 1; } @@ -2019,6 +2057,7 @@ movingr.right - movingr.left, movingr.bottom - movingr.top, TRUE); + } break; case WM_PAINT: Index: map.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- map.c 10 Apr 2007 05:43:45 -0000 1.48 +++ map.c 11 Apr 2007 01:10:05 -0000 1.49 @@ -853,7 +853,7 @@ static int viewx = 0, viewy = 0; static char clearviewbox = 0; static char viewboxcleared = 0; - int viewdist = (TWINSIDE / 2 * scaleFactor) / (GWIDTH / GWINSIDE); + int viewdist; int view = TWINSIDE * scaleFactor / 2; int mvx, mvy; @@ -866,6 +866,10 @@ #endif clearMap (); + if (GWINSIDE == 0) + return; + + viewdist = (TWINSIDE / 2 * scaleFactor) / (GWIDTH / GWINSIDE); dx = (me->p_x) / (GWIDTH / GWINSIDE); dy = (me->p_y) / (GWIDTH / GWINSIDE); Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.92 retrieving revision 1.93 diff -u -d -r1.92 -r1.93 --- local.c 10 Apr 2007 11:07:08 -0000 1.92 +++ local.c 11 Apr 2007 01:10:04 -0000 1.93 @@ -124,6 +124,9 @@ register int i, j, k; int imax, jmax, kmax; + if (TWINSIDE == 0) + return; + imax = 5 * STARSIDE / TWINSIDE + 1; if (imax > MAXSECTORS) imax = MAXSECTORS; @@ -156,12 +159,17 @@ note: cpp symbols in expressions (TWINSIDE*SCALE) will be precalculated by any C optimizer */ - int sectorx = me->p_x / (fullview); - int sectory = me->p_y / (fullview); - int sector_offx = me->p_x - sectorx * (fullview); - int sector_offy = me->p_y - sectory * (fullview); + int sectorx, sectory, sector_offx, sector_offy; int l = 0, r = 0, t = 0, b = 0; + if (fullview == 0) + return; + + sectorx = me->p_x / (fullview); + sectory = me->p_y / (fullview); + sector_offx = me->p_x - sectorx * (fullview); + sector_offy = me->p_y - sectory * (fullview); + if (warpStreaks && streaks_on) /* Streaks_on is toggled on by redrawStarSector with a change in warp state, and toggled off after certain conditions are met. Only need to track @@ -181,8 +189,6 @@ sectory--; sector_offy += fullview; } - -#define MAXSECTOR (5 * STARSIDE / TWINSIDE) + 1 /* at worst we have to redraw 4 star sectors */ @@ -191,13 +197,13 @@ check first to make sure it's valid. This is mainly important for if it tries to redraw and we're already dead */ - if (sectorx < 0 || sectory < 0 || sectorx > MAXSECTOR || sectory > MAXSECTOR ) + if (sectorx < 0 || sectory < 0 || sectorx > MAXSECTORS || sectory > MAXSECTORS ) return; l = sector_offx < view && sectorx > 0; - r = sector_offx > view && sectorx + 1 < MAXSECTOR; + r = sector_offx > view && sectorx + 1 < MAXSECTORS; t = sector_offy < view && sectory > 0; - b = sector_offy > view && sectory + 1 < MAXSECTOR; + b = sector_offy > view && sectory + 1 < MAXSECTORS; if (t) { From modemhero at users.sourceforge.net Wed Apr 11 03:03:10 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 11 Apr 2007 08:03:10 +0000 Subject: [netrek-cvs] client/netrekxp/src local.c, 1.93, 1.94 mswindow.c, 1.66, 1.67 Message-ID: <20070411080320.26625B3FC@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv9569/src Modified Files: local.c mswindow.c Log Message: More esoteric windows nonsense for dealing with caption and sizing borders to get exact screen coordinates of the local/map window after it's finished resizing. Would need to use similar sort of checks to implement saving the main window size and position between sessions. Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.66 retrieving revision 1.67 diff -u -d -r1.66 -r1.67 --- mswindow.c 11 Apr 2007 01:10:05 -0000 1.66 +++ mswindow.c 11 Apr 2007 08:03:08 -0000 1.67 @@ -1953,6 +1953,7 @@ //Disable possibility to move internal windows { // have to add bracket to be able to declare variables int width, height; + RECT baseRect; // baseWin rectangle RECT winRect; // current window rectangle GET_STRUCT_PTR; @@ -1966,6 +1967,7 @@ if (windowMove && (Window *) w != NULL && win->hwnd == ((Window *) w)->hwnd) { GetWindowRect (((Window *) w)->hwnd, &winRect); + GetWindowRect (((Window *) baseWin)->hwnd, &baseRect); // Have to reinitialize SDB SelectObject (localSDB->mem_dc, localSDB->old_bmp); @@ -1986,11 +1988,32 @@ height = width; TWINSIDE = width - 2 * win->border; - /* In case of WS_CAPTION (titlebar on) we have to subtract caption size */ - if (GetWindowLongPtr (((Window *) baseWin)->hwnd, GWL_STYLE) & WS_CAPTION) - winRect.top -= GetSystemMetrics (SM_CYCAPTION); + /* Have to take into account basewin border */ + winRect.left -= baseRect.left; + winRect.top -= baseRect.top; + + /* In case of WS_CAPTION (titlebar on) we have to subtract caption size and + additional borders to get screen coordinates. + If the main window is also resizeable then border sizes change from SM_CnFIXEDFRAME + to SM_CnSIZEFRAME + */ + if (GetWindowLongPtr (((Window *) baseWin)->hwnd, GWL_STYLE) & WS_CAPTION && !mainResizeable) + { + winRect.left -= GetSystemMetrics (SM_CXFIXEDFRAME); + winRect.top -= (GetSystemMetrics (SM_CYFIXEDFRAME) + GetSystemMetrics (SM_CYCAPTION)); + } + else if (GetWindowLongPtr (((Window *) baseWin)->hwnd, GWL_STYLE) & WS_CAPTION && mainResizeable) + { + winRect.left -= GetSystemMetrics (SM_CXSIZEFRAME); + winRect.top -= (GetSystemMetrics (SM_CYSIZEFRAME) + GetSystemMetrics (SM_CYCAPTION)); + } + else if (!(GetWindowLongPtr (((Window *) baseWin)->hwnd, GWL_STYLE) & WS_CAPTION) && mainResizeable) + { + winRect.left -= GetSystemMetrics (SM_CXSIZEFRAME) - 1; + winRect.top -= GetSystemMetrics (SM_CYSIZEFRAME) - 1; + } - MoveWindow (((Window *) w)->hwnd, winRect.left - win->border, winRect.top - win->border, + MoveWindow (((Window *) w)->hwnd, winRect.left, winRect.top, width, height, TRUE); // All windows based on TWINSIDE are out of position now, but the team @@ -2013,6 +2036,7 @@ else if (windowMove && (Window *) mapw != NULL && win->hwnd == ((Window *) mapw)->hwnd) { GetWindowRect (((Window *) mapw)->hwnd, &winRect); + GetWindowRect (((Window *) baseWin)->hwnd, &baseRect); // Have to reinitialize SDB SelectObject (mapSDB->mem_dc, mapSDB->old_bmp); @@ -2030,12 +2054,33 @@ else height = width; GWINSIDE = width - 2 * win->border; - - /* In case of WS_CAPTION (titlebar on) we have to subtract caption size */ - if (GetWindowLongPtr (((Window *) baseWin)->hwnd, GWL_STYLE) & WS_CAPTION) - winRect.top -= GetSystemMetrics (SM_CYCAPTION); - MoveWindow (((Window *) mapw)->hwnd, winRect.left - win->border, winRect.top - win->border, + /* Have to take into account basewin border */ + winRect.left -= baseRect.left; + winRect.top -= baseRect.top; + + /* In case of WS_CAPTION (titlebar on) we have to subtract caption size and + additional borders to get screen coordinates. + If the main window is also resizeable then border sizes change from SM_CnFIXEDFRAME + to SM_CnSIZEFRAME + */ + if (GetWindowLongPtr (((Window *) baseWin)->hwnd, GWL_STYLE) & WS_CAPTION && !mainResizeable) + { + winRect.left -= GetSystemMetrics (SM_CXFIXEDFRAME); + winRect.top -= (GetSystemMetrics (SM_CYFIXEDFRAME) + GetSystemMetrics (SM_CYCAPTION)); + } + else if (GetWindowLongPtr (((Window *) baseWin)->hwnd, GWL_STYLE) & WS_CAPTION && mainResizeable) + { + winRect.left -= GetSystemMetrics (SM_CXSIZEFRAME); + winRect.top -= (GetSystemMetrics (SM_CYSIZEFRAME) + GetSystemMetrics (SM_CYCAPTION)); + } + else if (!(GetWindowLongPtr (((Window *) baseWin)->hwnd, GWL_STYLE) & WS_CAPTION) && mainResizeable) + { + winRect.left -= GetSystemMetrics (SM_CXSIZEFRAME) - 1; + winRect.top -= GetSystemMetrics (SM_CYSIZEFRAME) - 1; + } + + MoveWindow (((Window *) mapw)->hwnd, winRect.left, winRect.top, width, height, TRUE); redrawall = 1; Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.93 retrieving revision 1.94 diff -u -d -r1.93 -r1.94 --- local.c 11 Apr 2007 01:10:04 -0000 1.93 +++ local.c 11 Apr 2007 08:03:08 -0000 1.94 @@ -735,8 +735,7 @@ /* Twarp sounds put up here so observers can hear them */ #ifdef SOUND /* Have to use me->p_flags because server doesn't send us twarp flag info - on other players. Current Vanilla does not let observer change players - if the player they are observing is transwarping. */ + on other players. */ if (twarpflag != (me->p_flags & PFTWARP)) { /* change in warp state */ From modemhero at users.sourceforge.net Wed Apr 11 03:03:10 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 11 Apr 2007 08:03:10 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C,1.134,1.135 Message-ID: <20070411080320.30EAEB406@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs16:/tmp/cvs-serv9569 Modified Files: NetrekXP to do list.C Log Message: More esoteric windows nonsense for dealing with caption and sizing borders to get exact screen coordinates of the local/map window after it's finished resizing. Would need to use similar sort of checks to implement saving the main window size and position between sessions. Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.134 retrieving revision 1.135 diff -u -d -r1.134 -r1.135 --- NetrekXP to do list.C 10 Apr 2007 11:07:08 -0000 1.134 +++ NetrekXP to do list.C 11 Apr 2007 08:03:08 -0000 1.135 @@ -35,6 +35,8 @@ 7) minor richtext issue with scrolling - extra line at the end 8) With expanded tactical ..can now see ships at galactic coordinates (-500,-500), if you fly into the NW corner of the galaxy. this was never anticipated! +9) if cursor is in window and it receives a message, it scrolls to bottom automatically, +bad if you are scrolling up reading history Wish list: 1) Rewrite graphics engine using SDL From modemhero at users.sourceforge.net Wed Apr 11 18:06:39 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 11 Apr 2007 23:06:39 +0000 Subject: [netrek-cvs] client/netrekxp/src colors.c, 1.1.1.1, 1.2 defaults.c, 1.75, 1.76 dmessage.c, 1.8, 1.9 local.c, 1.94, 1.95 map.c, 1.49, 1.50 mswindow.c, 1.67, 1.68 Message-ID: <20070411230650.E6A0EB429@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv22272/src Modified Files: colors.c defaults.c dmessage.c local.c map.c mswindow.c Log Message: Yanked RACE_COLOR define, this is standard now. Moved color defines to a common area (defs.h). Added new color to colortable for God messages (default is white). Added all color settings to netrekrc, and added them to the in game save function. The settings in netrekrc are to the "bright" color settings, as players seem to prefer these. Bug fix with phaser misses (check to make sure x,y less than GWIDTH) Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.67 retrieving revision 1.68 diff -u -d -r1.67 -r1.68 --- mswindow.c 11 Apr 2007 08:03:08 -0000 1.67 +++ mswindow.c 11 Apr 2007 23:06:34 -0000 1.68 @@ -41,35 +41,6 @@ #include "resource.h" #include "math.h" -#undef WHITE -#undef BLACK -#undef RED -#undef GREEN -#undef YELLOW -#undef CYAN - -#define WHITE 0 -#define BLACK 1 -#define RED 2 -#define GREEN 3 -#define YELLOW 4 -#define CYAN 5 -#define GREY 6 - -#ifdef RACE_COLORS -#define C_ROM 7 -#define C_KLI 8 -#define C_FED 9 -#define C_ORI 10 -#define C_IND 11 -#endif - -#ifdef RACE_COLORS -#define COLORS 12 -#else -#define COLORS 7 -#endif - #define RaceDefaultOffset (C_ROM - RED) @@ -211,10 +182,8 @@ W_Font W_HighlightFont, W_UnderlineFont; W_Color W_White = WHITE, W_Black = BLACK, W_Red = RED, W_Green = GREEN; W_Color W_Yellow = YELLOW, W_Cyan = CYAN, W_Grey = GREY; -#ifdef RACE_COLORS -W_Color W_Ind = C_IND, W_Fed = C_FED, W_Rom = C_ROM, W_Kli = C_KLI, W_Ori = +W_Color W_God = C_GOD, W_Ind = C_IND, W_Fed = C_FED, W_Rom = C_ROM, W_Kli = C_KLI, W_Ori = C_ORI; -#endif int W_Textwidth = 6, W_Textheight = 10; int forceMono = 0; @@ -260,7 +229,9 @@ , //Cyan { RGB (0xa0, 0xa0, 0xa0), 0, 0, 0} //Light grey -#ifdef RACE_COLORS + , + { + RGB (0xff, 0xff, 0xff), 0, 0, 0} //God , { RGB (0xff, 0x5f, 0x5f), 0, 0, 0} @@ -276,7 +247,6 @@ , //Ori { RGB (0xa0, 0xa0, 0xa0), 0, 0, 0} //Ind -#endif } , @@ -304,7 +274,9 @@ , //Cyan { RGB (0xa0, 0xa0, 0xa0), 0, 0, 0} //Light grey -#ifdef RACE_COLORS + , + { + RGB (0xff, 0xff, 0xff), 0, 0, 0} //God , { RGB (0xff, 0x00, 0x00), 0, 0, 0} @@ -320,7 +292,6 @@ , //Ori { RGB (0xa0, 0xa0, 0xa0), 0, 0, 0} //Ind -#endif }; char *colornames[COLORS] = { @@ -330,15 +301,13 @@ {"green"}, {"yellow"}, {"cyan"}, - {"light grey"} -#ifdef RACE_COLORS - , + {"light grey"}, + {"God"}, {"Rom"}, {"Kli"}, {"Fed"}, {"Ori"}, {"Ind"} -#endif }; HPALETTE NetrekPalette = 0; @@ -968,13 +937,11 @@ char buf[30]; sprintf (buf, "color.%s", colornames[i]); //Check netrekrc file def = stringDefault (buf); -#ifdef RACE_COLORS - if (!def && i >= COLORS - RaceDefaultOffset) // For race colors we use default color + if (!def && i >= COLORS - RaceDefaultOffset) // For race colors we use default color { // color for that race if not set, i.e. sprintf (buf, "color.%s", colornames[i - RaceDefaultOffset]); def = stringDefault (buf); // if "color.rom" is not set, "color.red" } -#endif if (def) if (def[0] == '#') //Explicit RGB color { Index: dmessage.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/dmessage.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- dmessage.c 28 Feb 2007 12:21:50 -0000 1.8 +++ dmessage.c 11 Apr 2007 23:06:33 -0000 1.9 @@ -142,7 +142,7 @@ if (from == 255) { /* From God */ - color = textColor; + color = W_God; } else { Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.94 retrieving revision 1.95 diff -u -d -r1.94 -r1.95 --- local.c 11 Apr 2007 08:03:08 -0000 1.94 +++ local.c 11 Apr 2007 23:06:34 -0000 1.95 @@ -1588,7 +1588,7 @@ /* Here I will have to compute end coordinate */ /* Server will sometimes send us this information though, so check if we have it first */ - if (php->ph_x > 0 && php->ph_y > 0) + if (php->ph_x > 0 && php->ph_y > 0 && php->ph_x < GWIDTH && php->ph_y < GWIDTH) { tx = (php->ph_x - me->p_x) / scaleFactor + TWINSIDE / 2; ty = (php->ph_y - me->p_y) / scaleFactor + TWINSIDE / 2; Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.75 retrieving revision 1.76 diff -u -d -r1.75 -r1.76 --- defaults.c 10 Apr 2007 00:44:03 -0000 1.75 +++ defaults.c 11 Apr 2007 23:06:33 -0000 1.76 @@ -3308,6 +3308,24 @@ #endif if (saveBig) + fputs ("# Color settings\n", fp); + + for (j = 0; j < COLORS; j++) + { + sprintf (str1, "color.%s", colornames[j]); + adefault = stringDefault (str1); + if (adefault) + { + sprintf(str, "%s: %s\n", str1, adefault); + fputs (str, fp); + } + } + fputs ("\n", fp); + + if (saveBig) + fputs ("\n", fp); + + if (saveBig) { fputs ("# Esoteric features such as individual ship rcfiles/keymaps\n", fp); fputs ("# /ckeymaps/buttonmaps (i.e. keymap-ca: ) and observer\n", fp); Index: colors.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/colors.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- colors.c 21 Jan 2003 21:28:39 -0000 1.1.1.1 +++ colors.c 11 Apr 2007 23:06:33 -0000 1.2 @@ -19,19 +19,11 @@ foreColor = W_White; textColor = W_White; -#ifdef RACE_COLORS shipCol[0] = W_Ind; shipCol[1] = W_Fed; shipCol[2] = W_Rom; shipCol[3] = W_Kli; shipCol[4] = W_Ori; -#else - shipCol[0] = W_Grey; - shipCol[1] = W_Yellow; - shipCol[2] = W_Red; - shipCol[3] = W_Green; - shipCol[4] = W_Cyan; -#endif warningColor = W_Red; unColor = W_Grey; Index: map.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- map.c 11 Apr 2007 01:10:05 -0000 1.49 +++ map.c 11 Apr 2007 23:06:34 -0000 1.50 @@ -1208,7 +1208,7 @@ /* Here I will have to compute end coordinate */ /* Server will sometimes send us this information though, so check if we have it first */ - if (ph->ph_x > 0 && ph->ph_y > 0) + if (ph->ph_x > 0 && ph->ph_y > 0 && ph->ph_x < GWIDTH && ph->ph_y < GWIDTH) { tx = ph->ph_x * GWINSIDE / GWIDTH; ty = ph->ph_y * GWINSIDE / GWIDTH; From modemhero at users.sourceforge.net Wed Apr 11 18:06:39 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 11 Apr 2007 23:06:39 +0000 Subject: [netrek-cvs] client/netrekxp/win32 config.h,1.16,1.17 Message-ID: <20070411230648.917D2B403@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/win32 In directory sc8-pr-cvs16:/tmp/cvs-serv22272/win32 Modified Files: config.h Log Message: Yanked RACE_COLOR define, this is standard now. Moved color defines to a common area (defs.h). Added new color to colortable for God messages (default is white). Added all color settings to netrekrc, and added them to the in game save function. The settings in netrekrc are to the "bright" color settings, as players seem to prefer these. Bug fix with phaser misses (check to make sure x,y less than GWIDTH) Index: config.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/win32/config.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- config.h 5 Apr 2007 12:57:22 -0000 1.16 +++ config.h 11 Apr 2007 23:06:37 -0000 1.17 @@ -120,9 +120,6 @@ /* RCM - Receiver configurable Server messages */ #define RCM -/* RACE_COLORS - additional bitplane for race colors */ -#define RACE_COLORS - #define PLIST1 #define PLIST #define CONTROL_KEY From modemhero at users.sourceforge.net Wed Apr 11 18:06:34 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 11 Apr 2007 23:06:34 +0000 Subject: [netrek-cvs] client/netrekxp/include data.h, 1.74, 1.75 defs.h, 1.21, 1.22 wlib.h, 1.11, 1.12 Message-ID: <20070411230716.2435DB403@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs16:/tmp/cvs-serv22272/include Modified Files: data.h defs.h wlib.h Log Message: Yanked RACE_COLOR define, this is standard now. Moved color defines to a common area (defs.h). Added new color to colortable for God messages (default is white). Added all color settings to netrekrc, and added them to the in game save function. The settings in netrekrc are to the "bright" color settings, as players seem to prefer these. Bug fix with phaser misses (check to make sure x,y less than GWIDTH) Index: wlib.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/wlib.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- wlib.h 5 Apr 2007 12:57:22 -0000 1.11 +++ wlib.h 11 Apr 2007 23:06:31 -0000 1.12 @@ -55,9 +55,8 @@ extern W_Font W_BigFont, W_RegularFont, W_UnderlineFont, W_HighlightFont, W_IndyFont; extern W_Color W_White, W_Black, W_Red, W_Green, W_Yellow, W_Cyan, W_Grey; -#ifdef RACE_COLORS -extern W_Color W_Ind, W_Fed, W_Rom, W_Kli, W_Ori; -#endif +extern W_Color W_God, W_Ind, W_Fed, W_Rom, W_Kli, W_Ori; + extern int W_Textwidth, W_Textheight; extern int W_FastClear; extern W_Font W_MyPlanetFont, W_FriendlyPlanetFont, W_EnemyPlanetFont; Index: defs.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/defs.h,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- defs.h 9 Apr 2007 02:52:30 -0000 1.21 +++ defs.h 11 Apr 2007 23:06:31 -0000 1.22 @@ -463,4 +463,20 @@ /* The maximum length of message in buffer */ #define MAX_MLENGTH 286 +/* Colors */ +#define WHITE 0 +#define BLACK 1 +#define RED 2 +#define GREEN 3 +#define YELLOW 4 +#define CYAN 5 +#define GREY 6 +#define C_GOD 7 +#define C_ROM 8 +#define C_KLI 9 +#define C_FED 10 +#define C_ORI 11 +#define C_IND 12 +#define COLORS 13 + #endif /* _h_defs */ Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.74 retrieving revision 1.75 diff -u -d -r1.74 -r1.75 --- data.h 9 Apr 2007 02:52:30 -0000 1.74 +++ data.h 11 Apr 2007 23:06:31 -0000 1.75 @@ -364,6 +364,7 @@ extern W_Icon bmplanets[MPLANET_VIEWS]; extern W_Color borderColor, backColor, textColor, myColor, warningColor, shipCol[5], rColor, yColor, gColor, unColor, foreColor; +extern char *colornames[COLORS]; /* jn - SMARTMACRO */ extern char lastMessage[]; From modemhero at users.sourceforge.net Wed Apr 11 18:06:36 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 11 Apr 2007 23:06:36 +0000 Subject: [netrek-cvs] client/netrekxp/resources/htmlhelp/html generalconfig.html, 1.49, 1.50 Message-ID: <20070411230717.0F5B5B429@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html In directory sc8-pr-cvs16:/tmp/cvs-serv22272/resources/htmlhelp/html Modified Files: generalconfig.html Log Message: Yanked RACE_COLOR define, this is standard now. Moved color defines to a common area (defs.h). Added new color to colortable for God messages (default is white). Added all color settings to netrekrc, and added them to the in game save function. The settings in netrekrc are to the "bright" color settings, as players seem to prefer these. Bug fix with phaser misses (check to make sure x,y less than GWIDTH) Index: generalconfig.html =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html/generalconfig.html,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- generalconfig.html 10 Apr 2007 00:44:03 -0000 1.49 +++ generalconfig.html 11 Apr 2007 23:06:32 -0000 1.50 @@ -143,6 +143,11 @@ two characters +color.<God> +Replace God message color with value +color name + + color.<color> Replace <color> with value color name From modemhero at users.sourceforge.net Wed Apr 11 18:06:34 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 11 Apr 2007 23:06:34 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.170, 1.171 netrekrc, 1.60, 1.61 netrekrc_options.txt, 1.48, 1.49 Message-ID: <20070411230717.386091867E1@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv22272/resources/docs Modified Files: changes.txt netrekrc netrekrc_options.txt Log Message: Yanked RACE_COLOR define, this is standard now. Moved color defines to a common area (defs.h). Added new color to colortable for God messages (default is white). Added all color settings to netrekrc, and added them to the in game save function. The settings in netrekrc are to the "bright" color settings, as players seem to prefer these. Bug fix with phaser misses (check to make sure x,y less than GWIDTH) Index: netrekrc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- netrekrc 10 Apr 2007 05:43:44 -0000 1.60 +++ netrekrc 11 Apr 2007 23:06:32 -0000 1.61 @@ -1085,6 +1085,22 @@ msg.ghostbust: GOD->ALL %i (%S) (%T%c) was kill %k for the GhostBusters +# Color settings +color.white: white +color.black: black +color.red: red +color.green: green +color.yellow: yellow +color.cyan: cyan +color.light grey: gray63 +color.God: white +color.Rom: red +color.Kli: green +color.Fed: yellow +color.Ori: cyan +color.Ind: gray63 + + # Esoteric features such as individual ship rcfiles/keymaps # /ckeymaps/buttonmaps (i.e. keymap-ca: ) and observer # /servertype options (i.e. keymap.bronco: ) Index: netrekrc_options.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc_options.txt,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- netrekrc_options.txt 10 Apr 2007 00:44:03 -0000 1.48 +++ netrekrc_options.txt 11 Apr 2007 23:06:32 -0000 1.49 @@ -28,6 +28,7 @@ ckeymap-: (string) use this ckeymap for ship (sc,dd,ca,bb,as,sb,ga,att) cloakChars: (two chars) how to display cloaker on galactic clickDelay: (0-50) delay before continuous mouse clicks, in updates (0 = no delay) +color.God: (color) replace God message color with (color) color.: (color) replace first with (color) color.: (color) replace that race color with (color) colorClient: (0-3) what type of ship bitmaps to use Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.170 retrieving revision 1.171 diff -u -d -r1.170 -r1.171 --- changes.txt 11 Apr 2007 01:10:04 -0000 1.170 +++ changes.txt 11 Apr 2007 23:06:32 -0000 1.171 @@ -1,4 +1,6 @@ Netrek XP 2006, Version 1.3: +- color settings now save and are now all listed in netrekrc +- added netrekrc option "color.God: " to alter color of God messages - resizing the local and map windows now only lets you size them as squares - richtext message windows are now resizeable, it works a little different than sizing other windows. First you left click on the window once to activate the sizing border, @@ -16,8 +18,7 @@ - preference for showing main title bar (toggled via alt+enter) is now saved via in-game save key - Window placements and sizes to save with the in-game save key. In the special case - of local and map windows, if you set the windows to non-square, and save them, they - will save as squares (those windows really don't work right if they aren't square). + of local and map windows, they will always be square. In the case of the main window, it won't save placement, for now (complicated to do). All other windows will obey size and placements you give them. Hopefully this takes some of the pain out of setting up windows (you should be able to do it without From modemhero at users.sourceforge.net Wed Apr 11 18:06:33 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 11 Apr 2007 23:06:33 +0000 Subject: [netrek-cvs] client/netrekxp clientr.suo,1.117,1.118 Message-ID: <20070411230712.4F2E5B403@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs16:/tmp/cvs-serv22272 Modified Files: clientr.suo Log Message: Yanked RACE_COLOR define, this is standard now. Moved color defines to a common area (defs.h). Added new color to colortable for God messages (default is white). Added all color settings to netrekrc, and added them to the in game save function. The settings in netrekrc are to the "bright" color settings, as players seem to prefer these. Bug fix with phaser misses (check to make sure x,y less than GWIDTH) Index: clientr.suo =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.suo,v retrieving revision 1.117 retrieving revision 1.118 diff -u -d -r1.117 -r1.118 Binary files /tmp/cvsBNfYBT and /tmp/cvsr8aa7Q differ From modemhero at users.sourceforge.net Wed Apr 11 19:56:30 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 12 Apr 2007 00:56:30 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.171, 1.172 netrekrc, 1.61, 1.62 Message-ID: <20070412005639.04D43B402@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv17208/resources/docs Modified Files: changes.txt netrekrc Log Message: Password, playerlist2 layout, b1keymap - b5keymap, and metaservers now save via in-game save key. Netrekrc now has a line for playerList2 and password so people know these more useful options exist. Yet another bug fix for phaser misses (set x,y to 0 on miss if phaser is received via short packets). Index: netrekrc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- netrekrc 11 Apr 2007 23:06:32 -0000 1.61 +++ netrekrc 12 Apr 2007 00:56:28 -0000 1.62 @@ -1,6 +1,9 @@ # Default character name name: guest +# Default password +password: + # Login name login: netrek_player @@ -583,6 +586,7 @@ # 'V' - Kills per hour # 'W' - Wins playerList: nTR N K l M +playerList2: n T R N l M K W L r O D d # Window placements section @@ -1102,5 +1106,6 @@ # Esoteric features such as individual ship rcfiles/keymaps -# /ckeymaps/buttonmaps (i.e. keymap-ca: ) and observer -# /servertype options (i.e. keymap.bronco: ) +# /ckeymaps/buttonmaps (i.e. keymap-ca: ), observer +# /servertype options (i.e. keymap.bronco: ), and +# button keymaps (b1keymap through b5keymap) Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.171 retrieving revision 1.172 diff -u -d -r1.171 -r1.172 --- changes.txt 11 Apr 2007 23:06:32 -0000 1.171 +++ changes.txt 12 Apr 2007 00:56:28 -0000 1.172 @@ -1,4 +1,6 @@ Netrek XP 2006, Version 1.3: +- password, playerlist2 layout, b1keymap - b5keymap, and metaservers now save via + in-game save key - color settings now save and are now all listed in netrekrc - added netrekrc option "color.God: " to alter color of God messages - resizing the local and map windows now only lets you size them as squares From modemhero at users.sourceforge.net Wed Apr 11 19:56:30 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 12 Apr 2007 00:56:30 +0000 Subject: [netrek-cvs] client/netrekxp/include playerlist.h,1.2,1.3 Message-ID: <20070412005638.D98DB1867D9@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs16:/tmp/cvs-serv17208/include Modified Files: playerlist.h Log Message: Password, playerlist2 layout, b1keymap - b5keymap, and metaservers now save via in-game save key. Netrekrc now has a line for playerList2 and password so people know these more useful options exist. Yet another bug fix for phaser misses (set x,y to 0 on miss if phaser is received via short packets). Index: playerlist.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/playerlist.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- playerlist.h 21 Apr 2006 12:00:06 -0000 1.2 +++ playerlist.h 12 Apr 2007 00:56:27 -0000 1.3 @@ -34,6 +34,7 @@ extern int partitionPlist; extern char *plistCustomLayout; +extern char *plist2CustomLayout; extern int plistReorder; extern int playerListStyle; extern int plistUpdated; @@ -42,6 +43,7 @@ extern char updatePlayer[MAXPLAYER + 1]; extern int playerListObserver; extern char *plistLayout; +extern char *plist2Layout; #ifdef PLIST2 extern int plistHasHostile = FALSE; From modemhero at users.sourceforge.net Wed Apr 11 19:56:30 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 12 Apr 2007 00:56:30 +0000 Subject: [netrek-cvs] client/netrekxp/src defaults.c, 1.76, 1.77 local.c, 1.95, 1.96 short.c, 1.22, 1.23 Message-ID: <20070412005639.A24421867EF@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv17208/src Modified Files: defaults.c local.c short.c Log Message: Password, playerlist2 layout, b1keymap - b5keymap, and metaservers now save via in-game save key. Netrekrc now has a line for playerList2 and password so people know these more useful options exist. Yet another bug fix for phaser misses (set x,y to 0 on miss if phaser is received via short packets). Index: short.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/short.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- short.c 8 Apr 2007 22:36:42 -0000 1.22 +++ short.c 12 Apr 2007 00:56:28 -0000 1.23 @@ -2016,6 +2016,8 @@ target = (unsigned char) packet->target & 0x3f; break; case PHMISS: + x = 0; + y = 0; dir = (unsigned char) packet->target; break; case PHHIT2: Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.95 retrieving revision 1.96 diff -u -d -r1.95 -r1.96 --- local.c 11 Apr 2007 23:06:34 -0000 1.95 +++ local.c 12 Apr 2007 00:56:28 -0000 1.96 @@ -1590,6 +1590,7 @@ so check if we have it first */ if (php->ph_x > 0 && php->ph_y > 0 && php->ph_x < GWIDTH && php->ph_y < GWIDTH) { + LineToConsole("x, y %d %d\n", php->ph_x, php->ph_y); tx = (php->ph_x - me->p_x) / scaleFactor + TWINSIDE / 2; ty = (php->ph_y - me->p_y) / scaleFactor + TWINSIDE / 2; } Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.76 retrieving revision 1.77 diff -u -d -r1.76 -r1.77 --- defaults.c 11 Apr 2007 23:06:33 -0000 1.76 +++ defaults.c 12 Apr 2007 00:56:28 -0000 1.77 @@ -2151,7 +2151,18 @@ if (saveBig) fputs ("\n", fp); } - + + // Password + if (defpasswd != NULL) + { + if (saveBig) + fputs ("# Default password\n", fp); + sprintf (str, "password: %s\n", defpasswd); + fputs (str, fp); + if (saveBig) + fputs ("\n", fp); + } + // Login if (login != NULL) { @@ -2163,6 +2174,17 @@ fputs ("\n", fp); } + // Metaserver + if ((adefault = stringDefault ("metaServer")) != 0) + { + if (saveBig) + fputs ("# Metaserver(s)\n", fp); + sprintf (str, "metaServer: %s\n", adefault); + fputs (str, fp); + if (saveBig) + 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 @@ -2212,16 +2234,15 @@ fputs ("\n", fp); // Ckeymap - if (saveBig && (adefault = stringDefault ("ckeymap")) != 0) - fputs ("# Control-key key mapping\n", fp); - - if (adefault) + if ((adefault = stringDefault ("ckeymap")) != 0) { + if (saveBig) + fputs ("# Control-key key mapping\n", fp); sprintf (str, "ckeymap: %s\n", adefault); fputs (str, fp); + if (saveBig) + fputs ("\n", fp); } - if (saveBig && adefault) - fputs ("\n", fp); // Let's print buttonmap str[0] = '\0'; @@ -2424,12 +2445,16 @@ } sprintf (str, "playerList: %s\n", plistLayout); fputs (str, fp); - - if (saveBig) - fputs ("\n", fp); } - + // player2 list + if (strlen (plist2Layout) != 0) + { + sprintf (str, "playerList2: %s\n", plist2Layout); + fputs (str, fp); + } fputs ("\n", fp); + if (saveBig) + fputs ("\n", fp); // Window placements if (saveWindow) @@ -3328,8 +3353,9 @@ if (saveBig) { fputs ("# Esoteric features such as individual ship rcfiles/keymaps\n", fp); - fputs ("# /ckeymaps/buttonmaps (i.e. keymap-ca: ) and observer\n", fp); - fputs ("# /servertype options (i.e. keymap.bronco: )\n", fp); + fputs ("# /ckeymaps/buttonmaps (i.e. keymap-ca: ), observer\n", fp); + fputs ("# /servertype options (i.e. keymap.bronco: ), and\n", fp); + fputs ("# button keymaps (b1keymap through b5keymap)\n", fp); } // Individual ship type settings for (j = NUM_TYPES; j >= 0; j--) @@ -3391,6 +3417,38 @@ } sl = sl->next; } + + // Button keymaps + adefault = stringDefault ("b1keymap"); + if (adefault) + { + sprintf (str, "b1keymap: %s\n", adefault); + fputs (str, fp); + } + adefault = stringDefault ("b2keymap"); + if (adefault) + { + sprintf (str, "b2keymap: %s\n", adefault); + fputs (str, fp); + } + adefault = stringDefault ("b3keymap"); + if (adefault) + { + sprintf (str, "b3keymap: %s\n", adefault); + fputs (str, fp); + } + adefault = stringDefault ("b4keymap"); + if (adefault) + { + sprintf (str, "b4keymap: %s\n", adefault); + fputs (str, fp); + } + adefault = stringDefault ("b5keymap"); + if (adefault) + { + sprintf (str, "b5keymap: %s\n", adefault); + fputs (str, fp); + } fclose (fp); } \ No newline at end of file From modemhero at users.sourceforge.net Thu Apr 12 04:06:12 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 12 Apr 2007 09:06:12 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.172, 1.173 Message-ID: <20070412090621.ED029186800@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv15958/resources/docs Modified Files: changes.txt Log Message: Bug fix to messages not scrolling properly in richtext windows if message takes more than 1 line due to window resizing/whatever. Added option for autogenerated filenames for game recordings. Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.172 retrieving revision 1.173 diff -u -d -r1.172 -r1.173 --- changes.txt 12 Apr 2007 00:56:28 -0000 1.172 +++ changes.txt 12 Apr 2007 09:06:09 -0000 1.173 @@ -1,4 +1,6 @@ Netrek XP 2006, Version 1.3: +- cambot files names are now autogenerated, similiar to logfile names, if no name + is given (names will be like 20070401.pkt) - password, playerlist2 layout, b1keymap - b5keymap, and metaservers now save via in-game save key - color settings now save and are now all listed in netrekrc From modemhero at users.sourceforge.net Thu Apr 12 04:06:12 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 12 Apr 2007 09:06:12 +0000 Subject: [netrek-cvs] client/netrekxp/src main.c, 1.11, 1.12 mswindow.c, 1.68, 1.69 Message-ID: <20070412090621.E91B2B403@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv15958/src Modified Files: main.c mswindow.c Log Message: Bug fix to messages not scrolling properly in richtext windows if message takes more than 1 line due to window resizing/whatever. Added option for autogenerated filenames for game recordings. Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.68 retrieving revision 1.69 diff -u -d -r1.68 -r1.69 --- mswindow.c 11 Apr 2007 23:06:34 -0000 1.68 +++ mswindow.c 12 Apr 2007 09:06:10 -0000 1.69 @@ -6017,6 +6017,7 @@ struct stringList *p = win->strings; struct stringList *end, *p2; int NumStrings = win->NumItems; + int diff; char str1[256]; CHARFORMAT2 cf; POINT point; @@ -6106,13 +6107,10 @@ SendMessage (win->hwnd, EM_SETSEL, -1, -1); SendMessage (win->hwnd, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf); SendMessage (win->hwnd, EM_REPLACESEL, FALSE, (LPARAM) str1); - if (numLines - point.y / W_Textheight > visibleLines + 1) - { - SendMessage (win->hwnd, EM_SETSCROLLPOS, 0, (LPARAM) &point); - } - else if (numLines - point.y / W_Textheight == visibleLines + 1) + diff = numLines - point.y / W_Textheight - visibleLines; + if (diff >= 1) { - point.y += W_Textheight; + point.y += W_Textheight * diff; SendMessage (win->hwnd, EM_SETSCROLLPOS, 0, (LPARAM) &point); } //SendMessage (win->hwnd, EM_HIDESELECTION, FALSE, 0); Index: main.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/main.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- main.c 27 Nov 2006 07:08:41 -0000 1.11 +++ main.c 12 Apr 2007 09:06:10 -0000 1.12 @@ -43,7 +43,7 @@ LineToConsole (" [-U udp_port] specify client UDP port (useful for some firewalls)\n"); #ifdef RECORDGAME LineToConsole (" [-F filename] view recorded game from 'filename'\n"); - LineToConsole (" [-f filename] record game into 'filename'\n"); + LineToConsole (" [-f filename] record game into 'filename' (filename is autogenerated if none is provided)\n"); #endif LineToConsole (" [-l filename] record messages into 'filename'\n"); LineToConsole (" [-L] record messages into autogenerated log file with filename YYYYMMDD.log\n"); @@ -175,7 +175,11 @@ i++; } else - usage++; + { + tm = time(NULL); + strftime(s, 20, "%Y%m%d.pkt", localtime(&tm)); + recordFileName = s; + } break; #endif case 'l': /* log to file */ From modemhero at users.sourceforge.net Thu Apr 12 04:06:11 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 12 Apr 2007 09:06:11 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C, 1.135, 1.136 clientr.suo, 1.118, 1.119 Message-ID: <20070412090621.EAB3F1867EF@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs16:/tmp/cvs-serv15958 Modified Files: NetrekXP to do list.C clientr.suo Log Message: Bug fix to messages not scrolling properly in richtext windows if message takes more than 1 line due to window resizing/whatever. Added option for autogenerated filenames for game recordings. Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.135 retrieving revision 1.136 diff -u -d -r1.135 -r1.136 --- NetrekXP to do list.C 11 Apr 2007 08:03:08 -0000 1.135 +++ NetrekXP to do list.C 12 Apr 2007 09:06:07 -0000 1.136 @@ -37,6 +37,7 @@ if you fly into the NW corner of the galaxy. this was never anticipated! 9) if cursor is in window and it receives a message, it scrolls to bottom automatically, bad if you are scrolling up reading history +10) check if scrolling is working ok with recent fix to setting position Wish list: 1) Rewrite graphics engine using SDL Index: clientr.suo =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.suo,v retrieving revision 1.118 retrieving revision 1.119 diff -u -d -r1.118 -r1.119 Binary files /tmp/cvsbvfpU1 and /tmp/cvs031aQt differ From modemhero at users.sourceforge.net Fri Apr 13 02:12:24 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 13 Apr 2007 07:12:24 +0000 Subject: [netrek-cvs] client/netrekxp/include data.h, 1.75, 1.76 defs.h, 1.22, 1.23 proto.h, 1.48, 1.49 wlib.h, 1.12, 1.13 Message-ID: <20070413071303.2C5B3186800@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs16:/tmp/cvs-serv22675/include Modified Files: data.h defs.h proto.h wlib.h Log Message: This patch begins the work on making the game work when font size changes. Added new font W_SmallFont which will always be the traditional 6x10 pixel font. Not used currently, but for applications that require a small font regardless of regular font size, will use this. Fontsize is now a proper global variable and the ability to change it via netrekrc is now made aware to user via netrekrc entry. Restored xtrekrc and motdwin (aka entry window) to follow TWINSIDE as it seems the right thing to do, people expect tactical window and entry window to be same size. Removed debug statement in phasers I left in on accident. Centered planet names and army count on global map, so they scale properly with font size. Moved handy MIN function to global defs file. Added functions for determining size of stats window width and height for initial window creation. Main title bar is now on by default (most people agreed it should be on, deferring to their opinion). Fixed a ton of places where entry window was not scaling properly to text height. Team and quit windows will now remap properly if entry window is moved/resized. Fixed ping stats and stat window widths so that slider bars are never lost if font size is increased greatly. Index: wlib.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/wlib.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- wlib.h 11 Apr 2007 23:06:31 -0000 1.12 +++ wlib.h 13 Apr 2007 07:12:21 -0000 1.13 @@ -52,7 +52,7 @@ typedef char *W_Font; typedef int W_Color; -extern W_Font W_BigFont, W_RegularFont, W_UnderlineFont, W_HighlightFont, +extern W_Font W_BigFont, W_SmallFont, W_RegularFont, W_UnderlineFont, W_HighlightFont, W_IndyFont; extern W_Color W_White, W_Black, W_Red, W_Green, W_Yellow, W_Cyan, W_Grey; extern W_Color W_God, W_Ind, W_Fed, W_Rom, W_Kli, W_Ori; Index: defs.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/defs.h,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- defs.h 11 Apr 2007 23:06:31 -0000 1.22 +++ defs.h 13 Apr 2007 07:12:20 -0000 1.23 @@ -162,6 +162,7 @@ #ifndef MAX #define MAX(a,b) ((a) > (b) ? (a) : (b)) #endif +#define MIN(a,b) ((a) < (b) ? (a) : (b)) #define myPlasmaTorp(t) (me->p_no == (t)->pt_owner) #define myTorp(t) (me->p_no == (t)->t_owner) Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.75 retrieving revision 1.76 diff -u -d -r1.75 -r1.76 --- data.h 11 Apr 2007 23:06:31 -0000 1.75 +++ data.h 13 Apr 2007 07:12:20 -0000 1.76 @@ -641,6 +641,7 @@ extern int redrawall; /* Erase and redraw the galactic? */ extern int autoQuit; +extern int fontSize; extern int forceDisplay; extern int forceMono; extern int metaType; Index: proto.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/proto.h,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- proto.h 10 Apr 2007 00:44:02 -0000 1.48 +++ proto.h 13 Apr 2007 07:12:21 -0000 1.49 @@ -1172,6 +1172,8 @@ /******************************************************************************/ /*** stats.c /******************************************************************************/ + int StatsHeight (void); + int StatsWidth (void); void initStats (); void redrawStats (); void updateStats (); From modemhero at users.sourceforge.net Fri Apr 13 02:12:28 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 13 Apr 2007 07:12:28 +0000 Subject: [netrek-cvs] client/netrekxp/src data.c, 1.81, 1.82 defaults.c, 1.77, 1.78 docwin.c, 1.4, 1.5 findslot.c, 1.8, 1.9 getname.c, 1.8, 1.9 local.c, 1.96, 1.97 map.c, 1.50, 1.51 mswindow.c, 1.69, 1.70 newwin.c, 1.60, 1.61 pingstats.c, 1.4, 1.5 stats.c, 1.3, 1.4 Message-ID: <20070413071240.98815186800@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv22675/src Modified Files: data.c defaults.c docwin.c findslot.c getname.c local.c map.c mswindow.c newwin.c pingstats.c stats.c Log Message: This patch begins the work on making the game work when font size changes. Added new font W_SmallFont which will always be the traditional 6x10 pixel font. Not used currently, but for applications that require a small font regardless of regular font size, will use this. Fontsize is now a proper global variable and the ability to change it via netrekrc is now made aware to user via netrekrc entry. Restored xtrekrc and motdwin (aka entry window) to follow TWINSIDE as it seems the right thing to do, people expect tactical window and entry window to be same size. Removed debug statement in phasers I left in on accident. Centered planet names and army count on global map, so they scale properly with font size. Moved handy MIN function to global defs file. Added functions for determining size of stats window width and height for initial window creation. Main title bar is now on by default (most people agreed it should be on, deferring to their opinion). Fixed a ton of places where entry window was not scaling properly to text height. Team and quit windows will now remap properly if entry window is moved/resized. Fixed ping stats and stat window widths so that slider bars are never lost if font size is increased greatly. Index: findslot.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/findslot.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- findslot.c 6 Apr 2007 06:46:31 -0000 1.8 +++ findslot.c 13 Apr 2007 07:12:24 -0000 1.9 @@ -142,8 +142,8 @@ W_MapWindow (waitqWin); if (showMotd) { - motdWin = W_MakeWindow ("waitmotd", 1, WAITWIDTH + 1, 500, - 500, 0, 2, foreColor); + motdWin = W_MakeWindow ("waitmotd", 1, WAITWIDTH + 1, TWINSIDE, + TWINSIDE, 0, 2, foreColor); W_MapWindow (motdWin); showMotdWin (motdWin, WaitMotdLine); } Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.69 retrieving revision 1.70 diff -u -d -r1.69 -r1.70 --- mswindow.c 12 Apr 2007 09:06:10 -0000 1.69 +++ mswindow.c 13 Apr 2007 07:12:24 -0000 1.70 @@ -178,7 +178,7 @@ HWND AnyWindow; int W_FastClear = 0; -W_Font W_BigFont, W_RegularFont; +W_Font W_BigFont, W_SmallFont, W_RegularFont; W_Font W_HighlightFont, W_UnderlineFont; W_Color W_White = WHITE, W_Black = BLACK, W_Red = RED, W_Green = GREEN; W_Color W_Yellow = YELLOW, W_Cyan = CYAN, W_Grey = GREY; @@ -401,6 +401,7 @@ DeleteObject ((HFONT) W_RegularFont); DeleteObject ((HFONT) W_HighlightFont); DeleteObject ((HFONT) W_UnderlineFont); + DeleteObject ((HFONT) W_SmallFont); DeleteObject ((HFONT) W_BigFont); strcpy (FileName, GetExeDir ()); @@ -751,7 +752,7 @@ lf.lfPitchAndFamily = FF_MODERN | FIXED_PITCH; strcpy (lf.lfFaceName, "Netrek"); - lf.lfHeight = -intDefault ("fontsize", 10); + lf.lfHeight = -intDefault ("fontSize", fontSize); lf.lfWeight = FW_REGULAR; W_RegularFont = (W_Font) CreateFontIndirect (&lf); @@ -765,9 +766,15 @@ lf.lfUnderline = TRUE; W_UnderlineFont = (W_Font) CreateFontIndirect (&lf); + //Make a small font for whatever we need + strcpy (lf.lfFaceName, "Netrek"); + lf.lfUnderline = FALSE; + lf.lfHeight = 10; + lf.lfWidth = 6; + W_SmallFont = (W_Font) CreateFontIndirect (&lf); + //Use arial for the BigFont strcpy (lf.lfFaceName, "Arial"); - lf.lfUnderline = FALSE; lf.lfWeight = FW_MEDIUM; lf.lfHeight = 52; lf.lfWidth = 32; @@ -1990,11 +1997,15 @@ W_UnmapWindow (teamWin[i]); teamWin[i] = W_MakeWindow (teamshort[1 << i], i * (TWINSIDE / 5), TWINSIDE - (TWINSIDE / 5), (TWINSIDE / 5), (TWINSIDE / 5), w, 1, foreColor); + if (!ingame) + W_MapWindow (teamWin[i]); } W_UnmapWindow (qwin); qwin = W_MakeWindow ("quit", 4 * (TWINSIDE / 5), TWINSIDE - (TWINSIDE / 5), (TWINSIDE / 5), (TWINSIDE / 5), w, 1, foreColor); + if (!ingame) + W_MapWindow (qwin); W_FastClear = 1; if (viewBox) Index: pingstats.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/pingstats.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- pingstats.c 13 Feb 2007 04:34:32 -0000 1.4 +++ pingstats.c 13 Apr 2007 07:12:25 -0000 1.5 @@ -10,8 +10,6 @@ #include "data.h" #include "proto.h" -#define MIN(a,b) (((a) < (b)) ? (a) : (b)) - #define BX_OFF() ((textWidth + 1) * W_Textwidth + S_IBORDER) #define BY_OFF(line) ((line) * (W_Textheight + S_IBORDER) + S_IBORDER) #define TX_OFF(len) ((textWidth - len) * W_Textwidth + S_IBORDER) @@ -19,7 +17,8 @@ /* right side labels */ #define TEXT_WIDTH (5*W_Textwidth + 2*STAT_BORDER) -#define STAT_WIDTH (260 + TEXT_WIDTH) +/* width assumes no label longer than 17 chars */ +#define STAT_WIDTH (MAX(260, TEXT_WIDTH + 17*W_Textwidth) + TEXT_WIDTH) #define STAT_HEIGHT BY_OFF(NUM_SLIDERS) #define STAT_BORDER 2 #define S_IBORDER 5 @@ -27,7 +26,7 @@ #define STAT_Y 13 #define SL_WID \ - (STAT_WIDTH -TEXT_WIDTH - 2 * S_IBORDER - (textWidth + 1) * W_Textwidth) + (STAT_WIDTH - TEXT_WIDTH - 2 * S_IBORDER - (textWidth + 1) * W_Textwidth) #define SL_HEI (W_Textheight) #define NUM_ELS(a) (sizeof (a) / sizeof (*(a))) Index: newwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/newwin.c,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- newwin.c 6 Apr 2007 06:46:32 -0000 1.60 +++ newwin.c 13 Apr 2007 07:12:25 -0000 1.61 @@ -1016,7 +1016,7 @@ BOXSIDE, w, 1, foreColor); statwin = W_MakeWindow ("stats", TWINSIDE + 2 * THICKBORDER - 100, TWINSIDE + 2 * THICKBORDER, - 100, 80, baseWin, BORDER, foreColor); + StatsWidth(), StatsHeight(), baseWin, BORDER, foreColor); W_SetWindowExposeHandler (statwin, redrawStats); W_DefineTrekCursor (baseWin); @@ -1935,12 +1935,12 @@ sprintf (buf, "--- %s ---", (char *) query_cowid ()); length = strlen (buf); - center = 250 - (length * W_Textwidth) / 2; + center = TWINSIDE / 2 - (length * W_Textwidth) / 2; W_WriteText (motdwin, center, W_Textheight, textColor, buf, length, W_BoldFont); sprintf (buf, CBUGS); length = strlen (buf); - center = 250 - (length * W_Textwidth) / 2; + center = TWINSIDE / 2 - (length * W_Textwidth) / 2; W_WriteText (motdwin, center, 3 * W_Textheight, textColor, buf, length, W_RegularFont); Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.96 retrieving revision 1.97 diff -u -d -r1.96 -r1.97 --- local.c 12 Apr 2007 00:56:28 -0000 1.96 +++ local.c 13 Apr 2007 07:12:24 -0000 1.97 @@ -1590,7 +1590,6 @@ so check if we have it first */ if (php->ph_x > 0 && php->ph_y > 0 && php->ph_x < GWIDTH && php->ph_y < GWIDTH) { - LineToConsole("x, y %d %d\n", php->ph_x, php->ph_y); tx = (php->ph_x - me->p_x) / scaleFactor + TWINSIDE / 2; ty = (php->ph_y - me->p_y) / scaleFactor + TWINSIDE / 2; } Index: getname.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/getname.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- getname.c 23 Feb 2007 13:43:56 -0000 1.8 +++ getname.c 13 Apr 2007 07:12:24 -0000 1.9 @@ -60,7 +60,7 @@ autologin = 0; *defpasswd = *password1 = *password2 = '\0'; - W_WriteText (w, 100, 130, textColor, alf, strlen (alf), W_BoldFont); + W_WriteText (w, 100, 30 + 10 * W_Textheight, textColor, alf, strlen (alf), W_BoldFont); } @@ -97,7 +97,7 @@ { length = strlen (README[i]); - W_WriteText (w, 20, i * W_Textheight + 220, textColor, README[i], + W_WriteText (w, 20, i * W_Textheight + 30 + 19 * W_Textheight, textColor, README[i], length, W_RegularFont); } } @@ -185,7 +185,7 @@ if (loginAccept == 0) { s = "Bad password!"; - W_WriteText (w, 100, 110, textColor, s, strlen (s), W_BoldFont); + W_WriteText (w, 100, 30 + 8 * W_Textheight, textColor, s, strlen (s), W_BoldFont); (void) W_EventsPending (); sleep (1); W_ClearWindow (w); @@ -230,7 +230,7 @@ if (strcmp (password1, password2) != 0) { s = "Passwords do not match"; - W_WriteText (w, 100, 160, textColor, s, strlen (s), W_BoldFont); + W_WriteText (w, 100, 30 + 13 * W_Textheight, textColor, s, strlen (s), W_BoldFont); (void) W_EventsPending (); sleep (3); W_ClearWindow (w); @@ -255,16 +255,17 @@ W_WriteText (w, 40, 30, textColor, t, strlen (t), W_RegularFont); t = "a temporary name or hit ^G (CTRL-G) to autologin as guest."; - W_WriteText (w, 40, 40, textColor, t, strlen (t), W_RegularFont); + W_WriteText (w, 40, 30 + W_Textheight, textColor, t, strlen (t), W_RegularFont); t = "Or, hit ^D (CTRL-D) with a blank name to exit immediately."; - W_WriteText (w, 40, 50, textColor, t, strlen (t), W_RegularFont); + W_WriteText (w, 40, 30 + 2 * W_Textheight, textColor, t, strlen (t), W_RegularFont); sprintf (s, "Character name (\"%s\"): ", defname); - W_WriteText (w, 40, 70, textColor, s, strlen (s), W_RegularFont); + W_WriteText (w, 40, 30 + 4 * W_Textheight, textColor, s, strlen (s), W_RegularFont); t = ". ."; - W_WriteText (w, 40 + ((20 + strlen (defname)) * W_Textwidth), 68, + W_WriteText (w, 40 + ((20 + strlen (defname)) * W_Textwidth), + 30 + 4 * W_Textheight - W_Textheight / 5, textColor, t, strlen (t), W_RegularFont); } @@ -288,65 +289,65 @@ sprintf (buf, "Connection established to %s", serverName); t = buf; - W_WriteText (w, 100, 170, textColor, t, strlen (t), W_BoldFont); + W_WriteText (w, 100, 30 + 14 * W_Textheight, textColor, t, strlen (t), W_BoldFont); sprintf (s, "%-15s", tempname); - W_WriteText (w, 40 + (21 + strlen (defname)) * W_Textwidth, 70, textColor, + W_WriteText (w, 40 + (21 + strlen (defname)) * W_Textwidth, 30 + 4 * W_Textheight, textColor, s, strlen (s), W_BoldFont); t = " ^ "; W_WriteText (w, 40 + (20 + strlen (defname) + - strlen (tempname)) * W_Textwidth, 80, textColor, t, 3, + strlen (tempname)) * W_Textwidth, 30 + 5 * W_Textheight, textColor, t, 3, W_RegularFont); if (state == ST_GETPASS) { t = "Enter password: "; - W_WriteText (w, 100, 90, textColor, t, strlen (t), W_BoldFont); + W_WriteText (w, 100, 30 + 6 * W_Textheight, textColor, t, strlen (t), W_BoldFont); t = ". ."; - W_WriteText (w, 100 + ((16) * W_Textwidth), 88, + W_WriteText (w, 100 + ((16) * W_Textwidth), 30 + 6 * W_Textheight - W_Textheight / 5, textColor, t, strlen (t), W_RegularFont); for (i = 0; i < strlen (password1); i++) - W_WriteText (w, 100 + ((16 + 1 + i) * W_Textwidth), 90, + W_WriteText (w, 100 + ((16 + 1 + i) * W_Textwidth), 30 + 6 * W_Textheight, textColor, "x", 1, W_BoldFont); t = " ^ "; W_WriteText (w, 100 + (16 + strlen (password1)) * W_Textwidth, - 100, textColor, t, 3, W_RegularFont); + 30 + 7 * W_Textheight, textColor, t, 3, W_RegularFont); } if (state > ST_GETPASS) { t = "You need to make a password."; - W_WriteText (w, 100, 90, textColor, t, strlen (t), W_BoldFont); + W_WriteText (w, 100, 30 + 6 * W_Textheight, textColor, t, strlen (t), W_BoldFont); t = "So think of a password you can remember, and enter it."; - W_WriteText (w, 100, 100, textColor, t, strlen (t), W_BoldFont); + W_WriteText (w, 100, 30 + 7 * W_Textheight, textColor, t, strlen (t), W_BoldFont); t = "What is your password? :"; - W_WriteText (w, 100, 110, textColor, t, strlen (t), W_BoldFont); + W_WriteText (w, 100, 30 + 8 * W_Textheight, textColor, t, strlen (t), W_BoldFont); t = ". ."; - W_WriteText (w, 100 + ((24) * W_Textwidth), 108, + W_WriteText (w, 100 + ((24) * W_Textwidth), 30 + 8 * W_Textheight - W_Textheight / 5, textColor, t, strlen (t), W_RegularFont); for (i = 0; i < strlen (password1); i++) - W_WriteText (w, 100 + ((24 + 1 + i) * W_Textwidth), 110, + W_WriteText (w, 100 + ((24 + 1 + i) * W_Textwidth), 30 + 8 * W_Textheight, textColor, "x", 1, W_BoldFont); t = " ^ "; W_WriteText (w, 100 + (24 + strlen (password1)) * W_Textwidth, - 120, textColor, t, 3, W_RegularFont); + 30 + 9 * W_Textheight, textColor, t, 3, W_RegularFont); } if (state == ST_MAKEPASS2) { t = "Enter it again to make sure you typed it right."; - W_WriteText (w, 100, 130, textColor, t, strlen (t), W_BoldFont); + W_WriteText (w, 100, 30 + 10 * W_Textheight, textColor, t, strlen (t), W_BoldFont); t = "Your password? :"; - W_WriteText (w, 100, 140, textColor, t, strlen (t), W_BoldFont); + W_WriteText (w, 100, 30 + 11 * W_Textheight, textColor, t, strlen (t), W_BoldFont); t = ". ."; - W_WriteText (w, 100 + ((16) * W_Textwidth), 138, + W_WriteText (w, 100 + ((16) * W_Textwidth), 30 + 11 * W_Textheight - W_Textheight / 5, textColor, t, strlen (t), W_RegularFont); for (i = 0; i < strlen (password2); i++) - W_WriteText (w, 100 + ((16 + 1 + i) * W_Textwidth), 140, + W_WriteText (w, 100 + ((16 + 1 + i) * W_Textwidth), 30 + 11 * W_Textheight, textColor, "x", 1, W_BoldFont); t = " ^ "; W_WriteText (w, 100 + (16 + strlen (password2)) * W_Textwidth, - 150, textColor, t, 3, W_RegularFont); + 30 + 12 * W_Textheight, textColor, t, 3, W_RegularFont); } } Index: stats.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/stats.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- stats.c 20 Sep 2006 16:54:20 -0000 1.3 +++ stats.c 13 Apr 2007 07:12:25 -0000 1.4 @@ -23,18 +23,14 @@ #include "data.h" #include "proto.h" -#define MIN(a,b) (((a) < (b)) ? (a) : (b)) - #define BX_OFF() ((textWidth + 1) * W_Textwidth + S_IBORDER) #define BY_OFF(line) ((line) * (W_Textheight + S_IBORDER) + S_IBORDER) #define TX_OFF(len) ((textWidth - len) * W_Textwidth + S_IBORDER) #define TY_OFF(line) BY_OFF(line) -#if 0 -#define STAT_WIDTH 160 -#else -#define STAT_WIDTH st_width -#endif +/* left side labels, assumes no label longer than 2 chars */ +#define TEXT_WIDTH (2*W_Textwidth + 2*STAT_BORDER) +#define STAT_WIDTH (MAX(80,TEXT_WIDTH) + TEXT_WIDTH) #define STAT_HEIGHT BY_OFF(NUM_SLIDERS) #define STAT_BORDER 2 #define S_IBORDER 5 @@ -79,7 +75,17 @@ static int textWidth = 0; static int initialized = 0; -static int st_width = -1; +int +StatsHeight (void) +{ + return STAT_HEIGHT; +} + +int +StatsWidth (void) +{ + return STAT_WIDTH; +} static void box (int filled, @@ -144,7 +150,6 @@ sliders[i].diff = sliders[i].max - sliders[i].min; sliders[i].lastVal = 0; } - st_width = W_WindowWidth (statwin); } void Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.77 retrieving revision 1.78 diff -u -d -r1.77 -r1.78 --- defaults.c 12 Apr 2007 00:56:28 -0000 1.77 +++ defaults.c 13 Apr 2007 07:12:23 -0000 1.78 @@ -189,6 +189,12 @@ NULL } }, + {"fontSize", &fontSize, RC_INT, + { + "Height in pixels of font, default 10", + NULL + } + }, {"forceDisplay", &forceDisplay, RC_INT, { "Number of colors the client will display", Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.81 retrieving revision 1.82 diff -u -d -r1.81 -r1.82 --- data.c 9 Apr 2007 02:52:31 -0000 1.81 +++ data.c 13 Apr 2007 07:12:23 -0000 1.82 @@ -736,6 +736,7 @@ HANDLE InputThread = NULL; // missing variables +int fontSize = 10; int forceDisplay = 0; int mungScrollbarColors = 0; int showMotd = 1; Index: docwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/docwin.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- docwin.c 6 Apr 2007 06:46:31 -0000 1.4 +++ docwin.c 13 Apr 2007 07:12:23 -0000 1.5 @@ -229,7 +229,7 @@ W_Font font = W_RegularFont; if (!xtrekrcwin) - xtrekrcwin = W_MakeWindow ("xtrekrcWin", 0, 200, 500, 500, 0, 2, + xtrekrcwin = W_MakeWindow ("xtrekrcWin", 0, 200, TWINSIDE, TWINSIDE, 0, 2, foreColor); W_ClearWindow (xtrekrcwin); @@ -239,12 +239,12 @@ sprintf (buf, "--- %s ---", (char *) query_cowid ()); length = strlen (buf); - center = 250 - (length * W_Textwidth) / 2; + center = TWINSIDE / 2 - (length * W_Textwidth) / 2; W_WriteText (xtrekrcwin, center, W_Textheight, textColor, buf, length, W_BoldFont); sprintf (buf, CBUGS); length = strlen (buf); - center = 250 - (length * W_Textwidth) / 2; + center = TWINSIDE / 2 - (length * W_Textwidth) / 2; W_WriteText (xtrekrcwin, center, 3 * W_Textheight, textColor, buf, length, W_RegularFont); Index: map.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- map.c 11 Apr 2007 23:06:34 -0000 1.50 +++ map.c 13 Apr 2007 07:12:24 -0000 1.51 @@ -556,7 +556,7 @@ ody - (BMP_MPLANET_HEIGHT / 2), BMP_MPLANET_WIDTH, BMP_MPLANET_HEIGHT); - W_WriteText (mapw, odx - (BMP_MPLANET_WIDTH / 2), + W_WriteText (mapw, odx - (W_Textwidth * 3 / 2), ody + (BMP_MPLANET_HEIGHT / 2), backColor, l->pl_name, 3, planetFont (l)); pl_update[l->pl_no].plu_update = 0; @@ -674,20 +674,20 @@ agri_name[0] = (char) (toupper (l->pl_name[0])); agri_name[1] = (char) (toupper (l->pl_name[1])); agri_name[2] = (char) (toupper (l->pl_name[2])); - W_WriteText (mapw, dx - (BMP_MPLANET_WIDTH / 2), + W_WriteText (mapw, dx - (W_Textwidth * 3 / 2), dy + (BMP_MPLANET_HEIGHT / 2), getAgriColor (l), agri_name, 3, planetFont (l)); } else { - W_WriteText (mapw, dx - (BMP_MPLANET_WIDTH / 2), + W_WriteText (mapw, dx - (W_Textwidth * 3 / 2), dy + (BMP_MPLANET_HEIGHT / 2), getAgriColor (l), l->pl_name, 3, planetFont (l)); } } else { - W_WriteText (mapw, dx - (BMP_MPLANET_WIDTH / 2), + W_WriteText (mapw, dx - (W_Textwidth * 3 / 2), dy + (BMP_MPLANET_HEIGHT / 2), planetColor (l), l->pl_name, 3, planetFont (l)); } @@ -719,7 +719,7 @@ armbuflen = 4; } - W_MaskText (mapw, dx - (BMP_MPLANET_WIDTH / 4) - 2*(armbuflen - 2), + W_MaskText (mapw, dx - (W_Textwidth * (armbuflen - 1) / 2), dy - (BMP_MPLANET_HEIGHT / 4), W_White, armbuf, armbuflen, W_BoldFont); } From modemhero at users.sourceforge.net Fri Apr 13 02:12:25 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 13 Apr 2007 07:12:25 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.173, 1.174 netrekrc, 1.62, 1.63 netrekrc_options.txt, 1.49, 1.50 Message-ID: <20070413071304.96499B434@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv22675/resources/docs Modified Files: changes.txt netrekrc netrekrc_options.txt Log Message: This patch begins the work on making the game work when font size changes. Added new font W_SmallFont which will always be the traditional 6x10 pixel font. Not used currently, but for applications that require a small font regardless of regular font size, will use this. Fontsize is now a proper global variable and the ability to change it via netrekrc is now made aware to user via netrekrc entry. Restored xtrekrc and motdwin (aka entry window) to follow TWINSIDE as it seems the right thing to do, people expect tactical window and entry window to be same size. Removed debug statement in phasers I left in on accident. Centered planet names and army count on global map, so they scale properly with font size. Moved handy MIN function to global defs file. Added functions for determining size of stats window width and height for initial window creation. Main title bar is now on by default (most people agreed it should be on, deferring to their opinion). Fixed a ton of places where entry window was not scaling properly to text height. Team and quit windows will now remap properly if entry window is moved/resized. Fixed ping stats and stat window widths so that slider bars are never lost if font size is increased greatly. Index: netrekrc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- netrekrc 12 Apr 2007 00:56:28 -0000 1.62 +++ netrekrc 13 Apr 2007 07:12:22 -0000 1.63 @@ -112,6 +112,9 @@ # Change window border on enemy approach extraAlertBorder: on +# Height in pixels of font, default 10 +fontSize: 10 + # Number of colors the client will display # 0 - find best available color option (default) # 1 - 16 colors @@ -153,7 +156,7 @@ mainResizeable: on # Start main window with title bar on (can be toggled by alt+enter) -mainTitleBar: off +mainTitleBar: on # Maximum number of scroll lines in a message window (range of values 50-500) maxScrollLines: 300 Index: netrekrc_options.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc_options.txt,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- netrekrc_options.txt 11 Apr 2007 23:06:32 -0000 1.49 +++ netrekrc_options.txt 13 Apr 2007 07:12:22 -0000 1.50 @@ -55,7 +55,7 @@ fedshipGbmpfile: (path) - your own ship's grayscale bitmaps fedshipTbmpfile: (path) - shaded color bitmaps fedshipMbmpfile: (path) - mono bitmaps -fontSize: (int) default 10 +fontSize: (int) - height in pixels of font, default 10 forceDisplay: (0/3) how many colors to display # 0 - find best available color option (default) # 1 - 16 colors Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.173 retrieving revision 1.174 diff -u -d -r1.173 -r1.174 --- changes.txt 12 Apr 2007 09:06:09 -0000 1.173 +++ changes.txt 13 Apr 2007 07:12:22 -0000 1.174 @@ -1,4 +1,11 @@ Netrek XP 2006, Version 1.3: +- entry window now scales properly with font size, and team/quit windows no longer + disappear on resizing or moving the entry window +- main title bar now defaults to on +- stats window and ping stats window now scale properly with font size +- fixed galactic planet names and army counts so they are centered on planets +- added fontSize option to netrekrc (this option always existed, but was undocumented). + This option controls the pixel height of the font used in game - cambot files names are now autogenerated, similiar to logfile names, if no name is given (names will be like 20070401.pkt) - password, playerlist2 layout, b1keymap - b5keymap, and metaservers now save via From modemhero at users.sourceforge.net Fri Apr 13 02:12:25 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 13 Apr 2007 07:12:25 +0000 Subject: [netrek-cvs] client/netrekxp/resources/htmlhelp/html generalconfig.html, 1.50, 1.51 Message-ID: <20070413071304.4C09D186800@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html In directory sc8-pr-cvs16:/tmp/cvs-serv22675/resources/htmlhelp/html Modified Files: generalconfig.html Log Message: This patch begins the work on making the game work when font size changes. Added new font W_SmallFont which will always be the traditional 6x10 pixel font. Not used currently, but for applications that require a small font regardless of regular font size, will use this. Fontsize is now a proper global variable and the ability to change it via netrekrc is now made aware to user via netrekrc entry. Restored xtrekrc and motdwin (aka entry window) to follow TWINSIDE as it seems the right thing to do, people expect tactical window and entry window to be same size. Removed debug statement in phasers I left in on accident. Centered planet names and army count on global map, so they scale properly with font size. Moved handy MIN function to global defs file. Added functions for determining size of stats window width and height for initial window creation. Main title bar is now on by default (most people agreed it should be on, deferring to their opinion). Fixed a ton of places where entry window was not scaling properly to text height. Team and quit windows will now remap properly if entry window is moved/resized. Fixed ping stats and stat window widths so that slider bars are never lost if font size is increased greatly. Index: generalconfig.html =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html/generalconfig.html,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- generalconfig.html 11 Apr 2007 23:06:32 -0000 1.50 +++ generalconfig.html 13 Apr 2007 07:12:23 -0000 1.51 @@ -310,7 +310,7 @@ path -fontsize +fontSize Choose your font size (default is 10) integer(1-whatever) From modemhero at users.sourceforge.net Fri Apr 13 02:12:28 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 13 Apr 2007 07:12:28 +0000 Subject: [netrek-cvs] client/netrekxp/win32 config.h,1.17,1.18 Message-ID: <20070413071237.C6F7B186800@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/win32 In directory sc8-pr-cvs16:/tmp/cvs-serv22675/win32 Modified Files: config.h Log Message: This patch begins the work on making the game work when font size changes. Added new font W_SmallFont which will always be the traditional 6x10 pixel font. Not used currently, but for applications that require a small font regardless of regular font size, will use this. Fontsize is now a proper global variable and the ability to change it via netrekrc is now made aware to user via netrekrc entry. Restored xtrekrc and motdwin (aka entry window) to follow TWINSIDE as it seems the right thing to do, people expect tactical window and entry window to be same size. Removed debug statement in phasers I left in on accident. Centered planet names and army count on global map, so they scale properly with font size. Moved handy MIN function to global defs file. Added functions for determining size of stats window width and height for initial window creation. Main title bar is now on by default (most people agreed it should be on, deferring to their opinion). Fixed a ton of places where entry window was not scaling properly to text height. Team and quit windows will now remap properly if entry window is moved/resized. Fixed ping stats and stat window widths so that slider bars are never lost if font size is increased greatly. Index: config.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/win32/config.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- config.h 11 Apr 2007 23:06:37 -0000 1.17 +++ config.h 13 Apr 2007 07:12:26 -0000 1.18 @@ -20,7 +20,7 @@ ################################################################################ */ -#define CBUGS "Send bugs/suggestion to: billbalcerski at hotmail.com" +#define CBUGS "Send bugs/suggestions to: billbalcerski at hotmail.com" /* ################################################################################ From modemhero at users.sourceforge.net Fri Apr 13 02:12:22 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 13 Apr 2007 07:12:22 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C, 1.136, 1.137 clientr.suo, 1.119, 1.120 Message-ID: <20070413071301.26517B434@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs16:/tmp/cvs-serv22675 Modified Files: NetrekXP to do list.C clientr.suo Log Message: This patch begins the work on making the game work when font size changes. Added new font W_SmallFont which will always be the traditional 6x10 pixel font. Not used currently, but for applications that require a small font regardless of regular font size, will use this. Fontsize is now a proper global variable and the ability to change it via netrekrc is now made aware to user via netrekrc entry. Restored xtrekrc and motdwin (aka entry window) to follow TWINSIDE as it seems the right thing to do, people expect tactical window and entry window to be same size. Removed debug statement in phasers I left in on accident. Centered planet names and army count on global map, so they scale properly with font size. Moved handy MIN function to global defs file. Added functions for determining size of stats window width and height for initial window creation. Main title bar is now on by default (most people agreed it should be on, deferring to their opinion). Fixed a ton of places where entry window was not scaling properly to text height. Team and quit windows will now remap properly if entry window is moved/resized. Fixed ping stats and stat window widths so that slider bars are never lost if font size is increased greatly. Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.136 retrieving revision 1.137 diff -u -d -r1.136 -r1.137 --- NetrekXP to do list.C 12 Apr 2007 09:06:07 -0000 1.136 +++ NetrekXP to do list.C 13 Apr 2007 07:12:19 -0000 1.137 @@ -38,6 +38,8 @@ 9) if cursor is in window and it receives a message, it scrolls to bottom automatically, bad if you are scrolling up reading history 10) check if scrolling is working ok with recent fix to setting position +11) things to fix with font size: dashboard, doc window, xtrekrc window, +macro window Wish list: 1) Rewrite graphics engine using SDL Index: clientr.suo =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.suo,v retrieving revision 1.119 retrieving revision 1.120 diff -u -d -r1.119 -r1.120 Binary files /tmp/cvs3DctM1 and /tmp/cvsDD6Oiv differ From modemhero at users.sourceforge.net Fri Apr 13 02:52:43 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 13 Apr 2007 07:52:43 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.174, 1.175 Message-ID: <20070413075251.D0987B434@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv8653/resources/docs Modified Files: changes.txt Log Message: Adjusted army count on local map to scale with font. Adjusted docwin and netrekrcwin to scale with font. Adjusted autoscrolling of message send window to scale with font. Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.174 retrieving revision 1.175 diff -u -d -r1.174 -r1.175 --- changes.txt 13 Apr 2007 07:12:22 -0000 1.174 +++ changes.txt 13 Apr 2007 07:52:41 -0000 1.175 @@ -1,4 +1,5 @@ Netrek XP 2006, Version 1.3: +- adjusted documentation window and netrekrc window to scale properly with font size - entry window now scales properly with font size, and team/quit windows no longer disappear on resizing or moving the entry window - main title bar now defaults to on From modemhero at users.sourceforge.net Fri Apr 13 02:52:43 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 13 Apr 2007 07:52:43 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C,1.137,1.138 Message-ID: <20070413075252.3958A18680E@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs16:/tmp/cvs-serv8653 Modified Files: NetrekXP to do list.C Log Message: Adjusted army count on local map to scale with font. Adjusted docwin and netrekrcwin to scale with font. Adjusted autoscrolling of message send window to scale with font. Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.137 retrieving revision 1.138 diff -u -d -r1.137 -r1.138 --- NetrekXP to do list.C 13 Apr 2007 07:12:19 -0000 1.137 +++ NetrekXP to do list.C 13 Apr 2007 07:52:40 -0000 1.138 @@ -37,9 +37,7 @@ if you fly into the NW corner of the galaxy. this was never anticipated! 9) if cursor is in window and it receives a message, it scrolls to bottom automatically, bad if you are scrolling up reading history -10) check if scrolling is working ok with recent fix to setting position -11) things to fix with font size: dashboard, doc window, xtrekrc window, -macro window +10) things to fix with font size: dashboard Wish list: 1) Rewrite graphics engine using SDL From modemhero at users.sourceforge.net Fri Apr 13 02:52:44 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 13 Apr 2007 07:52:44 +0000 Subject: [netrek-cvs] client/netrekxp/src docwin.c, 1.5, 1.6 local.c, 1.97, 1.98 newwin.c, 1.61, 1.62 smessage.c, 1.8, 1.9 Message-ID: <20070413075253.5C9D8B434@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv8653/src Modified Files: docwin.c local.c newwin.c smessage.c Log Message: Adjusted army count on local map to scale with font. Adjusted docwin and netrekrcwin to scale with font. Adjusted autoscrolling of message send window to scale with font. Index: newwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/newwin.c,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- newwin.c 13 Apr 2007 07:12:25 -0000 1.61 +++ newwin.c 13 Apr 2007 07:52:41 -0000 1.62 @@ -1003,8 +1003,14 @@ #endif #ifdef DOC_WIN - docwin = W_MakeWindow ("DocWin", 0, 181, 500, 500, 0, 2, foreColor); - xtrekrcwin = W_MakeWindow ("xtrekrcWin", 0, 200, 500, 500, 0, 2, foreColor); + docwin = W_MakeWindow ("DocWin", 0, 181, + TWINSIDE * W_Textwidth / 6, + TWINSIDE, + 0, 2, foreColor); + xtrekrcwin = W_MakeWindow ("xtrekrcWin", 0, 200, + TWINSIDE * W_Textwidth / 6, + TWINSIDE, + 0, 2, foreColor); #endif for (i = 0; i < 4; i++) Index: smessage.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/smessage.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- smessage.c 7 Apr 2007 11:58:40 -0000 1.8 +++ smessage.c 13 Apr 2007 07:52:42 -0000 1.9 @@ -40,12 +40,12 @@ if (length == 0) return; - if (length > 80) + if (length > (80 * 6 / W_Textwidth)) { strncpy (tmp, outmessage, 10); tmp[10] = '\0'; // have to null terminate, because strncpy doesn't - strncat (tmp, outmessage + length - 70, 80); - length = 80; + strncat (tmp, outmessage + length - (80 * 6 / W_Textwidth) + 10, (80 * 6 / W_Textwidth)); + length = (80 * 6 / W_Textwidth); } else strcpy (tmp, outmessage); Index: docwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/docwin.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- docwin.c 13 Apr 2007 07:12:23 -0000 1.5 +++ docwin.c 13 Apr 2007 07:52:41 -0000 1.6 @@ -52,7 +52,7 @@ W_Font font = W_RegularFont; if (!docwin) - docwin = W_MakeWindow ("DocWin", 0, 181, 500, 500, 0, 2, foreColor); + docwin = W_MakeWindow ("DocWin", 0, 181, TWINSIDE * W_Textwidth / 6, TWINSIDE, 0, 2, foreColor); W_ClearWindow (docwin); @@ -61,12 +61,12 @@ sprintf (buf, "--- %s ---", (char *) query_cowid ()); length = strlen (buf); - center = 250 - (length * W_Textwidth) / 2; + center = (TWINSIDE * W_Textwidth / 6) / 2 - (length * W_Textwidth) / 2; W_WriteText (docwin, center, W_Textheight, textColor, buf, length, W_BoldFont); sprintf (buf, CBUGS); length = strlen (buf); - center = 250 - (length * W_Textwidth) / 2; + center = (TWINSIDE * W_Textwidth / 6) / 2 - (length * W_Textwidth) / 2; W_WriteText (docwin, center, 3 * W_Textheight, textColor, buf, length, W_RegularFont); @@ -229,7 +229,7 @@ W_Font font = W_RegularFont; if (!xtrekrcwin) - xtrekrcwin = W_MakeWindow ("xtrekrcWin", 0, 200, TWINSIDE, TWINSIDE, 0, 2, + xtrekrcwin = W_MakeWindow ("xtrekrcWin", 0, 200, TWINSIDE * W_Textwidth / 6, TWINSIDE, 0, 2, foreColor); W_ClearWindow (xtrekrcwin); @@ -239,12 +239,12 @@ sprintf (buf, "--- %s ---", (char *) query_cowid ()); length = strlen (buf); - center = TWINSIDE / 2 - (length * W_Textwidth) / 2; + center = (TWINSIDE * W_Textwidth / 6) / 2 - (length * W_Textwidth) / 2; W_WriteText (xtrekrcwin, center, W_Textheight, textColor, buf, length, W_BoldFont); sprintf (buf, CBUGS); length = strlen (buf); - center = TWINSIDE / 2 - (length * W_Textwidth) / 2; + center = (TWINSIDE * W_Textwidth / 6) / 2 - (length * W_Textwidth) / 2; W_WriteText (xtrekrcwin, center, 3 * W_Textheight, textColor, buf, length, W_RegularFont); Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.97 retrieving revision 1.98 diff -u -d -r1.97 -r1.98 --- local.c 13 Apr 2007 07:12:24 -0000 1.97 +++ local.c 13 Apr 2007 07:52:41 -0000 1.98 @@ -640,12 +640,12 @@ armbuf[3] = '\0'; armbuflen = 4; } - W_MaskText (w, dx - (7 * BMP_PLANET_WIDTH / 8) * SCALE / scaleFactor, - dy - (5 * BMP_PLANET_HEIGHT / 6) * SCALE / scaleFactor, + W_MaskText (w, dx - (W_Textwidth * (armbuflen - 1)) - (2 * BMP_PLANET_WIDTH / 3) * SCALE / scaleFactor, + dy - W_Textheight - (BMP_PLANET_HEIGHT / 2) * SCALE / scaleFactor, planetColor (l), armbuf, armbuflen, planetFont (l)); - clearzone[0][clearcount] = dx - (7 * BMP_PLANET_WIDTH / 8) * SCALE / scaleFactor; - clearzone[1][clearcount] = dy - (5 * BMP_PLANET_HEIGHT / 6) * SCALE / scaleFactor; + clearzone[0][clearcount] = dx - (W_Textwidth * (armbuflen - 1)) - (2 * BMP_PLANET_WIDTH / 3) * SCALE / scaleFactor; + clearzone[1][clearcount] = dy - W_Textheight - (BMP_PLANET_HEIGHT / 2) * SCALE / scaleFactor; clearzone[2][clearcount] = W_Textwidth * armbuflen; clearzone[3][clearcount] = W_Textheight; clearcount++; From modemhero at users.sourceforge.net Fri Apr 13 03:08:21 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 13 Apr 2007 08:08:21 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.175, 1.176 netrekxp.doc, 1.15, 1.16 Message-ID: <20070413080830.C0E20B434@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv15991/resources/docs Modified Files: changes.txt netrekxp.doc Log Message: Add color names and codes to manual. Index: netrekxp.doc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekxp.doc,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- netrekxp.doc 9 Apr 2007 11:07:18 -0000 1.15 +++ netrekxp.doc 13 Apr 2007 08:08:19 -0000 1.16 @@ -35,6 +35,7 @@ 8.0 MetaServer Options 9.0 Player List Options 10.0 Other Stuff (Beeplite, Cambot, etc) + 11.0 Color names and codes 1.0 Overview @@ -1140,3 +1141,664 @@ The key ) returns to normal play. Quit (q/Q) to quit + + +11.0 Color names and codes + +Colors can be set via the netrekrc, however the way colors are set is a bit confusing. They can either be entered in hex (3 hex numbers corresponding to the RGB color setting), or they can be entered using color names. For clarity, +here is the actual color table with RGB codes and color names. Format is color name, then the 3 RGB values. + +BEGIN COLORS + + "snow", 255, 250, 250, + "GhostWhite", 248, 248, 255, + "WhiteSmoke", 245, 245, 245, + "gainsboro", 220, 220, 220, + "FloralWhite", 255, 250, 240, + "OldLace", 253, 245, 230, + "linen", 250, 240, 230, + "AntiqueWhite", 250, 235, 215, + "PapayaWhip", 255, 239, 213, + "BlanchedAlmond", 255, 235, 205, + "bisque", 255, 228, 196, + "PeachPuff", 255, 218, 185, + "NavajoWhite", 255, 222, 173, + "moccasin", 255, 228, 181, + "cornsilk", 255, 248, 220, + "ivory", 255, 255, 240, + "LemonChiffon", 255, 250, 205, + "seashell", 255, 245, 238, + "honeydew", 240, 255, 240, + "MintCream", 245, 255, 250, + "azure", 240, 255, 255, + "AliceBlue", 240, 248, 255, + "lavender", 230, 230, 250, + "LavenderBlush", 255, 240, 245, + "MistyRose", 255, 228, 225, + "white", 255, 255, 255, + "black", 0, 0, 0, + "DarkSlateGray", 47, 79, 79, + "DarkSlateGrey", 47, 79, 79, + "DimGray", 105, 105, 105, + "DimGrey", 105, 105, 105, + "SlateGray", 112, 128, 144, + "SlateGrey", 112, 128, 144, + "LightSlateGray", 119, 136, 153, + "LightSlateGrey", 119, 136, 153, + "gray", 190, 190, 190, + "grey", 190, 190, 190, + "LightGrey", 211, 211, 211, + "LightGray", 211, 211, 211, + "MidnightBlue", 25, 25, 112, + "navy", 0, 0, 128, + "NavyBlue", 0, 0, 128, + "CornflowerBlue", 100, 149, 237, + "DarkSlateBlue", 72, 61, 139, + "SlateBlue", 106, 90, 205, + "MediumSlateBlue", 123, 104, 238, + "LightSlateBlue", 132, 112, 255, + "MediumBlue", 0, 0, 205, + "RoyalBlue", 65, 105, 225, + "blue", 0, 0, 255, + "DodgerBlue", 30, 144, 255, + "DeepSkyBlue", 0, 191, 255, + "SkyBlue", 135, 206, 235, + "LightSkyBlue", 135, 206, 250, + "SteelBlue", 70, 130, 180, + "LightSteelBlue", 176, 196, 222, + "LightBlue", 173, 216, 230, + "PowderBlue", 176, 224, 230, + "PaleTurquoise", 175, 238, 238, + "DarkTurquoise", 0, 206, 209, + "MediumTurquoise", 72, 209, 204, + "turquoise", 64, 224, 208, + "cyan", 0, 255, 255, + "LightCyan", 224, 255, 255, + "CadetBlue", 95, 158, 160, + "MediumAquamarine", 102, 205, 170, + "aquamarine", 127, 255, 212, + "DarkGreen", 0, 100, 0, + "DarkOliveGreen", 85, 107, 47, + "DarkSeaGreen", 143, 188, 143, + "SeaGreen", 46, 139, 87, + "MediumSeaGreen", 60, 179, 113, + "LightSeaGreen", 32, 178, 170, + "PaleGreen", 152, 251, 152, + "SpringGreen", 0, 255, 127, + "LawnGreen", 124, 252, 0, + "green", 0, 255, 0, + "chartreuse", 127, 255, 0, + "MediumSpringGreen", 0, 250, 154, + "GreenYellow", 173, 255, 47, + "LimeGreen", 50, 205, 50, + "YellowGreen", 154, 205, 50, + "ForestGreen", 34, 139, 34, + "OliveDrab", 107, 142, 35, + "DarkKhaki", 189, 183, 107, + "khaki", 240, 230, 140, + "PaleGoldenrod", 238, 232, 170, + "LightGoldenrodYellow", 250, 250, 210, + "LightYellow", 255, 255, 224, + "yellow", 255, 255, 0, + "gold", 255, 215, 0, + "LightGoldenrod", 238, 221, 130, + "goldenrod", 218, 165, 32, + "DarkGoldenrod", 184, 134, 11, + "RosyBrown", 188, 143, 143, + "IndianRed", 205, 92, 92, + "SaddleBrown", 139, 69, 19, + "sienna", 160, 82, 45, + "peru", 205, 133, 63, + "burlywood", 222, 184, 135, + "beige", 245, 245, 220, + "wheat", 245, 222, 179, + "SandyBrown", 244, 164, 96, + "tan", 210, 180, 140, + "chocolate", 210, 105, 30, + "firebrick", 178, 34, 34, + "brown", 165, 42, 42, + "DarkSalmon", 233, 150, 122, + "salmon", 250, 128, 114, + "LightSalmon", 255, 160, 122, + "orange", 255, 165, 0, + "DarkOrange", 255, 140, 0, + "coral", 255, 127, 80, + "LightCoral", 240, 128, 128, + "tomato", 255, 99, 71, + "OrangeRed", 255, 69, 0, + "red", 255, 0, 0, + "HotPink", 255, 105, 180, + "DeepPink", 255, 20, 147, + "pink", 255, 192, 203, + "LightPink", 255, 182, 193, + "PaleVioletRed", 219, 112, 147, + "maroon", 176, 48, 96, + "MediumVioletRed", 199, 21, 133, + "VioletRed", 208, 32, 144, + "magenta", 255, 0, 255, + "violet", 238, 130, 238, + "plum", 221, 160, 221, + "orchid", 218, 112, 214, + "MediumOrchid", 186, 85, 211, + "DarkOrchid", 153, 50, 204, + "DarkViolet", 148, 0, 211, + "BlueViolet", 138, 43, 226, + "purple", 160, 32, 240, + "MediumPurple", 147, 112, 219, + "thistle", 216, 191, 216, + "snow1", 255, 250, 250, + "snow2", 238, 233, 233, + "snow3", 205, 201, 201, + "snow4", 139, 137, 137, + "seashell1", 255, 245, 238, + "seashell2", 238, 229, 222, + "seashell3", 205, 197, 191, + "seashell4", 139, 134, 130, + "AntiqueWhite1", 255, 239, 219, + "AntiqueWhite2", 238, 223, 204, + "AntiqueWhite3", 205, 192, 176, + "AntiqueWhite4", 139, 131, 120, + "bisque1", 255, 228, 196, + "bisque2", 238, 213, 183, + "bisque3", 205, 183, 158, + "bisque4", 139, 125, 107, + "PeachPuff1", 255, 218, 185, + "PeachPuff2", 238, 203, 173, + "PeachPuff3", 205, 175, 149, + "PeachPuff4", 139, 119, 101, + "NavajoWhite1", 255, 222, 173, + "NavajoWhite2", 238, 207, 161, + "NavajoWhite3", 205, 179, 139, + "NavajoWhite4", 139, 121, 94, + "LemonChiffon1", 255, 250, 205, + "LemonChiffon2", 238, 233, 191, + "LemonChiffon3", 205, 201, 165, + "LemonChiffon4", 139, 137, 112, + "cornsilk1", 255, 248, 220, + "cornsilk2", 238, 232, 205, + "cornsilk3", 205, 200, 177, + "cornsilk4", 139, 136, 120, + "ivory1", 255, 255, 240, + "ivory2", 238, 238, 224, + "ivory3", 205, 205, 193, + "ivory4", 139, 139, 131, + "honeydew1", 240, 255, 240, + "honeydew2", 224, 238, 224, + "honeydew3", 193, 205, 193, + "honeydew4", 131, 139, 131, + "LavenderBlush1", 255, 240, 245, + "LavenderBlush2", 238, 224, 229, + "LavenderBlush3", 205, 193, 197, + "LavenderBlush4", 139, 131, 134, + "MistyRose1", 255, 228, 225, + "MistyRose2", 238, 213, 210, + "MistyRose3", 205, 183, 181, + "MistyRose4", 139, 125, 123, + "azure1", 240, 255, 255, + "azure2", 224, 238, 238, + "azure3", 193, 205, 205, + "azure4", 131, 139, 139, + "SlateBlue1", 131, 111, 255, + "SlateBlue2", 122, 103, 238, + "SlateBlue3", 105, 89, 205, + "SlateBlue4", 71, 60, 139, + "RoyalBlue1", 72, 118, 255, + "RoyalBlue2", 67, 110, 238, + "RoyalBlue3", 58, 95, 205, + "RoyalBlue4", 39, 64, 139, + "blue1", 0, 0, 255, + "blue2", 0, 0, 238, + "blue3", 0, 0, 205, + "blue4", 0, 0, 139, + "DodgerBlue1", 30, 144, 255, + "DodgerBlue2", 28, 134, 238, + "DodgerBlue3", 24, 116, 205, + "DodgerBlue4", 16, 78, 139, + "SteelBlue1", 99, 184, 255, + "SteelBlue2", 92, 172, 238, + "SteelBlue3", 79, 148, 205, + "SteelBlue4", 54, 100, 139, + "DeepSkyBlue1", 0, 191, 255, + "DeepSkyBlue2", 0, 178, 238, + "DeepSkyBlue3", 0, 154, 205, + "DeepSkyBlue4", 0, 104, 139, + "SkyBlue1", 135, 206, 255, + "SkyBlue2", 126, 192, 238, + "SkyBlue3", 108, 166, 205, + "SkyBlue4", 74, 112, 139, + "LightSkyBlue1", 176, 226, 255, + "LightSkyBlue2", 164, 211, 238, + "LightSkyBlue3", 141, 182, 205, + "LightSkyBlue4", 96, 123, 139, + "SlateGray1", 198, 226, 255, + "SlateGray2", 185, 211, 238, + "SlateGray3", 159, 182, 205, + "SlateGray4", 108, 123, 139, + "LightSteelBlue1", 202, 225, 255, + "LightSteelBlue2", 188, 210, 238, + "LightSteelBlue3", 162, 181, 205, + "LightSteelBlue4", 110, 123, 139, + "LightBlue1", 191, 239, 255, + "LightBlue2", 178, 223, 238, + "LightBlue3", 154, 192, 205, + "LightBlue4", 104, 131, 139, + "LightCyan1", 224, 255, 255, + "LightCyan2", 209, 238, 238, + "LightCyan3", 180, 205, 205, + "LightCyan4", 122, 139, 139, + "PaleTurquoise2", 174, 238, 238, + "PaleTurquoise3", 150, 205, 205, + "PaleTurquoise4", 102, 139, 139, + "CadetBlue1", 152, 245, 255, + "CadetBlue2", 142, 229, 238, + "CadetBlue3", 122, 197, 205, + "CadetBlue4", 83, 134, 139, + "turquoise1", 0, 245, 255, + "turquoise2", 0, 229, 238, + "turquoise3", 0, 197, 205, + "turquoise4", 0, 134, 139, + "cyan1", 0, 255, 255, + "cyan2", 0, 238, 238, + "cyan3", 0, 205, 205, + "cyan4", 0, 139, 139, + "DarkSlateGray1", 151, 255, 255, + "DarkSlateGray2", 141, 238, 238, + "DarkSlateGray3", 121, 205, 205, + "DarkSlateGray4", 82, 139, 139, + "aquamarine1", 127, 255, 212, + "aquamarine2", 118, 238, 198, + "aquamarine3", 102, 205, 170, + "aquamarine4", 69, 139, 116, + "DarkSeaGreen1", 193, 255, 193, + "DarkSeaGreen2", 180, 238, 180, + "DarkSeaGreen3", 155, 205, 155, + "DarkSeaGreen4", 105, 139, 105, + "SeaGreen1", 84, 255, 159, + "SeaGreen2", 78, 238, 148, + "SeaGreen3", 67, 205, 128, + "SeaGreen4", 46, 139, 87, + "PaleGreen1", 154, 255, 154, + "PaleGreen2", 144, 238, 144, + "PaleGreen3", 124, 205, 124, + "PaleGreen4", 84, 139, 84, + "SpringGreen1", 0, 255, 127, + "SpringGreen2", 0, 238, 118, + "SpringGreen3", 0, 205, 102, + "SpringGreen4", 0, 139, 69, + "green1", 0, 255, 0, + "green2", 0, 238, 0, + "green3", 0, 205, 0, + "green4", 0, 139, 0, + "chartreuse1", 127, 255, 0, + "chartreuse2", 118, 238, 0, + "chartreuse3", 102, 205, 0, + "chartreuse4", 69, 139, 0, + "OliveDrab1", 192, 255, 62, + "OliveDrab2", 179, 238, 58, + "OliveDrab3", 154, 205, 50, + "OliveDrab4", 105, 139, 34, + "DarkOliveGreen1", 202, 255, 112, + "DarkOliveGreen2", 188, 238, 104, + "DarkOliveGreen3", 162, 205, 90, + "DarkOliveGreen4", 110, 139, 61, + "khaki1", 255, 246, 143, + "khaki2", 238, 230, 133, + "khaki3", 205, 198, 115, + "khaki4", 139, 134, 78, + "LightGoldenrod1", 255, 236, 139, + "LightGoldenrod2", 238, 220, 130, + "LightGoldenrod3", 205, 190, 112, + "LightGoldenrod4", 139, 129, 76, + "LightYellow1", 255, 255, 224, + "LightYellow2", 238, 238, 209, + "LightYellow3", 205, 205, 180, + "LightYellow4", 139, 139, 122, + "yellow1", 255, 255, 0, + "yellow2", 238, 238, 0, + "yellow3", 205, 205, 0, + "yellow4", 139, 139, 0, + "gold1", 255, 215, 0, + "gold2", 238, 201, 0, + "gold3", 205, 173, 0, + "gold4", 139, 117, 0, + "goldenrod1", 255, 193, 37, + "goldenrod2", 238, 180, 34, + "goldenrod3", 205, 155, 29, + "goldenrod4", 139, 105, 20, + "DarkGoldenrod1", 255, 185, 15, + "DarkGoldenrod2", 238, 173, 14, + "DarkGoldenrod3", 205, 149, 12, + "DarkGoldenrod4", 139, 101, 8, + "RosyBrown1", 255, 193, 193, + "RosyBrown2", 238, 180, 180, + "RosyBrown3", 205, 155, 155, + "RosyBrown4", 139, 105, 105, + "IndianRed1", 255, 106, 106, + "IndianRed2", 238, 99, 99, + "IndianRed3", 205, 85, 85, + "IndianRed4", 139, 58, 58, + "sienna1", 255, 130, 71, + "sienna2", 238, 121, 66, + "sienna3", 205, 104, 57, + "sienna4", 139, 71, 38, + "burlywood1", 255, 211, 155, + "burlywood2", 238, 197, 145, + "burlywood3", 205, 170, 125, + "burlywood4", 139, 115, 85, + "wheat1", 255, 231, 186, + "wheat2", 238, 216, 174, + "wheat3", 205, 186, 150, + "wheat4", 139, 126, 102, + "tan1", 255, 165, 79, + "tan2", 238, 154, 73, + "tan3", 205, 133, 63, + "tan4", 139, 90, 43, + "chocolate1", 255, 127, 36, + "chocolate2", 238, 118, 33, + "chocolate3", 205, 102, 29, + "chocolate4", 139, 69, 19, + "firebrick1", 255, 48, 48, + "firebrick2", 238, 44, 44, + "firebrick3", 205, 38, 38, + "firebrick4", 139, 26, 26, + "brown1", 255, 64, 64, + "brown2", 238, 59, 59, + "brown3", 205, 51, 51, + "brown4", 139, 35, 35, + "salmon1", 255, 140, 105, + "salmon2", 238, 130, 98, + "salmon3", 205, 112, 84, + "salmon4", 139, 76, 57, + "LightSalmon1", 255, 160, 122, + "LightSalmon2", 238, 149, 114, + "LightSalmon3", 205, 129, 98, + "LightSalmon4", 139, 87, 66, + "orange1", 255, 165, 0, + "orange2", 238, 154, 0, + "orange3", 205, 133, 0, + "orange4", 139, 90, 0, + "DarkOrange1", 255, 127, 0, + "DarkOrange2", 238, 118, 0, + "DarkOrange3", 205, 102, 0, + "DarkOrange4", 139, 69, 0, + "coral1", 255, 114, 86, + "coral2", 238, 106, 80, + "coral3", 205, 91, 69, + "coral4", 139, 62, 47, + "tomato1", 255, 99, 71, + "tomato2", 238, 92, 66, + "tomato3", 205, 79, 57, + "tomato4", 139, 54, 38, + "OrangeRed1", 255, 69, 0, + "OrangeRed2", 238, 64, 0, + "OrangeRed3", 205, 55, 0, + "OrangeRed4", 139, 37, 0, + "red1", 255, 0, 0, + "red2", 238, 0, 0, + "red3", 205, 0, 0, + "red4", 139, 0, 0, + "DeepPink1", 255, 20, 147, + "DeepPink2", 238, 18, 137, + "DeepPink3", 205, 16, 118, + "DeepPink4", 139, 10, 80, + "HotPink1", 255, 110, 180, + "HotPink2", 238, 106, 167, + "HotPink3", 205, 96, 144, + "HotPink4", 139, 58, 98, + "pink1", 255, 181, 197, + "pink2", 238, 169, 184, + "pink3", 205, 145, 158, + "pink4", 139, 99, 108, + "LightPink1", 255, 174, 185, + "LightPink2", 238, 162, 173, + "LightPink3", 205, 140, 149, + "LightPink4", 139, 95, 101, + "PaleVioletRed1", 255, 130, 171, + "PaleVioletRed2", 238, 121, 159, + "PaleVioletRed3", 205, 104, 137, + "PaleVioletRed4", 139, 71, 93, + "maroon1", 255, 52, 179, + "maroon2", 238, 48, 167, + "maroon3", 205, 41, 144, + "maroon4", 139, 28, 98, + "VioletRed1", 255, 62, 150, + "VioletRed2", 238, 58, 140, + "VioletRed3", 205, 50, 120, + "VioletRed4", 139, 34, 82, + "magenta1", 255, 0, 255, + "magenta2", 238, 0, 238, + "magenta3", 205, 0, 205, + "magenta4", 139, 0, 139, + "orchid1", 255, 131, 250, + "orchid2", 238, 122, 233, + "orchid3", 205, 105, 201, + "orchid4", 139, 71, 137, + "plum1", 255, 187, 255, + "plum2", 238, 174, 238, + "plum3", 205, 150, 205, + "plum4", 139, 102, 139, + "MediumOrchid1", 224, 102, 255, + "MediumOrchid2", 209, 95, 238, + "MediumOrchid3", 180, 82, 205, + "MediumOrchid4", 122, 55, 139, + "DarkOrchid1", 191, 62, 255, + "DarkOrchid2", 178, 58, 238, + "DarkOrchid3", 154, 50, 205, + "DarkOrchid4", 104, 34, 139, + "purple1", 155, 48, 255, + "purple2", 145, 44, 238, + "purple3", 125, 38, 205, + "purple4", 85, 26, 139, + "MediumPurple1", 171, 130, 255, + "MediumPurple2", 159, 121, 238, + "MediumPurple3", 137, 104, 205, + "MediumPurple4", 93, 71, 139, + "thistle1", 255, 225, 255, + "thistle2", 238, 210, 238, + "thistle3", 205, 181, 205, + "thistle4", 139, 123, 139, + "gray0", 0, 0, 0, + "grey0", 0, 0, 0, + "gray1", 3, 3, 3, + "grey1", 3, 3, 3, + "gray2", 5, 5, 5, + "grey2", 5, 5, 5, + "gray3", 8, 8, 8, + "grey3", 8, 8, 8, + "gray4", 10, 10, 10, + "grey4", 10, 10, 10, + "gray5", 13, 13, 13, + "grey5", 13, 13, 13, + "gray6", 15, 15, 15, + "grey6", 15, 15, 15, + "gray7", 18, 18, 18, + "grey7", 18, 18, 18, + "gray8", 20, 20, 20, + "grey8", 20, 20, 20, + "gray9", 23, 23, 23, + "grey9", 23, 23, 23, + "gray10", 26, 26, 26, + "grey10", 26, 26, 26, + "gray11", 28, 28, 28, + "grey11", 28, 28, 28, + "gray12", 31, 31, 31, + "grey12", 31, 31, 31, + "gray13", 33, 33, 33, + "grey13", 33, 33, 33, + "gray14", 36, 36, 36, + "grey14", 36, 36, 36, + "gray15", 38, 38, 38, + "grey15", 38, 38, 38, + "gray16", 41, 41, 41, + "grey16", 41, 41, 41, + "gray17", 43, 43, 43, + "grey17", 43, 43, 43, + "gray18", 46, 46, 46, + "grey18", 46, 46, 46, + "gray19", 48, 48, 48, + "grey19", 48, 48, 48, + "gray20", 51, 51, 51, + "grey20", 51, 51, 51, + "gray21", 54, 54, 54, + "grey21", 54, 54, 54, + "gray22", 56, 56, 56, + "grey22", 56, 56, 56, + "gray23", 59, 59, 59, + "grey23", 59, 59, 59, + "gray24", 61, 61, 61, + "grey24", 61, 61, 61, + "gray25", 64, 64, 64, + "grey25", 64, 64, 64, + "gray26", 66, 66, 66, + "grey26", 66, 66, 66, + "gray27", 69, 69, 69, + "grey27", 69, 69, 69, + "gray28", 71, 71, 71, + "grey28", 71, 71, 71, + "gray29", 74, 74, 74, + "grey29", 74, 74, 74, + "gray30", 77, 77, 77, + "grey30", 77, 77, 77, + "gray31", 79, 79, 79, + "grey31", 79, 79, 79, + "gray32", 82, 82, 82, + "grey32", 82, 82, 82, + "gray33", 84, 84, 84, + "grey33", 84, 84, 84, + "gray34", 87, 87, 87, + "grey34", 87, 87, 87, + "gray35", 89, 89, 89, + "grey35", 89, 89, 89, + "gray36", 92, 92, 92, + "grey36", 92, 92, 92, + "gray37", 94, 94, 94, + "grey37", 94, 94, 94, + "gray38", 97, 97, 97, + "grey38", 97, 97, 97, + "gray39", 99, 99, 99, + "grey39", 99, 99, 99, + "gray40", 102, 102, 102, + "grey40", 102, 102, 102, + "gray41", 105, 105, 105, + "grey41", 105, 105, 105, + "gray42", 107, 107, 107, + "grey42", 107, 107, 107, + "gray43", 110, 110, 110, + "grey43", 110, 110, 110, + "gray44", 112, 112, 112, + "grey44", 112, 112, 112, + "gray45", 115, 115, 115, + "grey45", 115, 115, 115, + "gray46", 117, 117, 117, + "grey46", 117, 117, 117, + "gray47", 120, 120, 120, + "grey47", 120, 120, 120, + "gray48", 122, 122, 122, + "grey48", 122, 122, 122, + "gray49", 125, 125, 125, + "grey49", 125, 125, 125, + "gray50", 127, 127, 127, + "grey50", 127, 127, 127, + "gray51", 130, 130, 130, + "grey51", 130, 130, 130, + "gray52", 133, 133, 133, + "grey52", 133, 133, 133, + "gray53", 135, 135, 135, + "grey53", 135, 135, 135, + "gray54", 138, 138, 138, + "grey54", 138, 138, 138, + "gray55", 140, 140, 140, + "grey55", 140, 140, 140, + "gray56", 143, 143, 143, + "grey56", 143, 143, 143, + "gray57", 145, 145, 145, + "grey57", 145, 145, 145, + "gray58", 148, 148, 148, + "grey58", 148, 148, 148, + "gray59", 150, 150, 150, + "grey59", 150, 150, 150, + "gray60", 153, 153, 153, + "grey60", 153, 153, 153, + "gray61", 156, 156, 156, + "grey61", 156, 156, 156, + "gray62", 158, 158, 158, + "grey62", 158, 158, 158, + "gray63", 161, 161, 161, + "grey63", 161, 161, 161, + "gray64", 163, 163, 163, + "grey64", 163, 163, 163, + "gray65", 166, 166, 166, + "grey65", 166, 166, 166, + "gray66", 168, 168, 168, + "grey66", 168, 168, 168, + "gray67", 171, 171, 171, + "grey67", 171, 171, 171, + "gray68", 173, 173, 173, + "grey68", 173, 173, 173, + "gray69", 176, 176, 176, + "grey69", 176, 176, 176, + "gray70", 179, 179, 179, + "grey70", 179, 179, 179, + "gray71", 181, 181, 181, + "grey71", 181, 181, 181, + "gray72", 184, 184, 184, + "grey72", 184, 184, 184, + "gray73", 186, 186, 186, + "grey73", 186, 186, 186, + "gray74", 189, 189, 189, + "grey74", 189, 189, 189, + "gray75", 191, 191, 191, + "grey75", 191, 191, 191, + "gray76", 194, 194, 194, + "grey76", 194, 194, 194, + "gray77", 196, 196, 196, + "grey77", 196, 196, 196, + "gray78", 199, 199, 199, + "grey78", 199, 199, 199, + "gray79", 201, 201, 201, + "grey79", 201, 201, 201, + "gray80", 204, 204, 204, + "grey80", 204, 204, 204, + "gray81", 207, 207, 207, + "grey81", 207, 207, 207, + "gray82", 209, 209, 209, + "grey82", 209, 209, 209, + "gray83", 212, 212, 212, + "grey83", 212, 212, 212, + "gray84", 214, 214, 214, + "grey84", 214, 214, 214, + "gray85", 217, 217, 217, + "grey85", 217, 217, 217, + "gray86", 219, 219, 219, + "grey86", 219, 219, 219, + "gray87", 222, 222, 222, + "grey87", 222, 222, 222, + "gray88", 224, 224, 224, + "grey88", 224, 224, 224, + "gray89", 227, 227, 227, + "grey89", 227, 227, 227, + "gray90", 229, 229, 229, + "grey90", 229, 229, 229, + "gray91", 232, 232, 232, + "grey91", 232, 232, 232, + "gray92", 235, 235, 235, + "grey92", 235, 235, 235, + "gray93", 237, 237, 237, + "grey93", 237, 237, 237, + "gray94", 240, 240, 240, + "grey94", 240, 240, 240, + "gray95", 242, 242, 242, + "grey95", 242, 242, 242, + "gray96", 245, 245, 245, + "grey96", 245, 245, 245, + "gray97", 247, 247, 247, + "grey97", 247, 247, 247, + "gray98", 250, 250, 250, + "grey98", 250, 250, 250, + "gray99", 252, 252, 252, + "grey99", 252, 252, 252, + "gray100", 255, 255, 255, + "grey100", 255, 255, 255, + "grey100", 255, 255, 255 + +END COLORS Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.175 retrieving revision 1.176 diff -u -d -r1.175 -r1.176 --- changes.txt 13 Apr 2007 07:52:41 -0000 1.175 +++ changes.txt 13 Apr 2007 08:08:19 -0000 1.176 @@ -1,4 +1,7 @@ Netrek XP 2006, Version 1.3: +- added the huge list of color names and color RGB codes to netrekxp manual, this was + always confusing to me as to what color names were actually allowed. They were buried + in the code, now they are visible in the manual. - adjusted documentation window and netrekrc window to scale properly with font size - entry window now scales properly with font size, and team/quit windows no longer disappear on resizing or moving the entry window From modemhero at users.sourceforge.net Fri Apr 13 04:10:18 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 13 Apr 2007 09:10:18 +0000 Subject: [netrek-cvs] client/netrekxp/src dashboard.c, 1.20, 1.21 newwin.c, 1.62, 1.63 redraw.c, 1.12, 1.13 Message-ID: <20070413091027.834D8B402@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv11481/src Modified Files: dashboard.c newwin.c redraw.c Log Message: Fix assumption in STATSIZE and MESSAGESIZE defines that text is only 10 pixels high. Fixed text dashboard to work with increased font size. New function DashMaxWidth() to take into account that dash may need to be wider than tactical, if font size is sufficiently large. Tested against text dashboard only so far. Index: redraw.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/redraw.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- redraw.c 6 Apr 2007 06:46:32 -0000 1.12 +++ redraw.c 13 Apr 2007 09:10:16 -0000 1.13 @@ -161,7 +161,7 @@ oldbuf = buf1; } /* TIMER */ - db_timer (flag, 428, 27); + db_timer (flag, 50 + 63 * W_Textwidth, 5 + 2 * W_Textheight + 2); light_erase(); @@ -323,7 +323,7 @@ if (whichbuf == 0) { /* Draw status line */ - W_WriteText (tstatw, 50, 16, textColor, buf, 64, W_RegularFont); + W_WriteText (tstatw, 50, 5 + W_Textheight + 1, textColor, buf, 64, W_RegularFont); whichbuf = 1; } else @@ -351,7 +351,7 @@ j++; if (j == 20) { /* Random number */ - W_WriteText (tstatw, 50 + W_Textwidth * k, 16, textColor, + W_WriteText (tstatw, 50 + W_Textwidth * k, 5 + W_Textheight + 1, textColor, s, i - k - 19, W_RegularFont); j = -1; } @@ -359,7 +359,7 @@ } if (j != -1) { - W_WriteText (tstatw, 50 + W_Textwidth * k, 16, textColor, s, + W_WriteText (tstatw, 50 + W_Textwidth * k, 5 + W_Textheight + 1, textColor, s, i - k - j, W_RegularFont); } } @@ -453,5 +453,5 @@ troop_capacity, me->p_ship.s_maxfuel, me->p_ship.s_maxwpntemp / 10, me->p_ship.s_maxegntemp / 10); - W_WriteText (tstatw, 50, 27, textColor, buf, strlen (buf), W_RegularFont); + W_WriteText (tstatw, 50, 5 + 2 * W_Textheight + 2, textColor, buf, strlen (buf), W_RegularFont); } Index: newwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/newwin.c,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- newwin.c 13 Apr 2007 07:52:41 -0000 1.62 +++ newwin.c 13 Apr 2007 09:10:16 -0000 1.63 @@ -45,8 +45,6 @@ #define BOXSIDE (TWINSIDE / 5) #define MENU_PAD 4 #define TILESIDE 16 -#define MESSAGESIZE 20 -#define STATSIZE (MESSAGESIZE * 2 + BORDER * 2) #define YOFF 0 /* Local function prototypes */ @@ -817,10 +815,15 @@ newwin (char *hostmon, char *progname) { + int MESSAGESIZE, STATSIZE; int i; W_Initialize (hostmon); + // We now know the font size + MESSAGESIZE = 2 * W_Textheight; + STATSIZE = (MESSAGESIZE * 2 + BORDER * 2); + baseWin = W_MakeWindow ("netrek", 0, 0, 1024, 768, NULL, BORDER, gColor); w = W_MakeWindow ("local", 0, 0, TWINSIDE, TWINSIDE, baseWin, THICKBORDER, foreColor); @@ -832,7 +835,7 @@ mapSDB = W_InitSDB (mapw); - tstatw = W_MakeWindow ("tstat", 0, TWINSIDE + 2 * THICKBORDER, TWINSIDE + (2 * THICKBORDER - 2 * BORDER), + tstatw = W_MakeWindow ("tstat", 0, TWINSIDE + 2 * THICKBORDER, DashMaxWidth(), STATSIZE, baseWin, BORDER, foreColor); W_SetWindowExposeHandler (tstatw, redrawTstats); Index: dashboard.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/dashboard.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- dashboard.c 26 Mar 2007 04:40:52 -0000 1.20 +++ dashboard.c 13 Apr 2007 09:10:16 -0000 1.21 @@ -97,6 +97,16 @@ } /******************************************************************************/ +/*** DashMaxWidth() - return width adjusted for text size (if font is ***/ +/*** large), or if font is small, return the size of tactical window ***/ +/******************************************************************************/ +int +DashMaxWidth(void) +{ + return MAX(TWINSIDE + (2 * THICKBORDER - 2 * BORDER), 50 + 75 * W_Textwidth); +} + +/******************************************************************************/ /*** timerString() ***/ /******************************************************************************/ char * From modemhero at users.sourceforge.net Fri Apr 13 04:10:18 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 13 Apr 2007 09:10:18 +0000 Subject: [netrek-cvs] client/netrekxp/include proto.h,1.49,1.50 Message-ID: <20070413091027.8B1D2186800@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs16:/tmp/cvs-serv11481/include Modified Files: proto.h Log Message: Fix assumption in STATSIZE and MESSAGESIZE defines that text is only 10 pixels high. Fixed text dashboard to work with increased font size. New function DashMaxWidth() to take into account that dash may need to be wider than tactical, if font size is sufficiently large. Tested against text dashboard only so far. Index: proto.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/proto.h,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- proto.h 13 Apr 2007 07:12:21 -0000 1.49 +++ proto.h 13 Apr 2007 09:10:15 -0000 1.50 @@ -63,6 +63,7 @@ //static void db_box(int x, int y, int w, int h, int f, int color); //static void db_bar(char *lab, int x, int y, int value, int tmpmax, int max, int digits, int color); //static void db_flags(int fr); +int DashMaxWidth(void); void light_erase (void); void light_receive (void); void light_send (void); From modemhero at users.sourceforge.net Fri Apr 13 04:10:18 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 13 Apr 2007 09:10:18 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.176, 1.177 Message-ID: <20070413091027.8D12818680E@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv11481/resources/docs Modified Files: changes.txt Log Message: Fix assumption in STATSIZE and MESSAGESIZE defines that text is only 10 pixels high. Fixed text dashboard to work with increased font size. New function DashMaxWidth() to take into account that dash may need to be wider than tactical, if font size is sufficiently large. Tested against text dashboard only so far. Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.176 retrieving revision 1.177 diff -u -d -r1.176 -r1.177 --- changes.txt 13 Apr 2007 08:08:19 -0000 1.176 +++ changes.txt 13 Apr 2007 09:10:16 -0000 1.177 @@ -1,4 +1,5 @@ Netrek XP 2006, Version 1.3: +- text dashboard now adjusts for font size - added the huge list of color names and color RGB codes to netrekxp manual, this was always confusing to me as to what color names were actually allowed. They were buried in the code, now they are visible in the manual. From modemhero at users.sourceforge.net Fri Apr 13 06:07:31 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 13 Apr 2007 11:07:31 +0000 Subject: [netrek-cvs] client/netrekxp/src dashboard.c,1.21,1.22 Message-ID: <20070413110741.B349C18680E@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv3629/src Modified Files: dashboard.c Log Message: Fix COW and KRP dashboards to work with different size fonts. Index: dashboard.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/dashboard.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- dashboard.c 13 Apr 2007 09:10:16 -0000 1.21 +++ dashboard.c 13 Apr 2007 11:07:29 -0000 1.22 @@ -36,10 +36,34 @@ #define DB_3DIGITS 0 #define DB_5DIGITS 1 -#define BAR_LENGTH 56 - #define SPACING 4 +/* COW/KRP dashboard width spacing is as follows: + +1/3 blank char, 14 text chars for flags/dash message/clock, 2/3 blank char, +11 text chars for shield/speed/hull labels, BAR_LENGTH for shield/speed/hull bars, +1 blank char, 11 text chars for army/wtemp/etemp labels, BAR_LENGTH for army/ +wtemp/etemp bars, 1 blank char, 15 text chars for fuel label, BAR_LENGTH for fuel +bar. For the normal text width (6 pixels) this works out to a dashboard width of: + +(1/3)*6 + 14*6 + (2/3)*6 + 11*6 + (9 1/3)*6 + 1*6 + 11*6 + (9 1/3)*6 + + 1*6 + 15*6 + (9 1/3)*6 = 482 pixels + +To be safe, dash width should be defined as at least 82 chars wide, which it is +in DashMaxWidth(). + +Height spacing is as follows: +3 blank pixels, first line of text, 4 blank pixels (SPACING), second line of text, 4 +blank pixels (SPACING), 3rd line of text. For the normal text height (10 pixels) +this works out to a dashboard height of: + +3 + 1*10 + 4 + 1*10 + 4 + 1*10 = 41 pixels + +To be safe, dash height should be defined as 4 times text height, which it is +in newwin(). + +*/ + /* code to draw and erase packet lights 2/5/94 [BDyess] */ #define SENDX 7 @@ -103,7 +127,10 @@ int DashMaxWidth(void) { - return MAX(TWINSIDE + (2 * THICKBORDER - 2 * BORDER), 50 + 75 * W_Textwidth); + /* Text dashboard uses slightly less space due to having a larger fixed + entry spacing of 50 pixels, but we handle the largest case here, which + is the COW/KRP dashboards */ + return MAX(TWINSIDE + (2 * THICKBORDER - 2 * BORDER), 83 * W_Textwidth); } /******************************************************************************/ @@ -246,6 +273,8 @@ int f, int color) { + /* Was 56, too bad it wasn't defined as an even multiple of text width. */ + register int BAR_LENGTH = W_Textwidth/3 + 9 * W_Textwidth; int border = W_White; if (color == W_Red) @@ -261,7 +290,8 @@ break; case DB_LINE: W_MakeLine (tstatw, x + w, y, x + w, y + h, border); - W_MakeLine (tstatw, x + w, y + 4, x + BAR_LENGTH, y + 4, border); + W_MakeLine (tstatw, x + w, y + 2 * W_Textheight / 3, + x + BAR_LENGTH, y + 2 * W_Textheight / 3, border); break; case DB_NOFILL: W_MakeLine (tstatw, x, y, x + w, y, border); @@ -288,6 +318,8 @@ register int wt, wv; register int tc = 11; register int tw = W_Textwidth * tc; + /* Was 56, too bad it wasn't defined as an even multiple of text width. */ + register int BAR_LENGTH = W_Textwidth/3 + 9 * W_Textwidth; int sign_change = 0; char valstr[32]; @@ -310,7 +342,7 @@ valstr[6] = '/'; itoapad (tmpmax, &(valstr[7]), 0, 3); valstr[10] = ']'; - W_ClearArea (tstatw, x, y, tw + BAR_LENGTH, 10); + W_ClearArea (tstatw, x, y, tw + BAR_LENGTH, W_Textheight); break; case DB_5DIGITS: tc = 15; @@ -322,7 +354,7 @@ valstr[8] = '/'; itoapad (tmpmax, &(valstr[9]), 0, 5); valstr[14] = ']'; - W_ClearArea (tstatw, x, y, tw + BAR_LENGTH, 10); + W_ClearArea (tstatw, x, y, tw + BAR_LENGTH, W_Textheight); break; } @@ -339,12 +371,12 @@ W_WriteText (tstatw, x + (tc / 2 + 1) * W_Textwidth, y, textColor, (&valstr[tc / 2 + 1]), tc / 2, W_RegularFont); - db_box (x + tw, y, BAR_LENGTH, 9, DB_NOFILL, color); + db_box (x + tw, y, BAR_LENGTH, W_Textheight - 1, DB_NOFILL, color); if (wt >= wv && wt > 0) - db_box (x + tw, y, wt, 9, DB_LINE, color); + db_box (x + tw, y, wt, W_Textheight - 1, DB_LINE, color); if (wv > 0) - db_box (x + tw, y, wv, 9, DB_FILL, color); + db_box (x + tw, y, wv, W_Textheight - 1, DB_FILL, color); } /******************************************************************************/ @@ -494,6 +526,7 @@ static int old_torp = -1; static unsigned int old_flags = (unsigned int) -1; static int old_tourn = 0; + register int BAR_LENGTH = W_Textwidth/3 + 9 * W_Textwidth; char buf[16]; struct player *plr; @@ -534,12 +567,12 @@ buf[11] = 'd'; else buf[11] = ' '; - + if (me->p_flags & (PFWEP | PFENG)) - W_WriteText (tstatw, 2, 3, W_Red, "Flags", 5, W_RegularFont); + W_WriteText (tstatw, W_Textwidth/3, 3, W_Red, "Flags", 5, W_RegularFont); else - W_WriteText (tstatw, 2, 3, textColor, "Flags", 5, W_RegularFont); - W_WriteText (tstatw, 2, 17, textColor, buf, 12, W_RegularFont); + W_WriteText (tstatw, W_Textwidth/3, 3, textColor, "Flags", 5, W_RegularFont); + W_WriteText (tstatw, W_Textwidth/3, 3 + W_Textheight + SPACING, textColor, buf, 12, W_RegularFont); old_flags = me->p_flags; #ifdef SOUND if (ingame && oldengflag != (me->p_flags & PFENG)) @@ -552,19 +585,19 @@ oldengflag = (me->p_flags & PFENG); #endif } - + if (fr || status->tourn != old_tourn) { if (status->tourn) { - W_WriteText (tstatw, 74, 17, textColor, "T", 1, W_BoldFont); + W_WriteText (tstatw, W_Textwidth/3 + 12 * W_Textwidth, 3 + W_Textheight + SPACING, textColor, "T", 1, W_BoldFont); tdelay = 0; } else { if (status->tourn != old_tourn && !tdelay) tdelay = time (0) + TOURNEXTENDTIME; - W_WriteText (tstatw, 74, 17, textColor, " ", 1, W_BoldFont); + W_WriteText (tstatw, W_Textwidth/3 + 12 * W_Textwidth, 3 + W_Textheight + SPACING, textColor, " ", 1, W_BoldFont); } old_tourn = status->tourn; } @@ -573,15 +606,16 @@ { if (plr->p_kills > 0.0) { - W_WriteText (tstatw, 346, 17, textColor, "Kills:", 6, + W_WriteText (tstatw, 173 * W_Textwidth / 3, 3 + W_Textheight + SPACING, textColor, "Kills:", 6, W_RegularFont); ftoa (plr->p_kills, buf, 0, 3, 2); - W_WriteText (tstatw, 386, 17, textColor, buf, strlen (buf), - W_RegularFont); + W_WriteText (tstatw, 173 * W_Textwidth / 3 + 6 * W_Textwidth + 2 * W_Textwidth / 3, + 3 + W_Textheight + SPACING, textColor, buf, strlen (buf), W_RegularFont); } else { - W_ClearArea (tstatw, 346, 17, 96, 10); + W_ClearArea (tstatw, 173 * W_Textwidth / 3, 3 + W_Textheight + SPACING, + 12 * W_Textwidth + 2 * W_Textwidth / 3, W_Textheight); } old_kills = plr->p_kills; } @@ -590,14 +624,16 @@ { if (plr->p_ntorp > 0) { - W_WriteText (tstatw, 346, 30, textColor, "Torps:", 6, + W_WriteText (tstatw, 173 * W_Textwidth / 3, 3 + 2 * (W_Textheight + SPACING), textColor, "Torps:", 6, W_RegularFont); buf[0] = (char) (plr->p_ntorp % 10 + '0'); - W_WriteText (tstatw, 386, 30, textColor, buf, 1, W_RegularFont); + W_WriteText (tstatw, 173 * W_Textwidth / 3 + 6 * W_Textwidth + 2 * W_Textwidth / 3, + 3 + 2 * (W_Textheight + SPACING), textColor, buf, 1, W_RegularFont); } else { - W_ClearArea (tstatw, 346, 30, 96, 10); + W_ClearArea (tstatw, 173 * W_Textwidth / 3, 3 + 2 * (W_Textheight + SPACING), + 8 * W_Textwidth + 2 * W_Textwidth / 3, W_Textheight); } old_torp = plr->p_ntorp; } @@ -629,10 +665,10 @@ W_ClearWindow (tstatw); db_flags (fr); - db_special (fr, 38, 3); + db_special (fr, W_Textwidth/3 + 6 * W_Textwidth, 3); /* TIMER */ - db_timer (fr, 2, 3 + 2 * (W_Textheight + SPACING)); + db_timer (fr, W_Textwidth/3, 3 + 2 * (W_Textheight + SPACING)); light_erase(); @@ -653,7 +689,7 @@ color = W_Red; else color = W_Green; - db_bar ("Sp", 90, 3, + db_bar ("Sp", 15 * W_Textwidth, 3, me->p_speed, cur_max, me->p_ship.s_maxspeed, DB_3DIGITS, color); old_spd = me->p_speed; @@ -670,11 +706,11 @@ else color = W_Green; if (me->p_ship.s_type == ATT) - db_bar ("Sh", 90, 17, + db_bar ("Sh", 15 * W_Textwidth, 3 + W_Textheight + SPACING, me->p_shield, me->p_ship.s_maxshield, me->p_ship.s_maxshield, DB_5DIGITS, color); else - db_bar ("Sh", 90, 17, + db_bar ("Sh", 15 * W_Textwidth, 3 + W_Textheight + SPACING, me->p_shield, me->p_ship.s_maxshield, me->p_ship.s_maxshield, DB_3DIGITS, color); old_shl = me->p_shield; @@ -692,12 +728,12 @@ else color = W_Green; if (me->p_ship.s_type == ATT) - db_bar ("Hu", 90, 31, + db_bar ("Hu", 15 * W_Textwidth, 3 + 2 * (W_Textheight + SPACING), (me->p_ship.s_maxdamage - me->p_damage), me->p_ship.s_maxdamage, me->p_ship.s_maxdamage, DB_5DIGITS, color); else - db_bar ("Hu", 90, 31, + db_bar ("Hu", 15 * W_Textwidth, 3 + 2 * (W_Textheight + SPACING), (me->p_ship.s_maxdamage - me->p_damage), me->p_ship.s_maxdamage, me->p_ship.s_maxdamage, DB_3DIGITS, color); @@ -722,7 +758,7 @@ else color = W_Red; - db_bar ("Ar", 218, 3, + db_bar ("Ar", 109 * W_Textwidth / 3, 3, me->p_armies, cur_max, me->p_ship.s_maxarmies, DB_3DIGITS, color); old_arm = me->p_armies; @@ -740,7 +776,7 @@ else color = W_Red; if (me->p_ship.s_type != ATT) - db_bar ("Wt", 218, 17, + db_bar ("Wt", 109 * W_Textwidth / 3, 3 + W_Textheight + SPACING, me->p_wtemp / 10, me->p_ship.s_maxwpntemp / 10, me->p_ship.s_maxwpntemp / 10, DB_3DIGITS, color); old_wpn = me->p_wtemp; @@ -756,7 +792,7 @@ else color = W_Red; if (me->p_ship.s_type != ATT) - db_bar ("Et", 218, 31, + db_bar ("Et", 109 * W_Textwidth / 3, 3 + 2 * (W_Textheight + SPACING), me->p_etemp / 10, me->p_ship.s_maxegntemp / 10, me->p_ship.s_maxegntemp / 10, DB_3DIGITS, color); old_egn = me->p_etemp; @@ -771,7 +807,7 @@ color = W_Yellow; else color = W_Green; - db_bar ("Fu", 346, 3, + db_bar ("Fu", 173 * W_Textwidth / 3, 3, me->p_fuel, me->p_ship.s_maxfuel, me->p_ship.s_maxfuel, DB_5DIGITS, color); old_ful = me->p_fuel; @@ -804,9 +840,10 @@ W_ClearWindow (tstatw); db_flags (fr); - db_special (fr, 38, 3); + db_special (fr, W_Textwidth/3 + 6 * W_Textwidth, 3); - db_timer (fr, 2, 3 + 2 * (W_Textheight + SPACING)); + /* TIMER */ + db_timer (fr, W_Textwidth/3, 3 + 2 * (W_Textheight + SPACING)); light_erase(); @@ -827,7 +864,7 @@ color = W_Yellow; else color = W_White; - db_bar ("Sp", 90, 3, + db_bar ("Sp", 15 * W_Textwidth, 3, me->p_speed, cur_max, me->p_ship.s_maxspeed, DB_3DIGITS, color); old_spd = me->p_speed; @@ -844,11 +881,11 @@ else color = W_White; if (me->p_ship.s_type == ATT) - db_bar ("Sh", 90, 17, + db_bar ("Sh", 15 * W_Textwidth, 3 + W_Textheight + SPACING, me->p_ship.s_maxshield - me->p_shield, me->p_ship.s_maxshield, me->p_ship.s_maxshield, DB_5DIGITS, color); else - db_bar ("Sh", 90, 17, + db_bar ("Sh", 15 * W_Textwidth, 3 + W_Textheight + SPACING, me->p_ship.s_maxshield - me->p_shield, me->p_ship.s_maxshield, me->p_ship.s_maxshield, DB_3DIGITS, color); old_shl = me->p_shield; @@ -864,11 +901,11 @@ else color = W_Yellow; if (me->p_ship.s_type == ATT) - db_bar ("Da", 90, 31, + db_bar ("Da", 15 * W_Textwidth, 3 + 2 * (W_Textheight + SPACING), me->p_damage, me->p_ship.s_maxdamage, me->p_ship.s_maxdamage, DB_5DIGITS, color); else - db_bar ("Da", 90, 31, + db_bar ("Da", 15 * W_Textwidth, 3 + 2 * (W_Textheight + SPACING), me->p_damage, me->p_ship.s_maxdamage, me->p_ship.s_maxdamage, DB_3DIGITS, color); old_dam = me->p_damage; @@ -893,7 +930,7 @@ color = W_Red; else color = W_Yellow; - db_bar ("Ar", 218, 3, + db_bar ("Ar", 109 * W_Textwidth / 3, 3, me->p_armies, cur_max, me->p_ship.s_maxarmies, DB_3DIGITS, color); old_arm = me->p_armies; @@ -911,7 +948,7 @@ else color = W_Yellow; if (me->p_ship.s_type != ATT) - db_bar ("Wt", 218, 17, + db_bar ("Wt", 109 * W_Textwidth / 3, 3 + W_Textheight + SPACING, me->p_wtemp / 10, me->p_ship.s_maxwpntemp / 10, me->p_ship.s_maxwpntemp / 10, DB_3DIGITS, color); old_wpn = me->p_wtemp; @@ -928,7 +965,7 @@ else color = W_Red; if (me->p_ship.s_type != ATT) - db_bar ("Et", 218, 31, + db_bar ("Et", 109 * W_Textwidth / 3, 3 + 2 * (W_Textheight + SPACING), me->p_etemp / 10, me->p_ship.s_maxegntemp / 10, me->p_ship.s_maxegntemp / 10, DB_3DIGITS, color); old_egn = me->p_etemp; @@ -944,7 +981,7 @@ color = W_White; else color = W_Yellow; - db_bar ("Fu", 346, 3, + db_bar ("Fu", 173 * W_Textwidth / 3, 3, me->p_fuel, me->p_ship.s_maxfuel, me->p_ship.s_maxfuel, DB_5DIGITS, color); old_ful = me->p_fuel; From modemhero at users.sourceforge.net Fri Apr 13 06:07:31 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 13 Apr 2007 11:07:31 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.177, 1.178 Message-ID: <20070413110741.CD4A118680F@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv3629/resources/docs Modified Files: changes.txt Log Message: Fix COW and KRP dashboards to work with different size fonts. Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.177 retrieving revision 1.178 diff -u -d -r1.177 -r1.178 --- changes.txt 13 Apr 2007 09:10:16 -0000 1.177 +++ changes.txt 13 Apr 2007 11:07:28 -0000 1.178 @@ -1,5 +1,5 @@ Netrek XP 2006, Version 1.3: -- text dashboard now adjusts for font size +- text, COW and KRP dashboards now adjust for font size - added the huge list of color names and color RGB codes to netrekxp manual, this was always confusing to me as to what color names were actually allowed. They were buried in the code, now they are visible in the manual. From modemhero at users.sourceforge.net Fri Apr 13 07:02:48 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 13 Apr 2007 12:02:48 +0000 Subject: [netrek-cvs] client/netrekxp/src dashboard3.c,1.9,1.10 Message-ID: <20070413120256.DA553B437@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv29197/src Modified Files: dashboard3.c Log Message: LABs dashboard adjusts for font size. Index: dashboard3.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/dashboard3.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- dashboard3.c 6 Apr 2007 06:46:31 -0000 1.9 +++ dashboard3.c 13 Apr 2007 12:02:46 -0000 1.10 @@ -24,6 +24,32 @@ #include "data.h" #include "proto.h" +/* LABs dashboard width spacing is as follows: + +1/3 blank char, 12 1/2 text chars for db bar (speed), 5 blank pixels, 12 1/2 text +chars for db bar (fuel), 5 blank pixels, 12 1/2 text chars for db bar (shield), +5 blank pixels, 12 1/2 text chars for db bar (damage), 5 blank pixels, 12 1/2 text +chars for db bar (engine), 4 blank chars, 12 chars for clock. +For the normal text width (6 pixels) this works out to a dashboard width of: + +(1/3)*6 + 12.5*6 + 5 + 12.5*6 + 5 + 12.5*6 + 5 + 12.5*6 + 5 + 12.5*6 + + + 4*6 + 12*6 = 493 pixels + +To be safe, dash width should be defined as at least 83 chars wide, which it is +in DashMaxWidth(). + +Height spacing is as follows: +2 blank pixels, first line of text, 2 blank pixels, second line of text, 8 +blank pixels, 3rd line of text. For the normal text height (10 pixels) +this works out to a dashboard height of: + +2 + 1*10 + 2 + 1*10 + 8 + 1*10 = 42 pixels + +To be safe, dash height should be defined as 4 times text height, which it is +in newwin(). + +*/ + /******************************************************************************/ /*** db_itoa() ***/ /******************************************************************************/ @@ -324,7 +350,8 @@ tdelay = time (0) + TOURNEXTENDTIME; } - W_WriteText (tstatw, 2, 32, W_White, buf, 13, W_RegularFont); + W_WriteText (tstatw, W_Textwidth/3, 12 + 2 * W_Textheight, + W_White, buf, 13, W_RegularFont); old_flags = me->p_flags; old_tourn = status->tourn; @@ -355,6 +382,8 @@ static float old_kills = -1; static int old_torp = -1; int cur_max, cur_arm, label_len; + /* Was 75, too bad it wasn't defined as an even multiple of text width. */ + register int BAR_LENGTH = W_Textwidth/2 + 12 * W_Textwidth; char label[32]; float kills; int torp; @@ -374,10 +403,10 @@ W_ClearWindow (tstatw); db_flags (fr); - db_special (fr, 160, 32); + db_special (fr, 12 + 2 * BAR_LENGTH, 12 + 2 * W_Textheight); /* TIMER */ - db_timer (fr, 428, 32); + db_timer (fr, 22 + 5 * BAR_LENGTH + 4 * W_Textwidth, 12 + 2 * W_Textheight); light_erase(); @@ -391,29 +420,29 @@ cur_max = 0; else if (cur_max > me->p_ship.s_maxspeed) cur_max = me->p_ship.s_maxspeed; - + if (fr || (me->p_speed != old_spd) || (old_cur_max != cur_max)) { - db_bar ("Spd", 2, 2, 75, 25, + db_bar ("Spd", W_Textwidth/3, 2, BAR_LENGTH, 2 * W_Textheight + 5, me->p_ship.s_maxspeed, cur_max, me->p_speed, 1); } if (fr || (old_ful != me->p_fuel)) { - db_bar ("Ful", 82, 2, 75, 25, + db_bar ("Ful", W_Textwidth/3 + BAR_LENGTH + 5, 2, BAR_LENGTH, 2 * W_Textheight + 5, me->p_ship.s_maxfuel, me->p_ship.s_maxfuel, me->p_fuel, 0); } if (fr || (old_shl != me->p_shield)) { - db_bar ("Shl", 162, 2, 75, 25, + db_bar ("Shl", W_Textwidth/3 + 2 * (BAR_LENGTH + 5), 2, BAR_LENGTH, 2 * W_Textheight + 5, me->p_ship.s_maxshield, me->p_ship.s_maxshield, me->p_shield, 0); } if (fr || (old_dam != me->p_damage)) { - db_bar ("Dam", 242, 2, 75, 25, + db_bar ("Dam", W_Textwidth/3 + 3 * (BAR_LENGTH + 5), 2, BAR_LENGTH, 2 * W_Textheight + 5, me->p_ship.s_maxdamage, me->p_ship.s_maxdamage, me->p_damage, 1); } @@ -422,14 +451,15 @@ { if (fr || (old_wpn != me->p_wtemp)) { - db_bar ("Wpn", 322, 2, 75, 25, + db_bar ("Wpn", W_Textwidth/3 + 4 * (BAR_LENGTH + 5), 2, BAR_LENGTH, 2 * W_Textheight + 5, me->p_ship.s_maxwpntemp / 10, me->p_ship.s_maxwpntemp / 10, me->p_wtemp / 10, 1); } if (fr || (old_egn != me->p_etemp)) { - W_ClearArea (tstatw, 324, 32, 78, W_Textheight); + W_ClearArea (tstatw, W_Textwidth/3 + 4 * (BAR_LENGTH + 5) + 2, + 12 + 2 * W_Textheight, 13 * W_Textwidth, W_Textheight); label[0] = 'E'; label[1] = 'g'; @@ -444,12 +474,12 @@ if (me->p_etemp > (me->p_ship.s_maxegntemp / 2)) { W_WriteText (tstatw, - 324, 32, W_White, label, label_len, W_BoldFont); + W_Textwidth/3 + 4 * (BAR_LENGTH + 5) + 2, 12 + 2 * W_Textheight, W_White, label, label_len, W_BoldFont); } else { W_WriteText (tstatw, - 324, 32, + W_Textwidth/3 + 4 * (BAR_LENGTH + 5) + 2, 12 + 2 * W_Textheight, W_Grey, label, label_len, W_RegularFont); } } @@ -458,14 +488,15 @@ { if (fr || (old_egn != me->p_etemp)) { - db_bar ("Egn", 322, 2, 75, 25, + db_bar ("Egn", W_Textwidth/3 + 4 * (BAR_LENGTH + 5), 2, BAR_LENGTH, 2 * W_Textheight + 5, me->p_ship.s_maxegntemp / 10, me->p_ship.s_maxegntemp / 10, me->p_etemp / 10, 1); } if (fr || (old_wpn != me->p_wtemp)) { - W_ClearArea (tstatw, 324, 32, 78, W_Textheight); + W_ClearArea (tstatw, W_Textwidth/3 + 4 * (BAR_LENGTH + 5) + 2, + 12 + 2 * W_Textheight, 13 * W_Textwidth, W_Textheight); label[0] = 'W'; label[1] = 'p'; @@ -480,12 +511,12 @@ if (me->p_wtemp > (me->p_ship.s_maxwpntemp / 2)) { W_WriteText (tstatw, - 324, 32, W_White, label, label_len, W_BoldFont); + W_Textwidth/3 + 4 * (BAR_LENGTH + 5) + 2, 12 + 2 * W_Textheight, W_White, label, label_len, W_BoldFont); } else { W_WriteText (tstatw, - 324, 32, + W_Textwidth/3 + 4 * (BAR_LENGTH + 5) + 2, 12 + 2 * W_Textheight, W_Grey, label, label_len, W_RegularFont); } } @@ -503,7 +534,8 @@ if (fr || (old_arm != me->p_armies) || (old_cur_arm != cur_arm)) { - W_ClearArea (tstatw, 402, 2, 98, W_Textheight); + W_ClearArea (tstatw, W_Textwidth/3 + 5 * (BAR_LENGTH + 5), 2, + 16 * W_Textwidth, W_Textheight); if (cur_arm > 0) { @@ -522,24 +554,25 @@ if (me->p_armies >= cur_arm) { W_WriteText (tstatw, - 402, 2, W_Red, label, label_len, W_BoldFont); + W_Textwidth/3 + 5 * (BAR_LENGTH + 5), 2, W_Red, label, label_len, W_BoldFont); } else if (me->p_armies > 0) { W_WriteText (tstatw, - 402, 2, W_Yellow, label, label_len, W_BoldFont); + W_Textwidth/3 + 5 * (BAR_LENGTH + 5), 2, W_Yellow, label, label_len, W_BoldFont); } else { W_WriteText (tstatw, - 402, 2, W_Green, label, label_len, W_BoldFont); + W_Textwidth/3 + 5 * (BAR_LENGTH + 5), 2, W_Green, label, label_len, W_BoldFont); } } } if (fr || (old_kills != kills)) { - W_ClearArea (tstatw, 402, 4 + W_Textheight, 98, W_Textheight); + W_ClearArea (tstatw, W_Textwidth/3 + 5 * (BAR_LENGTH + 5), 4 + W_Textheight, + 13 * W_Textwidth, W_Textheight); if (kills > 0.0) { @@ -556,19 +589,19 @@ if (cur_arm > 4) { W_WriteText (tstatw, - 402, 4 + W_Textheight, + W_Textwidth/3 + 5 * (BAR_LENGTH + 5), 4 + W_Textheight, W_White, label, label_len, W_BoldFont); } else if (cur_arm > 1) { W_WriteText (tstatw, - 402, 4 + W_Textheight, + W_Textwidth/3 + 5 * (BAR_LENGTH + 5), 4 + W_Textheight, W_White, label, label_len, W_RegularFont); } else { W_WriteText (tstatw, - 402, 4 + W_Textheight, + W_Textwidth/3 + 5 * (BAR_LENGTH + 5), 4 + W_Textheight, W_Grey, label, label_len, W_RegularFont); } } @@ -578,7 +611,8 @@ if (fr || (old_torp != torp)) { - W_ClearArea (tstatw, 242, 32, 72, W_Textheight); + W_ClearArea (tstatw, W_Textwidth/3 + 3 * (BAR_LENGTH + 5), 12 + 2 * W_Textheight, + 12 * W_Textwidth, W_Textheight); if (torp > 0) { @@ -593,7 +627,7 @@ label_len = 8 + db_itoa (&label[8], torp); W_WriteText (tstatw, - 242, 32, + W_Textwidth/3 + 3 * (BAR_LENGTH + 5), 12 + 2 * W_Textheight, W_White, label, label_len, W_RegularFont); } old_torp = torp; From modemhero at users.sourceforge.net Fri Apr 13 07:02:48 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 13 Apr 2007 12:02:48 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.178, 1.179 Message-ID: <20070413120256.DC426B438@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv29197/resources/docs Modified Files: changes.txt Log Message: LABs dashboard adjusts for font size. Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.178 retrieving revision 1.179 diff -u -d -r1.178 -r1.179 --- changes.txt 13 Apr 2007 11:07:28 -0000 1.178 +++ changes.txt 13 Apr 2007 12:02:46 -0000 1.179 @@ -1,5 +1,5 @@ Netrek XP 2006, Version 1.3: -- text, COW and KRP dashboards now adjust for font size +- text, COW, KRP and LABs dashboards now adjust for font size - added the huge list of color names and color RGB codes to netrekxp manual, this was always confusing to me as to what color names were actually allowed. They were buried in the code, now they are visible in the manual. From modemhero at users.sourceforge.net Fri Apr 13 21:56:20 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 14 Apr 2007 02:56:20 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C,1.138,1.139 Message-ID: <20070414025629.A3BCCB43B@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs16:/tmp/cvs-serv12921 Modified Files: NetrekXP to do list.C Log Message: Netrekrc option fullBitmapRotation to choose to use 32 position bitmap sets rather than rotating the bitmaps to 256 positions. Added yellow alert/cloak range circle to tactical if tactical is big enough. Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.138 retrieving revision 1.139 diff -u -d -r1.138 -r1.139 --- NetrekXP to do list.C 13 Apr 2007 07:52:40 -0000 1.138 +++ NetrekXP to do list.C 14 Apr 2007 02:56:18 -0000 1.139 @@ -37,7 +37,6 @@ if you fly into the NW corner of the galaxy. this was never anticipated! 9) if cursor is in window and it receives a message, it scrolls to bottom automatically, bad if you are scrolling up reading history -10) things to fix with font size: dashboard Wish list: 1) Rewrite graphics engine using SDL From modemhero at users.sourceforge.net Fri Apr 13 21:56:21 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 14 Apr 2007 02:56:21 +0000 Subject: [netrek-cvs] client/netrekxp/resources/htmlhelp/html generalconfig.html, 1.51, 1.52 Message-ID: <20070414025629.A207BB437@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html In directory sc8-pr-cvs16:/tmp/cvs-serv12921/resources/htmlhelp/html Modified Files: generalconfig.html Log Message: Netrekrc option fullBitmapRotation to choose to use 32 position bitmap sets rather than rotating the bitmaps to 256 positions. Added yellow alert/cloak range circle to tactical if tactical is big enough. Index: generalconfig.html =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html/generalconfig.html,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- generalconfig.html 13 Apr 2007 07:12:23 -0000 1.51 +++ generalconfig.html 14 Apr 2007 02:56:19 -0000 1.52 @@ -337,6 +337,16 @@ +fullBitmapRotation +Draw old bitmap sets to 256 angles instead of 32 + +
      +
    • on (default)
    • +
    • off
    • +
    + + + headingTic Draw a tic mark indicating your ship's direction From modemhero at users.sourceforge.net Fri Apr 13 21:56:20 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 14 Apr 2007 02:56:20 +0000 Subject: [netrek-cvs] client/netrekxp/include data.h,1.76,1.77 Message-ID: <20070414025629.9A01C1867F4@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs16:/tmp/cvs-serv12921/include Modified Files: data.h Log Message: Netrekrc option fullBitmapRotation to choose to use 32 position bitmap sets rather than rotating the bitmaps to 256 positions. Added yellow alert/cloak range circle to tactical if tactical is big enough. Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.76 retrieving revision 1.77 diff -u -d -r1.76 -r1.77 --- data.h 13 Apr 2007 07:12:20 -0000 1.76 +++ data.h 14 Apr 2007 02:56:18 -0000 1.77 @@ -742,4 +742,5 @@ extern int packetLights; /* show packet send/receive via dashboard */ extern int infoRange; /* show limit on info with large tactical windows */ extern int scaleFactor; /* allows for scaling of graphics */ +extern int fullBitmapRotation; /* draw old bitmap sets to all angles */ #endif /* _h_data */ From modemhero at users.sourceforge.net Fri Apr 13 21:56:21 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 14 Apr 2007 02:56:21 +0000 Subject: [netrek-cvs] client/netrekxp/src data.c, 1.82, 1.83 defaults.c, 1.78, 1.79 local.c, 1.98, 1.99 map.c, 1.51, 1.52 option.c, 1.47, 1.48 Message-ID: <20070414025630.9B8C218680F@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv12921/src Modified Files: data.c defaults.c local.c map.c option.c Log Message: Netrekrc option fullBitmapRotation to choose to use 32 position bitmap sets rather than rotating the bitmaps to 256 positions. Added yellow alert/cloak range circle to tactical if tactical is big enough. Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- data.c 13 Apr 2007 07:12:23 -0000 1.82 +++ data.c 14 Apr 2007 02:56:19 -0000 1.83 @@ -831,4 +831,5 @@ int sortPlanets = 1; /* sort planet list by team and army count */ int packetLights = 1; /* show packet send/receive via dashboard */ int infoRange = 1; /* show limit on info with large tactical windows */ -int scaleFactor = 40; /* allows for scaling of graphics */ \ No newline at end of file +int scaleFactor = 40; /* allows for scaling of graphics */ +int fullBitmapRotation = 1; /* draw old bitmap sets to all angles */ Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.98 retrieving revision 1.99 diff -u -d -r1.98 -r1.99 --- local.c 13 Apr 2007 07:52:41 -0000 1.98 +++ local.c 14 Apr 2007 02:56:19 -0000 1.99 @@ -1027,8 +1027,12 @@ j->p_ship.s_height * SCALE / scaleFactor, BMP_SHIP_WIDTH, BMP_SHIP_HEIGHT, - (360 * j->p_dir/255), // Converted to angle - ship_bits[j->p_ship.s_type][0], // Use pointing "up" bitmap + // If fullBitmapRotation, use actual angle and ship bitmap in + // pointing up position. If not, find the correct bitmap in + // the ship rosette and set angle to 0. + fullBitmapRotation ? (360 * j->p_dir/255) : 0, + fullBitmapRotation ? ship_bits[j->p_ship.s_type][0] : + ship_bits[j->p_ship.s_type][rosette (j->p_dir)], playerColor (j), w); } @@ -2473,6 +2477,30 @@ * Ends the if, too */ #endif /* HOCKEY_LINES */ + /* Draw viewrange circle IF tactical is large enough. Draw cloak case only */ + if (viewRange && (MAXDISTCLOAK / scaleFactor < TWINSIDE / 2) && + (me->p_flags & PFCLOAK) && me->p_ship.s_type != STARBASE) + { + /* Orbitting any non-owned planet gets you seen, + so don't draw the circle */ + if ((me->p_flags & PFORBIT) && (planets[me->p_planet].pl_owner != me->p_team)) ; + /* Don't draw if not carrying and viewRange is 2 */ + else if (me->p_armies == 0 && viewRange == 2) ; + else + { + int rad; + + rad = MAXDISTCLOAK / scaleFactor; + W_WriteCircle(w, TWINSIDE/2, TWINSIDE/2, rad, 0, 1, W_Yellow); + /* This could use improvement .. */ + clearzone[0][clearcount] = TWINSIDE/2 - (rad); + clearzone[1][clearcount] = TWINSIDE/2 - (rad); + clearzone[2][clearcount] = 2*rad + 1; + clearzone[3][clearcount] = 2*rad + 1; + clearcount++; + } + } + /* Draw inforange box (if necessary) */ if ( infoRange && TWINSIDE > (INFORANGE * SCALE / scaleFactor) && !(me->p_x < 0 || me->p_x > GWIDTH)) @@ -2702,7 +2730,7 @@ break; } } - /* Force a border redraw? Bitmaps rotated realtime as well as viewRange circles + /* 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. Index: map.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- map.c 13 Apr 2007 07:12:24 -0000 1.51 +++ map.c 14 Apr 2007 02:56:19 -0000 1.52 @@ -1140,7 +1140,7 @@ if (j->p_flags & PFCLOAK) { rad = MAXDISTCLOAK * GWINSIDE / GWIDTH; - color = W_Red; + color = W_Yellow; } else { Index: option.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/option.c,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- option.c 10 Apr 2007 05:43:45 -0000 1.47 +++ option.c 14 Apr 2007 02:56:19 -0000 1.48 @@ -272,6 +272,7 @@ {0, "Ship Menu", &MenuPage, 0, 0, 0, NULL, &Menus_Range}, {1, "Page %d (click to change)", &MenuPage, 0, 0, 0, NULL, &Menus_Range}, {1, "", &colorClient, 0, 0, 0, bitmaptypemess, &bitmap_range}, + {1, "draw ships to 256 positions", &fullBitmapRotation, 0, 0, 0, NULL, NULL}, #ifdef VSHIELD_BITMAPS {1, "vary shields bitmap w/ dam", &varyShields, 0, 0, 0, NULL, NULL}, {1, "vary shields color w/ dam", &varyShieldsColor, 0, 0, 0, NULL, NULL}, Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.78 retrieving revision 1.79 diff -u -d -r1.78 -r1.79 --- defaults.c 13 Apr 2007 07:12:23 -0000 1.78 +++ defaults.c 14 Apr 2007 02:56:19 -0000 1.79 @@ -212,6 +212,12 @@ NULL } }, + {"fullBitmapRotation", &fullBitmapRotation, RC_BOOL, + { + "Draw old bitmap sets to 256 angles instead of 32", + NULL + } + }, {"headingTic", &headingTic, RC_BOOL, { "Draw a tic mark indicating your ship's direction", @@ -1833,6 +1839,7 @@ extraAlertBorder = booleanDefault ("extraAlertBorder", extraAlertBorder); showPlanetNames = booleanDefault ("showPlanetNames", 1); reportKills = booleanDefault ("reportKills", reportKills); + fullBitmapRotation = booleanDefault ("fullBitmapRotation", fullBitmapRotation); udpDebug = intDefault ("udpDebug", udpDebug); udpClientSend = intDefault ("udpClientSend", udpClientSend); From modemhero at users.sourceforge.net Fri Apr 13 21:56:21 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 14 Apr 2007 02:56:21 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.179, 1.180 netrekrc, 1.63, 1.64 netrekrc_options.txt, 1.50, 1.51 Message-ID: <20070414025629.CA5AB18680E@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv12921/resources/docs Modified Files: changes.txt netrekrc netrekrc_options.txt Log Message: Netrekrc option fullBitmapRotation to choose to use 32 position bitmap sets rather than rotating the bitmaps to 256 positions. Added yellow alert/cloak range circle to tactical if tactical is big enough. Index: netrekrc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- netrekrc 13 Apr 2007 07:12:22 -0000 1.63 +++ netrekrc 14 Apr 2007 02:56:18 -0000 1.64 @@ -126,6 +126,9 @@ # (but only works if forceDisplay = 0). forceMono: off +# Draw old bitmap sets to 256 angles instead of 32 +fullBitmapRotation: on + # Draw a tic mark indicating your ship's direction headingTic: off Index: netrekrc_options.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc_options.txt,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- netrekrc_options.txt 13 Apr 2007 07:12:22 -0000 1.50 +++ netrekrc_options.txt 14 Apr 2007 02:56:19 -0000 1.51 @@ -64,7 +64,7 @@ forceMono: (on/off) outdated option, that will force display to 16 colors (but only works if forceDisplay = 0). -fullScreen: (on/off) create border for main window +fullBitmapRotation: (on/off) draw old bitmap sets to 256 angles instead of 32 headingTic: (on/off) draw a tic mark indicating your ship's direction highlightFriendlyPhasers: (on/off) use white color for friendly phasers ignoreCaps: (on/off) ignore CapsLock key state Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.179 retrieving revision 1.180 diff -u -d -r1.179 -r1.180 --- changes.txt 13 Apr 2007 12:02:46 -0000 1.179 +++ changes.txt 14 Apr 2007 02:56:18 -0000 1.180 @@ -1,4 +1,9 @@ Netrek XP 2006, Version 1.3: +- new netrekrc option "fullBitmapRotation: (on)/off" that lets you choose to draw the + old ship bitmaps to 32 positions (off) instead of 256 (on). Useful for those with + custom bitmap sets, as it will use all 32 bitmaps in a set rather than just rotating + the first one in the set. +- cloak range circle now shows on tactical if tactical is sized large enough - text, COW, KRP and LABs dashboards now adjust for font size - added the huge list of color names and color RGB codes to netrekxp manual, this was always confusing to me as to what color names were actually allowed. They were buried From modemhero at users.sourceforge.net Fri Apr 13 22:48:49 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 14 Apr 2007 03:48:49 +0000 Subject: [netrek-cvs] client/netrekxp/src mswindow.c,1.70,1.71 Message-ID: <20070414034857.BD1C71867D9@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv6795/src Modified Files: mswindow.c Log Message: Improved windows sizing box procedure by only having size box show when user right click's border. Size box goes away when user right clicks anywhere in window. Same for both local/map, and message richtext windows. Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.70 retrieving revision 1.71 diff -u -d -r1.70 -r1.71 --- mswindow.c 13 Apr 2007 07:12:24 -0000 1.70 +++ mswindow.c 14 Apr 2007 03:48:47 -0000 1.71 @@ -1141,12 +1141,6 @@ WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX; parentwin = &myroot; } - else if (strncmp (name, "local", 5) == 0 || strncmp (name, "map", 3) == 0) - { - s = name; - if (mainResizeable) - SpecialStyle = WS_THICKFRAME; - } else s = name; @@ -2157,7 +2151,30 @@ EventQueue[EventTail].type = W_EV_BUTTON; return (0); + case WM_NCRBUTTONDOWN: + BringWindowToTop (hwnd); + GET_STRUCT_PTR; + if (mainResizeable && (((Window *) mapw != NULL && win->hwnd == ((Window *) mapw)->hwnd) + || ((Window *) w != NULL && win->hwnd == ((Window *) w)->hwnd)) ) + { + if (GetWindowLongPtr(hwnd, GWL_STYLE) & WS_SIZEBOX) + { + // remove sizing border and redraw + SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) & ~WS_SIZEBOX); + SetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER); + // Flag local window as needing redraw + if (win->hwnd == ((Window *) w)->hwnd) + W_FastClear = 1; + } + else + { + // set sizing border and redraw + SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) | WS_SIZEBOX); + SetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER); + } + } + break; case WM_MBUTTONDOWN: BringWindowToTop (hwnd); GET_STRUCT_PTR; @@ -2197,6 +2214,20 @@ STORE_EVENT_MOUSE; LastPressHwnd = hwnd; + if (mainResizeable && (((Window *) mapw != NULL && win->hwnd == ((Window *) mapw)->hwnd) + || ((Window *) w != NULL && win->hwnd == ((Window *) w)->hwnd)) ) + { + if (GetWindowLongPtr(hwnd, GWL_STYLE) & WS_SIZEBOX) + { + // remove sizing border and redraw + SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) & ~WS_SIZEBOX); + SetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER); + // Flag local window as needing redraw + if (win->hwnd == ((Window *) w)->hwnd) + W_FastClear = 1; + } + } + #ifdef SHIFTED_MOUSE if (shiftedMouse) { @@ -6149,16 +6180,27 @@ // fake a caption hit to move window SendMessage(hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0); break; - case WM_NCLBUTTONDOWN: - // set sizing border - SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) | WS_SIZEBOX); - break; - case WM_LBUTTONUP: - case WM_NCLBUTTONUP: - SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) & ~WS_SIZEBOX); - // remove sizing border and redraw - SetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER); + case WM_NCRBUTTONDOWN: + if (GetWindowLongPtr(hwnd, GWL_STYLE) & WS_SIZEBOX) + { + // remove sizing border and redraw + SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) & ~WS_SIZEBOX); + SetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER); + } + else + { + // set sizing border and redraw + SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) | WS_SIZEBOX); + SetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER); + } break; + case WM_RBUTTONDOWN: + if (GetWindowLongPtr(hwnd, GWL_STYLE) & WS_SIZEBOX) + { + // remove sizing border and redraw + SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) & ~WS_SIZEBOX); + SetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER); + } } return CallWindowProc (lpfnDefRichEditWndProc, hwnd, msg, wParam, lParam); } From modemhero at users.sourceforge.net Fri Apr 13 22:48:49 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 14 Apr 2007 03:48:49 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.180, 1.181 Message-ID: <20070414034857.BEF81B437@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv6795/resources/docs Modified Files: changes.txt Log Message: Improved windows sizing box procedure by only having size box show when user right click's border. Size box goes away when user right clicks anywhere in window. Same for both local/map, and message richtext windows. Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.180 retrieving revision 1.181 diff -u -d -r1.180 -r1.181 --- changes.txt 14 Apr 2007 02:56:18 -0000 1.180 +++ changes.txt 14 Apr 2007 03:48:47 -0000 1.181 @@ -1,4 +1,8 @@ Netrek XP 2006, Version 1.3: +- changed how sizing border works on windows (local, map, message windows), they now + all follow the same procedure. Right click on window border to activate sizing border, + and right click again to deactivate sizing border. Remember, mainResizeable needs to + be on for this to work with the local and map windows. - new netrekrc option "fullBitmapRotation: (on)/off" that lets you choose to draw the old ship bitmaps to 32 positions (off) instead of 256 (on). Useful for those with custom bitmap sets, as it will use all 32 bitmaps in a set rather than just rotating @@ -24,16 +28,16 @@ - added netrekrc option "color.God: " to alter color of God messages - resizing the local and map windows now only lets you size them as squares - richtext message windows are now resizeable, it works a little different than sizing - other windows. First you left click on the window once to activate the sizing border, + other windows. First you right click on the window once to activate the sizing border, then grab border with mouse and size normally. The window will now have a larger border, - which you will probably want to get rid of. To get rid of it, double left-click the - window. The reason the procedure is a little complicated is because having a border + which you will probably want to get rid of. To get rid of it, right click the window + again. The reason the procedure is a little complicated is because having a border which can both resize the window requires a larger border, which cuts into precious screen space for messages. So this sizing border needs to be activated first, then deactivated when the window is done sizing. - richtext message windows are now moveable, it works a little different than moving other - windows. Instead of clicking on border, you click on body of window, hold down mouse, - and move the window. + windows. Instead of clicking on border, you click on body of window, hold down left + mouse button, and move the window. - phaser misses on sturgeon servers now show proper phaser length - can now change login name via options menu, saved via in-game save key - preference for showing main title bar (toggled via alt+enter) is now saved via From modemhero at users.sourceforge.net Sat Apr 14 00:14:25 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 14 Apr 2007 05:14:25 +0000 Subject: [netrek-cvs] client/netrekxp/src mswindow.c,1.71,1.72 Message-ID: <20070414051434.58610B407@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv12731/src Modified Files: mswindow.c Log Message: Fixed richtext windows to allow scrollback to read message history, and at the same time ensure windows never get "stuck" in unscrolled position accidentally. Updated hints on new resize procedure. Cleared todo list of richtext issues, all known issues have been solved. Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- mswindow.c 14 Apr 2007 03:48:47 -0000 1.71 +++ mswindow.c 14 Apr 2007 05:14:23 -0000 1.72 @@ -6067,6 +6067,7 @@ HWND hwnd; CHARRANGE cr; int numLines, visibleLines; + int x, y; //Find the end of the linked-list of strings... if (p) // ...if the list has been created @@ -6152,7 +6153,10 @@ diff = numLines - point.y / W_Textheight - visibleLines; if (diff >= 1) { - point.y += W_Textheight * diff; + // Scroll if mouse isn't in window, or if mouse is in + // window but scrollback is already at bottom + if (!findMouseInWin (& x, &y, (W_Window) win) || diff == 1) + point.y += W_Textheight * diff; SendMessage (win->hwnd, EM_SETSCROLLPOS, 0, (LPARAM) &point); } //SendMessage (win->hwnd, EM_HIDESELECTION, FALSE, 0); From modemhero at users.sourceforge.net Sat Apr 14 00:14:25 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 14 Apr 2007 05:14:25 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.181, 1.182 hints.dat, 1.11, 1.12 Message-ID: <20070414051434.5B6891867F4@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv12731/resources/docs Modified Files: changes.txt hints.dat Log Message: Fixed richtext windows to allow scrollback to read message history, and at the same time ensure windows never get "stuck" in unscrolled position accidentally. Updated hints on new resize procedure. Cleared todo list of richtext issues, all known issues have been solved. Index: hints.dat =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/hints.dat,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- hints.dat 8 Apr 2007 22:36:41 -0000 1.11 +++ hints.dat 14 Apr 2007 05:14:23 -0000 1.12 @@ -4,7 +4,7 @@ the red circle you may see flash around your ship when detting is the range at which you can detonate enemy torpedoes, you can turn this circle off through the ship menu. you can use Alt+Enter to toggle the main title bar on and off. you can use Ctrl+a and Ctrl+z to zoom in/out the tactical window. -you can resize your tactical and map windows via the netrekrc. +you can resize your tactical, map and message windows by right clicking on the border to turn on the sizing box. Right click window a second time to deactivate sizing border. you can send messages from the player list window. Left click for individual messages, middle mouse button click for all board messages, and right click for team messages. you can remap keys by pointing at the key in the help window and pushing the key you want that option to be. you can open the NetrekXP help program with the F1 key. Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.181 retrieving revision 1.182 diff -u -d -r1.181 -r1.182 --- changes.txt 14 Apr 2007 03:48:47 -0000 1.181 +++ changes.txt 14 Apr 2007 05:14:23 -0000 1.182 @@ -1,4 +1,11 @@ Netrek XP 2006, Version 1.3: +- changed how message scrolling works in richtext windows. If the mouse is over a + message window AND message position isn't already at the bottom of the window, + it will not scroll upon receiving a new message, as it is likely you are scrolling + back to read old messages. If mouse is not in a window that receives a message, + that window will scroll to the bottom, solving the problem of sometimes accidentally + not resetting window scrollback to bottom and the failing to see new messages as + they come in. - changed how sizing border works on windows (local, map, message windows), they now all follow the same procedure. Right click on window border to activate sizing border, and right click again to deactivate sizing border. Remember, mainResizeable needs to From modemhero at users.sourceforge.net Sat Apr 14 00:14:25 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 14 Apr 2007 05:14:25 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C,1.139,1.140 Message-ID: <20070414051434.6FD66B40B@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs16:/tmp/cvs-serv12731 Modified Files: NetrekXP to do list.C Log Message: Fixed richtext windows to allow scrollback to read message history, and at the same time ensure windows never get "stuck" in unscrolled position accidentally. Updated hints on new resize procedure. Cleared todo list of richtext issues, all known issues have been solved. Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.139 retrieving revision 1.140 diff -u -d -r1.139 -r1.140 --- NetrekXP to do list.C 14 Apr 2007 02:56:18 -0000 1.139 +++ NetrekXP to do list.C 14 Apr 2007 05:14:23 -0000 1.140 @@ -32,11 +32,8 @@ 6) sendto() error: 10049 on metaserver connect to a bad server, believe it's due to hostname not resolving. Currently fixed by using mulitple attempts to resolve bad host names. -7) minor richtext issue with scrolling - extra line at the end -8) With expanded tactical ..can now see ships at galactic coordinates (-500,-500), +7) With expanded tactical ..can now see ships at galactic coordinates (-500,-500), if you fly into the NW corner of the galaxy. this was never anticipated! -9) if cursor is in window and it receives a message, it scrolls to bottom automatically, -bad if you are scrolling up reading history Wish list: 1) Rewrite graphics engine using SDL From modemhero at users.sourceforge.net Sat Apr 14 02:44:37 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 14 Apr 2007 07:44:37 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.182, 1.183 Message-ID: <20070414074446.2440BB429@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv14959/resources/docs Modified Files: changes.txt 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: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.182 retrieving revision 1.183 diff -u -d -r1.182 -r1.183 --- changes.txt 14 Apr 2007 05:14:23 -0000 1.182 +++ changes.txt 14 Apr 2007 07:44:34 -0000 1.183 @@ -1,4 +1,12 @@ Netrek XP 2006, Version 1.3: +- the left and right arrow keys are now mapped to turn left and turn right, they execute + a turn request for a 1/16 turn in the desired direction. I personally find it awkward + but if someone is playing without a mouse for whatever reason, it allows them to move + at least. Since using the arrow pad requires a keyboard equivalent key, and these + are new keyactions, there are now 2 less available key sequences. Control+[ is now + mapped to turn left, and control+] is turn right, these keys were selected to be as + out of the way as possible to avoid conflicts with existing keymaps. +- the up and down arrow keys now are mapped to accelerate and deccelerate - changed how message scrolling works in richtext windows. If the mouse is over a message window AND message position isn't already at the bottom of the window, it will not scroll upon receiving a new message, as it is likely you are scrolling From modemhero at users.sourceforge.net Sat Apr 14 02:44:36 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 14 Apr 2007 07:44:36 +0000 Subject: [netrek-cvs] client/netrekxp/include proto.h,1.50,1.51 Message-ID: <20070414074446.252FD1867F4@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs16:/tmp/cvs-serv14959/include Modified Files: proto.h 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: proto.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/proto.h,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- proto.h 13 Apr 2007 09:10:15 -0000 1.50 +++ proto.h 14 Apr 2007 07:44:34 -0000 1.51 @@ -389,6 +389,8 @@ Key163 (W_Event * data), Key175 (W_Event * data), Key180 (W_Event * data), + Key187 (void), + Key189 (void), Key193 (void), Key194 (W_Event * data), Key195 (W_Event * data), From modemhero at users.sourceforge.net Sat Apr 14 02:44:37 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 14 Apr 2007 07:44:37 +0000 Subject: [netrek-cvs] client/netrekxp/src input.c, 1.35, 1.36 mswindow.c, 1.72, 1.73 Message-ID: <20070414074446.43C3F1867F5@smtpgrey-1.real-time.com> 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'; From modemhero at users.sourceforge.net Sat Apr 14 04:49:39 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 14 Apr 2007 09:49:39 +0000 Subject: [netrek-cvs] client/netrekxp/src data.c, 1.83, 1.84 defaults.c, 1.79, 1.80 local.c, 1.99, 1.100 mswindow.c, 1.73, 1.74 Message-ID: <20070414094949.3E000B409@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv5987/src Modified Files: data.c defaults.c local.c mswindow.c Log Message: Set beeplite TTS position if TWINSIDE changes. Redid redraw for tactical yellow alert circle to be smarter redraw routine (done similiar to how it's cleared on map window). New netrekrc option mainMaximized to start netrek window maximized, default is on. Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.83 retrieving revision 1.84 diff -u -d -r1.83 -r1.84 --- data.c 14 Apr 2007 02:56:19 -0000 1.83 +++ data.c 14 Apr 2007 09:49:34 -0000 1.84 @@ -764,6 +764,7 @@ int windowMove = 0; int mainResizeable = 1; +int mainMaximized = 1; int maxScrollLines = 300; int mainTitleBar = 0; int observerMode = 0; Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.73 retrieving revision 1.74 diff -u -d -r1.73 -r1.74 --- mswindow.c 14 Apr 2007 07:44:35 -0000 1.73 +++ mswindow.c 14 Apr 2007 09:49:35 -0000 1.74 @@ -1451,6 +1451,9 @@ ShowWindow (win->hwnd, SW_SHOWNORMAL); BringWindowToTop (win->hwnd); + + if (window == baseWin && mainMaximized) + ShowWindow (((Window *) baseWin)->hwnd, SW_MAXIMIZE); } //Hides the window. @@ -1960,6 +1963,9 @@ height = width; TWINSIDE = width - 2 * win->border; + /* Beeplite TTS may need to be adjusted */ + tts_ypos = intDefault("tts_ypos", TWINSIDE / 2 - 16); + /* Have to take into account basewin border */ winRect.left -= baseRect.left; winRect.top -= baseRect.top; Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.79 retrieving revision 1.80 diff -u -d -r1.79 -r1.80 --- defaults.c 14 Apr 2007 02:56:19 -0000 1.79 +++ defaults.c 14 Apr 2007 09:49:34 -0000 1.80 @@ -268,6 +268,12 @@ NULL } }, + {"mainMaximized", &mainMaximized, RC_BOOL, + { + "Make main window maximized on client start", + NULL + } + }, {"mainResizeable", &mainResizeable, RC_BOOL, { "Make main window + local/map windows resizeable", @@ -1702,6 +1708,7 @@ doubleBuffering = booleanDefault ("doubleBuffering", doubleBuffering); mainResizeable = booleanDefault ("mainResizeable", mainResizeable); + mainMaximized = booleanDefault ("mainMaximized", mainMaximized); mainTitleBar = booleanDefault ("mainTitleBar", mainTitleBar); allowWheelActions = booleanDefault ("allowWheelActions", allowWheelActions); richText = booleanDefault ("richText", richText); Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.99 retrieving revision 1.100 diff -u -d -r1.99 -r1.100 --- local.c 14 Apr 2007 02:56:19 -0000 1.99 +++ local.c 14 Apr 2007 09:49:35 -0000 1.100 @@ -30,6 +30,8 @@ static int clearzone[4][(MAXTORP + 1) * MAXPLAYER + (MAXPLASMA + 1) * MAXPLAYER + MAXPLANETS]; static int clearlcount = 0; +static int clearx, cleary, clearr; /* x,y,radius for range circle */ +static int clearccount = 0; #ifdef HOCKEY_LINES static int clearline[4][MAXPLAYER + 2 * MAXPLAYER + NUM_HOCKEY_LINES]; #else @@ -2492,12 +2494,10 @@ rad = MAXDISTCLOAK / scaleFactor; W_WriteCircle(w, TWINSIDE/2, TWINSIDE/2, rad, 0, 1, W_Yellow); - /* This could use improvement .. */ - clearzone[0][clearcount] = TWINSIDE/2 - (rad); - clearzone[1][clearcount] = TWINSIDE/2 - (rad); - clearzone[2][clearcount] = 2*rad + 1; - clearzone[3][clearcount] = 2*rad + 1; - clearcount++; + clearx = TWINSIDE/2; + cleary = TWINSIDE/2; + clearr = rad; + clearccount++; } } @@ -2921,6 +2921,7 @@ W_ClearWindow (w); clearcount = 0; clearlcount = 0; + clearccount = 0; tractcurrent = tracthead; W_FastClear = 0; } @@ -2947,5 +2948,11 @@ W_MakeLines (w, clearline[0], clearline[1], clearline[2], clearline[3], clearlcount, backColor); clearlcount = 0; + + if (clearccount) + { + W_WriteCircle(w, clearx, cleary, clearr, 0, 0, backColor); + clearccount--; + } } } From modemhero at users.sourceforge.net Sat Apr 14 04:49:37 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 14 Apr 2007 09:49:37 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.183, 1.184 netrekrc, 1.64, 1.65 netrekrc_options.txt, 1.51, 1.52 Message-ID: <20070414095017.75DBF1867F5@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv5987/resources/docs Modified Files: changes.txt netrekrc netrekrc_options.txt Log Message: Set beeplite TTS position if TWINSIDE changes. Redid redraw for tactical yellow alert circle to be smarter redraw routine (done similiar to how it's cleared on map window). New netrekrc option mainMaximized to start netrek window maximized, default is on. Index: netrekrc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -r1.64 -r1.65 --- netrekrc 14 Apr 2007 02:56:18 -0000 1.64 +++ netrekrc 14 Apr 2007 09:49:34 -0000 1.65 @@ -155,6 +155,9 @@ # Log all messages to file. Requires "logfile" option logging: off +# Make main window maximized on client start +mainMaximized: on + # Make main window + local/map windows resizeable mainResizeable: on Index: netrekrc_options.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc_options.txt,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- netrekrc_options.txt 14 Apr 2007 02:56:19 -0000 1.51 +++ netrekrc_options.txt 14 Apr 2007 09:49:34 -0000 1.52 @@ -89,7 +89,8 @@ logging: (on/off) enable logging login: (string) character login macroKey: (char, ESC, TAB) key to toggle macro mode -mainResizeable: (on/off) make main window (netrek) resizeable +mainMaximized: (on/off) make main window maximized on client start +mainResizeable: (on/off) make main window + local/map windows resizeable maxScrollLines: (50-500) maximum number of scroll lines in a message window mainTitleBar: (on/off) start main window with title bar on (can be toggled by alt-enter) messageHoldThresh: (integer) put message on hold after mouse move (Adds # to the end of message) Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.183 retrieving revision 1.184 diff -u -d -r1.183 -r1.184 --- changes.txt 14 Apr 2007 07:44:34 -0000 1.183 +++ changes.txt 14 Apr 2007 09:49:34 -0000 1.184 @@ -1,4 +1,6 @@ Netrek XP 2006, Version 1.3: +- new netrekrc option "mainMaximized: (on)/off" to make main window maximized on client + start - the left and right arrow keys are now mapped to turn left and turn right, they execute a turn request for a 1/16 turn in the desired direction. I personally find it awkward but if someone is playing without a mouse for whatever reason, it allows them to move From modemhero at users.sourceforge.net Sat Apr 14 04:49:37 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 14 Apr 2007 09:49:37 +0000 Subject: [netrek-cvs] client/netrekxp/include data.h,1.77,1.78 Message-ID: <20070414095017.212C218680E@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs16:/tmp/cvs-serv5987/include Modified Files: data.h Log Message: Set beeplite TTS position if TWINSIDE changes. Redid redraw for tactical yellow alert circle to be smarter redraw routine (done similiar to how it's cleared on map window). New netrekrc option mainMaximized to start netrek window maximized, default is on. Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.77 retrieving revision 1.78 diff -u -d -r1.77 -r1.78 --- data.h 14 Apr 2007 02:56:18 -0000 1.77 +++ data.h 14 Apr 2007 09:49:33 -0000 1.78 @@ -673,6 +673,7 @@ extern int windowMove; /* allow moving of internal windows */ extern int maxScrollLines; /* maximum number of scroll lines in a window */ extern int mainResizeable; /* allow resize of netrek window */ +extern int mainMaximized; /* start netrek window maximized */ extern int mainTitleBar; /* start netrek window with title bar on */ extern int playerListMessaging; /* allow message zoom when clicking on player list */ extern int messageKeyOnly; /* only start messages with the actual message key(s), From modemhero at users.sourceforge.net Sat Apr 14 04:49:36 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 14 Apr 2007 09:49:36 +0000 Subject: [netrek-cvs] client/netrekxp/resources/htmlhelp/html generalconfig.html, 1.52, 1.53 Message-ID: <20070414095016.B8C901867F5@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html In directory sc8-pr-cvs16:/tmp/cvs-serv5987/resources/htmlhelp/html Modified Files: generalconfig.html Log Message: Set beeplite TTS position if TWINSIDE changes. Redid redraw for tactical yellow alert circle to be smarter redraw routine (done similiar to how it's cleared on map window). New netrekrc option mainMaximized to start netrek window maximized, default is on. Index: generalconfig.html =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html/generalconfig.html,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- generalconfig.html 14 Apr 2007 02:56:19 -0000 1.52 +++ generalconfig.html 14 Apr 2007 09:49:34 -0000 1.53 @@ -497,6 +497,16 @@ char, ESC, TAB +mainMaximized +Make main window maximized on client start + +
      +
    • on (default)
    • +
    • off
    • +
    + + + mainResizeable Enable resizing of main window From playnetrek at users.sourceforge.net Sun Apr 15 16:23:32 2007 From: playnetrek at users.sourceforge.net (Joe Evango) Date: Sun, 15 Apr 2007 21:23:32 +0000 Subject: [netrek-cvs] netrek/CVS.adm MstData.stp, NONE, 1.1 UsgData.stp, NONE, 1.1 prjprm.stp, NONE, 1.1 Message-ID: <20070415212341.984941867F4@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/netrek/CVS.adm In directory sc8-pr-cvs16:/tmp/cvs-serv22550 Added Files: MstData.stp UsgData.stp prjprm.stp Log Message: Setup changed --- NEW FILE: UsgData.stp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: prjprm.stp --- --- NEW FILE: MstData.stp --- From playnetrek at users.sourceforge.net Sun Apr 15 16:29:42 2007 From: playnetrek at users.sourceforge.net (Joe Evango) Date: Sun, 15 Apr 2007 21:29:42 +0000 Subject: [netrek-cvs] netrek/CVS.adm prjprm.stp,1.1,1.2 Message-ID: <20070415212950.18C9AB407@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/netrek/CVS.adm In directory sc8-pr-cvs16:/tmp/cvs-serv25339 Modified Files: prjprm.stp Log Message: Setup changed Index: prjprm.stp =================================================================== RCS file: /cvsroot/netrek/netrek/CVS.adm/prjprm.stp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- prjprm.stp 15 Apr 2007 21:23:30 -0000 1.1 +++ prjprm.stp 15 Apr 2007 21:29:39 -0000 1.2 @@ -14,7 +14,7 @@ - - + + From playnetrek at users.sourceforge.net Sun Apr 15 17:17:34 2007 From: playnetrek at users.sourceforge.net (Joe Evango) Date: Sun, 15 Apr 2007 22:17:34 +0000 Subject: [netrek-cvs] client/netrekxp/configuration-program - New directory Message-ID: <20070415221742.E6AD9B407@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/configuration-program In directory sc8-pr-cvs16:/tmp/cvs-serv17247/configuration-program Log Message: Directory /cvsroot/netrek/client/netrekxp/configuration-program added to the repository From playnetrek at users.sourceforge.net Sun Apr 15 17:22:05 2007 From: playnetrek at users.sourceforge.net (Joe Evango) Date: Sun, 15 Apr 2007 22:22:05 +0000 Subject: [netrek-cvs] client/netrekxp/configuration-program Form1.frm, NONE, 1.1 Message-ID: <20070415222213.981EB1867F3@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/configuration-program In directory sc8-pr-cvs16:/tmp/cvs-serv21434 Added Files: Form1.frm Log Message: Code in Form1 and Form3 are near identical. Only difference is the keymap settings. Form1 contains comments for both forms --- NEW FILE: Form1.frm --- VERSION 5.00 Begin VB.Form Form1 BackColor = &H00000000& Caption = "Netrek Configuration Utility" ClientHeight = 10770 ClientLeft = 60 ClientTop = 345 ClientWidth = 10950 Icon = "Form1.frx":0000 LinkTopic = "Form1" ScaleHeight = 10770 ScaleWidth = 10950 Begin VB.CheckBox Check5 BackColor = &H80000007& Caption = "Enable Sound" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 [...2085 lines suppressed...] End Sub Private Sub Form_Load() End Sub Private Sub Option1_Click() Form3.Show Unload Form1 End Sub Private Sub Text1_Change(Index As Integer) If Text1(30) = " " Then Text1(30) = "Space Bar" Else Text1(30) = Text1(30) End If End Sub From playnetrek at users.sourceforge.net Sun Apr 15 17:27:36 2007 From: playnetrek at users.sourceforge.net (Joe Evango) Date: Sun, 15 Apr 2007 22:27:36 +0000 Subject: [netrek-cvs] client/netrekxp/configuration-program Form1.frm, 1.1, 1.2 Message-ID: <20070415222745.93CB8B409@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/configuration-program In directory sc8-pr-cvs16:/tmp/cvs-serv26015 Modified Files: Form1.frm Log Message: Code in Form1 and Form3 are near identical. Only difference is the keymap settings. Form1 contains comments for both forms. Index: Form1.frm =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/configuration-program/Form1.frm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Form1.frm 15 Apr 2007 22:22:02 -0000 1.1 +++ Form1.frm 15 Apr 2007 22:27:34 -0000 1.2 @@ -1461,7 +1461,7 @@ Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False -' Netrek Configurator v1.3 - written by Joe Evango +' Netrek XP 2006 Configuration Program v1.1 - written by Joe Evango ' ' Program notes from Joe 4/15/07- ' Code contains some comments, pretty easy to follow the logic. From playnetrek at users.sourceforge.net Sun Apr 15 17:49:13 2007 From: playnetrek at users.sourceforge.net (Joe Evango) Date: Sun, 15 Apr 2007 22:49:13 +0000 Subject: [netrek-cvs] client/netrekxp/configuration-program netrekconfigxp2006v11slim-play.VBP, NONE, 1.1 Message-ID: <20070415224921.F17071867F3@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/configuration-program In directory sc8-pr-cvs16:/tmp/cvs-serv13707 Added Files: netrekconfigxp2006v11slim-play.VBP Log Message: Netrek XP 2006 Configuration Program. Built for Netrek Xp 2006 v1.2. Contains the new Classic Mode option. --- NEW FILE: netrekconfigxp2006v11slim-play.VBP --- Type=Exe Form=Form3.frm Form=Form1.frm IconForm="Form3" Startup="Form3" HelpFile="" Title="netrekconfig" ExeName32="netrekconfigXP2006-play-with-classic.exe" Path32="..\..\..\Executables" Command32="" Name="Netrek_XP_2006_Configurator" HelpContextID="0" CompatibleMode="0" MajorVer=1 MinorVer=0 RevisionVer=3 AutoIncrementVer=0 ServerSupportFiles=0 VersionComments="All versions up to 1.3 have been written by Joe Evango and were written from scratch. No code was copied from any Netrek developers. This code was made available on SourceForge in April 2007. " VersionCompanyName="www.PlayNetrek.org" VersionProductName="Netrek XP 2006 Configuration Program" CompilationType=0 OptimizationType=0 FavorPentiumPro(tm)=0 CodeViewDebugInfo=0 NoAliasing=0 BoundsCheck=0 OverflowCheck=0 FlPointCheck=0 FDIVCheck=0 UnroundedFP=0 StartMode=0 Unattended=0 Retained=0 ThreadPerObject=0 MaxNumberOfThreads=1 DebugStartupOption=0 [MS Transaction Server] AutoRefresh=1 From playnetrek at users.sourceforge.net Sun Apr 15 17:49:30 2007 From: playnetrek at users.sourceforge.net (Joe Evango) Date: Sun, 15 Apr 2007 22:49:30 +0000 Subject: [netrek-cvs] client/netrekxp/configuration-program netrekconfigxp2006v11slim-play.vbw, NONE, 1.1 Message-ID: <20070415224939.5481D1867F3@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/configuration-program In directory sc8-pr-cvs16:/tmp/cvs-serv13810 Added Files: netrekconfigxp2006v11slim-play.vbw Log Message: --- NEW FILE: netrekconfigxp2006v11slim-play.vbw --- Form3 = 90, 0, 885, 520, , -62, -9, 651, 494, C Form1 = 254, 308, 947, 952, , 44, 44, 805, 688, C From playnetrek at users.sourceforge.net Sun Apr 15 17:50:59 2007 From: playnetrek at users.sourceforge.net (Joe Evango) Date: Sun, 15 Apr 2007 22:50:59 +0000 Subject: [netrek-cvs] client/netrekxp/configuration-program Form1.frx, NONE, 1.1 Form3.frm, NONE, 1.1 Form3.frx, NONE, 1.1 Message-ID: <20070415225107.6FBEFB407@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/configuration-program In directory sc8-pr-cvs16:/tmp/cvs-serv14889 Added Files: Form1.frx Form3.frm Form3.frx Log Message: --- NEW FILE: Form3.frm --- VERSION 5.00 Begin VB.Form Form3 BackColor = &H80000007& Caption = "Netrek Configuration Utility" ClientHeight = 10770 ClientLeft = 60 ClientTop = 345 ClientWidth = 10950 Icon = "Form3.frx":0000 LinkTopic = "Form3" ScaleHeight = 10770 ScaleWidth = 10950 Begin VB.CheckBox Check5 BackColor = &H80000007& Caption = "Enable Sound" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 [...2086 lines suppressed...] End Sub Private Sub Form_Load() End Sub Private Sub Option2_Click() Form1.Show Unload Form3 End Sub Private Sub Text1_Change(Index As Integer) If Text1(17) = " " Then Text1(17) = "Space Bar" Else Text1(17) = Text1(17) End If End Sub --- NEW FILE: Form1.frx --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Form3.frx --- (This appears to be a binary file; contents omitted.) From playnetrek at users.sourceforge.net Sun Apr 15 18:00:43 2007 From: playnetrek at users.sourceforge.net (Joe Evango) Date: Sun, 15 Apr 2007 23:00:43 +0000 Subject: [netrek-cvs] client/netrekxp/configuration-program Form1.frm, 1.2, NONE Message-ID: <20070415230051.54AD11867F3@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/configuration-program In directory sc8-pr-cvs16:/tmp/cvs-serv21983 Removed Files: Form1.frm Log Message: --- Form1.frm DELETED --- From playnetrek at users.sourceforge.net Sun Apr 15 18:04:40 2007 From: playnetrek at users.sourceforge.net (Joe Evango) Date: Sun, 15 Apr 2007 23:04:40 +0000 Subject: [netrek-cvs] client/netrekxp/configuration-program Form1.frm, 1.3, 1.4 Message-ID: <20070415230448.83A50B409@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/configuration-program In directory sc8-pr-cvs16:/tmp/cvs-serv25236 Added Files: Form1.frm Log Message: Code for form1 and form3 are near identical. Only difference is the keymap options. Please refer to form1 for code comments. --- NEW FILE: Form1.frm --- VERSION 5.00 Begin VB.Form Form1 BackColor = &H00000000& Caption = "Netrek Configuration Utility" ClientHeight = 10770 ClientLeft = 60 ClientTop = 345 ClientWidth = 10950 Icon = "Form1.frx":0000 LinkTopic = "Form1" ScaleHeight = 10770 ScaleWidth = 10950 Begin VB.CheckBox Check5 BackColor = &H80000007& Caption = "Enable Sound" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 [...2085 lines suppressed...] End Sub Private Sub Form_Load() End Sub Private Sub Option1_Click() Form3.Show Unload Form1 End Sub Private Sub Text1_Change(Index As Integer) If Text1(30) = " " Then Text1(30) = "Space Bar" Else Text1(30) = Text1(30) End If End Sub From playnetrek at users.sourceforge.net Sun Apr 15 18:31:55 2007 From: playnetrek at users.sourceforge.net (Joe Evango) Date: Sun, 15 Apr 2007 23:31:55 +0000 Subject: [netrek-cvs] client/netrekxp/configuration-program Form1.frm, 1.4, 1.5 Message-ID: <20070415233205.4D3F3B407@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/configuration-program In directory sc8-pr-cvs16:/tmp/cvs-serv4189 Modified Files: Form1.frm Log Message: Code for form1 and form3 are near identical. Only difference is the keymap options. Please refer to form1 for code comments. Index: Form1.frm =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/configuration-program/Form1.frm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Form1.frm 15 Apr 2007 23:04:37 -0000 1.4 +++ Form1.frm 15 Apr 2007 23:31:53 -0000 1.5 @@ -1461,7 +1461,23 @@ Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False -' Netrek XP 2006 Configuration Program v1.3 - written by Joe Evango +'Copyright (C) 2007 Joe Evango - Netrek XP 2006 Configuration Program v1.3 +' +'This program is free software; you can redistribute it and/or +'modify it under the terms of the GNU General Public License +'as published by the Free Software Foundation; either version 2 +'of the License, or (at your option) any later version. +' +'This program is distributed in the hope that it will be useful, +'but WITHOUT ANY WARRANTY; without even the implied warranty of +'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'GNU General Public License for more details. +' +'You should have received a copy of the GNU General Public License +'along with this program; if not, write to the Free Software +'Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +' +'To contact the author email joe at playnetrek.org ' ' Program notes from Joe 4/15/07- ' Code contains some comments, pretty easy to follow the logic. @@ -1476,6 +1492,7 @@ ' took a while to put the keymap portion of this together but it works well. I only ask that if any modifications ' are made you also make your code changes available to the community and give me a mention as a contributor + 'Checks if Classic Mode is enabled and swaps the Classic Mode graphic Private Sub Check1_Click() From playnetrek at users.sourceforge.net Sun Apr 15 18:32:49 2007 From: playnetrek at users.sourceforge.net (Joe Evango) Date: Sun, 15 Apr 2007 23:32:49 +0000 Subject: [netrek-cvs] client/netrekxp/configuration-program netrekconfigxp2006v11slim-play.VBP, 1.1, 1.2 Message-ID: <20070415233257.DB3FEB407@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/configuration-program In directory sc8-pr-cvs16:/tmp/cvs-serv4645 Modified Files: netrekconfigxp2006v11slim-play.VBP Log Message: Netrek XP 2006 Configuration Program. Built for Netrek XP 2006 v1.2. Contains the new Classic Mode option. Index: netrekconfigxp2006v11slim-play.VBP =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/configuration-program/netrekconfigxp2006v11slim-play.VBP,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- netrekconfigxp2006v11slim-play.VBP 15 Apr 2007 22:49:10 -0000 1.1 +++ netrekconfigxp2006v11slim-play.VBP 15 Apr 2007 23:32:47 -0000 1.2 @@ -16,7 +16,7 @@ RevisionVer=3 AutoIncrementVer=0 ServerSupportFiles=0 -VersionComments="All versions up to 1.3 have been written by Joe Evango and were written from scratch. No code was copied from any Netrek developers. This code was made available on SourceForge in April 2007. " +VersionComments="Copyright (C) 2007 Joe Evango - Netrek XP 2006 Configuration Program v1.3 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. To contact the author email joe at playnetrek.org" VersionCompanyName="www.PlayNetrek.org" VersionProductName="Netrek XP 2006 Configuration Program" CompilationType=0 From playnetrek at users.sourceforge.net Sun Apr 15 18:34:28 2007 From: playnetrek at users.sourceforge.net (Joe Evango) Date: Sun, 15 Apr 2007 23:34:28 +0000 Subject: [netrek-cvs] client/netrekxp/configuration-program Form3.frm, 1.1, 1.2 Message-ID: <20070415233436.19542B407@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/configuration-program In directory sc8-pr-cvs16:/tmp/cvs-serv5506 Modified Files: Form3.frm Log Message: Index: Form3.frm =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/configuration-program/Form3.frm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Form3.frm 15 Apr 2007 22:50:55 -0000 1.1 +++ Form3.frm 15 Apr 2007 23:34:26 -0000 1.2 @@ -1460,7 +1460,23 @@ Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False -' Netrek XP 2006 Configuration Program v1.3 - written by Joe Evango +'Copyright (C) 2007 Joe Evango - Netrek XP 2006 Configuration Program v1.3 +' +'This program is free software; you can redistribute it and/or +'modify it under the terms of the GNU General Public License +'as published by the Free Software Foundation; either version 2 +'of the License, or (at your option) any later version. +' +'This program is distributed in the hope that it will be useful, +'but WITHOUT ANY WARRANTY; without even the implied warranty of +'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'GNU General Public License for more details. +' +'You should have received a copy of the GNU General Public License +'along with this program; if not, write to the Free Software +'Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +' +'To contact the author email joe at playnetrek.org ' ' Program notes from Joe 4/15/07- ' Code contains some comments, pretty easy to follow the logic. @@ -2106,10 +2122,6 @@ End Sub -Private Sub Form_Load() - -End Sub - Private Sub Option2_Click() Form1.Show Unload Form3 From playnetrek at users.sourceforge.net Sun Apr 15 18:34:53 2007 From: playnetrek at users.sourceforge.net (Joe Evango) Date: Sun, 15 Apr 2007 23:34:53 +0000 Subject: [netrek-cvs] client/netrekxp/configuration-program gpl.txt, NONE, 1.1 Message-ID: <20070415233501.83E96B407@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/configuration-program In directory sc8-pr-cvs16:/tmp/cvs-serv5564 Added Files: gpl.txt Log Message: --- NEW FILE: gpl.txt --- GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. From playnetrek at users.sourceforge.net Sun Apr 15 20:19:55 2007 From: playnetrek at users.sourceforge.net (Joe Evango) Date: Mon, 16 Apr 2007 01:19:55 +0000 Subject: [netrek-cvs] netrek/CVS.adm MstData.stp, 1.1, NONE UsgData.stp, 1.1, NONE prjprm.stp, 1.2, NONE Message-ID: <20070416012003.8CC841867F3@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/netrek/CVS.adm In directory sc8-pr-cvs16:/tmp/cvs-serv26525 Removed Files: MstData.stp UsgData.stp prjprm.stp Log Message: --- UsgData.stp DELETED --- --- prjprm.stp DELETED --- --- MstData.stp DELETED --- From playnetrek at users.sourceforge.net Sun Apr 15 21:05:39 2007 From: playnetrek at users.sourceforge.net (Joe Evango) Date: Mon, 16 Apr 2007 02:05:39 +0000 Subject: [netrek-cvs] client/netrekxp/configuration-program Form1.frm, 1.5, 1.6 Message-ID: <20070416020547.F1449B409@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/configuration-program In directory sc8-pr-cvs16:/tmp/cvs-serv30025 Modified Files: Form1.frm Log Message: Index: Form1.frm =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/configuration-program/Form1.frm,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Form1.frm 15 Apr 2007 23:31:53 -0000 1.5 +++ Form1.frm 16 Apr 2007 02:05:37 -0000 1.6 @@ -1461,23 +1461,7 @@ Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False -'Copyright (C) 2007 Joe Evango - Netrek XP 2006 Configuration Program v1.3 -' -'This program is free software; you can redistribute it and/or -'modify it under the terms of the GNU General Public License -'as published by the Free Software Foundation; either version 2 -'of the License, or (at your option) any later version. -' -'This program is distributed in the hope that it will be useful, -'but WITHOUT ANY WARRANTY; without even the implied warranty of -'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -'GNU General Public License for more details. -' -'You should have received a copy of the GNU General Public License -'along with this program; if not, write to the Free Software -'Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -' -'To contact the author email joe at playnetrek.org +' Netrek XP 2006 Configuration Program v1.3 - written by Joe Evango ' ' Program notes from Joe 4/15/07- ' Code contains some comments, pretty easy to follow the logic. @@ -1492,7 +1476,6 @@ ' took a while to put the keymap portion of this together but it works well. I only ask that if any modifications ' are made you also make your code changes available to the community and give me a mention as a contributor - 'Checks if Classic Mode is enabled and swaps the Classic Mode graphic Private Sub Check1_Click() From playnetrek at users.sourceforge.net Sun Apr 15 21:13:42 2007 From: playnetrek at users.sourceforge.net (Joe Evango) Date: Mon, 16 Apr 2007 02:13:42 +0000 Subject: [netrek-cvs] client/netrekxp/configuration-program Form1.frm, 1.6, 1.7 Message-ID: <20070416021350.74FA9B400@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/configuration-program In directory sc8-pr-cvs16:/tmp/cvs-serv1222 Modified Files: Form1.frm Log Message: Code for form1 and form3 are near identical. Only difference is the keymap options. Please refer to form1 for code comments. Index: Form1.frm =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/configuration-program/Form1.frm,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Form1.frm 16 Apr 2007 02:05:37 -0000 1.6 +++ Form1.frm 16 Apr 2007 02:13:40 -0000 1.7 @@ -1461,7 +1461,23 @@ Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False -' Netrek XP 2006 Configuration Program v1.3 - written by Joe Evango +'Copyright (C) 2007 Joe Evango - Netrek XP 2006 Configuration Program v1.3 +' +'This program is free software; you can redistribute it and/or +'modify it under the terms of the GNU General Public License +'as published by the Free Software Foundation; either version 2 +'of the License, or (at your option) any later version. +' +'This program is distributed in the hope that it will be useful, +'but WITHOUT ANY WARRANTY; without even the implied warranty of +'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'GNU General Public License for more details. +' +'You should have received a copy of the GNU General Public License +'along with this program; if not, write to the Free Software +'Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +' +'To contact the author email joe at playnetrek.org ' ' Program notes from Joe 4/15/07- ' Code contains some comments, pretty easy to follow the logic. @@ -1476,6 +1492,7 @@ ' took a while to put the keymap portion of this together but it works well. I only ask that if any modifications ' are made you also make your code changes available to the community and give me a mention as a contributor + 'Checks if Classic Mode is enabled and swaps the Classic Mode graphic Private Sub Check1_Click() From modemhero at users.sourceforge.net Tue Apr 17 02:48:52 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 17 Apr 2007 07:48:52 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C, 1.140, 1.141 clientr.suo, 1.120, 1.121 Message-ID: <20070417074903.B3E4E1867E0@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs16:/tmp/cvs-serv29204 Modified Files: NetrekXP to do list.C clientr.suo Log Message: Readd alt playerlist to help window. Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.140 retrieving revision 1.141 diff -u -d -r1.140 -r1.141 --- NetrekXP to do list.C 14 Apr 2007 05:14:23 -0000 1.140 +++ NetrekXP to do list.C 17 Apr 2007 07:48:49 -0000 1.141 @@ -34,6 +34,8 @@ host names. 7) With expanded tactical ..can now see ships at galactic coordinates (-500,-500), if you fly into the NW corner of the galaxy. this was never anticipated! +8) changing between sizing border messes up border alert draw, until you actually +move window. Wish list: 1) Rewrite graphics engine using SDL Index: clientr.suo =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.suo,v retrieving revision 1.120 retrieving revision 1.121 diff -u -d -r1.120 -r1.121 Binary files /tmp/cvsjPGuhZ and /tmp/cvsnDxyh9 differ From modemhero at users.sourceforge.net Tue Apr 17 02:48:53 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Tue, 17 Apr 2007 07:48:53 +0000 Subject: [netrek-cvs] client/netrekxp/src helpwin.c,1.8,1.9 Message-ID: <20070417074903.B5472B403@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv29204/src Modified Files: helpwin.c Log Message: Readd alt playerlist to help window. Index: helpwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/helpwin.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- helpwin.c 2 Mar 2007 12:57:52 -0000 1.8 +++ helpwin.c 17 Apr 2007 07:48:50 -0000 1.9 @@ -127,7 +127,7 @@ "U Show rankings window", "m Message Window Zoom", "/ Toggle sorted player list", -// "A Toggle alternate player list", + "' Toggle alternate player list", ": Toggle message logging", "+ Show UDP options window", "= Update all", From modemhero at users.sourceforge.net Tue Apr 17 21:05:28 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 18 Apr 2007 02:05:28 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.184, 1.185 Message-ID: <20070418020538.36F88B42F@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv13267/resources/docs Modified Files: changes.txt Log Message: Moved reinitialization of SDB buffers from WM_EXITSIZEMOVE to WM_SIZE, as moving to the latter ensures correct clipping rectangle is set. Moved initstars() to be after TWINSIDE is changed, fixes regression. Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.184 retrieving revision 1.185 diff -u -d -r1.184 -r1.185 --- changes.txt 14 Apr 2007 09:49:34 -0000 1.184 +++ changes.txt 18 Apr 2007 02:05:25 -0000 1.185 @@ -64,7 +64,7 @@ In the case of the main window, it won't save placement, for now (complicated to do). All other windows will obey size and placements you give them. Hopefully this takes some of the pain out of setting up windows (you should be able to do it without - having to edit netrekrc hopefully). + having to edit netrekrc). - new netrekrc option "saveFile: name" to control what filename you write to when you save your options in game (either with " key or via the save menu). Default is now netrekrc, so that means if you save in-game, it will overwrite your netrekrc with From modemhero at users.sourceforge.net Tue Apr 17 21:05:28 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 18 Apr 2007 02:05:28 +0000 Subject: [netrek-cvs] client/netrekxp/src mswindow.c,1.74,1.75 Message-ID: <20070418020538.33FB7B42B@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv13267/src Modified Files: mswindow.c Log Message: Moved reinitialization of SDB buffers from WM_EXITSIZEMOVE to WM_SIZE, as moving to the latter ensures correct clipping rectangle is set. Moved initstars() to be after TWINSIDE is changed, fixes regression. Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.74 retrieving revision 1.75 diff -u -d -r1.74 -r1.75 --- mswindow.c 14 Apr 2007 09:49:35 -0000 1.74 +++ mswindow.c 18 Apr 2007 02:05:26 -0000 1.75 @@ -1857,6 +1857,25 @@ win->ClipRect.left = win->ClipRect.top = win->border; win->ClipRect.right = LOWORD (lParam) - win->border; win->ClipRect.bottom = HIWORD (lParam) - win->border; + // Reinitialize SDB as size/borders of window have changed + if ((Window *) w != NULL && win->hwnd == ((Window *) w)->hwnd) + { + SelectObject (localSDB->mem_dc, localSDB->old_bmp); + DeleteObject (localSDB->mem_bmp); + ReleaseDC (((Window *)localSDB->window)->hwnd, localSDB->win_dc); + DeleteDC (localSDB->mem_dc); + free (localSDB); + localSDB = W_InitSDB (w); + } + else if ((Window *) mapw != NULL && win->hwnd == ((Window *) mapw)->hwnd) + { + SelectObject (mapSDB->mem_dc, mapSDB->old_bmp); + DeleteObject (mapSDB->mem_bmp); + ReleaseDC (((Window *)mapSDB->window)->hwnd, mapSDB->win_dc); + DeleteDC (mapSDB->mem_dc); + free (mapSDB); + mapSDB = W_InitSDB (mapw); + } break; case WM_ENTERSIZEMOVE: @@ -1933,27 +1952,16 @@ GET_STRUCT_PTR; - // Reinitialize whatever is necessary (so many things are created based on - // a fixed TWINSIDE) // Adjust window to be square - // Adjust TWINSIDE and GWINSIDE - // Redo critical windows - // Clear window + // Adjust TWINSIDE or GWINSIDE + // Reinitialize whatever is necessary + // Redo other critical windows + // Move and refresh window if (windowMove && (Window *) w != NULL && win->hwnd == ((Window *) w)->hwnd) { GetWindowRect (((Window *) w)->hwnd, &winRect); GetWindowRect (((Window *) baseWin)->hwnd, &baseRect); - // Have to reinitialize SDB - SelectObject (localSDB->mem_dc, localSDB->old_bmp); - DeleteObject (localSDB->mem_bmp); - ReleaseDC (((Window *)localSDB->window)->hwnd, localSDB->win_dc); - DeleteDC (localSDB->mem_dc); - free (localSDB); - localSDB = W_InitSDB (w); - // and stars - initStars(); - // Keep window square width = winRect.right - winRect.left; height = winRect.bottom - winRect.top; @@ -1963,6 +1971,9 @@ height = width; TWINSIDE = width - 2 * win->border; + // Have to reinitialize stars + initStars(); + /* Beeplite TTS may need to be adjusted */ tts_ypos = intDefault("tts_ypos", TWINSIDE / 2 - 16); @@ -1990,10 +2001,7 @@ winRect.left -= GetSystemMetrics (SM_CXSIZEFRAME) - 1; winRect.top -= GetSystemMetrics (SM_CYSIZEFRAME) - 1; } - - MoveWindow (((Window *) w)->hwnd, winRect.left, winRect.top, - width, height, TRUE); - + // All windows based on TWINSIDE are out of position now, but the team // select/quit windows are now the wrong size too, so we need to redo them for (i = 0; i < 4; i++) @@ -2004,13 +2012,15 @@ if (!ingame) W_MapWindow (teamWin[i]); } - W_UnmapWindow (qwin); qwin = W_MakeWindow ("quit", 4 * (TWINSIDE / 5), TWINSIDE - (TWINSIDE / 5), (TWINSIDE / 5), (TWINSIDE / 5), w, 1, foreColor); if (!ingame) W_MapWindow (qwin); + MoveWindow (((Window *) w)->hwnd, winRect.left, winRect.top, + width, height, TRUE); + W_FastClear = 1; if (viewBox) redrawall = 1; @@ -2020,14 +2030,6 @@ GetWindowRect (((Window *) mapw)->hwnd, &winRect); GetWindowRect (((Window *) baseWin)->hwnd, &baseRect); - // Have to reinitialize SDB - SelectObject (mapSDB->mem_dc, mapSDB->old_bmp); - DeleteObject (mapSDB->mem_bmp); - ReleaseDC (((Window *)mapSDB->window)->hwnd, mapSDB->win_dc); - DeleteDC (mapSDB->mem_dc); - free (mapSDB); - mapSDB = W_InitSDB (mapw); - // Keep window square width = winRect.right - winRect.left; height = winRect.bottom - winRect.top; From modemhero at users.sourceforge.net Wed Apr 18 04:41:34 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 18 Apr 2007 09:41:34 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.185, 1.186 netrekrc, 1.65, 1.66 netrekrc_options.txt, 1.52, 1.53 Message-ID: <20070418094143.98818B430@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv26203/resources/docs Modified Files: changes.txt netrekrc netrekrc_options.txt Log Message: New option richTextMove to allow window movement of the richtext message windows specificaly. Off by default. Makes it easier to highlight and select text in the message windows. Removed scroll to caret upon adding a new message to a richtext window, this was unnecessarily scrolling the window to the bottom in certain situations. Index: netrekrc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- netrekrc 14 Apr 2007 09:49:34 -0000 1.65 +++ netrekrc 18 Apr 2007 09:41:32 -0000 1.66 @@ -319,6 +319,9 @@ # Use rich text message windows richText: on +# Enable rich text windows moving +richTextMove: off + # Rotate planets (only works with new planet bitmaps) rotatePlanets: on Index: netrekrc_options.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc_options.txt,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- netrekrc_options.txt 14 Apr 2007 09:49:34 -0000 1.52 +++ netrekrc_options.txt 18 Apr 2007 09:41:32 -0000 1.53 @@ -227,7 +227,8 @@ redrawDelay: (0-10) how many updates to wait before redraw rejectMacro: (on/off) reject macros reportKills: (on/off) report kills -richText: (on/off) use rich text message windows, currently disabled +richText: (on/off) use rich text message windows +richTextMove: (on/off) enable rich text windows moving romshipbmpfile: (path) - old color bitmaps romship1bmpfile: (path) - new color bitmaps romshipGbmpfile: (path) - your own ship's grayscale bitmaps Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.185 retrieving revision 1.186 diff -u -d -r1.185 -r1.186 --- changes.txt 18 Apr 2007 02:05:25 -0000 1.185 +++ changes.txt 18 Apr 2007 09:41:32 -0000 1.186 @@ -1,4 +1,7 @@ Netrek XP 2006, Version 1.3: +- new netrekrc option "richTextMove: on/(off)" to allow rich text message windows to be + moved. Since left mouse is used to move window, and left mouse is also used to highlight + text, this option defaults to off, to make it easier to highlight text. - new netrekrc option "mainMaximized: (on)/off" to make main window maximized on client start - the left and right arrow keys are now mapped to turn left and turn right, they execute From modemhero at users.sourceforge.net Wed Apr 18 04:41:34 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 18 Apr 2007 09:41:34 +0000 Subject: [netrek-cvs] client/netrekxp/resources/htmlhelp/html generalconfig.html, 1.53, 1.54 Message-ID: <20070418094143.80B7E1867D9@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html In directory sc8-pr-cvs16:/tmp/cvs-serv26203/resources/htmlhelp/html Modified Files: generalconfig.html Log Message: New option richTextMove to allow window movement of the richtext message windows specificaly. Off by default. Makes it easier to highlight and select text in the message windows. Removed scroll to caret upon adding a new message to a richtext window, this was unnecessarily scrolling the window to the bottom in certain situations. Index: generalconfig.html =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html/generalconfig.html,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- generalconfig.html 14 Apr 2007 09:49:34 -0000 1.53 +++ generalconfig.html 18 Apr 2007 09:41:32 -0000 1.54 @@ -964,7 +964,17 @@ richText -Use rich text message windows, currently disabled +Use rich text message windows + +
      +
    • on (default)
    • +
    • off
    • +
    + + + +richTextMove +Enable rich text windows moving
    • on
    • From modemhero at users.sourceforge.net Wed Apr 18 04:41:34 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 18 Apr 2007 09:41:34 +0000 Subject: [netrek-cvs] client/netrekxp/include data.h,1.78,1.79 Message-ID: <20070418094143.841A0B42E@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs16:/tmp/cvs-serv26203/include Modified Files: data.h Log Message: New option richTextMove to allow window movement of the richtext message windows specificaly. Off by default. Makes it easier to highlight and select text in the message windows. Removed scroll to caret upon adding a new message to a richtext window, this was unnecessarily scrolling the window to the bottom in certain situations. Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.78 retrieving revision 1.79 diff -u -d -r1.78 -r1.79 --- data.h 14 Apr 2007 09:49:33 -0000 1.78 +++ data.h 18 Apr 2007 09:41:32 -0000 1.79 @@ -724,6 +724,7 @@ extern WNDPROC lpfnDefRichEditWndProc; /* default window procedure for our richedit controls */ extern int richText; /* rich text message windows */ +extern int richTextMove; /* allow rich text windows to be moved */ extern int newQuit; /* new quit clock */ extern int newTeams; /* new team windows */ extern int soundVolume; /* Starting sound volume (0-128 range) */ From modemhero at users.sourceforge.net Wed Apr 18 04:41:34 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 18 Apr 2007 09:41:34 +0000 Subject: [netrek-cvs] client/netrekxp/src data.c, 1.84, 1.85 defaults.c, 1.80, 1.81 mswindow.c, 1.75, 1.76 Message-ID: <20070418094143.D074EB431@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv26203/src Modified Files: data.c defaults.c mswindow.c Log Message: New option richTextMove to allow window movement of the richtext message windows specificaly. Off by default. Makes it easier to highlight and select text in the message windows. Removed scroll to caret upon adding a new message to a richtext window, this was unnecessarily scrolling the window to the bottom in certain situations. Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.75 retrieving revision 1.76 diff -u -d -r1.75 -r1.76 --- mswindow.c 18 Apr 2007 02:05:26 -0000 1.75 +++ mswindow.c 18 Apr 2007 09:41:32 -0000 1.76 @@ -6167,12 +6167,12 @@ { // Scroll if mouse isn't in window, or if mouse is in // window but scrollback is already at bottom - if (!findMouseInWin (& x, &y, (W_Window) win) || diff == 1) + if (!findMouseInWin (&x, &y, (W_Window) win) || diff == 1) point.y += W_Textheight * diff; SendMessage (win->hwnd, EM_SETSCROLLPOS, 0, (LPARAM) &point); } //SendMessage (win->hwnd, EM_HIDESELECTION, FALSE, 0); - SendMessage (win->hwnd, EM_SCROLLCARET, 0, 0); + //SendMessage (win->hwnd, EM_SCROLLCARET, 0, 0); if (cr.cpMin != cr.cpMax) SendMessage (win->hwnd, EM_SETSEL, 0, (LPARAM) &cr); @@ -6194,7 +6194,8 @@ case WM_LBUTTONDOWN: BringWindowToTop (hwnd); // fake a caption hit to move window - SendMessage(hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0); + if (richTextMove) + SendMessage(hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0); break; case WM_NCRBUTTONDOWN: if (GetWindowLongPtr(hwnd, GWL_STYLE) & WS_SIZEBOX) Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.80 retrieving revision 1.81 diff -u -d -r1.80 -r1.81 --- defaults.c 14 Apr 2007 09:49:34 -0000 1.80 +++ defaults.c 18 Apr 2007 09:41:32 -0000 1.81 @@ -573,6 +573,12 @@ NULL } }, + {"richTextMove", &richTextMove, RC_BOOL, + { + "Enable rich text windows moving", + NULL + } + }, {"rotatePlanets", &rotatePlanets, RC_BOOL, { "Rotate planets (only works with new planet bitmaps)", @@ -1712,6 +1718,7 @@ mainTitleBar = booleanDefault ("mainTitleBar", mainTitleBar); allowWheelActions = booleanDefault ("allowWheelActions", allowWheelActions); richText = booleanDefault ("richText", richText); + richTextMove = booleanDefault ("richTextMove", richTextMove); newQuit = booleanDefault ("newQuit", newQuit); newTeams = booleanDefault ("newTeams", newTeams); soundVolume= intDefault ("soundVolume", soundVolume); Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.84 retrieving revision 1.85 diff -u -d -r1.84 -r1.85 --- data.c 14 Apr 2007 09:49:34 -0000 1.84 +++ data.c 18 Apr 2007 09:41:32 -0000 1.85 @@ -814,6 +814,7 @@ WNDPROC lpfnDefRichEditWndProc; /* default window proc */ int richText = 0; /* rich text message windows */ +int richTextMove = 0; /* allow rich text windows to be moved */ int newQuit = 0; /* new quit clock */ int newTeams = 0; /* new team windows */ int soundVolume = 64; /* Starting sound volume (0-128 range) */ From modemhero at users.sourceforge.net Thu Apr 19 03:18:17 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 19 Apr 2007 08:18:17 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.186, 1.187 Message-ID: <20070419081827.5286F1867D4@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv26512/resources/docs Modified Files: changes.txt Log Message: Bug fix to cambot playback with richtext windows Bug fix to saving resized window geometries for text and scrolling windows Comment on how the prevent window resize routine fails for windows not created with flag WS_CHILD. Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.186 retrieving revision 1.187 diff -u -d -r1.186 -r1.187 --- changes.txt 18 Apr 2007 09:41:32 -0000 1.186 +++ changes.txt 19 Apr 2007 08:18:15 -0000 1.187 @@ -1,4 +1,6 @@ Netrek XP 2006, Version 1.3: +- bug fix to cambot playback with richtext windows +- bug fix to saving resized window geometries for text and scrolling windows - new netrekrc option "richTextMove: on/(off)" to allow rich text message windows to be moved. Since left mouse is used to move window, and left mouse is also used to highlight text, this option defaults to off, to make it easier to highlight text. From modemhero at users.sourceforge.net Thu Apr 19 03:18:17 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 19 Apr 2007 08:18:17 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C, 1.141, 1.142 clientr.suo, 1.121, 1.122 Message-ID: <20070419081827.5BD7FB42E@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs16:/tmp/cvs-serv26512 Modified Files: NetrekXP to do list.C clientr.suo Log Message: Bug fix to cambot playback with richtext windows Bug fix to saving resized window geometries for text and scrolling windows Comment on how the prevent window resize routine fails for windows not created with flag WS_CHILD. Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.141 retrieving revision 1.142 diff -u -d -r1.141 -r1.142 --- NetrekXP to do list.C 17 Apr 2007 07:48:49 -0000 1.141 +++ NetrekXP to do list.C 19 Apr 2007 08:18:14 -0000 1.142 @@ -34,8 +34,7 @@ host names. 7) With expanded tactical ..can now see ships at galactic coordinates (-500,-500), if you fly into the NW corner of the galaxy. this was never anticipated! -8) changing between sizing border messes up border alert draw, until you actually -move window. +8) change start music to not play on queue, only entry window Wish list: 1) Rewrite graphics engine using SDL Index: clientr.suo =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.suo,v retrieving revision 1.121 retrieving revision 1.122 diff -u -d -r1.121 -r1.122 Binary files /tmp/cvsp4csyM and /tmp/cvsbpLyAl differ From modemhero at users.sourceforge.net Thu Apr 19 03:18:18 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 19 Apr 2007 08:18:18 +0000 Subject: [netrek-cvs] client/netrekxp/src mswindow.c, 1.76, 1.77 redraw.c, 1.13, 1.14 Message-ID: <20070419081827.743F1B430@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv26512/src Modified Files: mswindow.c redraw.c Log Message: Bug fix to cambot playback with richtext windows Bug fix to saving resized window geometries for text and scrolling windows Comment on how the prevent window resize routine fails for windows not created with flag WS_CHILD. Index: redraw.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/redraw.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- redraw.c 13 Apr 2007 09:10:16 -0000 1.13 +++ redraw.c 19 Apr 2007 08:18:16 -0000 1.14 @@ -69,7 +69,11 @@ updateMaxStats (0); /* Update the max stats * */ - if (!richText) + if (!richText +#ifdef RECORDGAME + || (richText && playback) +#endif + ) { W_FlushScrollingWindow (messwa); W_FlushScrollingWindow (messwt); Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.76 retrieving revision 1.77 diff -u -d -r1.76 -r1.77 --- mswindow.c 18 Apr 2007 09:41:32 -0000 1.76 +++ mswindow.c 19 Apr 2007 08:18:15 -0000 1.77 @@ -1308,8 +1308,8 @@ /* Set original coordinates, so we will be able to restore to them */ newwin->orig_x = x; newwin->orig_y = y; - newwin->orig_width = width; - newwin->orig_height = height; + newwin->orig_width = width * W_Textwidth + WIN_EDGE * 2; + newwin->orig_height = MENU_PAD * 2 + height * W_Textheight; //Map (show) the window if the user spec'd it if (checkMapped (name)) @@ -1352,8 +1352,9 @@ /* Set original coordinates, so we will be able to restore to them */ newwin->orig_x = x; newwin->orig_y = y; - newwin->orig_width = width; - newwin->orig_height = height; + newwin->orig_width = width * W_Textwidth + WIN_EDGE * 2 + + GetSystemMetrics (SM_CXVSCROLL); + newwin->orig_height = height * W_Textheight + MENU_PAD * 2; //Give it a scroll bar, and set the range (to zero, initially) SetWindowLongPtr (newwin->hwnd, GWL_STYLE, @@ -1414,8 +1415,9 @@ /* Set original coordinates, so we will be able to restore to them */ newwin->orig_x = x; newwin->orig_y = y; - newwin->orig_width = width; - newwin->orig_height = height; + newwin->orig_width = width * W_Textwidth + WIN_EDGE * 2; + newwin->orig_height = height * (W_Textheight + MENU_PAD * 2) + + (height - 1) * MENU_BAR; //Map (show) the window if the user spec'd it if (checkMapped (name)) @@ -1897,6 +1899,13 @@ (((Window *) motdWin != NULL && win->hwnd == ((Window *) motdWin)->hwnd))) break; + /* Note that this routine fails miserably for windows which are not set as + WS_CHILD as a result of not having a parent window defiined. Certain windows + like sound, UDP options, short packets default (in the code) to no parent window, + though I should mention that the current netrekrc assigns a parent window to all + windows. If WS_CHILD is NOT set, these windows can exist outside the boundaries + of the main client window (baseWin). Which then in turn makes all these bounding + calculations wrong. */ GetWindowRect (win->hwnd, &winRect); GetWindowRect (((Window *) baseWin)->hwnd, &baseRect); @@ -2445,8 +2454,12 @@ case WM_MOUSEMOVE: GET_STRUCT_PTR; - if (richText) /* Richtext windows set focus, we need to get it back + if (richText /* Richtext windows set focus, we need to get it back if mouse moves out of the window */ +#ifdef RECORDGAME + && !playback +#endif + ) { if (win->hwnd != GetFocus ()) SetFocus (win->hwnd); @@ -5769,12 +5782,39 @@ and what size/location window is actually created (e.g. local window is 506x506 pixels at (x,y) = (1,1)). So we subtract the actual values minus the original values to - get the conversion factor */ - sprintf (str, "%dx%d+%d+%d", - width - (win->actual_width - win->orig_width), - height - (win->actual_height - win->orig_height), - x - (win->actual_x - win->orig_x), - y - (win->actual_y - win->orig_y)); + get the conversion factor. A further complication is that + text, richtext, menu and scroll windows have different formulas + for converting netrekrc window geometry entries into actual + pixel widths and heights. All of these adjust window size + based on the size of text characters, not pixels. Width, + win->actual_* and win->orig_* are in units of pixels, so + a back conversion needs to be performed to get the geometry + into a netrekrc entry */ + width = width - (win->actual_width - win->orig_width); + height = height - (win->actual_height - win->orig_height); + x = x - (win->actual_x - win->orig_x); + y = y - (win->actual_y - win->orig_y); + + switch (win->type) + { + case WIN_TEXT: + width = (width - WIN_EDGE * 2) / W_Textwidth; + height = (height - MENU_PAD * 2) / W_Textheight; + break; + case WIN_MENU: + width = (width - WIN_EDGE * 2) / W_Textwidth; + height = (height - MENU_BAR) / (W_Textheight + MENU_PAD * 2 + MENU_BAR); + break; + case WIN_RICHTEXT: + case WIN_SCROLL: + width = (width - WIN_EDGE * 2 - GetSystemMetrics (SM_CXVSCROLL)) / W_Textwidth; + height = (height - MENU_PAD * 2) / W_Textheight; + break; + case WIN_GRAPH: + default: + break; + } + sprintf (str, "%dx%d+%d+%d", width, height, x, y); return strdup (str); } } @@ -6051,8 +6091,9 @@ /* Set original coordinates, so we will be able to restore to them */ newwin->orig_x = x; newwin->orig_y = y; - newwin->orig_width = width; - newwin->orig_height = height; + newwin->orig_width = width * W_Textwidth + WIN_EDGE * 2 + + GetSystemMetrics (SM_CXVSCROLL); + newwin->orig_height = height * W_Textheight + MENU_PAD * 2; //Map (show) the window if the user spec'd it if (checkMapped (name)) From modemhero at users.sourceforge.net Thu Apr 19 03:23:00 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 19 Apr 2007 08:23:00 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.187, 1.188 Message-ID: <20070419082310.2F0FFB42E@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv29147/resources/docs Modified Files: changes.txt Log Message: Moved sound initiliazation (and thus entry music) to after receiving a player slot, not before, so no more music while waiting on queue. Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.187 retrieving revision 1.188 diff -u -d -r1.187 -r1.188 --- changes.txt 19 Apr 2007 08:18:15 -0000 1.187 +++ changes.txt 19 Apr 2007 08:22:58 -0000 1.188 @@ -1,4 +1,6 @@ Netrek XP 2006, Version 1.3: +- start music will no longer play if you connect to a server and wind up on a wait queue, + the music will instead play once you reach the login screen - bug fix to cambot playback with richtext windows - bug fix to saving resized window geometries for text and scrolling windows - new netrekrc option "richTextMove: on/(off)" to allow rich text message windows to be From modemhero at users.sourceforge.net Thu Apr 19 03:23:00 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 19 Apr 2007 08:23:00 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C,1.142,1.143 Message-ID: <20070419082309.0BB601867D4@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs16:/tmp/cvs-serv29147 Modified Files: NetrekXP to do list.C Log Message: Moved sound initiliazation (and thus entry music) to after receiving a player slot, not before, so no more music while waiting on queue. Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.142 retrieving revision 1.143 diff -u -d -r1.142 -r1.143 --- NetrekXP to do list.C 19 Apr 2007 08:18:14 -0000 1.142 +++ NetrekXP to do list.C 19 Apr 2007 08:22:58 -0000 1.143 @@ -34,7 +34,6 @@ host names. 7) With expanded tactical ..can now see ships at galactic coordinates (-500,-500), if you fly into the NW corner of the galaxy. this was never anticipated! -8) change start music to not play on queue, only entry window Wish list: 1) Rewrite graphics engine using SDL From modemhero at users.sourceforge.net Thu Apr 19 03:23:01 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 19 Apr 2007 08:23:01 +0000 Subject: [netrek-cvs] client/netrekxp/src cowmain.c,1.32,1.33 Message-ID: <20070419082309.2E2B61867D7@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv29147/src Modified Files: cowmain.c Log Message: Moved sound initiliazation (and thus entry music) to after receiving a player slot, not before, so no more music while waiting on queue. Index: cowmain.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/cowmain.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- cowmain.c 5 Apr 2007 12:57:22 -0000 1.32 +++ cowmain.c 19 Apr 2007 08:22:58 -0000 1.33 @@ -802,12 +802,6 @@ setObserverMode (xtrekPort); savebitmaps (); - -#if defined(SOUND) - /* Moved sound initialization to right after readdefaults() so - * the intro can start playing ASAP */ - Init_Sound(); -#endif /* open memory...? */ openmem (); @@ -860,6 +854,11 @@ findslot (); lastm = mctl->mc_current; + +#if defined(SOUND) + /* Only play start sound once at login screen */ + Init_Sound(); +#endif mapAll (); From modemhero at users.sourceforge.net Thu Apr 19 03:50:25 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 19 Apr 2007 08:50:25 +0000 Subject: [netrek-cvs] client/netrekxp build.cmd, 1.25, 1.26 clientr.suo, 1.122, 1.123 Message-ID: <20070419085034.408741867D4@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs16:/tmp/cvs-serv10610 Modified Files: build.cmd clientr.suo Log Message: Changed build script to point to the new RSA key, which generates the rsa_box files. Rsa_box files are not part of repository, but future client versions from today onward will be using box files generated with the key named "NetrekXP-2006v3-RSA-Key-Win32.secret". Index: clientr.suo =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.suo,v retrieving revision 1.122 retrieving revision 1.123 diff -u -d -r1.122 -r1.123 Binary files /tmp/cvsUm7Qdq and /tmp/cvsRVJ30O differ Index: build.cmd =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/build.cmd,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- build.cmd 25 Mar 2007 22:09:41 -0000 1.25 +++ build.cmd 19 Apr 2007 08:50:23 -0000 1.26 @@ -1,4 +1,4 @@ -set RSAKey="\netrek_files\rsa\NetrekXP-2006-RSA-Key-Win32.secret" +set RSAKey="\netrek_files\rsa\NetrekXP-2006v3-RSA-Key-Win32.secret" set InstCWD="\netrek_files" set HelpCompiler="C:\Program Files\HTML Help Workshop\hhc.exe" rem set Compiler=VCC From modemhero at users.sourceforge.net Sun Apr 22 02:24:32 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sun, 22 Apr 2007 07:24:32 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.188, 1.189 netrekrc, 1.66, 1.67 Message-ID: <20070422072441.DF7B4B3F9@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv21536/resources/docs Modified Files: changes.txt netrekrc Log Message: Added new entry to main windows proc, WM_SYSCOMMAND, that is merely used to track whether the main netrek window is maximized or not, so that this information can be saved between sessions. The bomb RCD used on an unknown planet or planet with 4 or less armies will now say "bomb " instead of the more useless, unspecific "bomb". Index: netrekrc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc,v retrieving revision 1.66 retrieving revision 1.67 diff -u -d -r1.66 -r1.67 --- netrekrc 18 Apr 2007 09:41:32 -0000 1.66 +++ netrekrc 22 Apr 2007 07:24:30 -0000 1.67 @@ -1058,7 +1058,7 @@ # Receiver configurable distress macros dist.^t.take: %T%c->%O (%S) Carrying %a to %l%?%n>-1%{ @ %n%} dist.^o.ogg: %T%c->%O Help Ogg %p at %l -dist.^b.bomb: %T%c->%O %?%n>4%{bomb %l @ %n%!bomb%} +dist.^b.bomb: %T%c->%O %?%n>4%{bomb %l @ %n%!bomb %l%} dist.^c.space_control: %T%c->%O Help Control at %L dist.^1.save_planet: %T%c->%O Emergency at %L!!!! dist.^2.base_ogg: %T%c->%O Sync with --]> %g <[-- OGG ogg OGG base!! Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.188 retrieving revision 1.189 diff -u -d -r1.188 -r1.189 --- changes.txt 19 Apr 2007 08:22:58 -0000 1.188 +++ changes.txt 22 Apr 2007 07:24:30 -0000 1.189 @@ -1,4 +1,7 @@ Netrek XP 2006, Version 1.3: +- whether main netrek window is maximized or not now saves via in-game save key +- bomb RCD used on an unknown planet or planet with 4 or less armies will now say + "bomb " instead of the more useless, unspecific "bomb" - start music will no longer play if you connect to a server and wind up on a wait queue, the music will instead play once you reach the login screen - bug fix to cambot playback with richtext windows From modemhero at users.sourceforge.net Sun Apr 22 02:24:32 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sun, 22 Apr 2007 07:24:32 +0000 Subject: [netrek-cvs] client/netrekxp clientr.suo,1.123,1.124 Message-ID: <20070422072442.16F16B400@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs16:/tmp/cvs-serv21536 Modified Files: clientr.suo Log Message: Added new entry to main windows proc, WM_SYSCOMMAND, that is merely used to track whether the main netrek window is maximized or not, so that this information can be saved between sessions. The bomb RCD used on an unknown planet or planet with 4 or less armies will now say "bomb " instead of the more useless, unspecific "bomb". Index: clientr.suo =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.suo,v retrieving revision 1.123 retrieving revision 1.124 diff -u -d -r1.123 -r1.124 Binary files /tmp/cvsVsWfHo and /tmp/cvskvITAD differ From modemhero at users.sourceforge.net Sun Apr 22 02:24:33 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sun, 22 Apr 2007 07:24:33 +0000 Subject: [netrek-cvs] client/netrekxp/src mswindow.c,1.77,1.78 Message-ID: <20070422072442.1BA12B403@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv21536/src Modified Files: mswindow.c Log Message: Added new entry to main windows proc, WM_SYSCOMMAND, that is merely used to track whether the main netrek window is maximized or not, so that this information can be saved between sessions. The bomb RCD used on an unknown planet or planet with 4 or less armies will now say "bomb " instead of the more useless, unspecific "bomb". Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.77 retrieving revision 1.78 diff -u -d -r1.77 -r1.78 --- mswindow.c 19 Apr 2007 08:18:15 -0000 1.77 +++ mswindow.c 22 Apr 2007 07:24:30 -0000 1.78 @@ -1880,6 +1880,19 @@ } break; + case WM_SYSCOMMAND: + // Just tracking main window maximum/restore status here + GET_STRUCT_PTR; + + if (win->hwnd == ((Window *) baseWin)->hwnd) + { + if (wParam == SC_MAXIMIZE) + mainMaximized = 1; + else if (wParam = SC_RESTORE) + mainMaximized = 0; + } + break; + case WM_ENTERSIZEMOVE: //Disable possibility to move internal windows { // have to add bracket to be able to declare variables From modemhero at users.sourceforge.net Mon Apr 23 02:19:32 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 23 Apr 2007 07:19:32 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.189, 1.190 netrekrc, 1.67, 1.68 Message-ID: <20070423071940.D1D8B1867CE@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv17999/resources/docs Modified Files: changes.txt netrekrc Log Message: Bug fix using = when should have used ==. Added support for server feature packets TURN_KEYS and SHOW_VISIBILITY_RANGE, client will only be allowed to show visibility range on galactic if server allows it. Same with using keypad to turn ship. Changed CHECK_PLANETS to send a request for a planet cross-check at a rate of 10 planets/second, rather than updating all planets at once. Also, dashboard packet lights will no longer show packet requests from CP_PLANET. Index: netrekrc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc,v retrieving revision 1.67 retrieving revision 1.68 diff -u -d -r1.67 -r1.68 --- netrekrc 22 Apr 2007 07:24:30 -0000 1.67 +++ netrekrc 23 Apr 2007 07:19:29 -0000 1.68 @@ -529,6 +529,7 @@ viewBox: on # Show range at which enemies can see you as a circle on map +# Server god decides whether to enable this feature # 0 - don't show range circle # 1 - only show range circle when cloaked # 2 - only show range circle when carrying Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.189 retrieving revision 1.190 diff -u -d -r1.189 -r1.190 --- changes.txt 22 Apr 2007 07:24:30 -0000 1.189 +++ changes.txt 23 Apr 2007 07:19:29 -0000 1.190 @@ -1,4 +1,10 @@ Netrek XP 2006, Version 1.3: +- added support for server feature packets TURN_KEYS and SHOW_VISIBILITY_RANGE, client + will only be allowed to show visibility range on galactic if server allows it. Same + with using keypad to turn ship. +- changed CHECK_PLANETS to send a request for a planet cross-check at a rate of 10 + planets/second, rather than updating all planets at once. Also, dashboard packet + lights will no longer show packet requests from CP_PLANET. - whether main netrek window is maximized or not now saves via in-game save key - bomb RCD used on an unknown planet or planet with 4 or less armies will now say "bomb " instead of the more useless, unspecific "bomb" From modemhero at users.sourceforge.net Mon Apr 23 02:19:31 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 23 Apr 2007 07:19:31 +0000 Subject: [netrek-cvs] client/netrekxp clientr.suo,1.124,1.125 Message-ID: <20070423071940.DD150B3ED@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs16:/tmp/cvs-serv17999 Modified Files: clientr.suo Log Message: Bug fix using = when should have used ==. Added support for server feature packets TURN_KEYS and SHOW_VISIBILITY_RANGE, client will only be allowed to show visibility range on galactic if server allows it. Same with using keypad to turn ship. Changed CHECK_PLANETS to send a request for a planet cross-check at a rate of 10 planets/second, rather than updating all planets at once. Also, dashboard packet lights will no longer show packet requests from CP_PLANET. Index: clientr.suo =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.suo,v retrieving revision 1.124 retrieving revision 1.125 diff -u -d -r1.124 -r1.125 Binary files /tmp/cvslJfESK and /tmp/cvs7jG7Jg differ From modemhero at users.sourceforge.net Mon Apr 23 02:19:31 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 23 Apr 2007 07:19:31 +0000 Subject: [netrek-cvs] client/netrekxp/include data.h,1.79,1.80 Message-ID: <20070423071940.DBF74B3EB@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs16:/tmp/cvs-serv17999/include Modified Files: data.h Log Message: Bug fix using = when should have used ==. Added support for server feature packets TURN_KEYS and SHOW_VISIBILITY_RANGE, client will only be allowed to show visibility range on galactic if server allows it. Same with using keypad to turn ship. Changed CHECK_PLANETS to send a request for a planet cross-check at a rate of 10 planets/second, rather than updating all planets at once. Also, dashboard packet lights will no longer show packet requests from CP_PLANET. Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.79 retrieving revision 1.80 diff -u -d -r1.79 -r1.80 --- data.h 18 Apr 2007 09:41:32 -0000 1.79 +++ data.h 23 Apr 2007 07:19:29 -0000 1.80 @@ -586,6 +586,8 @@ extern int F_show_army_count; extern int F_show_other_speed; extern int F_show_cloakers; +extern int F_turn_keys; +extern int F_show_visibility_range; #ifdef RECORDGAME extern int F_many_self; From modemhero at users.sourceforge.net Mon Apr 23 02:19:32 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 23 Apr 2007 07:19:32 +0000 Subject: [netrek-cvs] client/netrekxp/src data.c, 1.85, 1.86 feature.c, 1.14, 1.15 input.c, 1.36, 1.37 map.c, 1.52, 1.53 mswindow.c, 1.78, 1.79 socket.c, 1.28, 1.29 Message-ID: <20070423071942.9E731B3EB@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv17999/src Modified Files: data.c feature.c input.c map.c mswindow.c socket.c Log Message: Bug fix using = when should have used ==. Added support for server feature packets TURN_KEYS and SHOW_VISIBILITY_RANGE, client will only be allowed to show visibility range on galactic if server allows it. Same with using keypad to turn ship. Changed CHECK_PLANETS to send a request for a planet cross-check at a rate of 10 planets/second, rather than updating all planets at once. Also, dashboard packet lights will no longer show packet requests from CP_PLANET. Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.78 retrieving revision 1.79 diff -u -d -r1.78 -r1.79 --- mswindow.c 22 Apr 2007 07:24:30 -0000 1.78 +++ mswindow.c 23 Apr 2007 07:19:30 -0000 1.79 @@ -1888,7 +1888,7 @@ { if (wParam == SC_MAXIMIZE) mainMaximized = 1; - else if (wParam = SC_RESTORE) + else if (wParam == SC_RESTORE) mainMaximized = 0; } break; Index: input.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/input.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- input.c 14 Apr 2007 07:44:35 -0000 1.36 +++ input.c 23 Apr 2007 07:19:30 -0000 1.37 @@ -3545,6 +3545,9 @@ { unsigned char course; + /* Server must allow turn keys */ + if (!F_turn_keys) return; + /* Observers can't turn */ if (me->p_flags & PFOBSERV) return; @@ -3561,6 +3564,9 @@ { unsigned char course; + /* Server must allow turn keys */ + if (!F_turn_keys) return; + /* Observers can't turn */ if (me->p_flags & PFOBSERV) return; Index: socket.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- socket.c 9 Apr 2007 07:46:13 -0000 1.28 +++ socket.c 23 Apr 2007 07:19:30 -0000 1.29 @@ -1550,8 +1550,13 @@ #endif if (packetLights) - light_send(); - + { + // Planet cross-checks get sent very rapidly, thus negating the + // usefulness of packet lights. + if (packet->type != CP_PLANET) + light_send(); + } + if (commMode == COMM_UDP) { /* for now, just sent everything via TCP */ Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.85 retrieving revision 1.86 diff -u -d -r1.85 -r1.86 --- data.c 18 Apr 2007 09:41:32 -0000 1.85 +++ data.c 23 Apr 2007 07:19:30 -0000 1.86 @@ -686,6 +686,8 @@ int F_show_army_count = 0; int F_show_other_speed = 0; int F_show_cloakers = 0; +int F_turn_keys = 0; +int F_show_visibility_range = 0; #ifdef RECORDGAME int F_many_self = 0; Index: feature.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/feature.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- feature.c 5 Apr 2007 12:57:22 -0000 1.14 +++ feature.c 23 Apr 2007 07:19:30 -0000 1.15 @@ -97,6 +97,8 @@ {"SHOW_ARMY_COUNT", &F_show_army_count, 'S', 1, 0, 0}, {"SHOW_OTHER_SPEED", &F_show_other_speed, 'S', 1, 0, 0}, {"SHOW_CLOAKERS", &F_show_cloakers, 'S', 1, 0, 0}, + {"TURN_KEYS", &F_turn_keys, 'S', 1, 0, 0}, + {"SHOW_VISIBILITY_RANGE", &F_show_visibility_range, 'S', 1, 0, 0}, {0, 0, 0, 0, 0, 0} }; @@ -278,6 +280,8 @@ F_show_army_count = 1; F_show_other_speed = 1; F_show_cloakers = 1; + F_turn_keys = 1; + F_show_visibility_range = 1; #endif #endif /* BEEPLITE */ } Index: map.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- map.c 14 Apr 2007 02:56:19 -0000 1.52 +++ map.c 23 Apr 2007 07:19:30 -0000 1.53 @@ -504,8 +504,10 @@ for (l = planets + MAXPLANETS - 1; l >= planets; --l) { - /* Synchronize planet info (up to 10 times/second) for current orbitted planet - and once every 5 seconds for all other planets we have info on */ + /* Synchronize planet info (up to 10 times/second) for current orbitted + planet. For all other planets, send info on planet 0 through planet + MAXPLANETS every MAXPLANETS/10 seconds, one planet at a time, + 10 times/second. Only send info is planet is "touched" */ if (F_check_planets) { if ((me->p_flags & PFORBIT) @@ -518,11 +520,9 @@ orbit_planet_refresh = 0; } } - else if (l->pl_info & me->p_team) - { - if ((planet_refresh * 10 / server_ups) >= 50) - sendPlanetsPacket(l->pl_no); - } + else if ((planet_refresh == l->pl_no * server_ups / 10) + && (l->pl_info & me->p_team)) + sendPlanetsPacket(l->pl_no); } if (!(l->pl_flags & PLREDRAW)) @@ -984,7 +984,7 @@ /* Increment counter for requesting planet sync (F_check_planets) */ if (F_check_planets) { - if ((planet_refresh * 10 / server_ups) >= 50) + if ((planet_refresh * 10 / server_ups) >= MAXPLANETS) planet_refresh = 0; else planet_refresh++; @@ -1112,7 +1112,8 @@ #endif /* Draw range circle */ - if (viewRange && (myPlayer(j) || isObsLockPlayer(j)) + if (viewRange && F_show_visibility_range + && (myPlayer(j) || isObsLockPlayer(j)) && j->p_ship.s_type != STARBASE) { /* Orbitting any non-owned planet gets you seen, From modemhero at users.sourceforge.net Mon Apr 23 03:23:23 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 23 Apr 2007 08:23:23 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.190, 1.191 Message-ID: <20070423082332.21F2B1867CC@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv32739/resources/docs Modified Files: changes.txt Log Message: Redid changes list in numbered, 80 char width format for easier readability and navigation by topic. Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.190 retrieving revision 1.191 diff -u -d -r1.190 -r1.191 --- changes.txt 23 Apr 2007 07:19:29 -0000 1.190 +++ changes.txt 23 Apr 2007 08:23:20 -0000 1.191 @@ -1,237 +1,247 @@ Netrek XP 2006, Version 1.3: -- added support for server feature packets TURN_KEYS and SHOW_VISIBILITY_RANGE, client - will only be allowed to show visibility range on galactic if server allows it. Same - with using keypad to turn ship. -- changed CHECK_PLANETS to send a request for a planet cross-check at a rate of 10 - planets/second, rather than updating all planets at once. Also, dashboard packet - lights will no longer show packet requests from CP_PLANET. -- whether main netrek window is maximized or not now saves via in-game save key -- bomb RCD used on an unknown planet or planet with 4 or less armies will now say - "bomb " instead of the more useless, unspecific "bomb" -- start music will no longer play if you connect to a server and wind up on a wait queue, - the music will instead play once you reach the login screen -- bug fix to cambot playback with richtext windows -- bug fix to saving resized window geometries for text and scrolling windows -- new netrekrc option "richTextMove: on/(off)" to allow rich text message windows to be - moved. Since left mouse is used to move window, and left mouse is also used to highlight - text, this option defaults to off, to make it easier to highlight text. -- new netrekrc option "mainMaximized: (on)/off" to make main window maximized on client - start -- the left and right arrow keys are now mapped to turn left and turn right, they execute - a turn request for a 1/16 turn in the desired direction. I personally find it awkward - but if someone is playing without a mouse for whatever reason, it allows them to move - at least. Since using the arrow pad requires a keyboard equivalent key, and these - are new keyactions, there are now 2 less available key sequences. Control+[ is now - mapped to turn left, and control+] is turn right, these keys were selected to be as - out of the way as possible to avoid conflicts with existing keymaps. -- the up and down arrow keys now are mapped to accelerate and deccelerate -- changed how message scrolling works in richtext windows. If the mouse is over a - message window AND message position isn't already at the bottom of the window, - it will not scroll upon receiving a new message, as it is likely you are scrolling - back to read old messages. If mouse is not in a window that receives a message, - that window will scroll to the bottom, solving the problem of sometimes accidentally - not resetting window scrollback to bottom and the failing to see new messages as - they come in. -- changed how sizing border works on windows (local, map, message windows), they now - all follow the same procedure. Right click on window border to activate sizing border, - and right click again to deactivate sizing border. Remember, mainResizeable needs to - be on for this to work with the local and map windows. -- new netrekrc option "fullBitmapRotation: (on)/off" that lets you choose to draw the - old ship bitmaps to 32 positions (off) instead of 256 (on). Useful for those with - custom bitmap sets, as it will use all 32 bitmaps in a set rather than just rotating - the first one in the set. -- cloak range circle now shows on tactical if tactical is sized large enough -- text, COW, KRP and LABs dashboards now adjust for font size -- added the huge list of color names and color RGB codes to netrekxp manual, this was - always confusing to me as to what color names were actually allowed. They were buried - in the code, now they are visible in the manual. -- adjusted documentation window and netrekrc window to scale properly with font size -- entry window now scales properly with font size, and team/quit windows no longer - disappear on resizing or moving the entry window -- main title bar now defaults to on -- stats window and ping stats window now scale properly with font size -- fixed galactic planet names and army counts so they are centered on planets -- added fontSize option to netrekrc (this option always existed, but was undocumented). - This option controls the pixel height of the font used in game -- cambot files names are now autogenerated, similiar to logfile names, if no name - is given (names will be like 20070401.pkt) -- password, playerlist2 layout, b1keymap - b5keymap, and metaservers now save via - in-game save key -- color settings now save and are now all listed in netrekrc -- added netrekrc option "color.God: " to alter color of God messages -- resizing the local and map windows now only lets you size them as squares -- richtext message windows are now resizeable, it works a little different than sizing - other windows. First you right click on the window once to activate the sizing border, - then grab border with mouse and size normally. The window will now have a larger border, - which you will probably want to get rid of. To get rid of it, right click the window - again. The reason the procedure is a little complicated is because having a border - which can both resize the window requires a larger border, which cuts into precious - screen space for messages. So this sizing border needs to be activated first, then - deactivated when the window is done sizing. -- richtext message windows are now moveable, it works a little different than moving other - windows. Instead of clicking on border, you click on body of window, hold down left - mouse button, and move the window. -- phaser misses on sturgeon servers now show proper phaser length -- can now change login name via options menu, saved via in-game save key -- preference for showing main title bar (toggled via alt+enter) is now saved via - in-game save key -- Window placements and sizes to save with the in-game save key. In the special case - of local and map windows, they will always be square. - In the case of the main window, it won't save placement, for now (complicated to do). - All other windows will obey size and placements you give them. Hopefully this takes - some of the pain out of setting up windows (you should be able to do it without - having to edit netrekrc). -- new netrekrc option "saveFile: name" to control what filename you write to when you - save your options in game (either with " key or via the save menu). Default is now - netrekrc, so that means if you save in-game, it will overwrite your netrekrc with - your current settings (I have a feeling the benefits of this strongly outweigh the - negatives such as mistakenly remapping things then mistakenly saving your netrekrc) -- the netrekrc save feature now saves all ckeymaps, ship specific keymaps/ckeymap - /buttonmaps/netrekrc, and observer/servertype specific options. Saving servernick - options is not supported, but I doubt anyone uses those to begin with. -- the ' key (single quote) is now the default key for toggling on and off the expanded - playerlist window -- now get a popup box when client receives a game shutdown message from server, indicating - that the game has been terminated and to try again later -- the mainResizeable netrekrc option now allows map/local to be resizeable via dragging - the window border, local/map will now adjust viewable area to match the new window - size. Some windows (team select, quit) will resize properly to match new local size, - others (position of options menu, dashboard, etc.) will not move. Interesting sidenote: - resizing local window will reinitialize background star positions. -- fixed a bug with RCM kill messages when kills were higher than 255 but less than 320 -- added new function keys, control-z and control-a, for zooming. Control-z zooms in, - and control-a zooms out. As part of the benefit of having all graphics scale, ALL ship - bitmap sets now show ships to 256 positions. -- added netrekrc option "scaleFactor: (10-40)" that allows you to zoom in the local map - to get more detail! Turn on those high resolution bitmaps, pump up your tactical size - to 1000x1000 and see the great graphics! Default scale is 40 (this is the traditional - scale used in clients, changing scale to 20 will effectively double the scale). -- added netrekrc option "richText: (on)/off" to allow stuff like cut/paste from message - windows and clickable URLs. -- added the ability to change the size of the local or map windows! This is a huge improvement, - and is probably the most often requested feature. There really is no limit on how big or small - you can make the windows. As you increase local window size, you can see further, giving - somewhat of a gameplay advantage - you can see ships, shields, explosions, but not weapons - fire other than your own torps. Just as important, you can now choose a different size - for local vs map window. A typical user may want a 750x750 local but only a 400x400 map. - The upper pixel limit is 5000x5000 for either map or local window, but I don't expect - anyone has a monitor to support even close to that limit. -- most netrekrc window's geometries are now commented out (all except map and local), this - is because adjusting the size of local or map will now do a pretty good job of autoplacing - all the other windows for you -- new netrekrc option "infoRange: (on)/off" to draw a dashed white box on your tactical - if you increase the tactical size beyond 500 x 500. This box is drawn to show the 500 - x 500 range, which is important because other people's weapons data is not sent beyond - this range (box essentially shows limit of fog of war for weapons). -- added support for CHECK_PLANETS feature packet, this is a nice packet that checks - with the server to make sure your planet info is up to date, so no more phantom - armies on a planet or delay on bombing a planet flat because you lost a planet - packet. Also no more wondering if you missed a planet packet while dropping. - if planet army count doesn't go down. This cross-check with server occurs 10 times/ - second for a planet you are orbitting (critical) and every 5 seconds for all the - planets your team has info on (non-critical). -- if weaponsOnMap option is on, internal timer to determine when it's safe to expire - weapons is moved to map draw routine. Fixes problem where observers who are not - locked onto anyone but still getting weapons drawn on map would have problems - with weapons (like phasers) not expiring correctly due to packet loss -- enemy torps which are off local screen are no longer automatically freed (since - this data is now sent for observers). Also fixed an issue with exploding torps - that would not clear properly. -- new netrekrc option "showCloakers: (on)/off" to show other cloakers on tactical, - only works if server has the new feature packet SHOW_CLOAKERS on. -- new netrekrc option "showOtherSpeed: (on)/off" to show speed next to other players, - only works if server has the new feature packet SHOW_OTHER_SPEED on. -- changed showArmy option to be a range (0-3), to take advantage of new server feature - packet SHOW_ARMY_COUNT. Range of values is now as follows: + +User interface: +1) War window now says "Re-program" instead of "Save" for changing war settings. +2) The planet list window can now be used with info, lock and certain RCDs. In +other words, you can lock onto planets through the planet list window, and send +planet-related RCDs through the window as well. +3) New Options menus for Hockey and Weapons. +4) Added ability to update buttonmap through the options menu. +5) Restored ability for middle and right mouse clicks to raise the current +window to the top, helps with overlapped windows. +6) Default buttonmap now uses mouse wheel for accel/decel, scroll up to +accelerate to max, scroll down to decelerate to warp 0. +7) Left clicking on message window will either a) start a new message to all +board or b) continue current pending message. +8) Message window will now say "Click here to send a message to ALL" until any +message is sent, then it will be blank as usual. Mostly to help newbies +figure out how to send a message. +9) Rank window now shows DI needed for next rank. +10) Added the ability to change the size of the local or map windows! This is a +huge improvement, and is probably the most often requested feature. There +really is no limit on how big or small you can make the windows. As you +increase local window size, you can see further, giving somewhat of a gameplay +advantage - you can see ships, shields, explosions, but not weapons fire other +than your own torps. Just as important, you can now choose a different size for +local vs map window. A typical user may want a 750x750 local but only a 400x400 +map. The upper pixel limit is 5000x5000 for either map or local window, but I +don't expect anyone has a monitor to support even close to that limit. +11) Most netrekrc window's geometries are now commented out (all except map and +local), this is because adjusting the size of local or map will now do a pretty +good job of autoplacing all the other windows for you. +12) Added new function keys, control-z and control-a, for zooming. Control-z +zooms in, and control-a zooms out. As part of the benefit of having all +graphics scale, ALL ship bitmap sets can now show ships to 256 positions. +13) Richtext message windows are now resizeable and moveable. Moving works a +little different than moving other windows. Instead of clicking on border, you +click on the body of the window, hold down left mouse button, and move the +window. This only works if the richTextMove option is on. +14) The mainResizeable netrekrc option now allows map/local to be resizeable. +Note that resizing local and map windows only lets you size them as squares. +Some windows (team select, quit) will resize properly to match new local size, +others (position of options menu, dashboard, etc.) will not move. Interesting +sidenote: resizing local window will reinitialize background star positions. +To resize the local/map/richtext windows, right click on window border to +activate sizing border, resize the window as you want, then right click again +to deactivate sizing border. The reason the procedure is a little complicated is +because having a border which can both resize the window requires a larger border, +which cuts into precious screen space. So this sizing border needs to be +activated first, then deactivated when the window is done sizing. +15) The ' key (single quote) is now the default key for toggling on and off the +expanded playerlist window. +16) Color settings are now all listed in netrekrc, and a list of valid colors is +now found at the end of the netrekxp manual. +17) You now get a popup box when client receives a game shutdown message from +server, indicating that the game has been terminated and to try again later. +18) Main title bar now defaults to on. +19) Can now change login name via options menu (don't forget to save if you want +to make it permanent). +20) The left and right arrow keys are now mapped to turn left and turn right, +they execute a turn request for a 1/16 turn in the desired direction. I +personally find it awkward but if someone is playing without a mouse for +whatever reason, it allows them to move at least. Since using the arrow pad +requires a keyboard equivalent key, and these are new keyactions, there are now +2 less available key sequences. Control+[ is now mapped to turn left, and +control+] is turn right, these keys were selected to be as out of the way as +possible to avoid conflicts with existing keymaps. Turn keys are controlled +server side via the TURN_KEYS feature packet, so they will only work if the +server allows it. +21) The up and down arrow keys now are mapped to accelerate and deccelerate. + +Graphics: +1) New graphics for the team select windows, and new option +"newTeams: (on)/off" whether to use these graphics or the old team windows. +2) Fixed flicker experienced sometimes seen with stationary ships near a planet +on the galactic map. +3) The old mono torps are now default. Big torps are nice and all, but I think +there is a loss in dodging ability with the bigger torps. + +Sound: +1) Added new sounds for when engine melt, and then for when they are unmelted. +2) Sound can now be initialized via sound menu if program starts with sound off. +3) Start music will no longer play if you connect to a server and wind up on a +wait queue, the music will instead play once you reach the login screen. + +General bug fixes: +1) Fixed bug with metaserver not sorting correcty sometimes, and some server +entries not having their metaping field initialized. +2) Fixed bug where alert border was not working right upon death with old ship +bitmaps. +3) Fixed error messages with cambot and beeplite. +4) Fixed music playback with cambot so it stops playing on entry properly. +5) Several fixes to BRMH shrink phasers - they now can shrink on miss, and +enemy phasers also shrink properly. +6) Planet window no longer gets unmapped on death. +7) Fixed macro crash bug with sending macros to invisible players on the +playerlist. +8) Fixed annoying bug where tactical would sometimes seem to disappear on +reentry into game after death, was due to losing your position packet and not +requesting a new one (you now WILL request a position update if alive but +seemingly off the map). +9) Fixed bug with self phasers where they would sometimes stretch across the +screen upon death. +10) Dist.taking (used in older netrekrc files) will now work, though dist.take +is still the preferred name for that distress call. +11) Changed how message HUD works, it now is refreshed during the redraw of the +local map rather than updated independently, should fix some redraw bugs with +message HUD. +12) Enemy torps which are off local screen are no longer automatically freed +(since this data is now sent for observers). Also fixed an issue with exploding +torps that would not clear properly. +13) Fixed a bug with RCM kill messages when kills were higher than 255 but less +than 320. +14) Bomb RCD used on an unknown planet or planet with 4 or less armies will now +say "bomb " instead of the more useless, unspecific "bomb". +15) Fixed galactic and tactical planet names so they are centered on planets. +16) Phaser misses on sturgeon servers now show proper phaser length based on +how many phaser upgrades the ship has. + +New features: +1) Main window titlebar now shows your loginname and slot number, in addition +to showing the servername. +2) New dashboard message for warp 0 ("Stopped") instead of saying "Impulse" +3) Added "autoSetWar: (0-2)" netrekrc option that controls declare war settings +with enemy races when you first join. Can now automatically declare peace on +3rd space races, for example. +4) Improved explanation of keymap/buttonmap in the netrekrc. +5) Support for AT ship in playerlist and info window (shows 'AT' instead of +'??'). +6) The "Flags" text on COW and KRP dashboards will now turn red if your ship is +weapon temped or engine temped. +7) Added "lockLine: (on)/off" to draw a dashed green line on the galactic map +between your ship and the target you are locked on to, whether it be a player or +a planet. +8) Added "tractorID: (on)/off" to draw the player number of the person you are +tractoring or pressoring below and to the left of your ship. Continues to +display who you are tractor/pressoring even if they cloak. +9) Added "puckArrow: (on)/off" option to draw a tic mark on the puck in hockey +to indicate puck direction. +10) Added "sortPlanets: (on)/off" to sort the planet list, with your planets +first, then the planets of the other teams, starting with the team with the most +players. Within a team, planets are sorted from low to high army count. Left +clicking the planet list window will toggle between a sorted and unsorted planet +list, right clicking will close the planet window. Team's starting planets are +separated by a white line. +11) Added "headingTic: on/(off)" to draw a tick mark indicating your ship's +heading, as well as a smaller secondary mark indicating where you are turning +to, or in the case of when you are locked on to a player/planet, indicating the +direction to that player/planet. This option helps with aiming in hockey and +hitting cloaked ships you are locked on to. +12) Added "weaponsOnMap: (on)/off" to show torps, plasmas and phasers on the +galactic map. +13) Removed the netrek.w32caption option that was undocumented and has since +been replaced by the mainTitleBar option. +14) Added "viewRange: (0-3)" option to draw a dashed circle on the map showing +the range at which enemies can see you. You can choose to draw it at all times, +only when you are cloaked, only when carrying, or not at all. If orbitting a +foreign planet, no circle is drawn, as you are visible to all. View range is +disabled if your ship is a starbase. Cloaked view range will also show on the +tactical map if tactical is resized large enough. Showing view range circles on +the galactic map is controlled server side via the SHOW_VISIBILITY_RANGE feature +packet, so this option will only work for the most part if the server allows it. +15) Added support for feature packet FULL_WEAPON_RESOLUTION, this means that +observers can see all weapons on the galaxy map, yay! It also means you can see +your torps on the galaxy map beyond your tactical range (good for plinking). +Can turn this feature packet on/off with the netrekrc option +"useFullWeapInfo: (on)/off". +16) Added "clickDelay: (0-50)" to allow for a delay between continuous mouse +clicks, range is in # of updates. +17) Added "packetLights: (on)/off" to show packets sent and received via +blinking lights on dashboard. +18) New netrekrc option "showCloakers: (on)/off" to show other cloakers on +tactical, only works if server has the new feature packet SHOW_CLOAKERS on. +19) New netrekrc option "showOtherSpeed: (on)/off" to show speed next to other +players, only works if server has the new feature packet SHOW_OTHER_SPEED on. +20) Changed showArmy option to be a range (0-3), to take advantage of new server +feature packet SHOW_ARMY_COUNT. Range of values is now as follows: # 0 - don't show army counts # 1 - show army counts on local map only (default) # 2 - show army counts on galactic map only # 3 - show army counts on both maps -- changed how message HUD works, it now is refreshed during the redraw of the local map - rather than updated independently, should fix some redraw bugs with message HUD -- message window will now say "Click here to send a message to ALL" until any message - is sent, then it will be blank as usual -- left clicking on message window will either a) start a new message to all board or - b) continue current pending message -- rank window now shows DI needed for next rank -- default buttonmap now uses mouse wheel for accel/decel, scroll up to accelerate to max, - scroll down to decelerate to warp 0. -- fixed annoying bug where tactical would sometimes seem to disappear on reentry into game - after death, was due to losing your position packet and not requesting a new one (you now - WILL request a position update if alive but seemingly off the map) -- dist.taking (used in older netrekrc files) will now work, though dist.take is still - the preferred name for that distress call -- sound can now be initialized via sound menu if program starts with sound off -- fixed bug with self phasers where they would sometimes stretch across the screen - upon death -- added "clickDelay: (0-50)" to allow for a delay between continuous mouse clicks, range - is in # of updates -- added "packetLights: (on)/off" to show packets sent and received via blinking lights - on dashboard -- restored ability for middle and right mouse clicks to raise the current window to the - top, helps with overlapped windows -- removed the netrek.w32caption option that was undocumented and has since been replaced - by the mainTitleBar option -- some bug fixes related to handling graphics initilization and exit -- added "viewRange: (0-3)" option to draw a dashed circle on the map showing - the range at which enemies can see you. You can choose to draw it at all times, - only when you are cloaked, only when carrying, or not at all. If orbitting a - foreign planet, no circle is drawn, as you are visible to all. View range is - disabled if your ship is a starbase. -- fixed flicker experienced sometimes seen with stationary ships near a planet - on the galactic map -- the old mono torps are now default. Big torps are nice and all, but I think - there is a loss in dodging ability with the bigger torps. -- added support for feature packet FULL_WEAPON_RESOLUTION, this means that observers - can see all weapons on the galaxy map, yay! It also means you can see your torps - on the galaxy map beyond your tactical range (good for plinking). Can turn this - feature packet on/off with the netrekrc option "useFullWeapInfo: (on)/off". -- added ability to update buttonmap through the options menu -- added "weaponsOnMap: (on)/off" to show torps, plasmas and phasers on the galactic map. -- new Options menus for Hockey and Weapons -- planet window no longer gets unmapped on death -- fixed macro crash bug with sending macros to invisible players on the playerlist -- added "sortPlanets: (on)/off" to sort the planet list, with your planets first, then the planets - of the other teams, starting with the team with the most players. Within a team, planets - are sorted from low to high army count. -- the planet list window can now be used with info, lock and certain RCDs. In other words, - you can lock onto planets through the planet list window, and send planet-related RCDs - through the window as well. -- left clicking the planet list window will toggle between a sorted and unsorted planet - list, right clicking will close the planet window. Team's starting planets are now - separated by a white line. -- added "headingTic: on/(off)" to draw a tick mark indicating your ship's heading, as well - as a smaller secondary mark indicating where you are turning to, or in the case of when - you are locked on to a player/planet, indicating the direction to that player/planet. - This option helps with aiming in hockey and hitting cloaked ships you are locked on to. -- added "lockLine: (on)/off" to draw a dashed green line on the galactic map between your - ship and the target you are locked on to, whether it be a player or a planet. -- added "tractorID: (on)/off" to draw the player number of the person you are tractoring - or pressoring below and to the left of your ship. Continues to display who you are - tractor/pressoring even if they cloak. -- added "puckArrow: (on)/off" option to draw a tic mark on the puck in hockey to indicate - puck direction -- several fixes to BRMH shrink phasers - they now can shrink on miss, and enemy phasers - also shrink properly -- added new sounds for when engine melt, and then for when they are unmelted -- new graphics for the team select windows, and new option "newTeams: (on)/off" whether - to use these graphics or the old team windows -- the "Flags" text on COW and KRP dashboards will now turn red if your ship is - weapon temped or engine temped -- 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 "autoSetWar: (0-2)" netrekrc option that controls declare war settings with - enemy races when you first join. Can now automatically declare peace on 3rd space - races, for example. -- fixed bug where alert border was not working right upon death with old ship bitmaps -- fixed error messages with cambot and beeplite -- fixed music playback with cambot so it stops playing on entry properly -- fixed bug with metaserver not sorting correcty sometimes, and some server entries not - having their metaping field initialized. +21) Added support for CHECK_PLANETS feature packet, this is a nice packet that +checks with the server to make sure your planet info is up to date, so no more +phantom armies on a planet or delay on bombing a planet flat because you lost a +planet packet. Also no more wondering if you missed a planet packet while +dropping if planet army count doesn't go down. This cross-check with server +occurs 10 times/second for a planet you are orbitting (critical), and once +every 4 seconds for all the planets your team has info on (non-critical). +22) New netrekrc option "infoRange: (on)/off" to draw a dashed white box on your +tactical if you increase the tactical size beyond 500 x 500. This box is drawn +to show the 500 x 500 range, which is important because other people's weapons +data is not sent beyond this range (box essentially shows limit of fog of war +for weapons). +23) Added netrekrc option "richText: (on)/off" to allow stuff like cut/paste +from message windows and clickable URLs. Richtext windows also have a smarter +scrollback mechanism. If the mouse is over a richtext message window AND +message position isn't already at the bottom of the window, it will not scroll +upon receiving a new message, as it is likely you are scrolling back to read +old messages. If mouse is not in a window that receives a message, that window +will scroll to the bottom, solving the problem of sometimes accidentally not +resetting window scrollback to bottom and the failing to see new messages as +they come in. +24) Added netrekrc option "scaleFactor: (10-40)" that allows you to zoom in the +tactical map to get more detail! Turn on those high resolution bitmaps, pump up +your tactical size to 1000x1000 and see the great graphics! Default scale is 40 +(this is the traditional scale used in clients, changing scale to 20 will +effectively double the scale). +25) Added netrekrc option "color.God: " to alter color of God messages. +26) New netrekrc option "fullBitmapRotation: (on)/off" that lets you choose to +draw the old ship bitmaps to 32 positions (off) instead of 256 (on). Useful +for those with custom bitmap sets, as it will use all 32 bitmaps in a set rather +than just rotating the first one in the set. +27) New netrekrc option "saveFile: name" to control what filename you write to +when you save your options in game (either with " key or via the save menu). +Default is now netrekrc, so that means if you save in-game, it will overwrite +your netrekrc with your current settings (I have a feeling the benefits of this +strongly outweigh the negatives such as mistakenly remapping things then +mistakenly saving your netrekrc). The netrekrc save feature now saves +EVERYTHING. Well pretty much everything. All netrekrc options, windows +geometries and locations, keymap, buttonmap, macros, etc. It also saves some +obscure options like ckeymaps, ship specific keymaps/ckeymap/buttonmaps +/netrekrc, b1keymap - b5keymap, and observer/servertype specific options. +Saving servernick options is not supported, but I doubt anyone uses those to +begin with. If any features are found which do NOT save properly, please send +in a bug report. In the case of the main window, it won't save the new size or +coordinates if you resize them in game, as this is complicated to do due to +things like task bars, title bars, and window resize borders. Hopefully +between using the mainTitleBar and mainMaximized options, as well as adjusting +your netrekrc line "netrek.geometry", you can easily size the netrek window to +be what you want it to be. The in-game save key takes a lot of the pain out of +setting up windows (you should be able to do it without having to edit netrekrc). +It also makes editting the netrekrc to change options mostly unnecessary. +28) Cambot files names are now autogenerated, similiar to logfile names, if no +name is given (names will be like 20070401.pkt). +29) New netrekrc option "mainMaximized: (on)/off" to make main window maximized +on client start. +30) New netrekrc option "richTextMove: on/(off)" to allow rich text message +windows to be moved. Since left mouse is used to move window, and left mouse is +also used to highlight text, this option defaults to off, to make it easier to +highlight text. +31) Added fontSize option to netrekrc (this option always existed, but was +undocumented and horribly buggy). This option controls the pixel height of the +font used in game. As a result of changing font size, most windows should adjust +to a new proper size. Such as dashboards and playerlist and message windows. + Netrek XP 2006, Version 1.2: (Released Mar-2007) - added "messageKeyOnly: (on)/off" so that you will only start messages with the actual @@ -371,6 +381,7 @@ (i.e. 20061002.log will be the log file generated on October 2, 2006). - added support for multiline macros sent using NEWMACRO variables (%p, %z, etc) + Netrek XP 2006, Version 1.1: (Released 26-Jun-2006) - middle mouse button now closes the help window - other people's phasers sounds were not being heard if you were cloaked, this has been fixed @@ -424,6 +435,7 @@ - fixed beeplite sounds with newSound - hopefully fixed redraw problem with beeplite not refreshing planets on the planet map + Netrek XP 2006, Version 1.0: (Released 01-Jun-2006) - changed to constant border redraw vs. only redraw border on alert change - fixes some problems with the new bitmap sets From modemhero at users.sourceforge.net Wed Apr 25 01:50:44 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 25 Apr 2007 06:50:44 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.191, 1.192 Message-ID: <20070425065055.B0310B3ED@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv25686/resources/docs Modified Files: changes.txt Log Message: Support for server SP_FLAGS_ALL packet. Cleaned up some mistakes in changes.txt. Removed condition of having a planet being "touched" for the CHECK_PLANETS crosscheck to occur. Fixed wrong comment description on which version of short packets is S_P2. Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.191 retrieving revision 1.192 diff -u -d -r1.191 -r1.192 --- changes.txt 23 Apr 2007 08:23:20 -0000 1.191 +++ changes.txt 25 Apr 2007 06:50:42 -0000 1.192 @@ -32,10 +32,12 @@ 12) Added new function keys, control-z and control-a, for zooming. Control-z zooms in, and control-a zooms out. As part of the benefit of having all graphics scale, ALL ship bitmap sets can now show ships to 256 positions. -13) Richtext message windows are now resizeable and moveable. Moving works a -little different than moving other windows. Instead of clicking on border, you -click on the body of the window, hold down left mouse button, and move the -window. This only works if the richTextMove option is on. +13) Added richtext message windows, which allow stuff like cut and paste from +within the message windows, and clickable URLs. Richtext message windows are +both resizeable and moveable. Moving them works a little different than moving +other windows. Instead of clicking on the border, you click on the body of the +window, hold down left mouse button, and move the window. This only works if +the richTextMove option is on. 14) The mainResizeable netrekrc option now allows map/local to be resizeable. Note that resizing local and map windows only lets you size them as squares. Some windows (team select, quit) will resize properly to match new local size, @@ -44,7 +46,7 @@ To resize the local/map/richtext windows, right click on window border to activate sizing border, resize the window as you want, then right click again to deactivate sizing border. The reason the procedure is a little complicated is -because having a border which can both resize the window requires a larger border, +because having a border which can resize the window requires a larger border, which cuts into precious screen space. So this sizing border needs to be activated first, then deactivated when the window is done sizing. 15) The ' key (single quote) is now the default key for toggling on and off the @@ -83,7 +85,7 @@ wait queue, the music will instead play once you reach the login screen. General bug fixes: -1) Fixed bug with metaserver not sorting correcty sometimes, and some server +1) Fixed bug with metaserver not sorting correctly sometimes, and some server entries not having their metaping field initialized. 2) Fixed bug where alert border was not working right upon death with old ship bitmaps. @@ -183,8 +185,9 @@ phantom armies on a planet or delay on bombing a planet flat because you lost a planet packet. Also no more wondering if you missed a planet packet while dropping if planet army count doesn't go down. This cross-check with server -occurs 10 times/second for a planet you are orbitting (critical), and once -every 4 seconds for all the planets your team has info on (non-critical). +occurs 10 times/second for a planet you are orbitting (critical), and will cycle +through the rest of the planets at a rate of 1 planet every 100 ms. Adds 100 +bytes/sec in upstream data from client to server. 22) New netrekrc option "infoRange: (on)/off" to draw a dashed white box on your tactical if you increase the tactical size beyond 500 x 500. This box is drawn to show the 500 x 500 range, which is important because other people's weapons @@ -241,7 +244,11 @@ undocumented and horribly buggy). This option controls the pixel height of the font used in game. As a result of changing font size, most windows should adjust to a new proper size. Such as dashboards and playerlist and message windows. - +32) Added support for SP_FLAGS_ALL feature packet, this is a packet that sends +important flags (cloak/shields/alive) on all players every update, if you are +using long packets for players, or if you are using the FULL_DIRECTION_RESOLUTION +feature packet. This solves a problem with packet loss using the aforementioned +full direction resolution feature. Netrek XP 2006, Version 1.2: (Released Mar-2007) - added "messageKeyOnly: (on)/off" so that you will only start messages with the actual From modemhero at users.sourceforge.net Wed Apr 25 01:50:44 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 25 Apr 2007 06:50:44 +0000 Subject: [netrek-cvs] client/netrekxp/include data.h, 1.80, 1.81 packets.h, 1.6, 1.7 proto.h, 1.51, 1.52 Message-ID: <20070425065055.AE15FB3EB@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs16:/tmp/cvs-serv25686/include Modified Files: data.h packets.h proto.h Log Message: Support for server SP_FLAGS_ALL packet. Cleaned up some mistakes in changes.txt. Removed condition of having a planet being "touched" for the CHECK_PLANETS crosscheck to occur. Fixed wrong comment description on which version of short packets is S_P2. Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.80 retrieving revision 1.81 diff -u -d -r1.80 -r1.81 --- data.h 23 Apr 2007 07:19:29 -0000 1.80 +++ data.h 25 Apr 2007 06:50:41 -0000 1.81 @@ -588,6 +588,7 @@ extern int F_show_cloakers; extern int F_turn_keys; extern int F_show_visibility_range; +extern int F_sp_flags_all; #ifdef RECORDGAME extern int F_many_self; Index: packets.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/packets.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- packets.h 4 Apr 2007 10:34:21 -0000 1.6 +++ packets.h 25 Apr 2007 06:50:41 -0000 1.7 @@ -84,6 +84,7 @@ #endif #define SP_GENERIC_32 32 /* 32 byte generic, see struct */ +#define SP_FLAGS_ALL 33 /* abbreviated flags for all players */ #define SP_SHIP_CAP 39 /* Handles server ship mods */ #ifdef SHORT_PACKETS @@ -118,9 +119,8 @@ /* variable length packets */ #define VPLAYER_SIZE 4 -#define SHORTVERSION 11 /* other number blocks, like - * UDP Version */ -#define OLDSHORTVERSION 10 /* S_P2 */ +#define SHORTVERSION 11 /* S_P2 */ +#define OLDSHORTVERSION 10 /* Short packets version 1*/ #endif @@ -884,7 +884,8 @@ unsigned short s_bitmap; }; -struct generic_32_spacket { +struct generic_32_spacket +{ char type; /* SP_GENERIC_32 */ char version; /* alphabetic */ short repair_time; /* server estimate of repair time in seconds */ @@ -900,6 +901,16 @@ fields in struct that were defined at a particular version. */ +struct flags_all_spacket +{ + char type; /* SP_FLAGS_ALL */ + char offset; /* slot number of first flag */ + int flags; /* two bits per slot */ +}; +#define FLAGS_ALL_DEAD 0 +#define FLAGS_ALL_CLOAK_ON 1 +#define FLAGS_ALL_CLOAK_OFF_SHIELDS_UP 2 +#define FLAGS_ALL_CLOAK_OFF_SHIELDS_DOWN 3 #ifdef SHORT_PACKETS struct shortreq_cpacket Index: proto.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/proto.h,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- proto.h 14 Apr 2007 07:44:34 -0000 1.51 +++ proto.h 25 Apr 2007 06:50:42 -0000 1.52 @@ -1134,6 +1134,8 @@ void handleShipCap (struct ship_cap_spacket *packet); struct generic_32_spacket; void handleGeneric32 (struct generic_32_spacket *packet); +struct flags_all_spacket; +void handleFlagsAll (struct flags_all_spacket *packet); struct rsa_key_spacket; void handleRSAKey (struct rsa_key_spacket *packet); #ifdef INCLUDE_SCAN From modemhero at users.sourceforge.net Wed Apr 25 01:50:43 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 25 Apr 2007 06:50:43 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C, 1.143, 1.144 clientr.suo, 1.125, 1.126 Message-ID: <20070425065123.98F941867CE@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs16:/tmp/cvs-serv25686 Modified Files: NetrekXP to do list.C clientr.suo Log Message: Support for server SP_FLAGS_ALL packet. Cleaned up some mistakes in changes.txt. Removed condition of having a planet being "touched" for the CHECK_PLANETS crosscheck to occur. Fixed wrong comment description on which version of short packets is S_P2. Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.143 retrieving revision 1.144 diff -u -d -r1.143 -r1.144 --- NetrekXP to do list.C 19 Apr 2007 08:22:58 -0000 1.143 +++ NetrekXP to do list.C 25 Apr 2007 06:50:38 -0000 1.144 @@ -21,7 +21,6 @@ old AddFontResource function. Things to do: -1) Have font in windows adjust as window size increases. 2) Get square planet bitmaps so I can turn them into mapped rotating globes. 3) Metaping on a Unknown server is causing unseemly delay due to threading. I believe this is fixed. Index: clientr.suo =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.suo,v retrieving revision 1.125 retrieving revision 1.126 diff -u -d -r1.125 -r1.126 Binary files /tmp/cvs7VAzho and /tmp/cvsnZFa4X differ From modemhero at users.sourceforge.net Wed Apr 25 01:50:46 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 25 Apr 2007 06:50:46 +0000 Subject: [netrek-cvs] client/netrekxp/src data.c, 1.86, 1.87 feature.c, 1.15, 1.16 map.c, 1.53, 1.54 socket.c, 1.29, 1.30 Message-ID: <20070425065057.CA264B3EB@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv25686/src Modified Files: data.c feature.c map.c socket.c Log Message: Support for server SP_FLAGS_ALL packet. Cleaned up some mistakes in changes.txt. Removed condition of having a planet being "touched" for the CHECK_PLANETS crosscheck to occur. Fixed wrong comment description on which version of short packets is S_P2. Index: feature.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/feature.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- feature.c 23 Apr 2007 07:19:30 -0000 1.15 +++ feature.c 25 Apr 2007 06:50:42 -0000 1.16 @@ -99,6 +99,7 @@ {"SHOW_CLOAKERS", &F_show_cloakers, 'S', 1, 0, 0}, {"TURN_KEYS", &F_turn_keys, 'S', 1, 0, 0}, {"SHOW_VISIBILITY_RANGE", &F_show_visibility_range, 'S', 1, 0, 0}, + {"SP_FLAGS_ALL", &F_sp_flags_all, 'S', 1, 0, 0}, {0, 0, 0, 0, 0, 0} }; Index: map.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- map.c 23 Apr 2007 07:19:30 -0000 1.53 +++ map.c 25 Apr 2007 06:50:43 -0000 1.54 @@ -507,7 +507,7 @@ /* Synchronize planet info (up to 10 times/second) for current orbitted planet. For all other planets, send info on planet 0 through planet MAXPLANETS every MAXPLANETS/10 seconds, one planet at a time, - 10 times/second. Only send info is planet is "touched" */ + 10 times/second. */ if (F_check_planets) { if ((me->p_flags & PFORBIT) @@ -520,8 +520,7 @@ orbit_planet_refresh = 0; } } - else if ((planet_refresh == l->pl_no * server_ups / 10) - && (l->pl_info & me->p_team)) + else if (planet_refresh == l->pl_no * server_ups / 10) sendPlanetsPacket(l->pl_no); } Index: socket.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- socket.c 23 Apr 2007 07:19:30 -0000 1.29 +++ socket.c 25 Apr 2007 06:50:43 -0000 1.30 @@ -147,7 +147,7 @@ #endif {sizeof (struct generic_32_spacket), handleGeneric32}, /* SP_GENERIC_32 */ - {0, dummy}, /* 33 */ + {sizeof (struct flags_all_spacket), handleFlagsAll}, /* SP_FLAGS_ALL */ {0, dummy}, /* 34 */ {0, dummy}, /* 35 */ {0, dummy}, /* 36 */ @@ -2531,6 +2531,12 @@ if (packet->version < 'b') return; } +void +handleFlagsAll (struct flags_all_spacket *packet) +{ + new_flags(ntohl(packet->flags), packet->offset); +} + #ifdef RSA void handleRSAKey (struct rsa_key_spacket *packet) Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.86 retrieving revision 1.87 diff -u -d -r1.86 -r1.87 --- data.c 23 Apr 2007 07:19:30 -0000 1.86 +++ data.c 25 Apr 2007 06:50:42 -0000 1.87 @@ -688,6 +688,7 @@ int F_show_cloakers = 0; int F_turn_keys = 0; int F_show_visibility_range = 0; +int F_sp_flags_all = 0; #ifdef RECORDGAME int F_many_self = 0; From modemhero at users.sourceforge.net Wed Apr 25 02:21:53 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 25 Apr 2007 07:21:53 +0000 Subject: [netrek-cvs] client/netrekxp/src data.c, 1.87, 1.88 defaults.c, 1.81, 1.82 feature.c, 1.16, 1.17 mswindow.c, 1.79, 1.80 Message-ID: <20070425072236.02F8B1867CE@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv12425/src Modified Files: data.c defaults.c feature.c mswindow.c Log Message: New netrekrc options "useCheckPlanets: (on)/off" and "useGeneric32: (on)/off" to control whether to use the CHECK_PLANETS or SP_GENERIC_32 feature packets. Added improved explanation to netrekrc for the bandwidth costs of using the 4 new(ish) feature packets which actually increase bandwidth use. Fixed bug with netrek.geometry not saving properly due to passing a null string. Index: feature.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/feature.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- feature.c 25 Apr 2007 06:50:42 -0000 1.16 +++ feature.c 25 Apr 2007 07:21:50 -0000 1.17 @@ -117,10 +117,14 @@ { if (strcmpi (f->name, "FEATURE_PACKETS") != 0) { - if (!strcmp(f->name, "FULL_DIRECTION_RESOLUTION")) + if (!strcmp(f->name, "CHECK_PLANETS")) + value = useCheckPlanets; + else if (!strcmp(f->name, "FULL_DIRECTION_RESOLUTION")) value = useFullShipInfo; else if (!strcmp(f->name, "FULL_WEAPON_RESOLUTION")) value = useFullWeapInfo; + else if (!strcmp(f->name, "SP_GENERIC_32")) + value = useGeneric32; else value = f->value; sendFeature (f->name, Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.79 retrieving revision 1.80 diff -u -d -r1.79 -r1.80 --- mswindow.c 23 Apr 2007 07:19:30 -0000 1.79 +++ mswindow.c 25 Apr 2007 07:21:50 -0000 1.80 @@ -5772,7 +5772,7 @@ /* TODO: fix main window so it takes into account all the SYS_CAPTION/border size changes, too messy for now */ if (strcmpi (win->name, "netrek") == 0) - return (geometryDefault (str)); + return (geometryDefault ("netrek.geometry")); /* Let's keep local and map windows square! */ else if (strcmpi (win->name, "local") == 0) { Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.81 retrieving revision 1.82 diff -u -d -r1.81 -r1.82 --- defaults.c 18 Apr 2007 09:41:32 -0000 1.81 +++ defaults.c 25 Apr 2007 07:21:49 -0000 1.82 @@ -917,11 +917,21 @@ NULL } }, + {"useCheckPlanets", &useCheckPlanets, RC_BOOL, + { + "Crosscheck with server to make sure all planet information is", + "correct. Prevents against lost planet updates which can cause", + "problems like phantom armies or not realizing a planet has", + "popped. Increases upstream (client to server) bandwidth usage", + "by 100 bytes/second.", + NULL + } + }, {"useFullShipInfo", &useFullShipInfo, RC_BOOL, { "Display other ships to 256 directions instead of 16", "by using long ship packets instead of short ship packets,", - "slight increase in bandwidth usage", + "increases bandwidth usage by several kb/second.", NULL } }, @@ -929,8 +939,17 @@ { "Allows observers to see all weapons fire on galaxy map", "by using long torp packets instead of short torp packets,", - "slight increase in bandwidth usage. Also allows self torps", - "to be seen beyond tactical range, again via galactic map", + "can increase bandwidth usage on the order of 10 kb/second.", + "Also allows self torps to be seen beyond tactical range,", + "again via the galaxy map.", + NULL + } + }, + {"useGeneric32", &useGeneric32, RC_BOOL, + { + "Receive SP_GENERIC_32 packets, which are used to convey things", + "like repair time and planet being orbitted. Increases bandwidth", + "usage by 320 bytes/second for a server running at 10 UPS.", NULL } }, @@ -979,6 +998,7 @@ {"viewRange", &viewRange, RC_INT, { "Show range at which enemies can see you as a circle on map", + "Server god decides whether to enable this feature", "0 - don't show range circle", "1 - only show range circle when cloaked", "2 - only show range circle when carrying", @@ -1726,8 +1746,10 @@ soundMusic = booleanDefault ("soundMusic", soundMusic); soundMusicBkgd = booleanDefault ("soundMusicBkgd", soundMusicBkgd); soundAngles = booleanDefault ("soundAngles", soundAngles); + useCheckPlanets = booleanDefault ("useCheckPlanets", useCheckPlanets); useFullShipInfo = booleanDefault ("useFullShipInfo", useFullShipInfo); useFullWeapInfo = booleanDefault ("useFullWeapInfo", useFullWeapInfo); + useGeneric32 = booleanDefault ("useGeneric32", useGeneric32); headingTic = booleanDefault ("headingTic", headingTic); tractorID = booleanDefault ("tractorID", tractorID); lockLine = booleanDefault ("lockLine", lockLine); Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.87 retrieving revision 1.88 diff -u -d -r1.87 -r1.88 --- data.c 25 Apr 2007 06:50:42 -0000 1.87 +++ data.c 25 Apr 2007 07:21:49 -0000 1.88 @@ -826,9 +826,11 @@ int soundMusicBkgd = 0; /* Play random background music continuously */ int soundAngles = 0; /* Use 3D sound */ +int useCheckPlanets = 1; /* Send CP_PLANET packets to server checking planet status */ int useFullShipInfo = 1; /* Prefer SP_PLAYER packets over SP_S_PLAYER packets */ int useFullWeapInfo = 1; /* Receive larger torp packets, get self torp info beyond tactical, allow observer to see all weapons fire */ +int useGeneric32 = 1; /* Receive SP_GENERIC_32 packets */ int headingTic = 0; /* show ship heading tic */ int tractorID = 1; /* show ID of player you are tractoring */ int lockLine = 1; /* draw dashed line on map from you to lock target */ From modemhero at users.sourceforge.net Wed Apr 25 02:21:51 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 25 Apr 2007 07:21:51 +0000 Subject: [netrek-cvs] client/netrekxp/resources/htmlhelp/html generalconfig.html, 1.54, 1.55 Message-ID: <20070425072230.A0D9DB3EB@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html In directory sc8-pr-cvs16:/tmp/cvs-serv12425/resources/htmlhelp/html Modified Files: generalconfig.html Log Message: New netrekrc options "useCheckPlanets: (on)/off" and "useGeneric32: (on)/off" to control whether to use the CHECK_PLANETS or SP_GENERIC_32 feature packets. Added improved explanation to netrekrc for the bandwidth costs of using the 4 new(ish) feature packets which actually increase bandwidth use. Fixed bug with netrek.geometry not saving properly due to passing a null string. Index: generalconfig.html =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html/generalconfig.html,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- generalconfig.html 18 Apr 2007 09:41:32 -0000 1.54 +++ generalconfig.html 25 Apr 2007 07:21:49 -0000 1.55 @@ -1484,6 +1484,16 @@ 1-50
      default: 50 +useCheckPlanets +Crosscheck with server to make sure planet info always correct + +
        +
      • on (default)
      • +
      • off
      • +
      + + + useFullShipInfo Display other ships to 256 directions instead of 16 @@ -1504,6 +1514,16 @@ +useGeneric32 +Receive generic_32 server packets which carry repair time, etc. + +
        +
      • on (default)
      • +
      • off
      • +
      + + + useRsa Use RSA client verification From modemhero at users.sourceforge.net Wed Apr 25 02:21:44 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 25 Apr 2007 07:21:44 +0000 Subject: [netrek-cvs] client/netrekxp clientr.suo,1.126,1.127 Message-ID: <20070425072225.CD190B3EB@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs16:/tmp/cvs-serv12425 Modified Files: clientr.suo Log Message: New netrekrc options "useCheckPlanets: (on)/off" and "useGeneric32: (on)/off" to control whether to use the CHECK_PLANETS or SP_GENERIC_32 feature packets. Added improved explanation to netrekrc for the bandwidth costs of using the 4 new(ish) feature packets which actually increase bandwidth use. Fixed bug with netrek.geometry not saving properly due to passing a null string. Index: clientr.suo =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.suo,v retrieving revision 1.126 retrieving revision 1.127 diff -u -d -r1.126 -r1.127 Binary files /tmp/cvsrex5Ox and /tmp/cvsqsa9lm differ From modemhero at users.sourceforge.net Wed Apr 25 02:21:46 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 25 Apr 2007 07:21:46 +0000 Subject: [netrek-cvs] client/netrekxp/include data.h,1.81,1.82 Message-ID: <20070425072225.D06CEB3ED@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs16:/tmp/cvs-serv12425/include Modified Files: data.h Log Message: New netrekrc options "useCheckPlanets: (on)/off" and "useGeneric32: (on)/off" to control whether to use the CHECK_PLANETS or SP_GENERIC_32 feature packets. Added improved explanation to netrekrc for the bandwidth costs of using the 4 new(ish) feature packets which actually increase bandwidth use. Fixed bug with netrek.geometry not saving properly due to passing a null string. Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.81 retrieving revision 1.82 diff -u -d -r1.81 -r1.82 --- data.h 25 Apr 2007 06:50:41 -0000 1.81 +++ data.h 25 Apr 2007 07:21:42 -0000 1.82 @@ -736,9 +736,11 @@ extern int soundMusicBkgd; /* Play random background music continuously */ extern int soundAngles; /* Use 3D sound */ +extern int useCheckPlanets; /* Send CP_PLANET packets to server checking planet status */ extern int useFullShipInfo; /* Prefer SP_PLAYER packets over SP_S_PLAYER packets */ extern int useFullWeapInfo; /* Receive larger torp packets, get self torp info beyond tactical, allow observer to see all weapons fire */ +extern int useGeneric32; /* Receive SP_GENERIC_32 packets */ extern int headingTic; /* show ship heading tic */ extern int tractorID; /* show ID of player you are tractoring */ extern int lockLine; /* draw dashed line on map from you to lock target */ From modemhero at users.sourceforge.net Wed Apr 25 02:21:51 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 25 Apr 2007 07:21:51 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.192, 1.193 netrekrc, 1.68, 1.69 netrekrc_options.txt, 1.53, 1.54 Message-ID: <20070425072232.6A8451867CE@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv12425/resources/docs Modified Files: changes.txt netrekrc netrekrc_options.txt Log Message: New netrekrc options "useCheckPlanets: (on)/off" and "useGeneric32: (on)/off" to control whether to use the CHECK_PLANETS or SP_GENERIC_32 feature packets. Added improved explanation to netrekrc for the bandwidth costs of using the 4 new(ish) feature packets which actually increase bandwidth use. Fixed bug with netrek.geometry not saving properly due to passing a null string. Index: netrekrc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc,v retrieving revision 1.68 retrieving revision 1.69 diff -u -d -r1.68 -r1.69 --- netrekrc 23 Apr 2007 07:19:29 -0000 1.68 +++ netrekrc 25 Apr 2007 07:21:44 -0000 1.69 @@ -499,17 +499,30 @@ # by server frame rate updatesPerSec: 50 +# Crosscheck with server to make sure all planet information is +# correct. Prevents against lost planet updates which can cause +# problems like phantom armies or not realizing a planet has +# popped. Increases upstream (client to server) bandwidth usage +# by 100 bytes/second. +useCheckPlanets: on + # Display other ships to 256 directions instead of 16 # by using long ship packets instead of short ship packets, -# slight increase in bandwidth usage +# increases bandwidth usage by several kb/second. useFullShipInfo: on # Allows observers to see all weapons fire on galaxy map # by using long torp packets instead of short torp packets, -# slight increase in bandwidth usage. Also allows self torps -# to be seen beyond tactical range, again via galactic map +# can increase bandwidth usage on the order of 10 kb/second. +# Also allows self torps to be seen beyond tactical range, +# again via the galaxy map. useFullWeapInfo: on +# Receive SP_GENERIC_32 packets, which are used to convey things +# like repair time and planet being orbitted. Increases bandwidth +# usage by 320 bytes/second for a server running at 10 UPS. +useGeneric32: on + # Use beeplite useLite: on Index: netrekrc_options.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc_options.txt,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- netrekrc_options.txt 18 Apr 2007 09:41:32 -0000 1.53 +++ netrekrc_options.txt 25 Apr 2007 07:21:46 -0000 1.54 @@ -323,8 +323,10 @@ udpDebug: (0/1) debug UDP traffic udpSequenceCheck: (on/off) check UDP sequence updatesPerSec: (1-50 generally) how many data updates per second to request from server +useCheckPlanets: (on/off) crosscheck with server to make sure planet info always correct useFullShipInfo: (on/off) display other ships to 256 directions instead of 16 useFullWeapInfo: (on/off) support showing more weapon info on galaxy map +useGeneric32: (on/off) receive generic_32 server packets which carry repair time, etc. useLite: (on/off) use beeplite defLite: (on/off) use default beeplite settings useRSA: (on/off) use RSA client verification Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.192 retrieving revision 1.193 diff -u -d -r1.192 -r1.193 --- changes.txt 25 Apr 2007 06:50:42 -0000 1.192 +++ changes.txt 25 Apr 2007 07:21:44 -0000 1.193 @@ -242,13 +242,19 @@ highlight text. 31) Added fontSize option to netrekrc (this option always existed, but was undocumented and horribly buggy). This option controls the pixel height of the -font used in game. As a result of changing font size, most windows should adjust -to a new proper size. Such as dashboards and playerlist and message windows. +font used in game. As a result of changing font size, most windows should +adjust to a new proper size. Such as dashboards and playerlist and message +windows. 32) Added support for SP_FLAGS_ALL feature packet, this is a packet that sends important flags (cloak/shields/alive) on all players every update, if you are -using long packets for players, or if you are using the FULL_DIRECTION_RESOLUTION -feature packet. This solves a problem with packet loss using the aforementioned -full direction resolution feature. +using long packets for players, or if you are using the +FULL_DIRECTION_RESOLUTION feature packet. This solves a problem with packet +loss using the aforementioned full direction resolution feature. +33) New netrekrc options "useCheckPlanets: (on)/off" and "useGeneric32: +(on)/off" to control whether to use the CHECK_PLANETS or SP_GENERIC_32 feature +packets. +34) Added improved explanation to netrekrc for the bandwidth costs of using the +4 new(ish) feature packets which actually increase bandwidth use. Netrek XP 2006, Version 1.2: (Released Mar-2007) - added "messageKeyOnly: (on)/off" so that you will only start messages with the actual From modemhero at users.sourceforge.net Fri Apr 27 02:15:30 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 27 Apr 2007 07:15:30 +0000 Subject: [netrek-cvs] client/netrekxp/src data.c, 1.88, 1.89 defaults.c, 1.82, 1.83 mswindow.c, 1.80, 1.81 Message-ID: <20070427071540.3B0071867CE@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv3182/src Modified Files: data.c defaults.c mswindow.c Log Message: Add checks against localSDB and mapSDB existing before trying to free them. Make windowsMove on by default. Change default save file to be netrekrc not netrekrc.sav. Two compiler warning fixes for casting int as char. Detailed the exact bandwidth increase for the 2 full resolution options. Cleaned up todo list. Changes to compile.txt and rsa.txt based on user feedback to difficulties compiling. Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.88 retrieving revision 1.89 diff -u -d -r1.88 -r1.89 --- data.c 25 Apr 2007 07:21:49 -0000 1.88 +++ data.c 27 Apr 2007 07:15:28 -0000 1.89 @@ -765,7 +765,7 @@ int agriCAPS = 1; int agriColor = 2; -int windowMove = 0; +int windowMove = 1; int mainResizeable = 1; int mainMaximized = 1; int maxScrollLines = 300; Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.80 retrieving revision 1.81 diff -u -d -r1.80 -r1.81 --- mswindow.c 25 Apr 2007 07:21:50 -0000 1.80 +++ mswindow.c 27 Apr 2007 07:15:28 -0000 1.81 @@ -607,17 +607,23 @@ p = tmp; } - SelectObject (localSDB->mem_dc, localSDB->old_bmp); - DeleteObject (localSDB->mem_bmp); - ReleaseDC (((Window *)localSDB->window)->hwnd, localSDB->win_dc); - DeleteDC (localSDB->mem_dc); - free (localSDB); + if (localSDB) + { + SelectObject (localSDB->mem_dc, localSDB->old_bmp); + DeleteObject (localSDB->mem_bmp); + ReleaseDC (((Window *)localSDB->window)->hwnd, localSDB->win_dc); + DeleteDC (localSDB->mem_dc); + free (localSDB); + } - SelectObject (mapSDB->mem_dc, mapSDB->old_bmp); - DeleteObject (mapSDB->mem_bmp); - ReleaseDC (((Window *)mapSDB->window)->hwnd, mapSDB->win_dc); - DeleteDC (mapSDB->mem_dc); - free (mapSDB); + if (mapSDB) + { + SelectObject (mapSDB->mem_dc, mapSDB->old_bmp); + DeleteObject (mapSDB->mem_bmp); + ReleaseDC (((Window *)mapSDB->window)->hwnd, mapSDB->win_dc); + DeleteDC (mapSDB->mem_dc); + free (mapSDB); + } //WinKey Kill Library Stop if (pfnFastCallKill != NULL) @@ -822,8 +828,8 @@ 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_LEFT] = (char) 187; // turn left ^[ + VKMap[VK_RIGHT] = (char) 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'; @@ -1860,7 +1866,7 @@ win->ClipRect.right = LOWORD (lParam) - win->border; win->ClipRect.bottom = HIWORD (lParam) - win->border; // Reinitialize SDB as size/borders of window have changed - if ((Window *) w != NULL && win->hwnd == ((Window *) w)->hwnd) + if ((Window *) w != NULL && win->hwnd == ((Window *) w)->hwnd && localSDB) { SelectObject (localSDB->mem_dc, localSDB->old_bmp); DeleteObject (localSDB->mem_bmp); @@ -1869,7 +1875,7 @@ free (localSDB); localSDB = W_InitSDB (w); } - else if ((Window *) mapw != NULL && win->hwnd == ((Window *) mapw)->hwnd) + else if ((Window *) mapw != NULL && win->hwnd == ((Window *) mapw)->hwnd && mapSDB) { SelectObject (mapSDB->mem_dc, mapSDB->old_bmp); DeleteObject (mapSDB->mem_bmp); Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- defaults.c 25 Apr 2007 07:21:49 -0000 1.82 +++ defaults.c 27 Apr 2007 07:15:28 -0000 1.83 @@ -931,7 +931,7 @@ { "Display other ships to 256 directions instead of 16", "by using long ship packets instead of short ship packets,", - "increases bandwidth usage by several kb/second.", + "increases bandwidth usage by 1-2 kb/second.", NULL } }, @@ -939,7 +939,7 @@ { "Allows observers to see all weapons fire on galaxy map", "by using long torp packets instead of short torp packets,", - "can increase bandwidth usage on the order of 10 kb/second.", + "can increase bandwidth usage by 1 kb/second.", "Also allows self torps to be seen beyond tactical range,", "again via the galaxy map.", NULL @@ -2170,7 +2170,7 @@ if (!saveFile) { saveFile = (char *) malloc (sizeof (char) * 13); - sprintf (saveFile, "%s", "netrekrc.sav"); + sprintf (saveFile, "%s", "netrekrc"); } exe_dir = GetExeDir (); From modemhero at users.sourceforge.net Fri Apr 27 02:15:30 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 27 Apr 2007 07:15:30 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C, 1.144, 1.145 clientr.suo, 1.127, 1.128 compile.txt, 1.13, 1.14 rsa.txt, 1.1, 1.2 Message-ID: <20070427071539.CF527B3EB@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs16:/tmp/cvs-serv3182 Modified Files: NetrekXP to do list.C clientr.suo compile.txt rsa.txt Log Message: Add checks against localSDB and mapSDB existing before trying to free them. Make windowsMove on by default. Change default save file to be netrekrc not netrekrc.sav. Two compiler warning fixes for casting int as char. Detailed the exact bandwidth increase for the 2 full resolution options. Cleaned up todo list. Changes to compile.txt and rsa.txt based on user feedback to difficulties compiling. Index: clientr.suo =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.suo,v retrieving revision 1.127 retrieving revision 1.128 diff -u -d -r1.127 -r1.128 Binary files /tmp/cvsqptqhq and /tmp/cvsSMQwHn differ Index: compile.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/compile.txt,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- compile.txt 28 Feb 2007 09:35:18 -0000 1.13 +++ compile.txt 27 Apr 2007 07:15:27 -0000 1.14 @@ -16,6 +16,10 @@ InstCWD = path to folder to copy files to (default \netrek_files) HelpCompiler = path to hhc.exe from Microsoft's HTML Help Workshop (available from microsoft.com) +Step 1a: +-------- +Generate your rsa_box files, see rsa.txt for instructions. + Step 2: -------- Index: rsa.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/rsa.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- rsa.txt 7 May 2006 16:59:26 -0000 1.1 +++ rsa.txt 27 Apr 2007 07:15:27 -0000 1.2 @@ -14,6 +14,9 @@ creator - your mail address for bugs/suggestions comment - free text +A minimal use of mkkey would look like this (it requires 5 fields to work): +mkkey "testkey" "" "" "" "" + After running mkkey.exe with parameters you will have following files created: key_name - public key part Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.144 retrieving revision 1.145 diff -u -d -r1.144 -r1.145 --- NetrekXP to do list.C 25 Apr 2007 06:50:38 -0000 1.144 +++ NetrekXP to do list.C 27 Apr 2007 07:15:26 -0000 1.145 @@ -19,19 +19,19 @@ is rotated. Only solution so far is to moderate border refresh with scaled bitmaps. 2) AddFontResourceEx caused problems with win 98 machines. Commented out, and using old AddFontResource function. - -Things to do: -2) Get square planet bitmaps so I can turn them into mapped rotating globes. 3) Metaping on a Unknown server is causing unseemly delay due to threading. I believe this is fixed. -4) Some sort of click action on player list brings up a menu with settings for that -player's candock, cantranswarp, ban, ignore, etc. -5) Out of bounds message window calcs don't work with taskbar or menu bar, basewin -rect doesn't take these into account. -6) sendto() error: 10049 on metaserver connect to a bad server, believe it's due +4) sendto() error: 10049 on metaserver connect to a bad server, believe it's due to hostname not resolving. Currently fixed by using mulitple attempts to resolve bad host names. -7) With expanded tactical ..can now see ships at galactic coordinates (-500,-500), + +Things to do: +1) Get square planet bitmaps so I can turn them into mapped rotating globes. +2) Some sort of click action on player list brings up a menu with settings for that +player's candock, cantranswarp, ban, ignore, etc. +3) Out of bounds message window calcs don't work with taskbar or menu bar, basewin +rect doesn't take these into account. +4) With expanded tactical ..can now see ships at galactic coordinates (-500,-500), if you fly into the NW corner of the galaxy. this was never anticipated! Wish list: @@ -44,4 +44,4 @@ - fix accelerated scroll for microsoft mice - add msg.phaser to enable formatting of phaser messages - parse Announcer messages in hockey games -- pasting multiline prints \r\n instead of splitting lines + From modemhero at users.sourceforge.net Fri Apr 27 02:15:30 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 27 Apr 2007 07:15:30 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs netrekrc,1.69,1.70 Message-ID: <20070427071539.D263DB3ED@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv3182/resources/docs Modified Files: netrekrc Log Message: Add checks against localSDB and mapSDB existing before trying to free them. Make windowsMove on by default. Change default save file to be netrekrc not netrekrc.sav. Two compiler warning fixes for casting int as char. Detailed the exact bandwidth increase for the 2 full resolution options. Cleaned up todo list. Changes to compile.txt and rsa.txt based on user feedback to difficulties compiling. Index: netrekrc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc,v retrieving revision 1.69 retrieving revision 1.70 diff -u -d -r1.69 -r1.70 --- netrekrc 25 Apr 2007 07:21:44 -0000 1.69 +++ netrekrc 27 Apr 2007 07:15:28 -0000 1.70 @@ -508,12 +508,12 @@ # Display other ships to 256 directions instead of 16 # by using long ship packets instead of short ship packets, -# increases bandwidth usage by several kb/second. +# increases bandwidth usage by 1-2 kb/second. useFullShipInfo: on # Allows observers to see all weapons fire on galaxy map # by using long torp packets instead of short torp packets, -# can increase bandwidth usage on the order of 10 kb/second. +# can increase bandwidth usage by 1 kb/second. # Also allows self torps to be seen beyond tactical range, # again via the galaxy map. useFullWeapInfo: on From modemhero at users.sourceforge.net Fri Apr 27 05:04:21 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 27 Apr 2007 10:04:21 +0000 Subject: [netrek-cvs] client/netrekxp/src mswindow.c,1.81,1.82 Message-ID: <20070427100433.8276D1867CE@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv25609/src Modified Files: mswindow.c Log Message: Rewrite of handling SDB initialization and update upon sizing window, contributed by ChronosWS. Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.81 retrieving revision 1.82 diff -u -d -r1.81 -r1.82 --- mswindow.c 27 Apr 2007 07:15:28 -0000 1.81 +++ mswindow.c 27 Apr 2007 10:04:19 -0000 1.82 @@ -609,7 +609,10 @@ if (localSDB) { - SelectObject (localSDB->mem_dc, localSDB->old_bmp); + HBITMAP localObj; + + localObj = SelectObject (localSDB->mem_dc, localSDB->old_bmp); + DeleteObject (localObj); DeleteObject (localSDB->mem_bmp); ReleaseDC (((Window *)localSDB->window)->hwnd, localSDB->win_dc); DeleteDC (localSDB->mem_dc); @@ -618,7 +621,10 @@ if (mapSDB) { - SelectObject (mapSDB->mem_dc, mapSDB->old_bmp); + HBITMAP mapObj; + + mapObj = SelectObject (mapSDB->mem_dc, mapSDB->old_bmp); + DeleteObject (mapObj); DeleteObject (mapSDB->mem_bmp); ReleaseDC (((Window *)mapSDB->window)->hwnd, mapSDB->win_dc); DeleteDC (mapSDB->mem_dc); @@ -1865,25 +1871,11 @@ win->ClipRect.left = win->ClipRect.top = win->border; win->ClipRect.right = LOWORD (lParam) - win->border; win->ClipRect.bottom = HIWORD (lParam) - win->border; - // Reinitialize SDB as size/borders of window have changed + // Update SDB as size/borders of window have changed if ((Window *) w != NULL && win->hwnd == ((Window *) w)->hwnd && localSDB) - { - SelectObject (localSDB->mem_dc, localSDB->old_bmp); - DeleteObject (localSDB->mem_bmp); - ReleaseDC (((Window *)localSDB->window)->hwnd, localSDB->win_dc); - DeleteDC (localSDB->mem_dc); - free (localSDB); - localSDB = W_InitSDB (w); - } + W_UpdateSDB((W_Window) w, localSDB); else if ((Window *) mapw != NULL && win->hwnd == ((Window *) mapw)->hwnd && mapSDB) - { - SelectObject (mapSDB->mem_dc, mapSDB->old_bmp); - DeleteObject (mapSDB->mem_bmp); - ReleaseDC (((Window *)mapSDB->window)->hwnd, mapSDB->win_dc); - DeleteDC (mapSDB->mem_dc); - free (mapSDB); - mapSDB = W_InitSDB (mapw); - } + W_UpdateSDB((W_Window) mapw, mapSDB); break; case WM_SYSCOMMAND: @@ -5990,37 +5982,25 @@ } } -SDBUFFER * -W_InitSDB (W_Window window) +// +// Rebuilds the DCs for the SDBUFFER, either because of resize or on first creation. +// Returns 0 on failure, 1 on success. +// +int +W_RecreateSDBDCs(W_Window window, SDBUFFER* sdb) { - Window * win; - SDBUFFER * sdb; + Window * win = ((Window *)window); HBITMAP junk; - win = ((Window *)window); - - if (win->hwnd == NULL) - return NULL; - - if (strcmpi (win->name, "local") == 0) - win->sdb_flags = SDB_FLAG_LOCAL; - else if (strcmpi (win->name, "map") == 0) - win->sdb_flags = SDB_FLAG_MAP; - sdb = (SDBUFFER *) malloc (sizeof (SDBUFFER)); - sdb->window = (W_Window) malloc (sizeof (Window)); - - sdb->window = window; - - GetClientRect (win->hwnd, &(sdb->wr)); - sdb->win_dc = GetDC (win->hwnd); if (sdb->win_dc == NULL) - return NULL; + return 0; sdb->mem_dc = CreateCompatibleDC (sdb->win_dc); if (sdb->mem_dc == NULL) - return NULL; + return 0; + GetClientRect (win->hwnd, &(sdb->wr)); //This code ripped from W_Initialize, better safe than sorry junk = CreateBitmap (1, 1, 1, 1, NULL); GlobalOldMemDCBitmap = (HBITMAP) SelectObject (sdb->win_dc, junk); @@ -6028,15 +6008,59 @@ GlobalOldMemDC2Bitmap = (HBITMAP) SelectObject (sdb->mem_dc, junk); SelectObject (sdb->mem_dc, GlobalOldMemDC2Bitmap); DeleteObject (junk); - + sdb->mem_bmp = CreateCompatibleBitmap (sdb->win_dc, sdb->wr.right, sdb->wr.bottom); if (sdb->mem_bmp == NULL) - return NULL; + return 0; sdb->old_bmp = (HBITMAP) SelectObject (sdb->mem_dc, sdb->mem_bmp); FillRect (sdb->mem_dc, &sdb->wr, colortable[W_Black].brush); + return 1; +} + +// +// Deallocates and recreates the DCs associated with the SDBUFFER +// +void +W_UpdateSDB(W_Window window, SDBUFFER * sdb) +{ + Window * win = ((Window *)window); + HBITMAP origObj; + + origObj = SelectObject(sdb->mem_dc, sdb->old_bmp); + DeleteObject(sdb->mem_bmp); + DeleteObject(origObj); + ReleaseDC (((Window *)sdb->window)->hwnd, sdb->win_dc); + DeleteDC (sdb->mem_dc); + + (void) W_RecreateSDBDCs(window, sdb); +} + +SDBUFFER * +W_InitSDB (W_Window window) +{ + Window * win; + SDBUFFER * sdb; + + win = ((Window *)window); + + if (win->hwnd == NULL) + return NULL; + + if (strcmpi (win->name, "local") == 0) + win->sdb_flags = SDB_FLAG_LOCAL; + else if (strcmpi (win->name, "map") == 0) + win->sdb_flags = SDB_FLAG_MAP; + sdb = (SDBUFFER *) malloc (sizeof (SDBUFFER)); + sdb->window = (W_Window) malloc (sizeof (Window)); + + sdb->window = window; + + if (0 == W_RecreateSDBDCs(window, sdb)) + return NULL; + return sdb; } From modemhero at users.sourceforge.net Fri Apr 27 05:04:21 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 27 Apr 2007 10:04:21 +0000 Subject: [netrek-cvs] client/netrekxp/include proto.h,1.52,1.53 Message-ID: <20070427100431.71993B3EB@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs16:/tmp/cvs-serv25609/include Modified Files: proto.h Log Message: Rewrite of handling SDB initialization and update upon sizing window, contributed by ChronosWS. Index: proto.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/proto.h,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- proto.h 25 Apr 2007 06:50:42 -0000 1.52 +++ proto.h 27 Apr 2007 10:04:18 -0000 1.53 @@ -786,6 +786,7 @@ WPARAM wParam, LPARAM lParam); +void W_UpdateSDB (W_Window window, SDBUFFER * sdb); SDBUFFER * W_InitSDB (W_Window window); SDBUFFER * SDB_lookup (W_Window window); void W_Win2Mem (SDBUFFER * sdb); From modemhero at users.sourceforge.net Sat Apr 28 07:09:53 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 28 Apr 2007 12:09:53 +0000 Subject: [netrek-cvs] client/netrekxp/src cowmain.c, 1.33, 1.34 data.c, 1.89, 1.90 death.c, 1.18, 1.19 input.c, 1.37, 1.38 socket.c, 1.30, 1.31 Message-ID: <20070428121002.D1B45B3ED@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv1445/src Modified Files: cowmain.c data.c death.c input.c socket.c Log Message: Terminate() calls within the network thread were causing errors due to longjump() into the input thread. A new function, terminate2() deals with such cases. Instead of calling longjump() directly, the main thread is exited via W_TerminateWait() and ExitThread() calls, and a global error variable is used to pass the exit code to setjmp in cowmain.c This bit of code was previously used in death.c to handle jumping out of the network thread to the main thread upon being sent to the team select entry window. All terminate() calls in socket.c have been modified to use the appropriate version (terminate/terminate2) depending on if THREADED is defined. Index: input.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/input.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- input.c 23 Apr 2007 07:19:30 -0000 1.37 +++ input.c 28 Apr 2007 12:09:51 -0000 1.38 @@ -719,7 +719,7 @@ W_NextEvent (&event); ingame = 0; - longjmp (env, 0); + longjmp (env, globalerr); } /******************************************************************************/ Index: death.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/death.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- death.c 6 Apr 2007 06:46:31 -0000 1.18 +++ death.c 28 Apr 2007 12:09:51 -0000 1.19 @@ -246,15 +246,8 @@ longjmp (env, 0); #else - /* Threaded: when using threads, this thread has been spawned to handle network - I/O and so we cannot longjmp here, into another thread! Instead we call - W_TerminateWait which makes the main thead's W_WaitForEvent() return 0 - and exitthread */ - if (!playback) - { /* If we are not playing back a recorded game, do this */ - W_TerminateWait (); - ExitThread (0); - } + if (!playback) /* If we are not playing back a recorded game, do this */ + terminate2 (0); else { /* Otherwise we aren't within a thread, so... */ while (W_EventsPending ()) Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.89 retrieving revision 1.90 diff -u -d -r1.89 -r1.90 --- data.c 27 Apr 2007 07:15:28 -0000 1.89 +++ data.c 28 Apr 2007 12:09:51 -0000 1.90 @@ -35,6 +35,7 @@ int TWINSIDE = 500; /* Size of tactical window */ int GWINSIDE = 500; /* Size of galactic window */ +int globalerr = 0; /* For sending error # between threads */ int ingame = 0; /* If player is in game - to distinguish between whether to use double buffering on the local and map window */ int ghoststart = 0; /* is this a ghostbust Index: cowmain.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/cowmain.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- cowmain.c 19 Apr 2007 08:22:58 -0000 1.33 +++ cowmain.c 28 Apr 2007 12:09:51 -0000 1.34 @@ -42,7 +42,6 @@ int isFirstEntry; char defaulttmp[100]; -#define RETURNBASE 10 #ifdef PACKET_LOG extern int log_packets; #endif @@ -1101,3 +1100,21 @@ { longjmp (env, RETURNBASE + error); } + +#ifdef THREADED +/******************************************************************************/ +/*** terminate2() - for terminating inside the network thread ***/ +/******************************************************************************/ +void +terminate2 (int error) +{ + /* When using threads, a thread has been spawned to handle network + I/O and so we cannot longjmp into another thread! Instead we call + W_TerminateWait which makes the main thread's W_WaitForEvent() + return 0 and exitthread. We pass the desired error value + to longjmp in input() via globalerr. */ + globalerr = error; + W_TerminateWait (); + ExitThread (0); +} +#endif \ No newline at end of file Index: socket.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- socket.c 25 Apr 2007 06:50:43 -0000 1.30 +++ socket.c 28 Apr 2007 12:09:51 -0000 1.31 @@ -560,7 +560,11 @@ if ((s = socket (AF_INET, SOCK_STREAM, 0)) < 0) { LineToConsole ("I can't create a socket\n"); +#ifdef THREADED + terminate2 (RETURNBASE + 2); +#else terminate (2); +#endif } /* allow local address resuse */ @@ -577,9 +581,12 @@ if (bind (s, (struct sockaddr *) &addr, sizeof (addr)) < 0) { - perror ("bind"); /* NEW */ +#ifdef THREADED + terminate2 (RETURNBASE + 1); +#else terminate (1); +#endif } if (listen (s, 1) < 0) perror ("listen"); @@ -598,7 +605,11 @@ if (select (max_fd, &readfds, NULL, NULL, &timeout) == 0) { LineToConsole ("Well, I think the server died!\n"); +#ifdef THREADED + terminate2 (RETURNBASE); +#else terminate (0); +#endif } sock = accept (s, (struct sockaddr *) &naddr, &len); @@ -664,7 +675,11 @@ if ((s = socket (AF_INET, SOCK_STREAM, 0)) < 0) { LineToConsole ("I can't create a socket\n"); +#ifdef THREADED + terminate2 (RETURNBASE); +#else terminate (0); +#endif } addr.sin_family = AF_INET; addr.sin_port = htons ((u_short) port); @@ -674,7 +689,11 @@ if ((hp = gethostbyname (server)) == NULL) { LineToConsole ("Who is %s?\n", server); +#ifdef THREADED + terminate2 (RETURNBASE); +#else terminate (0); +#endif } else { @@ -686,7 +705,11 @@ if (connect (s, (struct sockaddr *) &addr, sizeof (addr)) < 0) { LineToConsole ("Server not listening!\n"); +#ifdef THREADED + terminate2 (RETURNBASE); +#else terminate (0); +#endif } LineToConsole ("Got connection.\n"); @@ -721,7 +744,11 @@ if (gwrite (s, &msg, sizeof (struct mesg_cpacket)) < 0) { LineToConsole ("trekhopd init failure\n"); +#ifdef THREADED + terminate2 (RETURNBASE + 1); +#else terminate (1); +#endif } LineToConsole ("--- trekhopd request sent, awaiting reply\n"); /* now block waiting for reply */ @@ -732,7 +759,11 @@ if ((n = recv (s, buf, count, 0)) <= 0) { perror ("trekhopd read"); +#ifdef THREADED + terminate2 (RETURNBASE + 1); +#else terminate (1); +#endif } } @@ -740,7 +771,11 @@ { LineToConsole ("Got bogus reply from trekhopd (%d)\n", reply.type); +#ifdef THREADED + terminate2 (RETURNBASE + 1); +#else terminate (1); +#endif } ip = (int *) reply.mesg; gw_serv_port = ntohl (*ip++); @@ -2177,7 +2212,11 @@ LineToConsole ("Unknown message from handleBadVersion.\n"); return; } +#ifdef THREADED + terminate2 (RETURNBASE + 1); +#else terminate (1); +#endif } long @@ -2563,7 +2602,11 @@ if (getpeername (sock, (struct sockaddr *) &saddr, &len) < 0) { perror ("getpeername(sock)"); +#ifdef THREADED + terminate2 (RETURNBASE + 1); +#else terminate (1); +#endif } } else @@ -2577,7 +2620,11 @@ if (getpeername (sock, (struct sockaddr *) &saddr, &len) < 0) { perror ("getpeername(sock)"); +#ifdef THREADED + terminate2 (RETURNBASE + 1); +#else terminate (1); +#endif } #endif @@ -2945,7 +2992,11 @@ if ((hp = gethostbyname (serverName)) == NULL) { LineToConsole ("Who is %s?\n", serverName); +#ifdef THREADED + terminate2 (RETURNBASE); +#else terminate (0); +#endif } else { From modemhero at users.sourceforge.net Sat Apr 28 07:09:52 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 28 Apr 2007 12:09:52 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.193, 1.194 Message-ID: <20070428121002.B70AFB3EB@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv1445/resources/docs Modified Files: changes.txt Log Message: Terminate() calls within the network thread were causing errors due to longjump() into the input thread. A new function, terminate2() deals with such cases. Instead of calling longjump() directly, the main thread is exited via W_TerminateWait() and ExitThread() calls, and a global error variable is used to pass the exit code to setjmp in cowmain.c This bit of code was previously used in death.c to handle jumping out of the network thread to the main thread upon being sent to the team select entry window. All terminate() calls in socket.c have been modified to use the appropriate version (terminate/terminate2) depending on if THREADED is defined. Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.193 retrieving revision 1.194 diff -u -d -r1.193 -r1.194 --- changes.txt 25 Apr 2007 07:21:44 -0000 1.193 +++ changes.txt 28 Apr 2007 12:09:50 -0000 1.194 @@ -117,6 +117,8 @@ 15) Fixed galactic and tactical planet names so they are centered on planets. 16) Phaser misses on sturgeon servers now show proper phaser length based on how many phaser upgrades the ship has. +17) Certain abnormal game terminations (such as caused by a server exiting +the daemon) will no longer crash the client, instead client will just exit New features: 1) Main window titlebar now shows your loginname and slot number, in addition From modemhero at users.sourceforge.net Sat Apr 28 07:09:52 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 28 Apr 2007 12:09:52 +0000 Subject: [netrek-cvs] client/netrekxp/include data.h, 1.82, 1.83 defs.h, 1.23, 1.24 proto.h, 1.53, 1.54 Message-ID: <20070428121002.B3E161867CE@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs16:/tmp/cvs-serv1445/include Modified Files: data.h defs.h proto.h Log Message: Terminate() calls within the network thread were causing errors due to longjump() into the input thread. A new function, terminate2() deals with such cases. Instead of calling longjump() directly, the main thread is exited via W_TerminateWait() and ExitThread() calls, and a global error variable is used to pass the exit code to setjmp in cowmain.c This bit of code was previously used in death.c to handle jumping out of the network thread to the main thread upon being sent to the team select entry window. All terminate() calls in socket.c have been modified to use the appropriate version (terminate/terminate2) depending on if THREADED is defined. Index: defs.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/defs.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- defs.h 13 Apr 2007 07:12:20 -0000 1.23 +++ defs.h 28 Apr 2007 12:09:50 -0000 1.24 @@ -8,6 +8,8 @@ #include "copyright.h" +/* Error handling */ +#define RETURNBASE 10 /* #$!@$#% length of address field of messages */ #define ADDRLEN 10 Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- data.h 25 Apr 2007 07:21:42 -0000 1.82 +++ data.h 28 Apr 2007 12:09:50 -0000 1.83 @@ -176,6 +176,7 @@ #endif +extern int globalerr; extern int ingame; /* If player is in game - to distinguish between whether to use double buffering on the local and map window */ extern int ghoststart; Index: proto.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/proto.h,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- proto.h 27 Apr 2007 10:04:18 -0000 1.53 +++ proto.h 28 Apr 2007 12:09:50 -0000 1.54 @@ -56,6 +56,9 @@ char *name); // static RETSIGTYPE handle_exception(int _dummy); void terminate (int error); +#ifdef THREADED +void terminate2 (int error); +#endif /******************************************************************************/ /*** dashboard.c ***/