Fandom

Wikihack

Source:SLASH'EM 0.0.7E7F2/timeout.h

2,035pages on
this wiki
Add New Page
Talk0

Below is the full text to timeout.h from the source code of SLASH'EM 0.0.7E7F2. To link to a particular line, write [[SLASH'EM 0.0.7E7F2/timeout.h#line123]], for example.

The latest source code for vanilla NetHack is at Source code.


The NetHack General Public License applies to screenshots, source code and other content from NetHack.
1.    /*	SCCS Id: @(#)timeout.h	3.4	1999/02/13	*/
2.    /* Copyright 1994, Dean Luick					  */
3.    /* NetHack may be freely redistributed.  See license for details. */
4.    
5.    #ifndef TIMEOUT_H
6.    #define TIMEOUT_H
7.    
8.    /* generic timeout function */
9.    typedef void FDECL((*timeout_proc), (genericptr_t, long));
10.   
11.   /* kind of timer */
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 */
16.   
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 */
20.   
21.   /*
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."
24.    */
25.   #define ROT_ORGANIC	0	/* for buried organics */
26.   #define ROT_CORPSE	1
27.   #define MOLDY_CORPSE	2
28.   #define REVIVE_MON	3
29.   #define BURN_OBJECT	4
30.   #define HATCH_EGG	5
31.   #define FIG_TRANSFORM	6
32.   #define UNPOLY_MON      7
33.   # ifdef FIREARMS
34.   #define BOMB_BLOW	8
35.   #  ifdef UNPOLYPILE
36.   #define UNPOLY_OBJ      9
37.   #define NUM_TIME_FUNCS  10
38.   #  else
39.   #define NUM_TIME_FUNCS  9
40.   #  endif
41.   # else /* FIREARMS */
42.   #  ifdef UNPOLYPILE
43.   #define UNPOLY_OBJ      8
44.   #define NUM_TIME_FUNCS  9
45.   #  else
46.   #define NUM_TIME_FUNCS  8
47.   #  endif
48.   # endif /* FIREARMS */
49.   
50.   /* used in timeout.c */
51.   typedef struct fe {
52.       struct fe *next;		/* next item in chain */
53.       long timeout;		/* when we time out */
54.       unsigned long tid;		/* timer ID */
55.       short kind;			/* kind of use */
56.       short func_index;		/* what to call when we time out */
57.       genericptr_t arg;		/* pointer to timeout argument */
58.       Bitfield (needs_fixup,1);	/* does arg need to be patched? */
59.   } timer_element;
60.   
61.   #endif /* TIMEOUT_H */

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.