comparison arogue7/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 f9ef86cf22b2
children e1cd27c5464f
comparison
equal deleted inserted replaced
227:696277507a2e 228:b67b99f6c92b
1111 short s_cost; /* cost of writing it */ 1111 short s_cost; /* cost of writing it */
1112 }; 1112 };
1113 1113
1114 struct delayed_action { 1114 struct delayed_action {
1115 int d_type; 1115 int d_type;
1116 int (*d_func)(); 1116 void (*d_func)();
1117 union { 1117 union {
1118 int arg; 1118 int arg;
1119 void *varg; 1119 void *varg;
1120 } d_; 1120 } d_;
1121 int d_time; 1121 int d_time;
1210 bool thrown, bool see_att, bool see_def); 1210 bool thrown, bool see_att, bool see_def);
1211 int encread(char *start, unsigned int size, int inf); 1211 int encread(char *start, unsigned int size, int inf);
1212 int encwrite(char *start, unsigned int size, int outf); 1212 int encwrite(char *start, unsigned int size, int outf);
1213 void endmsg(void); 1213 void endmsg(void);
1214 void explode(struct thing *tp); 1214 void explode(struct thing *tp);
1215 void extinguish(int (*func)()); 1215 void extinguish(void (*func)());
1216 void fall(struct linked_list *item, bool pr); 1216 void fall(struct linked_list *item, bool pr);
1217 coord *fallpos(coord *pos, bool be_clear, int range); 1217 coord *fallpos(coord *pos, bool be_clear, int range);
1218 void fatal(char *s); 1218 void fatal(char *s);
1219 bool fight(coord *mp, struct object *weap, bool thrown); 1219 bool fight(coord *mp, struct object *weap, bool thrown);
1220 struct linked_list *find_mons(int y, int x); 1220 struct linked_list *find_mons(int y, int x);
1221 struct linked_list *find_obj(int y, int x); 1221 struct linked_list *find_obj(int y, int x);
1222 struct delayed_action *find_slot(int (*func)()); 1222 struct delayed_action *find_slot(void (*func)());
1223 int findmindex(char *name); 1223 int findmindex(char *name);
1224 void fix_stick(struct object *cur); 1224 void fix_stick(struct object *cur);
1225 void fumble(void); 1225 void fumble(void);
1226 void fuse(int (*func)(), int arg, int time, int type); 1226 void fuse(void (*func)(), int arg, int time, int type);
1227 void genmonsters(int least, bool treas); 1227 void genmonsters(int least, bool treas);
1228 coord get_coordinates(void); 1228 coord get_coordinates(void);
1229 bool get_dir(coord *direction); 1229 bool get_dir(coord *direction);
1230 struct linked_list *get_hurl(struct thing *tp); 1230 struct linked_list *get_hurl(struct thing *tp);
1231 struct linked_list *get_item(struct linked_list *list, char *purpose, int type, 1231 struct linked_list *get_item(struct linked_list *list, char *purpose, int type,
1254 bool inventory(struct linked_list *list, int type); 1254 bool inventory(struct linked_list *list, int type);
1255 bool is_current(struct object *obj); 1255 bool is_current(struct object *obj);
1256 bool is_magic(struct object *obj); 1256 bool is_magic(struct object *obj);
1257 bool isatrap(char ch); 1257 bool isatrap(char ch);
1258 int itemweight(struct object *wh); 1258 int itemweight(struct object *wh);
1259 void kill_daemon(int (*func)()); 1259 void kill_daemon(void (*func)());
1260 void killed(struct linked_list *item, bool pr, bool points, bool treasure); 1260 void killed(struct linked_list *item, bool pr, bool points, bool treasure);
1261 void lake_check(coord *place); 1261 void lake_check(coord *place);
1262 void land(void); 1262 void land(void);
1263 void lengthen(int (*func)(), int xtime); 1263 void lengthen(void (*func)(), int xtime);
1264 void light(coord *cp); 1264 void light(coord *cp);
1265 bool lit_room(struct room *rp); 1265 bool lit_room(struct room *rp);
1266 void look(bool wakeup, bool runend); 1266 void look(bool wakeup, bool runend);
1267 void lower_level(short who); 1267 void lower_level(short who);
1268 void m_use_relic(struct thing *monster); 1268 void m_use_relic(struct thing *monster);
1355 void sight(void); 1355 void sight(void);
1356 bool skirmish(struct thing *attacker, coord *mp, struct object *weap, 1356 bool skirmish(struct thing *attacker, coord *mp, struct object *weap,
1357 bool thrown); 1357 bool thrown);
1358 struct linked_list *spec_item(int type, int which, int hit, int damage); 1358 struct linked_list *spec_item(int type, int which, int hit, int damage);
1359 void spell_recovery(void); 1359 void spell_recovery(void);
1360 void start_daemon(int (*func)(), int arg, int type); 1360 void start_daemon(void (*func)(), int arg, int type);
1361 void status(bool display); 1361 void status(bool display);
1362 void steal(void); 1362 void steal(void);
1363 bool step_ok(int y, int x, int can_on_monst, struct thing *flgptr); 1363 bool step_ok(int y, int x, int can_on_monst, struct thing *flgptr);
1364 void stomach(void); 1364 void stomach(void);
1365 int str_compute(void); 1365 int str_compute(void);