extern.h revision 1.10 1 /* $NetBSD: extern.h,v 1.10 2008/02/03 21:24:58 dholland Exp $ */
2
3 /*
4 * Copyright (c) 1997 Christos Zoulas. 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
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. 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 * 3. All advertising materials mentioning features or use of this software
15 * must display the following acknowledgement:
16 * This product includes software developed by Christos Zoulas.
17 * 4. The name of the author may not be used to endorse or promote products
18 * derived from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 * NOT 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 OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32 /* bill.c */
33 void mailbill(void);
34
35 /* config.c */
36
37 /* create.c */
38 void makeplayer(void);
39 void newcavelevel(int);
40 void eat(int, int);
41 int fillmonst(int);
42
43 /* data.c */
44
45 /* diag.c */
46 void diag(void);
47 int dcount(int);
48 void diagdrawscreen(void);
49 int savegame(char *);
50 void restoregame(char *);
51
52 /* display.c */
53 void bottomline(void);
54 void bottomhp(void);
55 void bottomspell(void);
56 void bottomdo(void);
57 void bot_linex(void);
58 void bottomgold(void);
59 void draws(int, int, int, int);
60 void drawscreen(void);
61 void showcell(int, int);
62 void show1cell(int, int);
63 void showplayer(void);
64 int moveplayer(int);
65 void seemagic(int);
66
67 /* fortune.c */
68 const char *fortune(void);
69
70 /* global.c */
71 void raiselevel(void);
72 void loselevel(void);
73 void raiseexperience(long);
74 void loseexperience(long);
75 void losehp(int);
76 void losemhp(int);
77 void raisehp(int);
78 void raisemhp(int);
79 void raisespells(int);
80 void raisemspells(int);
81 void losespells(int);
82 void losemspells(int);
83 int makemonst(int);
84 void positionplayer(void);
85 void recalc(void);
86 void quit(void);
87 void more(void);
88 int take(int, int);
89 int drop_object(int);
90 void enchantarmor(void);
91 void enchweapon(void);
92 int pocketfull(void);
93 int nearbymonst(void);
94 int stealsomething(void);
95 int emptyhanded(void);
96 void creategem(void);
97 void adjustcvalues(int, int);
98 int getpassword(void);
99 int getyn(void);
100 int packweight(void);
101 int rnd(int);
102 int rund(int);
103
104 /* help.c */
105 void help(void);
106 void welcome(void);
107 void retcont(void);
108
109 /* io.c */
110 void setupvt100(void);
111 void clearvt100(void);
112 int ttgetch(void);
113 void scbr(void);
114 void sncbr(void);
115 void newgame(void);
116 void lprintf(const char *, ...) __attribute__((__format__(__printf__, 1, 2)));
117 void lprint(long);
118 void lwrite(char *, int);
119 long lgetc(void);
120 long larn_lrint(void);
121 void lrfill(char *, int);
122 char *lgetw(void);
123 char *lgetl(void);
124 int lcreat(char *);
125 int lopen(char *);
126 int lappend(char *);
127 void lrclose(void);
128 void lwclose(void);
129 void lprcat(const char *);
130 void cursor(int, int);
131 void cursors(void);
132 void init_term(void);
133 void cl_line(int, int);
134 void cl_up(int, int);
135 void cl_dn(int, int);
136 void standout(const char *);
137 void set_score_output(void);
138 void lflush(void);
139 char *tmcapcnv(char *, char *);
140 void beep(void);
141
142 /* main.c */
143 int main(int, char **);
144 void showstr(void);
145 void qshowstr(void);
146 void t_setup(int);
147 void t_endup(int);
148 void showwear(void);
149 void showwield(void);
150 void showread(void);
151 void showeat(void);
152 void showquaff(void);
153 void show1(int, const char *[]);
154 void show3(int);
155 void randmonst(void);
156 void parse(void);
157 void parse2(void);
158 void run(int);
159 void wield(void);
160 void ydhi(int);
161 void ycwi(int);
162 void wear(void);
163 void dropobj(void);
164 void readscr(void);
165 void eatcookie(void);
166 void quaff(void);
167 unsigned long readnum(long);
168 void szero(char *);
169
170 /* monster.c */
171 void createmonster(int);
172 void createitem(int, int);
173 void cast(void);
174 void speldamage(int);
175 void loseint(void);
176 int isconfuse(void);
177 int nospell(int, int);
178 int fullhit(int);
179 void direct(int, int, const char *, int);
180 void godirect(int, int, const char *, int, int);
181 void ifblind(int, int);
182 void tdirect(int);
183 void omnidirect(int, int, const char *);
184 int vxy(int *, int *);
185 void dirpoly(int);
186 void hitmonster(int, int);
187 int hitm(int, int, int);
188 void hitplayer(int, int);
189 void dropgold(int);
190 void something(int);
191 int newobject(int, int *);
192 void checkloss(int);
193 int annihilate(void);
194 int newsphere(int, int, int, int);
195 int rmsphere(int, int);
196 void sphboom(int, int);
197 void genmonst(void);
198
199 /* moreobj.c */
200 void oaltar(void);
201 void othrone(int);
202 void odeadthrone(void);
203 void ochest(void);
204 void ofountain(void);
205 void fntchange(int);
206
207 /* movem.c */
208 void movemonst(void);
209 void movemt(int, int);
210 void mmove(int, int, int, int);
211 void movsphere(void);
212
213 /* nap.c */
214 void nap(int);
215
216 /* object.c */
217 void lookforobject(void);
218 void finditem(int);
219 void ostairs(int);
220 void oteleport(int);
221 void opotion(int);
222 void quaffpotion(int);
223 void oscroll(int);
224 void adjusttime(long);
225 void read_scroll(int);
226 void oorb(void);
227 void opit(void);
228 void obottomless(void);
229 void oelevator(int);
230 void ostatue(void);
231 void omirror(void);
232 void obook(void);
233 void readbook(int);
234 void ocookie(void);
235 void ogold(int);
236 void ohome(void);
237 void iopts(void);
238 void ignore(void);
239
240 /* regen.c */
241 void regen(void);
242
243 /* savelev.c */
244 void savelevel(void);
245 void getlevel(void);
246
247 /* scores.c */
248 int readboard(void);
249 int writeboard(void);
250 int makeboard(void);
251 int hashewon(void);
252 long paytaxes(long);
253 int winshou(void);
254 int shou(int);
255 void showscores(void);
256 void showallscores(void);
257 int sortboard(void);
258 void newscore(long, char *, int, int);
259 void new1sub(long, int, char *, long);
260 void new2sub(long, int, char *, int);
261 void died(int);
262 void diedsub(int);
263 void diedlog(void);
264 int getplid(char *);
265
266 /* signal.c */
267 void sigsetup(void);
268
269 /* store.c */
270 void dnd_2hed(void);
271 void dnd_hed(void);
272 void dndstore(void);
273 void sch_hed(void);
274 void oschool(void);
275 void obank(void);
276 void obank2(void);
277 void ointerest(void);
278 void obanksub(void);
279 void appraise(int);
280 void otradepost(void);
281 void cnsitm(void);
282 void olrs(void);
283
284 /* tok.c */
285 int yylex(void);
286 void flushall(void);
287 void sethard(int);
288 void readopts(void);
289