diff 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
line wrap: on
line diff
--- a/arogue5/new_level.c	Sun Jan 31 13:45:07 2016 -0500
+++ b/arogue5/new_level.c	Sun Feb 07 14:39:21 2016 -0500
@@ -16,8 +16,11 @@
 #include "rogue.h"
 #define TERRASAVE 3
 
-new_level(ltype)
-LEVTYPE	ltype;		/* designates type of level to create */
+void put_things(LEVTYPE ltype);
+
+/* ltype designates type of level to create */
+void
+new_level(LEVTYPE ltype)
 {
     register int rm = 0, i, cnt;
     register char ch;
@@ -409,7 +412,8 @@
  * Pick a room that is really there
  */
 
-rnd_room()
+int
+rnd_room(void)
 {
     register int rm;
 
@@ -425,10 +429,11 @@
 /*
  * put_things:
  *	put potions and scrolls on this level
+ *	ltype: designates type of level to create 
  */
 
-put_things(ltype)
-LEVTYPE	ltype;		/* designates type of level to create */
+void
+put_things(LEVTYPE ltype)
 {
     register int i, rm, cnt;
     register struct object *cur;
@@ -448,7 +453,7 @@
      * Increasing chance after level 9 
      */
     if (ltype != MAZELEV && rnd(HARDER) < level - 8) {	
-	register  j;
+	register int j;
 	register struct room *rp;
 
 	/* Count the number of free spaces */