extern.h revision 1.8 1 /* $NetBSD: extern.h,v 1.8 2008/02/03 19:20:41 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 void gettokstr(char *);
99 int getpassword(void);
100 int getyn(void);
101 int packweight(void);
102 int rnd(int);
103 int rund(int);
104
105 /* help.c */
106 void help(void);
107 void welcome(void);
108 void retcont(void);
109
110 /* io.c */
111 void setupvt100(void);
112 void clearvt100(void);
113 int lgetchar(void);
114 void scbr(void);
115 void sncbr(void);
116 void newgame(void);
117 void lprintf(const char *, ...) __attribute__((__format__(__printf__, 1, 2)));
118 void lprint(long);
119 void lwrite(char *, int);
120 long lgetc(void);
121 long larn_lrint(void);
122 void lrfill(char *, int);
123 char *lgetw(void);
124 char *lgetl(void);
125 int lcreat(char *);
126 int lopen(char *);
127 int lappend(char *);
128 void lrclose(void);
129 void lwclose(void);
130 void lprcat(const char *);
131 void cursor(int, int);
132 void cursors(void);
133 void init_term(void);
134 void cl_line(int, int);
135 void cl_up(int, int);
136 void cl_dn(int, int);
137 void standout(const char *);
138 void set_score_output(void);
139 void lflush(void);
140 int xputchar(int);
141 char *tmcapcnv(char *, char *);
142 void beep(void);
143
144 /* main.c */
145 int main(int, char **);
146 void showstr(void);
147 void qshowstr(void);
148 void t_setup(int);
149 void t_endup(int);
150 void showwear(void);
151 void showwield(void);
152 void showread(void);
153 void showeat(void);
154 void showquaff(void);
155 void show1(int, const char *[]);
156 void show3(int);
157 void randmonst(void);
158 void parse(void);
159 void parse2(void);
160 void run(int);
161 void wield(void);
162 void ydhi(int);
163 void ycwi(int);
164 void wear(void);
165 void dropobj(void);
166 void readscr(void);
167 void eatcookie(void);
168 void quaff(void);
169 unsigned long readnum(long);
170 void szero(char *);
171
172 /* monster.c */
173 void createmonster(int);
174 void createitem(int, int);
175 void cast(void);
176 void speldamage(int);
177 void loseint(void);
178 int isconfuse(void);
179 int nospell(int, int);
180 int fullhit(int);
181 void direct(int, int, const char *, int);
182 void godirect(int, int, const char *, int, int);
183 void ifblind(int, int);
184 void tdirect(int);
185 void omnidirect(int, int, const char *);
186 int vxy(int *, int *);
187 void dirpoly(int);
188 void hitmonster(int, int);
189 int hitm(int, int, int);
190 void hitplayer(int, int);
191 void dropgold(int);
192 void something(int);
193 int newobject(int, int *);
194 void checkloss(int);
195 int annihilate(void);
196 int newsphere(int, int, int, int);
197 int rmsphere(int, int);
198 void sphboom(int, int);
199 void genmonst(void);
200
201 /* moreobj.c */
202 void oaltar(void);
203 void othrone(int);
204 void odeadthrone(void);
205 void ochest(void);
206 void ofountain(void);
207 void fntchange(int);
208
209 /* movem.c */
210 void movemonst(void);
211 void movemt(int, int);
212 void mmove(int, int, int, int);
213 void movsphere(void);
214
215 /* nap.c */
216 void nap(int);
217
218 /* object.c */
219 void lookforobject(void);
220 void finditem(int);
221 void ostairs(int);
222 void oteleport(int);
223 void opotion(int);
224 void quaffpotion(int);
225 void oscroll(int);
226 void adjusttime(long);
227 void read_scroll(int);
228 void oorb(void);
229 void opit(void);
230 void obottomless(void);
231 void oelevator(int);
232 void ostatue(void);
233 void omirror(void);
234 void obook(void);
235 void readbook(int);
236 void ocookie(void);
237 void ogold(int);
238 void ohome(void);
239 void iopts(void);
240 void ignore(void);
241
242 /* regen.c */
243 void regen(void);
244
245 /* savelev.c */
246 void savelevel(void);
247 void getlevel(void);
248
249 /* scores.c */
250 int readboard(void);
251 int writeboard(void);
252 int makeboard(void);
253 int hashewon(void);
254 long paytaxes(long);
255 int winshou(void);
256 int shou(int);
257 void showscores(void);
258 void showallscores(void);
259 int sortboard(void);
260 void newscore(long, char *, int, int);
261 void new1sub(long, int, char *, long);
262 void new2sub(long, int, char *, int);
263 void died(int);
264 void diedsub(int);
265 void diedlog(void);
266 int getplid(char *);
267
268 /* signal.c */
269 void sigsetup(void);
270
271 /* store.c */
272 void dnd_2hed(void);
273 void dnd_hed(void);
274 void dndstore(void);
275 void sch_hed(void);
276 void oschool(void);
277 void obank(void);
278 void obank2(void);
279 void ointerest(void);
280 void obanksub(void);
281 void appraise(int);
282 void otradepost(void);
283 void cnsitm(void);
284 void olrs(void);
285
286 /* tok.c */
287 int yylex(void);
288 void flushall(void);
289 void sethard(int);
290 void readopts(void);
291