Update of /cvsroot/netrek/client/netrekxp/src
In directory sc8-pr-cvs16:/tmp/cvs-serv25761/src

Modified Files:
	dashboard.c dashboard3.c data.c defaults.c enter.c helpwin.c 
	inform.c input.c local.c map.c mswindow.c newwin.c option.c 
	planetlist.c playerlist.c socket.c warning.c 
Log Message:
Paradise changes:
New folder in resources tree named paradise which contains all paradise
related bitmaps.
Added support for paradise shipyard graphics, stars, ships (mono and color),
and missiles,
Added several parallel defines to deal with the problem of overlapping defines
(ie PFOBSERV overlap with PFWARP).  Also things like planet graphics
having more bitmap frames due to shipyards.  It moves bronco and paradise
compatability further apart, but only by keeping them separate can I attempt
to get this to work, there's just too many conflicts to try to resolve.
Moved flagship (frigate?) to overlap with galaxy class in array of ship types,
seems best solution (overlap with AT was previous way).  GA and FL/FR
seem to be identical on the pserver.
Added new keys for engage warp (J), toggle warp (^j) and afterburners (.).
Apparently the bronco way of setting maxwarp (speed req to speed 99) is
the paradise way of requesting to engage warp, so that had to be switched
around a bit.
As for changes that effect bronco:
1) Added new dashboard message types for paradise, caused renumbering
of internal counter for impulse/stopped but this doesn't matter.
2) Found bug with plasma and torp fuses (mono) where the final frame was
not being drawn due to logic error regarding fuses.
3) Added check during receiving login packet, if the proper pad bits are
not set right, it will close client.  So running netrek.exe, you can't connect
to a paradise server.  Running paradise.exe, you can't connect to a 
bronco server.  Ideally would send user a popup box but ran into issue
with that, it was continually polling the password entry screen so that
popup box got sent behind the (now-frozen) netrek window.  Could use
some work, to close client properly AND send a popup box explaining
why.

Index: mswindow.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- mswindow.c	17 May 2007 08:49:49 -0000	1.83
+++ mswindow.c	18 May 2007 19:54:38 -0000	1.84
@@ -578,6 +578,35 @@
     free (genopic);
     free (genopic2);
 
+#ifdef PARADISE
+    free (drone_bitmap);
+    free (dronec_bitmap);
+    free (mdronec_bitmap);
+    free (base_drone_explosion_bitmap);
+    for (i = 0; i < BMP_DRONEDET_FRAMES; i++)
+        free (drone_explosion_bitmap[i]);
+    free (base_dronec_explosion_bitmap);
+    for (i = 0; i < BMP_DRONEDET_FRAMES; i++)
+        free (dronec_explosion_bitmap[i]);
+    free (gear_bitmap);
+    free (mgear_bitmap);
+    free (base_star_bitmap);
+    for (i = 0; i < STAR_VIEWS; i++)
+        free (star_bitmap[i]);
+    free (star_mbitmap);
+    free (paradise_ship_bitmaps);
+    free (paradise_cship_self_bitmaps);
+    free (paradise_cship_bitmaps);
+    for (j = 0; j < NUM_PSHIP_TYPES; j++)
+    {
+        for (i = 0; i < NUMTEAMS; i++)
+        {
+            free (paradise_ships[j][i]);
+            free (paradise_cships_self[j][i]);
+            free (paradise_cships[j][i]);
+        }
+    }
+#endif
     //Remove default objects
     while (defaults)
     {

Index: dashboard.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/dashboard.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- dashboard.c	13 Apr 2007 11:07:29 -0000	1.22
+++ dashboard.c	18 May 2007 19:54:36 -0000	1.23
@@ -460,18 +460,50 @@
         msgtype = 4;
         color = W_White;
     }
+#ifdef PARADISE
+    /* Transwarp text */
+    else if (me->p_flags & PFWARP)
+    {
+        sprintf (buf, "Warp");
+        msgtype = 5;
+        color = W_White;
+    }
+    /* Afterburners */
+    else if (me->p_flags & PFAFTER)
+    {
+        sprintf (buf, "Aftrbrn");
+        msgtype = 6;
+        color = W_Red;
+    }
+    /* Warp preparation */
+    else if (me->p_flags & PFWARPPREP)
+    {
+        if (me->p_flags & PFWPSUSPENDED)
+        {
+            sprintf (buf, "WrpPaus");
+            msgtype = 7;
+            color = W_Cyan;
+        }
+        else
+        {
+            sprintf (buf, "WrpPrep");
+            msgtype = 8;
+            color = W_Cyan;
+        }
+    }
+#endif
     /* Ship stopped */
     else if (me->p_speed == 0)
     {
         sprintf (buf, "Stopped");
-        msgtype = 5;
+        msgtype = 9;
         color = W_Grey;
     }
     /* Default impulse text */
     else
     {
         sprintf (buf, "Impulse");
-        msgtype = 6;
+        msgtype = 10;
         color = W_Yellow;
     }
 
@@ -524,6 +556,11 @@
 {
     static float old_kills = -1.0;
     static int old_torp = -1;
+#ifdef PARADISE
+    int i = 0;
+    static int old_drone = -1;
+    static int old_totmissiles = -1;
+#endif
     static unsigned int old_flags = (unsigned int) -1;
     static int old_tourn = 0;
     register int BAR_LENGTH = W_Textwidth/3 + 9 * W_Textwidth;
@@ -637,6 +674,30 @@
         }
         old_torp = plr->p_ntorp;
     }
+#ifdef PARADISE
+    /* code to show the number of drones out */
+    strcpy(buf, "Miss: ");
+    if (fr || plr->p_totmissiles != old_totmissiles || plr->p_ndrone != old_drone)
+    {
+	if (plr->p_totmissiles > 0)
+	    sprintf(buf + strlen(buf), "L%d ", plr->p_totmissiles);
+	old_totmissiles = me->p_totmissiles;
+	if (plr->p_ndrone > 0)
+	    sprintf(buf + strlen(buf), "O%d", plr->p_ndrone);
+	old_drone = plr->p_ndrone;
+	if (!plr->p_totmissiles && !plr->p_ndrone)	/* clear missile text */
+	    W_ClearArea(tstatw, 199 * W_Textwidth / 3, 3 + 2 * (W_Textheight + SPACING), 13 * W_Textwidth, W_Textheight);
+	else
+	{
+	    for (i = strlen(buf); i < 14; i++)
+	    {
+	        buf[i] = ' ';
+	        buf[14] = 0;
+	    }
+	    W_WriteText(tstatw, 199 * W_Textwidth / 3, 3 + 2 * (W_Textheight + SPACING), textColor, buf, 14, W_RegularFont);
+	}
+    }
+#endif
 }
 
 

Index: map.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- map.c	17 May 2007 08:49:49 -0000	1.56
+++ map.c	18 May 2007 19:54:38 -0000	1.57
@@ -344,6 +344,16 @@
             i += 2;
         if (p->pl_flags & PLFUEL)
             i += 1;
+#ifdef PARADISE
+        if (p->pl_flags & PLSHIPYARD)
+        {
+             i = 9; /* Base for shipyards */
+             if (p->pl_flags & PLFUEL)
+                 i += 1;
+             if (p->pl_armies > 4)
+                 i += 2;
+        }
+#endif
         return bmplanets[i];
     }
     else
