Mercurial > hg > early-roguelike
diff arogue7/encumb.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 | e1cd27c5464f |
line wrap: on
line diff
--- a/arogue7/encumb.c Sun Feb 07 14:39:21 2016 -0500 +++ b/arogue7/encumb.c Fri Feb 19 21:02:28 2016 -0500 @@ -20,13 +20,14 @@ #include "curses.h" #include "rogue.h" +int packweight(struct thing *tp); + /* * updpack: * Update his pack weight and adjust fooduse accordingly */ -updpack(getmax, tp) -int getmax; -struct thing *tp; +void +updpack(int getmax, struct thing *tp) { reg int topcarry, curcarry; @@ -55,8 +56,8 @@ * packweight: * Get the total weight of the hero's pack */ -packweight(tp) -register struct thing *tp; +int +packweight(struct thing *tp) { reg struct object *obj; reg struct linked_list *pc; @@ -92,8 +93,8 @@ * itemweight: * Get the weight of an object */ -itemweight(wh) -reg struct object *wh; +int +itemweight(struct object *wh) { reg int weight; reg int ac; @@ -123,8 +124,8 @@ * playenc: * Get hero's carrying ability above norm */ -playenc(tp) -register struct thing *tp; +int +playenc(struct thing *tp) { register int strength; @@ -139,8 +140,8 @@ * totalenc: * Get total weight that the hero can carry */ -totalenc(tp) -register struct thing *tp; +int +totalenc(struct thing *tp) { reg int wtotal; @@ -162,11 +163,11 @@ * See if the hero can carry his pack */ -wghtchk() +void +wghtchk(void) { reg int dropchk, err = TRUE; reg char ch; - int wghtchk(); inwhgt = TRUE; if (pstats.s_pack > pstats.s_carry) { @@ -201,7 +202,8 @@ * -1 hit for heavy pack weight */ -hitweight() +int +hitweight(void) { return(2 - foodlev); }