Mercurial > hg > early-roguelike
comparison xrogue/daemons.c @ 228:b67b99f6c92b
Daemons and fuses now return void.
Functions for starting and stopping daemons and fuses now expect the
type 'void (*func)()'. Only a few functions in XRogue needed to be
modified to fit. Determining the type of the argument is left for a
later date.
Building with GCC5 should now produce less than 200 lines of warnings
per game.
author | John "Elwin" Edwards |
---|---|
date | Sat, 05 Mar 2016 20:49:37 -0500 |
parents | f54901b9c39b |
children | 7c1cb43f346e |
comparison
equal
deleted
inserted
replaced
227:696277507a2e | 228:b67b99f6c92b |
---|---|
220 /* | 220 /* |
221 * land: | 221 * land: |
222 * Player can no longer fly | 222 * Player can no longer fly |
223 */ | 223 */ |
224 | 224 |
225 int | 225 void |
226 land(void) | 226 land(void) |
227 { | 227 { |
228 turn_off(player, ISFLY); | 228 turn_off(player, ISFLY); |
229 msg("You regain your normal weight"); | 229 msg("You regain your normal weight"); |
230 running = FALSE; | 230 running = FALSE; |
231 return(0); | |
232 } | 231 } |
233 | 232 |
234 /* | 233 /* |
235 * sight: | 234 * sight: |
236 * He gets his sight back | 235 * He gets his sight back |
251 /* | 250 /* |
252 * res_strength: | 251 * res_strength: |
253 * Restore player's strength | 252 * Restore player's strength |
254 */ | 253 */ |
255 | 254 |
256 int | 255 void |
257 res_strength(long howmuch) | 256 res_strength(long howmuch) |
258 { | 257 { |
259 | 258 |
260 /* If lost_str is non-zero, restore that amount of strength, | 259 /* If lost_str is non-zero, restore that amount of strength, |
261 * else all of it | 260 * else all of it |
269 if (howmuch > 0) | 268 if (howmuch > 0) |
270 pstats.s_str = | 269 pstats.s_str = |
271 min(pstats.s_str + howmuch, max_stats.s_str + ring_value(R_ADDSTR)); | 270 min(pstats.s_str + howmuch, max_stats.s_str + ring_value(R_ADDSTR)); |
272 | 271 |
273 updpack(TRUE, &player); | 272 updpack(TRUE, &player); |
274 return(0); | |
275 } | 273 } |
276 | 274 |
277 /* | 275 /* |
278 * nohaste: | 276 * nohaste: |
279 * End the hasting | 277 * End the hasting |
505 | 503 |
506 /* | 504 /* |
507 * otto's irresistable dance wears off | 505 * otto's irresistable dance wears off |
508 */ | 506 */ |
509 | 507 |
510 int | 508 void |
511 undance(void) | 509 undance(void) |
512 { | 510 { |
513 turn_off(player, ISDANCE); | 511 turn_off(player, ISDANCE); |
514 msg ("Your feet take a break.....whew!"); | 512 msg ("Your feet take a break.....whew!"); |
515 return(0); | |
516 } | 513 } |
517 | 514 |
518 /* | 515 /* |
519 * if he has our favorite necklace of strangulation then take damage every turn | 516 * if he has our favorite necklace of strangulation then take damage every turn |
520 */ | 517 */ |
635 | 632 |
636 /* | 633 /* |
637 * charge up the cloak of Emori | 634 * charge up the cloak of Emori |
638 */ | 635 */ |
639 | 636 |
640 int | 637 void |
641 cloak_charge(struct object *obj) | 638 cloak_charge(struct object *obj) |
642 { | 639 { |
643 if (obj->o_charges < 1) | 640 if (obj->o_charges < 1) |
644 obj->o_charges = 1; | 641 obj->o_charges = 1; |
645 return(0); | |
646 } | 642 } |
647 | 643 |
648 /* | 644 /* |
649 * nofire: | 645 * nofire: |
650 * He lost his fire resistance | 646 * He lost his fire resistance |