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 @@
|
) 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 |
+
+
+ |
+
+
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 |
+
+
+ |
+
+
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 |
+
+
+ |
+
+
+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 |
+
+
+ |
+
+
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. |
+
+
+ |
+
+
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 ***/
|