comparison xrogue/scrolls.c @ 220:f54901b9c39b

XRogue: convert to ANSI-style function declarations.
author John "Elwin" Edwards
date Wed, 02 Mar 2016 21:13:26 -0500
parents 0298a68cc179
children e52a8a7ad4c5
comparison
equal deleted inserted replaced
219:f9ef86cf22b2 220:f54901b9c39b
15 15
16 See the file LICENSE.TXT for full copyright and licensing information. 16 See the file LICENSE.TXT for full copyright and licensing information.
17 */ 17 */
18 18
19 #include <stdlib.h> 19 #include <stdlib.h>
20 #include <string.h>
20 #include <curses.h> 21 #include <curses.h>
21 #include <ctype.h> 22 #include <ctype.h>
22 #include "rogue.h" 23 #include "rogue.h"
23 24
24 /* 25 /*
25 * let the hero get rid of some type of monster 26 * let the hero get rid of some type of monster
26 */ 27 */
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 /* cannot genocide any uniques */ 35 /* cannot genocide any uniques */
54 monsters[which_monst].m_wander = FALSE; 56 monsters[which_monst].m_wander = FALSE;
55 mpos = 0; 57 mpos = 0;
56 msg("You have wiped out the %s.", monsters[which_monst].m_name); 58 msg("You have wiped out the %s.", monsters[which_monst].m_name);
57 } 59 }
58 60
59 read_scroll(which, flag, is_scroll) 61 void
60 register int which; 62 read_scroll(int which, int flag, bool is_scroll)
61 int flag;
62 bool is_scroll;
63 { 63 {
64 register struct object *obj = NULL, *nobj; 64 register struct object *obj = NULL, *nobj;
65 register struct linked_list *item, *nitem; 65 register struct linked_list *item, *nitem;
66 register int i,j; 66 register int i,j;
67 register unsigned char ch, nch; 67 register unsigned char ch, nch;
497 for (nitem = pack; nitem != NULL; nitem = next(nitem)) { 497 for (nitem = pack; nitem != NULL; nitem = next(nitem)) {
498 nobj = OBJPTR(nitem); 498 nobj = OBJPTR(nitem);
499 nobj->o_flags &= ~ISCURSED; 499 nobj->o_flags &= ~ISCURSED;
500 } 500 }
501 msg("Your pack glistens brightly!"); 501 msg("Your pack glistens brightly!");
502 do_panic(NULL); /* this startles them */ 502 do_panic(0); /* this startles them */
503 /* return; leaks item, go through end of function */ 503 /* return; leaks item, go through end of function */
504 } 504 }
505 else { 505 else {
506 nitem = get_item(pack, "remove the curse on",ALL,FALSE,FALSE); 506 nitem = get_item(pack, "remove the curse on",ALL,FALSE,FALSE);
507 if (nitem != NULL) { 507 if (nitem != NULL) {