Mercurial > hg > early-roguelike
comparison arogue5/rings.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 | f2951c4e28d9 |
children |
comparison
equal
deleted
inserted
replaced
217:94a0d9dd5ce1 | 218:56e748983fa8 |
---|---|
18 #include <string.h> | 18 #include <string.h> |
19 | 19 |
20 /* | 20 /* |
21 * how much food does this ring use up? | 21 * how much food does this ring use up? |
22 */ | 22 */ |
23 ring_eat(hand) | 23 int |
24 register int hand; | 24 ring_eat(int hand) |
25 { | 25 { |
26 if (cur_ring[hand] == NULL) | 26 if (cur_ring[hand] == NULL) |
27 return 0; | 27 return 0; |
28 switch (cur_ring[hand]->o_which) { | 28 switch (cur_ring[hand]->o_which) { |
29 case R_VAMPREGEN: | 29 case R_VAMPREGEN: |
43 return (-(cur_ring[hand]->o_ac)); | 43 return (-(cur_ring[hand]->o_ac)); |
44 } | 44 } |
45 return 0; | 45 return 0; |
46 } | 46 } |
47 | 47 |
48 ring_on(obj) | 48 void |
49 register struct object *obj; | 49 ring_on(struct object *obj) |
50 { | 50 { |
51 register int save_max; | 51 register int save_max; |
52 char buf[LINELEN]; | 52 char buf[LINELEN]; |
53 | 53 |
54 /* | 54 /* |
110 | 110 |
111 /* | 111 /* |
112 * print ring bonuses | 112 * print ring bonuses |
113 */ | 113 */ |
114 char * | 114 char * |
115 ring_num(obj) | 115 ring_num(struct object *obj) |
116 register struct object *obj; | |
117 { | 116 { |
118 static char buf[5]; | 117 static char buf[5]; |
119 | 118 |
120 if (!(obj->o_flags & ISKNOW)) | 119 if (!(obj->o_flags & ISKNOW)) |
121 return ""; | 120 return ""; |
145 } | 144 } |
146 | 145 |
147 /* | 146 /* |
148 * Return the effect of the specified ring | 147 * Return the effect of the specified ring |
149 */ | 148 */ |
150 ring_value(type) | 149 int |
150 ring_value(int type) | |
151 { | 151 { |
152 int result = 0; | 152 int result = 0; |
153 | 153 |
154 if (ISRING(LEFT_1, type)) result += cur_ring[LEFT_1]->o_ac; | 154 if (ISRING(LEFT_1, type)) result += cur_ring[LEFT_1]->o_ac; |
155 if (ISRING(LEFT_2, type)) result += cur_ring[LEFT_2]->o_ac; | 155 if (ISRING(LEFT_2, type)) result += cur_ring[LEFT_2]->o_ac; |