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);