comparison srogue/wizard.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 458df24e973d
children e52a8a7ad4c5
comparison
equal deleted inserted replaced
216:b24545357d2e 217:94a0d9dd5ce1
14 * See the file LICENSE.TXT for full copyright and licensing information. 14 * See the file LICENSE.TXT for full copyright and licensing information.
15 */ 15 */
16 16
17 #include <stdlib.h> 17 #include <stdlib.h>
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"
21 22
22 /* 23 /*
23 * whatis: 24 * whatis:
24 * What a certain object is 25 * What a certain object is
25 */ 26 */
26 whatis(what) 27 void
27 struct linked_list *what; 28 whatis(struct linked_list *what)
28 { 29 {
29 reg struct object *obj; 30 reg struct object *obj;
30 reg struct linked_list *item; 31 reg struct linked_list *item;
31 reg int wh; 32 reg int wh;
32 33
72 73
73 /* 74 /*
74 * create_obj: 75 * create_obj:
75 * Create any object for wizard or scroll (almost) 76 * Create any object for wizard or scroll (almost)
76 */ 77 */
77 create_obj(fscr) 78 void
78 bool fscr; 79 create_obj(bool fscr)
79 { 80 {
80 reg struct linked_list *item; 81 reg struct linked_list *item;
81 reg struct object *obj; 82 reg struct object *obj;
82 reg int wh, ch, otype; 83 reg int wh, ch, otype;
83 char newitem, newtype, msz, *oname; 84 char newitem, newtype, msz, *oname;
243 244
244 /* 245 /*
245 * getbless: 246 * getbless:
246 * Get a blessing for a wizards object 247 * Get a blessing for a wizards object
247 */ 248 */
248 getbless() 249 int
250 getbless(void)
249 { 251 {
250 int bless; 252 int bless;
251 253
252 msg("Blessing: "); 254 msg("Blessing: ");
253 prbuf[0] = '\0'; 255 prbuf[0] = '\0';
261 263
262 /* 264 /*
263 * makemons: 265 * makemons:
264 * Make a monster 266 * Make a monster
265 */ 267 */
266 makemons(what) 268 bool
267 int what; 269 makemons(int what)
268 { 270 {
269 reg int x, y, oktomake = FALSE, appear = 1; 271 reg int x, y, oktomake = FALSE, appear = 1;
270 struct coord mp; 272 struct coord mp;
271 273
272 oktomake = FALSE; 274 oktomake = FALSE;
291 293
292 /* 294 /*
293 * telport: 295 * telport:
294 * Bamf the thing someplace else 296 * Bamf the thing someplace else
295 */ 297 */
296 teleport(spot, th) 298 int
297 struct coord spot; 299 teleport(struct coord spot, struct thing *th)
298 struct thing *th;
299 { 300 {
300 reg int rm, y, x; 301 reg int rm, y, x;
301 struct coord oldspot; 302 struct coord oldspot;
302 struct room *rp; 303 struct room *rp;
303 bool ishero; 304 bool ishero;
343 344
344 /* 345 /*
345 * passwd: 346 * passwd:
346 * See if user knows password 347 * See if user knows password
347 */ 348 */
348 passwd() 349 bool
350 passwd(void)
349 { 351 {
350 reg char *sp, c; 352 reg char *sp, c;
351 bool passok; 353 bool passok;
352 char buf[LINLEN], *xcrypt(); 354 char buf[LINLEN], *xcrypt();
353 355