OSDN Git Service

fix #42547
[jnethack/source.git] / include / dgn_file.h
1 /* NetHack 3.6  dgn_file.h      $NHDT-Date: 1432512780 2015/05/25 00:13:00 $  $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ */
2 /* Copyright (c) 1989 by M. Stephenson                            */
3 /* NetHack may be freely redistributed.  See license for details. */
4
5 #ifndef DGN_FILE_H
6 #define DGN_FILE_H
7
8 #ifndef ALIGN_H
9 #include "align.h"
10 #endif
11
12 /*
13  * Structures manipulated by the dungeon loader & compiler
14  */
15
16 struct couple {
17     short base, rand;
18 };
19
20 struct tmpdungeon {
21     char name[24], protoname[24];
22     struct couple lev;
23     int flags, chance, levels, branches,
24         entry_lev; /* entry level for this dungeon */
25     char boneschar;
26 };
27
28 struct tmplevel {
29     char name[24];
30     struct couple lev;
31     int chance, rndlevs, chain, flags;
32     char boneschar;
33 };
34
35 struct tmpbranch {
36     char name[24]; /* destination dungeon name */
37     struct couple lev;
38     int chain; /* index into tmplevel array (chained branch)*/
39     int type;  /* branch type (see below) */
40     int up;    /* branch is up or down */
41 };
42
43 /*
44  *      Values for type for tmpbranch structure.
45  */
46 #define TBR_STAIR 0   /* connection with both ends having a staircase */
47 #define TBR_NO_UP 1   /* connection with no up staircase */
48 #define TBR_NO_DOWN 2 /* connection with no down staircase */
49 #define TBR_PORTAL 3  /* portal connection */
50
51 /*
52  *      Flags that map into the dungeon flags bitfields.
53  */
54 #define TOWN 1 /* levels only */
55 #define HELLISH 2
56 #define MAZELIKE 4
57 #define ROGUELIKE 8
58
59 #define D_ALIGN_NONE 0
60 #define D_ALIGN_CHAOTIC (AM_CHAOTIC << 4)
61 #define D_ALIGN_NEUTRAL (AM_NEUTRAL << 4)
62 #define D_ALIGN_LAWFUL (AM_LAWFUL << 4)
63
64 #define D_ALIGN_MASK 0x70
65
66 /*
67  *      Max number of prototype levels and branches.
68  */
69 #define LEV_LIMIT 50
70 #define BRANCH_LIMIT 32
71
72 #endif /* DGN_FILE_H */