gtkradiant/contrib/pk3man/md3.h
mattn caabb8dceb * added pk3man and fixed it to compile for latest radiant
* NOTE: Not included in the build chain - doesn't link
* NOTE: iepair.h is not used at the moment


git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/ZeroRadiant@225 8a3a26a2-13c4-0310-b231-cf6edde360e5
2008-03-18 17:11:08 +00:00

111 lines
2.9 KiB
C

// MD3 file headers
typedef struct
{
char ID[4]; //id of file, always "IDP3"
int Version; //i suspect this is a version
//number, always 15
char FileName[68]; //sometimes left Blank...
//65 chars, 32bit aligned ==
//68 chars
int BoneFrame_num; //number of BoneFrames
int Tag_num; //number of 'tags' per BoneFrame
int Mesh_num; //number of meshes/skins
int MaxSkin_num; //maximum number of unique skins
//used in md3 file
int HeaderLength; //always equal to the length of
//this header
int Tag_Start; //starting position of
//tag-structures
int Tag_End; //ending position of
//tag-structures/starting
//position of mesh-structures
int FileSize; //size of file
} md3_header_t;
typedef struct
{
char Name[64]; //name of 'tag' as it's usually
//called in the md3 files try to
//see it as a sub-mesh/seperate
//mesh-part.
//sometimes this 64 string may
//contain some garbage, but
//i've been told this is because
//some tools leave garbage in
//those strings, but they ARE
//strings...
float Postition[3]; //relative position of tag
float Rotation[3][3]; //the direction the tag is facing relative to the rest of the model
} md3_tag_t;
typedef struct
{
//unverified:
float Mins[3];
float Maxs[3];
float Position[3];
float scale;
char Creator[16]; //i think this is the
//"creator" name..
//but i'm only guessing.
} md3_boneframe_t;
typedef struct
{
char ID[4]; //id, must be IDP3
char Name[68]; //name of mesh
//65 chars,
//32 bit aligned == 68 chars
int MeshFrame_num; //number of meshframes
//in mesh
int Skin_num; //number of skins in mesh
int Vertex_num; //number of vertices
int Triangle_num; //number of Triangles
int Triangle_Start; //starting position of
//Triangle data, relative
//to start of Mesh_Header
int HeaderSize; //size of header
int TexVec_Start; //starting position of
//texvector data, relative
//to start of Mesh_Header
int Vertex_Start; //starting position of
//vertex data,relative
//to start of Mesh_Header
int MeshSize; //size of mesh
} md3_mesh_t;
typedef struct
{
char Name[68]; //name of skin used by mesh
//65 chars,
//32 bit aligned == 68 chars
} md3_skin_t;
typedef struct
{
int Triangle[3]; //vertex 1,2,3 of triangle
} md3_triangles_t;
typedef struct
{
float TexVec[2]; //Texture U/V coordinates of vertex
} md3_texcoords_t;
typedef struct
{
//!!!important!!! signed!
signed short Vec[3]; //vertex X/Y/Z coordinate
unsigned char EnvTex[2]; //enviromental mapping texture coordinates
} md3_vertices_t;