У //FileWad.h #ifndef _WAD__ #define __WAD_

#include "fixmath.h"
///////////////////////// WAD-file structures ///////////////////////////
struct WadHeader // header of .WAD file
{
char sign [4]; // "IWAD" or "PWAD" signature
long dirEntries; // # of directory entries
long dirOffset; // offset of directory in a file
};
struct DirEntry // entry description :
{
long offset; t // data offset
long size; ! // data size
char name [8]; // resource name
};
struct Vertex
{
short x; short y;
};
struct LineDef // line from one vertex to another
{

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

short fromVertex;
short toVertex;
short attrs; // attributes
short type; // type
short tag;
short sideDefs [2); // right sidedef, left sidedef (or -1)
};
struct SideDef // defines wall texture along LineDef
{
short xOffset, yOffset; // texture offsets
char upper_tx [8]; // texture names : upper
char lower_tx [8]; // lower
char main_tx [8]; // main (regular part if the wall)
short sector; // sector
};
struct Segment // SEG, part of linedef,
{ // bounding SubSector
short from, to;
Angle angle; // angle of segment (in BAM )
short lineDef; // linedef
short lineSide; // 0 if this seg lies on the right of linedef
//1 if on the left
short lineOffset; // offset distance along LineDef to
// the start of this seg
};
struct SSector // SubSector - convex part of Sector
{
short numSegs; // # of segments for this ssector
short firstSeg;
};
struct BBox // bounding box for BSP trees
{
short y2,y1,x1,x2;
};
struct Node // BSP node struct
{
short x, y; // from point
short dx, dy; // in direction
BBox rightBox; // bounding box for right subtree
BBox leftBox; // bounding box for left subtree
short rightNode, leftNode; // subtree ( or SSector) pointers

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