1 // Emacs style mode select -*- C++ -*-
2 //-----------------------------------------------------------------------------
6 // Copyright (C) 1993-1996 by id Software, Inc.
8 // This program is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU General Public License
10 // as published by the Free Software Foundation; either version 2
11 // of the License, or (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
19 // all external data is defined here
20 // most of the data is loaded into different structures at run time
21 // some internal structures shared by many modules are here
23 //-----------------------------------------------------------------------------
28 // The most basic types we use, portability.
31 // Some global defines, that configure the game.
34 #include "rockmacros.h"
38 // The following data structures define the persistent format
39 // used in the lumps of the WAD files.
42 // Lump order in a map WAD: each map needs a couple of lumps
43 // to provide a complete scene geometry description.
45 ML_LABEL
, // A separator, name, ExMx or MAPxx
46 ML_THINGS
, // Monsters, items..
47 ML_LINEDEFS
, // LineDefs, from editing
48 ML_SIDEDEFS
, // SideDefs, from editing
49 ML_VERTEXES
, // Vertices, edited and BSP splits generated
50 ML_SEGS
, // LineSegs, from LineDefs split by BSP
51 ML_SSECTORS
, // SubSectors, list of LineSegs
52 ML_NODES
, // BSP nodes
53 ML_SECTORS
, // Sectors, from editing
54 ML_REJECT
, // LUT, sector-sector visibility
55 ML_BLOCKMAP
// LUT, motion clipping, walls/grid element
61 } PACKEDATTR mapvertex_t
;
63 // A SideDef, defining the visual appearance of a wall,
64 // by setting textures and offsets.
69 char bottomtexture
[8];
71 short sector
; // Front sector, towards viewer.
72 } PACKEDATTR mapsidedef_t
;
74 // A LineDef, as used for editing, and as input to the BSP builder.
82 short sidenum
[2]; // sidenum[1] will be -1 if one sided
83 } PACKEDATTR maplinedef_t
;
87 // LineDef attributes.
90 // Solid, is an obstacle.
93 // Blocks monsters only.
94 #define ML_BLOCKMONSTERS 2
96 // Backside will not be present at all
100 // If a texture is pegged, the texture will have
101 // the end exposed to air held constant at the
102 // top or bottom of the texture (stairs or pulled
103 // down things) and will move with a height change
104 // of one of the neighbor sectors.
105 // Unpegged textures allways have the first row of
106 // the texture at the top pixel of the line for both
107 // top and bottom textures (use next to windows).
109 // upper texture unpegged
110 #define ML_DONTPEGTOP 8
112 // lower texture unpegged
113 #define ML_DONTPEGBOTTOM 16
115 // In AutoMap: don't map as two sided: IT'S A SECRET!
118 // Sound rendering: don't let sound cross two of these.
119 #define ML_SOUNDBLOCK 64
121 // Don't draw on the automap at all.
122 #define ML_DONTDRAW 128
124 // Set if already seen, thus drawn in automap.
125 #define ML_MAPPED 256
127 //jff 3/21/98 Set if line absorbs use by player
128 //allow multiple push/switch triggers to be used on one push
129 #define ML_PASSUSE 512
131 // Sector definition, from editing.
140 } PACKEDATTR mapsector_t
;
142 // SubSector, as generated by BSP.
144 unsigned short numsegs
;
145 unsigned short firstseg
; // Index of first one; segs are stored sequentially.
146 } PACKEDATTR mapsubsector_t
;
148 // LineSeg, generated by splitting LineDefs
149 // using partition lines selected by BSP builder.
157 } PACKEDATTR mapseg_t
;
159 // BSP node structure.
162 #define NF_SUBSECTOR 0x8000
165 short x
; // Partition line from (x,y) to x+dx,y+dy)
169 // Bounding box for each child, clip against view frustum.
171 // If NF_SUBSECTOR its a subsector, else it's a node of another subtree.
172 unsigned short children
[2];
173 } PACKEDATTR mapnode_t
;
175 // Thing definition, position, orientation and type,
176 // plus skill/visibility flags and attributes.
183 } PACKEDATTR mapthing_t
;
187 #endif // __DOOMDATA__