00001 #ifndef _FileFormatDefs_H_ 00002 #define _FileFormatDefs_H_ 00003 00007 typedef struct 00008 { 00009 short wallptr, wallnum; 00010 long ceilingz, floorz; 00011 short ceilingstat, floorstat; 00012 short ceilingpicnum, ceilingheinum; 00013 signed char ceilingshade; 00014 char ceilingpal, ceilingxpanning, ceilingypanning; 00015 short floorpicnum, floorheinum; 00016 signed char floorshade; 00017 char floorpal, floorxpanning, floorypanning; 00018 char visibility, filler; 00019 short lotag, hitag, extra; 00020 } sectortype; 00021 00022 00026 typedef struct 00027 { 00028 long x, y; 00029 short point2, nextwall, nextsector, cstat; 00030 short picnum, overpicnum; 00031 signed char shade; 00032 char pal, xrepeat, yrepeat, xpanning, ypanning; 00033 short lotag, hitag, extra; 00034 } walltype; 00035 00036 00040 typedef struct 00041 { 00042 long x, y, z; 00043 short cstat, picnum; 00044 signed char shade; 00045 char pal, clipdist, filler; 00046 unsigned char xrepeat, yrepeat; 00047 signed char xoffset, yoffset; 00048 short sectnum, statnum; 00049 short ang, owner, xvel, yvel, zvel; 00050 short lotag, hitag, extra; 00051 } spritetype; 00052 00053 00057 typedef struct 00058 { 00059 int x; 00060 int y; 00061 int z; 00062 }Pos; 00063 00064 00068 typedef struct 00069 { 00071 unsigned int nVersion; 00072 00074 Pos StartPosition; 00075 00077 unsigned short nAngle; 00078 00080 unsigned short nStartPointSecNum; 00081 00083 unsigned short nNumSectors; 00084 00086 sectortype sectors[1024]; 00087 00089 unsigned short nNumWalls; 00090 00092 walltype walls[8192]; 00093 00095 unsigned short nNumSprites; 00096 00098 spritetype sprites[4096]; 00099 }MAPSTRUCT; 00100 00101 00105 typedef struct 00106 { 00108 uint16 tilesizex; 00109 00111 uint16 tilesizey; 00112 00114 uint32 picanm; 00115 00117 uint8* data; 00118 }TILESTRUCT; 00119 00120 00124 typedef struct 00125 { 00126 public: 00127 void Clear() 00128 { 00129 tilesizex = 0x00; 00130 tilesizey = 0x00; 00131 picanm = 0x00; 00132 tiles = 0x00; 00133 } 00134 00136 unsigned long nVersion; 00137 00142 unsigned long nNumTiles; 00143 00145 unsigned long nTileStart; 00146 00148 unsigned long nTileEnd; 00149 00151 uint16 *tilesizex; 00152 00154 uint16 *tilesizey; 00155 00157 uint32 *picanm; 00158 00160 TILESTRUCT *tiles; 00161 }ARTSTRUCT; 00162 00163 00165 typedef struct 00166 { 00168 char name[12]; 00169 00171 unsigned long int size; 00172 }FILEHEADERSTRUCT; 00173 00174 00176 typedef struct 00177 { 00179 FILEHEADERSTRUCT fileheader; 00180 00182 unsigned char* data; 00183 00184 }FILESTRUCT; 00185 00186 00188 static const char* AuthorName = "KenSilverman"; 00189 00190 00192 typedef struct 00193 { 00201 uint8 palette[768]; 00202 00208 uint16 numpalookups; 00209 00216 uint8 (*palookup)[256]; 00217 00222 uint8 transluc[256][256]; 00223 00224 }PALETTESTRUCT; 00225 00226 #endif