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

Modified Files:
	dashboard3.c data.c death.c defaults.c docwin.c enter.c 
	findslot.c input.c local.c macrowin.c map.c mswindow.c 
	newwin.c option.c redraw.c short.c sound.c util.c 
Log Message:
This large patch continues the work on allowing resizeable local
and map windows.  WINSIDE is now history, having been split
into TWINSIDE and GWINSIDE.  A few WINSIDE based defines
were modified.  Visible ship range (MAXDISTCLOAK and
MAXDISTVIS) were converted to galactic units.  The CORNER_DIST
variable was renamed to SOUND_MAXRANGE and now goes off
of INFORANGE scale rather than WINSIDE scale.  This keeps the
scaling factor for sounds the same no matter what size tactical is
used (sounds fall off to nothing at the same distance as before).
New function sound_window_height to calculate size of sound
window (trivial really, but makes it so no more editing newwin every
time a new option is added to the sound menu).
Commented out most of the windows geometry entries in the netrekrc,
and updated them to match the new default settings for a normal
500x500 local and 500x500 map window.  Reason being, newwin
entry routine now does a good job adjusting window sizes to match
local and map windows, so let's not have the user worry about
changing all the geometries.  Ideally users will change tactical and
map size, and have program do most of the adjusting for them.
On that note, changed a whole bunch of window default geometries
to use exact math so windows line up perfectly, and so they all
scale proper (compare old message win placements to new ones and
you will see the difference).
New netrekrc option infoRange to show a box around your ship
showing the limit on which server sends weapons data.  Box is
"smart" and doesn't draw sections that fall outside galaxy bounds.
Changed a few dashboard timers to no longer be located based on
WINSIDE (that was a mistake in the first place).  Dashboards do
NOT scale with tactical though, and it will be a MAJOR project
to add that ability.
The header for docwin is no longer centered on WINSIDE, since
the actual docwin size is hard coded to 500x500, made no sense
to have header to use WINSIDE in the first place.
MOTD window now is fixed at 500 pixels wide, no point in making
it wider, cause the text isn't going to extend due to the server
limiting its textwidth.
A bunch of bitmaps which were never anticipated to scale, now
scale.  Geno bitmaps now scale to fit map window, and are properly
defined in bitmaps.h as to their bitmap size.  Team and quit window
bitmaps now scale.

Index: redraw.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/redraw.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- redraw.c	26 Mar 2007 04:40:52 -0000	1.11
+++ redraw.c	6 Apr 2007 06:46:32 -0000	1.12
@@ -161,7 +161,7 @@
         oldbuf = buf1;
     }
     /* TIMER */
-    db_timer (flag, WINSIDE - 12 * W_Textwidth, 27);
+    db_timer (flag, 428, 27);
 
     light_erase();
 

Index: death.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/death.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- death.c	17 Mar 2007 03:05:44 -0000	1.17
+++ death.c	6 Apr 2007 06:46:31 -0000	1.18
@@ -149,11 +149,17 @@
         switch (i)
         {
             case 0:
-                W_TileWindow (mapw, genopic);
+                W_WriteScaleBitmap(0, 0, GWINSIDE, GWINSIDE,
+                                   BMP_GENO_WIDTH,
+                                   BMP_GENO_HEIGHT,
+                                   0, genopic, foreColor, mapw);
                 break;
             case 1:
             default:
-                W_TileWindow (mapw, genopic2);
+                W_WriteScaleBitmap(0, 0, GWINSIDE, GWINSIDE,
+                                   BMP_GENO_WIDTH,
+                                   BMP_GENO_HEIGHT,
+                                   0, genopic2, foreColor, mapw);
                 break;
         }
 #ifdef SOUND

Index: findslot.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/findslot.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- findslot.c	28 Feb 2007 09:35:20 -0000	1.7
+++ findslot.c	6 Apr 2007 06:46:31 -0000	1.8
@@ -142,8 +142,8 @@
     W_MapWindow (waitqWin);
     if (showMotd)
     {
-        motdWin = W_MakeWindow ("waitmotd", 1, WAITWIDTH + 1, WINSIDE,
-                                WINSIDE, 0, 2, foreColor);
+        motdWin = W_MakeWindow ("waitmotd", 1, WAITWIDTH + 1, 500,
+                                500, 0, 2, foreColor);
         W_MapWindow (motdWin);
         showMotdWin (motdWin, WaitMotdLine);
     }
@@ -199,7 +199,7 @@
                     else
                     {
                         motdWin = W_MakeWindow ("waitmotd", 1, WAITWIDTH + 1,
-                                                WINSIDE, WINSIDE, 0, 2,
+                                                500, 500, 0, 2,
                                                 foreColor);
                         W_MapWindow (motdWin);
                         showMotdWin (motdWin, WaitMotdLine);

Index: mswindow.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- mswindow.c	5 Apr 2007 12:57:22 -0000	1.54
+++ mswindow.c	6 Apr 2007 06:46:32 -0000	1.55
@@ -4827,11 +4827,9 @@
             s++;
         *width = atoi (geom_default);
         if (!strcmp("local", name))
-            WINSIDE = *width;
-/*      Need to separate WINSIDE into TWINSIDE and GWINSIDE  
+            TWINSIDE = *width;
         else if (!strcmp("map", name))
-            WINSIDE = *width;
-*/
+            GWINSIDE = *width;
         result |= G_SET_WIDTH;
         if (*s == 0)
             return result;
@@ -4843,15 +4841,13 @@
         if (!strcmp("local", name))
         {
             if (*height > *width)
-                WINSIDE = *height;
+                TWINSIDE = *height;
         }
-/*
         else if (!strcmp("map", name))
         {
             if (*height > *width)
-                WINSIDE = *height;
+                GWINSIDE = *height;
         }
-*/
         result |= G_SET_HEIGHT;
         if (*s == 0)
             return result;

Index: sound.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/sound.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- sound.c	30 Mar 2007 02:50:53 -0000	1.38
+++ sound.c	6 Apr 2007 06:46:32 -0000	1.39
@@ -467,6 +467,11 @@
     W_MapWindow (soundWin);
 }
 
