Update of /cvsroot/netrek/client/netrekxp/include
In directory sc8-pr-cvs16:/tmp/cvs-serv8621/include
Modified Files:
data.h defs.h map.h struct.h
Log Message:
This patch adds the ability to resize local/map windows on the fly, and
fixes some of the problems that came up while doing this.
Added code to WM_EXITSIZEMOVE case in main windows proc, that
handles changing TWINSIDE/GWINSIDE, reinitializing things that need
it (such as SDB and star array), and changing critical window sizes that
need to be redone (team select windows, quit window - both based on
TWINSIDE).
Netrekrc option mainResizeable now allows local/map to be resized too,
giving these windows a WS_THICKFRAME border.
Variable redrawall and struct stars are now globally defined.
New defines to limit # of star sectors and # of stars in a sector.
Fixed a bunch of places where view was statically defined, as TWINSIDE
can now change during gameplay.
Fixed a few places where rounding errors were occuring due to
parentheses.
Moved initialization of mainResizeable and mainTitleBar into defaults.c
as defaults are now called before windows initialization.
Fixed a few mistakes in the free resources routine for SDB.
Index: defs.h
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/include/defs.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- defs.h 7 Apr 2007 05:17:38 -0000 1.20
+++ defs.h 9 Apr 2007 02:52:30 -0000 1.21
@@ -73,6 +73,9 @@
/* At this range a player can be
seen while visible (uncloaked) */
+#define MAXSECTORS 10 /* Max # of star sectors */
+#define MAXSTARS 100 /* Max # of stars in a sector */
+
/* 6 minutes is maximum for autoquit -- anything more causes problems in the
* server. (?) */
#define AUTOQUIT 9*60 /* auto logout in 5 minutes */
Index: data.h
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -d -r1.73 -r1.74
--- data.h 7 Apr 2007 05:17:38 -0000 1.73
+++ data.h 9 Apr 2007 02:52:30 -0000 1.74
@@ -47,6 +47,7 @@
extern struct ship shipvals[];
extern struct memory universe;
extern struct planet pdata[];
+extern struct _star stars[MAXSECTORS][MAXSECTORS][MAXSTARS];
/* These used to be defines ... */
extern int TWINSIDE;
@@ -636,6 +637,7 @@
DWORD InputThreadID;
// Missing global variables
+extern int redrawall; /* Erase and redraw the galactic? */
extern int autoQuit;
extern int forceDisplay;
Index: struct.h
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/include/struct.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- struct.h 4 Apr 2007 04:06:36 -0000 1.16
+++ struct.h 9 Apr 2007 02:52:30 -0000 1.17
@@ -7,6 +7,12 @@
#ifndef _h_struct
#define _h_struct
+/* Background Stars Definitions */
+struct _star {
+ int s_x, s_y;
+ int s_color;
+};
+
struct distress
{
unsigned char sender;
Index: map.h
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/include/map.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- map.h 21 Jan 2003 21:27:54 -0000 1.1.1.1
+++ map.h 9 Apr 2007 02:52:30 -0000 1.2
@@ -15,12 +15,10 @@
/*
* Global Variables:
*
- * redrawall -- Erase and redraw the galactic?
* redrawPlayer[] -- Flag for each player on whether their position
* on the galactic is not out of date.
*/
-extern int redrawall;
extern unsigned char redrawPlayer[];