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

Modified Files:
	docwin.c local.c newwin.c smessage.c 
Log Message:
Adjusted army count on local map to scale with font.
Adjusted docwin and netrekrcwin to scale with font.
Adjusted autoscrolling of message send window to
scale with font.

Index: newwin.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/newwin.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- newwin.c	13 Apr 2007 07:12:25 -0000	1.61
+++ newwin.c	13 Apr 2007 07:52:41 -0000	1.62
@@ -1003,8 +1003,14 @@
 #endif
 
 #ifdef DOC_WIN
-    docwin = W_MakeWindow ("DocWin", 0, 181, 500, 500, 0, 2, foreColor);
-    xtrekrcwin = W_MakeWindow ("xtrekrcWin", 0, 200, 500, 500, 0, 2, foreColor);
+    docwin = W_MakeWindow ("DocWin", 0, 181,
+                           TWINSIDE * W_Textwidth / 6,
+                           TWINSIDE,
+                           0, 2, foreColor);
+    xtrekrcwin = W_MakeWindow ("xtrekrcWin", 0, 200,
+                                TWINSIDE * W_Textwidth / 6,
+                                TWINSIDE,
+                                0, 2, foreColor);
 #endif
 
     for (i = 0; i < 4; i++)

Index: smessage.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/smessage.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- smessage.c	7 Apr 2007 11:58:40 -0000	1.8
+++ smessage.c	13 Apr 2007 07:52:42 -0000	1.9
@@ -40,12 +40,12 @@
     if (length == 0)
         return;
 
-    if (length > 80)
+    if (length > (80 * 6 / W_Textwidth))
     {
         strncpy (tmp, outmessage, 10);
         tmp[10] = '\0';         // have to null terminate, because strncpy doesn't
-        strncat (tmp, outmessage + length - 70, 80);
-        length = 80;
+        strncat (tmp, outmessage + length - (80 * 6 / W_Textwidth) + 10, (80 * 6 / W_Textwidth));
+        length = (80 * 6 / W_Textwidth);
     }
     else
         strcpy (tmp, outmessage);

Index: docwin.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/docwin.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- docwin.c	13 Apr 2007 07:12:23 -0000	1.5
+++ docwin.c	13 Apr 2007 07:52:41 -0000	1.6
@@ -52,7 +52,7 @@
     W_Font font = W_RegularFont;
 
     if (!docwin)
-        docwin = W_MakeWindow ("DocWin", 0, 181, 500, 500, 0, 2, foreColor);
+        docwin = W_MakeWindow ("DocWin", 0, 181, TWINSIDE * W_Textwidth / 6, TWINSIDE, 0, 2, foreColor);
 
     W_ClearWindow (docwin);
 
@@ -61,12 +61,12 @@
 
     sprintf (buf, "---  %s  ---", (char *) query_cowid ());
     length = strlen (buf);
-    center = 250 - (length * W_Textwidth) / 2;
+    center = (TWINSIDE * W_Textwidth / 6) / 2 - (length * W_Textwidth) / 2;
     W_WriteText (docwin, center, W_Textheight, textColor,
                  buf, length, W_BoldFont);
     sprintf (buf, CBUGS);
     length = strlen (buf);
-    center = 250 - (length * W_Textwidth) / 2;
+    center = (TWINSIDE * W_Textwidth / 6) / 2 - (length * W_Textwidth) / 2;
     W_WriteText (docwin, center, 3 * W_Textheight, textColor,
                  buf, length, W_RegularFont);
 
@@ -229,7 +229,7 @@
     W_Font font = W_RegularFont;
 
     if (!xtrekrcwin)
-        xtrekrcwin = W_MakeWindow ("xtrekrcWin", 0, 200, TWINSIDE, TWINSIDE, 0, 2,
+        xtrekrcwin = W_MakeWindow ("xtrekrcWin", 0, 200, TWINSIDE * W_Textwidth / 6, TWINSIDE, 0, 2,
                                    foreColor);
 
     W_ClearWindow (xtrekrcwin);
@@ -239,12 +239,12 @@
 
     sprintf (buf, "---  %s  ---", (char *) query_cowid ());
     length = strlen (buf);
-    center = TWINSIDE / 2 - (length * W_Textwidth) / 2;
+    center = (TWINSIDE * W_Textwidth / 6) / 2 - (length * W_Textwidth) / 2;
     W_WriteText (xtrekrcwin, center, W_Textheight, textColor,
                  buf, length, W_BoldFont);
     sprintf (buf, CBUGS);
     length = strlen (buf);
-    center = TWINSIDE / 2 - (length * W_Textwidth) / 2;
+    center = (TWINSIDE * W_Textwidth / 6) / 2 - (length * W_Textwidth) / 2;
     W_WriteText (xtrekrcwin, center, 3 * W_Textheight, textColor,
                  buf, length, W_RegularFont);
 

Index: local.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -d -r1.97 -r1.98
--- local.c	13 Apr 2007 07:12:24 -0000	1.97
+++ local.c	13 Apr 2007 07:52:41 -0000	1.98
@@ -640,12 +640,12 @@
                 armbuf[3] = '\0';
                 armbuflen = 4;
             }
-            W_MaskText (w, dx - (7 * BMP_PLANET_WIDTH / 8) * SCALE / scaleFactor,
-                        dy - (5 * BMP_PLANET_HEIGHT / 6) * SCALE / scaleFactor,
+            W_MaskText (w, dx - (W_Textwidth * (armbuflen - 1)) - (2 * BMP_PLANET_WIDTH / 3) * SCALE / scaleFactor,
+                        dy - W_Textheight - (BMP_PLANET_HEIGHT / 2) * SCALE / scaleFactor,
                         planetColor (l),
                         armbuf, armbuflen, planetFont (l));
-            clearzone[0][clearcount] = dx - (7 * BMP_PLANET_WIDTH / 8) * SCALE / scaleFactor;
-            clearzone[1][clearcount] = dy - (5 * BMP_PLANET_HEIGHT / 6) * SCALE / scaleFactor;
+            clearzone[0][clearcount] = dx - (W_Textwidth * (armbuflen - 1)) - (2 * BMP_PLANET_WIDTH / 3) * SCALE / scaleFactor;
+            clearzone[1][clearcount] = dy - W_Textheight - (BMP_PLANET_HEIGHT / 2) * SCALE / scaleFactor;
             clearzone[2][clearcount] = W_Textwidth * armbuflen;
             clearzone[3][clearcount] = W_Textheight;
             clearcount++;