};
struct Sector // area of map with constant heights & textures
{
short floorHeight; // heights:
short ceilingHeight;
char floor__tx [8]; // textures:
char ceiling_tx [8];
short light; // brightness of a sector (0-total dark, 255 - max)

Компьютерная графика. Полигональные модели

short type; short trigger;
};
struct Thing {
short x, y;
short angle; // in degrees with 45 deg step
short type; short attrs;
};
struct RGB {
char red; char green; char blue;
};
struct PicHeader // internal WAD picture format
{
short width; short height; short leftOffset; short topOffset;
long colPtr Q; // pointers to PicColumn in WAD file
};
struct PicColumn {
char row;
char nonTransparentPixels; char pixels [];
};
struct TexturePatch {
short xOffset; short yOffset;
short pnamesNo; // # of this patch in PNAMES resource short one; // unused, should be 1
short zero; // unsused, should be 0
};
struct TextureEntry // in TEXTURE1 and TEXTURE2 resources {
char textureName [8];
short zerol; // unused, should always be 0
short zero2; // unused, should always be 0
short width;
short height;
short zero3;
short zero4;
short numPatches;
TexturePatch patch [];

13. Элементы виртуальной реальное

};

///////////////////////// non-WAD structures ///////////////////////////// struct Ріс

{
short width; short height; short leftOffset; short topOffset; long * colOffsets; char * data;
struct Texture
{
char name [8];
int width;
int height;
char * data;
};
///////////////////////// Wad File class ////////////////////////////////////
class WadFile {
public:
WadHeader hdr; DirEntry * directory; char fileName [128];
int file;
WadFile ( const char * ); -WadFile ();
void loadLevel ( int episode, int level );
void loadPlayPal ();
void loadColorMap ();
Texture * loadTexture ( const char * name );
Texture * loadFloorTexture ( const char * name );
Pic * loadPic ( const char * name );
int locateResource ( const char * name );

⇐ Предыдущая| |Следующая ⇒