Mercurial > hg > early-roguelike
comparison arogue7/init.c @ 219:f9ef86cf22b2
Advanced Rogue 7: convert to ANSI-style function declarations.
Almost 1500 lines of compiler warnings remain, and the GCC developers
are already working on a new version with even more warnings turned on
by default.
| author | John "Elwin" Edwards |
|---|---|
| date | Fri, 19 Feb 2016 21:02:28 -0500 |
| parents | b786053d2f37 |
| children | e52a8a7ad4c5 |
comparison
equal
deleted
inserted
replaced
| 218:56e748983fa8 | 219:f9ef86cf22b2 |
|---|---|
| 115 | 115 |
| 116 /* | 116 /* |
| 117 * make sure all the percentages specified in the tables add up to the | 117 * make sure all the percentages specified in the tables add up to the |
| 118 * right amounts | 118 * right amounts |
| 119 */ | 119 */ |
| 120 badcheck(name, magic, bound) | 120 void |
| 121 char *name; | 121 badcheck(char *name, struct magic_item *magic, int bound) |
| 122 register struct magic_item *magic; | |
| 123 register int bound; | |
| 124 { | 122 { |
| 125 register struct magic_item *end; | 123 register struct magic_item *end; |
| 126 | 124 |
| 127 if (magic[bound - 1].mi_prob == 1000) | 125 if (magic[bound - 1].mi_prob == 1000) |
| 128 return; | 126 return; |
| 138 /* | 136 /* |
| 139 * init_colors: | 137 * init_colors: |
| 140 * Initialize the potion color scheme for this time | 138 * Initialize the potion color scheme for this time |
| 141 */ | 139 */ |
| 142 | 140 |
| 143 init_colors() | 141 void |
| 142 init_colors(void) | |
| 144 { | 143 { |
| 145 register int i, j; | 144 register int i, j; |
| 146 | 145 |
| 147 for (i = 0; i < NCOLORS; i++) | 146 for (i = 0; i < NCOLORS; i++) |
| 148 used[i] = FALSE; | 147 used[i] = FALSE; |
| 164 | 163 |
| 165 /* | 164 /* |
| 166 * do any initialization for food | 165 * do any initialization for food |
| 167 */ | 166 */ |
| 168 | 167 |
| 169 init_foods() | 168 void |
| 169 init_foods(void) | |
| 170 { | 170 { |
| 171 register int i; | 171 register int i; |
| 172 | 172 |
| 173 for (i=0; i < MAXFOODS; i++) { | 173 for (i=0; i < MAXFOODS; i++) { |
| 174 if (i > 0) | 174 if (i > 0) |
| 180 /* | 180 /* |
| 181 * init_materials: | 181 * init_materials: |
| 182 * Initialize the construction materials for wands and staffs | 182 * Initialize the construction materials for wands and staffs |
| 183 */ | 183 */ |
| 184 | 184 |
| 185 init_materials() | 185 void |
| 186 init_materials(void) | |
| 186 { | 187 { |
| 187 register int i, j; | 188 register int i, j; |
| 188 register char *str; | 189 register char *str; |
| 189 static bool metused[NMETAL]; | 190 static bool metused[NMETAL]; |
| 190 | 191 |
| 230 | 231 |
| 231 /* | 232 /* |
| 232 * do any initialization for miscellaneous magic | 233 * do any initialization for miscellaneous magic |
| 233 */ | 234 */ |
| 234 | 235 |
| 235 init_misc() | 236 void |
| 237 init_misc(void) | |
| 236 { | 238 { |
| 237 register int i; | 239 register int i; |
| 238 | 240 |
| 239 for (i=0; i < MAXMM; i++) { | 241 for (i=0; i < MAXMM; i++) { |
| 240 m_know[i] = FALSE; | 242 m_know[i] = FALSE; |
| 248 /* | 250 /* |
| 249 * init_names: | 251 * init_names: |
| 250 * Generate the names of the various scrolls | 252 * Generate the names of the various scrolls |
| 251 */ | 253 */ |
| 252 | 254 |
| 253 init_names() | 255 void |
| 256 init_names(void) | |
| 254 { | 257 { |
| 255 register int nsyl; | 258 register int nsyl; |
| 256 register char *cp, *sp; | 259 register char *cp, *sp; |
| 257 register int i, nwords; | 260 register int i, nwords; |
| 258 | 261 |
| 285 /* | 288 /* |
| 286 * init_player: | 289 * init_player: |
| 287 * roll up the rogue | 290 * roll up the rogue |
| 288 */ | 291 */ |
| 289 | 292 |
| 290 init_player() | 293 void |
| 294 init_player(void) | |
| 291 { | 295 { |
| 292 int stat_total, round, minimum, maximum, ch, i, j; | 296 int stat_total, round, minimum, maximum, ch, i, j; |
| 293 short do_escape, *our_stats[NUMABILITIES-1]; | 297 short do_escape, *our_stats[NUMABILITIES-1]; |
| 294 struct linked_list *weap_item, *armor_item; | 298 struct linked_list *weap_item, *armor_item; |
| 295 struct object *obj; | 299 struct object *obj; |
| 585 /* | 589 /* |
| 586 * init_stones: | 590 * init_stones: |
| 587 * Initialize the ring stone setting scheme for this time | 591 * Initialize the ring stone setting scheme for this time |
| 588 */ | 592 */ |
| 589 | 593 |
| 590 init_stones() | 594 void |
| 595 init_stones(void) | |
| 591 { | 596 { |
| 592 register int i, j; | 597 register int i, j; |
| 593 | 598 |
| 594 for (i = 0; i < NSTONES; i++) | 599 for (i = 0; i < NSTONES; i++) |
| 595 used[i] = FALSE; | 600 used[i] = FALSE; |
| 611 | 616 |
| 612 /* | 617 /* |
| 613 * init_things | 618 * init_things |
| 614 * Initialize the probabilities for types of things | 619 * Initialize the probabilities for types of things |
| 615 */ | 620 */ |
| 616 init_things() | 621 void |
| 622 init_things(void) | |
| 617 { | 623 { |
| 618 register struct magic_item *mp; | 624 register struct magic_item *mp; |
| 619 | 625 |
| 620 for (mp = &things[1] ; mp < &things[NUMTHINGS] ; mp++) | 626 for (mp = &things[1] ; mp < &things[NUMTHINGS] ; mp++) |
| 621 mp->mi_prob += (mp-1)->mi_prob; | 627 mp->mi_prob += (mp-1)->mi_prob; |
