rogue4: fix most GCC5 warnings.

Converting all function definitions to ANSI style accounts for most of
the change.  This has exposed other problems, such as daemons not
actually being their stated type, that will require more careful
solutions.
This commit is contained in:
John "Elwin" Edwards 2016-01-27 19:41:05 -05:00
parent 384386d71c
commit c1d6a6af6a
32 changed files with 625 additions and 394 deletions

View file

@ -16,11 +16,16 @@
#define GOLDGRP 1
void draw_room(struct room *rp);
void vert(struct room *rp, int startx);
void horiz(struct room *rp, int starty);
/*
* do_rooms:
* Create rooms and corridors with a connectivity graph
*/
do_rooms()
void
do_rooms(void)
{
register int i;
register struct room *rp;
@ -120,8 +125,8 @@ do_rooms()
* draw_room:
* Draw a box around a room and lay down the floor
*/
draw_room(rp)
register struct room *rp;
void
draw_room(struct room *rp)
{
register int y, x;
@ -147,9 +152,8 @@ register struct room *rp;
* vert:
* Draw a vertical line
*/
vert(rp, startx)
register struct room *rp;
register int startx;
void
vert(struct room *rp, int startx)
{
register int y;
@ -161,9 +165,8 @@ register int startx;
* horiz:
* Draw a horizontal line
*/
horiz(rp, starty)
register struct room *rp;
int starty;
void
horiz(struct room *rp, int starty)
{
register int x;
@ -175,9 +178,8 @@ int starty;
* rnd_pos:
* 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;
@ -187,8 +189,8 @@ register coord *cp;
* enter_room:
* Code that is executed whenver you appear in a room
*/
enter_room(cp)
register coord *cp;
void
enter_room(coord *cp)
{
register struct room *rp;
register int y, x;
@ -220,8 +222,8 @@ register coord *cp;
* leave_room:
* Code for when we exit a room
*/
leave_room(cp)
register coord *cp;
void
leave_room(coord *cp)
{
register int y, x;
register struct room *rp;