Home | History | Annotate | Line # | Download | only in huntd
extern.c revision 1.4
      1  1.4      wiz /*	$NetBSD: extern.c,v 1.4 2003/06/11 12:00:22 wiz Exp $	*/
      2  1.1      mrg /*
      3  1.4      wiz  * Copyright (c) 1983-2003, Regents of the University of California.
      4  1.4      wiz  * All rights reserved.
      5  1.4      wiz  *
      6  1.4      wiz  * Redistribution and use in source and binary forms, with or without
      7  1.4      wiz  * modification, are permitted provided that the following conditions are
      8  1.4      wiz  * met:
      9  1.4      wiz  *
     10  1.4      wiz  * + Redistributions of source code must retain the above copyright
     11  1.4      wiz  *   notice, this list of conditions and the following disclaimer.
     12  1.4      wiz  * + Redistributions in binary form must reproduce the above copyright
     13  1.4      wiz  *   notice, this list of conditions and the following disclaimer in the
     14  1.4      wiz  *   documentation and/or other materials provided with the distribution.
     15  1.4      wiz  * + Neither the name of the University of California, San Francisco nor
     16  1.4      wiz  *   the names of its contributors may be used to endorse or promote
     17  1.4      wiz  *   products derived from this software without specific prior written
     18  1.4      wiz  *   permission.
     19  1.4      wiz  *
     20  1.4      wiz  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
     21  1.4      wiz  * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     22  1.4      wiz  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
     23  1.4      wiz  * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     24  1.4      wiz  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     25  1.4      wiz  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     26  1.4      wiz  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     27  1.4      wiz  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     28  1.4      wiz  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     29  1.4      wiz  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     30  1.4      wiz  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     31  1.1      mrg  */
     32  1.1      mrg 
     33  1.2    lukem #include <sys/cdefs.h>
     34  1.2    lukem #ifndef lint
     35  1.4      wiz __RCSID("$NetBSD: extern.c,v 1.4 2003/06/11 12:00:22 wiz Exp $");
     36  1.2    lukem #endif /* not lint */
     37  1.2    lukem 
     38  1.1      mrg # include	"hunt.h"
     39  1.1      mrg 
     40  1.1      mrg # ifdef MONITOR
     41  1.1      mrg FLAG	Am_monitor = FALSE;		/* current process is a monitor */
     42  1.1      mrg # endif
     43  1.1      mrg 
     44  1.1      mrg char	Buf[BUFSIZ];			/* general scribbling buffer */
     45  1.1      mrg char	Maze[HEIGHT][WIDTH2];		/* the maze */
     46  1.1      mrg char	Orig_maze[HEIGHT][WIDTH2];	/* the original maze */
     47  1.1      mrg 
     48  1.3  mycroft struct	pollfd fdset[3+MAXPL+MAXMON];
     49  1.1      mrg int	Nplayer = 0;			/* number of players */
     50  1.1      mrg int	Socket;				/* main socket */
     51  1.1      mrg int	Status;				/* stat socket */
     52  1.1      mrg int	See_over[NASCII];		/* lookup table for determining whether
     53  1.1      mrg 					 * character represents "transparent"
     54  1.1      mrg 					 * item */
     55  1.1      mrg 
     56  1.1      mrg BULLET	*Bullets = NULL;		/* linked list of bullets */
     57  1.1      mrg 
     58  1.1      mrg EXPL	*Expl[EXPLEN];			/* explosion lists */
     59  1.1      mrg EXPL	*Last_expl;			/* last explosion on Expl[0] */
     60  1.1      mrg 
     61  1.1      mrg PLAYER	Player[MAXPL];			/* all the players */
     62  1.1      mrg PLAYER	*End_player = Player;		/* last active player slot */
     63  1.1      mrg # ifdef BOOTS
     64  1.1      mrg PLAYER	Boot[NBOOTS];			/* all the boots */
     65  1.1      mrg # endif
     66  1.1      mrg IDENT	*Scores;			/* score cache */
     67  1.1      mrg # ifdef MONITOR
     68  1.1      mrg PLAYER	Monitor[MAXMON];		/* all the monitors */
     69  1.1      mrg PLAYER	*End_monitor = Monitor;		/* last active monitor slot */
     70  1.1      mrg # endif
     71  1.1      mrg 
     72  1.1      mrg # ifdef VOLCANO
     73  1.1      mrg int	volcano = 0;			/* Explosion size */
     74  1.1      mrg # endif
     75  1.1      mrg 
     76  1.1      mrg int	shot_req[MAXBOMB]	= {
     77  1.1      mrg 				BULREQ, GRENREQ, SATREQ,
     78  1.1      mrg 				BOMB7REQ, BOMB9REQ, BOMB11REQ,
     79  1.1      mrg 				BOMB13REQ, BOMB15REQ, BOMB17REQ,
     80  1.1      mrg 				BOMB19REQ, BOMB21REQ,
     81  1.1      mrg 			};
     82  1.1      mrg int	shot_type[MAXBOMB]	= {
     83  1.1      mrg 				SHOT, GRENADE, SATCHEL,
     84  1.1      mrg 				BOMB, BOMB, BOMB,
     85  1.1      mrg 				BOMB, BOMB, BOMB,
     86  1.1      mrg 				BOMB, BOMB,
     87  1.1      mrg 			};
     88  1.1      mrg 
     89  1.1      mrg int	slime_req[MAXSLIME]	= {
     90  1.1      mrg 				SLIMEREQ, SSLIMEREQ, SLIME2REQ, SLIME3REQ,
     91  1.1      mrg 			};
     92