FTEQW
Documentation of the FTE engine source tree.
modelgen.h
Go to the documentation of this file.
1/*
2Copyright (C) 1996-1997 Id Software, Inc.
3
4This program is free software; you can redistribute it and/or
5modify it under the terms of the GNU General Public License
6as published by the Free Software Foundation; either version 2
7of the License, or (at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
13See the GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program; if not, write to the Free Software
17Foundation, 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#ifdef INCLUDELIBS
31
32#include <stdlib.h>
33#include <stdio.h>
34#include <math.h>
35#include <string.h>
36
37#include "cmdlib.h"
38#include "scriplib.h"
39#include "trilib.h"
40#include "lbmlib.h"
41#include "mathlib.h"
42
43#endif
44
45#define ALIAS_VERSION 6
46#define QTESTALIAS_VERSION 3
47
48#define ALIAS_ONSEAM 0x0020
49
50// must match definition in spritegn.h
51#ifndef SYNCTYPE_T
52#define SYNCTYPE_T
53typedef enum {ST_SYNC=0, ST_RAND } synctype_t;
54#endif
55
57
59
60typedef struct {
61 int ident;
74//qtest stops here
75 int flags; //offset 0x4c
76 float size;
77//quake stops here
78 int num_st;
79//rapo stops here
80} dmdl_t;
81
82// TODO: could be shorts
83
84typedef struct {
85 int onseam;
86 int s;
87 int t;
88} dstvert_t;
89
90typedef struct {
91 short s;
92 short t;
94
95typedef struct dtriangle_s {
97 int vertindex[3];
99
100typedef struct dh2triangle_s {
102 unsigned short vertindex[3];
103 unsigned short stindex[3];
105
106typedef struct dmd2triangle_s {
107 short xyz_index[3];
108 short st_index[3];
110
111#define DT_FACES_FRONT 0x0010
112
113// This mirrors trivert_t in trilib.h, is present so Quake knows how to
114// load this data
115
116typedef struct {
120
121typedef struct {
122 dtrivertx_t bboxmin; // lightnormal isn't used
123 dtrivertx_t bboxmax; // lightnormal isn't used
124// qtest stops here
125 char name[16]; // frame name from grabbing
127
128typedef struct {
130 dtrivertx_t bboxmin; // lightnormal isn't used
131 dtrivertx_t bboxmax; // lightnormal isn't used
133
134typedef struct {
137
138typedef struct {
139 float interval;
141
142typedef struct {
143 float interval;
145
146typedef struct {
149
150typedef struct {
153
154#define IDPOLYHEADER "IDPO",4 /*little-endian "IDPO"*/
155#define RAPOLYHEADER "RAPO",4 /*used by hexen2 mp*/
156#define MD3_IDENT "IDP3",4 /*quake3, duh*/
157
158
vec_t vec3_t[3]
Definition: api_menu.h:40
unsigned char qbyte
Definition: common.h:127
GLuint GLcharARB * name
Definition: glquake.h:155
const GLfloat * v
Definition: glsupp.h:466
synctype_t
Definition: modelgen.h:53
@ ST_RAND
Definition: modelgen.h:53
@ ST_SYNC
Definition: modelgen.h:53
aliasframetype_t
Definition: modelgen.h:56
@ ALIAS_SINGLE
Definition: modelgen.h:56
@ ALIAS_GROUP
Definition: modelgen.h:56
@ ALIAS_GROUP_SWAPPED
Definition: modelgen.h:56
struct dh2triangle_s dh2triangle_t
aliasskintype_t
Definition: modelgen.h:58
@ ALIAS_SKIN_GROUP
Definition: modelgen.h:58
@ ALIAS_SKIN_SINGLE
Definition: modelgen.h:58
struct dtriangle_s dtriangle_t
struct dmd2triangle_s dmd2triangle_t
Definition: modelgen.h:121
dtrivertx_t bboxmax
Definition: modelgen.h:123
dtrivertx_t bboxmin
Definition: modelgen.h:122
Definition: modelgen.h:146
aliasframetype_t type
Definition: modelgen.h:147
Definition: modelgen.h:128
dtrivertx_t bboxmin
Definition: modelgen.h:130
int numframes
Definition: modelgen.h:129
dtrivertx_t bboxmax
Definition: modelgen.h:131
Definition: modelgen.h:138
float interval
Definition: modelgen.h:139
Definition: modelgen.h:134
int numskins
Definition: modelgen.h:135
Definition: modelgen.h:142
float interval
Definition: modelgen.h:143
Definition: modelgen.h:150
aliasskintype_t type
Definition: modelgen.h:151
Definition: modelgen.h:100
int facesfront
Definition: modelgen.h:101
unsigned short stindex[3]
Definition: modelgen.h:103
unsigned short vertindex[3]
Definition: modelgen.h:102
Definition: modelgen.h:90
short s
Definition: modelgen.h:91
short t
Definition: modelgen.h:92
Definition: modelgen.h:106
short st_index[3]
Definition: modelgen.h:108
short xyz_index[3]
Definition: modelgen.h:107
Definition: modelgen.h:60
int version
Definition: modelgen.h:62
float size
Definition: modelgen.h:76
int flags
Definition: modelgen.h:75
int numtris
Definition: modelgen.h:71
int numskins
Definition: modelgen.h:67
vec3_t scale_origin
Definition: modelgen.h:64
int numverts
Definition: modelgen.h:70
vec3_t eyeposition
Definition: modelgen.h:66
int skinheight
Definition: modelgen.h:69
int numframes
Definition: modelgen.h:72
int num_st
Definition: modelgen.h:78
int ident
Definition: modelgen.h:61
int skinwidth
Definition: modelgen.h:68
float boundingradius
Definition: modelgen.h:65
vec3_t scale
Definition: modelgen.h:63
synctype_t synctype
Definition: modelgen.h:73
Definition: modelgen.h:84
int t
Definition: modelgen.h:87
int onseam
Definition: modelgen.h:85
int s
Definition: modelgen.h:86
Definition: modelgen.h:95
int facesfront
Definition: modelgen.h:96
int vertindex[3]
Definition: modelgen.h:97
Definition: modelgen.h:116
qbyte lightnormalindex
Definition: modelgen.h:118