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

Modified Files:
	bitmaps.h data.h defs.h proto.h struct.h wlib.h 
Log Message:
New planet bitmaps!  Using Defcom's art.  Changeable via planets menu.
New netrekrc option, "planetBitmapGalaxy: (0-3)", same options as planetBitmap, but now you have
the choice to change map display planets too!  And have map and local planets use different
bitmap sets
Fixed bug where map window border wasn't being redrawn on death
Shortpackets is now off by default.  In the current state of internet connectivity, most people
 don't need the reduced packets, which don't send complete information and break certain features
 such as which direction other players are moving, robot shields, observer geno messages,
 shield/cloak status for warp 0 players, etc.
Fix to problem with bottom and right borders in certain windows (like map) getting overwritten - thanks Stas!
Client now recognizes planets that are flagged as "core", waiting on server patch to
actually get this information and do something with it

Index: bitmaps.h
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/include/bitmaps.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- bitmaps.h	2 May 2006 00:55:52 -0000	1.7
+++ bitmaps.h	14 May 2006 02:14:54 -0000	1.8
@@ -129,3 +129,27 @@
 
 #define PLANET_VIEWS 9
 #define MPLANET_VIEWS 9
+
+// Color planets
+
+// Homeworlds
+#define BMP_EARTH 1
+#define BMP_ROMULUS 2
+#define BMP_ORION 3
+#define BMP_KLINGUS 4
+
+// Agris
+#define BMP_AGRI1 5
+#define BMP_AGRI2 6
+
+// Regular planets
+#define BMP_ROCK1 7
+#define BMP_ROCK2 8
+
+// Untouched planet
+#define BMP_PLANET_UNKNOWN 9
+
+#define BMP_CPLANET_WIDTH 120
+#define BMP_CPLANET_HEIGHT 120
+
+

Index: defs.h
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/include/defs.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- defs.h	29 Apr 2006 19:22:38 -0000	1.6
+++ defs.h	14 May 2006 02:14:54 -0000	1.7
@@ -124,10 +124,10 @@
 #define ROM 0x2
 #define KLI 0x4
 #define ORI 0x8
-#define IND 0x16
-#define ALLTEAM (FED|ROM|KLI|ORI|IND)
-#define MAXTEAM (IND)
-#define NUMTEAM 5
+#define ALLTEAM (FED|ROM|KLI|ORI)
+#define MAXTEAM (ORI)
+#define NUMTEAM 4               /* Used for player list */
+#define NUMTEAMS 5              /* Used for planet bitmap storage */
 /* * These are random configuration variables */
 #define VICTORY 3               /* Number of systems needed
                                  * to conquer the galaxy */

Index: struct.h
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/include/struct.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- struct.h	7 May 2006 16:59:26 -0000	1.6
+++ struct.h	14 May 2006 02:14:54 -0000	1.7
@@ -379,9 +379,10 @@
 #define PLCOUP 0x200            /* Coup has occured */
 #define PLCHEAP 0x400           /* Planet was taken from
                                  * undefended team */
+#define PLCORE 0x800		/* A core world planet */
 
 #ifdef BRMH
-#define PLCLEAR 0x800
+#define PLCLEAR 0x1000
 #endif
 
 struct planet

Index: proto.h
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/include/proto.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- proto.h	7 May 2006 16:59:26 -0000	1.13
+++ proto.h	14 May 2006 02:14:54 -0000	1.14
@@ -443,7 +443,7 @@
 /******************************************************************************/
 void initPlanets (void);
 //inline static void checkRedraw(int x, int y);
-//inline static W_Icon planetmBitmap(register struct planet * p);
+extern inline W_Icon planetBitmapC(register struct planet * p);
 //static void DrawPlanets();
 void map (void);
 
@@ -627,11 +627,14 @@
                     W_Color color);
 void W_WriteScaleBitmap (int x,
                          int y,
-                         float SCALEX,
-                         float SCALEY,
+                         int destwidth,
+                         int destheight,
+                         int srcwidth,
+                         int srcheight,
                          unsigned char p_dir,
                          W_Icon icon,
-                         W_Color color);
+                         W_Color color,
+                         W_Window window);
 void W_WriteBitmapGrey (int x,
                         int y,
                         W_Icon icon,
@@ -710,6 +713,15 @@
                       int y,
                       W_Icon icon,
                       W_Color color);
+void W_OverlayScaleBitmap (int x,
+                           int y,
+                           int destwidth,
+                           int destheight,
+                           int srcwidth,
+                           int srcheight,
+                           W_Icon icon,
+                           W_Color color,
+                           W_Window window);
 void W_EraseTTSText  (W_Window window,
 		      int last_tts_xpos,
 		      int tts_ypos,
@@ -758,10 +770,13 @@
 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, float SCALEX, float SCALEY,
-                           unsigned char p_dir, 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, W_Icon icon, W_Color color, W_Window window);
 #endif
 
 /******************************************************************************/

Index: wlib.h
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/include/wlib.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- wlib.h	6 May 2006 05:40:00 -0000	1.4
+++ wlib.h	14 May 2006 02:14:54 -0000	1.5
@@ -129,11 +129,14 @@
                            W_Color color);
 extern void W_WriteScaleBitmap (int x,
                                 int y,
-                                float SCALEX,
-                                float SCALEY,
+                                int destwidth,
+                                int destheight,
+                                int srcwidth,
+                                int srcheight,
                                 unsigned char p_dir,
                                 W_Icon icon,
-                                W_Color color);
+                                W_Color color,
+                                W_Window window);
 extern void W_ClearArea (W_Window window,
                          int x,
                          int y,
@@ -203,6 +206,15 @@
                              int,
                              W_Icon,
                              W_Color);
+extern void W_OverlayScaleBitmap (int,
+                                  int,
+                                  int,
+                                  int,
+                                  int,
+                                  int,
+                                  W_Icon,
+                                  W_Color,
+                                  W_Window);
 extern void W_WriteTriangle (W_Window,
                              int,
                              int,

Index: data.h
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- data.h	7 May 2006 16:59:26 -0000	1.13
+++ data.h	14 May 2006 02:14:54 -0000	1.14
@@ -219,6 +219,7 @@
 extern int showAllTractorPressor;
 extern int showLock;
 extern int planetBitmap;
+extern int planetBitmapGalaxy;
 extern int logging;
 extern int continueTractor;
 extern int tcounter;
@@ -300,7 +301,13 @@
 extern W_Icon fed_bitmapsHR[NUM_TYPES],
     kli_bitmapsHR[NUM_TYPES], rom_bitmapsHR[NUM_TYPES],
     ori_bitmapsHR[NUM_TYPES], ind_bitmapsHR[NUM_TYPES];
-    
+
+// Planets
+extern W_Icon planet_unknown;
+extern W_Icon planet_bitmaps[8];
+extern W_Icon planet_earth[NUMTEAMS], planet_klingus[NUMTEAMS], planet_orion[NUMTEAMS],
+    planet_romulus[NUMTEAMS], planet_agri1[NUMTEAMS], planet_agri2[NUMTEAMS],
+    planet_rock1[NUMTEAMS], planet_rock2[NUMTEAMS];
 extern W_Icon base_planets;
 extern W_Icon base_mplanets;
 extern W_Icon bplanets[PLANET_VIEWS];