xref: /openbsd/games/hunt/huntd/extern.c (revision 133306f0)
1 /*	$OpenBSD: extern.c,v 1.3 1999/01/29 07:30:35 d Exp $	*/
2 /*	$NetBSD: extern.c,v 1.2 1997/10/10 16:33:24 lukem Exp $	*/
3 /*
4  *  Hunt
5  *  Copyright (c) 1985 Conrad C. Huang, Gregory S. Couch, Kenneth C.R.C. Arnold
6  *  San Francisco, California
7  */
8 
9 # include	"hunt.h"
10 # include	"server.h"
11 
12 FLAG	Am_monitor = FALSE;		/* current process is a monitor */
13 
14 char	Buf[BUFSIZ];			/* general scribbling buffer */
15 char	Maze[HEIGHT][WIDTH2];		/* the maze */
16 char	Orig_maze[HEIGHT][WIDTH2];	/* the original maze */
17 
18 fd_set	Fds_mask;			/* mask for the file descriptors */
19 fd_set	Have_inp;			/* which file descriptors have input */
20 int	Nplayer = 0;			/* number of players */
21 int	Num_fds;			/* number of maximum file descriptor */
22 int	Socket;				/* main socket */
23 int	Status;				/* stat socket */
24 int	See_over[NASCII];		/* lookup table for determining whether
25 					 * character represents "transparent"
26 					 * item */
27 
28 BULLET	*Bullets = NULL;		/* linked list of bullets */
29 
30 EXPL	*Expl[EXPLEN];			/* explosion lists */
31 EXPL	*Last_expl;			/* last explosion on Expl[0] */
32 
33 PLAYER	Player[MAXPL];			/* all the players */
34 PLAYER	*End_player = Player;		/* last active player slot */
35 PLAYER	Boot[NBOOTS];			/* all the boots */
36 IDENT	*Scores;			/* score cache */
37 PLAYER	Monitor[MAXMON];		/* all the monitors */
38 PLAYER	*End_monitor = Monitor;		/* last active monitor slot */
39 
40 int	volcano = 0;			/* Explosion size */
41 
42 int	shot_req[MAXBOMB]	= {
43 				BULREQ, GRENREQ, SATREQ,
44 				BOMB7REQ, BOMB9REQ, BOMB11REQ,
45 				BOMB13REQ, BOMB15REQ, BOMB17REQ,
46 				BOMB19REQ, BOMB21REQ,
47 			};
48 int	shot_type[MAXBOMB]	= {
49 				SHOT, GRENADE, SATCHEL,
50 				BOMB, BOMB, BOMB,
51 				BOMB, BOMB, BOMB,
52 				BOMB, BOMB,
53 			};
54 
55 int	slime_req[MAXSLIME]	= {
56 				SLIMEREQ, SSLIMEREQ, SLIME2REQ, SLIME3REQ,
57 			};
58