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