Home | History | Annotate | Line # | Download | only in huntd
extern.c revision 1.3
      1 /*	$NetBSD: extern.c,v 1.3 2002/09/20 20:54:16 mycroft Exp $	*/
      2 /*
      3  *  Hunt
      4  *  Copyright (c) 1985 Conrad C. Huang, Gregory S. Couch, Kenneth C.R.C. Arnold
      5  *  San Francisco, California
      6  */
      7 
      8 #include <sys/cdefs.h>
      9 #ifndef lint
     10 __RCSID("$NetBSD: extern.c,v 1.3 2002/09/20 20:54:16 mycroft Exp $");
     11 #endif /* not lint */
     12 
     13 # include	"hunt.h"
     14 
     15 # ifdef MONITOR
     16 FLAG	Am_monitor = FALSE;		/* current process is a monitor */
     17 # endif
     18 
     19 char	Buf[BUFSIZ];			/* general scribbling buffer */
     20 char	Maze[HEIGHT][WIDTH2];		/* the maze */
     21 char	Orig_maze[HEIGHT][WIDTH2];	/* the original maze */
     22 
     23 struct	pollfd fdset[3+MAXPL+MAXMON];
     24 int	Nplayer = 0;			/* number of players */
     25 int	Socket;				/* main socket */
     26 int	Status;				/* stat socket */
     27 int	See_over[NASCII];		/* lookup table for determining whether
     28 					 * character represents "transparent"
     29 					 * item */
     30 
     31 BULLET	*Bullets = NULL;		/* linked list of bullets */
     32 
     33 EXPL	*Expl[EXPLEN];			/* explosion lists */
     34 EXPL	*Last_expl;			/* last explosion on Expl[0] */
     35 
     36 PLAYER	Player[MAXPL];			/* all the players */
     37 PLAYER	*End_player = Player;		/* last active player slot */
     38 # ifdef BOOTS
     39 PLAYER	Boot[NBOOTS];			/* all the boots */
     40 # endif
     41 IDENT	*Scores;			/* score cache */
     42 # ifdef MONITOR
     43 PLAYER	Monitor[MAXMON];		/* all the monitors */
     44 PLAYER	*End_monitor = Monitor;		/* last active monitor slot */
     45 # endif
     46 
     47 # ifdef VOLCANO
     48 int	volcano = 0;			/* Explosion size */
     49 # endif
     50 
     51 int	shot_req[MAXBOMB]	= {
     52 				BULREQ, GRENREQ, SATREQ,
     53 				BOMB7REQ, BOMB9REQ, BOMB11REQ,
     54 				BOMB13REQ, BOMB15REQ, BOMB17REQ,
     55 				BOMB19REQ, BOMB21REQ,
     56 			};
     57 int	shot_type[MAXBOMB]	= {
     58 				SHOT, GRENADE, SATCHEL,
     59 				BOMB, BOMB, BOMB,
     60 				BOMB, BOMB, BOMB,
     61 				BOMB, BOMB,
     62 			};
     63 
     64 int	slime_req[MAXSLIME]	= {
     65 				SLIMEREQ, SSLIMEREQ, SLIME2REQ, SLIME3REQ,
     66 			};
     67