Mercurial > hg > early-roguelike
diff arogue7/trader.c @ 225:4f6e056438eb
Merge the GCC5 and build fix branches.
author | John "Elwin" Edwards |
---|---|
date | Wed, 02 Mar 2016 21:28:34 -0500 |
parents | f9ef86cf22b2 |
children | ad2570b5b21f |
line wrap: on
line diff
--- a/arogue7/trader.c Fri Feb 26 17:30:30 2016 -0500 +++ b/arogue7/trader.c Wed Mar 02 21:28:34 2016 -0500 @@ -16,18 +16,22 @@ * Anything to do with trading posts */ +#include <ctype.h> +#include <string.h> #include "curses.h" #include "rogue.h" - - +bool open_market(void); +void trans_line(void); +char *typ_name(struct object *obj); /* * buy_it: * Buy the item on which the hero stands */ -buy_it() +void +buy_it(void) { reg int wh; struct linked_list *item; @@ -79,9 +83,10 @@ /* * do_post: * Put a trading post room and stuff on the screen + * startup: True if equipping the player at the beginning of the game */ -do_post(startup) -bool startup; /* True if equipping the player at the beginning of the game */ +void +do_post(bool startup) { coord tp; reg int i, j, k; @@ -322,8 +327,8 @@ * get_worth: * Calculate an objects worth in gold */ -get_worth(obj) -reg struct object *obj; +int +get_worth(struct object *obj) { reg int worth, wh; @@ -393,7 +398,8 @@ * open_market: * Retruns TRUE when ok do to transacting */ -open_market() +bool +open_market(void) { if (trader >= MAXPURCH && !wizard && level != 0) { msg("The market is closed. The stairs are that-a-way."); @@ -408,7 +414,8 @@ * price_it: * Price the object that the hero stands on */ -price_it() +bool +price_it(void) { reg struct linked_list *item; reg struct object *obj; @@ -445,7 +452,8 @@ * sell_it: * Sell an item to the trading post */ -sell_it() +void +sell_it(void) { reg struct linked_list *item; reg struct object *obj; @@ -491,7 +499,8 @@ * trans_line: * Show how many transactions the hero has left */ -trans_line() +void +trans_line(void) { if (level == 0) sprintf(prbuf, "You are welcome to spend whatever you have."); @@ -511,8 +520,7 @@ * Return the name for this type of object */ char * -typ_name(obj) -reg struct object *obj; +typ_name(struct object *obj) { static char buff[20]; reg int wh;