Update of /cvsroot/netrek/client/netrekxp/include
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv20941/include

Modified Files:
	data.h proto.h struct.h wlib.h 
Log Message:
Rewrote doublebuffering to make it an rc option and not a #define - removes a lot of extra work in terms
of needing twice as many write bitmap functions (client had one for regular draw, and one for DB)
Added observer support to show repair/declare war flags on dashboard.  Observers can also
 now change lock if they are observing a transwarper (server side fix, but good to know).
Changed alert borders so they always redraw instead of on an alert change - was causing lots
of problems with bitmaps at edge of screen, as well as with double buffering
Readded the ability to see tractor/pressors if they go off screen (such as in the case of 
ATT tractors). 
Added "doubleBuffering: (on)/off" to control whether to draw with double buffering (it's
 recommended you do so if using the new planet and ship bitmaps).  Can be changed in game
 through the options menu.
Fixed the -c (report players on server) option so it doesn't crash the client
Readded the ability to autologin by using -C name -A password.  No more extra typing :).
Fixed a whole bunch of startup options (-C, -A, -h, -g, etc) that were crashing client if
not entered properly.  Also made it so it prints out option list on a misused option.
Bunch of other write bitmap function optimizations

Index: wlib.h
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/include/wlib.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- wlib.h	16 May 2006 05:10:13 -0000	1.6
+++ wlib.h	21 May 2006 09:56:38 -0000	1.7
@@ -126,14 +126,15 @@
 extern void W_WriteBitmap (int x,
                            int y,
                            W_Icon bit,
-                           W_Color color);
+                           W_Color color,
+                           W_Window window);
 extern void W_WriteScaleBitmap (int x,
                                 int y,
                                 int destwidth,
                                 int destheight,
                                 int srcwidth,
                                 int srcheight,
-                                unsigned char p_dir,
+                                int angle,
                                 W_Icon icon,
                                 W_Color color,
                                 W_Window window);
@@ -205,7 +206,8 @@
 extern void W_OverlayBitmap (int,
                              int,
                              W_Icon,
-                             W_Color);
+                             W_Color,
+                             W_Window);
 extern void W_OverlayScaleBitmap (int,
                                   int,
                                   int,

Index: data.h
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- data.h	20 May 2006 17:09:39 -0000	1.18
+++ data.h	21 May 2006 09:56:38 -0000	1.19
@@ -151,6 +151,8 @@
 
 #endif
 
+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;
 extern int ghost_pno;
 extern int keepInfo;
@@ -631,10 +633,10 @@
 
 extern struct stringlist * defaults; /* pointer to defaults list */
 
-#ifdef DOUBLE_BUFFERING
 extern SDBUFFER * localSDB;    /* double buffer for local window */
 extern SDBUFFER * mapSDB;      /* double buffer for map window */
-#endif
+
+extern int doubleBuffering; /* Use double buffering to draw map/local */
 
 extern int disableWinkey;   /* disable WinKey + ContextKey during the game */
 

Index: struct.h
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/include/struct.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- struct.h	18 May 2006 07:15:35 -0000	1.8
+++ struct.h	21 May 2006 09:56:38 -0000	1.9
@@ -667,7 +667,6 @@
     struct stringlist *next;
 };
 
-#ifdef DOUBLE_BUFFERING
 typedef struct _sdbuffer
 {
     W_Window window;    /* window for current buffer */
@@ -677,7 +676,6 @@
     HBITMAP mem_bmp;    /* memory to handle bitmap */
     HBITMAP old_bmp;    /* saved bitmap */
 }SDBUFFER;
-#endif
 
 // Linked list for console buffer
 struct cons_buffer

Index: proto.h
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/include/proto.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- proto.h	20 May 2006 17:09:39 -0000	1.19
+++ proto.h	21 May 2006 09:56:38 -0000	1.20
@@ -447,8 +447,8 @@
 void initPlanets (void);
 //inline static void checkRedraw(int x, int y);
 extern inline W_Icon planetBitmapC(register struct planet * p);
-extern inline void planetResourcesC (SDBUFFER * sdb, register struct planet *p,
-                                     int destwidth, int destheight, int dx, int dy, W_Window window);
+extern inline void planetResourcesC (register struct planet *p, int destwidth,
+                                     int destheight, int dx, int dy, W_Window window);
 //static void DrawPlanets();
 void map (void);
 
