]> de.git.xonotic.org Git - xonotic/netradiant.git/blob - tools/quake3/q3map2/game_etut.h
Merge remote-tracking branch 'github/master'
[xonotic/netradiant.git] / tools / quake3 / q3map2 / game_etut.h
1 /* -------------------------------------------------------------------------------
2
3    Copyright (C) 1999-2007 id Software, Inc. and contributors.
4    For a list of contributors, see the accompanying CONTRIBUTORS file.
5
6    This file is part of GtkRadiant.
7
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.
12
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.
17
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
21
22    ----------------------------------------------------------------------------------
23
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."
26
27    ------------------------------------------------------------------------------- */
28
29
30
31 /* marker */
32 #ifndef GAME_ETUT_H
33 #define GAME_ETUT_H
34
35
36
37 /* -------------------------------------------------------------------------------
38
39    content and surface flags
40
41    ------------------------------------------------------------------------------- */
42
43 /* game flags */
44 #define U_CONT_SOLID                1           /* an eye is never valid in a solid */
45 #define U_CONT_LAVA                 8
46 #define U_CONT_SLIME                16
47 #define U_CONT_WATER                32
48 #define U_CONT_FOG                  64
49
50 #define U_CONT_AREAPORTAL           0x8000
51
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
59
60 #define U_CONT_ORIGIN               0x1000000   /* removed before bsping an entity */
61
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) */
69
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 */
89
90 /* ydnar flags */
91 #define U_SURF_VERTEXLIT            ( U_SURF_POINTLIGHT | U_SURF_NOLIGHTMAP )
92
93 /* materials */
94 #define U_MAT_MASK                  0xFFF00000  /* mask to get the material type */
95
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
128
129
130
131 /* -------------------------------------------------------------------------------
132
133    game_t struct
134
135    ------------------------------------------------------------------------------- */
136
137 {
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 */
146         qfalse,             /* flares */
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         qfalse,             /* color sRGB */
154         0.0f,               /* lightmap exposure */
155         1.0f,               /* lightmap compensate */
156         1.0f,               /* lightgrid scale */
157         1.0f,               /* lightgrid ambient scale */
158         qfalse,             /* light angle attenuation uses half-lambert curve */
159         qfalse,             /* disable shader lightstyles hack */
160         qfalse,             /* keep light entities on bsp */
161         8,                  /* default patchMeta subdivisions tolerance */
162         qfalse,             /* patch casting enabled */
163         qfalse,             /* compile deluxemaps */
164         0,                  /* deluxemaps default mode */
165         512,                /* minimap size */
166         1.0f,               /* minimap sharpener */
167         0.0f,               /* minimap border */
168         qtrue,              /* minimap keep aspect */
169         MINIMAP_MODE_GRAY,  /* minimap mode */
170         "%s.tga",           /* minimap name format */
171         "IBSP",             /* bsp file prefix */
172         47,                 /* bsp file version */
173         qfalse,             /* cod-style lump len/ofs order */
174         LoadIBSPFile,       /* bsp load function */
175         WriteIBSPFile,      /* bsp write function */
176
177         {
178                 /* name                         contentFlags                            contentFlagsClear                       surfaceFlags                            surfaceFlagsClear                       compileFlags                            compileFlagsClear */
179
180                 /* default */
181                 { "default",        U_CONT_SOLID,               -1,                         0,                          -1,                         C_SOLID,                    -1 },
182
183
184                 /* ydnar */
185                 { "lightgrid",      0,                          0,                          0,                          0,                          C_LIGHTGRID,                0 },
186                 { "antiportal",     0,                          0,                          0,                          0,                          C_ANTIPORTAL,               0 },
187                 { "skip",           0,                          0,                          0,                          0,                          C_SKIP,                     0 },
188
189
190                 /* compiler */
191                 { "origin",         U_CONT_ORIGIN,              U_CONT_SOLID,               0,                          0,                          C_ORIGIN | C_TRANSLUCENT,   C_SOLID },
192                 { "areaportal",     U_CONT_AREAPORTAL,          U_CONT_SOLID,               0,                          0,                          C_AREAPORTAL | C_TRANSLUCENT,   C_SOLID },
193                 { "trans",          U_CONT_TRANSLUCENT,         0,                          0,                          0,                          C_TRANSLUCENT,              0 },
194                 { "detail",         U_CONT_DETAIL,              0,                          0,                          0,                          C_DETAIL,                   0 },
195                 { "structural",     U_CONT_STRUCTURAL,          0,                          0,                          0,                          C_STRUCTURAL,               0 },
196                 { "hint",           0,                          0,                          U_SURF_HINT,                0,                          C_HINT,                     0 },
197                 { "nodraw",         0,                          0,                          U_SURF_NODRAW,              0,                          C_NODRAW,                   0 },
198
199                 { "alphashadow",    0,                          0,                          U_SURF_ALPHASHADOW,         0,                          C_ALPHASHADOW | C_TRANSLUCENT,  0 },
200                 { "lightfilter",    0,                          0,                          U_SURF_LIGHTFILTER,         0,                          C_LIGHTFILTER | C_TRANSLUCENT,  0 },
201                 { "nolightmap",     0,                          0,                          U_SURF_VERTEXLIT,           0,                          C_VERTEXLIT,                0 },
202                 { "pointlight",     0,                          0,                          U_SURF_VERTEXLIT,           0,                          C_VERTEXLIT,                0 },
203
204
205                 /* game */
206                 { "nonsolid",       0,                          U_CONT_SOLID,               U_SURF_NONSOLID,            0,                          0,                          C_SOLID },
207
208                 { "trigger",        U_CONT_TRIGGER,             U_CONT_SOLID,               0,                          0,                          C_TRANSLUCENT,              C_SOLID },
209
210                 { "water",          U_CONT_WATER,               U_CONT_SOLID,               0,                          0,                          C_LIQUID | C_TRANSLUCENT,   C_SOLID },
211                 { "slime",          U_CONT_SLIME,               U_CONT_SOLID,               0,                          0,                          C_LIQUID | C_TRANSLUCENT,   C_SOLID },
212                 { "lava",           U_CONT_LAVA,                U_CONT_SOLID,               0,                          0,                          C_LIQUID | C_TRANSLUCENT,   C_SOLID },
213
214                 { "playerclip",     U_CONT_PLAYERCLIP,          U_CONT_SOLID,               0,                          0,                          C_DETAIL | C_TRANSLUCENT,   C_SOLID },
215                 { "monsterclip",    U_CONT_MONSTERCLIP,         U_CONT_SOLID,               0,                          0,                          C_DETAIL | C_TRANSLUCENT,   C_SOLID },
216                 { "nodrop",         U_CONT_NODROP,              U_CONT_SOLID,               0,                          0,                          C_TRANSLUCENT,              C_SOLID },
217
218                 { "clusterportal",  U_CONT_CLUSTERPORTAL,       U_CONT_SOLID,               0,                          0,                          C_TRANSLUCENT,              C_SOLID },
219                 { "donotenter",     U_CONT_DONOTENTER,          U_CONT_SOLID,               0,                          0,                          C_TRANSLUCENT,              C_SOLID },
220                 { "botclip",        U_CONT_BOTCLIP,             U_CONT_SOLID,               0,                          0,                          C_TRANSLUCENT,              C_SOLID },
221
222                 { "fog",            U_CONT_FOG,                 U_CONT_SOLID,               0,                          0,                          C_FOG,                      C_SOLID },
223                 { "sky",            0,                          0,                          U_SURF_SKY,                 0,                          C_SKY,                      0 },
224
225                 { "slick",          0,                          0,                          U_SURF_SLICK,               0,                          0,                          0 },
226
227                 { "noimpact",       0,                          0,                          U_SURF_NOIMPACT,            0,                          0,                          0 },
228                 { "nomarks",        0,                          0,                          U_SURF_NOMARKS,             0,                          C_NOMARKS,                  0 },
229                 { "ladder",         0,                          0,                          U_SURF_LADDER,              0,                          0,                          0 },
230                 { "nodamage",       0,                          0,                          U_SURF_NODAMAGE,            0,                          0,                          0 },
231                 { "metalsteps",     0,                          0,                          U_SURF_METALSTEPS,          0,                          0,                          0 },
232                 { "flesh",          0,                          0,                          U_SURF_FLESH,               0,                          0,                          0 },
233                 { "nosteps",        0,                          0,                          U_SURF_NOSTEPS,             0,                          0,                          0 },
234                 { "nodlight",       0,                          0,                          U_SURF_NODLIGHT,            0,                          0,                          0 },
235                 { "dust",           0,                          0,                          U_SURF_DUST,                0,                          0,                          0 },
236
237
238                 /* materials */
239                 { "*mat_none",      0,                          0,                          U_MAT_NONE,                 U_MAT_MASK,                 0,                          0 },
240                 { "*mat_tin",       0,                          0,                          U_MAT_TIN,                  U_MAT_MASK,                 0,                          0 },
241                 { "*mat_aluminum",  0,                          0,                          U_MAT_ALUMINUM,             U_MAT_MASK,                 0,                          0 },
242                 { "*mat_iron",      0,                          0,                          U_MAT_IRON,                 U_MAT_MASK,                 0,                          0 },
243                 { "*mat_titanium",  0,                          0,                          U_MAT_TITANIUM,             U_MAT_MASK,                 0,                          0 },
244                 { "*mat_steel",     0,                          0,                          U_MAT_STEEL,                U_MAT_MASK,                 0,                          0 },
245                 { "*mat_brass",     0,                          0,                          U_MAT_BRASS,                U_MAT_MASK,                 0,                          0 },
246                 { "*mat_copper",    0,                          0,                          U_MAT_COPPER,               U_MAT_MASK,                 0,                          0 },
247                 { "*mat_cement",    0,                          0,                          U_MAT_CEMENT,               U_MAT_MASK,                 0,                          0 },
248                 { "*mat_rock",      0,                          0,                          U_MAT_ROCK,                 U_MAT_MASK,                 0,                          0 },
249                 { "*mat_gravel",    0,                          0,                          U_MAT_GRAVEL,               U_MAT_MASK,                 0,                          0 },
250                 { "*mat_pavement",  0,                          0,                          U_MAT_PAVEMENT,             U_MAT_MASK,                 0,                          0 },
251                 { "*mat_brick",     0,                          0,                          U_MAT_BRICK,                U_MAT_MASK,                 0,                          0 },
252                 { "*mat_clay",      0,                          0,                          U_MAT_CLAY,                 U_MAT_MASK,                 0,                          0 },
253                 { "*mat_grass",     0,                          0,                          U_MAT_GRASS,                U_MAT_MASK,                 0,                          0 },
254                 { "*mat_dirt",      0,                          0,                          U_MAT_DIRT,                 U_MAT_MASK,                 0,                          0 },
255                 { "*mat_mud",       0,                          0,                          U_MAT_MUD,                  U_MAT_MASK,                 0,                          0 },
256                 { "*mat_snow",      0,                          0,                          U_MAT_SNOW,                 U_MAT_MASK,                 0,                          0 },
257                 { "*mat_ice",       0,                          0,                          U_MAT_ICE,                  U_MAT_MASK,                 0,                          0 },
258                 { "*mat_sand",      0,                          0,                          U_MAT_SAND,                 U_MAT_MASK,                 0,                          0 },
259                 { "*mat_ceramic",   0,                          0,                          U_MAT_CERAMICTILE,          U_MAT_MASK,                 0,                          0 },
260                 { "*mat_ceramictile",   0,                      0,                          U_MAT_CERAMICTILE,          U_MAT_MASK,                 0,                          0 },
261                 { "*mat_linoleum",  0,                          0,                          U_MAT_LINOLEUM,             U_MAT_MASK,                 0,                          0 },
262                 { "*mat_rug",       0,                          0,                          U_MAT_RUG,                  U_MAT_MASK,                 0,                          0 },
263                 { "*mat_plaster",   0,                          0,                          U_MAT_PLASTER,              U_MAT_MASK,                 0,                          0 },
264                 { "*mat_plastic",   0,                          0,                          U_MAT_PLASTIC,              U_MAT_MASK,                 0,                          0 },
265                 { "*mat_cardboard", 0,                          0,                          U_MAT_CARDBOARD,            U_MAT_MASK,                 0,                          0 },
266                 { "*mat_hardwood",  0,                          0,                          U_MAT_HARDWOOD,             U_MAT_MASK,                 0,                          0 },
267                 { "*mat_softwood",  0,                          0,                          U_MAT_SOFTWOOD,             U_MAT_MASK,                 0,                          0 },
268                 { "*mat_plank",     0,                          0,                          U_MAT_PLANK,                U_MAT_MASK,                 0,                          0 },
269                 { "*mat_glass",     0,                          0,                          U_MAT_GLASS,                U_MAT_MASK,                 0,                          0 },
270                 { "*mat_water",     0,                          0,                          U_MAT_WATER,                U_MAT_MASK,                 0,                          0 },
271                 { "*mat_stucco",    0,                          0,                          U_MAT_STUCCO,               U_MAT_MASK,                 0,                          0 },
272
273
274                 /* null */
275                 { NULL, 0, 0, 0, 0, 0, 0 }
276         }
277 }
278
279
280
281 /* end marker */
282 #endif