Mercurial > hg > early-roguelike
comparison arogue5/rogue.h @ 228:b67b99f6c92b
Daemons and fuses now return void.
Functions for starting and stopping daemons and fuses now expect the
type 'void (*func)()'. Only a few functions in XRogue needed to be
modified to fit. Determining the type of the argument is left for a
later date.
Building with GCC5 should now produce less than 200 lines of warnings
per game.
author | John "Elwin" Edwards |
---|---|
date | Sat, 05 Mar 2016 20:49:37 -0500 |
parents | 56e748983fa8 |
children | c10fe421b8fb |
comparison
equal
deleted
inserted
replaced
227:696277507a2e | 228:b67b99f6c92b |
---|---|
722 * Now we define the structures and types | 722 * Now we define the structures and types |
723 */ | 723 */ |
724 | 724 |
725 struct delayed_action { | 725 struct delayed_action { |
726 int d_type; | 726 int d_type; |
727 int (*d_func)(); | 727 void (*d_func)(); |
728 void *d_arg; | 728 void *d_arg; |
729 int d_time; | 729 int d_time; |
730 }; | 730 }; |
731 | 731 |
732 /* | 732 /* |
1011 void eat(void); | 1011 void eat(void); |
1012 int encread(char *start, unsigned int size, int inf); | 1012 int encread(char *start, unsigned int size, int inf); |
1013 int encwrite(char *start, unsigned int size, FILE *outf); | 1013 int encwrite(char *start, unsigned int size, FILE *outf); |
1014 void endit(int sig); | 1014 void endit(int sig); |
1015 void endmsg(void); | 1015 void endmsg(void); |
1016 void extinguish(int (*func)()); | 1016 void extinguish(void (*func)()); |
1017 void fall(struct linked_list *item, bool pr); | 1017 void fall(struct linked_list *item, bool pr); |
1018 coord *fallpos(coord *pos, bool be_clear, int range); | 1018 coord *fallpos(coord *pos, bool be_clear, int range); |
1019 void fatal(char *s); | 1019 void fatal(char *s); |
1020 bool fight(coord *mp, struct object *weap, bool thrown); | 1020 bool fight(coord *mp, struct object *weap, bool thrown); |
1021 struct linked_list *find_mons(int y, int x); | 1021 struct linked_list *find_mons(int y, int x); |
1022 struct linked_list *find_obj(int y, int x); | 1022 struct linked_list *find_obj(int y, int x); |
1023 struct delayed_action *find_slot(int (*func)()); | 1023 struct delayed_action *find_slot(void (*func)()); |
1024 void fix_stick(struct object *cur); | 1024 void fix_stick(struct object *cur); |
1025 void fumble(void); | 1025 void fumble(void); |
1026 void fuse(int (*func)(), void *arg, int time, int type); | 1026 void fuse(void (*func)(), void *arg, int time, int type); |
1027 void genmonsters(int least, bool treas); | 1027 void genmonsters(int least, bool treas); |
1028 bool get_dir(void); | 1028 bool get_dir(void); |
1029 struct linked_list *get_item(struct linked_list *list, char *purpose, int type); | 1029 struct linked_list *get_item(struct linked_list *list, char *purpose, int type); |
1030 int get_str(char *opt, WINDOW *win); | 1030 int get_str(char *opt, WINDOW *win); |
1031 int get_worth(struct object *obj); | 1031 int get_worth(struct object *obj); |
1051 bool inventory(struct linked_list *list, int type); | 1051 bool inventory(struct linked_list *list, int type); |
1052 bool is_current(struct object *obj); | 1052 bool is_current(struct object *obj); |
1053 bool is_magic(struct object *obj); | 1053 bool is_magic(struct object *obj); |
1054 bool isatrap(char ch); | 1054 bool isatrap(char ch); |
1055 int itemweight(struct object *wh); | 1055 int itemweight(struct object *wh); |
1056 void kill_daemon(int (*func)()); | 1056 void kill_daemon(void (*func)()); |
1057 void killed(struct linked_list *item, bool pr, bool points); | 1057 void killed(struct linked_list *item, bool pr, bool points); |
1058 void lake_check(coord *place); | 1058 void lake_check(coord *place); |
1059 void land(void); | 1059 void land(void); |
1060 void lengthen(int (*func)(), int xtime); | 1060 void lengthen(void (*func)(), int xtime); |
1061 void light(coord *cp); | 1061 void light(coord *cp); |
1062 bool lit_room(struct room *rp); | 1062 bool lit_room(struct room *rp); |
1063 void look(bool wakeup, bool runend); | 1063 void look(bool wakeup, bool runend); |
1064 void lower_level(short who); | 1064 void lower_level(short who); |
1065 bool m_use_item(struct thing *monster, coord *monst_pos, coord *defend_pos); | 1065 bool m_use_item(struct thing *monster, coord *monst_pos, coord *defend_pos); |
1131 bool get_points, short reason, char *name, int damage); | 1131 bool get_points, short reason, char *name, int damage); |
1132 bool shoot_ok(char ch); | 1132 bool shoot_ok(char ch); |
1133 char show(int y, int x); | 1133 char show(int y, int x); |
1134 void sight(void); | 1134 void sight(void); |
1135 struct linked_list *spec_item(int type, int which, int hit, int damage); | 1135 struct linked_list *spec_item(int type, int which, int hit, int damage); |
1136 void start_daemon(int (*func)(), void *arg, int type); | 1136 void start_daemon(void (*func)(), void *arg, int type); |
1137 void status(bool display); | 1137 void status(bool display); |
1138 void steal(void); | 1138 void steal(void); |
1139 bool step_ok(int y, int x, int can_on_monst, struct thing *flgptr); | 1139 bool step_ok(int y, int x, int can_on_monst, struct thing *flgptr); |
1140 void stomach(void); | 1140 void stomach(void); |
1141 int str_compute(void); | 1141 int str_compute(void); |