aboutsummaryrefslogtreecommitdiff
path: root/hack/def.trap.h
blob: 2d25ec174c936bfe818e5fbbb6dc949389cedbdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* def.trap.h - version 1.0.2 */
/* $DragonFly: src/games/hack/def.trap.h,v 1.2 2006/08/21 19:45:32 pavalos Exp $ */

struct trap {
	struct trap *ntrap;
	xchar tx, ty;
	unsigned ttyp:5;
	unsigned tseen:1;
	unsigned once:1;
};

extern struct trap *ftrap;
#define	newtrap()	alloc(sizeof(struct trap))

/* various kinds of traps */
#define	BEAR_TRAP	0
#define	ARROW_TRAP	1
#define	DART_TRAP	2
#define	TRAPDOOR	3
#define	TELEP_TRAP	4
#define	PIT		5
#define	SLP_GAS_TRAP	6
#define	PIERC		7
#define	MIMIC		8	/* used only in mklev.c */
#define	TRAPNUM		9	/* if not less than 32, change sizeof(ttyp) */
				/* see also mtrapseen (bit map) */