DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
 
model_zymotic.h
Go to the documentation of this file.
1
2#ifndef MODEL_ZYMOTIC_H
3#define MODEL_ZYMOTIC_H
4
5typedef struct zymlump_s
6{
7 int start;
8 int length;
10
11typedef struct zymtype1header_s
12{
13 char id[12]; // "ZYMOTICMODEL", length 12, no termination
14 int type; // 0 (vertex morph) 1 (skeletal pose) or 2 (skeletal scripted)
15 int filesize; // size of entire model file
16 float mins[3], maxs[3], radius; // for clipping uses
20 int numbones; // this may be zero in the vertex morph format (undecided)
21 int numscenes; // 0 in skeletal scripted models
22
23// skeletal pose header
24 // lump offsets are relative to the file
25 zymlump_t lump_scenes; // zymscene_t scene[numscenes]; // name and other information for each scene (see zymscene struct)
26 zymlump_t lump_poses; // float pose[numposes][numbones][6]; // animation data
27 zymlump_t lump_bones; // zymbone_t bone[numbones];
28 zymlump_t lump_vertbonecounts; // int vertbonecounts[numvertices]; // how many bones influence each vertex (separate mainly to make this compress better)
29 zymlump_t lump_verts; // zymvertex_t vert[numvertices]; // see vertex struct
30 zymlump_t lump_texcoords; // float texcoords[numvertices][2];
31 zymlump_t lump_render; // int renderlist[rendersize]; // sorted by shader with run lengths (int count), shaders are sequentially used, each run can be used with glDrawElements (each triangle is 3 int indices)
32 zymlump_t lump_shaders; // char shadername[numshaders][32]; // shaders used on this model
33 zymlump_t lump_trizone; // byte trizone[numtris]; // see trizone explanation
34}
36
37#define ZYMBONEFLAG_SHARED 1
38
39typedef struct zymbone_s
40{
41 char name[32];
42 int flags;
43 int parent; // parent bone number
44}
46
47// normally the scene will loop, if this is set it will stay on the final frame
48#define ZYMSCENEFLAG_NOLOOP 1
49
50typedef struct zymscene_s
51{
52 char name[32];
53 float mins[3], maxs[3], radius; // for clipping
54 float framerate; // the scene will animate at this framerate (in frames per second)
55 int flags;
56 int start, length; // range of poses
57}
59
60typedef struct zymvertex_s
61{
63 float origin[3];
64}
66
67#endif
68
vector mins
vector maxs
vector origin
const GLchar * name
Definition glquake.h:601
float framerate
zymlump_t lump_verts
zymlump_t lump_bones
zymlump_t lump_render
zymlump_t lump_poses
zymlump_t lump_trizone
zymlump_t lump_texcoords
zymlump_t lump_vertbonecounts
zymlump_t lump_scenes
zymlump_t lump_shaders