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

@ -27,8 +27,11 @@ struct b_cellscells {
static char *maze_frontier, *maze_bits;
static int maze_lines, maze_cols;
static char *moffset(), *foffset();
static int rmwall(),findcells(),crankout(),draw_maze();
static char *moffset(int y, int x);
static char *foffset(int y, int x);
static void rmwall(int newy, int newx, int oldy, int oldx);
static void draw_maze(void);
static int findcells(int y, int x);
/*
* crankout:
@ -36,7 +39,8 @@ static int rmwall(),findcells(),crankout(),draw_maze();
*/
static
crankout()
void
crankout(void)
{
reg int x, y;
@ -70,7 +74,8 @@ crankout()
* Draw the maze on this level.
*/
do_maze()
void
do_maze(void)
{
reg int least;
reg struct room *rp;
@ -94,7 +99,7 @@ do_maze()
/*
* add some gold to make it worth looking for
*/
item = spec_item(GOLD, NULL, NULL, NULL);
item = spec_item(GOLD, 0, 0, 0);
obj = OBJPTR(item);
obj->o_count *= (rnd(50) + 50); /* add in one large hunk */
attach(lvl_obj, item);
@ -107,7 +112,7 @@ do_maze()
/*
* add in some food to make sure he has enough
*/
item = spec_item(FOOD, NULL, NULL, NULL);
item = spec_item(FOOD, 0, 0, 0);
obj = OBJPTR(item);
attach(lvl_obj, item);
do {
@ -146,7 +151,8 @@ do_maze()
*/
static
draw_maze()
void
draw_maze(void)
{
reg int i, j, more;
reg char *ptr;
@ -183,8 +189,8 @@ draw_maze()
* Figure out cells to open up
*/
static findcells(y,x)
reg int x, y;
static int
findcells(int y, int x)
{
reg int rtpos, i;
@ -236,8 +242,7 @@ reg int x, y;
*/
static char *
foffset(y, x)
int y, x;
foffset(int y, int x)
{
return (maze_frontier + (y * maze_cols) + x);
@ -251,8 +256,7 @@ int y, x;
*/
bool
maze_view(y, x)
int y, x;
maze_view(int y, int x)
{
register int start, goal, delta, ycheck = 0, xcheck = 0, absy, absx, see_radius;
register bool row;
@ -360,8 +364,7 @@ int y, x;
*/
static char *
moffset(y, x)
int y, x;
moffset(int y, int x)
{
return (maze_bits + (y * (cols - 1)) + x);
}
@ -371,8 +374,8 @@ int y, x;
* Removes appropriate walls from the maze
*/
static
rmwall(newy, newx, oldy, oldx)
int newy, newx, oldy, oldx;
void
rmwall(int newy, int newx, int oldy, int oldx)
{
reg int xdif,ydif;