Home | History | Annotate | Line # | Download | only in huntd
extern.c revision 1.9
      1  1.9  dholland /*	$NetBSD: extern.c,v 1.9 2014/03/29 21:55:59 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.9  dholland __RCSID("$NetBSD: extern.c,v 1.9 2014/03/29 21:55:59 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.6  dholland #if 0 /*def MONITOR*/ /* apparently unused (XXX?) */
     41  1.7  dholland bool 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 See_over[NASCII];			/* lookup table for determining whether
     52  1.1       mrg 					 * character represents "transparent"
     53  1.1       mrg 					 * item */
     54  1.1       mrg 
     55  1.5  dholland BULLET *Bullets = NULL;			/* linked list of bullets */
     56  1.1       mrg 
     57  1.5  dholland PLAYER Player[MAXPL];			/* all the players */
     58  1.5  dholland PLAYER *End_player = Player;		/* last active player slot */
     59  1.5  dholland #ifdef BOOTS
     60  1.5  dholland PLAYER Boot[NBOOTS];			/* all the boots */
     61  1.5  dholland #endif
     62  1.5  dholland IDENT *Scores;				/* score cache */
     63  1.5  dholland #ifdef MONITOR
     64  1.5  dholland PLAYER Monitor[MAXMON];			/* all the monitors */
     65  1.5  dholland PLAYER *End_monitor = Monitor;		/* last active monitor slot */
     66  1.5  dholland #endif
     67  1.5  dholland 
     68  1.9  dholland const int shot_req[MAXBOMB] = {
     69  1.5  dholland 	BULREQ, GRENREQ, SATREQ,
     70  1.5  dholland 	BOMB7REQ, BOMB9REQ, BOMB11REQ,
     71  1.5  dholland 	BOMB13REQ, BOMB15REQ, BOMB17REQ,
     72  1.5  dholland 	BOMB19REQ, BOMB21REQ,
     73  1.5  dholland };
     74  1.5  dholland 
     75  1.9  dholland const int shot_type[MAXBOMB] = {
     76  1.5  dholland 	SHOT, GRENADE, SATCHEL,
     77  1.5  dholland 	BOMB, BOMB, BOMB,
     78  1.5  dholland 	BOMB, BOMB, BOMB,
     79  1.5  dholland 	BOMB, BOMB,
     80  1.5  dholland };
     81  1.5  dholland 
     82  1.9  dholland #ifdef OOZE
     83  1.9  dholland const int slime_req[MAXSLIME] = {
     84  1.5  dholland 	SLIMEREQ, SSLIMEREQ, SLIME2REQ, SLIME3REQ,
     85  1.5  dholland };
     86  1.9  dholland #endif
     87