1 // Emacs style mode select -*- C++ -*-
2 //-----------------------------------------------------------------------------
4 // Copyright(C) 1993-1996 Id Software, Inc.
5 // Copyright(C) 2005 Simon Howard
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License
9 // as published by the Free Software Foundation; either version 2
10 // of the License, or (at your option) any later version.
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
23 // all external data is defined here
24 // most of the data is loaded into different structures at run time
25 // some internal structures shared by many modules are here
27 //-----------------------------------------------------------------------------
32 // The most basic types we use, portability.
35 // Some global defines, that configure the game.
42 // The following data structures define the persistent format
43 // used in the lumps of the WAD files.
46 // Lump order in a map WAD: each map needs a couple of lumps
47 // to provide a complete scene geometry description.
50 ML_LABEL
, // A separator, name, ExMx or MAPxx
51 ML_THINGS
, // Monsters, items..
52 ML_LINEDEFS
, // LineDefs, from editing
53 ML_SIDEDEFS
, // SideDefs, from editing
54 ML_VERTEXES
, // Vertices, edited and BSP splits generated
55 ML_SEGS
, // LineSegs, from LineDefs split by BSP
56 ML_SSECTORS
, // SubSectors, list of LineSegs
57 ML_NODES
, // BSP nodes
58 ML_SECTORS
, // Sectors, from editing
59 ML_REJECT
, // LUT, sector-sector visibility
60 ML_BLOCKMAP
// LUT, motion clipping, walls/grid element
69 } PACKEDATTR mapvertex_t
;
72 // A SideDef, defining the visual appearance of a wall,
73 // by setting textures and offsets.
79 char bottomtexture
[8];
81 // Front sector, towards viewer.
83 } PACKEDATTR mapsidedef_t
;
87 // A LineDef, as used for editing, and as input
88 // to the BSP builder.
96 // sidenum[1] will be -1 if one sided
98 } PACKEDATTR maplinedef_t
;
102 // LineDef attributes.
105 // Solid, is an obstacle.
106 #define ML_BLOCKING 1
108 // Blocks monsters only.
109 #define ML_BLOCKMONSTERS 2
111 // Backside will not be present at all
113 #define ML_TWOSIDED 4
115 // If a texture is pegged, the texture will have
116 // the end exposed to air held constant at the
117 // top or bottom of the texture (stairs or pulled
118 // down things) and will move with a height change
119 // of one of the neighbor sectors.
120 // Unpegged textures allways have the first row of
121 // the texture at the top pixel of the line for both
122 // top and bottom textures (use next to windows).
124 // upper texture unpegged
125 #define ML_DONTPEGTOP 8
127 // lower texture unpegged
128 #define ML_DONTPEGBOTTOM 16
130 // In AutoMap: don't map as two sided: IT'S A SECRET!
133 // Sound rendering: don't let sound cross two of these.
134 #define ML_SOUNDBLOCK 64
136 // Don't draw on the automap at all.
137 #define ML_DONTDRAW 128
139 // Set if already seen, thus drawn in automap.
140 #define ML_MAPPED 256
145 // Sector definition, from editing.
155 } PACKEDATTR mapsector_t
;
157 // SubSector, as generated by BSP.
161 // Index of first one, segs are stored sequentially.
163 } PACKEDATTR mapsubsector_t
;
166 // LineSeg, generated by splitting LineDefs
167 // using partition lines selected by BSP builder.
176 } PACKEDATTR mapseg_t
;
180 // BSP node structure.
183 #define NF_SUBSECTOR 0x8000
187 // Partition line from (x,y) to x+dx,y+dy)
193 // Bounding box for each child,
194 // clip against view frustum.
197 // If NF_SUBSECTOR its a subsector,
198 // else it's a node of another subtree.
199 unsigned short children
[2];
201 } PACKEDATTR mapnode_t
;
206 // Thing definition, position, orientation and type,
207 // plus skill/visibility flags and attributes.
215 } PACKEDATTR mapthing_t
;
221 #endif // __DOOMDATA__