comparison arogue5/new_level.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 0ed67132cf10
children
comparison
equal deleted inserted replaced
217:94a0d9dd5ce1 218:56e748983fa8
14 14
15 #include "curses.h" 15 #include "curses.h"
16 #include "rogue.h" 16 #include "rogue.h"
17 #define TERRASAVE 3 17 #define TERRASAVE 3
18 18
19 new_level(ltype) 19 void put_things(LEVTYPE ltype);
20 LEVTYPE ltype; /* designates type of level to create */ 20
21 /* ltype designates type of level to create */
22 void
23 new_level(LEVTYPE ltype)
21 { 24 {
22 register int rm = 0, i, cnt; 25 register int rm = 0, i, cnt;
23 register char ch; 26 register char ch;
24 register struct linked_list *item; 27 register struct linked_list *item;
25 register struct thing *tp; 28 register struct thing *tp;
407 410
408 /* 411 /*
409 * Pick a room that is really there 412 * Pick a room that is really there
410 */ 413 */
411 414
412 rnd_room() 415 int
416 rnd_room(void)
413 { 417 {
414 register int rm; 418 register int rm;
415 419
416 if (levtype != NORMLEV) 420 if (levtype != NORMLEV)
417 rm = 0; 421 rm = 0;
423 } 427 }
424 428
425 /* 429 /*
426 * put_things: 430 * put_things:
427 * put potions and scrolls on this level 431 * put potions and scrolls on this level
432 * ltype: designates type of level to create
428 */ 433 */
429 434
430 put_things(ltype) 435 void
431 LEVTYPE ltype; /* designates type of level to create */ 436 put_things(LEVTYPE ltype)
432 { 437 {
433 register int i, rm, cnt; 438 register int i, rm, cnt;
434 register struct object *cur; 439 register struct object *cur;
435 register struct linked_list *item, *exitptr; 440 register struct linked_list *item, *exitptr;
436 bool got_unique = FALSE; 441 bool got_unique = FALSE;
446 /* 451 /*
447 * There is a chance that there is a treasure room on this level 452 * There is a chance that there is a treasure room on this level
448 * Increasing chance after level 9 453 * Increasing chance after level 9
449 */ 454 */
450 if (ltype != MAZELEV && rnd(HARDER) < level - 8) { 455 if (ltype != MAZELEV && rnd(HARDER) < level - 8) {
451 register j; 456 register int j;
452 register struct room *rp; 457 register struct room *rp;
453 458
454 /* Count the number of free spaces */ 459 /* Count the number of free spaces */
455 i = 0; /* 0 tries */ 460 i = 0; /* 0 tries */
456 do { 461 do {