comparison rogue4/rogue.h @ 215:1b73a8641b37

rogue4: fix most GCC5 warnings. Converting all function definitions to ANSI style accounts for most of the change. This has exposed other problems, such as daemons not actually being their stated type, that will require more careful solutions.
author John "Elwin" Edwards
date Wed, 27 Jan 2016 19:41:05 -0500
parents ec9db3bb6b0b
children 696277507a2e
comparison
equal deleted inserted replaced
214:e5a15b09ce1d 215:1b73a8641b37
105 #define AMULET ',' 105 #define AMULET ','
106 #define RING '=' 106 #define RING '='
107 #define STICK '/' 107 #define STICK '/'
108 #define CALLABLE -1 108 #define CALLABLE -1
109 109
110 int spread(int nm);
110 /* 111 /*
111 * Various constants 112 * Various constants
112 */ 113 */
113 #define PASSWD "mTuZ7WUV9RWkQ" 114 #define PASSWD "mTuZ7WUV9RWkQ"
114 #define BEARTIME spread(3) 115 #define BEARTIME spread(3)
475 coord *find_dest(), *rndmove(); 476 coord *find_dest(), *rndmove();
476 477
477 THING *find_mons(), *find_obj(), *get_item(), *new_item(), 478 THING *find_mons(), *find_obj(), *get_item(), *new_item(),
478 *new_thing(), *wake_monster(); 479 *new_thing(), *wake_monster();
479 480
480 struct room *roomin(); 481 struct room *roomin(coord *cp);
482
483 void _attach(THING **list, THING *item);
484 void _detach(THING **list, THING *item);
485 void _free_list(THING **ptr);
486 bool add_haste(bool potion);
487 void add_pack(THING *obj, bool silent);
488 void add_str(str_t *sp, int amt);
489 void addmsg(char *fmt, ...);
490 void aggravate(void);
491 int attack(THING *mp);
492 void auto_save(int sig);
493 void call_it(bool know, char **guess);
494 bool cansee(int y, int x);
495 char *charge_str(THING *obj);
496 void check_level(void);
497 void chg_str(int amt);
498 void command(void);
499 void death(char monst);
500 bool diag_ok(coord *sp, coord *ep);
501 void discard(THING *item);
502 void discovered(void);
503 void do_daemons(int flag);
504 void do_fuses(int flag);
505 void do_motion(THING *obj, int ydelta, int xdelta);
506 void do_move(int dy, int dx);
507 void do_passages(void);
508 void do_rooms(void);
509 void do_run(char ch);
510 void do_zap(void);
511 void doctor(void);
512 void door_open(struct room *rp);
513 void drop(void);
514 bool dropcheck(THING *op);
515 void eat(void);
516 int encread(void *starta, int size, int inf);
517 void encwrite(void *starta, int size, FILE *outf);
518 void endmsg(void);
519 void enter_room(coord *cp);
520 void extinguish(int (*func)());
521 void fall(THING *obj, bool pr);
522 bool fallpos(coord *pos, coord *newpos, bool pass);
523 void fatal(char *s);
524 bool fight(coord *mp, char mn, THING *weap, bool thrown);
525 THING *find_obj(int y, int x);
526 void fire_bolt(coord *start, coord *dir, char *name);
527 void fix_stick(THING *cur);
528 void flush_type(void);
529 void fuse(int (*func)(), int arg, int time, int type);
530 void genocide(void);
531 bool get_dir(void);
532 THING *get_item(char *purpose, int type);
533 int get_str(char *opt, WINDOW *win);
534 void give_pack(THING *tp);
535 bool hit_monster(int y, int x, THING *obj);
536 void init_check(void);
537 void init_colors(void);
538 void init_materials(void);
539 void init_names(void);
540 void init_player(void);
541 void init_stones(void);
542 void init_things(void);
543 void init_weapon(THING *weap, char type);
544 char *inv_name(THING *obj, bool drop);
545 bool inventory(THING *list, int type);
546 void invis_on(void);
547 bool is_current(THING *obj);
548 bool is_magic(THING *obj);
549 bool issymlink(char *sp);
550 void kill_daemon(int (*func)());
551 void killed(THING *tp, bool pr);
552 void leave(int sig);
553 void leave_room(coord *cp);
554 void lengthen(int (*func)(), int xtime);
555 bool lock_sc(void);
556 void look(bool wakeup);
557 void missile(int ydelta, int xdelta);
558 void msg(char *fmt, ...);
559 THING *new_item(void);
560 void new_level(void);
561 void new_monster(THING *tp, char type, coord *cp);
562 THING *new_thing(void);
563 void nohaste(void);
564 char *num(int n1, int n2, char type);
565 void open_log(void);
566 void open_score(void);
567 void option(void);
568 char pack_char(THING *obj);
569 void parse_opts(char *str);
570 void pick_up(char ch);
571 void picky_inven(void);
572 void playit(void);
573 void quaff(void);
574 void quit(int a);
575 void raise_level(void);
576 char randmonster(bool wander);
577 void read_scroll(void);
578 int readchar(void);
579 int readcharw(WINDOW *win);
580 void remove_monster(coord *mp, THING *tp, bool waskill);
581 bool restore(char *file, char **envp);
582 int ring_eat(int hand);
583 char *ring_num(THING *obj);
584 void ring_off(void);
585 void ring_on(void);
586 int rnd(int range);
587 void rnd_pos(struct room *rp, coord *cp);
588 int rnd_room(void);
589 coord *rndmove(THING *who);
590 int roll(int number, int sides);
591 void rollwand(void);
592 void runners(void);
593 void runto(coord *runner, coord *spot);
594 bool save(int which);
595 bool save_game(void);
596 bool save_throw(int which, THING *tp);
597 void score(int amount, int flags, char monst);
598 bool see_monst(THING *mp);
599 void setup(void);
600 void shell(void);
601 void show_win(WINDOW *scr, char *message);
602 void sight(void);
603 int sign(int nm);
604 void start_daemon(int (*func)(), int arg, int type);
605 void start_score(void);
606 void status(void);
607 bool step_ok(char ch);
608 void stomach(void);
609 void strucpy(char *s1, char *s2, int len);
610 void swander(void);
611 bool swing(int at_lvl, int op_arm, int wplus);
612 void take_off(void);
613 int teleport(void);
614 void total_winner(void);
615 char *tr_name(char type);
616 bool turn_see(bool turn_off);
617 void unconfuse(void);
618 char *unctrol(char ch);
619 void unlock_sc(void);
620 void unsee(void);
621 char *vowelstr(char *str);
622 char *xcrypt(const char *key, const char *setting);
623 void w_wait_for(WINDOW *win, char ch);
624 void wait_for(char ch);
625 THING *wake_monster(int y, int x);
626 void wanderer(void);
627 void waste_time(void);
628 void wear(void);
629 void whatis(bool insist);
630 void wield(void);
631 void writelog(int amount, int flags, char monst);
481 632
482 #ifdef HAVE_CONFIG_H 633 #ifdef HAVE_CONFIG_H
483 #include "config.h" 634 #include "config.h"
484 #endif 635 #endif
485 #include "extern.h" 636 #include "extern.h"