static void R_Envmap_f (void);
// backend
-void R_ClearScreen(void);
+void R_ClearScreen(qboolean fogcolor);
/*
===============================================================================
// scan the number of characters on the line, not counting color codes
char *newline = strchr(start, '\n');
int l = newline ? (newline - start) : (int)strlen(start);
- float width = DrawQ_TextWidth_Font(start, l, 8, 8, false, FONT_CENTERPRINT);
+ float width = DrawQ_TextWidth_Font(start, l, false, FONT_CENTERPRINT) * 8;
x = (vid_conwidth.integer - width)/2;
if (l > 0)
else
dpsnprintf(temp, sizeof(temp), "Downloading %s %3i%% (%i/%i) at %i bytes/s\n", cls.qw_downloadname, cls.qw_downloadpercent, cls.qw_downloadmemorycursize, cls.qw_downloadmemorymaxsize, cls.qw_downloadspeedrate);
len = (int)strlen(temp);
- x = (vid_conwidth.integer - DrawQ_TextWidth_Font(temp, len, size, size, 0, FONT_INFOBAR)) / 2;
+ x = (vid_conwidth.integer - DrawQ_TextWidth_Font(temp, len, 0, FONT_INFOBAR) * size) / 2;
y = vid_conheight.integer - size - offset;
DrawQ_Fill(0, y, vid_conwidth.integer, size, 0, 0, 0, cls.signon == SIGNONS ? 0.5 : 1, 0);
DrawQ_String_Font(x, y, temp, len, size, size, 1, 1, 1, 1, 0, NULL, true, FONT_INFOBAR);
if(addinfo)
{
len = (int)strlen(addinfo);
- x = (vid_conwidth.integer - DrawQ_TextWidth_Font(addinfo, len, size, size, false, FONT_INFOBAR)) / 2;
+ x = (vid_conwidth.integer - DrawQ_TextWidth_Font(addinfo, len, false, FONT_INFOBAR) * size) / 2;
DrawQ_Fill(0, y - size, vid_conwidth.integer, size, 1, 1, 1, cls.signon == SIGNONS ? 0.8 : 1, 0);
DrawQ_String_Font(x, y - size, addinfo, len, size, size, 0, 0, 0, 1, 0, NULL, true, FONT_INFOBAR);
}
else
dpsnprintf(temp, sizeof(temp), "Downloading %s ... %5.1f%% @ %.1f KiB/s\n", downinfo[i].filename, 100.0 * downinfo[i].progress, downinfo[i].speed / 1024.0);
len = (int)strlen(temp);
- x = (vid_conwidth.integer - DrawQ_TextWidth_Font(temp, len, size, size, false, FONT_INFOBAR)) / 2;
+ x = (vid_conwidth.integer - DrawQ_TextWidth_Font(temp, len, false, FONT_INFOBAR) * size) / 2;
DrawQ_Fill(0, y + i * size, vid_conwidth.integer, size, 0, 0, 0, cls.signon == SIGNONS ? 0.5 : 1, 0);
DrawQ_String_Font(x, y + i * size, temp, len, size, size, 1, 1, 1, 1, 0, NULL, true, FONT_INFOBAR);
}
{
sprintf(filename, "env/%s%s.tga", basename, envmapinfo[j].name);
Matrix4x4_CreateFromQuakeEntity(&r_view.matrix, r_view.origin[0], r_view.origin[1], r_view.origin[2], envmapinfo[j].angles[0], envmapinfo[j].angles[1], envmapinfo[j].angles[2], 1);
- R_ClearScreen();
+ r_view.clear = true;
R_Mesh_Start();
R_RenderView();
R_Mesh_Finish();
//=============================================================================
-void R_ClearScreen(void)
+extern void R_UpdateFogColor(void);
+void R_ClearScreen(qboolean fogcolor)
{
// clear to black
CHECKGLERROR
- if (r_refdef.fogenabled)
+ if (fogcolor)
{
+ R_UpdateFogColor();
qglClearColor(r_refdef.fogcolor[0],r_refdef.fogcolor[1],r_refdef.fogcolor[2],0);CHECKGLERROR
}
else
qglDepthMask(1);CHECKGLERROR
qglColorMask(1,1,1,1);CHECKGLERROR
qglClearColor(0,0,0,0);CHECKGLERROR
- R_ClearScreen();
+ R_ClearScreen(false);
r_view.clear = false;
if(scr_stipple.integer)