comparison srogue/sticks.c @ 217:94a0d9dd5ce1

Super-Rogue: convert to ANSI-style function declarations. This fixes most of the build warnings.
author John "Elwin" Edwards
date Sun, 31 Jan 2016 13:45:07 -0500
parents 2128c7dc8a40
children e52a8a7ad4c5
comparison
equal deleted inserted replaced
216:b24545357d2e 217:94a0d9dd5ce1
14 * 14 *
15 * See the file LICENSE.TXT for full copyright and licensing information. 15 * See the file LICENSE.TXT for full copyright and licensing information.
16 */ 16 */
17 17
18 #include <ctype.h> 18 #include <ctype.h>
19 #include <string.h>
19 #include "rogue.h" 20 #include "rogue.h"
20 #include "rogue.ext" 21 #include "rogue.ext"
22
23 void drain(int ymin, int ymax, int xmin, int xmax);
21 24
22 /* 25 /*
23 * fix_stick: 26 * fix_stick:
24 * Init a stick for the hero 27 * Init a stick for the hero
25 */ 28 */
26 fix_stick(cur) 29 void
27 struct object *cur; 30 fix_stick(struct object *cur)
28 { 31 {
29 struct rod *rd; 32 struct rod *rd;
30 33
31 cur->o_type = STICK; 34 cur->o_type = STICK;
32 cur->o_charges = 4 + rnd(5); 35 cur->o_charges = 4 + rnd(5);
60 63
61 /* 64 /*
62 * do_zap: 65 * do_zap:
63 * Zap a stick at something 66 * Zap a stick at something
64 */ 67 */
65 do_zap(gotdir) 68 void
66 bool gotdir; 69 do_zap(bool gotdir)
67 { 70 {
68 reg struct linked_list *item; 71 reg struct linked_list *item;
69 reg struct object *obj; 72 reg struct object *obj;
70 reg struct thing *tp; 73 reg struct thing *tp;
71 reg int y, x, wh; 74 reg int y, x, wh;
535 538
536 /* 539 /*
537 * drain: 540 * drain:
538 * Do drain hit points from player stick 541 * Do drain hit points from player stick
539 */ 542 */
540 drain(ymin, ymax, xmin, xmax) 543 void
541 int ymin, ymax, xmin, xmax; 544 drain(int ymin, int ymax, int xmin, int xmax)
542 { 545 {
543 reg int i, j, cnt; 546 reg int i, j, cnt;
544 reg struct thing *ick; 547 reg struct thing *ick;
545 reg struct linked_list *item; 548 reg struct linked_list *item;
546 549
578 /* 581 /*
579 * charge_str: 582 * charge_str:
580 * Return number of charges left in a stick 583 * Return number of charges left in a stick
581 */ 584 */
582 char * 585 char *
583 charge_str(obj) 586 charge_str(struct object *obj)
584 struct object *obj;
585 { 587 {
586 static char buf[20]; 588 static char buf[20];
587 589
588 buf[0] = '\0'; 590 buf[0] = '\0';
589 if (o_on(obj,ISKNOW) || o_on(obj,ISPOST)) 591 if (o_on(obj,ISKNOW) || o_on(obj,ISPOST))