Nuclide
Software Development Kit for id Technology
materials.h
1/*
2 * Copyright (c) 2016-2024 Vera Visions LLC.
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
13 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
14 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*/
16
25string Materials_SurfDataForTexture(string);
26
28void Materials_Init(void);
29 // end of materials
31
32#define SURF_NODAMAGE 0x1i
34#define SURF_SLICK 0x2i
36#define SURF_SKY 0x4i
38#define SURF_LADDER 0x8i
40#define SURF_NOIMPACT 0x10i
42#define SURF_NOMARKS 0x20i
44#define SURF_Q3FLESH 0x40i
46#define SURF_NODRAW 0x80i
48#define SURF_HINT 0x100i
50#define SURF_SKIP 0x200i
52#define SURF_NOLIGHTMAP 0x400i
54#define SURF_POINTLIGHT 0x800i
56#define SURF_METALSTEPS 0x1000i
58#define SURF_NOSTEPS 0x2000i
60#define SURF_NONSOLID 0x4000i
62#define SURF_LIGHTFILTER 0x8000i
64#define SURF_ALPHASHADOW 0x10000i
66#define SURF_NODLIGHT 0x20000i
68#define SURF_DUST 0x40000i
71const int CONTENTBIT_NONE = 0x00000000i;
72
73const int CONTENTBIT_SOLID = 0x00000001i; /* SOLID_BSP */
74const int CONTENTBIT_UNUSED1 = 0x00000002i;
75const int CONTENTBIT_UNUSED2 = 0x00000004i;
76const int CONTENTBIT_LAVA = 0x00000008i;
77 /* surfaceParm lava */
78
79const int CONTENTBIT_SLIME = 0x00000010i;
80 /* surfaceParm slime */
81const int CONTENTBIT_WATER = 0x00000020i;
82 /* surfaceParm water */
83const int CONTENTBIT_UNUSED3 = 0x00000040i;
84const int CONTENTBIT_GRENADECLIP = 0x00000080i; /* surfaceParm grenadeclip */
85
86const int CONTENTBIT_UNUSED4 = 0x00000100i;
87const int CONTENTBIT_UNUSED5 = 0x00000200i;
88const int CONTENTBIT_UNUSED6 = 0x00000400i;
89const int CONTENTBIT_UNUSED7 = 0x00000800i;
90
91const int CONTENTBIT_UNUSED8 = 0x00001000i;
92const int CONTENTBIT_UNUSED9 = 0x00002000i;
93const int CONTENTBIT_FTELADDER = 0x00004000i; /* surfaceparm climb */
94const int CONTENTBIT_VEHICLECLIP = 0x00008000i;
95
96const int CONTENTBIT_PLAYERCLIP = 0x00010000i;
97 /* surfaceParm playerclip */
98const int CONTENTBIT_MONSTERCLIP = 0x00020000i;
99 /* surfaceParm monsterclip */
100const int CONTENTBIT_PROJECTILE = 0x00040000i;
101const int CONTENTBIT_UNUSED12 = 0x00080000i;
102
103const int CONTENTBIT_CLUSTERPORTAL = 0x00100000i;
104const int CONTENTBIT_DONOTENTER = 0x00200000i;
105const int CONTENTBIT_BOTCLIP = 0x00400000i; /* surfaceParm botclip */
106const int CONTENTBIT_MOVER = 0x00800000i;
107
108const int CONTENTBIT_UNUSED13 = 0x01000000i;
109const int CONTENTBIT_BODY = 0x02000000i; /* SOLID_BBOX/SLIDEBOX */
110const int CONTENTBIT_CORPSE = 0x04000000i; /* SOLID_CORPSE */
111const int CONTENTBIT_UNUSED14 = 0x08000000i;
112
113const int CONTENTBIT_UNUSED15 = 0x10000000i;
114const int CONTENTBIT_Q2LADDER = 0x20000000i; /* Q2BSP climbables */
115const int CONTENTBIT_UNUSED16 = 0x40000000i;
116const int CONTENTBIT_SKY = 0x80000000i; /* Q1BSP only! */
117
118/* a bit content group */
119const int CONTENTBITS_MONSTER = CONTENTBIT_SOLID|CONTENTBIT_BODY|CONTENTBIT_MONSTERCLIP|CONTENTBIT_BOTCLIP;
120
121typedef enum
122{
123 GSMATERIAL_GLASS,
124 GSMATERIAL_WOOD,
125 GSMATERIAL_METAL,
126 GSMATERIAL_FLESH,
127 GSMATERIAL_CINDER,
128 GSMATERIAL_TILE,
129 GSMATERIAL_COMPUTER,
130 GSMATERIAL_GLASS_UNBREAKABLE,
131 GSMATERIAL_ROCK,
132 GSMATERIAL_NONE
133} materialType_t;
134
string Materials_SurfDataForTexture(string)
Returns the SurfData assigned to the texture.
Definition: materials.qc:194
void Materials_Init(void)
Initializes the material -> surfdata look-up table.
Definition: materials.qc:360