Nuclide
Software Development Kit for id Tech
materials.h
Go to the documentation of this file.
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
74; /* SOLID_BSP */
75const int CONTENTBIT_UNUSED1 = 0x00000002i
76;
77const int CONTENTBIT_UNUSED2 = 0x00000004i
78;
79const int CONTENTBIT_LAVA = 0x00000008i;
80 /* surfaceParm lava */
81
82const int CONTENTBIT_SLIME = 0x00000010i;
83 /* surfaceParm slime */
84const int CONTENTBIT_WATER = 0x00000020i;
85 /* surfaceParm water */
86const int CONTENTBIT_UNUSED3 = 0x00000040i
87;
88const int CONTENTBIT_GRENADECLIP = 0x00000080i
89; /* surfaceParm grenadeclip */
90
91const int CONTENTBIT_UNUSED4 = 0x00000100i;
92const int CONTENTBIT_UNUSED5 = 0x00000200i;
93const int CONTENTBIT_UNUSED6 = 0x00000400i
94;
95const int CONTENTBIT_UNUSED7 = 0x00000800i
96;
97
98const int CONTENTBIT_UNUSED8 = 0x00001000i;
99const int CONTENTBIT_UNUSED9 = 0x00002000i;
100const int CONTENTBIT_FTELADDER = 0x00004000i; /* surfaceparm climb */
101const int CONTENTBIT_VEHICLECLIP = 0x00008000i;
102
103const int CONTENTBIT_PLAYERCLIP = 0x00010000i;
104 /* surfaceParm playerclip */
105const int CONTENTBIT_MONSTERCLIP = 0x00020000i;
106 /* surfaceParm monsterclip */
107const int CONTENTBIT_PROJECTILE = 0x00040000i;
108const int CONTENTBIT_UNUSED12 = 0x00080000i;
109
110const int CONTENTBIT_CLUSTERPORTAL = 0x00100000i;
111const int CONTENTBIT_DONOTENTER = 0x00200000i;
112const int CONTENTBIT_BOTCLIP = 0x00400000i
113; /* surfaceParm botclip */
114const int CONTENTBIT_MOVER = 0x00800000i
115;
116
117const int CONTENTBIT_UNUSED13 = 0x01000000i
118;
119const int CONTENTBIT_BODY = 0x02000000i; /* SOLID_BBOX/SLIDEBOX */
120const int CONTENTBIT_CORPSE = 0x04000000i; /* SOLID_CORPSE */
121const int CONTENTBIT_UNUSED14 = 0x08000000i;
122
123const int CONTENTBIT_UNUSED15 = 0x10000000i;
124const int CONTENTBIT_Q2LADDER = 0x20000000i; /* Q2BSP climbables */
125const int CONTENTBIT_UNUSED16 = 0x40000000i;
126const int CONTENTBIT_SKY = 0x80000000i; /* Q1BSP only! */
127
128/* a bit content group */
130
131
132
133typedef enum
134{
146
string Materials_SurfDataForTexture(string)
Returns the SurfData assigned to the texture.
Definition: materials.qc:217
void Materials_Init(void)
Initializes the material -> surfdata look-up table.
Definition: materials.qc:402
const int CONTENTBIT_SOLID
Definition: materials.h:73
const int CONTENTBIT_PLAYERCLIP
Definition: materials.h:103
const int CONTENTBIT_UNUSED4
Definition: materials.h:91
const int CONTENTBIT_UNUSED7
Definition: materials.h:95
const int CONTENTBIT_UNUSED2
Definition: materials.h:77
const int CONTENTBIT_LAVA
Definition: materials.h:79
const int CONTENTBIT_UNUSED13
Definition: materials.h:117
const int CONTENTBIT_UNUSED12
Definition: materials.h:108
const int CONTENTBIT_UNUSED14
Definition: materials.h:121
const int CONTENTBIT_UNUSED15
Definition: materials.h:123
const int CONTENTBIT_UNUSED9
Definition: materials.h:99
const int CONTENTBIT_WATER
Definition: materials.h:84
const int CONTENTBIT_UNUSED1
Definition: materials.h:75
const int CONTENTBIT_BOTCLIP
Definition: materials.h:112
const int CONTENTBIT_BODY
Definition: materials.h:119
const int CONTENTBIT_MONSTERCLIP
Definition: materials.h:105
const int CONTENTBIT_FTELADDER
Definition: materials.h:100
const int CONTENTBIT_DONOTENTER
Definition: materials.h:111
const int CONTENTBIT_NONE
Definition: materials.h:71
const int CONTENTBIT_MOVER
Definition: materials.h:114
const int CONTENTBIT_UNUSED5
Definition: materials.h:92
const int CONTENTBIT_CLUSTERPORTAL
Definition: materials.h:110
const int CONTENTBIT_UNUSED6
Definition: materials.h:93
const int CONTENTBIT_UNUSED16
Definition: materials.h:125
const int CONTENTBIT_Q2LADDER
Definition: materials.h:124
const int CONTENTBIT_UNUSED3
Definition: materials.h:86
const int CONTENTBIT_SLIME
Definition: materials.h:82
const int CONTENTBIT_UNUSED8
Definition: materials.h:98
const int CONTENTBIT_CORPSE
Definition: materials.h:120
const int CONTENTBIT_PROJECTILE
Definition: materials.h:107
const int CONTENTBIT_VEHICLECLIP
Definition: materials.h:101
const int CONTENTBIT_GRENADECLIP
Definition: materials.h:88
materialType_t
Definition: materials.h:134
@ GSMATERIAL_METAL
Definition: materials.h:137
@ GSMATERIAL_NONE
Definition: materials.h:144
@ GSMATERIAL_WOOD
Definition: materials.h:136
@ GSMATERIAL_ROCK
Definition: materials.h:143
@ GSMATERIAL_TILE
Definition: materials.h:140
@ GSMATERIAL_CINDER
Definition: materials.h:139
@ GSMATERIAL_GLASS_UNBREAKABLE
Definition: materials.h:142
@ GSMATERIAL_GLASS
Definition: materials.h:135
@ GSMATERIAL_COMPUTER
Definition: materials.h:141
@ GSMATERIAL_FLESH
Definition: materials.h:138
const int CONTENTBIT_SKY
Definition: materials.h:126
const int CONTENTBITS_MONSTER
Definition: materials.h:129