1 1.11 rillig /* $NetBSD: extern.c,v 1.11 2021/05/02 12:50:45 rillig 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.11 rillig * 6 1.11 rillig * Redistribution and use in source and binary forms, with or without 7 1.11 rillig * modification, are permitted provided that the following conditions are 8 1.4 wiz * met: 9 1.11 rillig * 10 1.11 rillig * + Redistributions of source code must retain the above copyright 11 1.4 wiz * notice, this list of conditions and the following disclaimer. 12 1.11 rillig * + Redistributions in binary form must reproduce the above copyright 13 1.11 rillig * 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.11 rillig * + Neither the name of the University of California, San Francisco nor 16 1.11 rillig * the names of its contributors may be used to endorse or promote 17 1.11 rillig * products derived from this software without specific prior written 18 1.4 wiz * permission. 19 1.11 rillig * 20 1.11 rillig * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 21 1.11 rillig * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 1.11 rillig * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 23 1.11 rillig * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 1.11 rillig * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 1.11 rillig * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 1.11 rillig * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 1.11 rillig * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 1.11 rillig * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 1.11 rillig * (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.11 rillig __RCSID("$NetBSD: extern.c,v 1.11 2021/05/02 12:50:45 rillig 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 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.9 dholland 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.9 dholland 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.9 dholland #ifdef OOZE 82 1.9 dholland const int slime_req[MAXSLIME] = { 83 1.5 dholland SLIMEREQ, SSLIMEREQ, SLIME2REQ, SLIME3REQ, 84 1.5 dholland }; 85 1.9 dholland #endif 86