cvar_t csqc_progsize = {CF_CLIENT | CF_READONLY, "csqc_progsize","-1","file size of csprogs.dat file to load (-1 is none), only used during level changes and then reset to -1"};
cvar_t csqc_usedemoprogs = {CF_CLIENT, "csqc_usedemoprogs","1","use csprogs stored in demos"};
cvar_t csqc_polygons_defaultmaterial_nocullface = {CF_CLIENT, "csqc_polygons_defaultmaterial_nocullface", "0", "use 'cull none' behavior in the default shader for rendering R_PolygonBegin - warning: enabling this is not consistent with FTEQW behavior on this feature"};
+cvar_t csqc_lowres = {CF_CLIENT, "csqc_lowres", "0", "make EXT_CSQC functions CSQC_UpdateView(), setproperty(), getproperty() use the virtual 2D resolution (FTEQW/QSS behaviour) instead of the real resolution (DP behaviour); this mode is always used for the CSQC_SIMPLE (aka hud-only) CSQC_DrawHud() parameters; see cvars vid_conheight and vid_conwidth"};
cvar_t cl_shownet = {CF_CLIENT, "cl_shownet","0","1 = print packet size, 2 = print packet message list"};
cvar_t cl_nolerp = {CF_CLIENT, "cl_nolerp", "0","network update smoothing"};
Cmd_AddCommand(CF_CLIENT, "locs_save", CL_Locs_Save_f, "save .loc file for this map containing currently defined points and boxes");
Cvar_RegisterVariable(&csqc_polygons_defaultmaterial_nocullface);
+ Cvar_RegisterVariable(&csqc_lowres);
Cvar_RegisterVariable (&cl_minfps);
Cvar_RegisterVariable (&cl_minfps_fade);
VM_Warning(prog, "VM_CL_R_GetView : unknown parm %i\n", c);
return;
}
+ if (csqc_lowres.integer)
+ {
+ switch(c)
+ {
+ case VF_MIN: case VF_MIN_X: case VF_MIN_Y: case VF_SIZE: case VF_SIZE_X: case VF_SIZE_Y: case VF_VIEWPORT:
+ VectorScale(PRVM_G_VECTOR(OFS_RETURN), vid_conwidth.value / vid.mode.width, PRVM_G_VECTOR(OFS_RETURN));
+ }
+ }
return;
}
+ if (csqc_lowres.integer)
+ {
+ float scale = vid.mode.width / vid_conwidth.value;
+ switch(c)
+ {
+ case VF_MIN: case VF_MIN_X: case VF_MIN_Y: case VF_SIZE: case VF_SIZE_X: case VF_SIZE_Y: case VF_VIEWPORT:
+ VectorScale(PRVM_G_VECTOR(OFS_PARM1), scale, PRVM_G_VECTOR(OFS_PARM1));
+ VectorScale(PRVM_G_VECTOR(OFS_PARM2), scale, PRVM_G_VECTOR(OFS_PARM2));
+ }
+ }
f = PRVM_G_VECTOR(OFS_PARM1);
k = PRVM_G_FLOAT(OFS_PARM1);
switch(c)
// free memory for resources that are no longer referenced
PRVM_GarbageCollection(prog);
// pass in width and height and menu/focus state as parameters (EXT_CSQC_1)
- PRVM_G_FLOAT(OFS_PARM0) = vid.mode.width;
- PRVM_G_FLOAT(OFS_PARM1) = vid.mode.height;
+ if (csqc_lowres.integer)
+ {
+ PRVM_G_FLOAT(OFS_PARM0) = vid_conwidth.value;
+ PRVM_G_FLOAT(OFS_PARM1) = vid_conheight.value;
+ }
+ else
+ {
+ PRVM_G_FLOAT(OFS_PARM0) = vid.mode.width;
+ PRVM_G_FLOAT(OFS_PARM1) = vid.mode.height;
+ }
/*
* This should be fine for now but FTEQW uses flags for keydest
* and checks that an array called "eyeoffset" is 0
extern cvar_t csqc_progcrc;
extern cvar_t csqc_progsize;
extern cvar_t csqc_polygons_defaultmaterial_nocullface;
+extern cvar_t csqc_lowres;
void CL_VM_PreventInformationLeaks(void);