Home | History | Annotate | Line # | Download | only in huntd
extern.c revision 1.5
      1  1.5  dholland /*	$NetBSD: extern.c,v 1.5 2009/07/04 04:29:54 dholland 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.5  dholland __RCSID("$NetBSD: extern.c,v 1.5 2009/07/04 04:29:54 dholland Exp $");
     36  1.2     lukem #endif /* not lint */
     37  1.2     lukem 
     38  1.5  dholland #include "hunt.h"
     39  1.1       mrg 
     40  1.5  dholland #ifdef MONITOR
     41  1.5  dholland FLAG Am_monitor = FALSE;		/* current process is a monitor */
     42  1.5  dholland #endif
     43  1.5  dholland 
     44  1.5  dholland char Buf[BUFSIZ];			/* general scribbling buffer */
     45  1.5  dholland char Maze[HEIGHT][WIDTH2];		/* the maze */
     46  1.5  dholland char Orig_maze[HEIGHT][WIDTH2];		/* the original maze */
     47  1.5  dholland 
     48  1.5  dholland struct pollfd fdset[3+MAXPL+MAXMON];
     49  1.5  dholland int Nplayer = 0;			/* number of players */
     50  1.5  dholland int Socket;				/* main socket */
     51  1.5  dholland int Status;				/* stat socket */
     52  1.5  dholland 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.5  dholland BULLET *Bullets = NULL;			/* linked list of bullets */
     57  1.1       mrg 
     58  1.5  dholland EXPL *Expl[EXPLEN];			/* explosion lists */
     59  1.5  dholland EXPL *Last_expl;			/* last explosion on Expl[0] */
     60  1.1       mrg 
     61  1.5  dholland PLAYER Player[MAXPL];			/* all the players */
     62  1.5  dholland PLAYER *End_player = Player;		/* last active player slot */
     63  1.5  dholland #ifdef BOOTS
     64  1.5  dholland PLAYER Boot[NBOOTS];			/* all the boots */
     65  1.5  dholland #endif
     66  1.5  dholland IDENT *Scores;				/* score cache */
     67  1.5  dholland #ifdef MONITOR
     68  1.5  dholland PLAYER Monitor[MAXMON];			/* all the monitors */
     69  1.5  dholland PLAYER *End_monitor = Monitor;		/* last active monitor slot */
     70  1.5  dholland #endif
     71  1.5  dholland 
     72  1.5  dholland #ifdef VOLCANO
     73  1.5  dholland int volcano = 0;			/* Explosion size */
     74  1.5  dholland #endif
     75  1.5  dholland 
     76  1.5  dholland int shot_req[MAXBOMB] = {
     77  1.5  dholland 	BULREQ, GRENREQ, SATREQ,
     78  1.5  dholland 	BOMB7REQ, BOMB9REQ, BOMB11REQ,
     79  1.5  dholland 	BOMB13REQ, BOMB15REQ, BOMB17REQ,
     80  1.5  dholland 	BOMB19REQ, BOMB21REQ,
     81  1.5  dholland };
     82  1.5  dholland 
     83  1.5  dholland int shot_type[MAXBOMB] = {
     84  1.5  dholland 	SHOT, GRENADE, SATCHEL,
     85  1.5  dholland 	BOMB, BOMB, BOMB,
     86  1.5  dholland 	BOMB, BOMB, BOMB,
     87  1.5  dholland 	BOMB, BOMB,
     88  1.5  dholland };
     89  1.5  dholland 
     90  1.5  dholland int slime_req[MAXSLIME] = {
     91  1.5  dholland 	SLIMEREQ, SSLIMEREQ, SLIME2REQ, SLIME3REQ,
     92  1.5  dholland };
     93