@@ -469,6 +479,18 @@
                                0,
                                mwrench_bitmap, planetColor(p),
                                window);
+#ifdef PARADISE
+        if (p->pl_flags & PLSHIPYARD)
+            W_WriteScaleBitmap(dx + destwidth,
+                               dy - destheight/3 - 1,
+                               destwidth/3 + 1,
+                               destheight/3 + 1,
+                               BMP_GEAR_WIDTH,
+                               BMP_GEAR_HEIGHT,
+                               0,
+                               mgear_bitmap, planetColor(p),
+                               window);
+#endif
         if (p->pl_flags & PLFUEL)
             W_WriteScaleBitmap(dx + destwidth,
                                dy,
@@ -531,6 +553,11 @@
                 sendPlanetsPacket(l->pl_no);
         }
 
+#ifdef PARADISE
+        /* Stars need to be refreshed often... */
+        if (PL_TYPE(*l) == PLSTAR)
+            l->pl_flags |= PLREDRAW;
+#endif
         if (!(l->pl_flags & PLREDRAW))
             continue;
 
@@ -550,7 +577,15 @@
 
             odx = pl_update[l->pl_no].plu_x * GWINSIDE / GWIDTH;
             ody = pl_update[l->pl_no].plu_y * GWINSIDE / GWIDTH;
-
+#ifdef PARADISE
+            if (PL_TYPE(*l) == PLSTAR)
+                W_ClearArea (mapw, dx - ( BMP_MSTAR_WIDTH / 2),
+                             dy - ( BMP_MSTAR_HEIGHT / 2),
+                             BMP_MSTAR_WIDTH,
+                             BMP_MSTAR_HEIGHT);
+            else
+            {
+#endif
             /* XFIX */
             if (planetBitmapGalaxy == 3)
                 W_ClearArea (mapw, odx - (5 * BMP_MPLANET_WIDTH / 6) - 1,
@@ -566,11 +601,22 @@
                          ody + (BMP_MPLANET_HEIGHT / 2),
                          backColor, l->pl_name, 3, planetFont (l));
             pl_update[l->pl_no].plu_update = 0;
+#ifdef PARADISE
+            }
+#endif
         }
         else
         {
             /* Clear the planet normally */
-
+#ifdef PARADISE
+            if (PL_TYPE(*l) == PLSTAR)
+                W_ClearArea (mapw, dx - ( BMP_MSTAR_WIDTH / 2),
+                             dy - ( BMP_MSTAR_HEIGHT / 2),
+                             BMP_MSTAR_WIDTH,
+                             BMP_MSTAR_HEIGHT);
+            else
+            {
+#endif
             /* XFIX */
             if (planetBitmapGalaxy == 3)
                 W_ClearArea (mapw, dx - (5 * BMP_MPLANET_WIDTH / 6) - 1,
@@ -584,16 +630,19 @@
                              dy - (BMP_MPLANET_HEIGHT / 2 + 4),
                              BMP_MPLANET_WIDTH + 8,
                              BMP_MPLANET_HEIGHT + 8);
+#ifdef PARADISE
+            }
+#endif
         }
 
 
         /* Draw the new planet */
 #ifdef PARADISE
         if (PL_TYPE(*l) == PLSTAR)
-            W_WriteScaleBitmap (dx - (BMP_MSTAR_WIDTH / 2) * SCALE / scaleFactor,
-                                dy - (BMP_MSTAR_HEIGHT / 2) * SCALE / scaleFactor,
-                                BMP_MSTAR_WIDTH * SCALE / scaleFactor,
-                                BMP_MSTAR_HEIGHT * SCALE / scaleFactor,
+            W_OverlayScaleBitmap (dx - (BMP_MSTAR_WIDTH / 2),
+                                dy - (BMP_MSTAR_HEIGHT / 2),
+                                BMP_MSTAR_WIDTH,
+                                BMP_MSTAR_HEIGHT,
                                 BMP_MSTAR_WIDTH,
                                 BMP_MSTAR_HEIGHT,
                                 0,
@@ -1304,6 +1353,9 @@
         register struct phaser *ph;
         register struct torp *k;
         register struct plasmatorp *pt;
+#ifdef PARADISE
+        register struct thingy *th;
+#endif
         int tx, ty;
 
         for (i = 0, j = &players[i]; i < MAXPLAYER; i++, j++)
@@ -1388,7 +1440,11 @@
                 checkRedraw(tx * (GWIDTH / GWINSIDE), ty * (GWIDTH / GWINSIDE));
             }
 
-            if (!j->p_ntorp && !j->p_nplasmatorp)
+            if (!j->p_ntorp && !j->p_nplasmatorp
+#ifdef PARADISE
+                && !j->p_ndrone
+#endif
+            )
                 continue;
 
             /* torps */
@@ -1506,6 +1562,29 @@
                 /* Check for overwriting planets */
                 checkRedraw(pt->pt_x, pt->pt_y);
             }
+#ifdef PARADISE
+            /* missiles */
+            for (h = i * npthingies, th = &thingies[i * npthingies]; h < npthingies * (i + 1); h++, th++)
+            {
+                if (th->t_x < 0 || th->t_y < 0)
+                    continue;
+
+                dx = th->t_x * GWINSIDE / GWIDTH;
+                dy = th->t_y * GWINSIDE / GWIDTH;
+
+                /* Draw missile as a 2x2 pixel torp */
+                W_MakeLine(mapw, dx, dy, dx + 1, dy, torpColor (th));
+                W_MakeLine(mapw, dx, dy + 1, dx + 1, dy + 1, torpColor (th));
+                mcleararea[0][mclearacount] = dx;
+                mcleararea[1][mclearacount] = dy;
+                mcleararea[2][mclearacount] = 2;
+                mcleararea[3][mclearacount] = 2;
+                mclearacount++;
+
+                /* Check for overwriting planets */
+                checkRedraw(k->t_x, k->t_y);
+            }
+#endif
         }
     }
     /* Reset weapon update marker */

