home *** CD-ROM | disk | FTP | other *** search
/ MegaDoom Adventures / PMWMEGADOOM.iso / doom / creators / deu52gcc / src / wstructs.h < prev   
C/C++ Source or Header  |  1994-05-10  |  4KB  |  141 lines

  1. /*
  2.    Doom Editor Utility, by Brendon Wyber and Raphaël Quinet.
  3.  
  4.    You are allowed to use any parts of this code in another program, as
  5.    long as you give credits to the authors in the documentation and in
  6.    the program itself.  Read the file README.1ST for more information.
  7.  
  8.    This program comes with absolutely no warranty.
  9.  
  10.    WSTRUCTS.H - WAD files data structures.
  11. */
  12.  
  13.  
  14. /*
  15.    this data structure contains the information about the THINGS
  16. */
  17.  
  18. struct Thing
  19. {
  20.    BCINT xpos;      /* x position */
  21.    BCINT ypos;      /* y position */
  22.    BCINT angle;     /* facing angle */
  23.    BCINT type;      /* thing type */
  24.    BCINT when;      /* appears when? */
  25. };
  26. typedef struct Thing huge *TPtr;
  27.  
  28.  
  29.  
  30. /*
  31.    this data structure contains the information about the LINEDEFS
  32. */
  33. struct LineDef
  34. {
  35.    BCINT start;     /* from this vertex ... */
  36.    BCINT end;       /* ... to this vertex */
  37.    BCINT flags;     /* see NAMES.C for more info */
  38.    BCINT type;      /* see NAMES.C for more info */
  39.    BCINT tag;       /* crossing this linedef activates the sector with the same tag */
  40.    BCINT sidedef1;  /* sidedef */
  41.    BCINT sidedef2;  /* only if this line adjoins 2 sectors */
  42. };
  43. typedef struct LineDef huge *LDPtr;
  44.  
  45.  
  46.  
  47. /*
  48.    this data structure contains the information about the SIDEDEFS
  49. */
  50. struct SideDef
  51. {
  52.    BCINT xoff;      /* X offset for texture */
  53.    BCINT yoff;      /* Y offset for texture */
  54.    char tex1[8];  /* texture name for the part above */
  55.    char tex2[8];  /* texture name for the part below */
  56.    char tex3[8];  /* texture name for the regular part */
  57.    BCINT sector;    /* adjacent sector  */
  58. };
  59. typedef struct SideDef huge *SDPtr;
  60.  
  61.  
  62.  
  63. /*
  64.    this data structure contains the information about the VERTEXES
  65. */
  66. struct Vertex
  67. {
  68.    BCINT x;         /* X coordinate */
  69.    BCINT y;         /* Y coordinate */
  70. };
  71. typedef struct Vertex huge *VPtr;
  72.  
  73.  
  74.  
  75. /*
  76.    this data structure contains the information about the SEGS
  77. */
  78. typedef struct Seg huge *SEPtr;
  79. struct Seg
  80. {
  81.    SEPtr next;      /* next Seg in list */
  82.    BCINT start;     /* from this vertex ... */
  83.    BCINT end;       /* ... to this vertex */
  84.    UBCINT angle;    /* angle (0 = east, 16384 = north, ...) */
  85.    BCINT linedef;   /* linedef that this seg goes along*/
  86.    BCINT flip;      /* true if not the same direction as linedef */
  87.    UBCINT dist;     /* distance from starting point */
  88. };
  89.  
  90.  
  91.  
  92. /*
  93.    this data structure contains the information about the SSECTORS
  94. */
  95. typedef struct SSector huge *SSPtr;
  96. struct SSector
  97. {
  98.    SSPtr next;      /* next Sub-Sector in list */
  99.    BCINT num;       /* number of Segs in this Sub-Sector */
  100.    BCINT first;     /* first Seg */
  101. };
  102.  
  103.  
  104.  
  105. /*
  106.    this data structure contains the information about the NODES
  107. */
  108. typedef struct Node *NPtr;
  109. struct Node
  110. {
  111.    BCINT x, y;                         /* starting poBCINT */
  112.    BCINT dx, dy;                       /* offset to ending point */
  113.    BCINT miny1, maxy1, minx1, maxx1;   /* bounding rectangle 1 */
  114.    BCINT miny2, maxy2, minx2, maxx2;   /* bounding rectangle 2 */
  115.    BCINT child1, child2;               /* Node or SSector (if high bit is set) */
  116.    NPtr node1, node2;                /* pointer if the child is a Node */
  117.    BCINT num;                          /* number given to this Node */
  118. };
  119.  
  120.  
  121.  
  122. /*
  123.    this data structure contains the information about the SECTORS
  124. */
  125. struct Sector
  126. {
  127.    BCINT floorh;    /* floor height */
  128.    BCINT ceilh;     /* ceiling height */
  129.    char floort[8];/* floor texture */
  130.    char ceilt[8]; /* ceiling texture */
  131.    BCINT light;     /* light level (0-255) */
  132.    BCINT special;   /* special behaviour (0 = normal, 9 = secret, ...) */
  133.    BCINT tag;       /* sector activated by a linedef with the same tag */
  134. };
  135. typedef struct Sector huge *SPtr;
  136.  
  137.  
  138.  
  139. /* end of file */
  140.  
  141.