]> git.cameronkatri.com Git - bsdgames-darwin.git/blob - rogue/rogue.h
Spelling and punctuation corrections or improvements from OpenBSD.
[bsdgames-darwin.git] / rogue / rogue.h
1 /* $NetBSD: rogue.h,v 1.11 1999/09/13 17:14:08 jsm Exp $ */
2
3 /*
4 * Copyright (c) 1988, 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * This code is derived from software contributed to Berkeley by
8 * Timothy C. Stoehr.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. All advertising materials mentioning features or use of this software
19 * must display the following acknowledgement:
20 * This product includes software developed by the University of
21 * California, Berkeley and its contributors.
22 * 4. Neither the name of the University nor the names of its contributors
23 * may be used to endorse or promote products derived from this software
24 * without specific prior written permission.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)rogue.h 8.1 (Berkeley) 5/31/93
39 */
40
41 /*
42 * rogue.h
43 *
44 * This source herein may be modified and/or distributed by anybody who
45 * so desires, with the following restrictions:
46 * 1.) This notice shall not be removed.
47 * 2.) Credit shall not be taken for the creation of this source.
48 * 3.) This code is not to be traded, sold, or used for personal
49 * gain or profit.
50 */
51
52 #define boolean char
53
54 #define NOTHING ((unsigned short) 0)
55 #define OBJECT ((unsigned short) 01)
56 #define MONSTER ((unsigned short) 02)
57 #define STAIRS ((unsigned short) 04)
58 #define HORWALL ((unsigned short) 010)
59 #define VERTWALL ((unsigned short) 020)
60 #define DOOR ((unsigned short) 040)
61 #define FLOOR ((unsigned short) 0100)
62 #define TUNNEL ((unsigned short) 0200)
63 #define TRAP ((unsigned short) 0400)
64 #define HIDDEN ((unsigned short) 01000)
65
66 #define ARMOR ((unsigned short) 01)
67 #define WEAPON ((unsigned short) 02)
68 #define SCROL ((unsigned short) 04)
69 #define POTION ((unsigned short) 010)
70 #define GOLD ((unsigned short) 020)
71 #define FOOD ((unsigned short) 040)
72 #define WAND ((unsigned short) 0100)
73 #define RING ((unsigned short) 0200)
74 #define AMULET ((unsigned short) 0400)
75 #define ALL_OBJECTS ((unsigned short) 0777)
76
77 #define LEATHER 0
78 #define RINGMAIL 1
79 #define SCALE 2
80 #define CHAIN 3
81 #define BANDED 4
82 #define SPLINT 5
83 #define PLATE 6
84 #define ARMORS 7
85
86 #define BOW 0
87 #define DART 1
88 #define ARROW 2
89 #define DAGGER 3
90 #define SHURIKEN 4
91 #define MACE 5
92 #define LONG_SWORD 6
93 #define TWO_HANDED_SWORD 7
94 #define WEAPONS 8
95
96 #define MAX_PACK_COUNT 24
97
98 #define PROTECT_ARMOR 0
99 #define HOLD_MONSTER 1
100 #define ENCH_WEAPON 2
101 #define ENCH_ARMOR 3
102 #define IDENTIFY 4
103 #define TELEPORT 5
104 #define SLEEP 6
105 #define SCARE_MONSTER 7
106 #define REMOVE_CURSE 8
107 #define CREATE_MONSTER 9
108 #define AGGRAVATE_MONSTER 10
109 #define MAGIC_MAPPING 11
110 #define CON_MON 12
111 #define SCROLS 13
112
113 #define INCREASE_STRENGTH 0
114 #define RESTORE_STRENGTH 1
115 #define HEALING 2
116 #define EXTRA_HEALING 3
117 #define POISON 4
118 #define RAISE_LEVEL 5
119 #define BLINDNESS 6
120 #define HALLUCINATION 7
121 #define DETECT_MONSTER 8
122 #define DETECT_OBJECTS 9
123 #define CONFUSION 10
124 #define LEVITATION 11
125 #define HASTE_SELF 12
126 #define SEE_INVISIBLE 13
127 #define POTIONS 14
128
129 #define TELE_AWAY 0
130 #define SLOW_MONSTER 1
131 #define INVISIBILITY 2
132 #define POLYMORPH 3
133 #define HASTE_MONSTER 4
134 #define MAGIC_MISSILE 5
135 #define CANCELLATION 6
136 #define DO_NOTHING 7
137 #define DRAIN_LIFE 8
138 #define COLD 9
139 #define FIRE 10
140 #define WANDS 11
141
142 #define STEALTH 0
143 #define R_TELEPORT 1
144 #define REGENERATION 2
145 #define SLOW_DIGEST 3
146 #define ADD_STRENGTH 4
147 #define SUSTAIN_STRENGTH 5
148 #define DEXTERITY 6
149 #define ADORNMENT 7
150 #define R_SEE_INVISIBLE 8
151 #define MAINTAIN_ARMOR 9
152 #define SEARCHING 10
153 #define RINGS 11
154
155 #define RATION 0
156 #define FRUIT 1
157
158 #define NOT_USED ((unsigned short) 0)
159 #define BEING_WIELDED ((unsigned short) 01)
160 #define BEING_WORN ((unsigned short) 02)
161 #define ON_LEFT_HAND ((unsigned short) 04)
162 #define ON_RIGHT_HAND ((unsigned short) 010)
163 #define ON_EITHER_HAND ((unsigned short) 014)
164 #define BEING_USED ((unsigned short) 017)
165
166 #define NO_TRAP -1
167 #define TRAP_DOOR 0
168 #define BEAR_TRAP 1
169 #define TELE_TRAP 2
170 #define DART_TRAP 3
171 #define SLEEPING_GAS_TRAP 4
172 #define RUST_TRAP 5
173 #define TRAPS 6
174
175 #define STEALTH_FACTOR 3
176 #define R_TELE_PERCENT 8
177
178 #define UNIDENTIFIED ((unsigned short) 00) /* MUST BE ZERO! */
179 #define IDENTIFIED ((unsigned short) 01)
180 #define CALLED ((unsigned short) 02)
181
182 #define DROWS 24
183 #define DCOLS 80
184 #define NMESSAGES 5
185 #define MAX_TITLE_LENGTH 30
186 #define MAXSYLLABLES 40
187 #define MAX_METAL 14
188 #define WAND_MATERIALS 30
189 #define GEMS 14
190
191 #define GOLD_PERCENT 46
192
193 #define MAX_OPT_LEN 40
194
195 struct id {
196 short value;
197 char *title;
198 char *real;
199 unsigned short id_status;
200 };
201
202 /* The following #defines provide more meaningful names for some of the
203 * struct object fields that are used for monsters. This, since each monster
204 * and object (scrolls, potions, etc) are represented by a struct object.
205 * Ideally, this should be handled by some kind of union structure.
206 */
207
208 #define m_damage damage
209 #define hp_to_kill quantity
210 #define m_char ichar
211 #define first_level is_protected
212 #define last_level is_cursed
213 #define m_hit_chance class
214 #define stationary_damage identified
215 #define drop_percent which_kind
216 #define trail_char d_enchant
217 #define slowed_toggle quiver
218 #define moves_confused hit_enchant
219 #define nap_length picked_up
220 #define disguise what_is
221 #define next_monster next_object
222
223 struct obj { /* comment is monster meaning */
224 unsigned long m_flags; /* monster flags */
225 const char *damage; /* damage it does */
226 short quantity; /* hit points to kill */
227 short ichar; /* 'A' is for aquatar */
228 short kill_exp; /* exp for killing it */
229 short is_protected; /* level starts */
230 short is_cursed; /* level ends */
231 short class; /* chance of hitting you */
232 short identified; /* 'F' damage, 1,2,3... */
233 unsigned short which_kind; /* item carry/drop % */
234 short o_row, o_col, o; /* o is how many times stuck at o_row, o_col */
235 short row, col; /* current row, col */
236 short d_enchant; /* room char when detect_monster */
237 short quiver; /* monster slowed toggle */
238 short trow, tcol; /* target row, col */
239 short hit_enchant; /* how many moves is confused */
240 unsigned short what_is; /* imitator's charactor (?!%: */
241 short picked_up; /* sleep from wand of sleep */
242 unsigned short in_use_flags;
243 struct obj *next_object; /* next monster */
244 };
245
246 typedef struct obj object;
247
248 #define INIT_AW (object*)0
249 #define INIT_RINGS (object*)0
250 #define INIT_HP 12
251 #define INIT_STR 16
252 #define INIT_EXPLEVEL 1
253 #define INIT_EXP 0
254 #define INIT_PACK {0}
255 #define INIT_GOLD 0
256 #define INIT_CHAR '@'
257 #define INIT_MOVES 1250
258
259 struct fightr {
260 object *armor;
261 object *weapon;
262 object *left_ring, *right_ring;
263 short hp_current;
264 short hp_max;
265 short str_current;
266 short str_max;
267 object pack;
268 long gold;
269 short exp;
270 long exp_points;
271 short row, col;
272 short fchar;
273 short moves_left;
274 };
275
276 typedef struct fightr fighter;
277
278 struct dr {
279 short oth_room;
280 short oth_row,
281 oth_col;
282 short door_row,
283 door_col;
284 };
285
286 typedef struct dr door;
287
288 struct rm {
289 short bottom_row, right_col, left_col, top_row;
290 door doors[4];
291 unsigned short is_room;
292 };
293
294 typedef struct rm room;
295
296 #define MAXROOMS 9
297 #define BIG_ROOM 10
298
299 #define NO_ROOM -1
300
301 #define PASSAGE -3 /* cur_room value */
302
303 #define AMULET_LEVEL 26
304
305 #define R_NOTHING ((unsigned short) 01)
306 #define R_ROOM ((unsigned short) 02)
307 #define R_MAZE ((unsigned short) 04)
308 #define R_DEADEND ((unsigned short) 010)
309 #define R_CROSS ((unsigned short) 020)
310
311 #define MAX_EXP_LEVEL 21
312 #define MAX_EXP 10000001L
313 #define MAX_GOLD 999999
314 #define MAX_ARMOR 99
315 #define MAX_HP 999
316 #define MAX_STRENGTH 99
317 #define LAST_DUNGEON 99
318
319 #define STAT_LEVEL 01
320 #define STAT_GOLD 02
321 #define STAT_HP 04
322 #define STAT_STRENGTH 010
323 #define STAT_ARMOR 020
324 #define STAT_EXP 040
325 #define STAT_HUNGER 0100
326 #define STAT_LABEL 0200
327 #define STAT_ALL 0377
328
329 #define PARTY_TIME 10 /* one party somewhere in each 10 level span */
330
331 #define MAX_TRAPS 10 /* maximum traps per level */
332
333 #define HIDE_PERCENT 12
334
335 struct tr {
336 short trap_type;
337 short trap_row, trap_col;
338 };
339
340 typedef struct tr trap;
341
342 extern fighter rogue;
343 extern room rooms[];
344 extern trap traps[];
345 extern unsigned short dungeon[DROWS][DCOLS];
346 extern object level_objects;
347
348 extern struct id id_scrolls[];
349 extern struct id id_potions[];
350 extern struct id id_wands[];
351 extern struct id id_rings[];
352 extern struct id id_weapons[];
353 extern struct id id_armors[];
354
355 extern object mon_tab[];
356 extern object level_monsters;
357
358 #define MONSTERS 26
359
360 #define HASTED 01L
361 #define SLOWED 02L
362 #define INVISIBLE 04L
363 #define ASLEEP 010L
364 #define WAKENS 020L
365 #define WANDERS 040L
366 #define FLIES 0100L
367 #define FLITS 0200L
368 #define CAN_FLIT 0400L /* can, but usually doesn't, flit */
369 #define CONFUSED 01000L
370 #define RUSTS 02000L
371 #define HOLDS 04000L
372 #define FREEZES 010000L
373 #define STEALS_GOLD 020000L
374 #define STEALS_ITEM 040000L
375 #define STINGS 0100000L
376 #define DRAINS_LIFE 0200000L
377 #define DROPS_LEVEL 0400000L
378 #define SEEKS_GOLD 01000000L
379 #define FREEZING_ROGUE 02000000L
380 #define RUST_VANISHED 04000000L
381 #define CONFUSES 010000000L
382 #define IMITATES 020000000L
383 #define FLAMES 040000000L
384 #define STATIONARY 0100000000L /* damage will be 1,2,3,... */
385 #define NAPPING 0200000000L /* can't wake up for a while */
386 #define ALREADY_MOVED 0400000000L
387
388 #define SPECIAL_HIT (RUSTS|HOLDS|FREEZES|STEALS_GOLD|STEALS_ITEM|STINGS|DRAINS_LIFE|DROPS_LEVEL)
389
390 #define WAKE_PERCENT 45
391 #define FLIT_PERCENT 40
392 #define PARTY_WAKE_PERCENT 75
393
394 #define HYPOTHERMIA 1
395 #define STARVATION 2
396 #define POISON_DART 3
397 #define QUIT 4
398 #define WIN 5
399 #define KFIRE 6
400
401 #define UPWARD 0
402 #define UPRIGHT 1
403 #define RIGHT 2
404 #define DOWNRIGHT 3
405 #define DOWN 4
406 #define DOWNLEFT 5
407 #define LEFT 6
408 #define UPLEFT 7
409 #define DIRS 8
410
411 #define ROW1 7
412 #define ROW2 15
413
414 #define COL1 26
415 #define COL2 52
416
417 #define MOVED 0
418 #define MOVE_FAILED -1
419 #define STOPPED_ON_SOMETHING -2
420 #define CANCEL '\033'
421 #define LIST '*'
422
423 #define HUNGRY 300
424 #define WEAK 150
425 #define FAINT 20
426 #define STARVE 0
427
428 #define MIN_ROW 1
429
430 struct rogue_time {
431 short year; /* >= 1987 */
432 short month; /* 1 - 12 */
433 short day; /* 1 - 31 */
434 short hour; /* 0 - 23 */
435 short minute; /* 0 - 59 */
436 short second; /* 0 - 59 */
437 };
438
439 #include <curses.h>
440
441 /*
442 * external routine declarations.
443 */
444 #include <stdio.h>
445 #include <string.h>
446 #include <sys/types.h>
447 #include <unistd.h>
448
449 object *alloc_object __P((void));
450 object *check_duplicate __P((object *, object *));
451 const char *get_ench_color __P((void));
452 object *get_letter_object __P((int));
453 object *get_thrown_at_monster __P((object *, short, short *, short *));
454 object *get_zapped_monster __P((short, short *, short *));
455 object *gr_monster __P((object *, int));
456 object *gr_object __P((void));
457 char *md_getenv __P((const char *));
458 const char *
459 md_gln __P((void));
460 char *md_malloc __P((int));
461 const char *mon_name __P((const object *));
462 const char *name_of __P((const object *));
463 object *object_at __P((object *, short, short));
464 object *pick_up __P((int, int, short *));
465 void add_exp __P((int, boolean));
466 void add_mazes __P((void));
467 void add_traps __P((void));
468 void aggravate __P((void));
469 void aim_monster __P((object *));
470 void bounce __P((short, short, short, short, short));
471 void byebye __P((int));
472 void c_object_for_wizard __P((void));
473 void call_it __P((void));
474 boolean can_move __P((int, int, int, int));
475 boolean can_turn __P((int, int));
476 void center __P((short, const char *));
477 void check_gold_seeker __P((object *));
478 boolean check_hunger __P((boolean));
479 boolean check_imitator __P((object *));
480 void check_message __P((void));
481 int check_up __P((void));
482 void clean_up __P((const char *)) __attribute__((__noreturn__));
483 void clear_level __P((void));
484 void cnfs __P((void));
485 int coin_toss __P((void));
486 int connect_rooms __P((short, short));
487 void cough_up __P((object *));
488 void create_monster __P((void));
489 int damage_for_strength __P((void));
490 void darken_room __P((short));
491 void disappear __P((object *));
492 void do_args __P((int, char **));
493 void do_opts __P((void));
494 void do_put_on __P((object *, boolean));
495 void do_shell __P((void));
496 void do_wear __P((object *));
497 void do_wield __P((object *));
498 void dr_course __P((object *, boolean, short, short));
499 void drain_life __P((void));
500 void draw_magic_map __P((void));
501 void draw_simple_passage __P((short, short, short, short, short));
502 void drop __P((void));
503 int drop_check __P((void));
504 void drop_level __P((void));
505 void eat __P((void));
506 void edit_opts __P((void));
507 void env_get_value __P((char **, char *, boolean));
508 void error_save __P((int)) __attribute__((__noreturn__));
509 void fight __P((int));
510 void fill_it __P((int, boolean));
511 void fill_out_level __P((void));
512 boolean flame_broil __P((object *));
513 int flit __P((object *));
514 void flop_weapon __P((object *, short, short));
515 void free_object __P((object *));
516 void free_stuff __P((object *));
517 void freeze __P((object *));
518 int get_armor_class __P((const object *));
519 int get_com_id __P((int *, short));
520 int get_damage __P((const char *, boolean));
521 void get_desc __P((const object *, char *));
522 int get_dir __P((short, short, short, short));
523 void get_dir_rc __P((short, short *, short *, short));
524 char get_dungeon_char __P((short, short));
525 int get_exp_level __P((long));
526 void get_food __P((object *, boolean));
527 int get_hit_chance __P((const object *));
528 int get_input_line __P((const char *, const char *, char *, const char *, boolean, boolean));
529 char get_mask_char __P((unsigned short));
530 int get_number __P((const char *));
531 boolean get_oth_room __P((short, short *, short *));
532 int get_rand __P((int, int));
533 short get_room_number __P((int, int));
534 int get_value __P((const object *));
535 int get_w_damage __P((const object *));
536 void get_wand_and_ring_materials __P((void));
537 int get_weapon_damage __P((const object *));
538 char gmc __P((object *));
539 char gmc_row_col __P((int, int));
540 void go_blind __P((void));
541 boolean gold_at __P((int, int));
542 void gr_armor __P((object *));
543 char gr_dir __P((void));
544 char gr_obj_char __P((void));
545 void gr_potion __P((object *));
546 void gr_ring __P((object *, boolean));
547 short gr_room __P((void));
548 void gr_row_col __P((short *, short *, unsigned short));
549 void gr_scroll __P((object *));
550 void gr_wand __P((object *));
551 void gr_weapon __P((object *, int));
552 void hallucinate __P((void));
553 boolean has_amulet __P((void));
554 boolean has_been_touched __P((const struct rogue_time *, const struct rogue_time *));
555 void heal __P((void));
556 void hide_boxed_passage __P((int, int, int, int, int));
557 void hold_monster __P((void));
558 int hp_raise __P((void));
559 void id_all __P((void));
560 void id_com __P((void));
561 void id_trap __P((void));
562 void id_type __P((void));
563 void idntfy __P((void));
564 boolean imitating __P((int, int));
565 int init __P((int, char **));
566 void init_str __P((char **, const char *));
567 void insert_score __P((char [][], char [][], const char *, short, short, const object *, int));
568 void inv_armor_weapon __P((boolean));
569 void inv_rings __P((void));
570 void inventory __P((const object *, unsigned short));
571 boolean is_all_connected __P((void));
572 boolean is_digit __P((int));
573 boolean is_direction __P((short, short *));
574 boolean is_pack_letter __P((short *, unsigned short *));
575 boolean is_passable __P((int, int));
576 boolean is_vowel __P((short));
577 void kick_into_pack __P((void));
578 void killed_by __P((const object *, short)) __attribute__((__noreturn__));
579 long lget_number __P((const char *));
580 void light_passage __P((int, int));
581 void light_up_room __P((int));
582 boolean m_confuse __P((object *));
583 void make_level __P((void));
584 void make_maze __P((short, short, short, short, short, short));
585 void make_party __P((void));
586 void make_room __P((short, short, short, short));
587 void make_scroll_titles __P((void));
588 boolean mask_pack __P((const object *, unsigned short));
589 boolean mask_room __P((short, short *, short *, unsigned short));
590 boolean md_df __P((const char *));
591 void md_exit __P((int)) __attribute__((__noreturn__));
592 void md_gct __P((struct rogue_time *));
593 int md_get_file_id __P((const char *));
594 void md_gfmt __P((const char *, struct rogue_time *));
595 int md_gseed __P((void));
596 void md_heed_signals __P((void));
597 void md_ignore_signals __P((void));
598 int md_link_count __P((const char *));
599 void md_lock __P((boolean));
600 void md_shell __P((const char *));
601 void md_sleep __P((int));
602 void md_slurp __P((void));
603 void message __P((const char *, boolean));
604 void mix_colors __P((void));
605 void mix_colors __P((void));
606 void mix_random_rooms __P((void));
607 int mon_can_go __P((const object *, int, int));
608 int mon_damage __P((object *, short));
609 void mon_hit __P((object *));
610 boolean mon_sees __P((const object *, int, int));
611 int move_confused __P((object *));
612 void move_mon_to __P((object *, int, int));
613 void move_onto __P((void));
614 int mtry __P((object *, int, int));
615 void multiple_move_rogue __P((short));
616 void mv_1_monster __P((object *, int, int));
617 void mv_aquatars __P((void));
618 void mv_mons __P((void));
619 int name_cmp __P((char *, const char *));
620 short next_avail_ichar __P((void));
621 boolean next_to_something __P((int, int));
622 void nickize __P((char *, const char *, const char *));
623 int no_room_for_monster __P((int));
624 int one_move_rogue __P((short, short));
625 void onintr __P((int));
626 void opt_erase __P((int));
627 void opt_go __P((int));
628 void opt_show __P((int));
629 short pack_count __P((const object *));
630 short pack_letter __P((const char *, unsigned short));
631 void pad __P((const char *, short));
632 void party_monsters __P((int, int));
633 short party_objects __P((int));
634 void place_at __P((object *, int, int));
635 void plant_gold __P((int, int, boolean));
636 void play_level __P((void));
637 void player_init __P((void));
638 void player_init __P((void));
639 void potion_heal __P((int));
640 int pr_com_id __P((int));
641 int pr_motion_char __P((int));
642 void print_stats __P((int));
643 void put_amulet __P((void));
644 void put_door __P((room *, short, short *, short *));
645 void put_gold __P((void));
646 void put_m_at __P((int, int, object *));
647 void put_mons __P((void));
648 void put_objects __P((void));
649 void put_on_ring __P((void));
650 void put_player __P((short));
651 void put_scores __P((const object *, short)) __attribute__((__noreturn__));
652 void put_stairs __P((void));
653 void quaff __P((void));
654 void quit __P((boolean));
655 int r_index __P((const char *, int, boolean));
656 void r_read __P((FILE *, char *, int));
657 void r_write __P((FILE *, const char *, int));
658 void rand_around __P((short, short *, short *));
659 int rand_percent __P((int));
660 void rand_place __P((object *));
661 void read_pack __P((object *, FILE *, boolean));
662 void read_scroll __P((void));
663 void read_string __P((char *, FILE *));
664 void recursive_deadend __P((short, const short *, short, short));
665 boolean reg_move __P((void));
666 void relight __P((void));
667 void remessage __P((short));
668 void remove_ring __P((void));
669 void rest __P((int));
670 void restore __P((const char *));
671 int rgetchar __P((void));
672 void ring_stats __P((boolean));
673 int rogue_can_see __P((int, int));
674 void rogue_damage __P((short, object *, short));
675 void rogue_hit __P((object *, boolean));
676 int rogue_is_around __P((int, int));
677 long rrandom __P((void));
678 void rust __P((object *));
679 void rw_dungeon __P((FILE *, boolean));
680 void rw_id __P((struct id *, FILE *, int, boolean));
681 void rw_rooms __P((FILE *, boolean));
682 void s_con_mon __P((object *));
683 int same_col __P((int, int));
684 int same_row __P((int, int));
685 void save_game __P((void));
686 void save_into_file __P((const char *));
687 void save_screen __P((void));
688 void search __P((short, boolean));
689 boolean seek_gold __P((object *));
690 void sell_pack __P((void));
691 void sf_error __P((void)) __attribute__((__noreturn__));
692 void show_average_hp __P((void));
693 void show_monsters __P((void));
694 void show_objects __P((void));
695 void show_traps __P((void));
696 void single_inv __P((short));
697 void sound_bell __P((void));
698 void special_hit __P((object *));
699 void srrandom __P((int));
700 void start_window __P((void));
701 void start_window __P((void));
702 void steal_gold __P((object *));
703 void steal_item __P((object *));
704 void sting __P((object *));
705 void stop_window __P((void));
706 void stop_window __P((void));
707 void take_a_nap __P((void));
708 void take_from_pack __P((object *, object *));
709 void take_off __P((void));
710 void tele __P((void));
711 void tele_away __P((object *));
712 void throw __P((void));
713 boolean throw_at_monster __P((object *, object *));
714 int to_hit __P((const object *));
715 short trap_at __P((int, int));
716 void trap_player __P((int, int));
717 boolean try_to_cough __P((short, short, object *));
718 void turn_passage __P((short, boolean));
719 void un_put_on __P((object *));
720 void unblind __P((void));
721 void unconfuse __P((void));
722 void uncurse_all __P((void));
723 void unhallucinate __P((void));
724 void unwear __P((object *));
725 void unwield __P((object *));
726 void vanish __P((object *, short, object *));
727 void visit_rooms __P((int));
728 void wait_for_ack __P((void));
729 void wake_room __P((short, boolean, short, short));
730 void wake_up __P((object *));
731 void wanderer __P((void));
732 void wdrain_life __P((object *));
733 void wear __P((void));
734 void wield __P((void));
735 void win __P((void)) __attribute__((__noreturn__));
736 void wizardize __P((void));
737 void write_pack __P((const object *, FILE *));
738 void write_string __P((char *, FILE *));
739 long xxx __P((boolean));
740 void xxxx __P((char *, short));
741 void zap_monster __P((object *, unsigned short));
742 void zapp __P((void));
743 object *add_to_pack __P((object *, object *, int));
744 struct id *get_id_table __P((const object *));
745 unsigned short gr_what_is __P((void));
746
747 extern boolean ask_quit;
748 extern boolean being_held;
749 extern boolean cant_int;
750 extern boolean con_mon;
751 extern boolean detect_monster;
752 extern boolean did_int;
753 extern boolean interrupted;
754 extern boolean is_wood[];
755 extern boolean jump;
756 extern boolean maintain_armor;
757 extern boolean mon_disappeared;
758 extern boolean msg_cleared;
759 extern boolean no_skull;
760 extern boolean passgo;
761 extern boolean r_see_invisible;
762 extern boolean r_teleport;
763 extern boolean save_is_interactive;
764 extern boolean score_only;
765 extern boolean see_invisible;
766 extern boolean sustain_strength;
767 extern boolean trap_door;
768 extern boolean wizard;
769 extern char hit_message[];
770 extern char hunger_str[];
771 extern char login_name[];
772 extern const char *byebye_string;
773 extern const char *curse_message;
774 extern const char *error_file;
775 extern char *fruit;
776 extern const char *const m_names[];
777 extern const char *more;
778 extern const char *new_level_message;
779 extern char *nick_name;
780 extern const char *press_space;
781 extern char *save_file;
782 extern const char *you_can_move_again;
783 extern const long level_points[];
784 extern short add_strength;
785 extern short auto_search;
786 extern short bear_trap;
787 extern short blind;
788 extern short confused;
789 extern short cur_level;
790 extern short cur_room;
791 extern short e_rings;
792 extern short extra_hp;
793 extern short foods;
794 extern short halluc;
795 extern short haste_self;
796 extern short less_hp;
797 extern short levitate;
798 extern short m_moves;
799 extern short max_level;
800 extern short party_room;
801 extern short r_rings;
802 extern short regeneration;
803 extern short ring_exp;
804 extern short stealthy;
805 extern gid_t gid;
806 extern gid_t egid;