These patches will implement the scanner beams.

NOTE: if you get a "previously applied" message, it's because you're trying
to patch one of your symbolic links.  Say "no" to "assume reverse?" and "no"
to "apply anyway?"

-----
*** defs.h	Mon Dec  9 12:13:31 1991
--- ../netrek/defs.h	Mon Dec 16 11:29:09 1991
***************
*** 170,175 ****
--- 170,176 ----
  #define sendByeReq() sendShortPacket(CP_BYE, 0)
  #define sendDockingReq(state) sendShortPacket(CP_DOCKPERM, state)
  #define sendResetStatsReq(verify) sendShortPacket(CP_RESETSTATS, verify)
+ #define sendScanReq(who) sendShortPacket(CP_SCAN, who)		/* ATM */
  
  /* This macro allows us to time things based upon # frames / sec.
   */
*** data.h	Mon Dec  9 12:13:31 1991
--- ../netrek/data.h	Mon Dec 16 11:22:08 1991
***************
*** 71,76 ****
--- 71,77 ----
  extern int warncount;
  extern int warntimer;
  extern int infomapped;
+ extern int scanmapped;	/* ATM - scanner stuff */
  extern int mustexit;
  extern int messtime;
  extern int keeppeace;
***************
*** 130,133 ****
  
  extern W_Window	messagew, w, mapw, statwin, baseWin, infow, iconWin, tstatw,
  		war, warnw, helpWin, teamWin[4], qwin, messwa, messwt, messwi,
! 		messwk, planetw, rankw, playerw, optionWin, reviewWin;
--- 131,134 ----
  
  extern W_Window	messagew, w, mapw, statwin, baseWin, infow, iconWin, tstatw,
  		war, warnw, helpWin, teamWin[4], qwin, messwa, messwt, messwi,
! 		messwk, planetw, rankw, playerw, optionWin, reviewWin, scanw;
*** packets.h	Mon Dec  9 12:13:33 1991
--- ../netrek/packets.h	Mon Dec 16 13:10:26 1991
***************
*** 34,39 ****
--- 34,40 ----
  #define SP_PL_LOGIN	24		/* new player logs in */
  #define SP_RESERVED	25		/* for future use */
  #define SP_PLANET_LOC	26		/* planet name, x, y */
+ #define SP_SCAN		27		/* ATM: results of player scan */
  
  /* packets sent from remote client to xtrek server */
  #define CP_MESSAGE      1		/* send a message */
***************
*** 69,74 ****
--- 70,76 ----
  #define CP_UPDATES	31		/* set number of usecs per update */
  #define CP_RESETSTATS	32		/* reset my stats packet */
  #define CP_RESERVED	33		/* for future use */
+ #define CP_SCAN		34		/* ATM: request for player scan */
  
  #define SOCKVERSION 	4
  struct packet_handler {
***************
*** 550,553 ****
--- 552,575 ----
      long x;
      long y;
      char name[16];
+ };
+ 
+ struct scan_cpacket {		/* ATM */
+     char type;		/* SP_SCAN */
+     char pnum;
+     char pad1;
+     char pad2;
+ };
+ 
+ struct scan_spacket {		/* ATM */
+     char type;		/* CP_SCAN */
+     char pnum;
+     char success;
+     char pad1;
+     long p_fuel;
+     long p_armies;
+     long p_shield;
+     long p_damage;
+     long p_etemp;
+     long p_wtemp;
  };
*** data.c	Mon Dec  9 12:13:31 1991
--- ../netrek/data.c	Mon Dec 16 11:39:06 1991
***************
*** 42,47 ****
--- 42,48 ----
  int	warncount = 0;
  int	warntimer = -1;
  int	infomapped = 0;
+ int	scanmapped = 0;		/* ATM - scanners */
  int	mustexit = 0;
  int	messtime = 5;
  int	keeppeace = 0;
***************
*** 106,109 ****
  
  W_Window messagew, w, mapw, statwin, baseWin, infow, iconWin, tstatw,
  	war, warnw, helpWin, teamWin[4], qwin, messwa, messwt, messwi, messwk,
! 	planetw, playerw, rankw, optionWin = 0, reviewWin;
--- 107,110 ----
  
  W_Window messagew, w, mapw, statwin, baseWin, infow, iconWin, tstatw,
  	war, warnw, helpWin, teamWin[4], qwin, messwa, messwt, messwi, messwk,
! 	planetw, playerw, rankw, optionWin = 0, reviewWin, scanw;
*** input.c	Mon Dec  9 12:13:32 1991
--- ../netrek/input.c	Mon Dec 16 13:17:07 1991
***************
*** 115,121 ****
      struct obtype *gettarget(), *target;
      char key=data->key;
  
