ew-engine/hq engine src/mod_md3.h

69 lines
1.7 KiB
C

/* MOD_MD3.h
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#define MD3IDHEADER (('3'<<24)+('P'<<16)+('D'<<8)+'I')
typedef struct
{
short vec[3];
char tc[2];
} md3vert_t;
typedef struct
{
char id[4];
char name[68];
unsigned int numframes;
unsigned int numskins;
unsigned int numverts;
unsigned int numtris;
unsigned int elem_offs;
unsigned int skin_offs;
unsigned int tc_offs;
unsigned int vert_offs;
unsigned int meshsize;
} md3mesh_t;
typedef struct
{
char name[64];
vec3_t pos;
vec3_t rot[3];
} md3tag_t;
typedef struct
{
vec3_t mins, maxs;
vec3_t pos;
float scale;
char creator[16];
} md3boneframe_t;
typedef struct
{
char id[4];
int version;
char filename[68];
unsigned int numboneframes;
unsigned int numtags;
unsigned int nummeshes;
unsigned int headerlen;
unsigned int bone_offs;
unsigned int tag_offs;
unsigned int mesh_offs;
} md3header_t;