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

@ -30,15 +30,20 @@ static char *frontier,
*bits;
static int maze_lines,
maze_cols;
char *moffset(),
*foffset();
void draw_maze(void);
int findcells(int y, int x);
char *foffset(int y, int x);
char *moffset(int y, int x);
void rmwall(int newy, int newx, int oldy, int oldx);
/*
* crankout:
* Does actual drawing of maze to window
*/
crankout()
void
crankout(void)
{
reg int x, y;
@ -71,7 +76,8 @@ crankout()
* domaze:
* Draw the maze on this level.
*/
do_maze()
void
do_maze(void)
{
reg int least;
reg struct room *rp;
@ -95,7 +101,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(10) + 1); /* add in one large hunk */
attach(lvl_obj, item);
@ -108,7 +114,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 {
@ -133,7 +139,8 @@ do_maze()
* draw_maze:
* Generate and draw the maze on the screen
*/
draw_maze()
void
draw_maze(void)
{
reg int i, j, more;
reg char *ptr;
@ -169,8 +176,8 @@ draw_maze()
* findcells:
* Figure out cells to open up
*/
findcells(y,x)
reg int x, y;
int
findcells(int y, int x)
{
reg int rtpos, i;
@ -221,8 +228,7 @@ reg int x, y;
* Calculate memory address for frontier
*/
char *
foffset(y, x)
int y, x;
foffset(int y, int x)
{
return (frontier + (y * maze_cols) + x);
@ -236,8 +242,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;
@ -342,8 +347,7 @@ int y, x;
* Calculate memory address for bits
*/
char *
moffset(y, x)
int y, x;
moffset(int y, int x)
{
return (bits + (y * (COLS - 1)) + x);
@ -356,8 +360,8 @@ int y, x;
* rmwall:
* Removes appropriate walls from the maze
*/
rmwall(newy, newx, oldy, oldx)
int newy, newx, oldy, oldx;
void
rmwall(int newy, int newx, int oldy, int oldx)
{
reg int xdif,ydif;