typedef void FDECL((*timeout_proc), (ANY_P *, long));
/* kind of timer */
-#define TIMER_LEVEL 0 /* event specific to level */
-#define TIMER_GLOBAL 1 /* event follows current play */
-#define TIMER_OBJECT 2 /* event follows a object */
-#define TIMER_MONSTER 3 /* event follows a monster */
+enum timer_type {
+ TIMER_LEVEL = 0, /* event specific to level */
+ TIMER_GLOBAL, /* event follows current play */
+ TIMER_OBJECT, /* event follows a object */
+ TIMER_MONSTER /* event follows a monster */
+};
/* save/restore timer ranges */
#define RANGE_LEVEL 0 /* save/restore timers staying on level */
* Timeout functions. Add a define here, then put it in the table
* in timeout.c. "One more level of indirection will fix everything."
*/
-#define ROT_ORGANIC 0 /* for buried organics */
-#define ROT_CORPSE 1
-#define REVIVE_MON 2
-#define BURN_OBJECT 3
-#define HATCH_EGG 4
-#define FIG_TRANSFORM 5
-#define MELT_ICE_AWAY 6
-#define NUM_TIME_FUNCS 7
+enum timeout_types {
+ ROT_ORGANIC = 0, /* for buried organics */
+ ROT_CORPSE,
+ REVIVE_MON,
+ BURN_OBJECT,
+ HATCH_EGG,
+ FIG_TRANSFORM,
+ MELT_ICE_AWAY,
+
+ NUM_TIME_FUNCS
+};
/* used in timeout.c */
typedef struct fe {