OGRE
1.7
Object-Oriented Graphics Rendering Engine
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
OgreQuake3Types.h
Go to the documentation of this file.
1
// Quake 3 data definitions
2
// Copyright (C) 1999-2000 Id Software, Inc.
3
//
4
// This file must be identical in the quake and utils directories
5
6
// contents flags are seperate bits
7
// a given brush can contribute multiple content bits
8
9
// these definitions also need to be in q_shared.h!
10
#ifndef __Quake3Types_H__
11
#define __Quake3Types_H__
12
13
14
#define BSP_HEADER_ID (*(int*)"IBSP")
15
#define BSP_HEADER_VER (46)
16
17
#define BSP_ENTITIES_LUMP (0)
18
#define BSP_SHADERS_LUMP (1)
19
#define BSP_PLANES_LUMP (2)
20
#define BSP_NODES_LUMP (3)
21
#define BSP_LEAVES_LUMP (4)
22
#define BSP_LFACES_LUMP (5)
23
#define BSP_LBRUSHES_LUMP (6)
24
#define BSP_MODELS_LUMP (7)
25
#define BSP_BRUSH_LUMP (8)
26
#define BSP_BRUSHSIDES_LUMP (9)
27
#define BSP_VERTICES_LUMP (10)
28
#define BSP_ELEMENTS_LUMP (11)
29
#define BSP_FOG_LUMP (12)
30
#define BSP_FACES_LUMP (13)
31
#define BSP_LIGHTMAPS_LUMP (14)
32
#define BSP_LIGHTVOLS_LUMP (15)
33
#define BSP_VISIBILITY_LUMP (16)
34
35
#define BSP_LIGHTMAP_BANKSIZE (128*128*3)
36
37
38
#define CONTENTS_SOLID 1 // an eye is never valid in a solid
39
#define CONTENTS_LAVA 8
40
#define CONTENTS_SLIME 16
41
#define CONTENTS_WATER 32
42
#define CONTENTS_FOG 64
43
44
#define CONTENTS_AREAPORTAL 0x8000
45
46
#define CONTENTS_PLAYERCLIP 0x10000
47
#define CONTENTS_MONSTERCLIP 0x20000
48
//bot specific contents types
49
#define CONTENTS_TELEPORTER 0x40000
50
#define CONTENTS_JUMPPAD 0x80000
51
#define CONTENTS_CLUSTERPORTAL 0x100000
52
#define CONTENTS_DONOTENTER 0x200000
53
54
#define CONTENTS_ORIGIN 0x1000000 // removed before bsping an entity
55
56
#define CONTENTS_BODY 0x2000000 // should never be on a brush, only in game
57
#define CONTENTS_CORPSE 0x4000000
58
#define CONTENTS_DETAIL 0x8000000 // brushes not used for the bsp
59
#define CONTENTS_STRUCTURAL 0x10000000 // brushes used for the bsp
60
#define CONTENTS_TRANSLUCENT 0x20000000 // don't consume surface fragments inside
61
#define CONTENTS_TRIGGER 0x40000000
62
#define CONTENTS_NODROP 0x80000000 // don't leave bodies or items (death fog, lava)
63
64
#define SURF_NODAMAGE 0x1 // never give falling damage
65
#define SURF_SLICK 0x2 // effects game physics
66
#define SURF_SKY 0x4 // lighting from environment map
67
#define SURF_LADDER 0x8
68
#define SURF_NOIMPACT 0x10 // don't make missile explosions
69
#define SURF_NOMARKS 0x20 // don't leave missile marks
70
#define SURF_FLESH 0x40 // make flesh sounds and effects
71
#define SURF_NODRAW 0x80 // don't generate a drawsurface at all
72
#define SURF_HINT 0x100 // make a primary bsp splitter
73
#define SURF_SKIP 0x200 // completely ignore, allowing non-closed brushes
74
#define SURF_NOLIGHTMAP 0x400 // surface doesn't need a lightmap
75
#define SURF_POINTLIGHT 0x800 // generate lighting info at vertexes
76
#define SURF_METALSTEPS 0x1000 // clanking footsteps
77
#define SURF_NOSTEPS 0x2000 // no footstep sounds
78
#define SURF_NONSOLID 0x4000 // don't collide against curves with this set
79
#define SURF_LIGHTFILTER 0x8000 // act as a light filter during q3map -light
80
#define SURF_ALPHASHADOW 0x10000 // do per-pixel light shadow casting in q3map
81
#define SURF_NODLIGHT 0x20000 // don't dlight even if solid (solid lava, skies)
82
83
/* Shader flags */
84
enum
85
{
86
SHADER_NOCULL
= 1 << 0,
87
SHADER_TRANSPARENT
= 1 << 1,
88
SHADER_DEPTHWRITE
= 1 << 2,
89
SHADER_SKY
= 1 << 3,
90
SHADER_NOMIPMAPS
= 1 << 4,
91
SHADER_NEEDCOLOURS
= 1 << 5,
92
SHADER_DEFORMVERTS
= 1 << 6
93
};
94
95
/* Shaderpass flags */
96
enum
97
{
98
SHADER_LIGHTMAP
= 1 << 0,
99
SHADER_BLEND
= 1 << 1,
100
SHADER_ALPHAFUNC
= 1 << 3,
101
SHADER_TCMOD
= 1 << 4,
102
SHADER_ANIMMAP
= 1 << 5,
103
SHADER_TCGEN_ENV
= 1 << 6
104
};
105
106
/* Transform functions */
107
enum
WaveType
108
{
109
SHADER_FUNC_NONE
= 0,
110
SHADER_FUNC_SIN
= 1,
111
SHADER_FUNC_TRIANGLE
= 2,
112
SHADER_FUNC_SQUARE
= 3,
113
SHADER_FUNC_SAWTOOTH
= 4,
114
SHADER_FUNC_INVERSESAWTOOTH
= 5
115
};
116
117
/* *Gen functions */
118
enum
GenFunc
119
{
120
SHADER_GEN_IDENTITY
= 0,
121
SHADER_GEN_WAVE
= 1,
122
SHADER_GEN_VERTEX
= 2
123
};
124
125
enum
TexGen
126
{
127
TEXGEN_BASE
= 0,
// Coord set 0
128
TEXGEN_LIGHTMAP
= 1,
// Coord set 1
129
TEXGEN_ENVIRONMENT
= 2
// Neither, generated
130
};
131
132
enum
DeformFunc
133
{
134
DEFORM_FUNC_NONE
= 0,
135
DEFORM_FUNC_BULGE
= 1,
136
DEFORM_FUNC_WAVE
= 2,
137
DEFORM_FUNC_NORMAL
= 3,
138
DEFORM_FUNC_MOVE
= 4,
139
DEFORM_FUNC_AUTOSPRITE
= 5,
140
DEFORM_FUNC_AUTOSPRITE2
= 6
141
142
};
144
//
145
// bsp contents
146
//
147
148
struct
bsp_plane_t
{
149
float
normal
[3];
150
float
dist
;
151
};
152
153
struct
bsp_model_t
{
154
float
bbox
[6];
155
int
face_start
;
156
int
face_count
;
157
int
brush_start
;
158
int
brush_count
;
159
};
160
161
struct
bsp_node_t
{
162
int
plane
;
// dividing plane
163
//int children[2]; // left and right nodes,
164
// negative are leaves
165
int
front
;
166
int
back
;
167
int
bbox
[6];
168
};
169
170
struct
bsp_leaf_t
{
171
int
cluster
;
// visibility cluster number
172
int
area
;
173
int
bbox
[6];
174
int
face_start
;
175
int
face_count
;
176
int
brush_start
;
177
int
brush_count
;
178
};
179
180
#define BSP_FACETYPE_NORMAL (1)
181
#define BSP_FACETYPE_PATCH (2)
182
#define BSP_FACETYPE_MESH (3)
183
#define BSP_FACETYPE_FLARE (4)
184
185
struct
bsp_face_t
{
186
int
shader
;
// shader ref
187
int
unknown
;
188
int
type
;
// face type
189
int
vert_start
;
190
int
vert_count
;
191
int
elem_start
;
192
int
elem_count
;
193
int
lm_texture
;
// lightmap
194
int
lm_offset
[2];
195
int
lm_size
[2];
196
float
org
[3];
// facetype_normal only
197
float
bbox
[6];
// facetype_patch only
198
float
normal
[3];
// facetype_normal only
199
int
mesh_cp
[2];
// patch control point dims
200
};
201
202
struct
bsp_shader_t
{
203
char
name
[64];
204
int
surface_flags
;
205
int
content_flags
;
206
};
207
208
struct
bsp_vertex_t
{
209
float
point
[3];
210
float
texture
[2];
211
float
lightmap
[2];
212
float
normal
[3];
213
int
color
;
214
};
215
216
struct
bsp_vis_t
{
217
int
cluster_count
;
218
int
row_size
;
219
unsigned
char
data
[1];
220
};
221
222
// OGRE additions
223
struct
bsp_lump_entry_t
{
224
int
offset
;
225
int
size
;
226
};
227
struct
bsp_header_t
{
228
char
magic
[4];
229
int
version
;
230
bsp_lump_entry_t
lumps
[17];
231
};
232
233
//
234
// Brushes sides in BSP tree
235
//
236
struct
bsp_brushside_t
{
237
int
planenum
;
238
int
content
;
// ??shader??
239
};
240
241
242
//
243
// Brushes in BSP tree
244
//
245
struct
bsp_brush_t
{
246
int
firstside
;
247
int
numsides
;
248
int
shaderIndex
;
249
};
250
#endif
SHADER_ALPHAFUNC
Definition:
OgreQuake3Types.h:100
bsp_node_t::back
int back
Definition:
OgreQuake3Types.h:166
bsp_brush_t
Definition:
OgreQuake3Types.h:245
bsp_leaf_t::brush_start
int brush_start
Definition:
OgreQuake3Types.h:176
bsp_vis_t::row_size
int row_size
Definition:
OgreQuake3Types.h:218
bsp_face_t::lm_size
int lm_size[2]
Definition:
OgreQuake3Types.h:195
SHADER_LIGHTMAP
Definition:
OgreQuake3Types.h:98
bsp_vertex_t::point
float point[3]
Definition:
OgreQuake3Types.h:209
bsp_header_t
Definition:
OgreQuake3Types.h:227
bsp_plane_t::dist
float dist
Definition:
OgreQuake3Types.h:150
bsp_lump_entry_t::size
int size
Definition:
OgreQuake3Types.h:225
bsp_node_t
Definition:
OgreQuake3Types.h:161
SHADER_TCGEN_ENV
Definition:
OgreQuake3Types.h:103
GenFunc
GenFunc
Definition:
OgreQuake3Types.h:118
SHADER_FUNC_NONE
Definition:
OgreQuake3Types.h:109
bsp_model_t
Definition:
OgreQuake3Types.h:153
bsp_model_t::bbox
float bbox[6]
Definition:
OgreQuake3Types.h:154
bsp_model_t::brush_count
int brush_count
Definition:
OgreQuake3Types.h:158
bsp_header_t::magic
char magic[4]
Definition:
OgreQuake3Types.h:228
SHADER_BLEND
Definition:
OgreQuake3Types.h:99
bsp_model_t::brush_start
int brush_start
Definition:
OgreQuake3Types.h:157
bsp_header_t::lumps
bsp_lump_entry_t lumps[17]
Definition:
OgreQuake3Types.h:230
bsp_vertex_t::lightmap
float lightmap[2]
Definition:
OgreQuake3Types.h:211
bsp_brush_t::shaderIndex
int shaderIndex
Definition:
OgreQuake3Types.h:248
bsp_face_t::lm_texture
int lm_texture
Definition:
OgreQuake3Types.h:193
DEFORM_FUNC_AUTOSPRITE2
Definition:
OgreQuake3Types.h:140
DEFORM_FUNC_BULGE
Definition:
OgreQuake3Types.h:135
DEFORM_FUNC_NONE
Definition:
OgreQuake3Types.h:134
TEXGEN_LIGHTMAP
Definition:
OgreQuake3Types.h:128
SHADER_FUNC_SQUARE
Definition:
OgreQuake3Types.h:112
DEFORM_FUNC_MOVE
Definition:
OgreQuake3Types.h:138
bsp_brushside_t
Definition:
OgreQuake3Types.h:236
bsp_face_t::elem_start
int elem_start
Definition:
OgreQuake3Types.h:191
bsp_plane_t::normal
float normal[3]
Definition:
OgreQuake3Types.h:149
bsp_face_t::vert_count
int vert_count
Definition:
OgreQuake3Types.h:190
DEFORM_FUNC_NORMAL
Definition:
OgreQuake3Types.h:137
SHADER_GEN_VERTEX
Definition:
OgreQuake3Types.h:122
SHADER_NEEDCOLOURS
Definition:
OgreQuake3Types.h:91
bsp_leaf_t::face_count
int face_count
Definition:
OgreQuake3Types.h:175
TEXGEN_BASE
Definition:
OgreQuake3Types.h:127
bsp_shader_t::content_flags
int content_flags
Definition:
OgreQuake3Types.h:205
SHADER_NOCULL
Definition:
OgreQuake3Types.h:86
SHADER_DEPTHWRITE
Definition:
OgreQuake3Types.h:88
bsp_leaf_t::area
int area
Definition:
OgreQuake3Types.h:172
bsp_vertex_t::normal
float normal[3]
Definition:
OgreQuake3Types.h:212
bsp_vertex_t
Definition:
OgreQuake3Types.h:208
SHADER_FUNC_INVERSESAWTOOTH
Definition:
OgreQuake3Types.h:114
bsp_node_t::plane
int plane
Definition:
OgreQuake3Types.h:162
SHADER_DEFORMVERTS
Definition:
OgreQuake3Types.h:92
bsp_shader_t
Definition:
OgreQuake3Types.h:202
bsp_lump_entry_t::offset
int offset
Definition:
OgreQuake3Types.h:224
bsp_face_t::normal
float normal[3]
Definition:
OgreQuake3Types.h:198
TEXGEN_ENVIRONMENT
Definition:
OgreQuake3Types.h:129
bsp_face_t::org
float org[3]
Definition:
OgreQuake3Types.h:196
bsp_vertex_t::color
int color
Definition:
OgreQuake3Types.h:213
bsp_face_t::mesh_cp
int mesh_cp[2]
Definition:
OgreQuake3Types.h:199
bsp_node_t::bbox
int bbox[6]
Definition:
OgreQuake3Types.h:167
SHADER_SKY
Definition:
OgreQuake3Types.h:89
bsp_shader_t::surface_flags
int surface_flags
Definition:
OgreQuake3Types.h:204
bsp_face_t::lm_offset
int lm_offset[2]
Definition:
OgreQuake3Types.h:194
bsp_header_t::version
int version
Definition:
OgreQuake3Types.h:229
bsp_brush_t::numsides
int numsides
Definition:
OgreQuake3Types.h:247
SHADER_GEN_IDENTITY
Definition:
OgreQuake3Types.h:120
bsp_face_t::bbox
float bbox[6]
Definition:
OgreQuake3Types.h:197
bsp_shader_t::name
char name[64]
Definition:
OgreQuake3Types.h:203
SHADER_FUNC_TRIANGLE
Definition:
OgreQuake3Types.h:111
bsp_model_t::face_count
int face_count
Definition:
OgreQuake3Types.h:156
bsp_brushside_t::content
int content
Definition:
OgreQuake3Types.h:238
bsp_brush_t::firstside
int firstside
Definition:
OgreQuake3Types.h:246
SHADER_GEN_WAVE
Definition:
OgreQuake3Types.h:121
bsp_leaf_t::brush_count
int brush_count
Definition:
OgreQuake3Types.h:177
bsp_vertex_t::texture
float texture[2]
Definition:
OgreQuake3Types.h:210
bsp_vis_t::data
unsigned char data[1]
Definition:
OgreQuake3Types.h:219
bsp_face_t::type
int type
Definition:
OgreQuake3Types.h:188
TexGen
TexGen
Definition:
OgreQuake3Types.h:125
SHADER_TCMOD
Definition:
OgreQuake3Types.h:101
bsp_plane_t
Definition:
OgreQuake3Types.h:148
bsp_face_t::shader
int shader
Definition:
OgreQuake3Types.h:186
bsp_leaf_t::face_start
int face_start
Definition:
OgreQuake3Types.h:174
SHADER_NOMIPMAPS
Definition:
OgreQuake3Types.h:90
WaveType
WaveType
Definition:
OgreQuake3Types.h:107
bsp_vis_t
Definition:
OgreQuake3Types.h:216
bsp_leaf_t::bbox
int bbox[6]
Definition:
OgreQuake3Types.h:173
bsp_face_t::elem_count
int elem_count
Definition:
OgreQuake3Types.h:192
bsp_leaf_t::cluster
int cluster
Definition:
OgreQuake3Types.h:171
bsp_face_t
Definition:
OgreQuake3Types.h:185
SHADER_ANIMMAP
Definition:
OgreQuake3Types.h:102
SHADER_TRANSPARENT
Definition:
OgreQuake3Types.h:87
bsp_face_t::vert_start
int vert_start
Definition:
OgreQuake3Types.h:189
DEFORM_FUNC_WAVE
Definition:
OgreQuake3Types.h:136
DeformFunc
DeformFunc
Definition:
OgreQuake3Types.h:132
bsp_brushside_t::planenum
int planenum
Definition:
OgreQuake3Types.h:237
bsp_vis_t::cluster_count
int cluster_count
Definition:
OgreQuake3Types.h:217
DEFORM_FUNC_AUTOSPRITE
Definition:
OgreQuake3Types.h:139
SHADER_FUNC_SIN
Definition:
OgreQuake3Types.h:110
bsp_leaf_t
Definition:
OgreQuake3Types.h:170
bsp_lump_entry_t
Definition:
OgreQuake3Types.h:223
bsp_face_t::unknown
int unknown
Definition:
OgreQuake3Types.h:187
bsp_node_t::front
int front
Definition:
OgreQuake3Types.h:165
SHADER_FUNC_SAWTOOTH
Definition:
OgreQuake3Types.h:113
bsp_model_t::face_start
int face_start
Definition:
OgreQuake3Types.h:155
Plugins
BSPSceneManager
include
OgreQuake3Types.h
Generated on Fri Jun 20 2014 01:03:16 for OGRE by
1.8.7