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