Mercurial > hg > early-roguelike
diff arogue5/encumb.c @ 225:4f6e056438eb
Merge the GCC5 and build fix branches.
author | John "Elwin" Edwards |
---|---|
date | Wed, 02 Mar 2016 21:28:34 -0500 |
parents | 56e748983fa8 |
children |
line wrap: on
line diff
--- a/arogue5/encumb.c Fri Feb 26 17:30:30 2016 -0500 +++ b/arogue5/encumb.c Wed Mar 02 21:28:34 2016 -0500 @@ -15,12 +15,14 @@ #include "curses.h" #include "rogue.h" +int packweight(void); + /* * updpack: * Update his pack weight and adjust fooduse accordingly */ -updpack(getmax) -int getmax; +void +updpack(bool getmax) { reg int topcarry, curcarry; @@ -45,7 +47,8 @@ * packweight: * Get the total weight of the hero's pack */ -packweight() +int +packweight(void) { reg struct object *obj; reg struct linked_list *pc; @@ -68,8 +71,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; @@ -99,7 +102,8 @@ * playenc: * Get hero's carrying ability above norm */ -playenc() +int +playenc(void) { return ((str_compute()-8)*50); } @@ -109,7 +113,8 @@ * totalenc: * Get total weight that the hero can carry */ -totalenc() +int +totalenc(void) { reg int wtotal; @@ -130,18 +135,18 @@ * 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) { ch = CCHAR( mvwinch(stdscr, hero.y, hero.x) ); if((ch != FLOOR && ch != PASSAGE)) { extinguish(wghtchk); - fuse(wghtchk,TRUE,1,AFTER); + fuse(wghtchk,NULL,1,AFTER); inwhgt = FALSE; return; } @@ -169,7 +174,8 @@ * -1 hit for heavy pack weight */ -hitweight() +int +hitweight(void) { return(2 - foodlev); }