Mercurial > hg > early-roguelike
comparison arogue5/init.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 | 68a63ddfbe14 | 
| children | 32bc72dcbf4f | 
   comparison
  equal
  deleted
  inserted
  replaced
| 217:94a0d9dd5ce1 | 218:56e748983fa8 | 
|---|---|
| 95 | 95 | 
| 96 /* | 96 /* | 
| 97 * make sure all the percentages specified in the tables add up to the | 97 * make sure all the percentages specified in the tables add up to the | 
| 98 * right amounts | 98 * right amounts | 
| 99 */ | 99 */ | 
| 100 badcheck(name, magic, bound) | 100 void | 
| 101 char *name; | 101 badcheck(char *name, struct magic_item *magic, int bound) | 
| 102 register struct magic_item *magic; | |
| 103 register int bound; | |
| 104 { | 102 { | 
| 105 register struct magic_item *end; | 103 register struct magic_item *end; | 
| 106 | 104 | 
| 107 if (magic[bound - 1].mi_prob == 1000) | 105 if (magic[bound - 1].mi_prob == 1000) | 
| 108 return; | 106 return; | 
| 118 /* | 116 /* | 
| 119 * init_colors: | 117 * init_colors: | 
| 120 * Initialize the potion color scheme for this time | 118 * Initialize the potion color scheme for this time | 
| 121 */ | 119 */ | 
| 122 | 120 | 
| 123 init_colors() | 121 void | 
| 122 init_colors(void) | |
| 124 { | 123 { | 
| 125 register int i, j; | 124 register int i, j; | 
| 126 bool used[NCOLORS]; | 125 bool used[NCOLORS]; | 
| 127 | 126 | 
| 128 for(i = 0; i < NCOLORS; i++) | 127 for(i = 0; i < NCOLORS; i++) | 
| 146 /* | 145 /* | 
| 147 * init_materials: | 146 * init_materials: | 
| 148 * Initialize the construction materials for wands and staffs | 147 * Initialize the construction materials for wands and staffs | 
| 149 */ | 148 */ | 
| 150 | 149 | 
| 151 init_materials() | 150 void | 
| 151 init_materials(void) | |
| 152 { | 152 { | 
| 153 register int i, j; | 153 register int i, j; | 
| 154 register char *str; | 154 register char *str; | 
| 155 bool metused[NMETAL], woodused[NWOOD]; | 155 bool metused[NMETAL], woodused[NWOOD]; | 
| 156 | 156 | 
| 199 | 199 | 
| 200 /* | 200 /* | 
| 201 * do any initialization for miscellaneous magic | 201 * do any initialization for miscellaneous magic | 
| 202 */ | 202 */ | 
| 203 | 203 | 
| 204 init_misc() | 204 void | 
| 205 init_misc(void) | |
| 205 { | 206 { | 
| 206 register int i; | 207 register int i; | 
| 207 | 208 | 
| 208 for (i=0; i < MAXMM; i++) { | 209 for (i=0; i < MAXMM; i++) { | 
| 209 m_know[i] = FALSE; | 210 m_know[i] = FALSE; | 
| 219 /* | 220 /* | 
| 220 * init_names: | 221 * init_names: | 
| 221 * Generate the names of the various scrolls | 222 * Generate the names of the various scrolls | 
| 222 */ | 223 */ | 
| 223 | 224 | 
| 224 init_names() | 225 void | 
| 226 init_names(void) | |
| 225 { | 227 { | 
| 226 register int nsyl; | 228 register int nsyl; | 
| 227 register char *cp, *sp; | 229 register char *cp, *sp; | 
| 228 register int i, nwords; | 230 register int i, nwords; | 
| 229 | 231 | 
| 256 /* | 258 /* | 
| 257 * init_player: | 259 * init_player: | 
| 258 * roll up the rogue | 260 * roll up the rogue | 
| 259 */ | 261 */ | 
| 260 | 262 | 
| 261 init_player() | 263 void | 
| 264 init_player(void) | |
| 262 { | 265 { | 
| 263 int stat_total, ch = 0, wpt = 0, i, j; | 266 int stat_total, ch = 0, wpt = 0, i, j; | 
| 264 struct linked_list *weap_item, *armor_item, *food_item; | 267 struct linked_list *weap_item, *armor_item, *food_item; | 
| 265 struct object *obj; | 268 struct object *obj; | 
| 266 char *class; | 269 char *class; | 
| 457 /* | 460 /* | 
| 458 * init_stones: | 461 * init_stones: | 
| 459 * Initialize the ring stone setting scheme for this time | 462 * Initialize the ring stone setting scheme for this time | 
| 460 */ | 463 */ | 
| 461 | 464 | 
| 462 init_stones() | 465 void | 
| 466 init_stones(void) | |
| 463 { | 467 { | 
| 464 register int i, j; | 468 register int i, j; | 
| 465 bool used[NSTONES]; | 469 bool used[NSTONES]; | 
| 466 | 470 | 
| 467 for (i = 0; i < NSTONES; i++) | 471 for (i = 0; i < NSTONES; i++) | 
| 485 | 489 | 
| 486 /* | 490 /* | 
| 487 * init_things | 491 * init_things | 
| 488 * Initialize the probabilities for types of things | 492 * Initialize the probabilities for types of things | 
| 489 */ | 493 */ | 
| 490 init_things() | 494 void | 
| 495 init_things(void) | |
| 491 { | 496 { | 
| 492 register struct magic_item *mp; | 497 register struct magic_item *mp; | 
| 493 | 498 | 
| 494 for (mp = &things[1] ; mp < &things[NUMTHINGS] ; mp++) | 499 for (mp = &things[1] ; mp < &things[NUMTHINGS] ; mp++) | 
| 495 mp->mi_prob += (mp-1)->mi_prob; | 500 mp->mi_prob += (mp-1)->mi_prob; | 
