]> git.xonotic.org Git - xonotic/netradiant.git/blob - tools/quake3/q3map2/game_sof2.h
Fix for the fix
[xonotic/netradiant.git] / tools / quake3 / q3map2 / game_sof2.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_SOF2_H
33 #define GAME_SOF2_H
34
35
36
37 /* -------------------------------------------------------------------------------
38
39 content and surface flags
40
41 ------------------------------------------------------------------------------- */
42
43 /* thanks to the gracious fellows at raven */
44 #define S_CONT_SOLID                            0x00000001      /* Default setting. An eye is never valid in a solid */
45 #define S_CONT_LAVA                                     0x00000002
46 #define S_CONT_WATER                            0x00000004
47 #define S_CONT_FOG                                      0x00000008
48 #define S_CONT_PLAYERCLIP                       0x00000010
49 #define S_CONT_MONSTERCLIP                      0x00000020
50 #define S_CONT_BOTCLIP                          0x00000040
51 #define S_CONT_SHOTCLIP                         0x00000080
52 #define S_CONT_BODY                                     0x00000100      /* should never be on a brush, only in game */
53 #define S_CONT_CORPSE                           0x00000200      /* should never be on a brush, only in game */
54 #define S_CONT_TRIGGER                          0x00000400
55 #define S_CONT_NODROP                           0x00000800      /* don't leave bodies or items (death fog, lava) */
56 #define S_CONT_TERRAIN                          0x00001000      /* volume contains terrain data */
57 #define S_CONT_LADDER                           0x00002000
58 #define S_CONT_ABSEIL                           0x00004000  /* used like ladder to define where an NPC can abseil */
59 #define S_CONT_OPAQUE                           0x00008000      /* defaults to on, when off, solid can be seen through */
60 #define S_CONT_OUTSIDE                          0x00010000      /* volume is considered to be in the outside (i.e. not indoors) */
61 #define S_CONT_SLIME                            0x00020000      /* don't be fooled. it may SAY "slime" but it really means "projectileclip" */
62 #define S_CONT_LIGHTSABER                       0x00040000
63 #define S_CONT_TELEPORTER                       0x00080000
64 #define S_CONT_ITEM                                     0x00100000
65 #define S_CONT_DETAIL                           0x08000000      /* brushes not used for the bsp */
66 #define S_CONT_TRANSLUCENT                      0x80000000      /* don't consume surface fragments inside */
67
68 #define S_SURF_SKY                                      0x00002000      /* lighting from environment map */
69 #define S_SURF_SLICK                            0x00004000      /* affects game physics */
70 #define S_SURF_METALSTEPS                       0x00008000      /* chc needs this since we use same tools */
71 #define S_SURF_FORCEFIELD                       0x00010000      /* chc */
72 #define S_SURF_NODAMAGE                         0x00040000      /* never give falling damage */
73 #define S_SURF_NOIMPACT                         0x00080000      /* don't make missile explosions */
74 #define S_SURF_NOMARKS                          0x00100000      /* don't leave missile marks */
75 #define S_SURF_NODRAW                           0x00200000      /* don't generate a drawsurface at all */
76 #define S_SURF_NOSTEPS                          0x00400000      /* no footstep sounds */
77 #define S_SURF_NODLIGHT                         0x00800000      /* don't dlight even if solid (solid lava, skies) */
78 #define S_SURF_NOMISCENTS                       0x01000000      /* no client models allowed on this surface */
79
80 #define S_SURF_PATCH                            0x80000000      /* mark this face as a patch(editor only) */
81
82 /* materials */
83 #define S_MAT_BITS                                      5
84 #define S_MAT_MASK                                      0x1f            /* mask to get the material type */
85
86 #define S_MAT_NONE                                      0                       /* for when the artist hasn't set anything up =) */
87 #define S_MAT_SOLIDWOOD                         1                       /* freshly cut timber */
88 #define S_MAT_HOLLOWWOOD                        2                       /* termite infested creaky wood */
89 #define S_MAT_SOLIDMETAL                        3                       /* solid girders */
90 #define S_MAT_HOLLOWMETAL                       4                       /* hollow metal machines */
91 #define S_MAT_SHORTGRASS                        5                       /* manicured lawn */
92 #define S_MAT_LONGGRASS                         6                       /* long jungle grass */
93 #define S_MAT_DIRT                                      7                       /* hard mud */
94 #define S_MAT_SAND                                      8                       /* sandy beach */
95 #define S_MAT_GRAVEL                            9                       /* lots of small stones */
96 #define S_MAT_GLASS                                     10
97 #define S_MAT_CONCRETE                          11                      /* hardened concrete pavement */
98 #define S_MAT_MARBLE                            12                      /* marble floors */
99 #define S_MAT_WATER                                     13                      /* light covering of water on a surface */
100 #define S_MAT_SNOW                                      14                      /* freshly laid snow */
101 #define S_MAT_ICE                                       15                      /* packed snow/solid ice */
102 #define S_MAT_FLESH                                     16                      /* hung meat, corpses in the world */
103 #define S_MAT_MUD                                       17                      /* wet soil */
104 #define S_MAT_BPGLASS                           18                      /* bulletproof glass */
105 #define S_MAT_DRYLEAVES                         19                      /* dried up leaves on the floor */
106 #define S_MAT_GREENLEAVES                       20                      /* fresh leaves still on a tree */
107 #define S_MAT_FABRIC                            21                      /* Cotton sheets */
108 #define S_MAT_CANVAS                            22                      /* tent material */
109 #define S_MAT_ROCK                                      23
110 #define S_MAT_RUBBER                            24                      /* hard tire like rubber */
111 #define S_MAT_PLASTIC                           25
112 #define S_MAT_TILES                                     26                      /* tiled floor */
113 #define S_MAT_CARPET                            27                      /* lush carpet */
114 #define S_MAT_PLASTER                           28                      /* drywall style plaster */
115 #define S_MAT_SHATTERGLASS                      29                      /* glass with the Crisis Zone style shattering */
116 #define S_MAT_ARMOR                                     30                      /* body armor */
117 #define S_MAT_COMPUTER                          31                      /* computers/electronic equipment */
118 #define S_MAT_LAST                                      32                      /* number of materials */
119
120
121
122 /* -------------------------------------------------------------------------------
123
124 game_t struct
125
126 ------------------------------------------------------------------------------- */
127
128 {
129         "sof2",                                 /* -game x */
130         "base",                                 /* default base game data dir */
131         ".sof2",                                /* unix home sub-dir */
132         "soldier",                              /* magic path word */
133         "shaders",                              /* shader directory */
134         64,                                             /* max lightmapped surface verts */
135         999,                                    /* max surface verts */
136         6000,                                   /* max surface indexes */
137         qtrue,                                  /* flares */
138         "gfx/misc/lens_flare",  /* default flare shader */
139         qfalse,                                 /* wolf lighting model? */
140         128,                                    /* lightmap width/height */
141         1.0f,                                   /* lightmap gamma */
142         qfalse,                                 /* lightmap sRGB */
143         qfalse,                                 /* texture sRGB */
144         qfalse,                                 /* color sRGB */
145         1.0f,                                   /* lightmap exposure */
146         1.0f,                                   /* lightmap compensate */
147         1.0f,                           /* lightgrid scale */
148         1.0f,                           /* lightgrid ambient scale */
149         qfalse,                         /* light angle attenuation uses half-lambert curve */
150         qfalse,                         /* disable shader lightstyles hack */
151         qfalse,                         /* keep light entities on bsp */
152         8,                                      /* default patchMeta subdivisions tolerance */
153         qfalse,                         /* patch casting enabled */
154         qfalse,                         /* compile deluxemaps */
155         0,                                      /* deluxemaps default mode */
156         512,                /* minimap size */
157         1.0f,               /* minimap sharpener */
158         0.0f,               /* minimap border */
159         qtrue,              /* minimap keep aspect */
160         MINIMAP_MODE_GRAY,  /* minimap mode */
161         "%s.tga",           /* minimap name format */
162         "RBSP",                                 /* bsp file prefix */
163         1,                                              /* bsp file version */
164         qfalse,                                 /* cod-style lump len/ofs order */
165         LoadRBSPFile,                   /* bsp load function */
166         WriteRBSPFile,                  /* bsp write function */
167         
168         {
169                 /* name                         contentFlags                            contentFlagsClear                       surfaceFlags                            surfaceFlagsClear                       compileFlags                            compileFlagsClear */
170                 
171                 /* default */
172                 { "default",            S_CONT_SOLID | S_CONT_OPAQUE,   -1,                                             0,                                                      -1,                                                     C_SOLID,                                        -1 },
173                 
174                 
175                 /* ydnar */
176                 { "lightgrid",          0,                                                      0,                                                      0,                                                      0,                                                      C_LIGHTGRID,                            0 },
177                 { "antiportal",         0,                                                      0,                                                      0,                                                      0,                                                      C_ANTIPORTAL,                           0 },
178                 { "skip",                       0,                                                      0,                                                      0,                                                      0,                                                      C_SKIP,                                         0 },
179                 
180                 
181                 /* compiler */
182                 { "origin",                     0,                                                      S_CONT_SOLID,                           0,                                                      0,                                                      C_ORIGIN | C_TRANSLUCENT,       C_SOLID },
183                 { "areaportal",         S_CONT_TRANSLUCENT,                     S_CONT_SOLID | S_CONT_OPAQUE,   0,                                              0,                                                      C_AREAPORTAL | C_TRANSLUCENT,   C_SOLID },
184                 { "trans",                      S_CONT_TRANSLUCENT,                     0,                                                      0,                                                      0,                                                      C_TRANSLUCENT,                          0 },
185                 { "detail",                     S_CONT_DETAIL,                          0,                                                      0,                                                      0,                                                      C_DETAIL,                                       0 },
186                 { "structural",         0,                                                      0,                                                      0,                                                      0,                                                      C_STRUCTURAL,                           0 },
187                 { "hint",                       0,                                                      0,                                                      0,                                                      0,                                                      C_HINT,                                         0 },
188                 { "nodraw",                     0,                                                      0,                                                      S_SURF_NODRAW,                          0,                                                      C_NODRAW,                                       0 },
189                 
190                 { "alphashadow",        0,                                                      0,                                                      0,                                                      0,                                                      C_ALPHASHADOW | C_TRANSLUCENT,  0 },
191                 { "lightfilter",        0,                                                      0,                                                      0,                                                      0,                                                      C_LIGHTFILTER | C_TRANSLUCENT,  0 },
192                 { "nolightmap",         0,                                                      0,                                                      0,                                                      0,                                                      C_VERTEXLIT,                            0 },
193                 { "pointlight",         0,                                                      0,                                                      0,                                                      0,                                                      C_VERTEXLIT,                            0 },
194                 
195                 
196                 /* game */
197                 { "nonsolid",           0,                                                      S_CONT_SOLID,                           0,                                                      0,                                                      0,                                                      C_SOLID },
198                 { "nonopaque",          0,                                                      S_CONT_OPAQUE,                          0,                                                      0,                                                      C_TRANSLUCENT,                          0 },            /* setting trans ok? */
199                 
200                 { "trigger",            S_CONT_TRIGGER,                         S_CONT_SOLID | S_CONT_OPAQUE,   0,                                              0,                                                      C_TRANSLUCENT,                          C_SOLID },
201                 
202                 { "water",                      S_CONT_WATER,                           S_CONT_SOLID,                           0,                                                      0,                                                      C_LIQUID | C_TRANSLUCENT,       C_SOLID },
203                 { "slime",                      S_CONT_SLIME,                           S_CONT_SOLID,                           0,                                                      0,                                                      C_LIQUID | C_TRANSLUCENT,       C_SOLID },
204                 { "lava",                       S_CONT_LAVA,                            S_CONT_SOLID,                           0,                                                      0,                                                      C_LIQUID | C_TRANSLUCENT,       C_SOLID },
205
206                 { "shotclip",           S_CONT_SHOTCLIP,                        S_CONT_SOLID | S_CONT_OPAQUE,   0,                                              0,                                                      C_DETAIL | C_TRANSLUCENT,       C_SOLID },      /* setting trans/detail ok? */
207                 { "playerclip",         S_CONT_PLAYERCLIP,                      S_CONT_SOLID | S_CONT_OPAQUE,   0,                                              0,                                                      C_DETAIL | C_TRANSLUCENT,       C_SOLID },
208                 { "monsterclip",        S_CONT_MONSTERCLIP,                     S_CONT_SOLID | S_CONT_OPAQUE,   0,                                              0,                                                      C_DETAIL | C_TRANSLUCENT,       C_SOLID },
209                 { "nodrop",                     S_CONT_NODROP,                          S_CONT_SOLID | S_CONT_OPAQUE,   0,                                              0,                                                      C_DETAIL | C_TRANSLUCENT,       C_SOLID },
210                 
211                 { "terrain",            S_CONT_TERRAIN,                         S_CONT_SOLID | S_CONT_OPAQUE,   0,                                              0,                                                      C_DETAIL | C_TRANSLUCENT,       C_SOLID },
212                 { "ladder",                     S_CONT_LADDER,                          S_CONT_SOLID | S_CONT_OPAQUE,   0,                                              0,                                                      C_DETAIL | C_TRANSLUCENT,       C_SOLID },
213                 { "abseil",                     S_CONT_ABSEIL,                          S_CONT_SOLID | S_CONT_OPAQUE,   0,                                              0,                                                      C_DETAIL | C_TRANSLUCENT,       C_SOLID },
214                 { "outside",            S_CONT_OUTSIDE,                         S_CONT_SOLID | S_CONT_OPAQUE,   0,                                              0,                                                      C_DETAIL | C_TRANSLUCENT,       C_SOLID },
215                 
216                 { "botclip",            S_CONT_BOTCLIP,                         S_CONT_SOLID | S_CONT_OPAQUE,   0,                                              0,                                                      C_DETAIL | C_TRANSLUCENT,       C_SOLID },
217                 
218                 { "fog",                        S_CONT_FOG,                                     S_CONT_SOLID | S_CONT_OPAQUE,   0,                                              0,                                                      C_FOG | C_DETAIL | C_TRANSLUCENT,       C_SOLID },      /* nonopaque? */
219                 { "sky",                        0,                                                      0,                                                      S_SURF_SKY,                                     0,                                                      C_SKY,                                          0 },
220                 
221                 { "slick",                      0,                                                      0,                                                      S_SURF_SLICK,                           0,                                                      0,                                                      0 },
222                 
223                 { "noimpact",           0,                                                      0,                                                      S_SURF_NOIMPACT,                        0,                                                      0,                                                      0 },
224                 { "nomarks",            0,                                                      0,                                                      S_SURF_NOMARKS,                         0,                                                      C_NOMARKS,                                      0 },
225                 { "nodamage",           0,                                                      0,                                                      S_SURF_NODAMAGE,                        0,                                                      0,                                                      0 },
226                 { "metalsteps",         0,                                                      0,                                                      S_SURF_METALSTEPS,                      0,                                                      0,                                                      0 },
227                 { "nosteps",            0,                                                      0,                                                      S_SURF_NOSTEPS,                         0,                                                      0,                                                      0 },
228                 { "nodlight",           0,                                                      0,                                                      S_SURF_NODLIGHT,                        0,                                                      0,                                                      0 },
229                 { "nomiscents",         0,                                                      0,                                                      S_SURF_NOMISCENTS,                      0,                                                      0,                                                      0 },
230                 { "forcefield",         0,                                                      0,                                                      S_SURF_FORCEFIELD,                      0,                                                      0,                                                      0 },
231                 
232                 
233                 /* materials */
234                 { "*mat_none",          0,                                                      0,                                                      S_MAT_NONE,                                     S_MAT_MASK,                                     0,                                                      0 },
235                 { "*mat_solidwood",     0,                                                      0,                                                      S_MAT_SOLIDWOOD,                        S_MAT_MASK,                                     0,                                                      0 },
236                 { "*mat_hollowwood",    0,                                              0,                                                      S_MAT_HOLLOWWOOD,                       S_MAT_MASK,                                     0,                                                      0 },
237                 { "*mat_solidmetal",    0,                                              0,                                                      S_MAT_SOLIDMETAL,                       S_MAT_MASK,                                     0,                                                      0 },
238                 { "*mat_hollowmetal",   0,                                              0,                                                      S_MAT_HOLLOWMETAL,                      S_MAT_MASK,                                     0,                                                      0 },
239                 { "*mat_shortgrass",    0,                                              0,                                                      S_MAT_SHORTGRASS,                       S_MAT_MASK,                                     0,                                                      0 },
240                 { "*mat_longgrass",             0,                                              0,                                                      S_MAT_LONGGRASS,                        S_MAT_MASK,                                     0,                                                      0 },
241                 { "*mat_dirt",          0,                                                      0,                                                      S_MAT_DIRT,                                     S_MAT_MASK,                                     0,                                                      0 },
242                 { "*mat_sand",          0,                                                      0,                                                      S_MAT_SAND,                                     S_MAT_MASK,                                     0,                                                      0 },
243                 { "*mat_gravel",        0,                                                      0,                                                      S_MAT_GRAVEL,                           S_MAT_MASK,                                     0,                                                      0 },
244                 { "*mat_glass",         0,                                                      0,                                                      S_MAT_GLASS,                            S_MAT_MASK,                                     0,                                                      0 },
245                 { "*mat_concrete",      0,                                                      0,                                                      S_MAT_CONCRETE,                         S_MAT_MASK,                                     0,                                                      0 },
246                 { "*mat_marble",        0,                                                      0,                                                      S_MAT_MARBLE,                           S_MAT_MASK,                                     0,                                                      0 },
247                 { "*mat_water",         0,                                                      0,                                                      S_MAT_WATER,                            S_MAT_MASK,                                     0,                                                      0 },
248                 { "*mat_snow",          0,                                                      0,                                                      S_MAT_SNOW,                                     S_MAT_MASK,                                     0,                                                      0 },
249                 { "*mat_ice",           0,                                                      0,                                                      S_MAT_ICE,                                      S_MAT_MASK,                                     0,                                                      0 },
250                 { "*mat_flesh",         0,                                                      0,                                                      S_MAT_FLESH,                            S_MAT_MASK,                                     0,                                                      0 },
251                 { "*mat_mud",           0,                                                      0,                                                      S_MAT_MUD,                                      S_MAT_MASK,                                     0,                                                      0 },
252                 { "*mat_bpglass",       0,                                                      0,                                                      S_MAT_BPGLASS,                          S_MAT_MASK,                                     0,                                                      0 },
253                 { "*mat_dryleaves",     0,                                                      0,                                                      S_MAT_DRYLEAVES,                        S_MAT_MASK,                                     0,                                                      0 },
254                 { "*mat_greenleaves",   0,                                              0,                                                      S_MAT_GREENLEAVES,                      S_MAT_MASK,                                     0,                                                      0 },
255                 { "*mat_fabric",        0,                                                      0,                                                      S_MAT_FABRIC,                           S_MAT_MASK,                                     0,                                                      0 },
256                 { "*mat_canvas",        0,                                                      0,                                                      S_MAT_CANVAS,                           S_MAT_MASK,                                     0,                                                      0 },
257                 { "*mat_rock",          0,                                                      0,                                                      S_MAT_ROCK,                                     S_MAT_MASK,                                     0,                                                      0 },
258                 { "*mat_rubber",        0,                                                      0,                                                      S_MAT_RUBBER,                           S_MAT_MASK,                                     0,                                                      0 },
259                 { "*mat_plastic",       0,                                                      0,                                                      S_MAT_PLASTIC,                          S_MAT_MASK,                                     0,                                                      0 },
260                 { "*mat_tiles",         0,                                                      0,                                                      S_MAT_TILES,                            S_MAT_MASK,                                     0,                                                      0 },
261                 { "*mat_carpet",        0,                                                      0,                                                      S_MAT_CARPET,                           S_MAT_MASK,                                     0,                                                      0 },
262                 { "*mat_plaster",       0,                                                      0,                                                      S_MAT_PLASTER,                          S_MAT_MASK,                                     0,                                                      0 },
263                 { "*mat_shatterglass",  0,                                              0,                                                      S_MAT_SHATTERGLASS,                     S_MAT_MASK,                                     0,                                                      0 },
264                 { "*mat_armor",         0,                                                      0,                                                      S_MAT_ARMOR,                            S_MAT_MASK,                                     0,                                                      0 },
265                 { "*mat_computer",      0,                                                      0,                                                      S_MAT_COMPUTER,                         S_MAT_MASK,                                     0,                                                      0 },    
266                 
267                 
268                 /* null */
269                 { NULL, 0, 0, 0, 0, 0, 0 }
270         }
271 }
272
273
274
275 /* end marker */
276 #endif