rogue.h revision 1.5 1 /* $NetBSD: rogue.h,v 1.5 1997/10/12 11:45:52 lukem 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 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 #ifdef CURSES
440 struct _win_st {
441 short _cury, _curx;
442 short _maxy, _maxx;
443 };
444
445 typedef struct _win_st WINDOW;
446
447 extern int LINES, COLS;
448 extern WINDOW *curscr;
449 extern char *CL;
450
451 #else
452 #include <curses.h>
453 #endif
454
455 /*
456 * external routine declarations.
457 */
458 #include <stdio.h>
459 #include <string.h>
460
461 object *alloc_object __P((void));
462 object *check_duplicate __P((object *, object *));
463 char *get_ench_color __P((void));
464 object *get_letter_object __P((int));
465 object *get_thrown_at_monster __P((object *, short, short *, short *));
466 object *get_zapped_monster __P((short, short *, short *));
467 object *gr_monster __P((object *, int));
468 object *gr_object __P((void));
469 char *md_getenv __P((char *));
470 char *md_gln __P((void));
471 char *md_malloc __P((int));
472 char *mon_name __P((object *));
473 char *name_of __P((object *));
474 object *object_at __P((object *, short, short));
475 object *pick_up __P((int, int, short *));
476 void add_exp __P((int, boolean));
477 void add_mazes __P((void));
478 void add_traps __P((void));
479 void aggravate __P((void));
480 void aim_monster __P((object *));
481 void bounce __P((short, short, short, short, short));
482 void byebye __P((int));
483 void c_object_for_wizard __P((void));
484 void call_it __P((void));
485 boolean can_move __P((int, int, int, int));
486 boolean can_turn __P((int, int));
487 void center __P((short, char *));
488 void check_gold_seeker __P((object *));
489 boolean check_hunger __P((boolean));
490 boolean check_imitator __P((object *));
491 void check_message __P((void));
492 int check_up __P((void));
493 void clean_up __P((char *));
494 void clear_level __P((void));
495 void cnfs __P((void));
496 int coin_toss __P((void));
497 int connect_rooms __P((short, short));
498 void cough_up __P((object *));
499 void create_monster __P((void));
500 int damage_for_strength __P((void));
501 void darken_room __P((short));
502 void disappear __P((object *));
503 void do_args __P((int, char **));
504 void do_opts __P((void));
505 void do_put_on __P((object *, boolean));
506 void do_shell __P((void));
507 void do_wear __P((object *));
508 void do_wield __P((object *));
509 void dr_course __P((object *, boolean, short, short));
510 void drain_life __P((void));
511 void draw_magic_map __P((void));
512 void draw_simple_passage __P((short, short, short, short, short));
513 void drop __P((void));
514 int drop_check __P((void));
515 void drop_level __P((void));
516 void eat __P((void));
517 void edit_opts __P((void));
518 void env_get_value __P((char **, char *, boolean));
519 void error_save __P((int));
520 void fight __P((int));
521 void fill_it __P((int, boolean));
522 void fill_out_level __P((void));
523 boolean flame_broil __P((object *));
524 int flit __P((object *));
525 void flop_weapon __P((object *, short, short));
526 void free_object __P((object *));
527 void free_stuff __P((object *));
528 void freeze __P((object *));
529 int get_armor_class __P((object *));
530 int get_com_id __P((int *, short));
531 int get_damage __P((char *, boolean));
532 void get_desc __P((object *, char *));
533 int get_dir __P((short, short, short, short));
534 void get_dir_rc __P((short, short *, short *, short));
535 char get_dungeon_char __P((short, short));
536 int get_exp_level __P((long));
537 void get_food __P((object *, boolean));
538 int get_hit_chance __P((object *));
539 int get_input_line __P((char *, char *, char *, char *, boolean, boolean));
540 char get_mask_char __P((unsigned short));
541 int get_number __P((char *));
542 boolean get_oth_room __P((short, short *, short *));
543 int get_rand __P((int, int));
544 short get_room_number __P((int, int));
545 int get_value __P((object *));
546 int get_w_damage __P((object *));
547 void get_wand_and_ring_materials __P((void));
548 int get_weapon_damage __P((object *));
549 char gmc __P((object *));
550 char gmc_row_col __P((int, int));
551 void go_blind __P((void));
552 boolean gold_at __P((int, int));
553 void gr_armor __P((object *));
554 char gr_dir __P((void));
555 char gr_obj_char __P((void));
556 void gr_potion __P((object *));
557 void gr_ring __P((object *, boolean));
558 short gr_room __P((void));
559 void gr_row_col __P((short *, short *, unsigned short));
560 void gr_scroll __P((object *));
561 void gr_wand __P((object *));
562 void gr_weapon __P((object *, int));
563 void hallucinate __P((void));
564 boolean has_amulet __P((void));
565 boolean has_been_touched __P((struct rogue_time *, struct rogue_time *));
566 void heal __P((void));
567 void hide_boxed_passage __P((int, int, int, int, int));
568 void hold_monster __P((void));
569 int hp_raise __P((void));
570 void id_all __P((void));
571 void id_com __P((void));
572 void id_trap __P((void));
573 void id_type __P((void));
574 void idntfy __P((void));
575 boolean imitating __P((int, int));
576 int init __P((int, char **));
577 void init_str __P((char **, char *));
578 void insert_score __P((char [][], char [][], char *, short, short, object *, int));
579 void inv_armor_weapon __P((boolean));
580 void inv_rings __P((void));
581 void inventory __P((object *, unsigned short));
582 boolean is_all_connected __P((void));
583 boolean is_digit __P((int));
584 boolean is_direction __P((short, short *));
585 boolean is_pack_letter __P((short *, unsigned short *));
586 boolean is_passable __P((int, int));
587 boolean is_vowel __P((short));
588 void kick_into_pack __P((void));
589 void killed_by __P((object *, short));
590 long lget_number __P((char *));
591 void light_passage __P((int, int));
592 void light_up_room __P((int));
593 boolean m_confuse __P((object *));
594 void make_level __P((void));
595 void make_maze __P((short, short, short, short, short, short));
596 void make_party __P((void));
597 void make_room __P((short, short, short, short));
598 void make_scroll_titles __P((void));
599 boolean mask_pack __P((object *, unsigned short));
600 boolean mask_room __P((short, short *, short *, unsigned short));
601 void md_cbreak_no_echo_nonl __P((boolean));
602 boolean md_df __P((char *));
603 void md_exit __P((int));
604 void md_gct __P((struct rogue_time *));
605 char *md_gdtcf __P((void));
606 int md_get_file_id __P((char *));
607 void md_gfmt __P((char *, struct rogue_time *));
608 int md_gseed __P((void));
609 void md_heed_signals __P((void));
610 void md_ignore_signals __P((void));
611 int md_link_count __P((char *));
612 void md_lock __P((boolean));
613 void md_shell __P((char *));
614 void md_sleep __P((int));
615 void md_slurp __P((void));
616 void md_tstp __P((void));
617 void message __P((char *, boolean));
618 void mix_colors __P((void));
619 void mix_colors __P((void));
620 void mix_random_rooms __P((void));
621 int mon_can_go __P((object *, int, int));
622 int mon_damage __P((object *, short));
623 void mon_hit __P((object *));
624 boolean mon_sees __P((object *, int, int));
625 int move_confused __P((object *));
626 void move_mon_to __P((object *, int, int));
627 void move_onto __P((void));
628 int mtry __P((object *, int, int));
629 void multiple_move_rogue __P((short));
630 void mv_1_monster __P((object *, int, int));
631 void mv_aquatars __P((void));
632 void mv_mons __P((void));
633 int name_cmp __P((char *, char *));
634 short next_avail_ichar __P((void));
635 boolean next_to_something __P((int, int));
636 void nickize __P((char *, char *, char *));
637 int no_room_for_monster __P((int));
638 int one_move_rogue __P((short, short));
639 void onintr __P((int));
640 void opt_erase __P((int));
641 void opt_go __P((int));
642 void opt_show __P((int));
643 short pack_count __P((object *));
644 short pack_letter __P((char *, unsigned short));
645 void pad __P((char *, short));
646 void party_monsters __P((int, int));
647 short party_objects __P((int));
648 void place_at __P((object *, int, int));
649 void plant_gold __P((int, int, boolean));
650 void play_level __P((void));
651 void player_init __P((void));
652 void player_init __P((void));
653 void potion_heal __P((int));
654 int pr_com_id __P((int));
655 int pr_motion_char __P((int));
656 void print_stats __P((int));
657 void put_amulet __P((void));
658 void put_door __P((room *, short, short *, short *));
659 void put_gold __P((void));
660 void put_m_at __P((int, int, object *));
661 void put_mons __P((void));
662 void put_objects __P((void));
663 void put_on_ring __P((void));
664 void put_player __P((short));
665 void put_scores __P((object *, short));
666 void put_stairs __P((void));
667 void quaff __P((void));
668 void quit __P((boolean));
669 int r_index __P((char *, int, boolean));
670 void r_read __P((FILE *, char *, int));
671 void r_write __P((FILE *, char *, int));
672 void rand_around __P((short, short *, short *));
673 int rand_percent __P((int));
674 void rand_place __P((object *));
675 void read_pack __P((object *, FILE *, boolean));
676 void read_scroll __P((void));
677 void read_string __P((char *, FILE *));
678 void recursive_deadend __P((short, short *, short, short));
679 boolean reg_move __P((void));
680 void relight __P((void));
681 void remessage __P((short));
682 void remove_ring __P((void));
683 void rest __P((int));
684 void restore __P((char *));
685 int rgetchar __P((void));
686 void ring_stats __P((boolean));
687 int rogue_can_see __P((int, int));
688 void rogue_damage __P((short, object *, short));
689 void rogue_hit __P((object *, boolean));
690 int rogue_is_around __P((int, int));
691 long rrandom __P((void));
692 void rust __P((object *));
693 void rw_dungeon __P((FILE *, boolean));
694 void rw_id __P((struct id *, FILE *, int, boolean));
695 void rw_rooms __P((FILE *, boolean));
696 void s_con_mon __P((object *));
697 int same_col __P((int, int));
698 int same_row __P((int, int));
699 void save_game __P((void));
700 void save_into_file __P((char *));
701 void save_screen __P((void));
702 void search __P((short, boolean));
703 boolean seek_gold __P((object *));
704 void sell_pack __P((void));
705 void sf_error __P((void));
706 void show_average_hp __P((void));
707 void show_monsters __P((void));
708 void show_objects __P((void));
709 void show_traps __P((void));
710 void single_inv __P((short));
711 void sound_bell __P((void));
712 void special_hit __P((object *));
713 void srrandom __P((int));
714 void start_window __P((void));
715 void start_window __P((void));
716 void steal_gold __P((object *));
717 void steal_item __P((object *));
718 void sting __P((object *));
719 void stop_window __P((void));
720 void stop_window __P((void));
721 void take_a_nap __P((void));
722 void take_from_pack __P((object *, object *));
723 void take_off __P((void));
724 void tele __P((void));
725 void tele_away __P((object *));
726 void throw __P((void));
727 boolean throw_at_monster __P((object *, object *));
728 int to_hit __P((object *));
729 short trap_at __P((int, int));
730 void trap_player __P((int, int));
731 boolean try_to_cough __P((short, short, object *));
732 void turn_passage __P((short, boolean));
733 void un_put_on __P((object *));
734 void unblind __P((void));
735 void unconfuse __P((void));
736 void uncurse_all __P((void));
737 void unhallucinate __P((void));
738 void unwear __P((object *));
739 void unwield __P((object *));
740 void vanish __P((object *, short, object *));
741 void visit_rooms __P((int));
742 void wait_for_ack __P((void));
743 void wake_room __P((short, boolean, short, short));
744 void wake_up __P((object *));
745 void wanderer __P((void));
746 void wdrain_life __P((object *));
747 void wear __P((void));
748 void wield __P((void));
749 void win __P((void));
750 void wizardize __P((void));
751 void write_pack __P((object *, FILE *));
752 void write_string __P((char *, FILE *));
753 long xxx __P((boolean));
754 void xxxx __P((char *, short));
755 void zap_monster __P((object *, unsigned short));
756 void zapp __P((void));
757 object *add_to_pack __P((object *, object *, int));
758 struct id *get_id_table __P((object *));
759 unsigned short gr_what_is __P((void));
760
761 extern boolean ask_quit;
762 extern boolean being_held;
763 extern boolean cant_int;
764 extern boolean con_mon;
765 extern boolean detect_monster;
766 extern boolean did_int;
767 extern boolean interrupted;
768 extern boolean is_wood[];
769 extern boolean jump;
770 extern boolean maintain_armor;
771 extern boolean mon_disappeared;
772 extern boolean msg_cleared;
773 extern boolean no_skull;
774 extern boolean passgo;
775 extern boolean r_see_invisible;
776 extern boolean r_teleport;
777 extern boolean save_is_interactive;
778 extern boolean score_only;
779 extern boolean see_invisible;
780 extern boolean sustain_strength;
781 extern boolean trap_door;
782 extern boolean wizard;
783 extern char hit_message[];
784 extern char hunger_str[];
785 extern char login_name[];
786 extern char *byebye_string;
787 extern char *curse_message;
788 extern char *error_file;
789 extern char *fruit;
790 extern char *m_names[];
791 extern char *more;
792 extern char *new_level_message;
793 extern char *nick_name;
794 extern char *press_space;
795 extern char *save_file;
796 extern char *you_can_move_again;
797 extern long level_points[];
798 extern short add_strength;
799 extern short auto_search;
800 extern short bear_trap;
801 extern short blind;
802 extern short confused;
803 extern short cur_level;
804 extern short cur_room;
805 extern short e_rings;
806 extern short extra_hp;
807 extern short foods;
808 extern short halluc;
809 extern short haste_self;
810 extern short less_hp;
811 extern short levitate;
812 extern short m_moves;
813 extern short max_level;
814 extern short party_room;
815 extern short r_rings;
816 extern short regeneration;
817 extern short ring_exp;
818 extern short stealthy;
819