//a single pose within an animation (note: always refered to via a framegroup, even if there's only one frame in that group).
typedefstruct
{
vecV_t*ofsverts;
#ifndef SERVERONLY
vec3_t*ofsnormals;
vec3_t*ofstvector;
vec3_t*ofssvector;
vboarray_tvboverts;
vboarray_tvbonormals;
vboarray_tvbosvector;
vboarray_tvbotvector;
#endif
vec3_tscale;
vec3_tscale_origin;
}galiaspose_t;
//a frame group (aka: animation)
typedefstruct
{
#ifdef SKELETALMODELS
skeltype_tskeltype;//for models with transforms, states that bones need to be transformed from their parent.
//this is actually bad, and can result in bones shortening as they interpolate.
float*boneofs;//numposes*12*numbones
#endif
qbooleanloop;
intnumposes;
floatrate;
galiaspose_t*poseofs;
charname[64];
}galiasanimation_t;
typedefstructgaliasbone_sgaliasbone_t;
#ifdef SKELETALMODELS
structgaliasbone_s
{
charname[32];
intparent;
floatinverse[12];
};
typedefstructFTE_DEPRECATED
{
//DEPRECATED
//use of this prevents the use of glsl acceleration. the framerate loss is of the order of 90%
//skeletal poses refer to this.
intvertexindex;
intboneindex;
vec4_torg;
#ifndef SERVERONLY
vec3_tnormal;
#endif
}galisskeletaltransforms_t;
#endif
//we can't be bothered with animating skins.
//We'll load up to four of them but after that you're on your own
#ifndef SERVERONLY
typedefstruct
{
shader_t*shader;
qbyte*texels;//this is 8bit for frame 0 only. only valid in q1 models without replacement textures, used for colourising player skins.
constchar*defaultshader;
charshadername[MAX_QPATH];
texnums_ttexnums;
}skinframe_t;
typedefstruct
{
intskinwidth;
intskinheight;
floatskinspeed;
intnumframes;
skinframe_t*frame;
charname[MAX_QPATH];
}galiasskin_t;
typedefstruct
{
charname[MAX_QPATH];
texnums_ttexnum;
unsignedinttcolour;
unsignedintbcolour;
unsignedintpclass;
intskinnum;
unsignedintsubframe;
bucket_tbucket;
}galiascolourmapped_t;
#endif
typedefstruct
{
charname[64];
vec3_torg;
floatang[3][3];
}md3tag_t;
typedefstructgaliasinfo_s
{
charsurfacename[MAX_QPATH];
unsignedshortgeomset;
unsignedshortgeomid;
index_t*ofs_indexes;
intnumindexes;
int*ofs_trineighbours;
floatlerpcutoff;//hack. should probably be part of the entity structure, but I really don't want new models (and thus code) to have access to this ugly inefficient hack. make your models properly in the first place.
intnumskins;
#ifndef SERVERONLY
galiasskin_t*ofsskins;
#endif
intshares_verts;//used with models with two shaders using the same vertex. set to the surface number to inherit from (or itself).
intshares_bones;//use last mesh's bones. set to the surface number to inherit from (or itself).
intnumverts;
#ifndef SERVERONLY
vec2_t*ofs_st_array;
vec4_t*ofs_rgbaf;
byte_vec4_t*ofs_rgbaub;
#endif
intnumanimations;
galiasanimation_t*ofsanimations;
structgaliasinfo_s*nextsurf;
#ifdef SKELETALMODELS
float*baseframeofs;/*non-heirachical*/
intnumbones;
galiasbone_t*ofsbones;
intnumswtransforms;
galisskeletaltransforms_t*ofsswtransforms;
vecV_t*ofs_skel_xyz;
vec3_t*ofs_skel_norm;
vec3_t*ofs_skel_svect;
vec3_t*ofs_skel_tvect;
byte_vec4_t*ofs_skel_idx;
vec4_t*ofs_skel_weight;
vboarray_tvbo_skel_verts;
vboarray_tvbo_skel_normals;
vboarray_tvbo_skel_svector;
vboarray_tvbo_skel_tvector;
vboarray_tvbo_skel_bonenum;
vboarray_tvbo_skel_bweight;
#endif
vboarray_tvboindicies;
vboarray_tvbotexcoords;
vboarray_tvborgba;//yeah, just you try reading THAT as an actual word.
void*vbomem;
void*ebomem;
//these exist only in the root mesh.
intnumtagframes;
intnumtags;
md3tag_t*ofstags;
unsignedintwarned;//passed around at load time, so we don't spam warnings