Mercurial > hg > early-roguelike
diff xrogue/command.c @ 225:4f6e056438eb
Merge the GCC5 and build fix branches.
author | John "Elwin" Edwards |
---|---|
date | Wed, 02 Mar 2016 21:28:34 -0500 |
parents | f54901b9c39b |
children | 7c1cb43f346e |
line wrap: on
line diff
--- a/xrogue/command.c Fri Feb 26 17:30:30 2016 -0500 +++ b/xrogue/command.c Wed Mar 02 21:28:34 2016 -0500 @@ -24,12 +24,21 @@ #include "mach_dep.h" #include "rogue.h" +void display(void); +void d_level(void); +void u_level(void); +void shell(void); +void nameit(void); +void namemonst(void); +void count_gold(void); + /* * command: * Process the user commands */ -command() +void +command(void) { unsigned int ch; struct linked_list *item; @@ -288,7 +297,7 @@ else { after = FALSE; player.t_action = A_NIL; - fright(); + fright(NULL); } when 'g' : /* Give command: give slime-molds to monsters */ if (player.t_action == A_NIL) { @@ -298,7 +307,7 @@ else { after = FALSE; player.t_action = A_NIL; - give(); + give(NULL); } when 'G' : if (player.t_action == A_NIL) { @@ -357,14 +366,14 @@ /* when '\\' : after = FALSE; ident_hero(); */ when '\\' : msg("Charon (the Boatman) looks at you... "); - when '/' : after = FALSE; identify(NULL); + when '/' : after = FALSE; identify('\0'); when C_COUNT : count_gold(); when C_DIP : dip_it(); when C_DROP : player.t_action = C_DROP; drop((struct linked_list *)NULL); when C_EAT : eat(); - when C_QUAFF : quaff(-1, NULL, NULL, TRUE); - when C_READ : read_scroll(-1, NULL, TRUE); + when C_QUAFF : quaff(-1, 0, 0, TRUE); + when C_READ : read_scroll(-1, 0, TRUE); when C_SETTRAP : set_trap(&player, hero.y, hero.x); when C_SEARCH : if (player.t_action == A_NIL) { @@ -379,7 +388,7 @@ when C_USE : use_mm(-1); when C_WEAR : wear(); when C_WIELD : wield(); - when C_ZAP : if (!player_zap(NULL, FALSE)) after=FALSE; + when C_ZAP : if (!player_zap(0, FALSE)) after=FALSE; when C_CAST : cast(); when C_CHANT : chant(); when C_PRAY : pray(); @@ -638,7 +647,8 @@ * tell the player what is at a certain coordinates assuming * it can be seen. */ -display() +void +display(void) { coord c; struct linked_list *item; @@ -673,8 +683,7 @@ /*UNUSED*/ void -quit(sig) -int sig; +quit(int sig) { register int oy, ox; @@ -727,8 +736,8 @@ * killed by a program bug instead of voluntarily. */ -bugkill(sig) -int sig; +void +bugkill(int sig) { signal(sig, quit); /* If we get it again, give up */ if (levtype == OUTSIDE) { @@ -748,8 +757,8 @@ * Player gropes about him to find hidden things. */ -search(is_thief, door_chime) -register bool is_thief, door_chime; +void +search(bool is_thief, bool door_chime) { register int x, y; register char ch, /* The trap or door character */ @@ -861,7 +870,8 @@ * He wants to go down a level */ -d_level() +void +d_level(void) { bool no_phase=FALSE; char position = winat(hero.y, hero.x); @@ -962,7 +972,8 @@ * He wants to go up a level */ -u_level() +void +u_level(void) { bool no_phase = FALSE; register struct linked_list *item; @@ -1053,7 +1064,8 @@ * Let him escape for a while */ -shell() +void +shell(void) { /* * Set the terminal back to original mode @@ -1079,7 +1091,8 @@ /* * see what we want to name -- an item or a monster. */ -nameit() +void +nameit(void) { char answer; @@ -1103,9 +1116,8 @@ * allow a user to call a potion, scroll, or ring something */ -nameitem(item, mark) -struct linked_list *item; -bool mark; +void +nameitem(struct linked_list *item, bool mark) { register struct object *obj; register char **guess = NULL, *elsewise = NULL; @@ -1191,7 +1203,8 @@ /* Name a monster */ -namemonst() +void +namemonst(void) { register struct thing *tp; struct linked_list *item; @@ -1236,7 +1249,8 @@ msg("There is no monster there to name."); } -count_gold() +void +count_gold(void) { if (player.t_action != C_COUNT) { msg("You take a break to count your money.. "); @@ -1259,7 +1273,8 @@ * Teleport somewhere, anywhere... */ -do_teleport() +void +do_teleport(void) { int tlev; prbuf[0] = '\0';