2 //**************************************************************************
4 //** xddefs.h : Heretic 2 : Raven Software, Corp.
11 //**************************************************************************
18 #if defined(__cplusplus)
21 typedef enum {false, true} boolean;
23 typedef unsigned char byte;
26 //--------------------------------------------------------------------------
30 //--------------------------------------------------------------------------
32 // lump order in a map wad
60 char bottomtexture[8];
62 short sector; // on viewer's side
76 short sidenum[2]; // sidenum[1] will be -1 if one sided
79 #define ML_BLOCKING 0x0001
80 #define ML_BLOCKMONSTERS 0x0002
81 #define ML_TWOSIDED 0x0004
82 #define ML_DONTPEGTOP 0x0008
83 #define ML_DONTPEGBOTTOM 0x0010
84 #define ML_SECRET 0x0020 // don't map as two sided: IT'S A SECRET!
85 #define ML_SOUNDBLOCK 0x0040 // don't let sound cross two of these
86 #define ML_DONTDRAW 0x0080 // don't draw on the automap
87 #define ML_MAPPED 0x0100 // set if already drawn in automap
88 #define ML_REPEAT_SPECIAL 0x0200 // special is repeatable
89 #define ML_SPAC_SHIFT 10
90 #define ML_SPAC_MASK 0x1c00
91 #define GET_SPAC(flags) ((flags&ML_SPAC_MASK)>>ML_SPAC_SHIFT)
93 // Special activation types
94 #define SPAC_CROSS 0 // when player crosses line
95 #define SPAC_USE 1 // when player uses line
96 #define SPAC_MCROSS 2 // when monster crosses line
97 #define SPAC_IMPACT 3 // when projectile hits line
98 #define SPAC_PUSH 4 // when player/monster pushes line
99 #define SPAC_PCROSS 5 // when projectile crosses line
115 short firstseg; // segs are stored sequentially
129 { // bbox coordinates
136 #define NF_SUBSECTOR 0x8000
139 short x,y,dx,dy; // partition line
140 short bbox[2][4]; // bounding box for each child
141 unsigned short children[2]; // if NF_SUBSECTOR its a subsector
165 #define MTF_DORMANT 16
166 #define MTF_FIGHTER 32
167 #define MTF_CLERIC 64
169 #define MTF_GSINGLE 256
170 #define MTF_GCOOP 512
171 #define MTF_GDEATHMATCH 1024
173 //--------------------------------------------------------------------------
175 // Texture definition
177 //--------------------------------------------------------------------------
194 void **columndirectory; // OBSOLETE
196 mappatch_t patches[1];
199 //--------------------------------------------------------------------------
203 //--------------------------------------------------------------------------
205 // posts are runs of non masked source pixels
208 byte topdelta; // -1 is the last post in a column
210 // length data bytes follows
213 // column_t is a list of 0 or more post_t, (byte)-1 terminated
214 typedef post_t column_t;
216 // a patch holds one or more columns
217 // patches are used for sprites and all masked pictures
220 short width; // bounding box size
222 short leftoffset; // pixels to the left of origin
223 short topoffset; // pixels below the origin
224 int columnofs[8]; // only [width] used
225 // the [0] is &columnofs[width]
228 // a pic is an unmasked block of pixels