]> icculus.org git repositories - divverent/darkplaces.git/blob - modelgen.h
minor cleanup/simplification (though a bit of a de-optimization) of explosion shading...
[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 #define ALIAS_VERSION   6
31
32 #define ALIAS_ONSEAM                            0x0020
33
34 typedef enum { ALIAS_SINGLE=0, ALIAS_GROUP } aliasframetype_t;
35
36 typedef enum { ALIAS_SKIN_SINGLE=0, ALIAS_SKIN_GROUP } aliasskintype_t;
37
38 typedef struct {
39         int                     ident;
40         int                     version;
41         vec3_t          scale;
42         vec3_t          scale_origin;
43         float           boundingradius;
44         vec3_t          eyeposition;
45         int                     numskins;
46         int                     skinwidth;
47         int                     skinheight;
48         int                     numverts;
49         int                     numtris;
50         int                     numframes;
51         synctype_t      synctype;
52         int                     flags;
53         float           size;
54 } mdl_t;
55
56 // TODO: could be shorts
57
58 typedef struct {
59         int             onseam;
60         int             s;
61         int             t;
62 } stvert_t;
63
64 typedef struct dtriangle_s {
65         int                                     facesfront;
66         int                                     vertindex[3];
67 } dtriangle_t;
68
69 #define DT_FACES_FRONT                          0x0010
70
71 // This mirrors trivert_t in trilib.h, is present so Quake knows how to
72 // load this data
73
74 typedef struct {
75         qbyte   v[3];
76         qbyte   lightnormalindex;
77 } trivertx_t;
78
79 typedef struct {
80         trivertx_t      bboxmin;        // lightnormal isn't used
81         trivertx_t      bboxmax;        // lightnormal isn't used
82         char            name[16];       // frame name from grabbing
83 } daliasframe_t;
84
85 typedef struct {
86         int                     numframes;
87         trivertx_t      bboxmin;        // lightnormal isn't used
88         trivertx_t      bboxmax;        // lightnormal isn't used
89 } daliasgroup_t;
90
91 typedef struct {
92         int                     numskins;
93 } daliasskingroup_t;
94
95 typedef struct {
96         float   interval;
97 } daliasinterval_t;
98
99 typedef struct {
100         float   interval;
101 } daliasskininterval_t;
102
103 typedef struct {
104         aliasframetype_t        type;
105 } daliasframetype_t;
106
107 typedef struct {
108         aliasskintype_t type;
109 } daliasskintype_t;