comparison arogue7/scrolls.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 1cd604c827a3
children e52a8a7ad4c5
comparison
equal deleted inserted replaced
218:56e748983fa8 219:f9ef86cf22b2
18 */ 18 */
19 19
20 #include "curses.h" 20 #include "curses.h"
21 #include <stdlib.h> 21 #include <stdlib.h>
22 #include <ctype.h> 22 #include <ctype.h>
23 #include <string.h>
23 #include "rogue.h" 24 #include "rogue.h"
24 25
25 /* 26 /*
26 * let the hero get rid of some type of monster (but not a UNIQUE!) 27 * let the hero get rid of some type of monster (but not a UNIQUE!)
27 */ 28 */
28 genocide() 29 void
30 genocide(void)
29 { 31 {
30 register struct linked_list *ip; 32 register struct linked_list *ip;
31 register struct thing *mp; 33 register struct thing *mp;
32 register struct linked_list *nip; 34 register struct linked_list *nip;
33 register int num_monst = NUMMONST-NUMUNIQUE-1, /* cannot genocide uniques */ 35 register int num_monst = NUMMONST-NUMUNIQUE-1, /* cannot genocide uniques */
55 monsters[which_monst].m_wander = FALSE; 57 monsters[which_monst].m_wander = FALSE;
56 mpos = 0; 58 mpos = 0;
57 msg("You have wiped out the %s.", monsters[which_monst].m_name); 59 msg("You have wiped out the %s.", monsters[which_monst].m_name);
58 } 60 }
59 61
60 read_scroll(which, flag, is_scroll) 62 void
61 register int which; 63 read_scroll(int which, int flag, bool is_scroll)
62 int flag;
63 bool is_scroll;
64 { 64 {
65 register struct object *obj = NULL, *nobj; 65 register struct object *obj = NULL, *nobj;
66 register struct linked_list *item, *nitem; 66 register struct linked_list *item, *nitem;
67 register int i,j; 67 register int i,j;
68 register char ch, nch; 68 register char ch, nch;