-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathconsts.h
191 lines (167 loc) · 3.93 KB
/
consts.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
/**
* @file consts.h
* @brief Useful egnine constants.
*
* This is a header filled with constants that are useful to pass appropriate
* information from the game to the engine; howerver, it is only for those
* constants which are directly useful for the engine-game interface and not for
* constants which solely lie in the engine or game.
*/
#ifndef CONSTS_H_
#define CONSTS_H_
#define IS_LIQUID(mat) ((mat)==Mat_Water)
#define IS_CLIPPED(mat) ((mat)==Mat_Glass) //materials that are obligate clipping (always also get clipped)
enum
{
SCR_MINW = 320, //minimum screen resolution
SCR_MINH = 200, //minumum screen resolution
SCR_MAXW = 16384,
SCR_MAXH = 16384,
SCR_DEFAULTW = 1366, //smallest typical screens are 1366x768
SCR_DEFAULTH = 768,
};
enum // hardcoded texture numbers
{
Default_Sky = 0,
Default_Geom,
Default_NumDefaults
};
enum
{
MatFlag_IndexShift = 0,
MatFlag_VolumeShift = 2,
MatFlag_ClipShift = 5,
MatFlag_FlagShift = 8,
MatFlag_Index = 3 << MatFlag_IndexShift,
MatFlag_Volume = 7 << MatFlag_VolumeShift,
MatFlag_Clip = 7 << MatFlag_ClipShift,
MatFlag_Flags = 0xFF << MatFlag_FlagShift
};
enum
{
Ray_BB = 1,
Ray_Poly = 3,
Ray_AlphaPoly = 7,
Ray_Ents = 9,
Ray_ClipMat = 16,
Ray_SkipFirst = 32,
Ray_EditMat = 64,
Ray_Shadow = 128,
Ray_Pass = 256,
Ray_SkipSky = 512
};
enum // cube empty-space materials
{
Mat_Air = 0, // the default, fill the empty space with air
Mat_Water = 1 << MatFlag_VolumeShift, // fill with water, showing waves at the surface
Mat_Glass = 3 << MatFlag_VolumeShift, // behaves like clip but is blended blueish
Mat_NoClip = 1 << MatFlag_ClipShift, // collisions always treat cube as empty
Mat_Clip = 2 << MatFlag_ClipShift, // collisions always treat cube as solid
Mat_GameClip = 3 << MatFlag_ClipShift, // game specific clip material
Mat_Death = 1 << MatFlag_FlagShift, // force player suicide
Mat_Alpha = 4 << MatFlag_FlagShift // alpha blended
};
enum
{
Console_Info = 1<<0,
Console_Warn = 1<<1,
Console_Error = 1<<2,
Console_Debug = 1<<3,
Console_Init = 1<<4,
Console_Echo = 1<<5
};
// input
enum
{
KeyRepeat_Console = 1<<0,
KeyRepeat_GUI = 1<<1,
KeyRepeat_EditMode = 1<<2,
};
// renderlights
enum
{
LightEnt_NoShadow = 1<<0,
LightEnt_Static = 1<<1,
LightEnt_Volumetric = 1<<2,
LightEnt_NoSpecular = 1<<3
};
// dynlight
enum
{
DynLight_Shrink = 1<<8,
DynLight_Expand = 1<<9,
DynLight_Flash = 1<<10
};
// octaedit
enum
{
EditMatFlag_Empty = 0x10000,
EditMatFlag_NotEmpty = 0x20000,
EditMatFlag_Solid = 0x30000,
EditMatFlag_NotSolid = 0x40000
};
//particles
enum
{
Part_Blood = 0,
Part_Water,
Part_Smoke,
Part_Steam,
Part_Flame,
Part_Streak,
Part_RailTrail,
Part_PulseSide,
Part_PulseFront,
Part_Explosion,
Part_PulseBurst,
Part_Spark,
Part_Edit,
Part_Snow,
Part_RailMuzzleFlash,
Part_PulseMuzzleFlash,
Part_HUDIcon,
Part_HUDIconGrey,
Part_Text,
Part_Meter,
Part_MeterVS,
};
//stain
enum
{
Stain_Blood = 0,
Stain_PulseScorch,
Stain_RailHole,
Stain_PulseGlow,
Stain_RailGlow
};
//models
enum
{
Model_CullVFC = 1<<0,
Model_CullDist = 1<<1,
Model_CullOccluded = 1<<2,
Model_CullQuery = 1<<3,
Model_FullBright = 1<<4,
Model_NoRender = 1<<5,
Model_Mapmodel = 1<<6,
Model_NoBatch = 1<<7,
Model_OnlyShadow = 1<<8,
Model_NoShadow = 1<<9,
Model_ForceShadow = 1<<10,
Model_ForceTransparent = 1<<11
};
//sound
enum
{
Music_Map = 1<<0,
Music_NoAlt = 1<<1,
Music_UseAlt = 1<<2
};
enum
{
Init_Not = 0,
Init_Game,
Init_Load,
Init_Reset,
};
#endif /* CONSTS_H_ */