1 /* -------------------------------------------------------------------------------
3 Copyright (C) 1999-2007 id Software, Inc. and contributors.
4 For a list of contributors, see the accompanying CONTRIBUTORS file.
6 This file is part of GtkRadiant.
8 GtkRadiant is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 GtkRadiant is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GtkRadiant; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 ----------------------------------------------------------------------------------
24 This code has been altered significantly from its original form, to support
25 several games based on the Quake III Arena engine, in the form of "Q3Map2."
27 ------------------------------------------------------------------------------- */
37 /* -------------------------------------------------------------------------------
39 content and surface flags
41 ------------------------------------------------------------------------------- */
44 #define U_CONT_SOLID 1 /* an eye is never valid in a solid */
46 #define U_CONT_SLIME 16
47 #define U_CONT_WATER 32
50 #define U_CONT_AREAPORTAL 0x8000
52 #define U_CONT_PLAYERCLIP 0x10000
53 #define U_CONT_MONSTERCLIP 0x20000
54 #define U_CONT_TELEPORTER 0x40000
55 #define U_CONT_JUMPPAD 0x80000
56 #define U_CONT_CLUSTERPORTAL 0x100000
57 #define U_CONT_DONOTENTER 0x200000
58 #define U_CONT_BOTCLIP 0x400000
60 #define U_CONT_ORIGIN 0x1000000 /* removed before bsping an entity */
62 #define U_CONT_BODY 0x2000000 /* should never be on a brush, only in game */
63 #define U_CONT_CORPSE 0x4000000
64 #define U_CONT_DETAIL 0x8000000 /* brushes not used for the bsp */
65 #define U_CONT_STRUCTURAL 0x10000000 /* brushes used for the bsp */
66 #define U_CONT_TRANSLUCENT 0x20000000 /* don't consume surface fragments inside */
67 #define U_CONT_TRIGGER 0x40000000
68 #define U_CONT_NODROP 0x80000000 /* don't leave bodies or items (death fog, lava) */
70 #define U_SURF_NODAMAGE 0x1 /* never give falling damage */
71 #define U_SURF_SLICK 0x2 /* effects game physics */
72 #define U_SURF_SKY 0x4 /* lighting from environment map */
73 #define U_SURF_LADDER 0x8
74 #define U_SURF_NOIMPACT 0x10 /* don't make missile explosions */
75 #define U_SURF_NOMARKS 0x20 /* don't leave missile marks */
76 #define U_SURF_FLESH 0x40 /* make flesh sounds and effects */
77 #define U_SURF_NODRAW 0x80 /* don't generate a drawsurface at all */
78 #define U_SURF_HINT 0x100 /* make a primary bsp splitter */
79 #define U_SURF_SKIP 0x200 /* completely ignore, allowing non-closed brushes */
80 #define U_SURF_NOLIGHTMAP 0x400 /* surface doesn't need a lightmap */
81 #define U_SURF_POINTLIGHT 0x800 /* generate lighting info at vertexes */
82 #define U_SURF_METALSTEPS 0x1000 /* clanking footsteps */
83 #define U_SURF_NOSTEPS 0x2000 /* no footstep sounds */
84 #define U_SURF_NONSOLID 0x4000 /* don't collide against curves with this set */
85 #define U_SURF_LIGHTFILTER 0x8000 /* act as a light filter during q3map -light */
86 #define U_SURF_ALPHASHADOW 0x10000 /* do per-pixel light shadow casting in q3map */
87 #define U_SURF_NODLIGHT 0x20000 /* don't dlight even if solid (solid lava, skies) */
88 #define U_SURF_DUST 0x40000 /* leave a dust trail when walking on this surface */
91 #define U_SURF_VERTEXLIT (U_SURF_POINTLIGHT | U_SURF_NOLIGHTMAP)
94 #define U_MAT_MASK 0xFFF00000 /* mask to get the material type */
96 #define U_MAT_NONE 0x00000000
97 #define U_MAT_TIN 0x00100000
98 #define U_MAT_ALUMINUM 0x00200000
99 #define U_MAT_IRON 0x00300000
100 #define U_MAT_TITANIUM 0x00400000
101 #define U_MAT_STEEL 0x00500000
102 #define U_MAT_BRASS 0x00600000
103 #define U_MAT_COPPER 0x00700000
104 #define U_MAT_CEMENT 0x00800000
105 #define U_MAT_ROCK 0x00900000
106 #define U_MAT_GRAVEL 0x00A00000
107 #define U_MAT_PAVEMENT 0x00B00000
108 #define U_MAT_BRICK 0x00C00000
109 #define U_MAT_CLAY 0x00D00000
110 #define U_MAT_GRASS 0x00E00000
111 #define U_MAT_DIRT 0x00F00000
112 #define U_MAT_MUD 0x01000000
113 #define U_MAT_SNOW 0x01100000
114 #define U_MAT_ICE 0x01200000
115 #define U_MAT_SAND 0x01300000
116 #define U_MAT_CERAMICTILE 0x01400000
117 #define U_MAT_LINOLEUM 0x01500000
118 #define U_MAT_RUG 0x01600000
119 #define U_MAT_PLASTER 0x01700000
120 #define U_MAT_PLASTIC 0x01800000
121 #define U_MAT_CARDBOARD 0x01900000
122 #define U_MAT_HARDWOOD 0x01A00000
123 #define U_MAT_SOFTWOOD 0x01B00000
124 #define U_MAT_PLANK 0x01C00000
125 #define U_MAT_GLASS 0x01D00000
126 #define U_MAT_WATER 0x01E00000
127 #define U_MAT_STUCCO 0x01F00000
131 /* -------------------------------------------------------------------------------
135 ------------------------------------------------------------------------------- */
138 "etut", /* -game x */
139 "etut", /* default base game data dir */
140 ".etwolf", /* unix home sub-dir */
141 "et", /* magic path word */
142 "scripts", /* shader directory */
143 1024, /* max lightmapped surface verts */
144 1024, /* max surface verts */
145 6144, /* max surface indexes */
147 "flareshader", /* default flare shader */
148 qfalse, /* wolf lighting model? */
149 128, /* lightmap width/height */
150 1.0f, /* lightmap gamma */
151 qtrue, /* lightmap sRGB */
152 qfalse, /* texture sRGB (yes, this is incorrect, but we better match ET:UT) */
153 1.0f, /* lightmap exposure */
154 1.0f, /* lightmap compensate */
155 1.0f, /* lightgrid scale */
156 1.0f, /* lightgrid ambient scale */
157 qfalse, /* light angle attenuation uses half-lambert curve */
158 qfalse, /* disable shader lightstyles hack */
159 qfalse, /* keep light entities on bsp */
160 8, /* default patchMeta subdivisions tolerance */
161 qfalse, /* patch casting enabled */
162 qfalse, /* compile deluxemaps */
163 0, /* deluxemaps default mode */
164 512, /* minimap size */
165 1.0f, /* minimap sharpener */
166 0.0f, /* minimap border */
167 qtrue, /* minimap keep aspect */
168 MINIMAP_MODE_GRAY, /* minimap mode */
169 "%s.tga", /* minimap name format */
170 "IBSP", /* bsp file prefix */
171 47, /* bsp file version */
172 qfalse, /* cod-style lump len/ofs order */
173 LoadIBSPFile, /* bsp load function */
174 WriteIBSPFile, /* bsp write function */
177 /* name contentFlags contentFlagsClear surfaceFlags surfaceFlagsClear compileFlags compileFlagsClear */
180 { "default", U_CONT_SOLID, -1, 0, -1, C_SOLID, -1 },
184 { "lightgrid", 0, 0, 0, 0, C_LIGHTGRID, 0 },
185 { "antiportal", 0, 0, 0, 0, C_ANTIPORTAL, 0 },
186 { "skip", 0, 0, 0, 0, C_SKIP, 0 },
190 { "origin", U_CONT_ORIGIN, U_CONT_SOLID, 0, 0, C_ORIGIN | C_TRANSLUCENT, C_SOLID },
191 { "areaportal", U_CONT_AREAPORTAL, U_CONT_SOLID, 0, 0, C_AREAPORTAL | C_TRANSLUCENT, C_SOLID },
192 { "trans", U_CONT_TRANSLUCENT, 0, 0, 0, C_TRANSLUCENT, 0 },
193 { "detail", U_CONT_DETAIL, 0, 0, 0, C_DETAIL, 0 },
194 { "structural", U_CONT_STRUCTURAL, 0, 0, 0, C_STRUCTURAL, 0 },
195 { "hint", 0, 0, U_SURF_HINT, 0, C_HINT, 0 },
196 { "nodraw", 0, 0, U_SURF_NODRAW, 0, C_NODRAW, 0 },
198 { "alphashadow", 0, 0, U_SURF_ALPHASHADOW, 0, C_ALPHASHADOW | C_TRANSLUCENT, 0 },
199 { "lightfilter", 0, 0, U_SURF_LIGHTFILTER, 0, C_LIGHTFILTER | C_TRANSLUCENT, 0 },
200 { "nolightmap", 0, 0, U_SURF_VERTEXLIT, 0, C_VERTEXLIT, 0 },
201 { "pointlight", 0, 0, U_SURF_VERTEXLIT, 0, C_VERTEXLIT, 0 },
205 { "nonsolid", 0, U_CONT_SOLID, U_SURF_NONSOLID, 0, 0, C_SOLID },
207 { "trigger", U_CONT_TRIGGER, U_CONT_SOLID, 0, 0, C_TRANSLUCENT, C_SOLID },
209 { "water", U_CONT_WATER, U_CONT_SOLID, 0, 0, C_LIQUID | C_TRANSLUCENT, C_SOLID },
210 { "slime", U_CONT_SLIME, U_CONT_SOLID, 0, 0, C_LIQUID | C_TRANSLUCENT, C_SOLID },
211 { "lava", U_CONT_LAVA, U_CONT_SOLID, 0, 0, C_LIQUID | C_TRANSLUCENT, C_SOLID },
213 { "playerclip", U_CONT_PLAYERCLIP, U_CONT_SOLID, 0, 0, C_DETAIL | C_TRANSLUCENT, C_SOLID },
214 { "monsterclip", U_CONT_MONSTERCLIP, U_CONT_SOLID, 0, 0, C_DETAIL | C_TRANSLUCENT, C_SOLID },
215 { "nodrop", U_CONT_NODROP, U_CONT_SOLID, 0, 0, C_TRANSLUCENT, C_SOLID },
217 { "clusterportal", U_CONT_CLUSTERPORTAL, U_CONT_SOLID, 0, 0, C_TRANSLUCENT, C_SOLID },
218 { "donotenter", U_CONT_DONOTENTER, U_CONT_SOLID, 0, 0, C_TRANSLUCENT, C_SOLID },
219 { "botclip", U_CONT_BOTCLIP, U_CONT_SOLID, 0, 0, C_TRANSLUCENT, C_SOLID },
221 { "fog", U_CONT_FOG, U_CONT_SOLID, 0, 0, C_FOG, C_SOLID },
222 { "sky", 0, 0, U_SURF_SKY, 0, C_SKY, 0 },
224 { "slick", 0, 0, U_SURF_SLICK, 0, 0, 0 },
226 { "noimpact", 0, 0, U_SURF_NOIMPACT, 0, 0, 0 },
227 { "nomarks", 0, 0, U_SURF_NOMARKS, 0, C_NOMARKS, 0 },
228 { "ladder", 0, 0, U_SURF_LADDER, 0, 0, 0 },
229 { "nodamage", 0, 0, U_SURF_NODAMAGE, 0, 0, 0 },
230 { "metalsteps", 0, 0, U_SURF_METALSTEPS, 0, 0, 0 },
231 { "flesh", 0, 0, U_SURF_FLESH, 0, 0, 0 },
232 { "nosteps", 0, 0, U_SURF_NOSTEPS, 0, 0, 0 },
233 { "nodlight", 0, 0, U_SURF_NODLIGHT, 0, 0, 0 },
234 { "dust", 0, 0, U_SURF_DUST, 0, 0, 0 },
238 { "*mat_none", 0, 0, U_MAT_NONE, U_MAT_MASK, 0, 0 },
239 { "*mat_tin", 0, 0, U_MAT_TIN, U_MAT_MASK, 0, 0 },
240 { "*mat_aluminum", 0, 0, U_MAT_ALUMINUM, U_MAT_MASK, 0, 0 },
241 { "*mat_iron", 0, 0, U_MAT_IRON, U_MAT_MASK, 0, 0 },
242 { "*mat_titanium", 0, 0, U_MAT_TITANIUM, U_MAT_MASK, 0, 0 },
243 { "*mat_steel", 0, 0, U_MAT_STEEL, U_MAT_MASK, 0, 0 },
244 { "*mat_brass", 0, 0, U_MAT_BRASS, U_MAT_MASK, 0, 0 },
245 { "*mat_copper", 0, 0, U_MAT_COPPER, U_MAT_MASK, 0, 0 },
246 { "*mat_cement", 0, 0, U_MAT_CEMENT, U_MAT_MASK, 0, 0 },
247 { "*mat_rock", 0, 0, U_MAT_ROCK, U_MAT_MASK, 0, 0 },
248 { "*mat_gravel", 0, 0, U_MAT_GRAVEL, U_MAT_MASK, 0, 0 },
249 { "*mat_pavement", 0, 0, U_MAT_PAVEMENT, U_MAT_MASK, 0, 0 },
250 { "*mat_brick", 0, 0, U_MAT_BRICK, U_MAT_MASK, 0, 0 },
251 { "*mat_clay", 0, 0, U_MAT_CLAY, U_MAT_MASK, 0, 0 },
252 { "*mat_grass", 0, 0, U_MAT_GRASS, U_MAT_MASK, 0, 0 },
253 { "*mat_dirt", 0, 0, U_MAT_DIRT, U_MAT_MASK, 0, 0 },
254 { "*mat_mud", 0, 0, U_MAT_MUD, U_MAT_MASK, 0, 0 },
255 { "*mat_snow", 0, 0, U_MAT_SNOW, U_MAT_MASK, 0, 0 },
256 { "*mat_ice", 0, 0, U_MAT_ICE, U_MAT_MASK, 0, 0 },
257 { "*mat_sand", 0, 0, U_MAT_SAND, U_MAT_MASK, 0, 0 },
258 { "*mat_ceramic", 0, 0, U_MAT_CERAMICTILE, U_MAT_MASK, 0, 0 },
259 { "*mat_ceramictile", 0, 0, U_MAT_CERAMICTILE, U_MAT_MASK, 0, 0 },
260 { "*mat_linoleum", 0, 0, U_MAT_LINOLEUM, U_MAT_MASK, 0, 0 },
261 { "*mat_rug", 0, 0, U_MAT_RUG, U_MAT_MASK, 0, 0 },
262 { "*mat_plaster", 0, 0, U_MAT_PLASTER, U_MAT_MASK, 0, 0 },
263 { "*mat_plastic", 0, 0, U_MAT_PLASTIC, U_MAT_MASK, 0, 0 },
264 { "*mat_cardboard", 0, 0, U_MAT_CARDBOARD, U_MAT_MASK, 0, 0 },
265 { "*mat_hardwood", 0, 0, U_MAT_HARDWOOD, U_MAT_MASK, 0, 0 },
266 { "*mat_softwood", 0, 0, U_MAT_SOFTWOOD, U_MAT_MASK, 0, 0 },
267 { "*mat_plank", 0, 0, U_MAT_PLANK, U_MAT_MASK, 0, 0 },
268 { "*mat_glass", 0, 0, U_MAT_GLASS, U_MAT_MASK, 0, 0 },
269 { "*mat_water", 0, 0, U_MAT_WATER, U_MAT_MASK, 0, 0 },
270 { "*mat_stucco", 0, 0, U_MAT_STUCCO, U_MAT_MASK, 0, 0 },
274 { NULL, 0, 0, 0, 0, 0, 0 }