Mercurial > hg > early-roguelike
comparison arogue5/sticks.c @ 218:56e748983fa8
Advanced Rogue 5: convert to ANSI function declarations.
This still leaves over a thousand lines of warning messages, mostly
related to the return types of daemons and fuses.
| author | John "Elwin" Edwards |
|---|---|
| date | Sun, 07 Feb 2016 14:39:21 -0500 |
| parents | c49f7927b0fa |
| children | e52a8a7ad4c5 |
comparison
equal
deleted
inserted
replaced
| 217:94a0d9dd5ce1 | 218:56e748983fa8 |
|---|---|
| 16 #include "curses.h" | 16 #include "curses.h" |
| 17 #include <ctype.h> | 17 #include <ctype.h> |
| 18 #include <string.h> | 18 #include <string.h> |
| 19 #include "rogue.h" | 19 #include "rogue.h" |
| 20 | 20 |
| 21 void drain(int ymin, int ymax, int xmin, int xmax); | |
| 21 | 22 |
| 22 /* | 23 /* |
| 23 * zap a stick and see what happens | 24 * zap a stick and see what happens |
| 24 */ | 25 */ |
| 25 do_zap(gotdir, which, flag) | 26 bool |
| 26 bool gotdir; | 27 do_zap(bool gotdir, int which, int flag) |
| 27 int which; | |
| 28 int flag; | |
| 29 { | 28 { |
| 30 register struct linked_list *item; | 29 register struct linked_list *item; |
| 31 register struct object *obj = NULL; | 30 register struct object *obj = NULL; |
| 32 register struct thing *tp; | 31 register struct thing *tp; |
| 33 register int y, x; | 32 register int y, x; |
| 681 /* | 680 /* |
| 682 * drain: | 681 * drain: |
| 683 * Do drain hit points from player shtick | 682 * Do drain hit points from player shtick |
| 684 */ | 683 */ |
| 685 | 684 |
| 686 drain(ymin, ymax, xmin, xmax) | 685 void |
| 687 int ymin, ymax, xmin, xmax; | 686 drain(int ymin, int ymax, int xmin, int xmax) |
| 688 { | 687 { |
| 689 register int i, j, count; | 688 register int i, j, count; |
| 690 register struct thing *ick; | 689 register struct thing *ick; |
| 691 register struct linked_list *item; | 690 register struct linked_list *item; |
| 692 | 691 |
| 743 } | 742 } |
| 744 | 743 |
| 745 /* | 744 /* |
| 746 * initialize a stick | 745 * initialize a stick |
| 747 */ | 746 */ |
| 748 fix_stick(cur) | 747 void |
| 749 register struct object *cur; | 748 fix_stick(struct object *cur) |
| 750 { | 749 { |
| 751 if (EQUAL(ws_type[cur->o_which], "staff")) { | 750 if (EQUAL(ws_type[cur->o_which], "staff")) { |
| 752 cur->o_weight = 100; | 751 cur->o_weight = 100; |
| 753 cur->o_charges = 5 + rnd(10); | 752 cur->o_charges = 5 + rnd(10); |
| 754 strcpy(cur->o_damage,"2d3"); | 753 strcpy(cur->o_damage,"2d3"); |
| 785 /* | 784 /* |
| 786 * shoot_bolt fires a bolt from the given starting point in the | 785 * shoot_bolt fires a bolt from the given starting point in the |
| 787 * given direction | 786 * given direction |
| 788 */ | 787 */ |
| 789 | 788 |
| 790 shoot_bolt(shooter, start, dir, get_points, reason, name, damage) | 789 bool |
| 791 struct thing *shooter; | 790 shoot_bolt(struct thing *shooter, coord start, coord dir, bool get_points, |
| 792 coord start, dir; | 791 short reason, char *name, int damage) |
| 793 bool get_points; | |
| 794 short reason; | |
| 795 char *name; | |
| 796 int damage; | |
| 797 { | 792 { |
| 798 register char dirch = 0, ch; | 793 register char dirch = 0, ch; |
| 799 register bool used, change; | 794 register bool used, change; |
| 800 register short y, x, bounces; | 795 register short y, x, bounces; |
| 801 bool mdead = FALSE; | 796 bool mdead = FALSE; |
