comparison srogue/armor.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
19 19
20 /* 20 /*
21 * wear: 21 * wear:
22 * The player wants to wear something, so let the hero try 22 * The player wants to wear something, so let the hero try
23 */ 23 */
24 wear() 24 void
25 wear(void)
25 { 26 {
26 reg struct linked_list *item; 27 reg struct linked_list *item;
27 reg struct object *obj; 28 reg struct object *obj;
28 29
29 if (cur_armor != NULL) { 30 if (cur_armor != NULL) {
48 49
49 /* 50 /*
50 * take_off: 51 * take_off:
51 * Get the armor off of the players back 52 * Get the armor off of the players back
52 */ 53 */
53 take_off() 54 void
55 take_off(void)
54 { 56 {
55 reg struct object *obj; 57 reg struct object *obj;
56 58
57 if ((obj = cur_armor) == NULL) { 59 if ((obj = cur_armor) == NULL) {
58 msg("Not wearing any armor."); 60 msg("Not wearing any armor.");
67 69
68 /* 70 /*
69 * initarmor: 71 * initarmor:
70 * Initialize some armor. 72 * Initialize some armor.
71 */ 73 */
72 initarmor(obj, what) 74 void
73 struct object *obj; 75 initarmor(struct object *obj, int what)
74 int what;
75 { 76 {
76 struct init_armor *iwa; 77 struct init_armor *iwa;
77 struct magic_item *mi; 78 struct magic_item *mi;
78 79
79 obj->o_type = ARMOR; 80 obj->o_type = ARMOR;
88 89
89 /* 90 /*
90 * hurt_armor: 91 * hurt_armor:
91 * Returns TRUE if armor is damaged 92 * Returns TRUE if armor is damaged
92 */ 93 */
93 hurt_armor(obj) 94 bool
94 struct object *obj; 95 hurt_armor(struct object *obj)
95 { 96 {
96 reg int type, ac; 97 reg int type, ac;
97 98
98 if (obj != NULL) { 99 if (obj != NULL) {
99 if (o_on(obj, ISPROT) || (o_on(obj, ISBLESS) && rnd(100) < 10)) 100 if (o_on(obj, ISPROT) || (o_on(obj, ISBLESS) && rnd(100) < 10))