Mercurial > hg > early-roguelike
diff rogue4/move.c @ 215:1b73a8641b37
rogue4: fix most GCC5 warnings.
Converting all function definitions to ANSI style accounts for most of
the change. This has exposed other problems, such as daemons not
actually being their stated type, that will require more careful
solutions.
author | John "Elwin" Edwards |
---|---|
date | Wed, 27 Jan 2016 19:41:05 -0500 |
parents | 9535a08ddc39 |
children |
line wrap: on
line diff
--- a/rogue4/move.c Sat Jan 23 09:35:14 2016 -0500 +++ b/rogue4/move.c Wed Jan 27 19:41:05 2016 -0500 @@ -14,6 +14,9 @@ #include <ctype.h> #include "rogue.h" +void turnref(void); +char be_trapped(coord *tc); + /* * Used to hold the new hero position */ @@ -24,8 +27,8 @@ * do_run: * Start the hero running */ -do_run(ch) -char ch; +void +do_run(char ch) { running = TRUE; after = FALSE; @@ -37,8 +40,8 @@ * Check to see that a move is legal. If it is handle the * consequences (fighting, picking up, etc.) */ -do_move(dy, dx) -int dy, dx; +void +do_move(int dy, int dx) { register char ch, fl; @@ -189,7 +192,8 @@ * turnref: * Decide whether to refresh at a passage turning or not */ -turnref() +void +turnref(void) { register int index; @@ -211,8 +215,8 @@ * Called to illuminate a room. If it is dark, remove anything * that might move. */ -door_open(rp) -struct room *rp; +void +door_open(struct room *rp) { register int j, k; register char ch; @@ -238,8 +242,8 @@ * be_trapped: * The guy stepped on a trap.... Make him pay. */ -be_trapped(tc) -register coord *tc; +char +be_trapped(coord *tc) { register char tr; register int index; @@ -316,8 +320,7 @@ * Move in a random direction if the monster/person is confused */ coord * -rndmove(who) -THING *who; +rndmove(THING *who) { register int x, y; register char ch;