annotate rogue4/rogue.h @ 279:d3968e9cb98d

Use C stdio functions for score files and save files. Switching from Unix file descriptor operations to C standard FILE* functions will reduce portability problems.
author John "Elwin" Edwards
date Fri, 15 Sep 2017 19:57:54 -0400
parents 2dcf10d45d5b
children e52a8a7ad4c5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
1 /*
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
2 * Rogue definitions and variable declarations
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
3 *
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
4 * @(#)rogue.h 5.2 (Berkeley) 5/10/82
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
5 *
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
6 * Rogue: Exploring the Dungeons of Doom
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
7 * Copyright (C) 1980, 1981, 1982 Michael Toy, Ken Arnold and Glenn Wichman
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
8 * All rights reserved.
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
9 *
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
10 * See the file LICENSE.TXT for full copyright and licensing information.
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
11 */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
12
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
13 typedef struct {
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
14 const char *st_name;
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
15 const int st_value;
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
16 } STONE;
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
17
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
18 extern const char *rainbow[];
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
19 extern const STONE stones[];
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
20 extern const char *sylls[];
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
21 extern const char *wood[];
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
22 extern const char *metal[];
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
23
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
24 #define NCOLORS 27
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
25 #define NSYLLS 159
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
26 #define NSTONES 26
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
27 #define NWOOD 33
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
28 #define NMETAL 22
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
29
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
30 /*
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
31 * Maximum number of different things
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
32 */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
33 #define MAXDAEMONS 20
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
34 #define MAXROOMS 9
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
35 #define MAXTHINGS 9
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
36 #define MAXOBJ 9
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
37 #define MAXPACK 23
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
38 #define MAXTRAPS 10
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
39 #define AMULETLEVEL 26
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
40 #define NUMTHINGS 7 /* number of types of things */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
41 #define MAXPASS 13 /* upper limit on number of passages */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
42
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
43 /*
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
44 * return values for get functions
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
45 */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
46 #define NORM 0 /* normal exit */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
47 #define QUIT 1 /* quit option setting */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
48 #define MINUS 2 /* back up one option */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
49
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
50 /*
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
51 * All the fun defines
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
52 */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
53 #define shint char /* short integer (for very small #s) */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
54 #define when break;case
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
55 #define otherwise break;default
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
56 #define until(expr) while(!(expr))
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
57 #define next(ptr) (*ptr).l_next
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
58 #define prev(ptr) (*ptr).l_prev
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
59 #define winat(y,x) (moat(y,x) != NULL ? moat(y,x)->t_disguise : chat(y,x))
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
60 #define DISTANCE(y1, x1, y2, x2) ((x2 - x1)*(x2 - x1) + (y2 - y1)*(y2 - y1))
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
61 #define ce(a,b) ((a).x == (b).x && (a).y == (b).y)
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
62 #define hero player.t_pos
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
63 #define pstats player.t_stats
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
64 #define pack player.t_pack
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
65 #define proom player.t_room
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
66 #define max_hp player.t_stats.s_maxhp
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
67 #define attach(a,b) _attach(&a,b)
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
68 #define detach(a,b) _detach(&a,b)
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
69 #define free_list(a) _free_list(&a)
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
70 #ifndef max
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
71 #define max(a,b) ((a) > (b) ? (a) : (b))
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
72 #endif
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
73 #define on(thing,flag) (((thing).t_flags & (flag)) != 0)
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
74 #undef CTRL
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
75 #define CTRL(ch) (ch & 037)
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
76 #define GOLDCALC (rnd(50 + 10 * level) + 2)
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
77 #define ISRING(h,r) (cur_ring[h] != NULL && cur_ring[h]->o_which == r)
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
78 #define ISWEARING(r) (ISRING(LEFT, r) || ISRING(RIGHT, r))
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
79 #define ISMULT(type) (type==POTION || type==SCROLL || type==FOOD || type==GOLD)
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
80 #define INDEX(y,x) (((x) << 5) + (y))
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
81 #define chat(y,x) (_level[((x) << 5) + (y)])
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
82 #define flat(y,x) (_flags[((x) << 5) + (y)])
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
83 #define moat(y,x) (_monst[((x) << 5) + (y)])
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
84 #define unc(cp) (cp).y, (cp).x
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
85 #ifdef WIZARD
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
86 #define debug if (wizard) msg
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
87 #endif
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
88
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
89 /*
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
90 * Things that appear on the screens
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
91 */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
92 #define PASSAGE '#'
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
93 #define DOOR '+'
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
94 #define FLOOR '.'
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
95 #define PLAYER '@'
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
96 #define TRAP '^'
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
97 #define STAIRS '%'
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
98 #define GOLD '*'
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
99 #define POTION '!'
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
100 #define SCROLL '?'
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
101 #define MAGIC '$'
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
102 #define FOOD ':'
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
103 #define WEAPON ')'
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
104 #define ARMOR ']'
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
105 #define AMULET ','
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
106 #define RING '='
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
107 #define STICK '/'
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
108 #define CALLABLE -1
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
109
215
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
110 int spread(int nm);
12
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
111 /*
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
112 * Various constants
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
113 */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
114 #define PASSWD "mTuZ7WUV9RWkQ"
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
115 #define BEARTIME spread(3)
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
116 #define SLEEPTIME spread(5)
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
117 #define HEALTIME spread(30)
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
118 #define HOLDTIME spread(2)
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
119 #define WANDERTIME spread(70)
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
120 #define BEFORE spread(1)
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
121 #define AFTER spread(2)
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
122 #define HUHDURATION spread(20)
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
123 #define SEEDURATION spread(850)
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
124 #define HUNGERTIME spread(1300)
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
125 #define MORETIME 150
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
126 #define STOMACHSIZE 2000
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
127 #define STARVETIME 850
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
128 #define ESCAPE 27
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
129 #define LEFT 0
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
130 #define RIGHT 1
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
131 #define BOLT_LENGTH 6
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
132 #define LAMPDIST 3
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
133
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
134 /*
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
135 * Save against things
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
136 */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
137 #define VS_POISON 00
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
138 #define VS_PARALYZATION 00
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
139 #define VS_DEATH 00
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
140 #define VS_BREATH 02
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
141 #define VS_MAGIC 03
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
142
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
143 /*
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
144 * Various flag bits
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
145 */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
146 /* flags for rooms */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
147 #define ISDARK 0000001 /* room is dark */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
148 #define ISGONE 0000002 /* room is gone (a corridor) */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
149
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
150 /* flags for objects */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
151 #define ISCURSED 000001 /* object is cursed */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
152 #define ISKNOW 0000002 /* player knows details about the object */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
153 #define ISMISL 0000004 /* object is a missile type */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
154 #define ISMANY 0000010 /* object comes in groups */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
155
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
156 /* flags for creatures */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
157 #define CANHUH 0000001 /* creature can confuse */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
158 #define CANSEE 0000002 /* creature can see invisible creatures */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
159 #define ISBLIND 0000004 /* creature is blind */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
160 #define ISCANC 0000010 /* creature has special qualities cancelled */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
161 #define ISFOUND 0000020 /* creature has been seen (used for objects) */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
162 #define ISGREED 0000040 /* creature runs to protect gold */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
163 #define ISHASTE 0000100 /* creature has been hastened */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
164 #define ISHELD 0000400 /* creature has been held */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
165 #define ISHUH 0001000 /* creature is confused */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
166 #define ISINVIS 0002000 /* creature is invisible */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
167 #define ISMEAN 0004000 /* creature can wake when player enters room */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
168 #define ISREGEN 0010000 /* creature can regenerate */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
169 #define ISRUN 0020000 /* creature is running at the player */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
170 #define SEEMONST 040000 /* hero can detect unseen monsters */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
171 #define ISSLOW 0100000 /* creature has been slowed */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
172
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
173 /*
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
174 * Flags for level map
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
175 */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
176 #define F_PASS 0x80 /* is a passageway */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
177 #define F_SEEN 0x40 /* have seen this corridor before */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
178 #define F_DROPPED 0x20 /* object was dropped here */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
179 #define F_LOCKED 0x20 /* door is locked */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
180 #define F_REAL 0x10 /* what you see is what you get */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
181 #define F_PNUM 0x0f /* passage number mask */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
182 #define F_TMASK 0x07 /* trap number mask */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
183
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
184 /*
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
185 * Trap types
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
186 */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
187 #define T_DOOR 00
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
188 #define T_ARROW 01
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
189 #define T_SLEEP 02
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
190 #define T_BEAR 03
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
191 #define T_TELEP 04
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
192 #define T_DART 05
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
193 #define NTRAPS 6
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
194
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
195 /*
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
196 * Potion types
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
197 */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
198 #define P_CONFUSE 0
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
199 #define P_PARALYZE 1
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
200 #define P_POISON 2
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
201 #define P_STRENGTH 3
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
202 #define P_SEEINVIS 4
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
203 #define P_HEALING 5
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
204 #define P_MFIND 6
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
205 #define P_TFIND 7
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
206 #define P_RAISE 8
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
207 #define P_XHEAL 9
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
208 #define P_HASTE 10
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
209 #define P_RESTORE 11
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
210 #define P_BLIND 12
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
211 #define P_NOP 13
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
212 #define MAXPOTIONS 14
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
213
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
214 /*
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
215 * Scroll types
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
216 */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
217 #define S_CONFUSE 0
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
218 #define S_MAP 1
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
219 #define S_HOLD 2
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
220 #define S_SLEEP 3
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
221 #define S_ARMOR 4
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
222 #define S_IDENT 5
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
223 #define S_SCARE 6
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
224 #define S_GFIND 7
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
225 #define S_TELEP 8
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
226 #define S_ENCH 9
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
227 #define S_CREATE 10
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
228 #define S_REMOVE 11
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
229 #define S_AGGR 12
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
230 #define S_NOP 13
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
231 #define S_GENOCIDE 14
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
232 #define MAXSCROLLS 15
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
233
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
234 /*
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
235 * Weapon types
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
236 */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
237 #define MACE 0
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
238 #define SWORD 1
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
239 #define BOW 2
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
240 #define ARROW 3
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
241 #define DAGGER 4
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
242 #define TWOSWORD 5
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
243 #define DART 6
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
244 #define CROSSBOW 7
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
245 #define BOLT 8
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
246 #define SPEAR 9
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
247 #define FLAME 10 /* fake entry for dragon breath (ick) */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
248 #define MAXWEAPONS 10 /* this should equal FLAME */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
249
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
250 /*
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
251 * Armor types
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
252 */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
253 #define LEATHER 0
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
254 #define RING_MAIL 1
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
255 #define STUDDED_LEATHER 2
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
256 #define SCALE_MAIL 3
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
257 #define CHAIN_MAIL 4
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
258 #define SPLINT_MAIL 5
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
259 #define BANDED_MAIL 6
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
260 #define PLATE_MAIL 7
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
261 #define MAXARMORS 8
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
262
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
263 /*
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
264 * Ring types
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
265 */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
266 #define R_PROTECT 0
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
267 #define R_ADDSTR 1
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
268 #define R_SUSTSTR 2
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
269 #define R_SEARCH 3
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
270 #define R_SEEINVIS 4
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
271 #define R_NOP 5
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
272 #define R_AGGR 6
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
273 #define R_ADDHIT 7
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
274 #define R_ADDDAM 8
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
275 #define R_REGEN 9
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
276 #define R_DIGEST 10
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
277 #define R_TELEPORT 11
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
278 #define R_STEALTH 12
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
279 #define R_SUSTARM 13
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
280 #define MAXRINGS 14
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
281
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
282 /*
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
283 * Rod/Wand/Staff types
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
284 */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
285
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
286 #define WS_LIGHT 0
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
287 #define WS_HIT 1
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
288 #define WS_ELECT 2
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
289 #define WS_FIRE 3
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
290 #define WS_COLD 4
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
291 #define WS_POLYMORPH 5
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
292 #define WS_MISSILE 6
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
293 #define WS_HASTE_M 7
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
294 #define WS_SLOW_M 8
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
295 #define WS_DRAIN 9
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
296 #define WS_NOP 10
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
297 #define WS_TELAWAY 11
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
298 #define WS_TELTO 12
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
299 #define WS_CANCEL 13
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
300 #define MAXSTICKS 14
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
301
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
302 /*
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
303 * Now we define the structures and types
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
304 */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
305
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
306 /*
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
307 * Help list
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
308 */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
309
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
310 struct h_list {
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
311 char h_ch;
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
312 char *h_desc;
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
313 };
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
314
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
315 /*
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
316 * Coordinate data type
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
317 */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
318 typedef struct {
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
319 shint x;
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
320 shint y;
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
321 } coord;
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
322
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
323 /* daemon/fuse data type */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
324
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
325 struct delayed_action {
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
326 int d_type;
228
b67b99f6c92b Daemons and fuses now return void.
John "Elwin" Edwards
parents: 227
diff changeset
327 void (*d_func)();
12
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
328 int d_arg;
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
329 int d_time;
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
330 };
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
331
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
332 /**/
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
333
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
334 typedef unsigned int str_t;
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
335
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
336 /*
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
337 * Stuff about magic items
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
338 */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
339
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
340 struct magic_item {
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
341 const char *mi_name;
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
342 shint mi_prob;
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
343 short mi_worth;
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
344 };
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
345
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
346 /*
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
347 * Room structure
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
348 */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
349 struct room {
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
350 coord r_pos; /* Upper left corner */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
351 coord r_max; /* Size of room */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
352 coord r_gold; /* Where the gold is */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
353 int r_goldval; /* How much the gold is worth */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
354 short r_flags; /* Info about the room */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
355 shint r_nexits; /* Number of exits */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
356 coord r_exit[12]; /* Where the exits are */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
357 };
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
358
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
359 /*
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
360 * Structure describing a fighting being
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
361 */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
362 struct stats {
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
363 str_t s_str; /* Strength */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
364 long s_exp; /* Experience */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
365 shint s_lvl; /* Level of mastery */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
366 shint s_arm; /* Armor class */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
367 short s_hpt; /* Hit points */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
368 char s_dmg[16]; /* String describing damage done */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
369 shint s_maxhp; /* Max hit points */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
370 };
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
371
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
372 /*
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
373 * Structure for monsters and player
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
374 */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
375 union thing {
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
376 struct {
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
377 union thing *_l_next, *_l_prev; /* Next pointer in link */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
378 coord _t_pos; /* Position */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
379 bool _t_turn; /* If slowed, is it a turn to move */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
380 unsigned char _t_type; /* What it is */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
381 char _t_disguise; /* What mimic looks like */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
382 char _t_oldch; /* Character that was where it was */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
383 coord *_t_dest; /* Where it is running to */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
384 short _t_flags; /* State word */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
385 struct stats _t_stats; /* Physical description */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
386 struct room *_t_room; /* Current room for thing */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
387 union thing *_t_pack; /* What the thing is carrying */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
388 int _t_reserved;
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
389 } _t;
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
390 struct {
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
391 union thing *_l_next, *_l_prev; /* Next pointer in link */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
392 shint _o_type; /* What kind of object it is */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
393 coord _o_pos; /* Where it lives on the screen */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
394 char *_o_text; /* What it says if you read it */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
395 char _o_launch; /* What you need to launch it */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
396 char _o_damage[8]; /* Damage if used like sword */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
397 char _o_hurldmg[8]; /* Damage if thrown */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
398 shint _o_count; /* Count for plural objects */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
399 shint _o_which; /* Which object of a type it is */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
400 shint _o_hplus; /* Plusses to hit */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
401 shint _o_dplus; /* Plusses to damage */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
402 short _o_ac; /* Armor class */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
403 short _o_flags; /* Information about objects */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
404 shint _o_group; /* Group number for this object */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
405 } _o;
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
406 };
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
407
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
408 typedef union thing THING;
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
409
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
410 #define l_next _t._l_next
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
411 #define l_prev _t._l_prev
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
412 #define t_pos _t._t_pos
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
413 #define t_turn _t._t_turn
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
414 #define t_type _t._t_type
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
415 #define t_disguise _t._t_disguise
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
416 #define t_oldch _t._t_oldch
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
417 #define t_dest _t._t_dest
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
418 #define t_flags _t._t_flags
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
419 #define t_stats _t._t_stats
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
420 #define t_pack _t._t_pack
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
421 #define t_room _t._t_room
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
422 #define t_reserved _t._t_reserved
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
423 #define o_type _o._o_type
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
424 #define o_pos _o._o_pos
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
425 #define o_text _o._o_text
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
426 #define o_launch _o._o_launch
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
427 #define o_damage _o._o_damage
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
428 #define o_hurldmg _o._o_hurldmg
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
429 #define o_count _o._o_count
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
430 #define o_which _o._o_which
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
431 #define o_hplus _o._o_hplus
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
432 #define o_dplus _o._o_dplus
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
433 #define o_ac _o._o_ac
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
434 #define o_charges o_ac
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
435 #define o_goldval o_ac
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
436 #define o_flags _o._o_flags
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
437 #define o_group _o._o_group
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
438 #define o_reserved _o._o_reserved
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
439
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
440 /*
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
441 * Array containing information on all the various types of mosnters
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
442 */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
443 struct monster {
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
444 const char *m_name; /* What to call the monster */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
445 const shint m_carry; /* Probability of carrying something */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
446 const short m_flags; /* Things about the monster */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
447 struct stats m_stats; /* Initial stats */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
448 };
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
449
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
450 /*
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
451 * External variables
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
452 */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
453
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
454 extern struct delayed_action d_list[20];
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
455
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
456 extern THING *_monst[], *cur_armor, *cur_ring[], *cur_weapon,
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
457 *lvl_obj, *mlist, player;
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
458
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
459 extern coord delta, oldpos;
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
460
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
461 extern struct h_list helpstr[];
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
462
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
463 extern struct room *oldrp, passages[], rooms[];
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
464
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
465 extern struct stats max_stats;
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
466
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
467 extern struct monster monsters[];
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
468
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
469 extern struct magic_item p_magic[], r_magic[], s_magic[],
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
470 things[], ws_magic[];
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
471
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
472 /*
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
473 * Function types
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
474 */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
475
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
476 coord *find_dest(), *rndmove();
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
477
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
478 THING *find_mons(), *find_obj(), *get_item(), *new_item(),
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
479 *new_thing(), *wake_monster();
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
480
215
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
481 struct room *roomin(coord *cp);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
482
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
483 void _attach(THING **list, THING *item);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
484 void _detach(THING **list, THING *item);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
485 void _free_list(THING **ptr);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
486 bool add_haste(bool potion);
235
2dcf10d45d5b Rogue V4: add two more function declarations.
John "Elwin" Edwards
parents: 233
diff changeset
487 void add_line(char *fmt, char *arg);
215
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
488 void add_pack(THING *obj, bool silent);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
489 void add_str(str_t *sp, int amt);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
490 void addmsg(char *fmt, ...);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
491 void aggravate(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
492 int attack(THING *mp);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
493 void auto_save(int sig);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
494 void call_it(bool know, char **guess);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
495 bool cansee(int y, int x);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
496 char *charge_str(THING *obj);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
497 void check_level(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
498 void chg_str(int amt);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
499 void command(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
500 void death(char monst);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
501 bool diag_ok(coord *sp, coord *ep);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
502 void discard(THING *item);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
503 void discovered(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
504 void do_daemons(int flag);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
505 void do_fuses(int flag);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
506 void do_motion(THING *obj, int ydelta, int xdelta);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
507 void do_move(int dy, int dx);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
508 void do_passages(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
509 void do_rooms(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
510 void do_run(char ch);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
511 void do_zap(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
512 void doctor(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
513 void door_open(struct room *rp);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
514 void drop(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
515 bool dropcheck(THING *op);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
516 void eat(void);
279
d3968e9cb98d Use C stdio functions for score files and save files.
John "Elwin" Edwards
parents: 235
diff changeset
517 int encread(void *starta, int size, FILE *inf);
215
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
518 void encwrite(void *starta, int size, FILE *outf);
235
2dcf10d45d5b Rogue V4: add two more function declarations.
John "Elwin" Edwards
parents: 233
diff changeset
519 void end_line(void);
215
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
520 void endmsg(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
521 void enter_room(coord *cp);
228
b67b99f6c92b Daemons and fuses now return void.
John "Elwin" Edwards
parents: 227
diff changeset
522 void extinguish(void (*func)());
215
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
523 void fall(THING *obj, bool pr);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
524 bool fallpos(coord *pos, coord *newpos, bool pass);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
525 void fatal(char *s);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
526 bool fight(coord *mp, char mn, THING *weap, bool thrown);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
527 THING *find_obj(int y, int x);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
528 void fire_bolt(coord *start, coord *dir, char *name);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
529 void fix_stick(THING *cur);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
530 void flush_type(void);
228
b67b99f6c92b Daemons and fuses now return void.
John "Elwin" Edwards
parents: 227
diff changeset
531 void fuse(void (*func)(), int arg, int time, int type);
215
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
532 void genocide(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
533 bool get_dir(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
534 THING *get_item(char *purpose, int type);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
535 int get_str(char *opt, WINDOW *win);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
536 void give_pack(THING *tp);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
537 bool hit_monster(int y, int x, THING *obj);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
538 void init_check(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
539 void init_colors(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
540 void init_materials(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
541 void init_names(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
542 void init_player(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
543 void init_stones(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
544 void init_things(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
545 void init_weapon(THING *weap, char type);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
546 char *inv_name(THING *obj, bool drop);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
547 bool inventory(THING *list, int type);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
548 void invis_on(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
549 bool is_current(THING *obj);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
550 bool is_magic(THING *obj);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
551 bool issymlink(char *sp);
228
b67b99f6c92b Daemons and fuses now return void.
John "Elwin" Edwards
parents: 227
diff changeset
552 void kill_daemon(void (*func)());
215
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
553 void killed(THING *tp, bool pr);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
554 void leave(int sig);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
555 void leave_room(coord *cp);
228
b67b99f6c92b Daemons and fuses now return void.
John "Elwin" Edwards
parents: 227
diff changeset
556 void lengthen(void (*func)(), int xtime);
215
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
557 bool lock_sc(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
558 void look(bool wakeup);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
559 void missile(int ydelta, int xdelta);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
560 void msg(char *fmt, ...);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
561 THING *new_item(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
562 void new_level(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
563 void new_monster(THING *tp, char type, coord *cp);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
564 THING *new_thing(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
565 void nohaste(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
566 char *num(int n1, int n2, char type);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
567 void open_log(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
568 void open_score(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
569 void option(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
570 char pack_char(THING *obj);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
571 void parse_opts(char *str);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
572 void pick_up(char ch);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
573 void picky_inven(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
574 void playit(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
575 void quaff(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
576 void quit(int a);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
577 void raise_level(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
578 char randmonster(bool wander);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
579 void read_scroll(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
580 int readchar(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
581 int readcharw(WINDOW *win);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
582 void remove_monster(coord *mp, THING *tp, bool waskill);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
583 bool restore(char *file, char **envp);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
584 int ring_eat(int hand);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
585 char *ring_num(THING *obj);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
586 void ring_off(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
587 void ring_on(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
588 int rnd(int range);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
589 void rnd_pos(struct room *rp, coord *cp);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
590 int rnd_room(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
591 coord *rndmove(THING *who);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
592 int roll(int number, int sides);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
593 void rollwand(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
594 void runners(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
595 void runto(coord *runner, coord *spot);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
596 bool save(int which);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
597 bool save_game(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
598 bool save_throw(int which, THING *tp);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
599 void score(int amount, int flags, char monst);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
600 bool see_monst(THING *mp);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
601 void setup(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
602 void shell(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
603 void show_win(WINDOW *scr, char *message);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
604 void sight(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
605 int sign(int nm);
228
b67b99f6c92b Daemons and fuses now return void.
John "Elwin" Edwards
parents: 227
diff changeset
606 void start_daemon(void (*func)(), int arg, int type);
215
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
607 void start_score(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
608 void status(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
609 bool step_ok(char ch);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
610 void stomach(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
611 void strucpy(char *s1, char *s2, int len);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
612 void swander(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
613 bool swing(int at_lvl, int op_arm, int wplus);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
614 void take_off(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
615 int teleport(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
616 void total_winner(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
617 char *tr_name(char type);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
618 bool turn_see(bool turn_off);
227
696277507a2e Rogue V4, V5: disable a cheat granting permanent monster detection.
John "Elwin" Edwards
parents: 215
diff changeset
619 void turn_see_off(void);
215
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
620 void unconfuse(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
621 char *unctrol(char ch);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
622 void unlock_sc(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
623 void unsee(void);
233
0990adf580ee Declare some function arguments as const.
John "Elwin" Edwards
parents: 228
diff changeset
624 char *vowelstr(const char *str);
215
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
625 char *xcrypt(const char *key, const char *setting);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
626 void w_wait_for(WINDOW *win, char ch);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
627 void wait_for(char ch);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
628 THING *wake_monster(int y, int x);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
629 void wanderer(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
630 void waste_time(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
631 void wear(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
632 void whatis(bool insist);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
633 void wield(void);
1b73a8641b37 rogue4: fix most GCC5 warnings.
John "Elwin" Edwards
parents: 109
diff changeset
634 void writelog(int amount, int flags, char monst);
12
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
635
109
ec9db3bb6b0b rogue4: don't include config.h if it wasn't created.
John "Elwin" Edwards
parents: 51
diff changeset
636 #ifdef HAVE_CONFIG_H
51
a1dc75e38e73 rogue4: ported to autoconf.
elwin
parents: 12
diff changeset
637 #include "config.h"
109
ec9db3bb6b0b rogue4: don't include config.h if it wasn't created.
John "Elwin" Edwards
parents: 51
diff changeset
638 #endif
12
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
639 #include "extern.h"
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
640
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
641 #ifndef PATH_MAX
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
642 #define PATH_MAX _MAX_PATH
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
643 #endif