Mercurial > hg > early-roguelike
diff arogue5/wizard.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 | e52a8a7ad4c5 |
line wrap: on
line diff
--- a/arogue5/wizard.c Fri Feb 26 17:30:30 2016 -0500 +++ b/arogue5/wizard.c Wed Mar 02 21:28:34 2016 -0500 @@ -15,6 +15,7 @@ #include "curses.h" #include <ctype.h> +#include <string.h> #include <stdlib.h> #include "rogue.h" @@ -23,9 +24,8 @@ * create_obj: * Create any object for wizard, scroll, magician, or cleric */ -create_obj(prompt, which_item, which_type) -bool prompt; -int which_item, which_type; +void +create_obj(bool prompt, int which_item, int which_type) { reg struct linked_list *item; reg struct object *obj; @@ -311,7 +311,8 @@ * getbless: * Get a blessing for a wizards object */ -getbless() +int +getbless(void) { reg char bless; @@ -328,7 +329,8 @@ /* * get a non-monster death type */ -getdeath() +int +getdeath(void) { register int i; int which_death; @@ -358,8 +360,8 @@ /* * make a monster for the wizard */ -makemonster(create) -bool create; +short +makemonster(bool create) { register int i; register short which_monst; @@ -368,7 +370,7 @@ /* Print out the monsters */ while (num_monst > 0) { - register left_limit; + register int left_limit; if (num_monst < num_lines) left_limit = (num_monst+1)/2; else left_limit = num_lines/2; @@ -430,7 +432,8 @@ * see if user knows password */ -passwd() +bool +passwd(void) { register char *sp, c; char buf[LINELEN]; @@ -457,7 +460,8 @@ * Bamf the hero someplace else */ -teleport() +int +teleport(void) { register struct room *new_rp, *old_rp = roomin(&hero); register int rm; @@ -525,8 +529,8 @@ * What a certin object is */ -whatis(what) -struct linked_list *what; +void +whatis(struct linked_list *what) { register struct object *obj; register struct linked_list *item;