!     if (data->Window!=mapw && data->Window!=w && data->Window!=infow) return;
      if (!index("sbogadc", key) || !(localflags & PFREFIT)) {
  	if (key >= 32 && key < 127) {
  	    key=mystats->st_keymap[key - 32];
--- 115,121 ----
      struct obtype *gettarget(), *target;
      char key=data->key;
  
!     if (data->Window!=mapw && data->Window!=w && data->Window!=infow && data->Window!=scanw) return;
      if (!index("sbogadc", key) || !(localflags & PFREFIT)) {
  	if (key >= 32 && key < 127) {
  	    key=mystats->st_keymap[key - 32];
***************
*** 168,173 ****
--- 168,179 ----
  	case 'a':
  	    if (localflags & PFREFIT) {
  		do_refit(ASSAULT);
+ 	    } else {
+ 		/* ATM - scanners ("About...") */
+ 		if (!scanmapped)
+ 		    scan(data->Window, data->x, data->y);
+ 		else
+ 		    destroyScan();
  	    }
  	    break;
  	case 'k': /* k = set course */
*** inform.c	Mon Dec  9 12:13:32 1991
--- ../netrek/inform.c	Mon Dec 16 14:49:34 1991
***************
*** 10,17 ****
  #include "defs.h"
  #include "struct.h"
  #include "data.h"
  
! /* Display information about the nearest objext to mouse */
  
  /*
  ** When the player asks for info, this routine finds the object
--- 10,18 ----
  #include "defs.h"
  #include "struct.h"
  #include "data.h"
+ #include "packets.h"
  
! /* Display information about the nearest object to mouse */
  
  /*
  ** When the player asks for info, this routine finds the object
***************
*** 190,192 ****
--- 191,273 ----
      W_DestroyWindow(infow);
      infomapped = 0;
  }
+ 
+ 
+ /* ATM - scanner stuff */
+ #define SCAN_WIDTH	28
+ #define SCAN_HEIGHT	6
+ static W_Window scanww;
+ static int scanmx, scanmy;
+ 
+ scan(ww, x, y)
+ W_Window ww;
+ int x, y;
+ {
+     struct obtype *gettarget(), *target;
+ 
+     scanww = ww;	/* remember these for later */
+     scanmx = x;
+     scanmy = y;
+ 
+     /* find player nearest to mouse */
+     target = gettarget(ww, x, y, TARG_PLAYER);
+ 
+     /* send the request to the server */
+     sendScanReq(target->o_num);
+ }
+ 
+ informScan(pnum)
+ int pnum;
+ {
+     char buf[BUFSIZ];
+     int windowWidth, windowHeight;
+     W_Window ww = scanww;
+     int mx = scanmx, my = scanmy;
+     register struct player *j;
+     int line = 0;
+ 
+     /*
+      * Make the window first, then make the request.  Just don't map the
+      * window (in case the request fails).
+      */
+     windowWidth=W_WindowWidth(ww);
+     windowHeight=W_WindowHeight(ww);
+     /* Too close to the edge? */
+     if (mx + SCAN_WIDTH * W_Textwidth + 4 > windowWidth)
+ 	mx = windowWidth - SCAN_WIDTH * W_Textwidth - 4;
+     if (my + SCAN_HEIGHT * W_Textheight + 2 > windowHeight)
+ 	my = windowHeight - SCAN_HEIGHT * W_Textheight - 2;
+ 
+     scanw = W_MakeWindow("scan", mx, my, SCAN_WIDTH*W_Textwidth,
+ 	SCAN_HEIGHT*W_Textheight, ww, 2,foreColor);
+     W_MapWindow(scanw);
+     scanmapped = 1;
+ 
+     j = &players[pnum];
+     (void) sprintf(buf, "%s (%c%c):", j->p_name, teamlet[j->p_team],
+ 	shipnos[j->p_no]);
+     W_WriteText(scanw, W_Textwidth, W_Textheight*line++, playerColor(j), buf,
+ 	strlen(buf), shipFont(j));
+     (void) sprintf(buf, "S-Class %-s", classes[j->p_ship.s_type]);
+     W_WriteText(scanw, W_Textwidth, W_Textheight*line++, playerColor(j), buf,
+ 	strlen(buf), W_RegularFont);
+     (void) sprintf(buf, "Fuel:   %5d  Armies: %3d", j->p_fuel, j->p_armies);
+     W_WriteText(scanw, W_Textwidth, W_Textheight*line++, playerColor(j), buf,
+ 	strlen(buf), W_RegularFont);
+     (void) sprintf(buf, "Wtemp:  %5d  Etemp:  %3d", j->p_wtemp/10,
+ 	j->p_etemp/10);
+     W_WriteText(scanw, W_Textwidth, W_Textheight*line++, playerColor(j), buf,
+ 	strlen(buf), W_RegularFont);
+     line++;	/* space it out a bit */
+     (void) sprintf(buf, "Shields:%5d  Damage: %3d", j->p_shield, j->p_damage);
+     W_WriteText(scanw, W_Textwidth, W_Textheight*line++, playerColor(j), buf,
+ 	strlen(buf), W_BoldFont);
+ }
+ 
+ destroyScan()
+ {
+     W_DestroyWindow(scanw);
+     scanmapped = 0;
+ }
+ #undef SCAN_WIDTH
+ #undef SCAN_HEIGHT
*** socket.c	Tue Dec 10 16:30:59 1991
--- ../netrek/socket.c	Mon Dec 16 14:49:02 1991
***************
*** 28,34 ****
  int handleMotd(), handleMask();
  int handleBadVersion(), handlePlanetLoc();
  int handleHostile(), handleStats(), handlePlyrLogin();
! int handleReserved();
  
  struct packet_handler handlers[] = {
      { 0, NULL },	/* record 0 */
--- 28,34 ----
  int handleMotd(), handleMask();
  int handleBadVersion(), handlePlanetLoc();
  int handleHostile(), handleStats(), handlePlyrLogin();
! int handleReserved(), handleScan();
  
  struct packet_handler handlers[] = {
      { 0, NULL },	/* record 0 */
***************
*** 57,63 ****
      { sizeof(struct stats_spacket), handleStats },	    /* SP_STATS */
      { sizeof(struct plyr_login_spacket), handlePlyrLogin }, /* SP_PL_LOGIN */
      { sizeof(struct reserved_spacket), handleReserved },    /* SP_RESERVED */
!     { sizeof(struct planet_loc_spacket), handlePlanetLoc }  /* SP_PLANET_LOC */
  };
  
  int sizes[] = {
--- 57,64 ----
      { sizeof(struct stats_spacket), handleStats },	    /* SP_STATS */
      { sizeof(struct plyr_login_spacket), handlePlyrLogin }, /* SP_PL_LOGIN */
      { sizeof(struct reserved_spacket), handleReserved },    /* SP_RESERVED */
!     { sizeof(struct planet_loc_spacket), handlePlanetLoc }, /* SP_PLANET_LOC */
!     { sizeof(struct scan_spacket), handleScan }		    /* SP_SCAN (ATM) */
  };
  
  int sizes[] = {
***************
*** 94,100 ****
      sizeof(struct dockperm_cpacket),		/* CP_DOCKPERM */
      sizeof(struct updates_cpacket),		/* CP_UPDATES */
      sizeof(struct resetstats_cpacket),		/* CP_RESETSTATS */
!     sizeof(struct reserved_cpacket)		/* CP_RESERVED */
  };
  
  #define NUM_PACKETS (sizeof(handlers) / sizeof(handlers[0]) - 1)
--- 95,102 ----
      sizeof(struct dockperm_cpacket),		/* CP_DOCKPERM */
      sizeof(struct updates_cpacket),		/* CP_UPDATES */
      sizeof(struct resetstats_cpacket),		/* CP_RESETSTATS */
!     sizeof(struct reserved_cpacket),		/* CP_RESERVED */
!     sizeof(struct scan_cpacket)			/* CP_SCAN (ATM) */
  };
  
  #define NUM_PACKETS (sizeof(handlers) / sizeof(handlers[0]) - 1)
***************
*** 806,810 ****
--- 808,829 ----
  
      encryptReservedPacket(packet, &response, serverName, me->p_no);
      sendServerPacket(&response);
+ }
+ 
+ handleScan(packet)
+ struct scan_spacket *packet;
+ {
+     struct player *pp;
+ 
+     if (packet->success) {
+ 	pp = &players[packet->pnum];
+ 	pp->p_fuel = ntohl(packet->p_fuel);
+ 	pp->p_armies = ntohl(packet->p_armies);
+ 	pp->p_shield = ntohl(packet->p_shield);
+ 	pp->p_damage = ntohl(packet->p_damage);
+ 	pp->p_etemp = ntohl(packet->p_etemp);
+ 	pp->p_wtemp = ntohl(packet->p_wtemp);
+ 	informScan(packet->pnum);
+     }
  }
  
*** newwin.c	Mon Dec  9 12:13:33 1991
--- ../netrek/newwin.c	Mon Dec 16 13:59:16 1991
***************
*** 631,637 ****
      /* try to find the start of the info */
      while (1) {
  	if (data == NULL) return;
! 	if (!strcmp(data->data, STATUS_TOKEN))		/* ATM */
  	    break;
  	data = data->next;
      }
--- 631,637 ----
      /* try to find the start of the info */
      while (1) {
  	if (data == NULL) return;
! 	if (!strcmp(data->data, STATUS_TOKEN))
  	    break;
  	data = data->next;
      }
***************
*** 641,648 ****
  	strlen(msg), W_RegularFont);
      for (i = 16; i < 50; i += 2) {
  	if (data == NULL) break;
! 	W_WriteText(mapw, 20, i*W_Textheight, textColor, data->data,
! 	    strlen(data->data), W_RegularFont);
  	data = data->next;
      }
  }
--- 641,652 ----
  	strlen(msg), W_RegularFont);
      for (i = 16; i < 50; i += 2) {
  	if (data == NULL) break;
! 	if (data->data[0] == '+')	/* quick boldface hack */
! 	    W_WriteText(mapw, 20, i*W_Textheight, textColor, data->data+1,
! 		strlen(data->data)-1, W_BoldFont);
! 	else
! 	    W_WriteText(mapw, 20, i*W_Textheight, textColor, data->data,
! 		strlen(data->data), W_RegularFont);
  	data = data->next;
      }
  }
