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