1 /*
2 ===========================================================================
3 Copyright (C) 1999 - 2005, Id Software, Inc.
4 Copyright (C) 2000 - 2013, Raven Software, Inc.
5 Copyright (C) 2001 - 2013, Activision, Inc.
6 Copyright (C) 2013 - 2015, OpenJK contributors
7 
8 This file is part of the OpenJK source code.
9 
10 OpenJK is free software; you can redistribute it and/or modify it
11 under the terms of the GNU General Public License version 2 as
12 published by the Free Software Foundation.
13 
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, see <http://www.gnu.org/licenses/>.
21 ===========================================================================
22 */
23 
24 #pragma once
25 
26 // This file must be identical in the quake and utils directories
27 
28 // contents flags are seperate bits
29 // a given brush can contribute multiple content bits
30 
31 // these definitions also need to be in q_shared.h!
32 
33 #define CONTENTS_NONE			(0x00000000u)
34 #define	CONTENTS_SOLID			(0x00000001u) // Default setting. An eye is never valid in a solid
35 #define	CONTENTS_LAVA			(0x00000002u) //
36 #define	CONTENTS_WATER			(0x00000004u) //
37 #define	CONTENTS_FOG			(0x00000008u) //
38 #define	CONTENTS_PLAYERCLIP		(0x00000010u) //
39 #define	CONTENTS_MONSTERCLIP	(0x00000020u) // Physically block bots
40 #define CONTENTS_BOTCLIP		(0x00000040u) // A hint for bots - do not enter this brush by navigation (if possible)
41 #define CONTENTS_SHOTCLIP		(0x00000080u) //
42 #define	CONTENTS_BODY			(0x00000100u) // should never be on a brush, only in game
43 #define	CONTENTS_CORPSE			(0x00000200u) // should never be on a brush, only in game
44 #define	CONTENTS_TRIGGER		(0x00000400u) //
45 #define	CONTENTS_NODROP			(0x00000800u) // don't leave bodies or items (death fog, lava)
46 #define CONTENTS_TERRAIN		(0x00001000u) // volume contains terrain data
47 #define CONTENTS_LADDER			(0x00002000u) //
48 #define CONTENTS_ABSEIL			(0x00004000u) // (SOF2) used like ladder to define where an NPC can abseil
49 #define CONTENTS_OPAQUE			(0x00008000u) // defaults to on, when off, solid can be seen through
50 #define CONTENTS_OUTSIDE		(0x00010000u) // volume is considered to be in the outside (i.e. not indoors)
51 #define CONTENTS_SLIME			(0x00020000u) // CHC needs this since we use same tools
52 #define CONTENTS_LIGHTSABER		(0x00040000u) // ""
53 #define CONTENTS_TELEPORTER		(0x00080000u) // ""
54 #define CONTENTS_ITEM			(0x00100000u) // ""
55 #define CONTENTS_NOSHOT			(0x00200000u) // shots pass through me
56 #define CONTENTS_UNUSED00400000	(0x00400000u) //
57 #define CONTENTS_UNUSED00800000	(0x00800000u) //
58 #define CONTENTS_UNUSED01000000	(0x01000000u) //
59 #define CONTENTS_UNUSED02000000	(0x02000000u) //
60 #define CONTENTS_UNUSED04000000	(0x04000000u) //
61 #define	CONTENTS_DETAIL			(0x08000000u) // brushes not used for the bsp
62 #define	CONTENTS_INSIDE			(0x10000000u) // volume is considered to be inside (i.e. indoors)
63 #define CONTENTS_UNUSED20000000	(0x20000000u) //
64 #define CONTENTS_UNUSED40000000	(0x40000000u) //
65 #define	CONTENTS_TRANSLUCENT	(0x80000000u) // don't consume surface fragments inside
66 #define CONTENTS_ALL			(0xFFFFFFFFu)
67 
68 #define SURF_NONE				(0x00000000u)
69 #define SURF_UNUSED00000001		(0x00000001u) //
70 #define SURF_UNUSED00000002		(0x00000002u) //
71 #define SURF_UNUSED00000004		(0x00000004u) //
72 #define SURF_UNUSED00000008		(0x00000008u) //
73 #define SURF_UNUSED00000010		(0x00000010u) //
74 #define SURF_UNUSED00000020		(0x00000020u) //
75 #define SURF_UNUSED00000040		(0x00000040u) //
76 #define SURF_UNUSED00000080		(0x00000080u) //
77 #define SURF_UNUSED00000100		(0x00000100u) //
78 #define SURF_UNUSED00000200		(0x00000200u) //
79 #define SURF_UNUSED00000400		(0x00000400u) //
80 #define SURF_UNUSED00000800		(0x00000800u) //
81 #define SURF_UNUSED00001000		(0x00001000u) //
82 #define	SURF_SKY				(0x00002000u) // lighting from environment map
83 #define	SURF_SLICK				(0x00004000u) // affects game physics
84 #define	SURF_METALSTEPS			(0x00008000u) // CHC needs this since we use same tools (though this flag is temp?)
85 #define SURF_FORCEFIELD			(0x00010000u) // CHC ""			(but not temp)
86 #define SURF_UNUSED00020000		(0x00020000u) //
87 #define	SURF_NODAMAGE			(0x00040000u) // never give falling damage
88 #define	SURF_NOIMPACT			(0x00080000u) // don't make missile explosions
89 #define	SURF_NOMARKS			(0x00100000u) // don't leave missile marks
90 #define	SURF_NODRAW				(0x00200000u) // don't generate a drawsurface at all
91 #define	SURF_NOSTEPS			(0x00400000u) // no footstep sounds
92 #define	SURF_NODLIGHT			(0x00800000u) // don't dlight even if solid (solid lava, skies)
93 #define	SURF_NOMISCENTS			(0x01000000u) // no client models allowed on this surface
94 #define	SURF_FORCESIGHT			(0x02000000u) // not visible without Force Sight
95 #define SURF_UNUSED04000000		(0x04000000u) //
96 #define SURF_UNUSED08000000		(0x08000000u) //
97 #define SURF_UNUSED10000000		(0x10000000u) //
98 #define SURF_UNUSED20000000		(0x20000000u) //
99 #define SURF_UNUSED40000000		(0x40000000u) //
100 #define SURF_UNUSED80000000		(0x80000000u) //
101 
102 #define MATERIAL_BITS			5
103 #define MATERIAL_MASK			0x1f	// mask to get the material type
104 
105 #define MATERIAL_NONE			0			// for when the artist hasn't set anything up =)
106 #define MATERIAL_SOLIDWOOD		1			// freshly cut timber
107 #define MATERIAL_HOLLOWWOOD		2			// termite infested creaky wood
108 #define MATERIAL_SOLIDMETAL		3			// solid girders
109 #define MATERIAL_HOLLOWMETAL	4			// hollow metal machines
110 #define MATERIAL_SHORTGRASS		5			// manicured lawn
111 #define MATERIAL_LONGGRASS		6			// long jungle grass
112 #define MATERIAL_DIRT			7			// hard mud
113 #define MATERIAL_SAND			8			// sandy beach
114 #define MATERIAL_GRAVEL			9			// lots of small stones
115 #define MATERIAL_GLASS			10			//
116 #define MATERIAL_CONCRETE		11			// hardened concrete pavement
117 #define MATERIAL_MARBLE			12			// marble floors
118 #define MATERIAL_WATER			13			// light covering of water on a surface
119 #define MATERIAL_SNOW			14			// freshly laid snow
120 #define MATERIAL_ICE			15			// packed snow/solid ice
121 #define MATERIAL_FLESH			16			// hung meat, corpses in the world
122 #define MATERIAL_MUD			17			// wet soil
123 #define MATERIAL_BPGLASS		18			// bulletproof glass
124 #define MATERIAL_DRYLEAVES		19			// dried up leaves on the floor
125 #define MATERIAL_GREENLEAVES	20			// fresh leaves still on a tree
126 #define MATERIAL_FABRIC			21			// Cotton sheets
127 #define MATERIAL_CANVAS			22			// tent material
128 #define MATERIAL_ROCK			23			//
129 #define MATERIAL_RUBBER			24			// hard tire like rubber
130 #define MATERIAL_PLASTIC		25			//
131 #define MATERIAL_TILES			26			// tiled floor
132 #define MATERIAL_CARPET			27			// lush carpet
133 #define MATERIAL_PLASTER		28			// drywall style plaster
134 #define MATERIAL_SHATTERGLASS	29			// glass with the Crisis Zone style shattering
135 #define MATERIAL_ARMOR			30			// body armor
136 #define MATERIAL_COMPUTER		31			// computers/electronic equipment
137 #define MATERIAL_LAST			32			// number of materials
138 
139 // Defined as a macro here so one change will affect all the relevant files
140 
141 #define MATERIALS	\
142 	"none",			\
143 	"solidwood",	\
144 	"hollowwood",	\
145 	"solidmetal",	\
146 	"hollowmetal",	\
147 	"shortgrass",	\
148 	"longgrass",	\
149 	"dirt",	   		\
150 	"sand",	   		\
151 	"gravel",		\
152 	"glass",		\
153 	"concrete",		\
154 	"marble",		\
155 	"water",		\
156 	"snow",	   		\
157 	"ice",			\
158 	"flesh",		\
159 	"mud",			\
160 	"bpglass",		\
161 	"dryleaves",	\
162 	"greenleaves",	\
163 	"fabric",		\
164 	"canvas",		\
165 	"rock",			\
166 	"rubber",		\
167 	"plastic",		\
168 	"tiles",		\
169 	"carpet",		\
170 	"plaster",		\
171 	"shatterglass",	\
172 	"armor",		\
173 	"computer"/* this was missing, see enums above, plus ShaderEd2 pulldown options */
174