Mercurial > hg > early-roguelike
diff arogue7/outside.c @ 219:f9ef86cf22b2
Advanced Rogue 7: convert to ANSI-style function declarations.
Almost 1500 lines of compiler warnings remain, and the GCC developers
are already working on a new version with even more warnings turned on
by default.
author | John "Elwin" Edwards |
---|---|
date | Fri, 19 Feb 2016 21:02:28 -0500 |
parents | adfa37e67084 |
children |
line wrap: on
line diff
--- a/arogue7/outside.c Sun Feb 07 14:39:21 2016 -0500 +++ b/arogue7/outside.c Fri Feb 19 21:02:28 2016 -0500 @@ -15,7 +15,8 @@ #include "curses.h" #include "rogue.h" -extern char rnd_terrain(), get_terrain(); +char rnd_terrain(void); +char get_terrain(char one, char two, char three, char four); /* * init_terrain: @@ -23,7 +24,7 @@ */ void -init_terrain() +init_terrain(void) { register struct room *rp; @@ -42,11 +43,9 @@ void -do_terrain(basey, basex, deltay, deltax, fresh) -int basey, basex, deltay, deltax; -bool fresh; +do_terrain(int basey, int basex, int deltay, int deltax, bool fresh) { - register cury, curx; /* Current y and x positions */ + register int cury, curx; /* Current y and x positions */ /* Lay out the boundary */ for (cury=1; cury<lines-2; cury++) { /* Vertical "walls" */ @@ -129,7 +128,7 @@ */ char -rnd_terrain() +rnd_terrain(void) { int chance = rnd(100); @@ -153,8 +152,7 @@ */ char -get_terrain(one, two, three, four) -char one, two, three, four; +get_terrain(char one, char two, char three, char four) { register int i; int forest = 0, mountain = 0, lake = 0, meadow = 0, total = 0; @@ -207,7 +205,6 @@ */ void -lake_check(place) -coord *place; +lake_check(coord *place) { }