1 /* NetHack 3.6 timeout.h $NHDT-Date: 1564269131 2019/07/27 23:12:11 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.12 $ */
2 /* Copyright 1994, Dean Luick */
3 /* NetHack may be freely redistributed. See license for details. */
8 /* generic timeout function */
9 typedef void FDECL((*timeout_proc), (ANY_P *, long));
13 TIMER_LEVEL = 0, /* event specific to level [melting ice] */
14 TIMER_GLOBAL = 1, /* event follows current play [not used] */
15 TIMER_OBJECT = 2, /* event follows an object [various] */
16 TIMER_MONSTER = 3, /* event follows a monster [not used] */
17 NUM_TIMER_KINDS /* 4 */
20 /* save/restore timer ranges */
21 #define RANGE_LEVEL 0 /* save/restore timers staying on level */
22 #define RANGE_GLOBAL 1 /* save/restore timers following global play */
25 * Timeout functions. Add a define here, then put it in the table
26 * in timeout.c. "One more level of indirection will fix everything."
29 ROT_ORGANIC = 0, /* for buried organics */
40 /* used in timeout.c */
42 struct fe *next; /* next item in chain */
43 long timeout; /* when we time out */
44 unsigned long tid; /* timer ID */
45 short kind; /* kind of use */
46 short func_index; /* what to call when we time out */
47 anything arg; /* pointer to timeout argument */
48 Bitfield(needs_fixup, 1); /* does arg need to be patched? */
51 #endif /* TIMEOUT_H */