Super-Rogue: convert to ANSI-style function declarations.

This fixes most of the build warnings.
This commit is contained in:
John "Elwin" Edwards 2016-01-31 13:45:07 -05:00
parent 0f87d5b4d8
commit 59f448e92e
33 changed files with 783 additions and 518 deletions

View file

@ -14,15 +14,20 @@
* See the file LICENSE.TXT for full copyright and licensing information.
*/
#include <stdlib.h>
#include "rogue.h"
#include "rogue.ext"
void conn(int r1, int r2);
void door(struct room *rm, struct coord *cp);
/*
* do_passages:
* Draw all the passages on a level.
*/
do_passages()
void
do_passages(void)
{
reg struct rdes *r1, *r2 = NULL;
reg int i, j;
@ -123,8 +128,8 @@ do_passages()
* Cconnect two rooms.
*/
conn(r1, r2)
int r1, r2;
void
conn(int r1, int r2)
{
reg struct room *rpf, *rpt = NULL;
reg char rmt, direc;
@ -255,9 +260,8 @@ int r1, r2;
* also enters the door in the exits array of the room.
*/
door(rm, cp)
struct room *rm;
struct coord *cp;
void
door(struct room *rm, struct coord *cp)
{
cmov(*cp);
addch(rnd(10) < level - 1 && rnd(100) < 20 ? SECRETDOOR : DOOR);
@ -269,7 +273,8 @@ struct coord *cp;
* add_pass:
* add the passages to the current window (wizard command)
*/
add_pass()
void
add_pass(void)
{
reg int y, x, ch;