]>
git.cameronkatri.com Git - bsdgames-darwin.git/blob - hunt/huntd/hunt.h
1 /* $NetBSD: hunt.h,v 1.31 2014/03/30 05:53:12 dholland Exp $ */
4 * Copyright (c) 1983-2003, Regents of the University of California.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are
11 * + Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * + Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 * + Neither the name of the University of California, San Francisco nor
17 * the names of its contributors may be used to endorse or promote
18 * products derived from this software without specific prior written
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
22 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
23 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
24 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 #include <sys/ioctl.h>
40 #include <sys/types.h>
44 #include "hunt_common.h"
46 extern const int shot_req
[];
47 extern const int shot_type
[];
49 extern const int slime_req
[];
52 typedef struct bullet_def BULLET
;
53 typedef struct expl_def EXPL
;
54 typedef struct player_def PLAYER
;
55 typedef struct ident_def IDENT
;
56 typedef struct regen_def REGEN
;
59 char i_name
[WIRE_NAMELEN
];
73 int i_gkills
, i_bkills
, i_deaths
, i_stillb
, i_saved
;
102 char p_death
[MSGLEN
];
103 char p_maze
[HEIGHT
][WIDTH2
];
105 int p_lastx
, p_lasty
;
137 extern char Buf
[BUFSIZ
], Maze
[HEIGHT
][WIDTH2
], Orig_maze
[HEIGHT
][WIDTH2
];
141 extern struct pollfd fdset
[];
143 extern int See_over
[NASCII
];
145 extern BULLET
*Bullets
;
147 extern IDENT
*Scores
;
149 extern PLAYER Player
[MAXPL
], *End_player
;
151 extern PLAYER Boot
[NBOOTS
];
155 extern PLAYER Monitor
[MAXMON
], *End_monitor
;
167 void drawmaze(PLAYER
*);
169 void check(PLAYER
*, int, int);
170 void showstat(PLAYER
*);
171 void drawplayer(PLAYER
*, bool);
172 void message(PLAYER
*, const char *);
175 void checkdam(PLAYER
*, PLAYER
*, IDENT
*, int, char);
177 __dead
void cleanup(int);
180 void mon_execute(PLAYER
*); /* ifdef MONITOR only */
181 void execute(PLAYER
*);
182 void add_shot(int, int, int, char, int, PLAYER
*, int, char);
183 BULLET
*create_shot(int, int, int, char, int, int, PLAYER
*,
187 void showexpl(int, int, char);
189 void clearwalls(void);
195 void moveshots(void);
196 PLAYER
*play_at(int, int);
197 bool opposite(int, char);
198 BULLET
*is_bullet(int, int);
199 void fixshots(int, int, char);
202 __printflike(2, 3) void complain(int level
, const char *fmt
, ...);
205 void cgoto(PLAYER
*, int, int);
206 void outch(PLAYER
*, int);
207 void outstr(PLAYER
*, const char *, int);
208 void clrscr(PLAYER
*);
210 void sendcom(PLAYER
*, int, ...);