cvar_t scr_viewsize = {CVAR_SAVE, "viewsize","100", "how large the view should be, 110 disables inventory bar, 120 disables status bar"};
cvar_t scr_fov = {CVAR_SAVE, "fov","90", "field of vision, 1-170 degrees, default 90, some players use 110-130"};
cvar_t scr_conalpha = {CVAR_SAVE, "scr_conalpha", "1", "opacity of console background gfx/conback"};
-cvar_t scr_conalpha2factor = {CVAR_SAVE, "scr_conalpha2factor", "0", "opacity of console background gfx/conback2 relative to gfx/conback; when 0, gfx/conback2 is not drawn"};
+cvar_t scr_conalphafactor = {CVAR_SAVE, "scr_conalphafactor", "1", "opacity of console background gfx/conback relative to scr_conalpha; when 0, gfx/conback is not drawn"};
+cvar_t scr_conalpha2factor = {CVAR_SAVE, "scr_conalpha2factor", "0", "opacity of console background gfx/conback2 relative to scr_conalpha; when 0, gfx/conback2 is not drawn"};
+cvar_t scr_conalpha3factor = {CVAR_SAVE, "scr_conalpha3factor", "0", "opacity of console background gfx/conback3 relative to scr_conalpha; when 0, gfx/conback is not drawn"};
cvar_t scr_conbrightness = {CVAR_SAVE, "scr_conbrightness", "1", "brightness of console background (0 = black, 1 = image)"};
cvar_t scr_conforcewhiledisconnected = {0, "scr_conforcewhiledisconnected", "1", "forces fullscreen console while disconnected"};
cvar_t scr_conscroll_x = {CVAR_SAVE, "scr_conscroll_x", "0", "scroll speed of gfx/conback in x direction"};
cvar_t scr_conscroll_y = {CVAR_SAVE, "scr_conscroll_y", "0", "scroll speed of gfx/conback in y direction"};
cvar_t scr_conscroll2_x = {CVAR_SAVE, "scr_conscroll2_x", "0", "scroll speed of gfx/conback2 in x direction"};
cvar_t scr_conscroll2_y = {CVAR_SAVE, "scr_conscroll2_y", "0", "scroll speed of gfx/conback2 in y direction"};
+cvar_t scr_conscroll3_x = {CVAR_SAVE, "scr_conscroll3_x", "0", "scroll speed of gfx/conback3 in x direction"};
+cvar_t scr_conscroll3_y = {CVAR_SAVE, "scr_conscroll3_y", "0", "scroll speed of gfx/conback3 in y direction"};
cvar_t scr_menuforcewhiledisconnected = {0, "scr_menuforcewhiledisconnected", "0", "forces menu while disconnected"};
cvar_t scr_centertime = {0, "scr_centertime","2", "how long centerprint messages show"};
cvar_t scr_showram = {CVAR_SAVE, "showram","1", "show ram icon if low on surface cache memory (not used)"};
Cvar_RegisterVariable (&scr_fov);
Cvar_RegisterVariable (&scr_viewsize);
Cvar_RegisterVariable (&scr_conalpha);
+ Cvar_RegisterVariable (&scr_conalphafactor);
Cvar_RegisterVariable (&scr_conalpha2factor);
+ Cvar_RegisterVariable (&scr_conalpha3factor);
Cvar_RegisterVariable (&scr_conscroll_x);
Cvar_RegisterVariable (&scr_conscroll_y);
Cvar_RegisterVariable (&scr_conscroll2_x);
Cvar_RegisterVariable (&scr_conscroll2_y);
+ Cvar_RegisterVariable (&scr_conscroll3_x);
+ Cvar_RegisterVariable (&scr_conscroll3_y);
Cvar_RegisterVariable (&scr_conbrightness);
Cvar_RegisterVariable (&scr_conforcewhiledisconnected);
Cvar_RegisterVariable (&scr_menuforcewhiledisconnected);
*/
void Con_DrawConsole (int lines)
{
- float alpha;
+ float alpha, alpha0;
double sx, sy;
int mask_must = 0;
int mask_mustnot = (developer.integer>0) ? 0 : CON_MASK_DEVELOPER;
r_draw2d_force = true;
// draw the background
- alpha = cls.signon == SIGNONS ? scr_conalpha.value : 1.0f; // always full alpha when not in game
- if(alpha > 0)
+ alpha0 = cls.signon == SIGNONS ? scr_conalpha.value : 1.0f; // always full alpha when not in game
+ if((alpha = alpha0 * scr_conalphafactor.value) > 0)
{
sx = scr_conscroll_x.value;
sy = scr_conscroll_y.value;
0);
else
DrawQ_Fill(0, lines - vid_conheight.integer, vid_conwidth.integer, vid_conheight.integer, 0.0f, 0.0f, 0.0f, alpha, 0);
- alpha *= scr_conalpha2factor.value;
}
- if(alpha > 0)
+ if((alpha = alpha0 * scr_conalpha2factor.value) > 0)
{
sx = scr_conscroll2_x.value;
sy = scr_conscroll2_y.value;
1 + sx, 1 + sy, scr_conbrightness.value, scr_conbrightness.value, scr_conbrightness.value, alpha,
0);
}
+ if((alpha = alpha0 * scr_conalpha3factor.value) > 0)
+ {
+ sx = scr_conscroll3_x.value;
+ sy = scr_conscroll3_y.value;
+ conbackpic = Draw_CachePic_Flags("gfx/conback3", (sx != 0 || sy != 0) ? CACHEPICFLAG_NOCLAMP : 0);
+ sx *= realtime; sy *= realtime;
+ sx -= floor(sx); sy -= floor(sy);
+ if(conbackpic && conbackpic->tex != r_texture_notexture)
+ DrawQ_SuperPic(0, lines - vid_conheight.integer, conbackpic, vid_conwidth.integer, vid_conheight.integer,
+ 0 + sx, 0 + sy, scr_conbrightness.value, scr_conbrightness.value, scr_conbrightness.value, alpha,
+ 1 + sx, 0 + sy, scr_conbrightness.value, scr_conbrightness.value, scr_conbrightness.value, alpha,
+ 0 + sx, 1 + sy, scr_conbrightness.value, scr_conbrightness.value, scr_conbrightness.value, alpha,
+ 1 + sx, 1 + sy, scr_conbrightness.value, scr_conbrightness.value, scr_conbrightness.value, alpha,
+ 0);
+ }
DrawQ_String(vid_conwidth.integer - DrawQ_TextWidth(engineversion, 0, con_textsize.value, con_textsize.value, false, FONT_CONSOLE), lines - con_textsize.value, engineversion, 0, con_textsize.value, con_textsize.value, 1, 0, 0, 1, 0, NULL, true, FONT_CONSOLE);
// draw the text
extern cvar_t crosshair_size;
extern cvar_t scr_conalpha;
+extern cvar_t scr_conalphafactor;
extern cvar_t scr_conalpha2factor;
+extern cvar_t scr_conalpha3factor;
extern cvar_t scr_conscroll_x;
extern cvar_t scr_conscroll_y;
extern cvar_t scr_conscroll2_x;
extern cvar_t scr_conscroll2_y;
+extern cvar_t scr_conscroll3_x;
+extern cvar_t scr_conscroll3_y;
extern cvar_t scr_conbrightness;
extern cvar_t r_letterbox;