1 /* NetHack 3.6 timeout.h $NHDT-Date: 1432512775 2015/05/25 00:12:55 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ */
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));
12 #define TIMER_LEVEL 0 /* event specific to level */
13 #define TIMER_GLOBAL 1 /* event follows current play */
14 #define TIMER_OBJECT 2 /* event follows a object */
15 #define TIMER_MONSTER 3 /* event follows a monster */
17 /* save/restore timer ranges */
18 #define RANGE_LEVEL 0 /* save/restore timers staying on level */
19 #define RANGE_GLOBAL 1 /* save/restore timers following global play */
22 * Timeout functions. Add a define here, then put it in the table
23 * in timeout.c. "One more level of indirection will fix everything."
25 #define ROT_ORGANIC 0 /* for buried organics */
30 #define FIG_TRANSFORM 5
31 #define MELT_ICE_AWAY 6
32 #define NUM_TIME_FUNCS 7
34 /* used in timeout.c */
36 struct fe *next; /* next item in chain */
37 long timeout; /* when we time out */
38 unsigned long tid; /* timer ID */
39 short kind; /* kind of use */
40 short func_index; /* what to call when we time out */
41 anything arg; /* pointer to timeout argument */
42 Bitfield(needs_fixup, 1); /* does arg need to be patched? */
45 #endif /* TIMEOUT_H */