]> git.xonotic.org Git - xonotic/darkplaces.git/blob - modelgen.h
Fix an IO exception on exit when using -condebug because FS_Close was trying to log...
[xonotic/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 #include "qtypes.h"
34
35 #define ALIAS_VERSION   6
36
37 #define ALIAS_ONSEAM                            0x0020
38
39 typedef enum aliasframetype_e { ALIAS_SINGLE=0, ALIAS_GROUP } aliasframetype_t;
40
41 typedef enum aliasskintype_e { ALIAS_SKIN_SINGLE=0, ALIAS_SKIN_GROUP } aliasskintype_t;
42
43 typedef struct mdl_s
44 {
45         int                     ident;
46         int                     version;
47         vec3_t          scale;
48         vec3_t          scale_origin;
49         float           boundingradius;
50         vec3_t          eyeposition;
51         int                     numskins;
52         int                     skinwidth;
53         int                     skinheight;
54         int                     numverts;
55         int                     numtris;
56         int                     numframes;
57         int                     synctype;
58         int                     flags;
59         float           size;
60 }
61 mdl_t;
62
63 // TODO: could be shorts
64
65 typedef struct stvert_s
66 {
67         int             onseam;
68         int             s;
69         int             t;
70 }
71 stvert_t;
72
73 typedef struct dtriangle_s
74 {
75         int                                     facesfront;
76         int                                     vertindex[3];
77 }
78 dtriangle_t;
79
80 #define DT_FACES_FRONT                          0x0010
81
82 // This mirrors trivert_t in trilib.h, is present so Quake knows how to
83 // load this data
84
85 typedef struct trivertx_s
86 {
87         unsigned char   v[3];
88         unsigned char   lightnormalindex;
89 }
90 trivertx_t;
91
92 typedef struct daliasframe_s
93 {
94         trivertx_t      bboxmin;        // lightnormal isn't used
95         trivertx_t      bboxmax;        // lightnormal isn't used
96         char            name[16];       // frame name from grabbing
97 }
98 daliasframe_t;
99
100 typedef struct daliasgroup_s
101 {
102         int                     numframes;
103         trivertx_t      bboxmin;        // lightnormal isn't used
104         trivertx_t      bboxmax;        // lightnormal isn't used
105 }
106 daliasgroup_t;
107
108 typedef struct daliasskingroup_s
109 {
110         int                     numskins;
111 }
112 daliasskingroup_t;
113
114 typedef struct daliasinterval_s
115 {
116         float   interval;
117 }
118 daliasinterval_t;
119
120 typedef struct daliasskininterval_s
121 {
122         float   interval;
123 }
124 daliasskininterval_t;
125
126 typedef struct daliasframetype_s
127 {
128         aliasframetype_t        type;
129 }
130 daliasframetype_t;
131
132 typedef struct daliasskintype_s
133 {
134         aliasskintype_t type;
135 }
136 daliasskintype_t;
137
138 #endif
139