Mercurial > hg > early-roguelike
comparison arogue5/player.c @ 218:56e748983fa8
Advanced Rogue 5: convert to ANSI function declarations.
This still leaves over a thousand lines of warning messages, mostly
related to the return types of daemons and fuses.
author | John "Elwin" Edwards |
---|---|
date | Sun, 07 Feb 2016 14:39:21 -0500 |
parents | beab22b087a1 |
children | e52a8a7ad4c5 |
comparison
equal
deleted
inserted
replaced
217:94a0d9dd5ce1 | 218:56e748983fa8 |
---|---|
15 /* | 15 /* |
16 * affect: | 16 * affect: |
17 * cleric affecting undead | 17 * cleric affecting undead |
18 */ | 18 */ |
19 | 19 |
20 affect() | 20 void |
21 affect(void) | |
21 { | 22 { |
22 register struct linked_list *item; | 23 register struct linked_list *item; |
23 register struct thing *tp; | 24 register struct thing *tp; |
24 register const char *mname; | 25 register const char *mname; |
25 bool see; | 26 bool see; |
119 } | 120 } |
120 | 121 |
121 /* | 122 /* |
122 * the magic user is going to try and cast a spell | 123 * the magic user is going to try and cast a spell |
123 */ | 124 */ |
124 cast() | 125 void |
126 cast(void) | |
125 { | 127 { |
126 register int i, num_spells, spell_ability; | 128 register int i, num_spells, spell_ability; |
127 int which_spell; | 129 int which_spell; |
128 bool nohw = FALSE; | 130 bool nohw = FALSE; |
129 | 131 |
269 spell_power += magic_spells[which_spell].s_cost; | 271 spell_power += magic_spells[which_spell].s_cost; |
270 } | 272 } |
271 | 273 |
272 /* Constitution bonus */ | 274 /* Constitution bonus */ |
273 | 275 |
274 const_bonus() /* Hit point adjustment for changing levels */ | 276 int |
277 const_bonus(void) /* Hit point adjustment for changing levels */ | |
275 { | 278 { |
276 if (pstats.s_const > 6 && pstats.s_const <= 14) | 279 if (pstats.s_const > 6 && pstats.s_const <= 14) |
277 return(0); | 280 return(0); |
278 if (pstats.s_const > 14) | 281 if (pstats.s_const > 14) |
279 return(pstats.s_const-14); | 282 return(pstats.s_const-14); |
288 /* | 291 /* |
289 * gsense: | 292 * gsense: |
290 * Sense gold | 293 * Sense gold |
291 */ | 294 */ |
292 | 295 |
293 gsense() | 296 void |
297 gsense(void) | |
294 { | 298 { |
295 /* Only thieves can do this */ | 299 /* Only thieves can do this */ |
296 if (player.t_ctype != C_THIEF) { | 300 if (player.t_ctype != C_THIEF) { |
297 msg("You seem to have no gold sense."); | 301 msg("You seem to have no gold sense."); |
298 return; | 302 return; |
322 } | 326 } |
323 | 327 |
324 /* | 328 /* |
325 * the cleric asks his deity for a spell | 329 * the cleric asks his deity for a spell |
326 */ | 330 */ |
327 pray() | 331 void |
332 pray(void) | |
328 { | 333 { |
329 register int i, num_prayers, prayer_ability; | 334 register int i, num_prayers, prayer_ability; |
330 int which_prayer; | 335 int which_prayer; |
331 bool nohw = FALSE; | 336 bool nohw = FALSE; |
332 | 337 |
486 /* | 491 /* |
487 * steal: | 492 * steal: |
488 * Steal in direction given in delta | 493 * Steal in direction given in delta |
489 */ | 494 */ |
490 | 495 |
491 steal() | 496 void |
497 steal(void) | |
492 { | 498 { |
493 register struct linked_list *item; | 499 register struct linked_list *item; |
494 register struct thing *tp; | 500 register struct thing *tp; |
495 register const char *mname; | 501 register const char *mname; |
496 coord new_pos; | 502 coord new_pos; |