home *** CD-ROM | disk | FTP | other *** search
/ Instant Doom Levels / Instant.Doom.Levels.-.Level.Master.II.iso / EDITORS / ZIPPED / WSCDEU52.ZIP / INCLUDE / WSTRUCTS.H < prev   
C/C++ Source or Header  |  1995-03-05  |  5KB  |  164 lines

  1. /*----------------------------------------------------------------------------*
  2.  | This file is part of WinDEU, the port of DEU to Windows.                   |
  3.  | WinDEU was created by the DEU team:                                        |
  4.  |  Renaud Paquay, Raphael Quinet, Brendon Wyber and others...                |
  5.  |                                                                            |
  6.  | DEU is an open project: if you think that you can contribute, please join  |
  7.  | the DEU team.  You will be credited for any code (or ideas) included in    |
  8.  | the next version of the program.                                           |
  9.  |                                                                            |
  10.  | If you want to make any modifications and re-distribute them on your own,  |
  11.  | you must follow the conditions of the WinDEU license. Read the file        |
  12.  | LICENSE or README.TXT in the top directory.  If do not  have a copy of     |
  13.  | these files, you can request them from any member of the DEU team, or by   |
  14.  | mail: Raphael Quinet, Rue des Martyrs 9, B-4550 Nandrin (Belgium).         |
  15.  |                                                                            |
  16.  | This program comes with absolutely no warranty.  Use it at your own risks! |
  17.  *----------------------------------------------------------------------------*
  18.  
  19.     Project WinDEU
  20.     DEU team
  21.     Jul-Dec 1994, Jan-Mar 1995
  22.  
  23.     FILE:         wstructs.h
  24. */
  25. #ifndef __wstructs_h
  26. #define __wstructs_h
  27.  
  28. #ifndef __common_h
  29.     #include "common.h"
  30. #endif
  31.  
  32. #ifndef __windeu_h
  33.     #include "windeu.h"
  34. #endif
  35.  
  36.  
  37. /*
  38.    this data structure contains the information about the THINGS
  39. */
  40.  
  41. struct Thing
  42. {
  43.    SHORT xpos;      /* x position */
  44.    SHORT ypos;      /* y position */
  45.    SHORT angle;     /* facing angle */
  46.    SHORT type;      /* thing type */
  47.    SHORT when;      /* appears when? */
  48. };
  49. typedef struct Thing HUGE *TPtr;
  50.  
  51.  
  52.  
  53. /*
  54.    this data structure contains the information about the LINEDEFS
  55. */
  56. struct LineDef
  57. {
  58.    SHORT start;     /* from this vertex ... */
  59.    SHORT end;       /* ... to this vertex */
  60.    SHORT flags;     /* see NAMES.C for more info */
  61.    SHORT type;      /* see NAMES.C for more info */
  62.    SHORT tag;       /* crossing this linedef activates the sector with the same tag */
  63.    SHORT sidedef1;  /* sidedef */
  64.    SHORT sidedef2;  /* only if this line adjoins 2 sectors */
  65. };
  66. typedef struct LineDef HUGE *LDPtr;
  67.  
  68.  
  69.  
  70. /*
  71.    this data structure contains the information about the SIDEDEFS
  72. */
  73. struct SideDef
  74. {
  75.    SHORT xoff;      /* X offset for texture */
  76.    SHORT yoff;      /* Y offset for texture */
  77.    char tex1[8];  /* texture name for the part above */
  78.    char tex2[8];  /* texture name for the part below */
  79.    char tex3[8];  /* texture name for the regular part */
  80.    SHORT sector;    /* adjacent sector */
  81. };
  82. typedef struct SideDef HUGE *SDPtr;
  83.  
  84.  
  85.  
  86. /*
  87.    this data structure contains the information about the VERTEXES
  88. */
  89. struct Vertex
  90. {
  91.    SHORT x;         /* X coordinate */
  92.    SHORT y;         /* Y coordinate */
  93. };
  94. typedef struct Vertex HUGE *VPtr;
  95.  
  96.  
  97.  
  98. /*
  99.    this data structure contains the information about the SEGS
  100. */
  101. typedef struct Seg HUGE *SEPtr;
  102. struct Seg
  103. {
  104.    SEPtr next;        /* next Seg in list */
  105.    SHORT start;     /* from this vertex ... */
  106.    SHORT end;       /* ... to this vertex */
  107.    USHORT angle;    /* angle (0 = east, 16384 = north, ...) */
  108.    SHORT linedef;   /* linedef that this seg goes along*/
  109.    SHORT flip;      /* true if not the same direction as linedef */
  110.    USHORT dist;     /* distance from starting point */
  111. };
  112.  
  113.  
  114.  
  115. /*
  116.    this data structure contains the information about the SSECTORS
  117. */
  118. typedef struct SSector HUGE *SSPtr;
  119. struct SSector
  120. {
  121.    SSPtr next;          /* next Sub-Sector in list */
  122.    SHORT num;       /* number of Segs in this Sub-Sector */
  123.    SHORT first;     /* first Seg */
  124. };
  125.  
  126.  
  127.  
  128. /*
  129.    this data structure contains the information about the NODES
  130. */
  131. typedef struct Node HUGE *NPtr;
  132. struct Node
  133. {
  134.    SHORT x, y;                      // starting point
  135.    SHORT dx, dy;                    // offset to ending point
  136.    SHORT miny1, maxy1, minx1, maxx1;// bounding rectangle 1
  137.    SHORT miny2, maxy2, minx2, maxx2;// bounding rectangle 2
  138.    SHORT child1, child2;            // Node or SSector (if high bit is set)
  139.    NPtr node1, node2;               // pointer if the child is a Node
  140.    SHORT num;                       // number given to this Node
  141. };
  142.  
  143.  
  144.  
  145. /*
  146.    this data structure contains the information about the SECTORS
  147. */
  148. struct Sector
  149. {
  150.    SHORT floorh;    /* floor height */
  151.    SHORT ceilh;     /* ceiling height */
  152.    char floort[8];    /* floor texture */
  153.    char ceilt[8];     /* ceiling texture */
  154.    SHORT light;     /* light level (0-255) */
  155.    SHORT special;   /* special behaviour (0 = normal, 9 = secret, ...) */
  156.    SHORT tag;       /* sector activated by a linedef with the same tag */
  157. };
  158. typedef struct Sector HUGE *SPtr;
  159.  
  160.  
  161.  
  162. #endif
  163. /* end of file */
  164.