File: dgn_file.h

package info (click to toggle)
slashem 0.0.7E7F2-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 23,456 kB
  • ctags: 22,409
  • sloc: ansic: 263,134; cpp: 7,180; yacc: 2,154; sh: 737; lex: 440; makefile: 150; awk: 97; sed: 11
file content (76 lines) | stat: -rw-r--r-- 1,634 bytes parent folder | download | duplicates (10)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*	SCCS Id: @(#)dgn_file.h 3.4	1993/01/17	*/
/* Copyright (c) 1989 by M. Stephenson				  */
/* NetHack may be freely redistributed.  See license for details. */

#ifndef DGN_FILE_H
#define DGN_FILE_H

#ifndef ALIGN_H
#include "align.h"
#endif

/*
 * Structures manipulated by the dungeon loader & compiler
 */

struct	couple {
	short	base, rand;
};

struct tmpdungeon {
	char	name[24],
		protoname[24];
	struct	couple	lev;
	int	flags,
		chance,
		levels,
		branches;
	char	boneschar;
};

struct tmplevel {
	char	name[24];
	struct	couple	lev;
	int	chance, rndlevs, chain, flags;
	char	boneschar;
};

struct tmpbranch {
	char	name[24];	/* destination dungeon name */
	struct	couple	lev;
	int	chain;		/* index into tmplevel array (chained branch)*/
	int	type;		/* branch type (see below) */
	int	up;		/* branch is up or down */
	int	entry_lev;	/* entry level in target dungeon */
};

/*
 *	Values for type for tmpbranch structure.
 */
#define TBR_STAIR   0	/* connection with both ends having a staircase */
#define TBR_NO_UP   1	/* connection with no up staircase */
#define TBR_NO_DOWN 2	/* connection with no down staircase */
#define TBR_PORTAL  3	/* portal connection */

/*
 *	Flags that map into the dungeon flags bitfields.
 */
#define TOWN		  1	/* levels only */
#define HELLISH		  2
#define MAZELIKE	  4
#define ROGUELIKE	  8

#define D_ALIGN_NONE	0
#define D_ALIGN_CHAOTIC	(AM_CHAOTIC << 4)
#define D_ALIGN_NEUTRAL	(AM_NEUTRAL << 4)
#define D_ALIGN_LAWFUL	(AM_LAWFUL << 4)

#define D_ALIGN_MASK	0x70

/*
 *	Max number of prototype levels and branches.
 */
#define LEV_LIMIT	99
#define BRANCH_LIMIT	32

#endif /* DGN_FILE_H */