1/* SCCS Id: @(#)dgn_file.h 3.4 1993/01/17 */ 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 16struct couple { 17 short base, rand; 18}; 19 20struct tmpdungeon { 21 char name[24], 22 protoname[24]; 23 struct couple lev; 24 int flags, 25 chance, 26 levels, 27 branches, 28 entry_lev; /* entry level for this dungeon */ 29 char boneschar; 30}; 31 32struct tmplevel { 33 char name[24]; 34 struct couple lev; 35 int chance, rndlevs, chain, flags; 36 char boneschar; 37}; 38 39struct tmpbranch { 40 char name[24]; /* destination dungeon name */ 41 struct couple lev; 42 int chain; /* index into tmplevel array (chained branch)*/ 43 int type; /* branch type (see below) */ 44 int up; /* branch is up or down */ 45}; 46 47/* 48 * Values for type for tmpbranch structure. 49 */ 50#define TBR_STAIR 0 /* connection with both ends having a staircase */ 51#define TBR_NO_UP 1 /* connection with no up staircase */ 52#define TBR_NO_DOWN 2 /* connection with no down staircase */ 53#define TBR_PORTAL 3 /* portal connection */ 54 55/* 56 * Flags that map into the dungeon flags bitfields. 57 */ 58#define TOWN 1 /* levels only */ 59#define HELLISH 2 60#define MAZELIKE 4 61#define ROGUELIKE 8 62 63#define D_ALIGN_NONE 0 64#define D_ALIGN_CHAOTIC (AM_CHAOTIC << 4) 65#define D_ALIGN_NEUTRAL (AM_NEUTRAL << 4) 66#define D_ALIGN_LAWFUL (AM_LAWFUL << 4) 67 68#define D_ALIGN_MASK 0x70 69 70/* 71 * Max number of prototype levels and branches. 72 */ 73#define LEV_LIMIT 50 74#define BRANCH_LIMIT 32 75 76#endif /* DGN_FILE_H */ 77