Mercurial > hg > early-roguelike
diff xrogue/rogue.h @ 134:cfa9d1609b78
xrogue: fix definition of struct delayed_action.
Arrays of struct delayed_action were declared before the definition.
Also, daemon.c and state.c defined it differently. The state.c
definition, in which d_arg is a union, is now used everywhere.
This is the least bad option, but fuses and daemons are still a
disheartening morass that undoubtedly shelters more bugs.
author | John "Elwin" Edwards |
---|---|
date | Tue, 21 Apr 2015 10:11:02 -0400 |
parents | e6179860cb76 |
children | 1fbdefa82533 |
line wrap: on
line diff
--- a/xrogue/rogue.h Tue Apr 21 08:55:20 2015 -0400 +++ b/xrogue/rogue.h Tue Apr 21 10:11:02 2015 -0400 @@ -927,6 +927,16 @@ #define MAXDAEMONS 10 #define MAXFUSES 20 +struct delayed_action { + int d_type; + int (*d_func)(); + union { + VOID *vp; + int i; + } d_arg; + int d_time; +}; + extern struct delayed_action d_list[MAXDAEMONS]; extern struct delayed_action f_list[MAXFUSES]; extern int demoncnt; /* number of active daemons */