comparison srogue/daemons.c @ 217:94a0d9dd5ce1

Super-Rogue: convert to ANSI-style function declarations. This fixes most of the build warnings.
author John "Elwin" Edwards
date Sun, 31 Jan 2016 13:45:07 -0500
parents f2951c4e28d9
children
comparison
equal deleted inserted replaced
216:b24545357d2e 217:94a0d9dd5ce1
21 21
22 /* 22 /*
23 * doctor: 23 * doctor:
24 * A healing daemon that restores hit points after rest 24 * A healing daemon that restores hit points after rest
25 */ 25 */
26 doctor(fromfuse) 26 void
27 int fromfuse; 27 doctor(int fromfuse)
28 { 28 {
29 reg int *thp, lv, ohp, ccon; 29 reg int *thp, lv, ohp, ccon;
30 30
31 lv = him->s_lvl; 31 lv = him->s_lvl;
32 thp = &him->s_hpt; 32 thp = &him->s_hpt;
61 61
62 /* 62 /*
63 * Swander: 63 * Swander:
64 * Called when it is time to start rolling for wandering monsters 64 * Called when it is time to start rolling for wandering monsters
65 */ 65 */
66 swander(fromfuse) 66 void
67 int fromfuse; 67 swander(int fromfuse)
68 { 68 {
69 start_daemon(rollwand, TRUE, AFTER); 69 start_daemon(rollwand, TRUE, AFTER);
70 } 70 }
71 71
72 72
73 /* 73 /*
74 * rollwand: 74 * rollwand:
75 * Called to roll to see if a wandering monster starts up 75 * Called to roll to see if a wandering monster starts up
76 */ 76 */
77 rollwand(fromfuse) 77 void
78 int fromfuse; 78 rollwand(int fromfuse)
79 { 79 {
80 80
81 if (++between >= 4) { 81 if (++between >= 4) {
82 if (roll(1, 6) == 4) { 82 if (roll(1, 6) == 4) {
83 if (levtype != POSTLEV) /* no monsters for posts */ 83 if (levtype != POSTLEV) /* no monsters for posts */
92 92
93 /* 93 /*
94 * unconfuse: 94 * unconfuse:
95 * Release the poor player from his confusion 95 * Release the poor player from his confusion
96 */ 96 */
97 unconfuse(fromfuse) 97 void
98 int fromfuse; 98 unconfuse(int fromfuse)
99 { 99 {
100 if (pl_on(ISHUH)) 100 if (pl_on(ISHUH))
101 msg("You feel less confused now."); 101 msg("You feel less confused now.");
102 player.t_flags &= ~ISHUH; 102 player.t_flags &= ~ISHUH;
103 } 103 }
104 104
105 /* 105 /*
106 * unsee: 106 * unsee:
107 * He lost his see invisible power 107 * He lost his see invisible power
108 */ 108 */
109 unsee(fromfuse) 109 void
110 int fromfuse; 110 unsee(int fromfuse)
111 { 111 {
112 player.t_flags &= ~CANSEE; 112 player.t_flags &= ~CANSEE;
113 } 113 }
114 114
115 /* 115 /*
116 * sight: 116 * sight:
117 * He gets his sight back 117 * He gets his sight back
118 */ 118 */
119 sight(fromfuse) 119 void
120 int fromfuse; 120 sight(int fromfuse)
121 { 121 {
122 if (pl_on(ISBLIND)) 122 if (pl_on(ISBLIND))
123 msg("The veil of darkness lifts."); 123 msg("The veil of darkness lifts.");
124 player.t_flags &= ~ISBLIND; 124 player.t_flags &= ~ISBLIND;
125 light(&hero); 125 light(&hero);
127 127
128 /* 128 /*
129 * nohaste: 129 * nohaste:
130 * End the hasting 130 * End the hasting
131 */ 131 */
132 nohaste(fromfuse) 132 void
133 int fromfuse; 133 nohaste(int fromfuse)
134 { 134 {
135 if (pl_on(ISHASTE)) 135 if (pl_on(ISHASTE))
136 msg("You feel yourself slowing down."); 136 msg("You feel yourself slowing down.");
137 player.t_flags &= ~ISHASTE; 137 player.t_flags &= ~ISHASTE;
138 } 138 }
140 140
141 /* 141 /*
142 * stomach: 142 * stomach:
143 * Digest the hero's food 143 * Digest the hero's food
144 */ 144 */
145 stomach(fromfuse) 145 void
146 int fromfuse; 146 stomach(int fromfuse)
147 { 147 {
148 reg int oldfood, old_hunger; 148 reg int oldfood, old_hunger;
149 149
150 old_hunger = hungry_state; 150 old_hunger = hungry_state;
151 if (food_left <= 0) { /* the hero is fainting */ 151 if (food_left <= 0) { /* the hero is fainting */
186 186
187 /* 187 /*
188 * noteth: 188 * noteth:
189 * Hero is no longer etherereal 189 * Hero is no longer etherereal
190 */ 190 */
191 noteth(fromfuse) 191 void
192 int fromfuse; 192 noteth(int fromfuse)
193 { 193 {
194 int ch; 194 int ch;
195 195
196 if (pl_on(ISETHER)) { 196 if (pl_on(ISETHER)) {
197 msg("You begin to feel more corporeal."); 197 msg("You begin to feel more corporeal.");
207 207
208 /* 208 /*
209 * sapem: 209 * sapem:
210 * Sap the hero's life away 210 * Sap the hero's life away
211 */ 211 */
212 sapem(fromfuse) 212 void
213 int fromfuse; 213 sapem(int fromfuse)
214 { 214 {
215 chg_abil(rnd(4) + 1, -1, TRUE); 215 chg_abil(rnd(4) + 1, -1, TRUE);
216 fuse(sapem, TRUE, 150); 216 fuse(sapem, TRUE, 150);
217 nochange = FALSE; 217 nochange = FALSE;
218 } 218 }
219 219
220 /* 220 /*
221 * notslow: 221 * notslow:
222 * Restore the hero's normal speed 222 * Restore the hero's normal speed
223 */ 223 */
224 notslow(fromfuse) 224 void
225 int fromfuse; 225 notslow(int fromfuse)
226 { 226 {
227 if (pl_on(ISSLOW)) 227 if (pl_on(ISSLOW))
228 msg("You no longer feel hindered."); 228 msg("You no longer feel hindered.");
229 player.t_flags &= ~ISSLOW; 229 player.t_flags &= ~ISSLOW;
230 } 230 }
231 231
232 /* 232 /*
233 * notregen: 233 * notregen:
234 * Hero is no longer regenerative 234 * Hero is no longer regenerative
235 */ 235 */
236 notregen(fromfuse) 236 void
237 int fromfuse; 237 notregen(int fromfuse)
238 { 238 {
239 if (pl_on(ISREGEN)) 239 if (pl_on(ISREGEN))
240 msg("You no longer feel bolstered."); 240 msg("You no longer feel bolstered.");
241 player.t_flags &= ~ISREGEN; 241 player.t_flags &= ~ISREGEN;
242 } 242 }
243 243
244 /* 244 /*
245 * notinvinc: 245 * notinvinc:
246 * Hero not invincible any more 246 * Hero not invincible any more
247 */ 247 */
248 notinvinc(fromfuse) 248 void
249 int fromfuse; 249 notinvinc(int fromfuse)
250 { 250 {
251 if (pl_on(ISINVINC)) 251 if (pl_on(ISINVINC))
252 msg("You no longer feel invincible."); 252 msg("You no longer feel invincible.");
253 player.t_flags &= ~ISINVINC; 253 player.t_flags &= ~ISINVINC;
254 } 254 }