Mercurial > hg > early-roguelike
comparison rogue4/sticks.c @ 225:4f6e056438eb
Merge the GCC5 and build fix branches.
author | John "Elwin" Edwards |
---|---|
date | Wed, 02 Mar 2016 21:28:34 -0500 |
parents | 1b73a8641b37 |
children | e52a8a7ad4c5 |
comparison
equal
deleted
inserted
replaced
224:4d0f53998e8a | 225:4f6e056438eb |
---|---|
14 #include <curses.h> | 14 #include <curses.h> |
15 #include <ctype.h> | 15 #include <ctype.h> |
16 #include <string.h> | 16 #include <string.h> |
17 #include "rogue.h" | 17 #include "rogue.h" |
18 | 18 |
19 void drain(void); | |
20 | |
19 /* | 21 /* |
20 * fix_stick: | 22 * fix_stick: |
21 * Set up a new stick | 23 * Set up a new stick |
22 */ | 24 */ |
23 fix_stick(cur) | 25 void |
24 register THING *cur; | 26 fix_stick(THING *cur) |
25 { | 27 { |
26 if (strcmp(ws_type[cur->o_which], "staff") == 0) | 28 if (strcmp(ws_type[cur->o_which], "staff") == 0) |
27 strcpy(cur->o_damage,"2d3"); | 29 strcpy(cur->o_damage,"2d3"); |
28 else | 30 else |
29 strcpy(cur->o_damage,"1d1"); | 31 strcpy(cur->o_damage,"1d1"); |
43 | 45 |
44 /* | 46 /* |
45 * do_zap: | 47 * do_zap: |
46 * Perform a zap with a wand | 48 * Perform a zap with a wand |
47 */ | 49 */ |
48 do_zap() | 50 void |
51 do_zap(void) | |
49 { | 52 { |
50 register THING *obj, *tp; | 53 register THING *obj, *tp; |
51 register int y, x; | 54 register int y, x; |
52 register char *name; | 55 register char *name; |
53 | 56 |
270 | 273 |
271 /* | 274 /* |
272 * drain: | 275 * drain: |
273 * Do drain hit points from player shtick | 276 * Do drain hit points from player shtick |
274 */ | 277 */ |
275 drain() | 278 void |
279 drain(void) | |
276 { | 280 { |
277 register THING *mp; | 281 register THING *mp; |
278 register int cnt; | 282 register int cnt; |
279 register struct room *corp; | 283 register struct room *corp; |
280 register THING **dp; | 284 register THING **dp; |
319 | 323 |
320 /* | 324 /* |
321 * fire_bolt: | 325 * fire_bolt: |
322 * Fire a bolt in a given direction from a specific starting place | 326 * Fire a bolt in a given direction from a specific starting place |
323 */ | 327 */ |
324 fire_bolt(start, dir, name) | 328 void |
325 coord *start, *dir; | 329 fire_bolt(coord *start, coord *dir, char *name) |
326 char *name; | |
327 { | 330 { |
328 register char dirch, ch; | 331 register char dirch, ch; |
329 register THING *tp; | 332 register THING *tp; |
330 register bool hit_hero, used, changed; | 333 register bool hit_hero, used, changed; |
331 register int i, j; | 334 register int i, j; |
444 /* | 447 /* |
445 * charge_str: | 448 * charge_str: |
446 * Return an appropriate string for a wand charge | 449 * Return an appropriate string for a wand charge |
447 */ | 450 */ |
448 char * | 451 char * |
449 charge_str(obj) | 452 charge_str(THING *obj) |
450 register THING *obj; | |
451 { | 453 { |
452 static char buf[20]; | 454 static char buf[20]; |
453 | 455 |
454 if (!(obj->o_flags & ISKNOW)) | 456 if (!(obj->o_flags & ISKNOW)) |
455 buf[0] = '\0'; | 457 buf[0] = '\0'; |