home *** CD-ROM | disk | FTP | other *** search
/ Doom Fever / Doom_Fever-1995_Maple_Media.iso / wad / source.zip / WSTRUCTS.H < prev   
C/C++ Source or Header  |  1994-03-27  |  4KB  |  140 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.    int xpos;      /* x position */
  21.    int ypos;      /* y position */
  22.    int angle;     /* facing angle */
  23.    int type;      /* thing type */
  24.    int 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.    int start;     /* from this vertex ... */
  36.    int end;       /* ... to this vertex */
  37.    int flags;     /* see NAMES.C for more info */
  38.    int type;      /* see NAMES.C for more info */
  39.    int tag;       /* crossing this linedef activates the sector with the same tag */
  40.    int sidedef1;  /* sidedef */
  41.    int 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.    int xoff;      /* X offset for texture */
  53.    int 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.    int 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.    int x;         /* X coordinate */
  69.    int 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.    int start;     /* from this vertex ... */
  83.    int end;       /* ... to this vertex */
  84.    unsigned angle;/* angle (0 = east, 16384 = north, ...) */
  85.    int linedef;   /* linedef that this seg goes along*/
  86.    int flip;      /* true if not the same direction as linedef */
  87.    unsigned 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.    int num;       /* number of Segs in this Sub-Sector */
  100.    int 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.    int x, y;                         /* starting point */
  112.    int dx, dy;                       /* offset to ending point */
  113.    int miny1, maxy1, minx1, maxx1;   /* bounding rectangle 1 */
  114.    int miny2, maxy2, minx2, maxx2;   /* bounding rectangle 2 */
  115.    int child1, child2;               /* Node or SSector (if high bit is set) */
  116.    NPtr node1, node2;                /* pointer if the child is a Node */
  117.    int 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.    int floorh;    /* floor height */
  128.    int ceilh;     /* ceiling height */
  129.    char floort[8];/* floor texture */
  130.    char ceilt[8]; /* ceiling texture */
  131.    int light;     /* light level (0-255) */
  132.    int special;   /* special behaviour (0 = normal, 9 = secret, ...) */
  133.    int 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.