@@ -629,21 +629,23 @@
 void W_WriteBitmap (int x,
                     int y,
                     W_Icon icon,
-                    W_Color color);
+                    W_Color color,
+                    W_Window window);
 void W_WriteScaleBitmap (int x,
                          int y,
                          int destwidth,
                          int destheight,
                          int srcwidth,
                          int srcheight,
-                         unsigned char p_dir,
+                         int angle,
                          W_Icon icon,
                          W_Color color,
                          W_Window window);
 void W_WriteBitmapGrey (int x,
                         int y,
                         W_Icon icon,
-                        W_Color color);
+                        W_Color color,
+                        W_Window window);
 void W_TileWindow (W_Window window,
                    W_Icon icon);
 void W_UnTileWindow (W_Window window);
@@ -717,7 +719,8 @@
 void W_OverlayBitmap (int x,
                       int y,
                       W_Icon icon,
-                      W_Color color);
+                      W_Color color,
+                      W_Window window);
 void W_OverlayScaleBitmap (int x,
                            int y,
                            int destwidth,
@@ -755,36 +758,11 @@
                                   UINT msg,
                                   WPARAM wParam,
                                   LPARAM lParam);
-#ifdef DOUBLE_BUFFERING
+
 SDBUFFER * W_InitSDB (W_Window window);
+SDBUFFER * SDB_lookup (W_Window window);
 void W_Win2Mem (SDBUFFER * sdb);
 void W_Mem2Win (SDBUFFER * sdb);
-void W_ChangeBorderDB (SDBUFFER * sdb, W_Color color);
-void W_FillAreaDB (SDBUFFER * sdb, int x, int y, int width, int height, int color);
-void W_ClearAreaDB (SDBUFFER * sdb, int x, int y, int width, int height);
-void W_CacheClearAreaDB (SDBUFFER * sdb, int x, int y, int width, int height);
-void W_ClearAreasDB (SDBUFFER * sdb, int *xs, int *ys, int *widths, int *heights, int num);
-void W_ClearWindowDB (SDBUFFER * sdb);
-void W_MakeLineDB (SDBUFFER * sdb, int x0, int y0, int x1, int y1, W_Color color);
-void W_CacheLineDB (SDBUFFER * sdb, int x0, int y0, int x1, int y1, W_Color color);
-void W_MakePointDB (SDBUFFER * sdb, int x0, int y0, W_Color color);
-void W_CachePointDB (SDBUFFER * sdb, int x0, int y0, W_Color color);
-void W_MakeLinesDB (SDBUFFER * sdb, int *x0, int *y0, int *x1, int *y1, int num, W_Color color);
-void W_MakeTractLineDB (SDBUFFER * sdb, int x0, int y0, int x1, int y1, W_Color color);
-void W_MakePhaserLineDB (SDBUFFER * sdb, int x0, int y0, int x1, int y1, W_Color color);
-void W_WriteTriangleDB (SDBUFFER * sdb, int x, int y, int s, int t, W_Color color);
-void W_WriteTextDB (SDBUFFER * sdb, int x, int y, W_Color color, char *str, int len, W_Font font);
-void W_MaskTextDB (SDBUFFER * sdb, int x, int y, W_Color color, char *str, int len, W_Font font);
-void W_WriteBitmapDB (SDBUFFER * sdb, int x, int y, W_Icon icon, W_Color color);
-void W_WriteScaleBitmapDB (SDBUFFER * sdb, int x, int y, int destwidth, int destheight,
-                           int srcwidth, int srcheight, unsigned char p_dir, W_Icon icon,
-                           W_Color color, W_Window window);
-void W_WriteBitmapGreyDB (SDBUFFER * sdb, int x, int y, W_Icon icon, W_Color color);
-void W_OverlayBitmapDB (SDBUFFER * sdb, int x, int y, W_Icon icon, W_Color color);
-void W_OverlayScaleBitmapDB (SDBUFFER * sdb, int x, int y, int destwidth, int destheight,
-                             int srcwidth, int srcheight, int angle,
-                             W_Icon icon, W_Color color, W_Window window);
-#endif
 
 /******************************************************************************/
 /***  newwin.c