home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / FAQSYS18.ZIP / FAQS.DAT / SIKES.TXT < prev    next >
Text File  |  1995-08-01  |  1KB  |  51 lines

  1. Listing 1.  WAD File Structures
  2. // Header structure.
  3. typedef struct
  4. {
  5.     char    identification[4];
  6.     long    numlumps;
  7.     long    infotableofs;
  8. } WADHEADER, *PWADHEADER;
  9.  
  10. // Directory structure.
  11. typedef struct
  12. {
  13.         long     filepos;
  14.         long     size;
  15.         char     name[8];
  16. } LUMPS, *PLUMPS;
  17.  
  18. // Masked object (actors and sprites) structure.
  19. typedef struct
  20. {
  21.         short origsize;            // the orig size of "grabbed" gfx
  22.         short width;                 // bounding box size
  23.         short height;
  24.         short leftoffset;            // pixels to the left of origin
  25.         short topoffset;             // pixels above the origin
  26.         short collumnofs[320];    // only [width] used, the [0] is
  27.                                     // &collumnofs[width]
  28. } PATCH, *PPATCH;
  29.  
  30. // Transparent object structure.
  31. typedef struct
  32. {
  33.         short origsize;            // the orig size of "grabbed" gfx
  34.         short width;                 // bounding box size
  35.         short height;
  36.         short leftoffset;            // pixels to the left of origin
  37.         short topoffset;            // pixels above the origin
  38.         short translevel;
  39.         short collumnofs[320];    // only [width] used, the [0] is
  40.                                     // &collumnofs[width]
  41. } TRANSPATCH, *PTRANSPATCH;
  42.  
  43. // Structure used for floor and ceiling data.
  44. typedef struct
  45. {
  46.         short    Width,Height;
  47.         short    Orgx,Orgy;
  48. } FLOORCEILING, *PFLOORCEILING;
  49.  
  50. Note: These structure examples are given in the Official ROTT Specifications file, ROTSP1, by Apogee Software.
  51.