doom

a minimalistic implementation of doom
git clone git://ssnf.xyz/doom
Log | Files | Refs

doomdata.h (1639B)


      1 
      2 
      3 
      4 
      5 
      6 
      7 
      8 
      9 
     10 
     11 
     12 
     13 
     14 
     15 
     16 
     17 
     18 
     19 
     20 
     21 
     22 
     23 
     24 #ifndef __DOOMDATA__
     25 #define __DOOMDATA__
     26 
     27 
     28 #include "doomdef.h"
     29 
     30 
     31 #include "doomdef.h"
     32 
     33 
     34 
     35 
     36 
     37 
     38 
     39 
     40 
     41 
     42 
     43 enum
     44 {
     45   ML_LABEL,		
     46   ML_THINGS,		
     47   ML_LINEDEFS,		
     48   ML_SIDEDEFS,		
     49   ML_VERTEXES,		
     50   ML_SEGS,		
     51   ML_SSECTORS,		
     52   ML_NODES,		
     53   ML_SECTORS,		
     54   ML_REJECT,		
     55   ML_BLOCKMAP		
     56 };
     57 
     58 
     59 
     60 typedef struct
     61 {
     62   short		x;
     63   short		y;
     64 } mapvertex_t;
     65 
     66 
     67 
     68 
     69 typedef struct
     70 {
     71   short		textureoffset;
     72   short		rowoffset;
     73   char		toptexture[8];
     74   char		bottomtexture[8];
     75   char		midtexture[8];
     76   
     77   short		sector;
     78 } mapsidedef_t;
     79 
     80 
     81 
     82 
     83 
     84 typedef struct
     85 {
     86   short		v1;
     87   short		v2;
     88   short		flags;
     89   short		special;
     90   short		tag;
     91   
     92   short		sidenum[2];		
     93 } maplinedef_t;
     94 
     95 
     96 
     97 
     98 
     99 
    100 
    101 #define ML_BLOCKING		1
    102 
    103 
    104 #define ML_BLOCKMONSTERS	2
    105 
    106 
    107 
    108 #define ML_TWOSIDED		4
    109 
    110 
    111 
    112 
    113 
    114 
    115 
    116 
    117 
    118 
    119 
    120 #define ML_DONTPEGTOP		8
    121 
    122 
    123 #define ML_DONTPEGBOTTOM	16	
    124 
    125 
    126 #define ML_SECRET		32
    127 
    128 
    129 #define ML_SOUNDBLOCK		64
    130 
    131 
    132 #define ML_DONTDRAW		128
    133 
    134 
    135 #define ML_MAPPED		256
    136 
    137 
    138 
    139 
    140 
    141 typedef	struct
    142 {
    143   short		floorheight;
    144   short		ceilingheight;
    145   char		floorpic[8];
    146   char		ceilingpic[8];
    147   short		lightlevel;
    148   short		special;
    149   short		tag;
    150 } mapsector_t;
    151 
    152 
    153 typedef struct
    154 {
    155   short		numsegs;
    156   
    157   short		firstseg;	
    158 } mapsubsector_t;
    159 
    160 
    161 
    162 
    163 typedef struct
    164 {
    165   short		v1;
    166   short		v2;
    167   short		angle;		
    168   short		linedef;
    169   short		side;
    170   short		offset;
    171 } mapseg_t;
    172 
    173 
    174 
    175 
    176 
    177 
    178 #define	NF_SUBSECTOR	0x8000
    179 
    180 typedef struct
    181 {
    182   
    183   short		x;
    184   short		y;
    185   short		dx;
    186   short		dy;
    187 
    188   
    189   
    190   short		bbox[2][4];
    191 
    192   
    193   
    194   unsigned short	children[2];
    195 
    196 } mapnode_t;
    197 
    198 
    199 
    200 
    201 
    202 
    203 typedef struct
    204 {
    205     short		x;
    206     short		y;
    207     short		angle;
    208     short		type;
    209     short		options;
    210 } mapthing_t;
    211 
    212 
    213 
    214 
    215 
    216 #endif			
    217 
    218 
    219 
    220 
    221 
    222