6 cvar_t scr_viewsize = {CVAR_SAVE, "viewsize","100"};
7 cvar_t scr_fov = {CVAR_SAVE, "fov","90"}; // 10 - 170
8 cvar_t scr_conspeed = {CVAR_SAVE, "scr_conspeed","900"}; // LordHavoc: quake used 300
9 cvar_t scr_centertime = {0, "scr_centertime","2"};
10 cvar_t scr_showram = {CVAR_SAVE, "showram","1"};
11 cvar_t scr_showturtle = {CVAR_SAVE, "showturtle","0"};
12 cvar_t scr_showpause = {CVAR_SAVE, "showpause","1"};
13 cvar_t scr_printspeed = {0, "scr_printspeed","8"};
14 cvar_t scr_2dresolution = {CVAR_SAVE, "scr_2dresolution", "1"};
15 cvar_t scr_screenshot_jpeg = {CVAR_SAVE, "scr_screenshot_jpeg","0"};
16 cvar_t cl_avidemo = {0, "cl_avidemo", "0"};
18 qboolean scr_initialized; // ready to draw
20 float scr_con_current;
21 float scr_conlines; // lines of console to display
26 qboolean scr_drawloading = false;
28 static qbyte menuplyr_pixels[4096];
30 void DrawCrosshair(int num);
31 void V_CalcRefdef (void);
32 static void SCR_ScreenShot_f (void);
33 static void R_Envmap_f (void);
36 void R_ClearScreen(void);
39 ===============================================================================
43 ===============================================================================
46 char scr_centerstring[1024];
47 float scr_centertime_start; // for slow victory printing
48 float scr_centertime_off;
57 Called for important messages that should stay in the center of the screen
61 void SCR_CenterPrint (char *str)
63 strncpy (scr_centerstring, str, sizeof(scr_centerstring)-1);
64 scr_centertime_off = scr_centertime.value;
65 scr_centertime_start = cl.time;
67 // count the number of lines for centering
78 void SCR_DrawCenterString (void)
85 // the finale prints the characters one at a time
87 remaining = scr_printspeed.value * (cl.time - scr_centertime_start);
92 start = scr_centerstring;
94 if (scr_center_lines <= 4)
95 y = vid.conheight*0.35;
101 // scan the width of the line
102 for (l=0 ; l<40 ; l++)
103 if (start[l] == '\n' || !start[l])
105 x = (vid.conwidth - l*8)/2;
110 DrawQ_String(x, y, start, l, 8, 8, 1, 1, 1, 1, 0);
118 while (*start && *start != '\n')
123 start++; // skip the \n
127 void SCR_CheckDrawCenterString (void)
129 if (scr_center_lines > scr_erase_lines)
130 scr_erase_lines = scr_center_lines;
132 scr_centertime_off -= host_frametime;
134 // don't draw if this is a normal stats-screen intermission,
135 // only if it is not an intermission, or a finale intermission
136 if (cl.intermission == 1)
138 if (scr_centertime_off <= 0 && !cl.intermission)
140 if (key_dest != key_game)
143 SCR_DrawCenterString ();
151 void SCR_DrawTurtle (void)
155 if (cls.state != ca_connected)
158 if (!scr_showturtle.integer)
161 if (host_frametime < 0.1)
171 DrawQ_Pic (0, 0, "gfx/turtle.lmp", 0, 0, 1, 1, 1, 1, 0);
179 void SCR_DrawNet (void)
181 if (cls.state != ca_connected)
183 if (realtime - cl.last_received_message < 0.3)
185 if (cls.demoplayback)
188 DrawQ_Pic (64, 0, "gfx/net.lmp", 0, 0, 1, 1, 1, 1, 0);
196 void SCR_DrawPause (void)
200 if (cls.state != ca_connected)
203 if (!scr_showpause.integer) // turn off for screenshots
209 pic = Draw_CachePic ("gfx/pause.lmp");
210 DrawQ_Pic ((vid.conwidth - pic->width)/2, (vid.conheight - pic->height)/2, "gfx/pause.lmp", 0, 0, 1, 1, 1, 1, 0);
220 void SCR_DrawLoading (void)
224 pic = Draw_CachePic ("gfx/loading.lmp");
225 DrawQ_Pic ((vid.conwidth - pic->width)/2, (vid.conheight - pic->height)/2, "gfx/loading.lmp", 0, 0, 1, 1, 1, 1, 0);
230 //=============================================================================
235 SCR_SetUpToDrawConsole
238 void SCR_SetUpToDrawConsole (void)
242 if (key_dest == key_game && cls.signon != SIGNONS)
243 key_consoleactive |= KEY_CONSOLEACTIVE_FORCED;
245 key_consoleactive &= ~KEY_CONSOLEACTIVE_FORCED;
247 // decide on the height of the console
248 if (key_consoleactive & KEY_CONSOLEACTIVE_FORCED)
249 scr_conlines = vid.conheight; // full screen
250 else if (key_consoleactive & KEY_CONSOLEACTIVE_USER)
251 scr_conlines = vid.conheight/2; // half screen
253 scr_conlines = 0; // none visible
255 if (scr_conspeed.value)
257 if (scr_conlines < scr_con_current)
259 scr_con_current -= scr_conspeed.value*host_realframetime;
260 if (scr_conlines > scr_con_current)
261 scr_con_current = scr_conlines;
264 else if (scr_conlines > scr_con_current)
266 scr_con_current += scr_conspeed.value*host_realframetime;
267 if (scr_conlines < scr_con_current)
268 scr_con_current = scr_conlines;
272 scr_con_current = scr_conlines;
280 void SCR_DrawConsole (void)
284 Con_DrawConsole (scr_con_current);
289 if (key_dest == key_game || key_dest == key_message)
290 Con_DrawNotify (); // only draw notify in game
296 SCR_BeginLoadingPlaque
300 void SCR_BeginLoadingPlaque (void)
305 S_StopAllSounds (true);
307 scr_drawloading = true;
309 scr_drawloading = true;
313 //=============================================================================
315 char r_speeds_string[1024];
316 int speedstringcount, r_timereport_active;
317 double r_timereport_temp = 0, r_timereport_current = 0, r_timereport_start = 0;
319 void R_TimeReport(char *desc)
325 if (!r_timereport_active)
328 r_timereport_temp = r_timereport_current;
329 r_timereport_current = Sys_DoubleTime();
330 t = (int) ((r_timereport_current - r_timereport_temp) * 1000000.0);
332 sprintf(tempbuf, "%8i %s", t, desc);
333 length = strlen(tempbuf);
335 tempbuf[length++] = ' ';
337 if (speedstringcount + length > (vid.conwidth / 8))
339 strcat(r_speeds_string, "\n");
340 speedstringcount = 0;
342 // skip the space at the beginning if it's the first on the line
343 if (speedstringcount == 0)
345 strcat(r_speeds_string, tempbuf + 1);
346 speedstringcount = length - 1;
350 strcat(r_speeds_string, tempbuf);
351 speedstringcount += length;
355 extern int c_rt_lights, c_rt_clears, c_rt_scissored;
356 extern int c_rt_shadowmeshes, c_rt_shadowtris, c_rt_lightmeshes, c_rt_lighttris;
357 extern int c_rtcached_shadowmeshes, c_rtcached_shadowtris;
358 void R_TimeReport_Start(void)
360 r_timereport_active = r_speeds.integer && cls.signon == SIGNONS && cls.state == ca_connected;
361 r_speeds_string[0] = 0;
362 if (r_timereport_active)
364 speedstringcount = 0;
365 AngleVectors (r_refdef.viewangles, vpn, NULL, NULL);
366 sprintf(r_speeds_string,
367 "org:'%+8.2f %+8.2f %+8.2f' ang:'%+4.0f %+4.0f %+4.0f' dir:'%+2.3f %+2.3f %+2.3f'\n"
368 "world:%6i faces%6i nodes%6i leafs%6i dlitwalls\n"
369 "%5i models%5i bmodels%5i sprites%6i particles%4i dlights\n"
370 "%6i modeltris%6i meshs%6i meshtris\n",
371 r_refdef.vieworg[0], r_refdef.vieworg[1], r_refdef.vieworg[2], r_refdef.viewangles[0], r_refdef.viewangles[1], r_refdef.viewangles[2], vpn[0], vpn[1], vpn[2],
372 c_faces, c_nodes, c_leafs, c_light_polys,
373 c_models, c_bmodels, c_sprites, c_particles, c_dlights,
374 c_alias_polys, c_meshs, c_meshelements / 3);
376 sprintf(r_speeds_string + strlen(r_speeds_string),
377 "realtime lighting:%4i lights%4i clears%4i scissored\n"
378 "dynamic: %6i shadowmeshes%6i shadowtris%6i lightmeshes%6i lighttris\n"
379 "precomputed: %6i shadowmeshes%6i shadowtris\n",
380 c_rt_lights, c_rt_clears, c_rt_scissored,
381 c_rt_shadowmeshes, c_rt_shadowtris, c_rt_lightmeshes, c_rt_lighttris,
382 c_rtcached_shadowmeshes, c_rtcached_shadowtris);
396 r_timereport_start = Sys_DoubleTime();
400 void R_TimeReport_End(void)
402 r_timereport_current = r_timereport_start;
403 R_TimeReport("total");
405 if (r_timereport_active)
409 for (i = 0;r_speeds_string[i];i++)
410 if (r_speeds_string[i] == '\n')
412 y = vid.conheight - sb_lines - lines * 8;
414 DrawQ_Fill(0, y, vid.conwidth, lines * 8, 0, 0, 0, 0.5, 0);
415 while (r_speeds_string[i])
418 while (r_speeds_string[i] && r_speeds_string[i] != '\n')
421 DrawQ_String(0, y, r_speeds_string + j, i - j, 8, 8, 1, 1, 1, 1, 0);
422 if (r_speeds_string[i] == '\n')
436 void SCR_SizeUp_f (void)
438 Cvar_SetValue ("viewsize",scr_viewsize.value+10);
449 void SCR_SizeDown_f (void)
451 Cvar_SetValue ("viewsize",scr_viewsize.value-10);
454 void CL_Screen_Init(void)
458 Cvar_RegisterVariable (&scr_fov);
459 Cvar_RegisterVariable (&scr_viewsize);
460 Cvar_RegisterVariable (&scr_conspeed);
461 Cvar_RegisterVariable (&scr_showram);
462 Cvar_RegisterVariable (&scr_showturtle);
463 Cvar_RegisterVariable (&scr_showpause);
464 Cvar_RegisterVariable (&scr_centertime);
465 Cvar_RegisterVariable (&scr_printspeed);
466 Cvar_RegisterVariable (&scr_2dresolution);
467 Cvar_RegisterVariable (&scr_screenshot_jpeg);
468 Cvar_RegisterVariable (&cl_avidemo);
470 Cmd_AddCommand ("sizeup",SCR_SizeUp_f);
471 Cmd_AddCommand ("sizedown",SCR_SizeDown_f);
472 Cmd_AddCommand ("screenshot",SCR_ScreenShot_f);
473 Cmd_AddCommand ("envmap", R_Envmap_f);
475 scr_initialized = true;
478 // load the image data for the player image in the config menu
479 dat = (qpic_t *)FS_LoadFile ("gfx/menuplyr.lmp", false);
481 Sys_Error("unable to load gfx/menuplyr.lmp");
484 if (dat->width*dat->height <= 4096)
485 memcpy (menuplyr_pixels, dat->data, dat->width * dat->height);
487 Con_Printf("gfx/menuplyr.lmp larger than 4k buffer");
491 void DrawQ_Clear(void)
493 r_refdef.drawqueuesize = 0;
496 static int picelements[6] = {0, 1, 2, 0, 2, 3};
497 void DrawQ_Pic(float x, float y, char *picname, float width, float height, float red, float green, float blue, float alpha, int flags)
499 DrawQ_SuperPic(x,y,picname,width,height,0,0,red,green,blue,alpha,1,0,red,green,blue,alpha,0,1,red,green,blue,alpha,1,1,red,green,blue,alpha,flags);
502 void DrawQ_String(float x, float y, const char *string, int maxlen, float scalex, float scaley, float red, float green, float blue, float alpha, int flags)
507 if (alpha < (1.0f / 255.0f))
510 len = strlen(string);
512 for (len = 0;len < maxlen && string[len];len++);
513 for (;len > 0 && string[0] == ' ';string++, x += scalex, len--);
514 for (;len > 0 && string[len - 1] == ' ';len--);
517 if (x >= vid.conwidth || y >= vid.conheight || x < (-scalex * maxlen) || y < (-scaley))
519 size = sizeof(*dq) + ((len + 1 + 3) & ~3);
520 if (r_refdef.drawqueuesize + size > r_refdef.maxdrawqueuesize)
522 red = bound(0, red, 1);
523 green = bound(0, green, 1);
524 blue = bound(0, blue, 1);
525 alpha = bound(0, alpha, 1);
526 dq = (void *)(r_refdef.drawqueue + r_refdef.drawqueuesize);
528 dq->command = DRAWQUEUE_STRING;
530 dq->color = ((unsigned int) (red * 255.0f) << 24) | ((unsigned int) (green * 255.0f) << 16) | ((unsigned int) (blue * 255.0f) << 8) | ((unsigned int) (alpha * 255.0f));
535 out = (char *)(dq + 1);
536 memcpy(out, string, len);
538 r_refdef.drawqueuesize += dq->size;
541 void DrawQ_Fill (float x, float y, float w, float h, float red, float green, float blue, float alpha, int flags)
543 DrawQ_SuperPic(x,y,NULL,w,h,0,0,red,green,blue,alpha,1,0,red,green,blue,alpha,0,1,red,green,blue,alpha,1,1,red,green,blue,alpha,flags);
546 void DrawQ_SuperPic(float x, float y, char *picname, float width, float height, float s1, float t1, float r1, float g1, float b1, float a1, float s2, float t2, float r2, float g2, float b2, float a2, float s3, float t3, float r3, float g3, float b3, float a3, float s4, float t4, float r4, float g4, float b4, float a4, int flags)
550 drawqueuemesh_t mesh;
551 memset(&mesh, 0, sizeof(mesh));
552 if (picname && picname[0])
554 pic = Draw_CachePic(picname);
558 height = pic->height;
559 mesh.texture = pic->tex;
561 mesh.numtriangles = 2;
562 mesh.numvertices = 4;
563 mesh.element3i = picelements;
564 mesh.vertex3f = floats;
565 mesh.texcoord2f = floats + 12;
566 mesh.color4f = floats + 20;
567 memset(floats, 0, sizeof(floats));
568 mesh.vertex3f[0] = mesh.vertex3f[9] = x;
569 mesh.vertex3f[1] = mesh.vertex3f[4] = y;
570 mesh.vertex3f[3] = mesh.vertex3f[6] = x + width;
571 mesh.vertex3f[7] = mesh.vertex3f[10] = y + height;
572 mesh.texcoord2f[0] = s1;mesh.texcoord2f[1] = t1;mesh.color4f[ 0] = r1;mesh.color4f[ 1] = g1;mesh.color4f[ 2] = b1;mesh.color4f[ 3] = a1;
573 mesh.texcoord2f[2] = s2;mesh.texcoord2f[3] = t2;mesh.color4f[ 4] = r2;mesh.color4f[ 5] = g2;mesh.color4f[ 6] = b2;mesh.color4f[ 7] = a2;
574 mesh.texcoord2f[4] = s4;mesh.texcoord2f[5] = t4;mesh.color4f[ 8] = r4;mesh.color4f[ 9] = g4;mesh.color4f[10] = b4;mesh.color4f[11] = a4;
575 mesh.texcoord2f[6] = s3;mesh.texcoord2f[7] = t3;mesh.color4f[12] = r3;mesh.color4f[13] = g3;mesh.color4f[14] = b3;mesh.color4f[15] = a3;
576 DrawQ_Mesh (&mesh, flags);
579 void DrawQ_Mesh (drawqueuemesh_t *mesh, int flags)
586 size += sizeof(drawqueuemesh_t);
587 size += sizeof(int[3]) * mesh->numtriangles;
588 size += sizeof(float[3]) * mesh->numvertices;
589 size += sizeof(float[2]) * mesh->numvertices;
590 size += sizeof(float[4]) * mesh->numvertices;
591 if (r_refdef.drawqueuesize + size > r_refdef.maxdrawqueuesize)
593 dq = (void *)(r_refdef.drawqueue + r_refdef.drawqueuesize);
595 dq->command = DRAWQUEUE_MESH;
602 p = (void *)(dq + 1);
603 m = p;(qbyte *)p += sizeof(drawqueuemesh_t);
604 m->numtriangles = mesh->numtriangles;
605 m->numvertices = mesh->numvertices;
606 m->texture = mesh->texture;
607 m->element3i = p;memcpy(m->element3i , mesh->element3i , m->numtriangles * sizeof(int[3]));(qbyte *)p += m->numtriangles * sizeof(int[3]);
608 m->vertex3f = p;memcpy(m->vertex3f , mesh->vertex3f , m->numvertices * sizeof(float[3]));(qbyte *)p += m->numvertices * sizeof(float[3]);
609 m->texcoord2f = p;memcpy(m->texcoord2f, mesh->texcoord2f, m->numvertices * sizeof(float[2]));(qbyte *)p += m->numvertices * sizeof(float[2]);
610 m->color4f = p;memcpy(m->color4f , mesh->color4f , m->numvertices * sizeof(float[4]));(qbyte *)p += m->numvertices * sizeof(float[4]);
611 r_refdef.drawqueuesize += dq->size;
619 float CalcFov (float fov_x, float width, float height)
621 // calculate vision size and alter by aspect, then convert back to angle
622 return atan (height / (width / tan(fov_x/360*M_PI))) * 360 / M_PI;
629 Must be called whenever vid changes
633 static void SCR_CalcRefdef (void)
638 //========================================
641 if (scr_viewsize.value < 30)
642 Cvar_Set ("viewsize","30");
643 if (scr_viewsize.value > 120)
644 Cvar_Set ("viewsize","120");
646 // bound field of view
647 if (scr_fov.value < 10)
648 Cvar_Set ("fov","10");
649 if (scr_fov.value > 170)
650 Cvar_Set ("fov","170");
652 // intermission is always full screen
660 if (scr_viewsize.value >= 120)
661 sb_lines = 0; // no status bar at all
662 else if (scr_viewsize.value >= 110)
663 sb_lines = 24; // no inventory
666 size = scr_viewsize.value * (1.0 / 100.0);
671 r_refdef.width = vid.realwidth;
672 r_refdef.height = vid.realheight;
678 r_refdef.width = vid.realwidth * size;
679 r_refdef.height = vid.realheight * size;
680 r_refdef.x = (vid.realwidth - r_refdef.width)/2;
681 r_refdef.y = (vid.realheight - r_refdef.height)/2;
684 r_refdef.width = bound(0, r_refdef.width, vid.realwidth);
685 r_refdef.height = bound(0, r_refdef.height, vid.realheight);
686 r_refdef.x = bound(0, r_refdef.x, vid.realwidth - r_refdef.width) + vid.realx;
687 r_refdef.y = bound(0, r_refdef.y, vid.realheight - r_refdef.height) + vid.realy;
689 // LordHavoc: viewzoom (zoom in for sniper rifles, etc)
690 r_refdef.fov_x = scr_fov.value * cl.viewzoom;
691 r_refdef.fov_y = CalcFov (r_refdef.fov_x, r_refdef.width, r_refdef.height);
695 Mod_CheckLoaded(cl.worldmodel);
696 contents = Mod_PointContents(r_refdef.vieworg, cl.worldmodel);
697 if (contents != CONTENTS_EMPTY && contents != CONTENTS_SOLID)
699 r_refdef.fov_x *= (sin(cl.time * 4.7) * 0.015 + 0.985);
700 r_refdef.fov_y *= (sin(cl.time * 3.0) * 0.015 + 0.985);
710 void SCR_ScreenShot_f (void)
714 char checkname[MAX_OSPATH];
716 qboolean jpeg = (scr_screenshot_jpeg.integer != 0);
723 // find a file name to save it to
724 for (; i<=9999 ; i++)
726 sprintf (filename, "dp%04i.%s", i, extens);
727 sprintf (checkname, "%s/%s", fs_gamedir, filename);
728 if (!FS_SysFileExists(checkname))
733 Con_Printf ("SCR_ScreenShot_f: Couldn't create the image file\n");
737 if (SCR_ScreenShot (filename, vid.realx, vid.realy, vid.realwidth, vid.realheight, jpeg))
738 Con_Printf ("Wrote %s\n", filename);
740 Con_Printf ("unable to write %s\n", filename);
743 static int cl_avidemo_frame = 0;
745 void SCR_CaptureAVIDemo(void)
748 sprintf(filename, "dpavi%06d.tga", cl_avidemo_frame);
749 if (SCR_ScreenShot(filename, vid.realx, vid.realy, vid.realwidth, vid.realheight, false))
753 Cvar_SetValueQuick(&cl_avidemo, 0);
754 Con_Printf("avi saving failed on frame %i, out of disk space? stopping avi demo catpure.\n", cl_avidemo_frame);
755 cl_avidemo_frame = 0;
763 Grab six views for environment mapping tests
775 {{ 0, 180, 0}, "bk"},
776 {{ 0, 270, 0}, "lf"},
777 {{-90, 90, 0}, "up"},
781 static void R_Envmap_f (void)
784 char filename[256], basename[256];
788 Con_Printf ("envmap <basename> <size>: save out 6 cubic environment map images, usable with loadsky, note that size must one of 128, 256, 512, or 1024 and can't be bigger than your current resolution\n");
792 strcpy(basename, Cmd_Argv(1));
793 size = atoi(Cmd_Argv(2));
794 if (size != 128 && size != 256 && size != 512 && size != 1024)
796 Con_Printf("envmap: size must be one of 128, 256, 512, or 1024\n");
799 if (size > vid.realwidth || size > vid.realheight)
801 Con_Printf("envmap: your resolution is not big enough to render that size\n");
809 r_refdef.width = size;
810 r_refdef.height = size;
815 for (j = 0;j < 6;j++)
817 sprintf(filename, "env/%s%s.tga", basename, envmapinfo[j].name);
818 VectorCopy(envmapinfo[j].angles, r_refdef.viewangles);
821 SCR_ScreenShot(filename, vid.realx, vid.realy, size, size, false);
827 //=============================================================================
829 // LordHavoc: SHOWLMP stuff
830 #define SHOWLMP_MAXLABELS 256
831 typedef struct showlmp_s
841 showlmp_t showlmp[SHOWLMP_MAXLABELS];
843 void SHOWLMP_decodehide(void)
847 lmplabel = MSG_ReadString();
848 for (i = 0;i < SHOWLMP_MAXLABELS;i++)
849 if (showlmp[i].isactive && strcmp(showlmp[i].label, lmplabel) == 0)
851 showlmp[i].isactive = false;
856 void SHOWLMP_decodeshow(void)
859 qbyte lmplabel[256], picname[256];
861 strcpy(lmplabel,MSG_ReadString());
862 strcpy(picname, MSG_ReadString());
863 if (gamemode == GAME_NEHAHRA) // LordHavoc: nasty old legacy junk
874 for (i = 0;i < SHOWLMP_MAXLABELS;i++)
875 if (showlmp[i].isactive)
877 if (strcmp(showlmp[i].label, lmplabel) == 0)
880 break; // drop out to replace it
883 else if (k < 0) // find first empty one to replace
886 return; // none found to replace
887 // change existing one
888 showlmp[k].isactive = true;
889 strcpy(showlmp[k].label, lmplabel);
890 strcpy(showlmp[k].pic, picname);
895 void SHOWLMP_drawall(void)
898 for (i = 0;i < SHOWLMP_MAXLABELS;i++)
899 if (showlmp[i].isactive)
900 DrawQ_Pic(showlmp[i].x, showlmp[i].y, showlmp[i].pic, 0, 0, 1, 1, 1, 1, 0);
903 void SHOWLMP_clear(void)
906 for (i = 0;i < SHOWLMP_MAXLABELS;i++)
907 showlmp[i].isactive = false;
910 void CL_SetupScreenSize(void)
912 static float old2dresolution = -1;
914 VID_GetWindowSize (&vid.realx, &vid.realy, &vid.realwidth, &vid.realheight);
916 VID_UpdateGamma(false);
918 if (scr_2dresolution.value != old2dresolution)
920 Cvar_SetValue("scr_2dresolution", bound(0.0f, scr_2dresolution.value, 1.0f));
921 old2dresolution = scr_2dresolution.value;
924 if (vid.realwidth > 320)
926 vid.conwidth = (vid.realwidth - 320) * scr_2dresolution.value + 320;
927 vid.conwidth = bound(320, vid.conwidth, vid.realwidth);
932 if (vid.realheight > 240)
934 vid.conheight = (vid.realheight - 240) * scr_2dresolution.value + 240;
935 vid.conheight = bound(240, vid.conheight, vid.realheight);
940 SCR_SetUpToDrawConsole();
942 // determine size of refresh window
946 extern void R_Shadow_EditLights_DrawSelectedLightProperties(void);
947 void CL_UpdateScreen(void)
949 if (!scr_initialized || !con_initialized || vid_hidden)
950 return; // not initialized yet
952 if (cl_avidemo.integer)
953 SCR_CaptureAVIDemo();
955 cl_avidemo_frame = 0;
957 if (cls.signon == SIGNONS)
958 R_TimeReport("other");
960 CL_SetupScreenSize();
967 if (cls.signon == SIGNONS)
968 R_TimeReport("setup");
970 //FIXME: force menu if nothing else to look at?
971 //if (key_dest == key_game && cls.signon != SIGNONS && cls.state == ca_disconnected)
975 scr_drawloading = false;
980 if (cls.signon == SIGNONS)
987 SCR_CheckDrawCenterString();
992 if (cls.signon == SIGNONS)
996 R_TimeReport_Start();
998 R_Shadow_EditLights_DrawSelectedLightProperties();
1005 void CL_Screen_NewMap(void)