4 // LadyHavoc: changed to match MAX_EDICTS
5 #define CL_MAX_EDICTS MAX_EDICTS
7 #define ENTMASK_ENGINE 1
8 #define ENTMASK_ENGINEVIEWMODELS 2
9 #define ENTMASK_NORMAL 4
11 #define VF_MIN 1 //(vector)
12 #define VF_MIN_X 2 //(float)
13 #define VF_MIN_Y 3 //(float)
14 #define VF_SIZE 4 //(vector) (viewport size)
15 #define VF_SIZE_X 5 //(float)
16 #define VF_SIZE_Y 6 //(float)
17 #define VF_VIEWPORT 7 //(vector, vector)
18 #define VF_FOV 8 //(vector)
19 #define VF_FOVX 9 //(float)
20 #define VF_FOVY 10 //(float)
21 #define VF_ORIGIN 11 //(vector)
22 #define VF_ORIGIN_X 12 //(float)
23 #define VF_ORIGIN_Y 13 //(float)
24 #define VF_ORIGIN_Z 14 //(float)
25 #define VF_ANGLES 15 //(vector)
26 #define VF_ANGLES_X 16 //(float)
27 #define VF_ANGLES_Y 17 //(float)
28 #define VF_ANGLES_Z 18 //(float)
30 #define VF_DRAWWORLD 19 //(float) //actually world model and sky
31 #define VF_DRAWENGINESBAR 20 //(float)
32 #define VF_DRAWCROSSHAIR 21 //(float)
34 #define VF_CL_VIEWANGLES 33 //(vector) //sweet thing for RPGs/...
35 #define VF_CL_VIEWANGLES_X 34 //(float)
36 #define VF_CL_VIEWANGLES_Y 35 //(float)
37 #define VF_CL_VIEWANGLES_Z 36 //(float)
39 // FTEQW's extension range
40 #define VF_PERSPECTIVE 200 //(float)
42 // what is this doing here? This is a DP extension introduced by Black, should be in 4xx range
43 #define VF_CLEARSCREEN 201 //(float)
45 // what is this doing here? This is a DP extension introduced by VorteX, should be in 4xx range
46 #define VF_FOG_DENSITY 202 //(float)
47 #define VF_FOG_COLOR 203 //(vector)
48 #define VF_FOG_COLOR_R 204 //(float)
49 #define VF_FOG_COLOR_G 205 //(float)
50 #define VF_FOG_COLOR_B 206 //(float)
51 #define VF_FOG_ALPHA 207 //(float)
52 #define VF_FOG_START 208 //(float)
53 #define VF_FOG_END 209 //(float)
54 #define VF_FOG_HEIGHT 210 //(float)
55 #define VF_FOG_FADEDEPTH 211 //(float)
57 // DP's extension range
58 #define VF_MAINVIEW 400 //(float)
59 #define VF_MINFPS_QUALITY 401 //(float)
61 #define RF_VIEWMODEL 1 // The entity is never drawn in mirrors. In engines with realtime lighting, it casts no shadows.
62 #define RF_EXTERNALMODEL 2 // The entity is appears in mirrors but not in the normal view. It does still cast shadows in engines with realtime lighting.
63 #define RF_DEPTHHACK 4 // The entity appears closer to the view than normal, either by scaling it wierdly or by just using a depthrange. This will usually be found in conjunction with RF_VIEWMODEL
64 #define RF_ADDITIVE 8 // Add the entity acording to it's alpha values instead of the normal blend
65 #define RF_USEAXIS 16 // When set, the entity will use the v_forward, v_right and v_up globals instead of it's angles field for orientation. Angles will be ignored compleatly.
66 // Note that to use this properly, you'll NEED to use the predraw function to set the globals.
67 //#define RF_DOUBLESIDED 32
68 #define RF_USETRANSPARENTOFFSET 64 // Allows QC to customize origin used for transparent sorting via transparent_origin global, helps to fix transparent sorting bugs on a very large entities
69 #define RF_WORLDOBJECT 128 // for large outdoor entities that should not be culled
70 #define RF_MODELLIGHT 4096 // CSQC-set model light
71 #define RF_DYNAMICMODELLIGHT 8192 // origin-dependent model light
73 #define RF_FULLBRIGHT 256
74 #define RF_NOSHADOW 512
76 extern cvar_t csqc_progname; //[515]: csqc crc check and right csprogs name according to progs.dat
77 extern cvar_t csqc_progcrc;
78 extern cvar_t csqc_progsize;
79 extern cvar_t csqc_polygons_defaultmaterial_nocullface;
81 void CL_VM_PreventInformationLeaks(void);
83 qbool MakeDownloadPacket(const char *filename, unsigned char *data, size_t len, int crc, int cnt, sizebuf_t *buf, int protocol);
85 qbool CL_VM_GetEntitySoundOrigin(int entnum, vec3_t out);
87 qbool CL_VM_TransformView(int entnum, matrix4x4_t *viewmatrix, mplane_t *clipplane, vec3_t visorigin);
89 void CL_VM_Init(void);
90 void CL_VM_ShutDown(void);
91 void CL_VM_UpdateIntermissionState(int intermission);
92 void CL_VM_UpdateShowingScoresState(int showingscores);
93 qbool CL_VM_InputEvent(int eventtype, float x, float y);
94 qbool CL_VM_ConsoleCommand(const char *text);
95 void CL_VM_UpdateDmgGlobals(int dmg_take, int dmg_save, vec3_t dmg_origin);
96 void CL_VM_UpdateIntermissionState(int intermission);
97 qbool CL_VM_Event_Sound(int sound_num, float volume, int channel, float attenuation, int ent, vec3_t pos, int flags, float speed);
98 qbool CL_VM_Parse_TempEntity(void);
99 void CL_VM_Parse_StuffCmd(const char *msg);
100 void CL_VM_Parse_CenterPrint(const char *msg);
101 int CL_GetPitchSign(prvm_prog_t *prog, prvm_edict_t *ent);
102 int CL_GetTagMatrix(prvm_prog_t *prog, matrix4x4_t *out, prvm_edict_t *ent, int tagindex, prvm_vec_t *shadingorigin);
103 void CL_GetEntityMatrix(prvm_prog_t *prog, prvm_edict_t *ent, matrix4x4_t *out, qbool viewmatrix);
104 void QW_CL_StartUpload(unsigned char *data, int size);
106 void CSQC_UpdateNetworkTimes(double newtime, double oldtime);
107 void CSQC_AddPrintText(const char *msg);
108 void CSQC_ReadEntities(void);
109 void CSQC_RelinkAllEntities(int drawmask);
110 void CSQC_RelinkCSQCEntities(void);
111 void CSQC_Predraw(prvm_edict_t *ed);
112 void CSQC_Think(prvm_edict_t *ed);
113 qbool CSQC_AddRenderEdict(prvm_edict_t *ed, int edictnum);//csprogs.c
114 void CSQC_R_RecalcView(void);
116 dp_model_t *CL_GetModelByIndex(int modelindex);
118 int CL_VM_GetViewEntity(void);