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