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