diff arogue5/rooms.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 c49f7927b0fa
children
line wrap: on
line diff
--- a/arogue5/rooms.c	Sun Jan 31 13:45:07 2016 -0500
+++ b/arogue5/rooms.c	Sun Feb 07 14:39:21 2016 -0500
@@ -16,7 +16,11 @@
 #include "rogue.h"
 #include <stdlib.h>
 
-do_rooms()
+void horiz(int cnt);
+void vert(int cnt);
+
+void
+do_rooms(void)
 {
     register int i;
     register struct room *rp;
@@ -99,7 +103,7 @@
 
 	    has_gold = TRUE;	/* This room has gold in it */
 
-	    item = spec_item(GOLD, NULL, NULL, NULL);
+	    item = spec_item(GOLD, 0, 0, 0);
 	    cur = OBJPTR(item);
 
 	    /* Put the gold into the level list of items */
@@ -153,8 +157,8 @@
  * Draw a box around a room
  */
 
-draw_room(rp)
-register struct room *rp;
+void
+draw_room(struct room *rp)
 {
     register int j, k;
 
@@ -181,8 +185,8 @@
  *	draw a horizontal line
  */
 
-horiz(cnt)
-register int cnt;
+void
+horiz(int cnt)
 {
     while (cnt--)
 	addch('-');
@@ -193,9 +197,8 @@
  *	pick a random spot in a room
  */
 
-rnd_pos(rp, cp)
-register struct room *rp;
-register coord *cp;
+void
+rnd_pos(struct room *rp, coord *cp)
 {
     cp->x = rp->r_pos.x + rnd(rp->r_max.x-2) + 1;
     cp->y = rp->r_pos.y + rnd(rp->r_max.y-2) + 1;
@@ -210,8 +213,7 @@
  */
 
 struct room *
-roomin(cp)
-register coord *cp;
+roomin(coord *cp)
 {
     register struct room *rp;
 
@@ -226,8 +228,8 @@
  *	draw a vertical line
  */
 
-vert(cnt)
-register int cnt;
+void
+vert(int cnt)
 {
     register int x, y;