comparison rogue4/daemons.c @ 215:1b73a8641b37

rogue4: fix most GCC5 warnings. Converting all function definitions to ANSI style accounts for most of the change. This has exposed other problems, such as daemons not actually being their stated type, that will require more careful solutions.
author John "Elwin" Edwards
date Wed, 27 Jan 2016 19:41:05 -0500
parents f2951c4e28d9
children
comparison
equal deleted inserted replaced
214:e5a15b09ce1d 215:1b73a8641b37
17 17
18 /* 18 /*
19 * doctor: 19 * doctor:
20 * A healing daemon that restors hit points after rest 20 * A healing daemon that restors hit points after rest
21 */ 21 */
22 doctor() 22 void
23 doctor(void)
23 { 24 {
24 register int lv, ohp; 25 register int lv, ohp;
25 26
26 lv = pstats.s_lvl; 27 lv = pstats.s_lvl;
27 ohp = pstats.s_hpt; 28 ohp = pstats.s_hpt;
48 49
49 /* 50 /*
50 * Swander: 51 * Swander:
51 * Called when it is time to start rolling for wandering monsters 52 * Called when it is time to start rolling for wandering monsters
52 */ 53 */
53 swander() 54 void
55 swander(void)
54 { 56 {
55 start_daemon(rollwand, 0, BEFORE); 57 start_daemon(rollwand, 0, BEFORE);
56 } 58 }
57 59
58 /* 60 /*
59 * rollwand: 61 * rollwand:
60 * Called to roll to see if a wandering monster starts up 62 * Called to roll to see if a wandering monster starts up
61 */ 63 */
62 rollwand() 64 void
65 rollwand(void)
63 { 66 {
64 if (++between >= 4) 67 if (++between >= 4)
65 { 68 {
66 if (roll(1, 6) == 4) 69 if (roll(1, 6) == 4)
67 { 70 {
75 78
76 /* 79 /*
77 * unconfuse: 80 * unconfuse:
78 * Release the poor player from his confusion 81 * Release the poor player from his confusion
79 */ 82 */
80 unconfuse() 83 void
84 unconfuse(void)
81 { 85 {
82 player.t_flags &= ~ISHUH; 86 player.t_flags &= ~ISHUH;
83 msg("you feel less confused now"); 87 msg("you feel less confused now");
84 } 88 }
85 89
86 /* 90 /*
87 * unsee: 91 * unsee:
88 * Turn off the ability to see invisible 92 * Turn off the ability to see invisible
89 */ 93 */
90 unsee() 94 void
95 unsee(void)
91 { 96 {
92 register THING *th; 97 register THING *th;
93 98
94 for (th = mlist; th != NULL; th = next(th)) 99 for (th = mlist; th != NULL; th = next(th))
95 if (on(*th, ISINVIS) && see_monst(th)) 100 if (on(*th, ISINVIS) && see_monst(th))
102 107
103 /* 108 /*
104 * sight: 109 * sight:
105 * He gets his sight back 110 * He gets his sight back
106 */ 111 */
107 sight() 112 void
113 sight(void)
108 { 114 {
109 if (on(player, ISBLIND)) 115 if (on(player, ISBLIND))
110 { 116 {
111 extinguish(sight); 117 extinguish(sight);
112 player.t_flags &= ~ISBLIND; 118 player.t_flags &= ~ISBLIND;
118 124
119 /* 125 /*
120 * nohaste: 126 * nohaste:
121 * End the hasting 127 * End the hasting
122 */ 128 */
123 nohaste() 129 void
130 nohaste(void)
124 { 131 {
125 player.t_flags &= ~ISHASTE; 132 player.t_flags &= ~ISHASTE;
126 msg("you feel yourself slowing down"); 133 msg("you feel yourself slowing down");
127 } 134 }
128 135
129 /* 136 /*
130 * stomach: 137 * stomach:
131 * Digest the hero's food 138 * Digest the hero's food
132 */ 139 */
133 stomach() 140 void
141 stomach(void)
134 { 142 {
135 register int oldfood; 143 register int oldfood;
136 144
137 if (food_left <= 0) 145 if (food_left <= 0)
138 { 146 {