4 // LordHavoc: 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 #define VF_PERSPECTIVE 200 //(float)
40 #define VF_CLEARSCREEN 201 //(float)
42 #define VF_FOG_DENSITY 202 //(float)
43 #define VF_FOG_COLOR 203 //(vector)
44 #define VF_FOG_COLOR_R 204 //(float)
45 #define VF_FOG_COLOR_G 205 //(float)
46 #define VF_FOG_COLOR_B 206 //(float)
47 #define VF_FOG_ALPHA 207 //(float)
48 #define VF_FOG_START 208 //(float)
49 #define VF_FOG_END 209 //(float)
50 #define VF_FOG_HEIGHT 210 //(float)
51 #define VF_FOG_FADEDEPTH 211 //(float)
53 #define RF_VIEWMODEL 1 // The entity is never drawn in mirrors. In engines with realtime lighting, it casts no shadows.
54 #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.
55 #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
56 #define RF_ADDITIVE 8 // Add the entity acording to it's alpha values instead of the normal blend
57 #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.
58 // Note that to use this properly, you'll NEED to use the predraw function to set the globals.
59 //#define RF_DOUBLESIDED 32
60 #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
61 #define RF_WORLDOBJECT 128 // for large outdoor entities that should not be culled
62 #define RF_MODELLIGHT 4096 // CSQC-set model light
64 #define RF_FULLBRIGHT 256
65 #define RF_NOSHADOW 512
67 extern cvar_t csqc_progname; //[515]: csqc crc check and right csprogs name according to progs.dat
68 extern cvar_t csqc_progcrc;
69 extern cvar_t csqc_progsize;
71 void CL_VM_PreventInformationLeaks(void);
73 qboolean MakeDownloadPacket(const char *filename, unsigned char *data, size_t len, int crc, int cnt, sizebuf_t *buf, int protocol);
75 qboolean CL_VM_GetEntitySoundOrigin(int entnum, vec3_t out);
77 qboolean CL_VM_TransformView(int entnum, matrix4x4_t *viewmatrix, mplane_t *clipplane, vec3_t visorigin);
79 void CL_VM_Init(void);
80 void CL_VM_ShutDown(void);
81 void CL_VM_UpdateIntermissionState(int intermission);
82 void CL_VM_UpdateShowingScoresState(int showingscores);
83 qboolean CL_VM_InputEvent(int eventtype, int x, int y);
84 qboolean CL_VM_ConsoleCommand(const char *cmd);
85 void CL_VM_UpdateDmgGlobals(int dmg_take, int dmg_save, vec3_t dmg_origin);
86 void CL_VM_UpdateIntermissionState(int intermission);
87 qboolean CL_VM_Event_Sound(int sound_num, float volume, int channel, float attenuation, int ent, vec3_t pos, int flags, float speed);
88 qboolean CL_VM_Parse_TempEntity(void);
89 void CL_VM_Parse_StuffCmd(const char *msg);
90 void CL_VM_Parse_CenterPrint(const char *msg);
91 int CL_GetPitchSign(prvm_prog_t *prog, prvm_edict_t *ent);
92 int CL_GetTagMatrix(prvm_prog_t *prog, matrix4x4_t *out, prvm_edict_t *ent, int tagindex);
93 void CL_GetEntityMatrix(prvm_prog_t *prog, prvm_edict_t *ent, matrix4x4_t *out, qboolean viewmatrix);
94 /* VMs exposing the polygon calls must call this on Init/Reset */
95 void VM_Polygons_Reset(prvm_prog_t *prog);
96 void QW_CL_StartUpload(unsigned char *data, int size);
98 void CSQC_UpdateNetworkTimes(double newtime, double oldtime);
99 void CSQC_AddPrintText(const char *msg);
100 void CSQC_ReadEntities(void);
101 void CSQC_RelinkAllEntities(int drawmask);
102 void CSQC_RelinkCSQCEntities(void);
103 void CSQC_Predraw(prvm_edict_t *ed);
104 void CSQC_Think(prvm_edict_t *ed);
105 qboolean CSQC_AddRenderEdict(prvm_edict_t *ed, int edictnum);//csprogs.c
106 void CSQC_R_RecalcView(void);
108 dp_model_t *CL_GetModelByIndex(int modelindex);