]> icculus.org git repositories - divverent/darkplaces.git/blob - modelgen.h
removed the forced LOWPRECISION flag on entities because it messes up
[divverent/darkplaces.git] / modelgen.h
1 /*
2 Copyright (C) 1996-1997 Id Software, Inc.
3
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
13 See the GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18
19 */
20 //
21 // modelgen.h: header file for model generation program
22 //
23
24 // *********************************************************
25 // * This file must be identical in the modelgen directory *
26 // * and in the Quake directory, because it's used to      *
27 // * pass data from one to the other via model files.      *
28 // *********************************************************
29
30 #ifndef MODELGEN_H
31 #define MODELGEN_H
32
33 #define ALIAS_VERSION   6
34
35 #define ALIAS_ONSEAM                            0x0020
36
37 typedef enum aliasframetype_e { ALIAS_SINGLE=0, ALIAS_GROUP } aliasframetype_t;
38
39 typedef enum aliasskintype_e { ALIAS_SKIN_SINGLE=0, ALIAS_SKIN_GROUP } aliasskintype_t;
40
41 typedef struct mdl_s
42 {
43         int                     ident;
44         int                     version;
45         vec3_t          scale;
46         vec3_t          scale_origin;
47         float           boundingradius;
48         vec3_t          eyeposition;
49         int                     numskins;
50         int                     skinwidth;
51         int                     skinheight;
52         int                     numverts;
53         int                     numtris;
54         int                     numframes;
55         synctype_t      synctype;
56         int                     flags;
57         float           size;
58 }
59 mdl_t;
60
61 // TODO: could be shorts
62
63 typedef struct stvert_s
64 {
65         int             onseam;
66         int             s;
67         int             t;
68 }
69 stvert_t;
70
71 typedef struct dtriangle_s
72 {
73         int                                     facesfront;
74         int                                     vertindex[3];
75 }
76 dtriangle_t;
77
78 #define DT_FACES_FRONT                          0x0010
79
80 // This mirrors trivert_t in trilib.h, is present so Quake knows how to
81 // load this data
82
83 typedef struct trivertx_s
84 {
85         unsigned char   v[3];
86         unsigned char   lightnormalindex;
87 }
88 trivertx_t;
89
90 typedef struct daliasframe_s
91 {
92         trivertx_t      bboxmin;        // lightnormal isn't used
93         trivertx_t      bboxmax;        // lightnormal isn't used
94         char            name[16];       // frame name from grabbing
95 }
96 daliasframe_t;
97
98 typedef struct daliasgroup_s
99 {
100         int                     numframes;
101         trivertx_t      bboxmin;        // lightnormal isn't used
102         trivertx_t      bboxmax;        // lightnormal isn't used
103 }
104 daliasgroup_t;
105
106 typedef struct daliasskingroup_s
107 {
108         int                     numskins;
109 }
110 daliasskingroup_t;
111
112 typedef struct daliasinterval_s
113 {
114         float   interval;
115 }
116 daliasinterval_t;
117
118 typedef struct daliasskininterval_s
119 {
120         float   interval;
121 }
122 daliasskininterval_t;
123
124 typedef struct daliasframetype_s
125 {
126         aliasframetype_t        type;
127 }
128 daliasframetype_t;
129
130 typedef struct daliasskintype_s
131 {
132         aliasskintype_t type;
133 }
134 daliasskintype_t;
135
136 #endif
137