XRogue: convert to ANSI-style function declarations.

This commit is contained in:
John "Elwin" Edwards 2016-03-02 21:13:26 -05:00
parent e8e6e604c3
commit 2853120387
41 changed files with 1281 additions and 908 deletions

View file

@ -20,7 +20,11 @@
#include <curses.h>
#include "rogue.h"
do_rooms()
void horiz(int cnt);
void vert(int cnt);
void
do_rooms(void)
{
register int i;
register struct room *rp;
@ -107,7 +111,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 */
@ -177,9 +181,7 @@ do_rooms()
*/
coord *
doorway(rp, door)
register struct room *rp;
register coord *door;
doorway(struct room *rp, coord *door)
{
register int misses = 0;
static coord answer;
@ -208,8 +210,8 @@ register coord *door;
* Draw a box around a room
*/
draw_room(rp)
register struct room *rp;
void
draw_room(struct room *rp)
{
register int j, k;
@ -236,8 +238,8 @@ register struct room *rp;
* draw a horizontal line
*/
horiz(cnt)
register int cnt;
void
horiz(int cnt)
{
while (cnt--)
addch(HORZWALL);
@ -248,9 +250,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;
@ -265,8 +266,7 @@ register coord *cp;
*/
struct room *
roomin(cp)
register coord *cp;
roomin(coord *cp)
{
register struct room *rp;
@ -281,8 +281,8 @@ register coord *cp;
* draw a vertical line
*/
vert(cnt)
register int cnt;
void
vert(int cnt)
{
register int x, y;