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