comparison xrogue/init.c @ 220:f54901b9c39b

XRogue: convert to ANSI-style function declarations.
author John "Elwin" Edwards
date Wed, 02 Mar 2016 21:13:26 -0500
parents ce0cf824c192
children 0250220d8cdd
comparison
equal deleted inserted replaced
219:f9ef86cf22b2 220:f54901b9c39b
103 /* 103 /*
104 * make sure all the percentages specified in the tables add up to the 104 * make sure all the percentages specified in the tables add up to the
105 * right amounts 105 * right amounts
106 */ 106 */
107 107
108 badcheck(name, magic, bound) 108 void
109 char *name; 109 badcheck(char *name, struct magic_item *magic, int bound)
110 register struct magic_item *magic;
111 register int bound;
112 { 110 {
113 register struct magic_item *end; 111 register struct magic_item *end;
114 112
115 if (magic[bound - 1].mi_prob == 1000) 113 if (magic[bound - 1].mi_prob == 1000)
116 return; 114 return;
126 /* 124 /*
127 * init_colors: 125 * init_colors:
128 * Initialize the potion color scheme for this time 126 * Initialize the potion color scheme for this time
129 */ 127 */
130 128
131 init_colors() 129 void
130 init_colors(void)
132 { 131 {
133 register int i; 132 register int i;
134 register char *str; 133 register char *str;
135 134
136 for (i = 0 ; i < MAXPOTIONS ; i++) 135 for (i = 0 ; i < MAXPOTIONS ; i++)
150 149
151 /* 150 /*
152 * do any initialization for food 151 * do any initialization for food
153 */ 152 */
154 153
155 init_foods() 154 void
155 init_foods(void)
156 { 156 {
157 register int i; 157 register int i;
158 158
159 for (i=0; i < MAXFOODS; i++) { 159 for (i=0; i < MAXFOODS; i++) {
160 if (i > 0) 160 if (i > 0)
166 /* 166 /*
167 * init_materials: 167 * init_materials:
168 * Initialize the construction materials for wands and staffs 168 * Initialize the construction materials for wands and staffs
169 */ 169 */
170 170
171 init_materials() 171 void
172 init_materials(void)
172 { 173 {
173 register int i; 174 register int i;
174 register char *str; 175 register char *str;
175 176
176 for (i = 0 ; i < MAXSTICKS ; i++) 177 for (i = 0 ; i < MAXSTICKS ; i++)
201 202
202 /* 203 /*
203 * do any initialization for miscellaneous magic 204 * do any initialization for miscellaneous magic
204 */ 205 */
205 206
206 init_misc() 207 void
208 init_misc(void)
207 { 209 {
208 register int i; 210 register int i;
209 211
210 for (i=0; i < MAXMM; i++) { 212 for (i=0; i < MAXMM; i++) {
211 m_know[i] = FALSE; 213 m_know[i] = FALSE;
219 /* 221 /*
220 * init_names: 222 * init_names:
221 * Generate the names of the various scrolls 223 * Generate the names of the various scrolls
222 */ 224 */
223 225
224 init_names() 226 void
227 init_names(void)
225 { 228 {
226 register int nsyl; 229 register int nsyl;
227 register char *cp, *sp; 230 register char *cp, *sp;
228 register int i, nwords; 231 register int i, nwords;
229 232
256 /* 259 /*
257 * init_player: 260 * init_player:
258 * roll up the rogue 261 * roll up the rogue
259 */ 262 */
260 263
261 init_player() 264 void
265 init_player(void)
262 { 266 {
263 int stat_total, round = 0, minimum, maximum, ch, i, j = 0; 267 int stat_total, round = 0, minimum, maximum, ch, i, j = 0;
264 short do_escape, *our_stats[NUMABILITIES-1]; 268 short do_escape, *our_stats[NUMABILITIES-1];
265 struct linked_list *weap_item, *armor_item, *food_item; 269 struct linked_list *weap_item, *armor_item, *food_item;
266 struct object *obj; 270 struct object *obj;
788 /* 792 /*
789 * init_stones: 793 * init_stones:
790 * Initialize the ring stone setting scheme for this time 794 * Initialize the ring stone setting scheme for this time
791 */ 795 */
792 796
793 init_stones() 797 void
798 init_stones(void)
794 { 799 {
795 register int i; 800 register int i;
796 register char *str; 801 register char *str;
797 802
798 for (i = 0 ; i < MAXRINGS ; i++) 803 for (i = 0 ; i < MAXRINGS ; i++)
813 /* 818 /*
814 * init_things 819 * init_things
815 * Initialize the probabilities for types of things 820 * Initialize the probabilities for types of things
816 */ 821 */
817 822
818 init_things() 823 void
824 init_things(void)
819 { 825 {
820 register struct magic_item *mp; 826 register struct magic_item *mp;
821 827
822 for (mp = &things[1] ; mp < &things[NUMTHINGS] ; mp++) 828 for (mp = &things[1] ; mp < &things[NUMTHINGS] ; mp++)
823 mp->mi_prob += (mp-1)->mi_prob; 829 mp->mi_prob += (mp-1)->mi_prob;