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

Modified Files:
	data.c defaults.c local.c mswindow.c 
Log Message:
Set beeplite TTS position if TWINSIDE changes.
Redid redraw for tactical yellow alert circle to be smarter redraw
routine (done similiar to how it's cleared on map window).
New netrekrc option mainMaximized to start netrek window
maximized, default is on.

Index: data.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- data.c	14 Apr 2007 02:56:19 -0000	1.83
+++ data.c	14 Apr 2007 09:49:34 -0000	1.84
@@ -764,6 +764,7 @@
 
 int windowMove = 0;
 int mainResizeable = 1;
+int mainMaximized = 1;
 int maxScrollLines = 300;
 int mainTitleBar = 0;
 int observerMode = 0;

Index: mswindow.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -d -r1.73 -r1.74
--- mswindow.c	14 Apr 2007 07:44:35 -0000	1.73
+++ mswindow.c	14 Apr 2007 09:49:35 -0000	1.74
@@ -1451,6 +1451,9 @@
 
     ShowWindow (win->hwnd, SW_SHOWNORMAL);
     BringWindowToTop (win->hwnd);
+    
+    if (window == baseWin && mainMaximized)
+        ShowWindow (((Window *) baseWin)->hwnd, SW_MAXIMIZE);
 }
 
 //Hides the window.
@@ -1960,6 +1963,9 @@
                 height = width;
             TWINSIDE = width - 2 * win->border;
 
+            /* Beeplite TTS may need to be adjusted */
+            tts_ypos = intDefault("tts_ypos", TWINSIDE / 2 - 16);
+
             /* Have to take into account basewin border */
             winRect.left -= baseRect.left;
             winRect.top -= baseRect.top;

Index: defaults.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -d -r1.79 -r1.80
--- defaults.c	14 Apr 2007 02:56:19 -0000	1.79
+++ defaults.c	14 Apr 2007 09:49:34 -0000	1.80
@@ -268,6 +268,12 @@
             NULL
         }
     },
+    {"mainMaximized", &mainMaximized, RC_BOOL,
+        {
+            "Make main window maximized on client start",
+            NULL
+        }
+    },
     {"mainResizeable", &mainResizeable, RC_BOOL,
         {
             "Make main window + local/map windows resizeable",
@@ -1702,6 +1708,7 @@
 
     doubleBuffering = booleanDefault ("doubleBuffering", doubleBuffering);
     mainResizeable = booleanDefault ("mainResizeable", mainResizeable);
+    mainMaximized = booleanDefault ("mainMaximized", mainMaximized);
     mainTitleBar = booleanDefault ("mainTitleBar", mainTitleBar);
     allowWheelActions = booleanDefault ("allowWheelActions", allowWheelActions);
     richText = booleanDefault ("richText", richText);

Index: local.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -d -r1.99 -r1.100
--- local.c	14 Apr 2007 02:56:19 -0000	1.99
+++ local.c	14 Apr 2007 09:49:35 -0000	1.100
@@ -30,6 +30,8 @@
 static int clearzone[4][(MAXTORP + 1) * MAXPLAYER +
                         (MAXPLASMA + 1) * MAXPLAYER + MAXPLANETS];
 static int clearlcount = 0;
+static int clearx, cleary, clearr;	/* x,y,radius for range circle */
+static int clearccount = 0;
 #ifdef HOCKEY_LINES
 static int clearline[4][MAXPLAYER + 2 * MAXPLAYER + NUM_HOCKEY_LINES];
 #else
@@ -2492,12 +2494,10 @@
 
             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++;
+            clearx = TWINSIDE/2;
+            cleary = TWINSIDE/2;
+            clearr = rad;
+            clearccount++;
         }
     }
 
@@ -2921,6 +2921,7 @@
         W_ClearWindow (w);
         clearcount = 0;
         clearlcount = 0;
+        clearccount = 0;
         tractcurrent = tracthead;
         W_FastClear = 0;
     }
@@ -2947,5 +2948,11 @@
         W_MakeLines (w, clearline[0], clearline[1], clearline[2],
                      clearline[3], clearlcount, backColor);
         clearlcount = 0;
+        
+        if (clearccount)
+        {
+            W_WriteCircle(w, clearx, cleary, clearr, 0, 0, backColor);
+            clearccount--;
+        }
     }
 }