* Copyright (c) 1985 Regents of the University of California.
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation,
* advertising materials, and other materials related to such
* distribution and use acknowledge that the software was developed
* by the University of California, Berkeley. The name of the
* University may not be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
* @(#)hunt.h 5.2 (Berkeley) 6/27/88
* Copyright (c) 1985 Conrad C. Huang, Gregory S. Couch, Kenneth C.R.C. Arnold
* San Francisco, California
# include <sys/localopts.h>
# include <sys/netltoshort.h>
# define SOCK_FAMILY AF_INET
# define SOCK_FAMILY AF_UNIX
# define AF_UNIX_HACK /* 4.2 hack; leaves files around */
# define ADDCH ('a' | 0200)
# define MOVE ('m' | 0200)
# define REFRESH ('r' | 0200)
# define CLRTOEOL ('c' | 0200)
# define ENDWIN ('e' | 0200)
# define CLEAR ('C' | 0200)
# define REDRAW ('R' | 0200)
# define LAST_PLAYER ('l' | 0200)
# define BELL ('b' | 0200)
# define READY ('g' | 0200)
* Choose MAXPL and MAXMON carefully. The screen is assumed to be
* 23 lines high and will only tolerate (MAXPL == 12 && MAXMON == 0)
* or (MAXPL + MAXMON <= 10).
# define WIDTH2 64 /* Next power of 2 >= WIDTH (for fast access) */
# define RBOUND (WIDTH - 1)
# define STAT_LABEL_COL 60
# define STAT_VALUE_COL 74
# define STAT_NAME_COL 61
# define STAT_SCAN_COL (STAT_NAME_COL + 5)
# define STAT_CLOAK_ROW 4
# define STAT_PLAY_ROW 10
# define STAT_MON_ROW (STAT_PLAY_ROW + MAXPL + 1)
# define STAT_NAME_LEN 16
# define CTRL(x) ('x' & 037)
# define BULSPD 5 /* bullets movement speed */
# define SCANLEN (Nplayer * 20)
# define _cloak_char(pp) (((pp)->p_cloak < 0) ? ' ' : '+')
# define _scan_char(pp) (((pp)->p_scan < 0) ? _cloak_char(pp) : '*')
# define stat_char(pp) (((pp)->p_flying < 0) ? _scan_char(pp) : FLYER)
# define _cloak_char(pp) (((pp)->p_cloak < 0) ? ' ' : '+')
# define stat_char(pp) (((pp)->p_scan < 0) ? _cloak_char(pp) : '*')
typedef struct bullet_def BULLET
;
typedef struct expl_def EXPL
;
typedef struct player_def PLAYER
;
typedef struct ident_def IDENT
;
typedef struct regen_def REGEN
;
typedef struct sockaddr_in SOCKET
;
typedef struct sockaddr_un SOCKET
;
typedef struct sgttyb TTYB
;
char p_maze
[HEIGHT
][WIDTH2
];
extern char Buf
[BUFSIZ
], Maze
[HEIGHT
][WIDTH2
], Orig_maze
[HEIGHT
][WIDTH2
];
extern char *Sock_name
, *Driver
;
extern int errno
, Have_inp
, Nplayer
, Num_fds
, Socket
;
extern long Fds_mask
, Sock_mask
;
extern int See_over
[NASCII
];
extern EXPL
*Expl
[EXPLEN
];
extern PLAYER Player
[MAXPL
], *End_player
;
extern PLAYER Monitor
[MAXMON
], *End_monitor
;
char *getenv(), *malloc(), *strcpy(), *strncpy();
BULLET
*is_bullet(), *create_shot();