Mercurial > hg > early-roguelike
comparison arogue5/weapons.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 | 28e22fb35989 |
comparison
equal
deleted
inserted
replaced
217:94a0d9dd5ce1 | 218:56e748983fa8 |
---|---|
21 | 21 |
22 /* | 22 /* |
23 * do the actual motion on the screen done by an object traveling | 23 * do the actual motion on the screen done by an object traveling |
24 * across the room | 24 * across the room |
25 */ | 25 */ |
26 do_motion(obj, ydelta, xdelta, tp) | 26 void |
27 register struct object *obj; | 27 do_motion(struct object *obj, int ydelta, int xdelta, struct thing *tp) |
28 register int ydelta, xdelta; | |
29 register struct thing *tp; | |
30 { | 28 { |
31 | 29 |
32 /* | 30 /* |
33 * Come fly with us ... | 31 * Come fly with us ... |
34 */ | 32 */ |
68 /* | 66 /* |
69 * fall: | 67 * fall: |
70 * Drop an item someplace around here. | 68 * Drop an item someplace around here. |
71 */ | 69 */ |
72 | 70 |
73 fall(item, pr) | 71 void |
74 register struct linked_list *item; | 72 fall(struct linked_list *item, bool pr) |
75 bool pr; | |
76 { | 73 { |
77 register struct object *obj; | 74 register struct object *obj; |
78 register struct room *rp; | 75 register struct room *rp; |
79 register int i; | 76 register int i; |
80 coord *fpos = NULL; | 77 coord *fpos = NULL; |
114 | 111 |
115 /* | 112 /* |
116 * Does the missile hit the monster | 113 * Does the missile hit the monster |
117 */ | 114 */ |
118 | 115 |
119 hit_monster(y, x, obj, tp) | 116 bool |
120 register int y, x; | 117 hit_monster(int y, int x, struct object *obj, struct thing *tp) |
121 struct object *obj; | |
122 register struct thing *tp; | |
123 { | 118 { |
124 static coord mp; | 119 static coord mp; |
125 | 120 |
126 mp.y = y; | 121 mp.y = y; |
127 mp.x = x; | 122 mp.x = x; |
142 /* | 137 /* |
143 * init_weapon: | 138 * init_weapon: |
144 * Set up the initial goodies for a weapon | 139 * Set up the initial goodies for a weapon |
145 */ | 140 */ |
146 | 141 |
147 init_weapon(weap, type) | 142 void |
148 register struct object *weap; | 143 init_weapon(struct object *weap, char type) |
149 char type; | |
150 { | 144 { |
151 register struct init_weps *iwp; | 145 register struct init_weps *iwp; |
152 | 146 |
153 iwp = &weaps[type]; | 147 iwp = &weaps[type]; |
154 strcpy(weap->o_damage,iwp->w_dam); | 148 strcpy(weap->o_damage,iwp->w_dam); |
167 /* | 161 /* |
168 * missile: | 162 * missile: |
169 * Fire a missile in a given direction | 163 * Fire a missile in a given direction |
170 */ | 164 */ |
171 | 165 |
172 missile(ydelta, xdelta, item, tp) | 166 void |
173 int ydelta, xdelta; | 167 missile(int ydelta, int xdelta, struct linked_list *item, struct thing *tp) |
174 register struct linked_list *item; | |
175 register struct thing *tp; | |
176 { | 168 { |
177 register struct object *obj; | 169 register struct object *obj; |
178 register struct linked_list *nitem; | 170 register struct linked_list *nitem; |
179 char ch; | 171 char ch; |
180 | 172 |
245 * num: | 237 * num: |
246 * Figure out the plus number for armor/weapons | 238 * Figure out the plus number for armor/weapons |
247 */ | 239 */ |
248 | 240 |
249 char * | 241 char * |
250 num(n1, n2) | 242 num(int n1, int n2) |
251 register int n1, n2; | |
252 { | 243 { |
253 static char numbuf[LINELEN]; | 244 static char numbuf[LINELEN]; |
254 | 245 |
255 if (n1 == 0 && n2 == 0) { | 246 if (n1 == 0 && n2 == 0) { |
256 return "+0"; | 247 return "+0"; |
266 /* | 257 /* |
267 * wield: | 258 * wield: |
268 * Pull out a certain weapon | 259 * Pull out a certain weapon |
269 */ | 260 */ |
270 | 261 |
271 wield() | 262 void |
263 wield(void) | |
272 { | 264 { |
273 register struct linked_list *item; | 265 register struct linked_list *item; |
274 register struct object *obj, *oweapon; | 266 register struct object *obj, *oweapon; |
275 | 267 |
276 if ((oweapon = cur_weapon) != NULL) { | 268 if ((oweapon = cur_weapon) != NULL) { |