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