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.
This commit is contained in:
John "Elwin" Edwards 2016-02-07 14:39:21 -05:00
parent 59f448e92e
commit f38b2223c8
37 changed files with 977 additions and 733 deletions

View file

@ -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 @@ do_rooms()
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 @@ do_rooms()
* 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 @@ register struct room *rp;
* draw a horizontal line
*/
horiz(cnt)
register int cnt;
void
horiz(int cnt)
{
while (cnt--)
addch('-');
@ -193,9 +197,8 @@ register int cnt;
* 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 @@ register coord *cp;
*/
struct room *
roomin(cp)
register coord *cp;
roomin(coord *cp)
{
register struct room *rp;
@ -226,8 +228,8 @@ register coord *cp;
* draw a vertical line
*/
vert(cnt)
register int cnt;
void
vert(int cnt)
{
register int x, y;