Index: newwin.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/newwin.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- newwin.c	17 May 2007 08:49:49 -0000	1.64
+++ newwin.c	18 May 2007 19:54:38 -0000	1.65
@@ -458,18 +458,15 @@
 {
     int j, k;
                         
-    if ( access("bitmaps/shiplib/paradise_ships.bmp", R_OK) == 0 )
-    {
-        paradise_ship_bitmaps =
-            W_StoreBitmap3 ("bitmaps/shiplib/paradise_ships.bmp", BMP_SHIP_WIDTH * NUM_PSHIP_TYPES,
-                            BMP_SHIP_HEIGHT * NUMTEAMS, BMP_PSHIP, w, LR_MONOCHROME);
-    }
-    else  // No paradise ship bitmaps, doh!
-    {
-        LineToConsole("Failed to load paradise bitmaps, defaulting to cruiser for all ships.\n");
-        noParadiseBitmaps = 1;
-        return;
-    }
+    paradise_ship_bitmaps =
+        W_StoreBitmap3 ("bitmaps/paradise/paradise_ships.bmp", BMP_SHIP_WIDTH * NUM_PSHIP_TYPES,
+                        BMP_SHIP_HEIGHT * NUMTEAMS, BMP_PSHIP, w, LR_MONOCHROME);
+    paradise_cship_self_bitmaps =
+        W_StoreBitmap3 ("bitmaps/paradise/paradise_cships_self.bmp", BMP_SHIP_WIDTH * NUM_PSHIP_TYPES,
+                        BMP_SHIP_HEIGHT * NUMTEAMS, BMP_PSHIP, w, LR_DEFAULTCOLOR);
+    paradise_cship_bitmaps =
+        W_StoreBitmap3 ("bitmaps/paradise/paradise_cships.bmp", BMP_SHIP_WIDTH * NUM_PSHIP_TYPES,
+                        BMP_SHIP_HEIGHT * NUMTEAMS, BMP_PSHIP, w, LR_DEFAULTCOLOR);
 
     for (j = 0; j < NUM_PSHIP_TYPES; j++)
     {
@@ -478,9 +475,62 @@
             paradise_ships[j][k] =
                 W_PointBitmap2 (paradise_ship_bitmaps, j, k, BMP_SHIP_WIDTH,
                                     BMP_SHIP_HEIGHT);
+            paradise_cships_self[j][k] =
+                W_PointBitmap2 (paradise_cship_self_bitmaps, j, k, BMP_SHIP_WIDTH,
+                                    BMP_SHIP_HEIGHT);
+            paradise_cships[j][k] =
+                W_PointBitmap2 (paradise_cship_bitmaps, j, k, BMP_SHIP_WIDTH,
+                                    BMP_SHIP_HEIGHT);
         }
     }
 }
+
+/******************************************************************************/
+/***  loadparadisethings() - misc paradise art like stars, wormholes, etc
+/******************************************************************************/
+void loadparadisethings (void)
+{
+    int i;
+
+    base_star_bitmap =
+        W_StoreBitmap3 ("bitmaps/paradise/star.bmp", BMP_STAR_WIDTH,
+                        BMP_STAR_HEIGHT * STAR_VIEWS, BMP_STAR, w,
+                        LR_DEFAULTCOLOR);
+    for (i = 0; i < STAR_VIEWS; i++)
+        star_bitmap[i] =
+            W_PointBitmap2 (base_star_bitmap, 0, i, BMP_STAR_WIDTH, BMP_STAR_HEIGHT);
+
+    star_mbitmap =
+        W_StoreBitmap3 ("bitmaps/paradise/starm.bmp", BMP_MSTAR_WIDTH,
+                        BMP_MSTAR_HEIGHT, BMP_MSTAR, mapw,
+                        LR_DEFAULTCOLOR);
+
+    drone_bitmap =
+        W_StoreBitmap3 ("bitmaps/paradise/drone.bmp", BMP_DRONE_WIDTH,
+                        BMP_DRONE_HEIGHT, BMP_DRONE, w, LR_MONOCHROME);
+    dronec_bitmap =
+        W_StoreBitmap3 ("bitmaps/paradise/droneC.bmp", BMP_DRONE_WIDTH,
+                        BMP_DRONE_HEIGHT, BMP_DRONEC, w, LR_DEFAULTCOLOR);
+    mdronec_bitmap =
+        W_StoreBitmap3 ("bitmaps/paradise/mdroneC.bmp", BMP_DRONE_WIDTH,
+                        BMP_DRONE_HEIGHT, BMP_MDRONEC, w, LR_DEFAULTCOLOR);
+
+    base_drone_explosion_bitmap =
+        W_StoreBitmap3 ("bitmaps/paradise/dronecloud.bmp", BMP_DRONEDET_WIDTH,
+                        BMP_DRONEDET_HEIGHT * BMP_DRONEDET_FRAMES, BMP_DRONECLOUD, w,
+                        LR_MONOCHROME);
+    for (i = 0; i < BMP_DRONEDET_FRAMES; i++)
+        drone_explosion_bitmap[i] =
+            W_PointBitmap2 (base_drone_explosion_bitmap, 0, i, BMP_DRONEDET_WIDTH, BMP_DRONEDET_HEIGHT);
+
+    base_dronec_explosion_bitmap =
+        W_StoreBitmap3 ("bitmaps/paradise/dronecloudC.bmp", BMP_DRONEDET_WIDTH,
+                        BMP_DRONEDET_HEIGHT * BMP_DRONEDET_FRAMES, BMP_DRONECLOUD, w,
+                        LR_DEFAULTCOLOR);
+    for (i = 0; i < BMP_DRONEDET_FRAMES; i++)
+        dronec_explosion_bitmap[i] =
+            W_PointBitmap2 (base_dronec_explosion_bitmap, 0, i, BMP_DRONEDET_WIDTH, BMP_DRONEDET_HEIGHT);
+}
 #endif
 
 /******************************************************************************/
@@ -723,6 +773,12 @@
         W_StoreBitmap3 ("bitmaps/planlibm/color/wrench.bmp",
                         BMP_WRENCH_WIDTH, BMP_WRENCH_HEIGHT, BMP_WRENCHBMP, w,
                         LR_DEFAULTCOLOR);
+#ifdef PARADISE
+    gear_bitmap =
+        W_StoreBitmap3 ("bitmaps/paradise/gear.bmp",
+                        BMP_GEAR_WIDTH, BMP_GEAR_HEIGHT, BMP_GEARBMP, w,
+                        LR_DEFAULTCOLOR);
+#endif
     fuel_bitmap =
         W_StoreBitmap3 ("bitmaps/planlibm/color/fuel.bmp",
                         BMP_FUEL_WIDTH, BMP_FUEL_HEIGHT, BMP_FUELBMP, w,
@@ -815,35 +871,18 @@
         W_StoreBitmap3 ("bitmaps/planlibm/color/wrench.bmp",
                         BMP_WRENCH_WIDTH, BMP_WRENCH_HEIGHT, BMP_WRENCHBMP, mapw,
                         LR_DEFAULTCOLOR);
+#ifdef PARADISE
+   mgear_bitmap =
+        W_StoreBitmap3 ("bitmaps/paradise/gear.bmp",
+                        BMP_GEAR_WIDTH, BMP_GEAR_HEIGHT, BMP_GEARBMP, w,
+                        LR_DEFAULTCOLOR);
+#endif
     mfuel_bitmap =
         W_StoreBitmap3 ("bitmaps/planlibm/color/fuel.bmp",
                         BMP_FUEL_WIDTH, BMP_FUEL_HEIGHT, BMP_FUELBMP, mapw,
                         LR_DEFAULTCOLOR);
 }
 
-#ifdef PARADISE
-/******************************************************************************/
-/***  loadparadisethings() - misc paradise art like stars, wormholes, etc
-/******************************************************************************/
-void loadparadisethings (void)
-{
-    int i;
-
-    base_star_bitmap =
-        W_StoreBitmap3 ("bitmaps/misclib/color/star.bmp", BMP_STAR_WIDTH,
-                        BMP_STAR_HEIGHT * STAR_VIEWS, BMP_STAR, w,
-                        LR_DEFAULTCOLOR);
-    for (i = 0; i < STAR_VIEWS; i++)
-        star_bitmap[i] =
-            W_PointBitmap2 (base_star_bitmap, 0, i, BMP_STAR_WIDTH, BMP_STAR_HEIGHT);
-
-    star_mbitmap =
-        W_StoreBitmap3 ("bitmaps/misclib/color/starm.bmp", BMP_MSTAR_WIDTH,
-                        BMP_MSTAR_HEIGHT, BMP_MSTAR, mapw,
-                        LR_DEFAULTCOLOR);
-}
-#endif
-
 /******************************************************************************/
 /***  handleMessageWindowKeyDown()
 /******************************************************************************/
