1#pragma once
2
3// Mask Constants (set .drawmask on entities; use R_AddEntities to add all entities based on mask)
4const int		MASK_ENGINE						= BIT(0);
5const int		MASK_ENGINEVIEWMODELS			= BIT(1);
6const int		MASK_NORMAL						= BIT(2);
7
8// Renderflag Constants (used for CSQC entities)
9const int		RF_VIEWMODEL					= BIT(0);
10const int		RF_EXTERNALMODEL				= BIT(1);
11const int		RF_DEPTHHACK					= BIT(2);
12const int		RF_ADDITIVE						= BIT(3);
13const int		RF_USEAXIS						= BIT(4);
14
15// Viewflag Constants (use with R_SetView)
16const int		VF_MIN							= 1;	//(vector)
17const int		VF_MIN_X						= 2;	//(float)
18const int		VF_MIN_Y						= 3;	//(float)
19const int		VF_SIZE							= 4;	//(vector) (viewport size)
20const int		VF_SIZE_Y						= 5;	//(float)
21const int		VF_SIZE_X						= 6;	//(float)
22const int		VF_VIEWPORT						= 7;	//(vector, vector)
23const int		VF_FOV							= 8;	//(vector)
24const int		VF_FOVX							= 9;	//(float)
25const int		VF_FOVY							= 10;	//(float)
26const int		VF_ORIGIN						= 11;	//(vector)
27const int		VF_ORIGIN_X						= 12;	//(float)
28const int		VF_ORIGIN_Y						= 13;	//(float)
29const int		VF_ORIGIN_Z						= 14;	//(float)
30const int		VF_ANGLES						= 15;	//(vector)
31const int		VF_ANGLES_X						= 16;	//(float)
32const int		VF_ANGLES_Y						= 17;	//(float)
33const int		VF_ANGLES_Z						= 18;	//(float)
34const int		VF_DRAWWORLD					= 19;	//(float)
35const int		VF_DRAWENGINEHUD				= 20;	//(float)
36const int		VF_DRAWCROSSHAIR				= 21;	//(float)
37const int		VF_PERSPECTIVE					= 200;	//(float)
38
39const int		VF_CL_VIEWANGLES				= 33;	//(vector)
40const int		VF_CL_VIEWANGLES_X				= 34;	//(float)
41const int		VF_CL_VIEWANGLES_Y				= 35;	//(float)
42const int		VF_CL_VIEWANGLES_Z				= 36;	//(float)
43
44// Quake-style Point Contents
45const int		CONTENT_EMPTY					= -1;
46const int		CONTENT_SOLID					= -2;
47const int		CONTENT_WATER					= -3;
48const int		CONTENT_SLIME					= -4;
49const int		CONTENT_LAVA					= -5;
50const int		CONTENT_SKY						= -6;
51
52// Vector / Hull Constants
53const vector	VEC_1							= '1 1 1';
54const vector	VEC_0							= '0 0 0';
55const vector	VEC_M1							= '-1 -1 -1';
56
57const vector	VEC_HULL_MIN 					= '-16 -16 -24';
58const vector	VEC_HULL_MAX 					= '16 16 32';
59
60// Effect Constants
61const int 	EF_NODRAW						= BIT(4);
62const int 	EF_ADDITIVE						= BIT(5);
63const int 	EF_BLUE							= BIT(6);
64const int 	EF_RED							= BIT(7);
65const int 	EF_FULLBRIGHT					= BIT(9);
66const int 	EF_FLAME						= BIT(10);
67const int 	EF_STARDUST						= BIT(11);
68const int 	EF_NOSHADOW						= BIT(12);
69const int 	EF_NODEPTHTEST					= BIT(13);
70
71// Quake Player Flag Constants
72const int 	PFL_ONGROUND					= BIT(0);
73const int 	PFL_CROUCH						= BIT(1);
74const int 	PFL_DEAD						= BIT(2);
75const int 	PFL_GIBBED						= BIT(3);
76
77// Quake Temporary Entity Constants
78const int		TE_SPIKE						= 0;
79const int		TE_SUPERSPIKE					= 1;
80const int		TE_GUNSHOT						= 2;
81const int		TE_EXPLOSION					= 3;
82const int		TE_TAREXPLOSION					= 4;
83const int		TE_LIGHTNING1					= 5;
84const int		TE_LIGHTNING2					= 6;
85const int		TE_WIZSPIKE						= 7;
86const int		TE_KNIGHTSPIKE					= 8;
87const int		TE_LIGHTNING3					= 9;
88const int		TE_LAVASPLASH					= 10;
89const int		TE_TELEPORT						= 11;
90const int 	TE_EXPLOSION2					= 12;
91// Darkplaces Additions
92const int 	TE_EXPLOSIONRGB					= 53;
93const int		TE_GUNSHOTQUAD					= 57;
94const int		TE_EXPLOSIONQUAD 				= 70;
95
96// Math Constants
97const int 	EXTRA_LOW 						= -99999999;
98const int 	EXTRA_HIGH 						= 99999999;
99
100// Frik File Constants
101const int		FILE_READ						= 0;
102const int		FILE_APPEND						= 1;
103const int		FILE_WRITE						= 2;
104
105// Button values used by input_buttons
106const int BUTTON_ATTACK = BIT(0);
107const int BUTTON_JUMP = BIT(1);
108const int BUTTON_3 = BIT(2);
109const int BUTTON_4 = BIT(3);
110const int BUTTON_5 = BIT(4);
111const int BUTTON_6 = BIT(5);
112const int BUTTON7 = BIT(6);
113const int BUTTON8 = BIT(7);
114const int BUTTON_USE = BIT(8);
115const int BUTTON_CHAT = BIT(9);
116const int BUTTON_PRYDONCURSOR = BIT(10);
117const int BUTTON_9 = BIT(11);
118const int BUTTON_10 = BIT(12);
119const int BUTTON_11 = BIT(13);
120const int BUTTON_12 = BIT(14);
121const int BUTTON_13 = BIT(15);
122const int BUTTON_14 = BIT(16);
123const int BUTTON_15 = BIT(17);
124const int BUTTON_16 = BIT(18);
125
126const int SOLID_NOT 		= 0; // no interaction with other objects
127const int SOLID_TRIGGER 	= 1; // touch on edge, but not blocking
128const int SOLID_BBOX 		= 2; // touch on edge, block
129const int SOLID_SLIDEBOX 	= 3; // touch on edge, but not an onground
130const int SOLID_BSP 		= 4; // bsp clip, touch on edge, block
131const int SOLID_CORPSE 	= 5; // same as SOLID_BBOX, except it behaves as SOLID_NOT against SOLID_SLIDEBOX objects (players/monsters)
132
133const int MOVE_NORMAL = 0; // same as false
134const int MOVE_NOMONSTERS = 1; // same as true
135const int MOVE_MISSILE = 2; // save as movement with .move_movetype == MOVETYPE_FLYMISSILE
136const int MOVE_HITMODEL = 4;
137const int MOVE_WORLDONLY = 3;
138
139const int CAMERA_FREE = 1;
140const int CAMERA_CHASE = 2;
141
142const int EF_NOMODELFLAGS = BIT(23);
143