comparison xrogue/rings.c @ 225:4f6e056438eb

Merge the GCC5 and build fix branches.
author John "Elwin" Edwards
date Wed, 02 Mar 2016 21:28:34 -0500
parents f54901b9c39b
children 7c1cb43f346e
comparison
equal deleted inserted replaced
224:4d0f53998e8a 225:4f6e056438eb
27 27
28 /* 28 /*
29 * how much food does this ring use up? 29 * how much food does this ring use up?
30 */ 30 */
31 31
32 ring_eat(hand) 32 int
33 register int hand; 33 ring_eat(int hand)
34 { 34 {
35 if (cur_ring[hand] == NULL) 35 if (cur_ring[hand] == NULL)
36 return 0; 36 return 0;
37 switch (cur_ring[hand]->o_which) { 37 switch (cur_ring[hand]->o_which) {
38 case R_VAMPREGEN: 38 case R_VAMPREGEN:
52 return (-(cur_ring[hand]->o_ac)); 52 return (-(cur_ring[hand]->o_ac));
53 } 53 }
54 return 0; 54 return 0;
55 } 55 }
56 56
57 ring_on(item) 57 void
58 register struct linked_list *item; 58 ring_on(struct linked_list *item)
59 { 59 {
60 register struct object *obj; 60 register struct object *obj;
61 register int save_max; 61 register int save_max;
62 62
63 obj = OBJPTR(item); 63 obj = OBJPTR(item);
120 /* 120 /*
121 * print ring bonuses 121 * print ring bonuses
122 */ 122 */
123 123
124 char * 124 char *
125 ring_num(obj) 125 ring_num(struct object *obj)
126 register struct object *obj;
127 { 126 {
128 static char buf[5]; 127 static char buf[5];
129 128
130 if (!(obj->o_flags & ISKNOW)) 129 if (!(obj->o_flags & ISKNOW))
131 return ""; 130 return "";
156 155
157 /* 156 /*
158 * Return the effect of the specified ring 157 * Return the effect of the specified ring
159 */ 158 */
160 159
161 ring_value(type) 160 int
161 ring_value(int type)
162 { 162 {
163 int result = 0; 163 int result = 0;
164 164
165 if (ISRING(LEFT_1, type)) result += cur_ring[LEFT_1]->o_ac; 165 if (ISRING(LEFT_1, type)) result += cur_ring[LEFT_1]->o_ac;
166 if (ISRING(LEFT_2, type)) result += cur_ring[LEFT_2]->o_ac; 166 if (ISRING(LEFT_2, type)) result += cur_ring[LEFT_2]->o_ac;