+extern int sound_window_height (void)
+{
+    return SOUND_DONE + 1;
+}
+
 static void soundrefresh (int i)
 {
     char buf[BUFSIZ];

Index: newwin.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/newwin.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- newwin.c	5 Apr 2007 12:57:22 -0000	1.59
+++ newwin.c	6 Apr 2007 06:46:32 -0000	1.60
@@ -42,11 +42,12 @@
 
 #define SIZEOF(a)       (sizeof (a) / sizeof (*(a)))
 
-#define BOXSIDE         (WINSIDE / 5)
+#define BOXSIDE         (TWINSIDE / 5)
+#define MENU_PAD 4
 #define TILESIDE        16
 #define MESSAGESIZE     20
-#define STATSIZE        (MESSAGESIZE * 2 + BORDER)
-#define YOFF            -25
+#define STATSIZE        (MESSAGESIZE * 2 + BORDER * 2)
+#define YOFF            0
 
 /* Local function prototypes */
 void loadbitmaps (void);
@@ -822,54 +823,54 @@
 
     baseWin = W_MakeWindow ("netrek", 0, 0, 1024, 768, NULL, BORDER, gColor);
 
-    w = W_MakeWindow ("local", 0, 0, WINSIDE, WINSIDE, baseWin, THICKBORDER, foreColor);
+    w = W_MakeWindow ("local", 0, 0, TWINSIDE, TWINSIDE, baseWin, THICKBORDER, foreColor);
 
     localSDB = W_InitSDB (w);
 
-    mapw = W_MakeWindow ("map", WINSIDE + 6, 0, WINSIDE, WINSIDE, baseWin,
+    mapw = W_MakeWindow ("map", TWINSIDE + 2 * THICKBORDER, 0, GWINSIDE, GWINSIDE, baseWin,
                          THICKBORDER, foreColor);
 
     mapSDB = W_InitSDB (mapw);
 
-    tstatw = W_MakeWindow ("tstat", 0, WINSIDE + 6, WINSIDE + 5,
-                            STATSIZE + 2, baseWin, BORDER, foreColor);
+    tstatw = W_MakeWindow ("tstat", 0, TWINSIDE + 2 * THICKBORDER, TWINSIDE + (2 * THICKBORDER - 2 * BORDER),
+                            STATSIZE, baseWin, BORDER, foreColor);
 
     W_SetWindowExposeHandler (tstatw, redrawTstats);
-    
-    warnw = W_MakeWindow ("warn", WINSIDE + 6, WINSIDE + 23, WINSIDE + 4, MESSAGESIZE - 4,
-                           baseWin, BORDER, foreColor);
 
-    W_SetWindowKeyDownHandler (warnw, handleMessageWindowKeyDown);
-    
-    messagew = W_MakeWindow ("message", WINSIDE + 6, WINSIDE + 6,
-                             WINSIDE + 4, MESSAGESIZE - 4, baseWin, BORDER,
-                             foreColor);
+    messagew = W_MakeWindow ("message", TWINSIDE + 2 * THICKBORDER, GWINSIDE + 2 * THICKBORDER,
+                             GWINSIDE + (2 * THICKBORDER - 2 * BORDER), MESSAGESIZE, baseWin, BORDER, foreColor);
 
     W_SetWindowKeyDownHandler (messagew, handleMessageWindowKeyDown);
     W_SetWindowButtonHandler (messagew, handleMessageWindowButton);
     W_SetWindowExposeHandler (messagew, DisplayMessage);
+    
+    warnw = W_MakeWindow ("warn", TWINSIDE + 2 * THICKBORDER, GWINSIDE + 2 * THICKBORDER + MESSAGESIZE + 2 * BORDER,
+                          GWINSIDE + (2 * THICKBORDER - 2 * BORDER), MESSAGESIZE, baseWin, BORDER, foreColor);
 
-    planetw = W_MakeTextWindow ("planet", WINSIDE + 160, 10, 57, MAXPLANETS + 3, baseWin, 2);
+    W_SetWindowKeyDownHandler (warnw, handleMessageWindowKeyDown);
+
+    planetw = W_MakeTextWindow ("planet", TWINSIDE + 2 * THICKBORDER + 10, 10, 57, MAXPLANETS + 3, baseWin, 2);
     W_SetWindowExposeHandler (planetw, planetlist);
 
     rankw = W_MakeTextWindow ("rank", 10, 300, 80, NUMRANKS + 9, baseWin, 2);
     W_SetWindowExposeHandler (rankw, ranklist);
 
-    playerw = W_MakeTextWindow ("player", 0, WINSIDE + 50, PlistMaxWidth (), 32, baseWin, 2);
+    playerw = W_MakeTextWindow ("player", 0, TWINSIDE + 2 * THICKBORDER + STATSIZE + 2 * BORDER,
+                                PlistMaxWidth (), MAXPLAYER + 3, baseWin, 2);
     W_SetWindowExposeHandler (playerw, RedrawPlayerList);
 
-    playerw2 = W_MakeTextWindow ("player2", 140, 100, PlistMaxWidth2 (), 32, baseWin, 2);
+    playerw2 = W_MakeTextWindow ("player2", 140, 100, PlistMaxWidth2 (), MAXPLAYER + 3, baseWin, 2);
     W_SetWindowExposeHandler (playerw2, RedrawPlayerList);
 
 #ifdef RECORDGAME
     if (playback)
         helpWin = W_MakeTextWindow ("help", 286,
-                          YOFF + WINSIDE + 2 * BORDER + 2 * MESSAGESIZE + 50,
+                          TWINSIDE + 2 * THICKBORDER + STATSIZE + 2 * BORDER,
                           72, 15, NULL, BORDER);
     else
 #endif
         helpWin = W_MakeTextWindow ("help", 20,
-                          YOFF + WINSIDE + 2 * BORDER + 2 * MESSAGESIZE + 30,
+                          TWINSIDE + 2 * THICKBORDER + STATSIZE + 2 * BORDER - 5,
                           160, 21, NULL, BORDER);
 
 #ifdef RECORDGAME
@@ -889,55 +890,79 @@
 #endif
 
     /* Message windows */
-    if (richText)
+    if (richText
+#ifdef RECORDGAME
+        && !playback
+#endif
+    )
     {
-        messwa = W_MakeScrollingRichTextWindow ("review_all", 506, 658, 81, 5, baseWin, BORDER);
+        messwa = W_MakeScrollingRichTextWindow ("review_all", TWINSIDE + 2 * THICKBORDER,
+                                                GWINSIDE + 2 * THICKBORDER + 2 * MESSAGESIZE + 8 * BORDER + 4 * MENU_PAD + 9 * W_Textheight,
+                                                81, 5, baseWin, BORDER);
         wam_windows[0] = messwa;
         W_SetWindowKeyDownHandler (messwa, handleMessageWindowKeyDown);
 
-        messwt = W_MakeScrollingRichTextWindow ("review_team", 506, 579, 81, 7, baseWin, BORDER);
+        messwt = W_MakeScrollingRichTextWindow ("review_team", TWINSIDE + 2 * THICKBORDER,
+                                                GWINSIDE + 2 * THICKBORDER + 2 * MESSAGESIZE + 6 * BORDER + 2 * MENU_PAD + 3 * W_Textheight,
+                                                81, 6, baseWin, BORDER);
         wam_windows[1] = messwt;
         W_SetWindowKeyDownHandler (messwt, handleMessageWindowKeyDown);
    
-        messwi = W_MakeScrollingRichTextWindow ("review_your", 506, 540, 81, 3, baseWin, BORDER);
+        messwi = W_MakeScrollingRichTextWindow ("review_your", TWINSIDE + 2 * THICKBORDER,
+                                                GWINSIDE + 2 * THICKBORDER + 2 * MESSAGESIZE + 4 * BORDER,
+                                                81, 3, baseWin, BORDER);
         wam_windows[2] = messwi;
         W_SetWindowKeyDownHandler (messwi, handleMessageWindowKeyDown);
     
-        messwk = W_MakeScrollingRichTextWindow ("review_kill", 506, 717, 81, 3, baseWin, BORDER);
+        messwk = W_MakeScrollingRichTextWindow ("review_kill", TWINSIDE + 2 * THICKBORDER,
+                                                GWINSIDE + 2 * THICKBORDER + 2 * MESSAGESIZE + 10 * BORDER + 6 * MENU_PAD + 14 * W_Textheight,
+                                                81, 3, baseWin, BORDER);
         wam_windows[3] = messwk;
 
-        phaserwin = W_MakeScrollingRichTextWindow ("review_phaser", WINSIDE + 6, YOFF + 
-                                                    WINSIDE + 3 * BORDER + 2 * MESSAGESIZE +
-                                                    15 * W_Textheight + 16, 81, 4, baseWin, BORDER);
+        phaserwin = W_MakeScrollingRichTextWindow ("review_phaser", TWINSIDE + 2 * THICKBORDER,
+                                                    GWINSIDE + 2 * THICKBORDER + 2 * MESSAGESIZE + 12 * BORDER + 8 * MENU_PAD + 17 * W_Textheight,
+                                                    81, 4, baseWin, BORDER);
         wam_windows[4] = phaserwin;
 
-        reviewWin = W_MakeScrollingRichTextWindow ("review", 506, 540, 81, 22, baseWin, BORDER);
+        reviewWin = W_MakeScrollingRichTextWindow ("review", TWINSIDE + 2 * THICKBORDER,
+                                                   GWINSIDE + 2 * THICKBORDER + 2 * MESSAGESIZE + 4 * BORDER,
+                                                   81, 20, baseWin, BORDER);
         wam_windows[5] = reviewWin;
         W_SetWindowKeyDownHandler (reviewWin, handleMessageWindowKeyDown);
     }
     else
     {
-        messwa = W_MakeScrollingWindow ("review_all", 506, 658, 81, 5, baseWin, BORDER);
+        messwa = W_MakeScrollingWindow ("review_all", TWINSIDE + 2 * THICKBORDER,
+                                        GWINSIDE + 2 * THICKBORDER + 2 * MESSAGESIZE + 8 * BORDER + 4 * MENU_PAD + 9 * W_Textheight,
+                                        81, 5, baseWin, BORDER);
         wam_windows[0] = messwa;
         W_SetWindowKeyDownHandler (messwa, handleMessageWindowKeyDown);
 
-        messwt = W_MakeScrollingWindow ("review_team", 506, 579, 81, 7, baseWin, BORDER);
+        messwt = W_MakeScrollingWindow ("review_team", TWINSIDE + 2 * THICKBORDER,
+                                        GWINSIDE + 2 * THICKBORDER + 2 * MESSAGESIZE + 6 * BORDER + 2 * MENU_PAD + 3 * W_Textheight,
+                                        81, 6, baseWin, BORDER);
         wam_windows[1] = messwt;
         W_SetWindowKeyDownHandler (messwt, handleMessageWindowKeyDown);
    
-        messwi = W_MakeScrollingWindow ("review_your", 506, 540, 81, 3, baseWin, BORDER);
+        messwi = W_MakeScrollingWindow ("review_your", TWINSIDE + 2 * THICKBORDER,
+                                        GWINSIDE + 2 * THICKBORDER + 2 * MESSAGESIZE + 4 * BORDER,
+                                        81, 3, baseWin, BORDER);
         wam_windows[2] = messwi;
         W_SetWindowKeyDownHandler (messwi, handleMessageWindowKeyDown);
     
-        messwk = W_MakeScrollingWindow ("review_kill", 506, 717, 81, 3, baseWin, BORDER);
+        messwk = W_MakeScrollingWindow ("review_kill", TWINSIDE + 2 * THICKBORDER,
+                                        GWINSIDE + 2 * THICKBORDER + 2 * MESSAGESIZE + 10 * BORDER + 6 * MENU_PAD + 14 * W_Textheight,
+                                        81, 3, baseWin, BORDER);
         wam_windows[3] = messwk;
 
-        phaserwin = W_MakeScrollingWindow ("review_phaser", WINSIDE + 6, YOFF + 
-                                           WINSIDE + 3 * BORDER + 2 * MESSAGESIZE +
-                                           15 * W_Textheight + 16, 81, 4, baseWin, BORDER);
+        phaserwin = W_MakeScrollingWindow ("review_phaser", TWINSIDE + 2 * THICKBORDER,
+                                           GWINSIDE + 2 * THICKBORDER + 2 * MESSAGESIZE + 12 * BORDER + 8 * MENU_PAD + 17 * W_Textheight,
+                                           81, 4, baseWin, BORDER);
         wam_windows[4] = phaserwin;
 
-        reviewWin = W_MakeScrollingWindow ("review", 506, 540, 81, 22, baseWin, BORDER);
+        reviewWin = W_MakeScrollingWindow ("review", TWINSIDE + 2 * THICKBORDER,
+                                           GWINSIDE + 2 * THICKBORDER + 2 * MESSAGESIZE + 4 * BORDER,
+                                           81, 20, baseWin, BORDER);
         wam_windows[5] = reviewWin;
         W_SetWindowKeyDownHandler (reviewWin, handleMessageWindowKeyDown);
     }
@@ -946,29 +971,29 @@
     for (i = 0; i < 6; i++)
         W_SetWAM (wam_windows[i]);
 
-    pStats = W_MakeWindow ("pingStats", 500, 4, pStatsWidth (), pStatsHeight (),
+    pStats = W_MakeWindow ("pingStats", TWINSIDE + 10, 4, pStatsWidth (), pStatsHeight (),
                             baseWin, 1, foreColor);
     W_SetWindowExposeHandler (pStats, redrawPStats);
 
-    udpWin = W_MakeMenu ("UDP", WINSIDE + 10, -BORDER + 10, 40, UDP_NUMOPTS, NULL, 2);
+    udpWin = W_MakeMenu ("UDP", TWINSIDE + 10, -BORDER + 10, 40, UDP_NUMOPTS, NULL, 2);
     W_SetWindowButtonHandler (udpWin, udpaction);
 
 #ifdef SHORT_PACKETS
-    spWin = W_MakeMenu ("network", WINSIDE + 10, -BORDER + 10, 40, SPK_NUMFIELDS, NULL, 2);
+    spWin = W_MakeMenu ("network", TWINSIDE + 10, -BORDER + 10, 40, SPK_NUMFIELDS, NULL, 2);
     W_SetWindowKeyDownHandler (spWin, spaction);
     W_SetWindowButtonHandler (spWin, spaction);
 #endif
 
 #if defined(SOUND)
-    soundWin = W_MakeMenu("sound", WINSIDE + 20, -BORDER + 10, 33,
-                        14, NULL, 2);
+    soundWin = W_MakeMenu("sound", TWINSIDE + 20, -BORDER + 10, 33,
+                        sound_window_height(), NULL, 2);
     W_SetWindowKeyDownHandler(soundWin, soundaction);
     W_SetWindowButtonHandler(soundWin, soundaction);
     W_DefineArrowCursor(soundWin);
 #endif
 
 #ifdef TOOLS
-    toolsWin = W_MakeScrollingWindow ("tools", WINSIDE + BORDER, BORDER,
+    toolsWin = W_MakeScrollingWindow ("tools", TWINSIDE + BORDER, BORDER,
                                         80, TOOLSWINLEN, NULL, BORDER);
     W_DefineTrekCursor (toolsWin);
 #endif
@@ -984,13 +1009,14 @@
 
     for (i = 0; i < 4; i++)
     {
-        teamWin[i] = W_MakeWindow (teamshort[1 << i], i * BOXSIDE, WINSIDE - BOXSIDE,
+        teamWin[i] = W_MakeWindow (teamshort[1 << i], i * BOXSIDE, TWINSIDE - BOXSIDE,
                                     BOXSIDE, BOXSIDE, w, 1, foreColor);
     }
-    qwin = W_MakeWindow ("quit", 4 * BOXSIDE, WINSIDE - BOXSIDE, BOXSIDE,
+    qwin = W_MakeWindow ("quit", 4 * BOXSIDE, TWINSIDE - BOXSIDE, BOXSIDE,
                          BOXSIDE, w, 1, foreColor);
 
-    statwin = W_MakeWindow ("stats", 405, 506, 100, 80, baseWin, BORDER, foreColor);
+    statwin = W_MakeWindow ("stats", TWINSIDE + 2 * THICKBORDER - 100, TWINSIDE + 2 * THICKBORDER,
+                            100, 80, baseWin, BORDER, foreColor);
     W_SetWindowExposeHandler (statwin, redrawStats);
 
     W_DefineTrekCursor (baseWin);
@@ -1033,7 +1059,7 @@
 #define WARWIDTH 20
 #define WARBORDER 2
 
-    war = W_MakeMenu ("war", WINSIDE + 10, -BORDER + 10, WARWIDTH, 6, baseWin, WARBORDER);
+    war = W_MakeMenu ("war", TWINSIDE + 10, -BORDER + 10, WARWIDTH, 6, baseWin, WARBORDER);
     W_SetWindowButtonHandler (war, waraction);
     W_DefineArrowCursor (war);
 
@@ -1366,12 +1392,12 @@
         W_StoreBitmap3 ("bitmaps/misclib/color/oriteam.bmp", BMP_TEAM_SELECT_WIDTH,
                         BMP_TEAM_SELECT_HEIGHT, BMP_ORITEAM, w, LR_DEFAULTCOLOR);
     genopic =
-        W_StoreBitmap3 ("bitmaps/misclib/color/genocide.bmp", WINSIDE,
-                        WINSIDE, BMP_GENO, w, LR_DEFAULTCOLOR);
+        W_StoreBitmap3 ("bitmaps/misclib/color/genocide.bmp", BMP_GENO_WIDTH,
+                        BMP_GENO_HEIGHT, BMP_GENO, w, LR_DEFAULTCOLOR);
 
     genopic2 =
-        W_StoreBitmap3 ("bitmaps/misclib/color/genocide2.bmp", WINSIDE,
-                        WINSIDE, BMP_GENO2, w, LR_DEFAULTCOLOR);                      
+        W_StoreBitmap3 ("bitmaps/misclib/color/genocide2.bmp", BMP_GENO_WIDTH,
+                        BMP_GENO_HEIGHT, BMP_GENO2, w, LR_DEFAULTCOLOR);                      
 }
 
 
@@ -1909,12 +1935,12 @@
 
     sprintf (buf, "---  %s  ---", (char *) query_cowid ());
     length = strlen (buf);
-    center = WINSIDE / 2 - (length * W_Textwidth) / 2;
+    center = 250 - (length * W_Textwidth) / 2;
     W_WriteText (motdwin, center, W_Textheight, textColor,
                  buf, length, W_BoldFont);
     sprintf (buf, CBUGS);
     length = strlen (buf);
-    center = WINSIDE / 2 - (length * W_Textwidth) / 2;
+    center = 250 - (length * W_Textwidth) / 2;
     W_WriteText (motdwin, center, 3 * W_Textheight, textColor,
                  buf, length, W_RegularFont);
 
@@ -2095,16 +2121,24 @@
         switch (teamNo)
         {
             case 0:
-                W_WriteBitmap ( 0, 0, fedteam, foreColor, win);
+                W_WriteScaleBitmap ( 0, 0, BOXSIDE, BOXSIDE,
+                                     BMP_TEAM_SELECT_WIDTH, BMP_TEAM_SELECT_HEIGHT,
+                                     0, fedteam, foreColor, win);
                 break;
             case 1:
-                W_WriteBitmap ( 0, 0, romteam, foreColor, win);
+                W_WriteScaleBitmap ( 0, 0, BOXSIDE, BOXSIDE,
+                                     BMP_TEAM_SELECT_WIDTH, BMP_TEAM_SELECT_HEIGHT,
+                                     0, romteam, foreColor, win);
                 break;
             case 2:
-                W_WriteBitmap ( 0, 0, kliteam, foreColor, win);
+                W_WriteScaleBitmap ( 0, 0, BOXSIDE, BOXSIDE,
+                                     BMP_TEAM_SELECT_WIDTH, BMP_TEAM_SELECT_HEIGHT,
+                                     0, kliteam, foreColor, win);
                 break;
             case 3:
-                W_WriteBitmap ( 0, 0, oriteam, foreColor, win);
+                W_WriteScaleBitmap ( 0, 0, BOXSIDE, BOXSIDE,
+                                     BMP_TEAM_SELECT_WIDTH, BMP_TEAM_SELECT_HEIGHT,
+                                     0, oriteam, foreColor, win);
                 break;
         }
     }
@@ -2125,7 +2159,14 @@
 void
 redrawQuit (void)
 {
-    W_WriteText (qwin, 5, 5, textColor, "Quit Netrek XP", 14, W_RegularFont);
+    int xoff;
+    
+    xoff = (BOXSIDE / 2) - 7 * W_Textwidth;
+    if (xoff < 1)
+        xoff = 5;
+
+    W_WriteText (qwin, xoff, 5, textColor,
+                 "Quit Netrek XP", 14, W_RegularFont);
 }
 
 #define CLOCK_BDR       0
@@ -2170,8 +2211,10 @@
         cy = CLOCK_Y + CLOCK_HEI / 2;
         
         angle = (int)(-360 * time / max);
-        W_WriteBitmap ( CLOCK_BDR, CLOCK_BDR, clockpic, foreColor, qwin);
-        W_OverlayScaleBitmap (CLOCK_BDR, CLOCK_BDR, BMP_CHAND_WIDTH, BMP_CHAND_HEIGHT,
+        W_WriteScaleBitmap (CLOCK_BDR, CLOCK_BDR, BOXSIDE, BOXSIDE,
+                            BMP_CCLOCK_WIDTH, BMP_CCLOCK_HEIGHT,
+                            0, clockpic, foreColor, qwin);
+        W_OverlayScaleBitmap (CLOCK_BDR, CLOCK_BDR, BOXSIDE, BOXSIDE,
                               BMP_CHAND_WIDTH, BMP_CHAND_HEIGHT,
                               angle, clockhandpic, foreColor, qwin);
         sprintf (buf, "%d", max - time);

Index: input.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/input.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- input.c	5 Apr 2007 12:57:22 -0000	1.31
+++ input.c	6 Apr 2007 06:46:31 -0000	1.32
@@ -345,13 +345,13 @@
 
     if (ww == mapw)
     {
-        g_x = x * GWIDTH / WINSIDE;
-        g_y = y * GWIDTH / WINSIDE;
+        g_x = x * GWIDTH / GWINSIDE;
+        g_y = y * GWIDTH / GWINSIDE;
     }
     else
     {
-        g_x = me->p_x + ((x - WINSIDE / 2) * SCALE);
-        g_y = me->p_y + ((y - WINSIDE / 2) * SCALE);
+        g_x = me->p_x + ((x - TWINSIDE / 2) * SCALE);
+        g_y = me->p_y + ((y - TWINSIDE / 2) * SCALE);
     }
     closedist = GWIDTH;
 
@@ -1872,16 +1872,16 @@
     {
         int me_x, me_y;
 
-        me_x = me->p_x * WINSIDE / GWIDTH;
-        me_y = me->p_y * WINSIDE / GWIDTH;
+        me_x = me->p_x * GWINSIDE / GWIDTH;
+        me_y = me->p_y * GWINSIDE / GWIDTH;
         return ((unsigned char) nint ((atan2 ((double) (x - me_x),
                                               (double) (me_y -
                                                         y)) / 3.14159 *
                                        128.) + 0.5));
     }
     else
-        return ((unsigned char) nint ((atan2 ((double) (x - WINSIDE / 2),
-                                              (double) (WINSIDE / 2 - y))
+        return ((unsigned char) nint ((atan2 ((double) (x - TWINSIDE / 2),
+                                              (double) (TWINSIDE / 2 - y))
                                        / 3.14159 * 128.) + 0.5));
 }
 

Index: local.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- local.c	5 Apr 2007 12:57:22 -0000	1.86
+++ local.c	6 Apr 2007 06:46:31 -0000	1.87
@@ -66,10 +66,12 @@
 
 static void redrawStarSector(int sectorx, int sectory);
 
-#define scaleLocal(pt)           ((pt)/SCALE + (WINSIDE/2))
+#define scaleLocal(pt)           ((pt)/SCALE + (TWINSIDE/2))
 
 #define STARSIDE 500          /* Used to normalize star density */
 #define INFORANGE 500         /* Range at which server stops sending some data */
+/* Max range at which other's torps can be seen, used in scaling sound volume */
+#define SOUND_MAXRANGE (int)(sqrt)(INFORANGE * INFORANGE/2)
 
 static struct _star stars[10][10][16];
 
@@ -81,14 +83,20 @@
 {
     int newdx, newdy;
 
-    newdx = dx - WINSIDE/2;
-    newdy = dy - WINSIDE/2;
+    newdx = dx - TWINSIDE/2;
+    newdy = dy - TWINSIDE/2;
 
     distance = (int) sqrt((newdx)*(newdx) + (newdy)*(newdy));
     // Normalize from 0 to 255, 0 being on top of player, 255 being max distance
-    // which would be a diagonal from player to corner of tactical
-    // Reason for normalization is Mix_SetDistance requires that range        
-    distance = (int)((255 * distance)/CORNER_DIST);
+    // which would be a diagonal from player to corner of window where server
+    // stops sending some information (INFORANGE).  This normalization assumes that
+    // the local window (TWINSIDE) matches the range at which some data is sent
+    // (INFORANGE).  If TWINSIDE is increased, distances can now exceed SOUND_MAXRANGE
+    // causing the normalization to not quite work.  These far distance events (such
+    // as a ship cloaking, explosions, etc) will play at minimum sound volume
+    // (essentially inaudible) due to a bounds check in Play_Sound_Loc().
+    // Reason for normalization is Mix_SetDistance requires that range.
+    distance = (int)((255 * distance)/SOUND_MAXRANGE);
     // Calculate angle, then adjust as necessary for Mix_SetDistance
     if (distance != 0)
     {
@@ -124,11 +132,11 @@
     register int i, j, k;
 
     /* Star density: 16 stars per 20000 x 20000 galactic region */
-    for (i = 0; i < (5 * STARSIDE / WINSIDE + 1); i++) {
-       for (j = 0; j < (5 * STARSIDE / WINSIDE + 1); j++) {
-            for (k = 0; k < (16 * (WINSIDE / STARSIDE) * (WINSIDE / STARSIDE)); k++) {
-                stars[i][j][k].s_x = RANDOM() % 20000 * WINSIDE / STARSIDE;
-                stars[i][j][k].s_y = RANDOM() % 20000 * WINSIDE / STARSIDE;
+    for (i = 0; i < (5 * STARSIDE / TWINSIDE + 1); i++) {
+       for (j = 0; j < (5 * STARSIDE / TWINSIDE + 1); j++) {
+            for (k = 0; k < (16 * (TWINSIDE / STARSIDE) * (TWINSIDE / STARSIDE)); k++) {
+                stars[i][j][k].s_x = RANDOM() % 20000 * TWINSIDE / STARSIDE;
+                stars[i][j][k].s_y = RANDOM() % 20000 * TWINSIDE / STARSIDE;
                 stars[i][j][k].s_color = randcolor();
             }
         }
@@ -139,10 +147,10 @@
 void
 DrawStars()
 {
-    const int fullview = WINSIDE * SCALE;
-    const int view = WINSIDE * SCALE / 2;
+    const int fullview = TWINSIDE * SCALE;
+    const int view = TWINSIDE * SCALE / 2;
     /*
-       note: cpp symbols in expressions (WINSIDE*SCALE) will be precalculated
+       note: cpp symbols in expressions (TWINSIDE*SCALE) will be precalculated
        by any C optimizer
     */ 
     int sectorx = me->p_x / (fullview);
@@ -171,7 +179,7 @@
         sector_offy += fullview; 
     }   
 
-#define MAXSECTOR   (5 * STARSIDE / WINSIDE) + 1
+#define MAXSECTOR   (5 * STARSIDE / TWINSIDE) + 1
   
     /* at worst we have to redraw 4 star sectors */
 
@@ -231,8 +239,8 @@
 static void
 redrawStarSector (int sectorx, int sectory)
 {
-    const int fullview = WINSIDE * SCALE;
-    const int view = WINSIDE * SCALE / 2;
+    const int fullview = TWINSIDE * SCALE;
+    const int view = TWINSIDE * SCALE / 2;
     register int i, dx, dy, dxx, dyy;
     register int xbase = sectorx * fullview;
     register int ybase = sectory * fullview;
@@ -292,7 +300,7 @@
             }
             dxx = (int) (Cos[mydir] * streaklength / 10);
             dyy = (int) (Sin[mydir] * streaklength / 10);
-            for (i = 0, s = star_sector; i < (16 * (WINSIDE / STARSIDE) * (WINSIDE / STARSIDE)); i++, s++)
+            for (i = 0, s = star_sector; i < (16 * (TWINSIDE / STARSIDE) * (TWINSIDE / STARSIDE)); i++, s++)
             {
                 if (s->s_x + xbase > GWIDTH || s->s_y + ybase > GWIDTH)
                     continue;
@@ -315,7 +323,7 @@
             return;
         }
     }
-    for (i = 0, s = star_sector; i < (16 * (WINSIDE / STARSIDE) * (WINSIDE / STARSIDE)); i++, s++)
+    for (i = 0, s = star_sector; i < (16 * (TWINSIDE / STARSIDE) * (TWINSIDE / STARSIDE)); i++, s++)
     {
         if (s->s_x  + xbase > GWIDTH || s->s_y + ybase > GWIDTH)
             continue;
@@ -512,7 +520,7 @@
 {
     register int dx, dy;
     register struct planet *l;
-    const int view = SCALE * WINSIDE / 2 + BMP_PLANET_WIDTH * SCALE / 2;
+    const int view = SCALE * TWINSIDE / 2 + BMP_PLANET_WIDTH * SCALE / 2;
 
     for (l = planets + MAXPLANETS - 1; l >= planets; --l)
     {
@@ -521,8 +529,8 @@
         if (dx > view || dx < -view || dy > view || dy < -view)
             continue;
 
-        dx = dx / SCALE + WINSIDE / 2;
-        dy = dy / SCALE + WINSIDE / 2;
+        dx = dx / SCALE + TWINSIDE / 2;
+        dy = dy / SCALE + TWINSIDE / 2;
         
         if (planetBitmap == 3)
         {
@@ -676,7 +684,7 @@
     int buflen = 1;
     static int ph_col = 0;
     static int scaled_ph_col = 0;
-    const int view = SCALE * WINSIDE / 2 + BMP_SHIELD_WIDTH * SCALE / 2;
+    const int view = SCALE * TWINSIDE / 2 + BMP_SHIELD_WIDTH * SCALE / 2;
     int dx, dy, px, py, wx, wy, tx, ty, lx, ly;
     int new_dx, new_dy;
     int startx, starty, endx, endy;
@@ -746,8 +754,8 @@
         if (dx > view || dx < -view || dy > view || dy < -view)
             continue;
 
-        dx = dx / SCALE + WINSIDE / 2;
-        dy = dy / SCALE + WINSIDE / 2;
+        dx = dx / SCALE + TWINSIDE / 2;
+        dy = dy / SCALE + TWINSIDE / 2;
 
         cloak_phases = CLOAK_PHASES * server_ups / 10;
         if (j->p_flags & PFCLOAK)
@@ -1170,9 +1178,9 @@
             {
             	if (myPlayer(j))
             	{
-                    W_WriteCircle(w, WINSIDE/2, WINSIDE/2, DETDIST/SCALE, 0, 0, W_Red);         
-                    clearzone[0][clearcount] = WINSIDE/2 - (DETDIST/SCALE);
-                    clearzone[1][clearcount] = WINSIDE/2 - (DETDIST/SCALE);
+                    W_WriteCircle(w, TWINSIDE/2, TWINSIDE/2, DETDIST/SCALE, 0, 0, W_Red);         
+                    clearzone[0][clearcount] = TWINSIDE/2 - (DETDIST/SCALE);
+                    clearzone[1][clearcount] = TWINSIDE/2 - (DETDIST/SCALE);
                     clearzone[2][clearcount] = 2*DETDIST/SCALE + 1;
                     clearzone[3][clearcount] = 2*DETDIST/SCALE + 1;
                     clearcount++;
@@ -1232,9 +1240,9 @@
             {
             	if (myPlayer(j) || isObsLockPlayer(j))
             	{
-                    W_WriteCircle(w, WINSIDE/2, WINSIDE/2, SHOTRANGE/SCALE, 0, 0, W_Grey);         
-                    clearzone[0][clearcount] = WINSIDE/2 - (SHOTRANGE/SCALE);
-                    clearzone[1][clearcount] = WINSIDE/2 - (SHOTRANGE/SCALE);
+                    W_WriteCircle(w, TWINSIDE/2, TWINSIDE/2, SHOTRANGE/SCALE, 0, 0, W_Grey);         
+                    clearzone[0][clearcount] = TWINSIDE/2 - (SHOTRANGE/SCALE);
+                    clearzone[1][clearcount] = TWINSIDE/2 - (SHOTRANGE/SCALE);
                     clearzone[2][clearcount] = 2*SHOTRANGE/SCALE + 1;
                     clearzone[3][clearcount] = 2*SHOTRANGE/SCALE + 1;
                     clearcount++;
@@ -1274,7 +1282,7 @@
             	else
             	{
             	    /* draw */
-            	    W_WriteTTSText(w, WINSIDE, tts_ypos, lastIn, tts_len);
+            	    W_WriteTTSText(w, TWINSIDE, tts_ypos, lastIn, tts_len);
             	    clearzone[0][clearcount] = last_tts_xpos;
                     clearzone[1][clearcount] = tts_ypos - W_Textheight;
                     clearzone[2][clearcount] = last_tts_width;
@@ -1512,13 +1520,13 @@
                     ty = (int) (PHASEDIST * j->p_ship.s_phaserdamage / 100 *
                                 Sin[php->ph_dir]);
 
-                    tx = (j->p_x + tx - me->p_x) / SCALE + WINSIDE / 2;
-                    ty = (j->p_y + ty - me->p_y) / SCALE + WINSIDE / 2;
+                    tx = (j->p_x + tx - me->p_x) / SCALE + TWINSIDE / 2;
+                    ty = (j->p_y + ty - me->p_y) / SCALE + TWINSIDE / 2;
                 }
                 else if (php->ph_status == PHHIT2)
                 {
-                    tx = (php->ph_x - me->p_x) / SCALE + WINSIDE / 2;
-                    ty = (php->ph_y - me->p_y) / SCALE + WINSIDE / 2;
+                    tx = (php->ph_x - me->p_x) / SCALE + TWINSIDE / 2;
+                    ty = (php->ph_y - me->p_y) / SCALE + TWINSIDE / 2;
                 }
                 else
                 {
@@ -1536,9 +1544,9 @@
                     else
                     {
                         tx = (players[php->ph_target].p_x - me->p_x) /
-                            SCALE + WINSIDE / 2;
+                            SCALE + TWINSIDE / 2;
                         ty = (players[php->ph_target].p_y - me->p_y) /
-                            SCALE + WINSIDE / 2;
+                            SCALE + TWINSIDE / 2;
                     }
                 }
 
@@ -1766,8 +1774,8 @@
                     px = (tractee->p_x - me->p_x);
                     py = (tractee->p_y - me->p_y);
 
-                    px = px / SCALE + WINSIDE / 2;
-                    py = py / SCALE + WINSIDE / 2;
+                    px = px / SCALE + TWINSIDE / 2;
+                    py = py / SCALE + TWINSIDE / 2;
 
                     if (px == dx && py == dy)
                         continue;       /* this had better be last
@@ -1847,7 +1855,7 @@
     int torpCount;
     int torpTeam;
     int frame;
-    const int view = SCALE * WINSIDE / 2;
+    const int view = SCALE * TWINSIDE / 2;
 
     for (t = torps, j = players; j != players + MAXPLAYER; t += MAXTORP, ++j)
     {
@@ -1902,8 +1910,8 @@
             if (dx > view || dx < -view || dy > view || dy < -view)
                 continue;
 
-            dx = dx / SCALE + WINSIDE / 2;
-            dy = dy / SCALE + WINSIDE / 2;
+            dx = dx / SCALE + TWINSIDE / 2;
+            dy = dy / SCALE + TWINSIDE / 2;
 
 #ifdef SOUND
             if (j != me)
@@ -2085,7 +2093,7 @@
 {
     register struct plasmatorp *pt;
     register int dx, dy;
-    const int view = SCALE * WINSIDE / 2;
+    const int view = SCALE * TWINSIDE / 2;
     int ptorpTeam;
     int frame;
 
@@ -2130,8 +2138,8 @@
         if (dx > view || dx < -view || dy > view || dy < -view)
             continue;
 
-        dx = dx / SCALE + WINSIDE / 2;
-        dy = dy / SCALE + WINSIDE / 2;
+        dx = dx / SCALE + TWINSIDE / 2;
+        dy = dy / SCALE + TWINSIDE / 2;
 
 #ifdef SOUND
         if (pt->pt_owner != me->p_no)
@@ -2309,11 +2317,11 @@
 {
     register struct player *j;
     register int dx, dy;
-    const int view = SCALE * WINSIDE / 2;
+    const int view = SCALE * TWINSIDE / 2;
 
 #ifdef HOCKEY_LINES
     register struct s_line *sl;
-    const int HALF_WINSIDE = WINSIDE / 2;
+    const int HALF_WINSIDE = TWINSIDE / 2;
     int ex, ey, sx, sy;
 #endif
 
@@ -2333,13 +2341,13 @@
                     if ((sy =
                          HALF_WINSIDE - (me->p_y - sl->begin_y) / SCALE) < 0)
                         sy = 0;
-                    if (sy > (WINSIDE - 1))
-                        sy = WINSIDE - 1;
+                    if (sy > (TWINSIDE - 1))
+                        sy = TWINSIDE - 1;
                     if ((ey =
                          HALF_WINSIDE - (me->p_y - sl->end_y) / SCALE) < 0)
                         ey = 0;
-                    if (ey > (WINSIDE - 1))
-                        ey = WINSIDE - 1;
+                    if (ey > (TWINSIDE - 1))
+                        ey = TWINSIDE - 1;
                     if (sy == ey)
                         continue;
                 }
@@ -2357,13 +2365,13 @@
                     if ((sx =
                          HALF_WINSIDE - (me->p_x - sl->begin_x) / SCALE) < 0)
                         sx = 0;
-                    if (sx > (WINSIDE - 1))
-                        sx = WINSIDE - 1;
+                    if (sx > (TWINSIDE - 1))
+                        sx = TWINSIDE - 1;
                     if ((ex =
                          HALF_WINSIDE - (me->p_x - sl->end_x) / SCALE) < 0)
                         ex = 0;
-                    if (ex > (WINSIDE - 1))
-                        ex = WINSIDE - 1;
+                    if (ex > (TWINSIDE - 1))
+                        ex = TWINSIDE - 1;
                     if (sx == ex)
                         continue;
                 }
@@ -2384,59 +2392,110 @@
 #endif /* HOCKEY_LINES */
 
     /* Draw inforange box (if necessary) */
-    if ( WINSIDE > INFORANGE )
+    if ( infoRange && TWINSIDE > INFORANGE && !(me->p_x < 0 || me->p_x > GWIDTH))
     {
-        dx = (WINSIDE / 2) + (INFORANGE / 2);
-        sy = (WINSIDE / 2) - (INFORANGE / 2);
-        ey = (WINSIDE / 2) + (INFORANGE / 2);
-        W_MakeDashedLine (w, dx, sy, dx, ey, W_White);
-        clearline[0][clearlcount] = dx;
-        clearline[1][clearlcount] = sy;
-        clearline[2][clearlcount] = dx;
-        clearline[3][clearlcount] = ey;
-        clearlcount++;
-        
-        dx = (WINSIDE / 2) - (INFORANGE / 2);
-        sy = (WINSIDE / 2) - (INFORANGE / 2);
-        ey = (WINSIDE / 2) + (INFORANGE / 2);
-        W_MakeDashedLine (w, dx, sy, dx, ey, W_White);
-        clearline[0][clearlcount] = dx;
-        clearline[1][clearlcount] = sy;
-        clearline[2][clearlcount] = dx;
-        clearline[3][clearlcount] = ey;
-        clearlcount++;
-        
-        dy = (WINSIDE / 2) + (INFORANGE / 2);
-        sx = (WINSIDE / 2) - (INFORANGE / 2);
-        ex = (WINSIDE / 2) + (INFORANGE / 2);
-        W_MakeDashedLine (w, sx, dy, ex, dy, W_White);
-        clearline[0][clearlcount] = sx;
-        clearline[1][clearlcount] = dy;
-        clearline[2][clearlcount] = ex;
-        clearline[3][clearlcount] = dy;
-        clearlcount++;
-        
-        dy = (WINSIDE / 2) - (INFORANGE / 2);
-        sx = (WINSIDE / 2) - (INFORANGE / 2);
-        ex = (WINSIDE / 2) + (INFORANGE / 2);
-        W_MakeDashedLine (w, sx, dy, ex, dy, W_White);
-        clearline[0][clearlcount] = sx;
-        clearline[1][clearlcount] = dy;
-        clearline[2][clearlcount] = ex;
-        clearline[3][clearlcount] = dy;
-        clearlcount++;
+        const int LEFT = (TWINSIDE / 2) - (INFORANGE / 2);
+        const int RIGHT = (TWINSIDE / 2) + (INFORANGE / 2);
+        const int TOP = (TWINSIDE / 2) - (INFORANGE / 2);
+        const int BOTTOM = (TWINSIDE / 2) + (INFORANGE / 2);
+
+        long dist;
+
+        if (me->p_x > (INFORANGE / 2) * SCALE)
+        {
+            dx = LEFT;
+            dist = me->p_y - ((INFORANGE / 2) * SCALE);
+            if (dist < 0)
+                sy = (TOP - dist/SCALE);
+            else
+                sy = TOP;
+            dist = me->p_y + ((INFORANGE / 2) * SCALE);
+            if (dist > GWIDTH)
+                ey = (BOTTOM - (dist - GWIDTH)/SCALE);
+            else
+                ey = BOTTOM;
+            W_MakeDashedLine (w, dx, sy, dx, ey, W_White);
+            clearline[0][clearlcount] = dx;
+            clearline[1][clearlcount] = sy;
+            clearline[2][clearlcount] = dx;
+            clearline[3][clearlcount] = ey;
+            clearlcount++;
+        }
+
+        if ((GWIDTH - me->p_x) > (INFORANGE / 2) * SCALE)
+        {
+            dx = RIGHT;
+            dist = me->p_y - ((INFORANGE / 2) * SCALE);
+            if (dist < 0)
+                sy = (TOP - dist/SCALE);
+            else
+                sy = TOP;
+            dist = me->p_y + ((INFORANGE / 2) * SCALE);
+            if (dist > GWIDTH)
+                ey = (BOTTOM - (dist - GWIDTH)/SCALE);
+            else
+                ey = BOTTOM;
+            W_MakeDashedLine (w, dx, sy, dx, ey, W_White);
+            clearline[0][clearlcount] = dx;
+            clearline[1][clearlcount] = sy;
+            clearline[2][clearlcount] = dx;
+            clearline[3][clearlcount] = ey;
+            clearlcount++;
+        }
+
+        if (me->p_y > (INFORANGE / 2) * SCALE)
+        {
+            dy = TOP;
+            dist = me->p_x - ((INFORANGE / 2) * SCALE);
+            if (dist < 0)
+                sx = (LEFT - dist/SCALE);
+            else
+                sx = LEFT;
+            dist = me->p_x + ((INFORANGE / 2) * SCALE);
+            if (dist > GWIDTH)
+                ex = (RIGHT - (dist - GWIDTH)/SCALE);
+            else
+                ex = RIGHT;
+            W_MakeDashedLine (w, sx, dy, ex, dy, W_White);
+            clearline[0][clearlcount] = sx;
+            clearline[1][clearlcount] = dy;
+            clearline[2][clearlcount] = ex;
+            clearline[3][clearlcount] = dy;
+            clearlcount++;
+        }
+
+        if ((GWIDTH - me->p_y) > (INFORANGE/ 2) * SCALE)
+        {
+            dy = BOTTOM;
+            dist = me->p_x - ((INFORANGE / 2) * SCALE);
+            if (dist < 0)
+                sx = (LEFT - dist/SCALE);
+            else
+                sx = LEFT;
+            dist = me->p_x + ((INFORANGE / 2) * SCALE);
+            if (dist > GWIDTH)
+                ex = (RIGHT - (dist - GWIDTH)/SCALE);
+            else
+                ex = RIGHT;
+            W_MakeDashedLine (w, sx, dy, ex, dy, W_White);
+            clearline[0][clearlcount] = sx;
+            clearline[1][clearlcount] = dy;
+            clearline[2][clearlcount] = ex;
+            clearline[3][clearlcount] = dy;
+            clearlcount++;
+        }
     }
 
     /* Draw Edges */
-    if (me->p_x < (WINSIDE / 2) * SCALE)
+    if (me->p_x < (TWINSIDE / 2) * SCALE)
     {
-        dx = (WINSIDE / 2) - (me->p_x) / SCALE;
-        sy = (WINSIDE / 2) + (0 - me->p_y) / SCALE;
-        ey = (WINSIDE / 2) + (GWIDTH - me->p_y) / SCALE;
+        dx = (TWINSIDE / 2) - (me->p_x) / SCALE;
+        sy = (TWINSIDE / 2) + (0 - me->p_y) / SCALE;
+        ey = (TWINSIDE / 2) + (GWIDTH - me->p_y) / SCALE;
         if (sy < 0)
             sy = 0;
-        if (ey > WINSIDE - 1)
-            ey = WINSIDE - 1;
+        if (ey > TWINSIDE - 1)
+            ey = TWINSIDE - 1;
         /* XFIX */
         W_CacheLine (w, dx, sy, dx, ey, warningColor);
         clearline[0][clearlcount] = dx;
@@ -2446,15 +2505,15 @@
         clearlcount++;
     }
 
-    if ((GWIDTH - me->p_x) < (WINSIDE / 2) * SCALE)
+    if ((GWIDTH - me->p_x) < (TWINSIDE / 2) * SCALE)
     {
-        dx = (WINSIDE / 2) + (GWIDTH - me->p_x) / SCALE;
-        sy = (WINSIDE / 2) + (0 - me->p_y) / SCALE;
-        ey = (WINSIDE / 2) + (GWIDTH - me->p_y) / SCALE;
+        dx = (TWINSIDE / 2) + (GWIDTH - me->p_x) / SCALE;
+        sy = (TWINSIDE / 2) + (0 - me->p_y) / SCALE;
+        ey = (TWINSIDE / 2) + (GWIDTH - me->p_y) / SCALE;
         if (sy < 0)
             sy = 0;
-        if (ey > WINSIDE - 1)
-            ey = WINSIDE - 1;
+        if (ey > TWINSIDE - 1)
+            ey = TWINSIDE - 1;
         /* XFIX */
         W_CacheLine (w, dx, sy, dx, ey, warningColor);
         clearline[0][clearlcount] = dx;
@@ -2464,15 +2523,15 @@
         clearlcount++;
     }
 
-    if (me->p_y < (WINSIDE / 2) * SCALE)
+    if (me->p_y < (TWINSIDE / 2) * SCALE)
     {
-        dy = (WINSIDE / 2) - (me->p_y) / SCALE;
-        sx = (WINSIDE / 2) + (0 - me->p_x) / SCALE;
-        ex = (WINSIDE / 2) + (GWIDTH - me->p_x) / SCALE;
+        dy = (TWINSIDE / 2) - (me->p_y) / SCALE;
+        sx = (TWINSIDE / 2) + (0 - me->p_x) / SCALE;
+        ex = (TWINSIDE / 2) + (GWIDTH - me->p_x) / SCALE;
         if (sx < 0)
             sx = 0;
-        if (ex > WINSIDE - 1)
-            ex = WINSIDE - 1;
+        if (ex > TWINSIDE - 1)
+            ex = TWINSIDE - 1;
         /* XFIX */
         W_CacheLine (w, sx, dy, ex, dy, warningColor);
         clearline[0][clearlcount] = sx;
@@ -2482,15 +2541,15 @@
         clearlcount++;
     }
 
-    if ((GWIDTH - me->p_y) < (WINSIDE / 2) * SCALE)
+    if ((GWIDTH - me->p_y) < (TWINSIDE / 2) * SCALE)
     {
-        dy = (WINSIDE / 2) + (GWIDTH - me->p_y) / SCALE;
-        sx = (WINSIDE / 2) + (0 - me->p_x) / SCALE;
-        ex = (WINSIDE / 2) + (GWIDTH - me->p_x) / SCALE;
+        dy = (TWINSIDE / 2) + (GWIDTH - me->p_y) / SCALE;
+        sx = (TWINSIDE / 2) + (0 - me->p_x) / SCALE;
+        ex = (TWINSIDE / 2) + (GWIDTH - me->p_x) / SCALE;
         if (sx < 0)
             sx = 0;
-        if (ex > WINSIDE - 1)
-            ex = WINSIDE - 1;
+        if (ex > TWINSIDE - 1)
+            ex = TWINSIDE - 1;
         /* XFIX */
         W_CacheLine (w, sx, dy, ex, dy, warningColor);
         clearline[0][clearlcount] = sx;
@@ -2597,9 +2656,9 @@
             Play_Sound_Loc(FIRE_PLASMA_OTHER_WAV, SF_OTHER|SF_WEAPONS, other_plasma_angle, other_plasma_dist);
     }
     // Reset locations and fuses of other's closest torps and plasmas
-    other_torp_dist = CORNER_DIST;
+    other_torp_dist = SOUND_MAXRANGE;
     other_torp_angle = 0;
-    other_plasma_dist = CORNER_DIST;
+    other_plasma_dist = SOUND_MAXRANGE;
     other_plasma_angle = 0;
 
     sound_flags = me->p_flags;
@@ -2627,8 +2686,8 @@
                 dy = j->p_y - me->p_y;
                 if (ABS (dx) < view && ABS (dy) < view)
                 {
-                    dx = dx / SCALE + WINSIDE / 2;
-                    dy = dy / SCALE + WINSIDE / 2;
+                    dx = dx / SCALE + TWINSIDE / 2;
+                    dy = dy / SCALE + TWINSIDE / 2;
                     tri_x = dx + 0;
                     tri_y = dy + 20;    /* below ship */
                     facing = 1;
@@ -2644,8 +2703,8 @@
             dy = l->pl_y - me->p_y;
             if (ABS (dx) < view && ABS (dy) < view)
             {
-                dx = dx / SCALE + WINSIDE / 2;
-                dy = dy / SCALE + WINSIDE / 2;
+                dx = dx / SCALE + TWINSIDE / 2;
+                dy = dy / SCALE + TWINSIDE / 2;
                 tri_x = dx;
                 tri_y = dy - 20;        /* below planet */
                 facing = 0;

Index: enter.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/enter.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- enter.c	14 Mar 2007 23:24:08 -0000	1.9
+++ enter.c	6 Apr 2007 06:46:31 -0000	1.10
@@ -325,12 +325,12 @@
 
     /* This part defines galaxy lines */
 #define G_RINK_TOP 0
-#define G_RINK_BOTTOM (WINSIDE)
+#define G_RINK_BOTTOM (GWINSIDE)
 #define G_TENTH (((G_RINK_BOTTOM - G_RINK_TOP)/10))
 #define G_R_MID (((G_RINK_BOTTOM - G_RINK_TOP)/2)-1)    /* center (red) line */
 #define G_RINK_LENGTH ((G_RINK_BOTTOM - G_RINK_TOP))
-#define G_RINK_WIDTH ((WINSIDE*2/3))
-#define G_G_MID ((WINSIDE/2))   /* center of goal */
+#define G_RINK_WIDTH ((GWINSIDE*2/3))
+#define G_G_MID ((GWINSIDE/2))   /* center of goal */
 #define G_RINK_LEFT ((G_G_MID-(G_RINK_WIDTH/2))-2)
 #define G_RINK_RIGHT ((G_G_MID+(G_RINK_WIDTH/2))-1)
 #define G_G_LFT (G_R_MID-G_TENTH)       /* left edge of goal */
@@ -589,7 +589,7 @@
     /* Right rink boundary */
     map_hockey_lines[i].begin_x = map_hockey_lines[i].end_x = G_RINK_RIGHT;
     map_hockey_lines[i].begin_y = 0;
-    map_hockey_lines[i].end_y = WINSIDE - 1;
+    map_hockey_lines[i].end_y = GWINSIDE - 1;
     map_hockey_lines[i].color = W_Grey;
     map_hockey_lines[i].flag = &showHockeyLinesMap;
     map_hockey_lines[i++].orientation = S_LINE_VERTICAL;
@@ -597,7 +597,7 @@
     /* Left rink boundary */
     map_hockey_lines[i].begin_x = map_hockey_lines[i].end_x = G_RINK_LEFT;
     map_hockey_lines[i].begin_y = 0;
-    map_hockey_lines[i].end_y = WINSIDE - 1;
+    map_hockey_lines[i].end_y = GWINSIDE - 1;
     map_hockey_lines[i].color = W_Grey;
     map_hockey_lines[i].flag = &showHockeyLinesMap;
     map_hockey_lines[i++].orientation = S_LINE_VERTICAL;

Index: short.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/short.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- short.c	4 Apr 2007 04:06:38 -0000	1.20
+++ short.c	6 Apr 2007 06:46:32 -0000	1.21
@@ -736,10 +736,10 @@
 
         pl->p_x = my_x = x;
         pl->p_y = my_y = y;
-        Plx[me->p_no] = WINSIDE / 2;
-        Ply[me->p_no] = WINSIDE / 2;
-        Pgx[me->p_no] = pl->p_x * WINSIDE / GWIDTH;
-        Pgy[me->p_no] = pl->p_y * WINSIDE / GWIDTH;
+        Plx[me->p_no] = TWINSIDE / 2;
+        Ply[me->p_no] = TWINSIDE / 2;
+        Pgx[me->p_no] = pl->p_x * GWINSIDE / GWIDTH;
+        Pgy[me->p_no] = pl->p_y * GWINSIDE / GWIDTH;
         redrawPlayer[me->p_no] = 1;
 
 #ifdef ROTATERACE

Index: util.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/util.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- util.c	16 Mar 2007 01:44:24 -0000	1.4
+++ util.c	6 Apr 2007 06:46:32 -0000	1.5
@@ -81,13 +81,13 @@
 
     if (ww == mapw)
     {
-        g_x = x * GWIDTH / WINSIDE;
-        g_y = y * GWIDTH / WINSIDE;
+        g_x = x * GWIDTH / GWINSIDE;
+        g_y = y * GWIDTH / GWINSIDE;
     }
     else
     {
-        g_x = me->p_x + ((x - WINSIDE / 2) * SCALE);
-        g_y = me->p_y + ((y - WINSIDE / 2) * SCALE);
+        g_x = me->p_x + ((x - TWINSIDE / 2) * SCALE);
+        g_y = me->p_y + ((y - TWINSIDE / 2) * SCALE);
     }
 
     targ = gettarget2 (g_x, g_y, targtype);

Index: defaults.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- defaults.c	5 Apr 2007 12:57:22 -0000	1.68
+++ defaults.c	6 Apr 2007 06:46:31 -0000	1.69
@@ -224,6 +224,13 @@
             NULL
         }
     },
+    {"infoRange", &infoRange, RC_BOOL,
+        {
+            "Show weapon's range boundary as a dashed white box if tactical",
+            "size is increased beyond the standard 500x500",
+            NULL
+        }
+    },
     {"keepInfo", &keepInfo, RC_INT,
         {
             "How many tenths of seconds to keep info window on (default 15)",
@@ -1842,6 +1849,7 @@
     /* SRS 12/94, ignore the Capslock key */
     ignoreCaps = booleanDefault ("ignoreCaps", ignoreCaps);
 
+    infoRange = booleanDefault ("infoRange", infoRange);
     showMySpeed = booleanDefault ("showMySpeed", showMySpeed);
     showOtherSpeed = booleanDefault ("showOtherSpeed", showOtherSpeed);
 
@@ -1875,7 +1883,7 @@
 	
     tts_time = intDefault("tts_time", tts_time);
     tts_max_len = intDefault("tts_max_len", tts_max_len);
-    tts_ypos = intDefault("tts_ypos", WINSIDE / 2 - 16);
+    tts_ypos = intDefault("tts_ypos", TWINSIDE / 2 - 16);
 #endif /* BEEPLITE */
 
     shipdefaults[DEFAULTSHIP].keymap = (unsigned char *) stringDefault ("keymap");
@@ -2383,6 +2391,9 @@
     	    fputs ("# Local and map windows MUST be square.  Size can be adjusted.\n", fp);
     	    fputs ("# If sizing downwards, don't forget to remap any windows nested\n", fp);
     	    fputs ("# inside these windows, such as team select and quit windows.\n", fp);
+    	    fputs ("# Most windows will autoadjust to the right spot if local or\n", fp);
+    	    fputs ("# map size are changed, so most window placements are commented\n", fp);
+    	    fputs ("# out.  Uncomment them if you wish to customize.\n", fp);
     	    fputs ("\n", fp);
     	}
 
@@ -2438,19 +2449,6 @@
         }
         fputs ("\n", fp);
 
-        // Warning window - always mapped
-        if ((adefault = stringDefault ("warn.parent")) != NULL)
-        {
-            sprintf (str, "warn.parent:            %s\n", adefault);
-            fputs (str, fp);
-        }
-        if ((adefault = stringDefault ("warn.geometry")) != NULL)
-        {
-            sprintf (str, "warn.geometry:          %s\n", adefault);
-            fputs (str, fp);
-        }
-        fputs ("\n", fp);
-
         // Message window - preferred mapped
         if ((adefault = stringDefault ("message.parent")) != NULL)
         {
@@ -2469,6 +2467,19 @@
         fputs (str, fp);
         fputs ("\n", fp);
 
+        // Warning window - always mapped
+        if ((adefault = stringDefault ("warn.parent")) != NULL)
+        {
+            sprintf (str, "warn.parent:            %s\n", adefault);
+            fputs (str, fp);
+        }
+        if ((adefault = stringDefault ("warn.geometry")) != NULL)
+        {
+            sprintf (str, "warn.geometry:          %s\n", adefault);
+            fputs (str, fp);
+        }
+        fputs ("\n", fp);
+
         // Planet window
         if ((adefault = stringDefault ("planet.parent")) != NULL)
         {

Index: map.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- map.c	5 Apr 2007 12:57:22 -0000	1.42
+++ map.c	6 Apr 2007 06:46:32 -0000	1.43
@@ -97,8 +97,8 @@
     int endX, endY;
     struct planet *pl;
     int pRadius;
-    const int tHeight = W_Textheight * GWIDTH / WINSIDE;
-    const int tWidth = W_Textwidth * GWIDTH / WINSIDE;
+    const int tHeight = W_Textheight * GWIDTH / GWINSIDE;
+    const int tWidth = W_Textwidth * GWIDTH / GWINSIDE;
 
     for (x = 0; x < DETAIL; x++)
     {
@@ -116,9 +116,9 @@
        assigned to a x,y point and that is intersected with the rough planet map in a 
        checkredraw call, which doesn't work so good if the player ship is beeplite highlited */ 
 #ifdef BEEPLITE
-    pRadius = 3 * BMP_MPLANET_WIDTH * GWIDTH / WINSIDE / 5;
+    pRadius = 3 * BMP_MPLANET_WIDTH * GWIDTH / GWINSIDE / 5;
 #else
-    pRadius = BMP_MPLANET_WIDTH * GWIDTH / WINSIDE / 2;
+    pRadius = BMP_MPLANET_WIDTH * GWIDTH / GWINSIDE / 2;
 #endif
     for (k = 0, pl = planets; k < MAXPLANETS; k++, pl++)
     {
@@ -159,7 +159,7 @@
         }
     }
     /* Now loop for the new planet bitmaps, which are roughly 50% wider */
-    pRadius = 3 * BMP_MPLANET_WIDTH * GWIDTH / WINSIDE / 4;
+    pRadius = 3 * BMP_MPLANET_WIDTH * GWIDTH / GWINSIDE / 4;
     for (k = 0, pl = planets; k < MAXPLANETS; k++, pl++)
     {
         /*
@@ -214,12 +214,12 @@
     int     endX, endY;
     struct planet *pl;
 #ifdef BEEPLITE
-    const int pRadius = 3 * BMP_MPLANET_WIDTH * GWIDTH / WINSIDE / 5;
+    const int pRadius = 3 * BMP_MPLANET_WIDTH * GWIDTH / GWINSIDE / 5;
 #else
-    const int pRadius = BMP_MPLANET_WIDTH * GWIDTH / WINSIDE / 2;
+    const int pRadius = BMP_MPLANET_WIDTH * GWIDTH / GWINSIDE / 2;
 #endif
-    const int tHeight = W_Textheight * GWIDTH / WINSIDE;
-    const int tWidth = W_Textwidth * GWIDTH / WINSIDE;
+    const int tHeight = W_Textheight * GWIDTH / GWINSIDE;
+    const int tWidth = W_Textwidth * GWIDTH / GWINSIDE;
 
     for (k = 0, pl = planets; k < MAXPLANETS; k++, pl++)
     {
@@ -241,10 +241,10 @@
         if (endY >= DETAIL)
             endY = DETAIL - 1;
 
-        startX = startX * SIZE * WINSIDE / GWIDTH;
-        startY = startY * SIZE * WINSIDE / GWIDTH;
-        endX = (endX * SIZE + SIZE - 1) * WINSIDE / GWIDTH;
-        endY = (endY * SIZE + SIZE - 1) * WINSIDE / GWIDTH;
+        startX = startX * SIZE * GWINSIDE / GWIDTH;
+        startY = startY * SIZE * GWINSIDE / GWIDTH;
+        endX = (endX * SIZE + SIZE - 1) * GWINSIDE / GWIDTH;
+        endY = (endY * SIZE + SIZE - 1) * GWINSIDE / GWIDTH;
 
         W_MakeLine(mapw, startX, startY, startX, endY, W_White);
         W_MakeLine(mapw, startX, startY, endX, startY, W_White);
@@ -530,8 +530,8 @@
 
         l->pl_flags &= ~PLREDRAW;       /* Turn redraw flag off! */
 
-        dx = l->pl_x * WINSIDE / GWIDTH;
-        dy = l->pl_y * WINSIDE / GWIDTH;
+        dx = l->pl_x * GWINSIDE / GWIDTH;
+        dy = l->pl_y * GWINSIDE / GWIDTH;
 
 
         /* Erase the planet first */
@@ -542,8 +542,8 @@
 
             int odx, ody;
 
-            odx = pl_update[l->pl_no].plu_x * WINSIDE / GWIDTH;
-            ody = pl_update[l->pl_no].plu_y * WINSIDE / GWIDTH;
+            odx = pl_update[l->pl_no].plu_x * GWINSIDE / GWIDTH;
+            ody = pl_update[l->pl_no].plu_y * GWINSIDE / GWIDTH;
 
             /* XFIX */
             if (planetBitmapGalaxy == 3)  // Needs adjusting
@@ -838,8 +838,8 @@
     static int viewx = 0, viewy = 0;
     static char clearviewbox = 0;
     static char viewboxcleared = 0;
-    int viewdist = (WINSIDE / 2 * SCALE) / (GWIDTH / WINSIDE);
-    int view = WINSIDE * SCALE / 2;
+    int viewdist = (TWINSIDE / 2 * SCALE) / (GWIDTH / GWINSIDE);
+    int view = TWINSIDE * SCALE / 2;
     int mvx, mvy;
 
 #ifdef RECORDGAME
@@ -851,8 +851,8 @@
 #endif
     clearMap ();
 
-    dx = (me->p_x) / (GWIDTH / WINSIDE);
-    dy = (me->p_y) / (GWIDTH / WINSIDE);
+    dx = (me->p_x) / (GWIDTH / GWINSIDE);
+    dy = (me->p_y) / (GWIDTH / GWINSIDE);
 
     if (redrawall)
     {
@@ -906,17 +906,17 @@
         {
             clearviewbox = 0;
             /* clear old dots - placed here for less flicker */
-            if (viewx + viewdist < WINSIDE && viewy + viewdist < WINSIDE)
+            if (viewx + viewdist < GWINSIDE && viewy + viewdist < GWINSIDE)
                 W_MakePoint (mapw, viewx + viewdist, viewy + viewdist, backColor);
-            if (viewx + viewdist < WINSIDE && viewy - viewdist > 0)
+            if (viewx + viewdist < GWINSIDE && viewy - viewdist > 0)
                 W_MakePoint (mapw, viewx + viewdist, viewy - viewdist, backColor);
-            if (viewx - viewdist > 0 && viewy + viewdist < WINSIDE)
+            if (viewx - viewdist > 0 && viewy + viewdist < GWINSIDE)
                 W_MakePoint (mapw, viewx - viewdist, viewy + viewdist, backColor);
             if (viewx - viewdist > 0 && viewy - viewdist > 0)
                 W_MakePoint (mapw, viewx - viewdist, viewy - viewdist, backColor);
             /* redraw any planets they overwrote */
-            mvx = viewx * (GWIDTH / WINSIDE); /* correct from view scale */
-            mvy = viewy * (GWIDTH / WINSIDE);
+            mvx = viewx * (GWIDTH / GWINSIDE); /* correct from view scale */
+            mvy = viewy * (GWIDTH / GWINSIDE);
             checkRedraw(mvx + view, mvy + view);
             checkRedraw(mvx + view, mvy - view);
             checkRedraw(mvx - view, mvy + view);
@@ -981,11 +981,11 @@
         if (viewboxcleared || viewx != dx || viewy != dy)
         {
             /* draw the new points */
-            if (dx + viewdist < WINSIDE && dy + viewdist < WINSIDE)
+            if (dx + viewdist < GWINSIDE && dy + viewdist < GWINSIDE)
                 W_MakePoint (mapw, dx + viewdist, dy + viewdist, W_White);
-            if (dx + viewdist < WINSIDE && dy - viewdist > 0)
+            if (dx + viewdist < GWINSIDE && dy - viewdist > 0)
                 W_MakePoint (mapw, dx + viewdist, dy - viewdist, W_White);
-            if (dx - viewdist > 0 && dy + viewdist < WINSIDE)
+            if (dx - viewdist > 0 && dy + viewdist < GWINSIDE)
                 W_MakePoint (mapw, dx - viewdist, dy + viewdist, W_White);
             if (dx - viewdist > 0 && dy - viewdist > 0)
                 W_MakePoint (mapw, dx - viewdist, dy - viewdist, W_White);
@@ -1027,8 +1027,8 @@
             continue;
 
 
-        dx = j->p_x * WINSIDE / GWIDTH;
-        dy = j->p_y * WINSIDE / GWIDTH;
+        dx = j->p_x * GWINSIDE / GWIDTH;
+        dy = j->p_y * GWINSIDE / GWIDTH;
 
 
         if (j->p_flags & PFCLOAK)
@@ -1119,12 +1119,12 @@
 #endif
             if (j->p_flags & PFCLOAK)
             {
-                rad = MAXDISTCLOAK;
+                rad = MAXDISTCLOAK * GWINSIDE / GWIDTH;
                 color = W_Red;
             }
             else
             {
-                rad = MAXDISTVIS;
+                rad = MAXDISTVIS * GWINSIDE / GWIDTH;
                 color = W_White;
             }
             W_WriteCircle(mapw, dx, dy, rad, 0, 1, color);
@@ -1137,8 +1137,8 @@
                 /* Redraw check - redraw all planets in range.  Have to
                    adjust distance to account for planet radius and text
                    of planet name */
-                planx = pl->pl_x * WINSIDE / GWIDTH;
-                plany = pl->pl_y * WINSIDE / GWIDTH;
+                planx = pl->pl_x * GWINSIDE / GWIDTH;
+                plany = pl->pl_y * GWINSIDE / GWIDTH;
                 distx = ABS(planx - dx) - pRadius - W_Textwidth;
                 disty = ABS(plany - dy) - pRadius - W_Textheight;
                 if (distx*distx + disty*disty < (rad*rad))
@@ -1162,8 +1162,8 @@
             if (j->p_status == PFREE)
                 continue;
 
-            dx = j->p_x * WINSIDE / GWIDTH;
-            dy = j->p_y * WINSIDE / GWIDTH;
+            dx = j->p_x * GWINSIDE / GWIDTH;
+            dy = j->p_y * GWINSIDE / GWIDTH;
             
             /* phasers */
             ph = &phasers[j->p_no];
@@ -1187,13 +1187,13 @@
                     case PHMISS:
                         /* Here I will have to compute end coordinate */
                         tx = (int) (j->p_x + PHASEDIST * j->p_ship.s_phaserdamage / 100
-                            * Cos[ph->ph_dir]) * WINSIDE / GWIDTH;
+                            * Cos[ph->ph_dir]) * GWINSIDE / GWIDTH;
                         ty = (int) (j->p_y + PHASEDIST * j->p_ship.s_phaserdamage / 100
-                            * Sin[ph->ph_dir]) * WINSIDE / GWIDTH;
+                            * Sin[ph->ph_dir]) * GWINSIDE / GWIDTH;
                         break;
                     case PHHIT2:
-                        tx = ph->ph_x * WINSIDE / GWIDTH;
-                        ty = ph->ph_y * WINSIDE / GWIDTH;
+                        tx = ph->ph_x * GWINSIDE / GWIDTH;
+                        ty = ph->ph_y * GWINSIDE / GWIDTH;
                         break;
                     default:
                         /* Don't draw phasers to ships out of galactic bounds */
@@ -1204,8 +1204,8 @@
                         }
                         else
                         {
-                            tx = players[ph->ph_target].p_x * WINSIDE / GWIDTH;
-                            ty = players[ph->ph_target].p_y * WINSIDE / GWIDTH;
+                            tx = players[ph->ph_target].p_x * GWINSIDE / GWIDTH;
+                            ty = players[ph->ph_target].p_y * GWINSIDE / GWIDTH;
                         }
                         break;
                 }
@@ -1217,7 +1217,7 @@
                 mclearlcount++;
                 /* Check for overwriting planets, corrected from view scale*/
                 checkRedraw(j->p_x, j->p_y);
-                checkRedraw(tx * (GWIDTH / WINSIDE), ty * (GWIDTH / WINSIDE));
+                checkRedraw(tx * (GWIDTH / GWINSIDE), ty * (GWIDTH / GWINSIDE));
             }
 
             if (!j->p_ntorp && !j->p_nplasmatorp)
@@ -1254,8 +1254,8 @@
                     }
                 }
 
-                dx = k->t_x * WINSIDE / GWIDTH;
-                dy = k->t_y * WINSIDE / GWIDTH;
+                dx = k->t_x * GWINSIDE / GWIDTH;
+                dy = k->t_y * GWINSIDE / GWIDTH;
 
                 if (k->t_status == TEXPLODE)
                 {
@@ -1309,8 +1309,8 @@
                     }
                 }
 
-                dx = pt->pt_x * WINSIDE / GWIDTH;
-                dy = pt->pt_y * WINSIDE / GWIDTH;
+                dx = pt->pt_x * GWINSIDE / GWIDTH;
+                dy = pt->pt_y * GWINSIDE / GWIDTH;
 
                 if (pt->pt_status == TEXPLODE)
                 {
@@ -1349,8 +1349,8 @@
     {
         j = &players[me->p_playerl];
 
-        dx = j->p_x * WINSIDE / GWIDTH;
-        dy = j->p_y * WINSIDE / GWIDTH;
+        dx = j->p_x * GWINSIDE / GWIDTH;
+        dy = j->p_y * GWINSIDE / GWIDTH;
 
         if (j->p_status == PALIVE && !(j->p_flags & PFCLOAK))
         {
@@ -1366,8 +1366,8 @@
         {
             int mydx, mydy;
             
-            mydx = me->p_x * WINSIDE / GWIDTH;
-            mydy = me->p_y * WINSIDE / GWIDTH;
+            mydx = me->p_x * GWINSIDE / GWIDTH;
+            mydy = me->p_y * GWINSIDE / GWIDTH;
             W_MakeTractLine (mapw,
                              mydx,
                              mydy,
@@ -1387,8 +1387,8 @@
     {
         struct planet *l = &planets[me->p_planet];
 
-        dx = l->pl_x * WINSIDE / GWIDTH;
-        dy = l->pl_y * WINSIDE / GWIDTH;
+        dx = l->pl_x * GWINSIDE / GWIDTH;
+        dy = l->pl_y * GWINSIDE / GWIDTH;
         W_WriteTriangle (mapw, dx, dy - (BMP_MPLANET_HEIGHT) / 2 - 4, 4, 0, foreColor);
 
         clearlmark[0] = dx;
@@ -1401,8 +1401,8 @@
         {
             int mydx, mydy;
             
-            mydx = me->p_x * WINSIDE / GWIDTH;
-            mydy = me->p_y * WINSIDE / GWIDTH;
+            mydx = me->p_x * GWINSIDE / GWIDTH;
+            mydy = me->p_y * GWINSIDE / GWIDTH;
             W_MakeTractLine (mapw,
                              mydx,
                              mydy,

Index: dashboard3.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/dashboard3.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- dashboard3.c	26 Mar 2007 04:40:52 -0000	1.8
+++ dashboard3.c	6 Apr 2007 06:46:31 -0000	1.9
@@ -377,7 +377,7 @@
     db_special (fr, 160, 32);
 
     /* TIMER */
-    db_timer (fr, WINSIDE - 12 * W_Textwidth, 32);
+    db_timer (fr, 428, 32);
 
     light_erase();
 

Index: data.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -d -r1.78 -r1.79
--- data.c	5 Apr 2007 12:57:22 -0000	1.78
+++ data.c	6 Apr 2007 06:46:31 -0000	1.79
@@ -32,7 +32,8 @@
 struct mctl *mctl;
 struct memory universe;
 
-int WINSIDE = 500;              /* Size of strategic and tactical windows */
+int TWINSIDE = 500;             /* Size of tactical window */
+int GWINSIDE = 500;             /* Size of galactic window */
 int SCALE = 40;                 /* Window will be one pixel for these # spaces */
 int ingame = 0;                 /* If player is in game - to distinguish between whether
                                    to use double buffering on the local and map window */
@@ -826,4 +827,5 @@
 int lockLine = 1;		/* draw dashed line on map from you to lock target */
 int weaponsOnMap = 1;		/* draw weapons fire on map */
 int sortPlanets = 1;		/* sort planet list by team and army count */
-int packetLights = 1;           /* show packet send/receive via dashboard */
\ No newline at end of file
+int packetLights = 1;           /* show packet send/receive via dashboard */
+int infoRange = 1;              /* show limit on info with large tactical windows */
\ No newline at end of file

Index: docwin.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/docwin.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- docwin.c	7 May 2006 16:59:27 -0000	1.3
+++ docwin.c	6 Apr 2007 06:46:31 -0000	1.4
@@ -61,12 +61,12 @@
 
     sprintf (buf, "---  %s  ---", (char *) query_cowid ());
     length = strlen (buf);
-    center = WINSIDE / 2 - (length * W_Textwidth) / 2;
+    center = 250 - (length * W_Textwidth) / 2;
     W_WriteText (docwin, center, W_Textheight, textColor,
                  buf, length, W_BoldFont);
     sprintf (buf, CBUGS);
     length = strlen (buf);
-    center = WINSIDE / 2 - (length * W_Textwidth) / 2;
+    center = 250 - (length * W_Textwidth) / 2;
     W_WriteText (docwin, center, 3 * W_Textheight, textColor,
                  buf, length, W_RegularFont);
 
@@ -239,12 +239,12 @@
 
     sprintf (buf, "---  %s  ---", (char *) query_cowid ());
     length = strlen (buf);
-    center = WINSIDE / 2 - (length * W_Textwidth) / 2;
+    center = 250 - (length * W_Textwidth) / 2;
     W_WriteText (xtrekrcwin, center, W_Textheight, textColor,
                  buf, length, W_BoldFont);
     sprintf (buf, CBUGS);
     length = strlen (buf);
-    center = WINSIDE / 2 - (length * W_Textwidth) / 2;
+    center = 250 - (length * W_Textwidth) / 2;
     W_WriteText (xtrekrcwin, center, 3 * W_Textheight, textColor,
                  buf, length, W_RegularFont);
 

Index: option.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/option.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- option.c	4 Apr 2007 04:06:38 -0000	1.44
+++ option.c	6 Apr 2007 06:46:32 -0000	1.45
@@ -422,6 +422,7 @@
     {1, "omit team letter on map", &omitTeamLetter, 0, 0, 0, NULL, NULL},
     {1, "draw view box on map", &viewBox, 0, 0, 0, NULL, NULL},
     {1, "", &viewRange, 0, 0, 0, viewrangemess, NULL},
+    {1, "show info limits on local", &infoRange, 0, 0, 0, NULL, NULL},
     {1, "draw stars on local", &showStars, 0, 0, 0, NULL, NULL},
     {1, "draw warp streaks", &warpStreaks, 0, 0, 0, NULL, NULL},
     {1, "alert on extra border(s)", &extraAlertBorder, 0, 0, 0, NULL, NULL},
@@ -500,7 +501,7 @@
     if (optionWin == NULL)
     {
 
-        optionWin = W_MakeMenu ("option", WINSIDE + 10, -BORDER + 10, OPTIONLEN,
+        optionWin = W_MakeMenu ("option", TWINSIDE + 10, -BORDER + 10, OPTIONLEN,
                                  MaxOptions, baseWin, OPTIONBORDER);
         W_ResizeMenuToNumItems (optionWin, CurrentMenu->numopt);
         W_SetWindowKeyDownHandler (optionWin, optionaction);

Index: macrowin.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/macrowin.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- macrowin.c	12 Apr 2006 04:20:03 -0000	1.2
+++ macrowin.c	6 Apr 2007 06:46:32 -0000	1.3
@@ -330,7 +330,7 @@
 
         if (num >= NUMLINES)
             num = NUMLINES;
-        macroWin = W_MakeTextWindow ("macrow", WINSIDE + BORDER + 25, BORDER + 5,
+        macroWin = W_MakeTextWindow ("macrow", TWINSIDE + BORDER + 25, BORDER + 5,
                                      80, num, NULL, BORDER);
 
         W_ResizeTextWindow (macroWin, 80, num);