@@ -955,7 +994,11 @@
 #endif
         helpWin = W_MakeTextWindow ("help", 20,
                           TWINSIDE + 2 * THICKBORDER + STATSIZE + 2 * BORDER - 5,
+#ifdef PARADISE
+                          160, 23, NULL, BORDER);
+#else
                           160, 21, NULL, BORDER);
+#endif
 
 #ifdef RECORDGAME
     if (playback)
@@ -1233,6 +1276,10 @@
 #ifdef PARADISE
     loadparadisethings();
 #endif
+#ifdef PARADISE
+    Planlib = "bitmaps/paradise/paradise_plan.bmp";
+    MPlanlib = "bitmaps/paradise/paradise_mplan.bmp";
+#else
     switch (planetBitmap) // Case 3 = new color, but we never use Planlib
     {
     case 1:
@@ -1257,7 +1304,8 @@
         MPlanlib = "bitmaps/planlibm/mplan.bmp";
         break;
     }
-    
+#endif
+ 
     if (!dynamicBitmaps) /* Only load needed bitmaps */
     {
     	switch (colorClient)
@@ -1380,12 +1428,12 @@
     mplasmatorp =
         W_StoreBitmap3 ("bitmaps/weaplibm/mono/mplasma.bmp", BMP_MPLASMA_WIDTH,
                         BMP_MPLASMA_HEIGHT, BMP_MPLASMA, w, LR_MONOCHROME);
-
+                        
     base_planets =
-        W_StoreBitmap3 (Planlib, BMP_PLANET_WIDTH, BMP_PLANET_HEIGHT * 9,
+        W_StoreBitmap3 (Planlib, BMP_PLANET_WIDTH, BMP_PLANET_HEIGHT * PLANET_VIEWS,
                         BMP_PLANET000, w, LR_MONOCHROME);
     base_mplanets =
-        W_StoreBitmap3 (MPlanlib, BMP_MPLANET_WIDTH, BMP_MPLANET_HEIGHT * 9,
+        W_StoreBitmap3 (MPlanlib, BMP_MPLANET_WIDTH, BMP_MPLANET_HEIGHT * PLANET_VIEWS,
                         BMP_MPLANET000, mapw, LR_MONOCHROME);
 
     for (k = 0; k < PLANET_VIEWS; k++)

Index: input.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/input.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- input.c	17 May 2007 08:49:48 -0000	1.40
+++ input.c	18 May 2007 19:54:38 -0000	1.41
@@ -276,7 +276,7 @@
     emptyKey,                   /* 31 */
     Key200,                     /* ^h */
     emptyKey,                   /* 31 */
-    emptyKey,                   /* 31 */
+    Key202,                     /* ^j */
     emptyKey,                   /* 31 */
     Key204,                     /* ^l */
     Key205,                     /* ^m */
@@ -2282,7 +2282,11 @@
 void
 Key37 (void)
 {
+#ifdef PARADISE
+    set_speed(me->p_ship.s_maxspeed);
+#else
     set_speed (99);             /* Max speed... */
+#endif
 }
 
 /******************************************************************************/
@@ -2391,7 +2395,11 @@
 void
 Key46 (void)
 {
+#ifdef PARADISE
+    set_speed(98);  /* afterburners */
+#else
     emptyKey();
+#endif
 }
 
 /******************************************************************************/
@@ -2729,7 +2737,11 @@
 void
 Key74 (W_Event * data)
 {
+#ifdef PARADISE
+    set_speed(99); /* warp! */
+#else
     emptyKey ();
+#endif
 }
 
 /******************************************************************************/
@@ -3869,3 +3881,20 @@
 {
     emergency (other2, data);
 }
+
+/******************************************************************************/
+/***  Key202()                                                              ***/
+/******************************************************************************/
+void
+Key202 (W_Event * data)
+{
+#ifdef PARADISE
+    /* suspend warp toggle [BDyess] */
+    if (me->p_flags & PFWPSUSPENDED)
+        set_speed(96); /* unsuspend */
+    else
+        set_speed(97); /* suspend */
+#else
+    emptyKey ();
+#endif
+}
\ No newline at end of file

Index: local.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -d -r1.102 -r1.103
--- local.c	17 May 2007 08:49:48 -0000	1.102
+++ local.c	18 May 2007 19:54:38 -0000	1.103
@@ -19,6 +19,7 @@
 #include "struct.h"
 #include "data.h"
 #include "local.h"
+#include "packets.h"
 #include "proto.h"
 #include "SDL.h"
 #include "SDL_mixer.h"
@@ -53,6 +54,13 @@
 static int sound_plasma = 0;
 static int sound_other_plasmas = 0;
 static int num_other_plasmas = 0;
+#ifdef PARADISE
+static int sound_missiles = 0;
+static int sound_other_missiles = 0;
+static int num_other_missiles = 0;
+static int other_missile_dist = 0;
+static int other_missile_angle = 0;
+#endif
 static unsigned int sound_flags = 0;
 static int other_torp_dist = 0;
 static int other_torp_angle = 0;
@@ -381,6 +389,16 @@
             i += 2;
         if (p->pl_flags & PLFUEL)
             i += 1;
+#ifdef PARADISE
+        if (p->pl_flags & PLSHIPYARD)
+        {
+             i = 9; /* Base for shipyards */
+             if (p->pl_flags & PLFUEL)
+                 i += 1;
+             if (p->pl_armies > 4)
+                 i += 2;
+        }
+#endif
         return (bplanets[i]);
     }
     else
@@ -515,6 +533,18 @@
                                0,
                                wrench_bitmap, planetColor(p),
                                window);
+#ifdef PARADISE
+        if (p->pl_flags & PLSHIPYARD)
+            W_WriteScaleBitmap(dx + destwidth,
+                               dy - destheight/3 - 1,
+                               destwidth/3 + 1,
+                               destheight/3 + 1,
+                               BMP_GEAR_WIDTH,
+                               BMP_GEAR_HEIGHT,
+                               0,
+                               gear_bitmap, planetColor(p),
+                               window);
+#endif
         if (p->pl_flags & PLFUEL)
             W_WriteScaleBitmap(dx + destwidth,
                                dy,
@@ -640,7 +670,7 @@
            if observer is locked onto a planet, or is show_army_count feature packet is on */
         if ((showArmy == 1 || showArmy == 3) && (l->pl_info & me->p_team)
 #ifdef PARADISE
-         && (PL_TYPE(*l) != PLSTAR)
+         && (PL_TYPE(*l) == PLPLANET)
 #endif
          && (F_show_army_count || 
            ( (me->p_flags & PFORBIT) && (F_sp_generic_32 ? me->pl_orbit : get_closest_planet(me->p_x, me->p_y)) == l->pl_no)
@@ -753,6 +783,9 @@
     int type;
 
     W_Icon (*ship_bits)[SHIP_VIEWS];
+#ifdef PARADISE
+    W_Icon (*ship_bits_paradise)[NUMTEAMS];
+#endif
     W_Icon (*ship_bitsHR);
 
     /* Kludge to try to fix missing ID chars on tactical (short range)
@@ -1055,11 +1088,7 @@
             
             type = j->p_ship.s_type;
 #ifdef PARADISE
-            // We missing paradise bitmaps?
-            if (noParadiseBitmaps)
-                type = CRUISER;
-            // If it's a paradise ship, we only have 1 bitmap set
-            // so let's use it, rotating bitmaps realtime.
+            // If it's a paradise ship, use a paradise bitmap set.
             if (type >= PARADISE_SHIP_OFFSET)
             {
             	int pos;
@@ -1082,6 +1111,16 @@
                     pos = 1;
                     break;
                 }
+                if (colorClient <= 0 || colorClient > 4)
+                    ship_bits_paradise = paradise_ships;
+                else
+                {
+                    if (myPlayer(j))
+                        ship_bits_paradise = paradise_cships_self;
+                    else
+                        ship_bits_paradise = paradise_cships;
+                }
+
                 W_WriteScaleBitmap (dx - (j->p_ship.s_width / 2) * SCALE / scaleFactor,
                                     dy - (j->p_ship.s_height / 2) * SCALE / scaleFactor,
                                     j->p_ship.s_width * SCALE / scaleFactor,
@@ -1089,7 +1128,7 @@
                                     BMP_SHIP_WIDTH,
                                     BMP_SHIP_HEIGHT,
                                     (360 * j->p_dir/255),
-                                    paradise_ships[type - PARADISE_SHIP_OFFSET][pos],
+                                    ship_bits_paradise[type - PARADISE_SHIP_OFFSET][pos],
                                     playerColor (j),
                                     w);
             }
@@ -2105,7 +2144,7 @@
                 k->t_fuse--;
                 frame = k->t_fuse * 10 / server_ups;
                 
-                if (k->t_fuse <= 0)
+                if (k->t_fuse < 0)
                 {
                     k->t_status = TFREE;
                     j->p_ntorp--;
@@ -2333,7 +2372,7 @@
             pt->pt_fuse--;
             frame = pt->pt_fuse * 10 / server_ups;
 
-            if (pt->pt_fuse <= 0)
+            if (pt->pt_fuse < 0)
             {
                 pt->pt_status = PTFREE;
                 players[pt->pt_owner].p_nplasmatorp--;
@@ -2484,6 +2523,186 @@
     }
 }
 
+#ifdef PARADISE
+void
+draw_one_thingy(struct thingy *k)
+{
+    int dx, dy;
+    int frame;
+    int view = scaleFactor * TWINSIDE / 2;
+
+    if (k->t_shape == SHP_BLANK)
+	return;
+    /* LineToConsole("%d,%d - %d,%d\n", me->p_x, me->p_y, k->t_x, k->t_y); */
+    dx = k->t_x - me->p_x;
+    dy = k->t_y - me->p_y;
+    if (ABS(dx) > view || ABS(dy) > view)
+	return;
+
+    dx = scaleLocal(dx);
+    dy = scaleLocal(dy);
+    switch (k->t_shape) {
+/*    case SHP_BOOM:
+	k->t_fuse--;
+	if (k->t_fuse <= 0) {
+	    k->t_shape = SHP_BLANK;
+	    return;
+	}
+	if (k->t_fuse > image->frames)
+	    k->t_fuse = image->frames;
+
+	frame = image->frames - k->t_fuse;
+	break;*/
+    case SHP_MISSILE:
+#ifdef SOUND
+        if (k->t_owner != me->p_no)
+        {
+            num_other_missiles++;
+            SetDistAngle(dx, dy);
+            if (distance < other_missile_dist)
+            {
+                other_missile_dist = distance;
+                other_missile_angle = angle;
+            }   	
+        }
+#endif
+	W_WriteScaleBitmap (dx - (BMP_DRONE_WIDTH / 2) * SCALE / scaleFactor,
+                            dy - (BMP_DRONE_HEIGHT / 2) * SCALE / scaleFactor,
+                            BMP_DRONE_WIDTH * SCALE / scaleFactor,
+                            BMP_DRONE_HEIGHT * SCALE / scaleFactor,
+                            BMP_DRONE_WIDTH,
+                            BMP_DRONE_HEIGHT,
+                            (360 * k->t_dir/255),
+                            (colorWeapons ? (myPlayer(&players[k->t_owner]) ? mdronec_bitmap : dronec_bitmap) : drone_bitmap),
+                            playerColor (&players[k->t_owner]),
+                            w);
+        clearzone[0][clearcount] = dx - (BMP_DRONE_WIDTH / 2) * SCALE / scaleFactor - 1;
+        clearzone[1][clearcount] = dy - (BMP_DRONE_HEIGHT / 2) * SCALE / scaleFactor - 1;
+        clearzone[2][clearcount] = BMP_DRONE_WIDTH * SCALE / scaleFactor + 2;
+        clearzone[3][clearcount] = BMP_DRONE_HEIGHT * SCALE / scaleFactor + 2;
+        clearcount++;
+	break;
+/*    case SHP_TORP:
+        image = getImage(friendlyThingy(k) ? I_MTORP : I_ETORP);
+	frame = udcounter + k->t_no;
+	break;
+    case SHP_PLASMA:
+    case SHP_MINE:		// use plasma until I get a nifty bitmap
+        image = getImage(friendlyThingy(k) ? I_MPLASMATORP : I_EPLASMATORP);
+	frame = udcounter + k->t_no;
+	break;
+    case SHP_PBOOM:
+	image = getImage(friendlyThingy(k) ? I_MPLASMACLOUD : I_EPLASMACLOUD);
+	k->t_fuse--;
+	if (k->t_fuse < 0) {
+	    k->t_shape = SHP_BLANK;
+	    return;
+	}
+	if (k->t_fuse > image->frames) {
+	    k->t_fuse = image->frames;
+	}
+	frame = image->frames - k->t_fuse;
+	break;
+    case SHP_FBOOM:
+	image = getImage(friendlyThingy(k) ? I_MFIGHTERCLOUD : I_EFIGHTERCLOUD);
+	k->t_fuse--;
+	if (k->t_fuse < 0) {
+	    k->t_shape = SHP_BLANK;
+	    return;
+	}
+	if (k->t_fuse > image->frames) {
+	    k->t_fuse = image->frames;
+	}
+	frame = image->frames - k->t_fuse;
+	break;
+	*/
+    case SHP_DBOOM:
+        k->t_fuse--;
+        frame = k->t_fuse * 10 / server_ups;
+                
+        if (k->t_fuse < 0)
+        {
+            k->t_shape = SHP_BLANK;
+            return;
+        }
+
+        if (frame >= BMP_DRONEDET_FRAMES)
+            frame = BMP_DRONEDET_FRAMES - 1;
+
+#ifdef SOUND
+                if (k->t_fuse == (MAX(2, BMP_TORPDET_FRAMES * server_ups / 10) - 1))
+                {
+                    SetDistAngle(dx, dy);
+                    // At short distances, don't use angular sound
+                    if (!soundAngles || distance < SCALE/2)
+                        Play_Sound_Loc(PLASMA_HIT_WAV, SF_WEAPONS, -1, distance);
+                    else
+                        Play_Sound_Loc(PLASMA_HIT_WAV, SF_WEAPONS, angle, distance);
+                }
+#endif
+	W_WriteScaleBitmap (dx - (BMP_DRONEDET_WIDTH / 2) * SCALE / scaleFactor,
+                            dy - (BMP_DRONEDET_HEIGHT / 2) * SCALE / scaleFactor,
+                            BMP_DRONEDET_WIDTH * SCALE / scaleFactor,
+                            BMP_DRONEDET_HEIGHT * SCALE / scaleFactor,
+                            BMP_DRONEDET_WIDTH,
+                            BMP_DRONEDET_HEIGHT,
+                            0,
+                            drone_explosion_bitmap[frame],
+                            playerColor (&players[k->t_owner]),
+                            w);
+        clearzone[0][clearcount] = dx - (BMP_DRONEDET_WIDTH / 2) * SCALE / scaleFactor ;
+        clearzone[1][clearcount] = dy - (BMP_DRONEDET_HEIGHT / 2) * SCALE / scaleFactor;
+        clearzone[2][clearcount] = BMP_DRONEDET_WIDTH * SCALE / scaleFactor;
+        clearzone[3][clearcount] = BMP_DRONEDET_HEIGHT * SCALE / scaleFactor;
+        clearcount++;
+	break;
+	/*
+    case SHP_FIGHTER:
+	image = getImage(friendlyThingy(k) ? I_MFIGHTER : I_EFIGHTER);
+	frame = (int) (k->t_dir * image->frames + 128) / 256;
+	break;
+    case SHP_WARP_BEACON:
+	image = getImage(I_WARPBEACON);
+	frame = udcounter;
+	if (k->t_fuse > 4) {
+	    image = getImage(I_WARPFLASH);
+	}
+	if (++(k->t_fuse) > 6) {
+	    k->t_fuse = 0;
+	}
+	break;
+*/
+    default:
+        LineToConsole("Wierd...unknown thingy number (%d).\n", k->t_shape);
+	return;
+    }
+}
+
+void
+DrawThingies (void)
+{
+    int i, h;
+    int count;
+    struct player *j;
+
+    for (j = players; j != players + MAXPLAYER; ++j)
+    {
+        i = j->p_no;
+
+        if (!j->p_ndrone)
+	    return;
+        count = 0;
+
+        for (h = i * npthingies; h < npthingies * (i + 1); h++)
+        {
+	    draw_one_thingy(&thingies[h]);
+	    if (thingies[h].t_shape != SHP_BLANK)
+	        count++;
+        }
+        j->p_ndrone = count;
+    }
+}
+#endif
 
 static void
 DrawMisc (void)
@@ -2851,11 +3070,26 @@
         else
             Play_Sound_Loc(FIRE_PLASMA_OTHER_WAV, SF_OTHER|SF_WEAPONS, other_plasma_angle, other_plasma_dist);
     }
+#ifdef PARADISE
+    if (sound_missiles < me->p_ndrone )
+        Play_Sound(FIRE_PLASMA_WAV, SF_WEAPONS);
+    if (sound_other_missiles < num_other_missiles)
+    {
+        if (!soundAngles || other_missile_dist < SCALE/2)
+            Play_Sound_Loc(FIRE_TORP_OTHER_WAV, SF_OTHER|SF_WEAPONS, -1, other_missile_dist);
+        else
+            Play_Sound_Loc(FIRE_TORP_OTHER_WAV, SF_OTHER|SF_WEAPONS, other_missile_angle, other_missile_dist);
+    }
+#endif
     // Reset locations and fuses of other's closest torps and plasmas
     other_torp_dist = SOUND_MAXRANGE;
     other_torp_angle = 0;
     other_plasma_dist = SOUND_MAXRANGE;
     other_plasma_angle = 0;
+#ifdef PARADISE
+    other_missile_dist = SOUND_MAXRANGE;
+    other_missile_angle = 0;
+#endif
 
     sound_flags = me->p_flags;
     sound_torps = me->p_ntorp;
@@ -2864,6 +3098,11 @@
     sound_plasma = me->p_nplasmatorp;
     sound_other_plasmas = num_other_plasmas;
     num_other_plasmas = 0;
+#ifdef PARADISE
+    sound_missiles = me->p_ndrone;
+    sound_other_missiles = num_other_missiles;
+    num_other_missiles = 0;
+#endif
 #endif
 
     /* show 'lock' icon on local map (Actually an EM hack ) */
@@ -2966,6 +3205,9 @@
 
     DrawTorps ();
     DrawPlasmaTorps ();
+#ifdef PARADISE
+    DrawThingies ();
+#endif
 
     if (!weaponsOnMap)
         weaponUpdate = 0;

Index: enter.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/enter.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- enter.c	6 Apr 2007 06:46:31 -0000	1.10
+++ enter.c	18 May 2007 19:54:37 -0000	1.11
@@ -51,6 +51,9 @@
     players = universe.players;
     torps = universe.torps;
     plasmatorps = universe.plasmatorps;
+#ifdef PARADISE
+    thingies = universe.thingies;
+#endif
     status = universe.status;
     planets = universe.planets;
     phasers = universe.phasers;

Index: planetlist.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/planetlist.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- planetlist.c	17 May 2007 08:49:49 -0000	1.8
+++ planetlist.c	18 May 2007 19:54:39 -0000	1.9
@@ -45,10 +45,7 @@
 planetlist (void)
 {
 #ifdef PARADISE
-    if (paradise)
-        planet_list_paradise();
-    else
-    {
+    planet_list_paradise();
 #else
     register int i;
     char buf[BUFSIZ];
@@ -63,9 +60,6 @@
         strcpy(priorplanets[i], "");
     updatePlanetw ();
 #endif
-#ifdef PARADISE
-    }
-#endif
 }
 
 #ifdef PARADISE
@@ -128,11 +122,7 @@
 	    for (team_pnum = 0; team_pnum < team_pcount[i]; team_pnum++, k++) {
 
 		j = team_p[i][team_pnum];
-		/* (nplanets+13)/2 is the height of window; from newwin.c */
-		if (k == 0 || k >= ((nplanets + 13) / 2)) {
-		    if (k != 0)
-		        continue;
-			//wind = planetw2;
+		if (k == 0) {
 		    sprintf(buf, "Planet name      sctr own armies RESOURCES  SURFC  ATMOS    VISIT    TIME");
 		    W_WriteText(wind, 2, 1, textColor, buf, strlen(buf),
 		    		W_RegularFont);
@@ -150,14 +140,9 @@
     } else {			/* do the original alpa only sort planet list */
 
 	for (i = 0, j = &planets[i]; i < nplanets; i++, j++, k++) {
-	    if (i == 0 || i == nplanets / 2) {
+	    if (i == 0) {
 
 		sprintf(buf, "Planet name      sctr own armies RESOURCES  SURFC  ATMOS    VISIT    TIME");
-
-		if (i != 0) {
-		    continue;
-		    //wind = planetw2;
-		}
 		W_WriteText(wind, 2, 1, textColor, buf, strlen(buf), 
 		  	    W_RegularFont);
 		k = 2;

Index: playerlist.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/playerlist.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- playerlist.c	17 May 2007 08:49:49 -0000	1.13
+++ playerlist.c	18 May 2007 19:54:39 -0000	1.14
@@ -108,7 +108,7 @@
 static int plist2Width = 0;
 #ifdef PARADISE
 static char *my_classes[NUM_TYPES] = {
-    "SC", "DD", "CA", "BB", "AS", "SB", "GA", "JS", "FL", "WB", "CL", "CV", "UT", "PT", "PU" };
+    "SC", "DD", "CA", "BB", "AS", "SB", "AT", "JS", "FL", "WB", "CL", "CV", "UT", "PT", "PU" };
 #else
 static char *my_classes[NUM_TYPES] =
     { "SC", "DD", "CA", "BB", "AS", "SB", "GA", "AT" };

Index: helpwin.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/helpwin.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- helpwin.c	16 May 2007 00:05:15 -0000	1.11
+++ helpwin.c	18 May 2007 19:54:37 -0000	1.12
@@ -79,6 +79,11 @@
     "@     speed = 12",
     "%     speed = maximum",
     "#     speed = 1/2 maximum",
+#ifdef PARADISE
+    ".     Afterburners",
+    "J     Engage Warp",
+    "^j    Toggle warp prep",
+#endif
     "<     slow speed 1",
     ">     speed up 1",
     "k     Set course",
@@ -302,7 +307,7 @@
     char helpmessage[MAXHELP];
 
 
-    /* 4 column help window. THis may be changed depending on font size */
+    /* 2 column help window. THis may be changed depending on font size */
     for (column = 0; column < 2; column++)
     {
         for (row = 1; row < PBHELPMESSAGES / 2 + 1; row++)

Index: socket.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- socket.c	17 May 2007 08:49:49 -0000	1.33
+++ socket.c	18 May 2007 19:54:39 -0000	1.34
@@ -1915,8 +1915,17 @@
 {
     loginAccept = packet->accept;
 #ifdef PARADISE
+    if ((packet->pad2 != 69) && (packet->pad3 != 42))
+    {
+        LineToConsole ("Paradise.exe only works on paradise servers, either select a paradise server or use netrek.exe.\n");
+        exit (0);
+    }
+#else
     if ((packet->pad2 == 69) && (packet->pad3 == 42))
-	paradise = 1;
+    {
+        LineToConsole ("Netrek.exe only works on non-paradise servers, either select a non-paradise server or use paradise.exe.\n");
+        exit (0);
+    }
 #endif
     if (packet->accept)
     {
@@ -3008,34 +3017,46 @@
 }
 void handleThingy (struct thingy_spacket *packet)
 {
-/*
+
     struct thingy *thetorp;
 
-    //SANITY_THINGYNUM(ntohs(packet->tnum));
+#ifdef CORRUPTED_PACKETS
+    if (packet->tnum >= npthingies*nplayers + ngthingies)
+    {
+        LineToConsole ("handleThingy: bad index %d\n", packet->tnum);
+        return;
+    }
+#endif
 
     thetorp = &thingies[ntohs(packet->tnum)];
     thetorp->t_x = ntohl(packet->x);
     thetorp->t_y = ntohl(packet->y);
-    // printf("drone at %d, %d\n", thetorp->t_x, thetorp->t_y);
+    // LineToConsole("drone at %d, %d\n", thetorp->t_x, thetorp->t_y);
     thetorp->t_dir = packet->dir;
 
-
-    if (rotate) {
-	rotate_gcenter(&thetorp->t_x, &thetorp->t_y);
-	rotate_dir(&thetorp->t_dir, rotate_deg);
+#ifdef ROTATERACE
+    if (rotate)
+    {
+        rotate_coord (&thetorp->t_x, &thetorp->t_y, rotate_deg, GWIDTH / 2,
+                      GWIDTH / 2);
     }
+#endif
 
     if (thetorp->t_shape == SHP_WARP_BEACON)
 	redrawall = 1;		// shoot, route has changed 
-*/
 }
 
 void handleThingyInfo (struct thingy_info_spacket *packet)
 {
-/*
     struct thingy *thetorp;
 
-   //SANITY_THINGYNUM(ntohs(packet->tnum));
+#ifdef CORRUPTED_PACKETS
+    if (packet->tnum >= npthingies*nplayers + ngthingies)
+    {
+        LineToConsole ("handleThingyInfo: bad index %d\n", packet->tnum);
+        return;
+    }
+#endif
 
     thetorp = &thingies[ntohs(packet->tnum)];
 
@@ -3046,7 +3067,7 @@
 
     if (ntohs(packet->shape) == SHP_BOOM && thetorp->t_shape == SHP_BLANK) {
 	// FAT: redundant explosion; don't update p_ntorp
-	// printf("texplode ignored\n");
+	// LineToConsole("texplode ignored\n");
 	return;
     }
 
@@ -3057,21 +3078,24 @@
 	players[thetorp->t_owner].p_ndrone--;
     }
     thetorp->t_war = packet->war;
-
     if (ntohs(packet->shape) != thetorp->t_shape) {
 	// FAT: prevent explosion reset
 	int shape = ntohs(packet->shape);
 
         if(shape == SHP_BOOM || shape == SHP_PBOOM) {
 	  if(thetorp->t_shape == SHP_FIGHTER)
+	  {
 	    shape = SHP_FBOOM;
+	    thetorp->t_fuse = MAX(2, BMP_DRONEDET_FRAMES * server_ups / 10);
+	  }
 	  if(thetorp->t_shape == SHP_MISSILE)
+	  {
 	    shape = SHP_DBOOM;
-	  thetorp->t_fuse = BIGINT;
+	    thetorp->t_fuse = MAX(2, BMP_DRONEDET_FRAMES * server_ups / 10);
+	  }
 	}
 	thetorp->t_shape = shape;
     }
-*/
 }
 
 void handleScan (struct scan_spacket *packet)

Index: dashboard3.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/dashboard3.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- dashboard3.c	13 Apr 2007 12:02:46 -0000	1.10
+++ dashboard3.c	18 May 2007 19:54:37 -0000	1.11
@@ -381,6 +381,14 @@
     static int old_ful = -1;
     static float old_kills = -1;
     static int old_torp = -1;
+#ifdef PARADISE
+    char buf[16];
+    int i = 0;
+    static int old_drone = -1;
+    static int old_totmissiles = -1;
+    int drone;
+    int totmissiles;
+#endif
     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;
@@ -392,11 +400,19 @@
     {
         kills = players[me->p_playerl].p_kills;
         torp = players[me->p_playerl].p_ntorp;
+#ifdef PARADISE
+        drone = players[me->p_playerl].p_ndrone;
+        totmissiles = players[me->p_playerl].p_totmissiles;
+#endif
     }
     else
     {
         kills = me->p_kills;
         torp = me->p_ntorp;
+#ifdef PARADISE
+        drone = me->p_ndrone;
+        totmissiles = me->p_totmissiles;
+#endif
     }
 
     if (fr)
@@ -632,7 +648,32 @@
         }
         old_torp = torp;
     }
-    
+
+#ifdef PARADISE
+    /* code to show the number of drones out */
+    strcpy(buf, "M: ");
+    if (fr || totmissiles != old_totmissiles || drone != old_drone)
+    {
+	if (totmissiles > 0)
+	    sprintf(buf + strlen(buf), "L%d ", totmissiles);
+	old_totmissiles = totmissiles;
+	if (drone > 0)
+	    sprintf(buf + strlen(buf), "O%d", drone);
+	old_drone = drone;
+	if (!totmissiles && !drone)	/* clear missile text */
+	    W_ClearArea(tstatw, 7 + BAR_LENGTH, 12 + 2 * W_Textheight, 10 * W_Textwidth, W_Textheight);
+	else
+	{
+	    for (i = strlen(buf); i < 11; i++)
+	    {
+	        buf[i] = ' ';
+	        buf[11] = 0;
+	    }
+	    W_WriteText(tstatw, 7 + BAR_LENGTH, 12 + 2 * W_Textheight, textColor, buf, 11, W_RegularFont);
+	}
+    }
+#endif
+
     old_spd = me->p_speed;
     old_cur_max = cur_max;
     old_shl = me->p_shield;

Index: data.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -d -r1.93 -r1.94
--- data.c	17 May 2007 08:49:48 -0000	1.93
+++ data.c	18 May 2007 19:54:37 -0000	1.94
@@ -26,6 +26,7 @@
 struct status *status;
 #ifdef PARADISE
 struct status2 *status2;
+struct thingy *thingies;
 #endif
 struct ship *myship;
 struct stats *mystats;
@@ -274,12 +275,10 @@
 extern double Sin[], Cos[];
 
 #ifdef PARADISE
-int paradise = 0;			/* is the server a paradise server */
-int noParadiseBitmaps = 0;
 int gwidth = GWIDTH;			/* galaxy width, adjusted for zoom [BDyess] */
 int offsetx = 0;
 int offsety = 0;			/* offsets when zooming [BDyess] */
-int nplayers = 36;
+int nplayers = 256;
 int nshiptypes = 15;
 int ntorps = 8;
 int npthingies = 20;
@@ -342,11 +341,21 @@
 
 // Paradise bitmaps
 #ifdef PARADISE
+W_Icon drone_bitmap, dronec_bitmap, mdronec_bitmap;
+W_Icon base_drone_explosion_bitmap;
+W_Icon drone_explosion_bitmap[BMP_DRONEDET_FRAMES];
+W_Icon base_dronec_explosion_bitmap;
+W_Icon dronec_explosion_bitmap[BMP_DRONEDET_FRAMES];
+W_Icon gear_bitmap, mgear_bitmap;
 W_Icon base_star_bitmap;
 W_Icon star_bitmap[STAR_VIEWS];
 W_Icon star_mbitmap;
 W_Icon paradise_ship_bitmaps;
 W_Icon paradise_ships[NUM_PSHIP_TYPES][NUMTEAMS];
+W_Icon paradise_cship_self_bitmaps;
+W_Icon paradise_cships_self[NUM_PSHIP_TYPES][NUMTEAMS];
+W_Icon paradise_cship_bitmaps;
+W_Icon paradise_cships[NUM_PSHIP_TYPES][NUMTEAMS];
 #endif
 // Ships
 W_Icon ship_bitmaps[5];

Index: warning.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/warning.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- warning.c	28 Feb 2007 12:21:50 -0000	1.13
+++ warning.c	18 May 2007 19:54:39 -0000	1.14
@@ -145,4 +145,15 @@
         if (doPhaser)
             W_MessageAllowedWindows (WAM_PHASER, 0, 0, textColor, newtext, warncount, 0);
     }
+#ifdef PARADISE
+    if (strncmp(text, "Missile away", 12) == 0) {
+	/* missile total kludge.  No value until one is shot :( */
+	me->p_totmissiles = atoi(text + 13);
+    } else if (strcmp(text, "Prepping for warp jump") == 0) {
+	/* keep track of when in warp prep */
+	me->p_flags |= PFWARPPREP;
+    } else if (strcmp(text, "Warp drive aborted") == 0) {
+	me->p_flags &= ~PFWARPPREP;
+    }
+#endif
 }

Index: inform.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/inform.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- inform.c	17 May 2007 08:49:48 -0000	1.5
+++ inform.c	18 May 2007 19:54:38 -0000	1.6
@@ -34,7 +34,7 @@
 
 #ifdef PARADISE
 static char *my_classes[NUM_TYPES] = {
-    "SC", "DD", "CA", "BB", "AS", "SB", "GA", "JS", "FL", "WB", "CL", "CV", "UT", "PT", "PU"
+    "SC", "DD", "CA", "BB", "AS", "SB", "AT", "JS", "FL", "WB", "CL", "CV", "UT", "PT", "PU",
 };
 #else
 static char *my_classes[NUM_TYPES] = {

Index: option.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/option.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- option.c	14 May 2007 02:56:41 -0000	1.49
+++ option.c	18 May 2007 19:54:38 -0000	1.50
@@ -784,6 +784,9 @@
                 for (i = 0; i < PLANET_VIEWS; i++)
                     free (bplanets[i]);
 
+#ifdef PARADISE
+                Planlib = "bitmaps/paradise/paradise_plan.bmp";
+#else
                 switch (planetBitmap)
                 {
                 case 1:
@@ -796,6 +799,7 @@
                     Planlib = "bitmaps/planlibm/plan.bmp";
                     break;
                 }
+#endif
                 base_planets = W_StoreBitmap3 (Planlib, BMP_PLANET_WIDTH, BMP_PLANET_HEIGHT * 9,
                                                 BMP_PLANET000, w, LR_MONOCHROME);
   
@@ -816,7 +820,10 @@
     
                 for (i = 0; i < MPLANET_VIEWS; i++)
                     free (bmplanets[i]);
-    
+
+#ifdef PARADISE
+                MPlanlib = "bitmaps/paradise/paradise_mplan.bmp";
+#else
                 switch (planetBitmapGalaxy)
                 {
                 case 1:
@@ -829,6 +836,7 @@
                     MPlanlib = "bitmaps/planlibm/mplan.bmp";
                     break;
                 }
+#endif
                 base_mplanets = W_StoreBitmap3 (MPlanlib, BMP_MPLANET_WIDTH, BMP_MPLANET_HEIGHT * 9,
                                                 BMP_MPLANET000, mapw, LR_MONOCHROME);
     

Index: defaults.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- defaults.c	17 May 2007 08:49:48 -0000	1.86
+++ defaults.c	18 May 2007 19:54:37 -0000	1.87
@@ -31,7 +31,7 @@
     {"bb", NULL, NULL, NULL, NULL},
     {"as", NULL, NULL, NULL, NULL},
     {"sb", NULL, NULL, NULL, NULL},
-    {"ga", NULL, NULL, NULL, NULL},
+    {"att", NULL, NULL, NULL, NULL},
     {"js", NULL, NULL, NULL, NULL},
     {"fl", NULL, NULL, NULL, NULL},
     {"wb", NULL, NULL, NULL, NULL},