Source:NetHack 2.2a/trap.h

Below is the full text to trap.h from the source code of NetHack 2.2a. To link to a particular line, write [[NetHack 2.2a/trap.h#line123 ]], for example.

Warning! This is the source code from an old release. For the latest release, see Source code

1.   /*	SCCS Id: @(#)trap.h	1.4	87/08/08 2.   /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3.    /* trap.h - version 1.0.2 */ 4.    5.    struct trap { 6.   	struct trap *ntrap; 7.   	xchar tx,ty; 8.   	Bitfield(ttyp,5); 9.   	Bitfield(tseen,1); 10.  	Bitfield(once,1); 11.  };  12.    13.   extern struct trap *ftrap; 14.  struct trap *t_at; 15.  #define newtrap	(struct trap *) alloc(sizeof(struct trap)) 16.   17.   /* Standard Hack traps. */ 18.   #define NO_TRAP         0 19.  #define BEAR_TRAP       1 20.  #define ARROW_TRAP      2 21.  #define DART_TRAP       3 22.  #define TRAPDOOR        4 23.  #define TELEP_TRAP      5 24.  #define PIT             6 25.  #define SLP_GAS_TRAP    7 26.  #define PIERC           8 27.  #define MIMIC           9 28.   29.   /* Defines below this line are automatically added by makedefs (-t option) */ 30.  /* if you add any additional code below the next line, it will disappear. */ 31.   /* DO NOT REMOVE THIS LINE */ 32.   33.   #define	MGTRP		10 34.  #define	SQBRD		11 35.  #define	WEB		12 36.  #define	SPIKED_PIT	13 37.  #define	LEVEL_TELEP	14 38.  #define	ANTI_MAGIC	15 39.  #define	RUST_TRAP	16 40.  #define	POLY_TRAP	17 41.   42.   #define	TRAPNUM	18