/* ================== SCR_DrawScreenField This will be called twice if rendering in stereo mode ================== */ void SCR_DrawScreenField(stereoFrame_t stereoFrame) { re.BeginFrame(stereoFrame); // wide aspect ratio screens need to have the sides cleared // unless they are displaying game renderings if ( cls.state != CA_ACTIVE ) { if ( cls.glconfig.vidWidth * 480 > cls.glconfig.vidHeight * 640 ) { re.SetColor( g_color_table[0] ); re.DrawStretchPic( 0, 0, cls.glconfig.vidWidth, cls.glconfig.vidHeight, 0, 0, 0, 0, cls.whiteShader ); re.SetColor( NULL ); } } if ( uivm && !VM_Call( uivm, UI_IS_FULLSCREEN )) { switch (cls.state) { default: Com_Error(ERR_FATAL, "SCR_DrawScreenField: bad cls.state"); break; case CA_CINEMATIC: SCR_DrawCinematic(); break; case CA_DISCONNECTED: // force menu up S_StopAllSounds(); VM_Call(uivm, UI_SET_ACTIVE_MENU, UIMENU_MAIN); break; case CA_CONNECTING: case CA_CHALLENGING: case CA_CONNECTED: // connecting clients will only show the connection dialog // refresh to update the time VM_Call(uivm, UI_REFRESH, cls.realtime); VM_Call(uivm, UI_DRAW_CONNECT_SCREEN, false); break; // Ridah, if the cgame is valid, fall through to there if (!cls.cgameStarted || !com_sv_running->integer) { // connecting clients will only show the connection dialog VM_Call( uivm, UI_DRAW_CONNECT_SCREEN, false ); break; } case CA_LOADING: case CA_PRIMED: // draw the game information screen and loading progress CL_CGameRendering(stereoFrame); // also draw the connection information, so it doesn't // flash away too briefly on local or lan games //if (!com_sv_running->value || Cvar_VariableIntegerValue("sv_cheats")) // Ridah, don't draw useless text if not in dev mode VM_Call(uivm, UI_REFRESH, cls.realtime); VM_Call(uivm, UI_DRAW_CONNECT_SCREEN, true); break; case CA_ACTIVE: CL_CGameRendering(stereoFrame); SCR_DrawDemoRecording(); #ifdef USE_VOIP SCR_DrawVoipMeter(); SCR_DrawVoipSender(); #endif break; } } // the menu draws next if(cls.keyCatchers & KEYCATCH_UI && uivm) { VM_Call(uivm, UI_REFRESH, cls.realtime); } // console draws next Con_DrawConsole(); // debug graph can be drawn on top of anything if(cl_debuggraph->integer || cl_timegraph->integer || cl_debugMove->integer) { SCR_DrawDebugGraph(); } }
/* ================== SCR_DrawScreenField This will be called twice if rendering in stereo mode ================== */ void SCR_DrawScreenField( stereoFrame_t stereoFrame ) { re.BeginFrame( stereoFrame ); // wide aspect ratio screens need to have the sides cleared // unless they are displaying game renderings if ( cls.state != CA_ACTIVE && cls.state != CA_CINEMATIC ) { if ( cls.glconfig.vidWidth * 480 > cls.glconfig.vidHeight * 640 ) { re.SetColor( g_color_table[0] ); re.DrawStretchPic( 0, 0, cls.glconfig.vidWidth, cls.glconfig.vidHeight, 0, 0, 0, 0, cls.whiteShader ); re.SetColor( NULL ); } } // if the menu is going to cover the entire screen, we // don't need to render anything under it if ( uivm && !VM_Call( uivm, UI_IS_FULLSCREEN )) { switch( cls.state ) { default: Com_Error( ERR_FATAL, "SCR_DrawScreenField: bad cls.state" ); break; case CA_CINEMATIC: SCR_DrawCinematic(); break; case CA_DISCONNECTED: // force menu up S_StopAllSounds(); VM_Call( uivm, UI_SET_ACTIVE_MENU, UIMENU_MAIN ); break; case CA_CONNECTING: case CA_CHALLENGING: case CA_CONNECTED: // connecting clients will only show the connection dialog // refresh to update the time VM_Call( uivm, UI_REFRESH, cls.realtime ); VM_Call( uivm, UI_DRAW_CONNECT_SCREEN, qfalse ); break; case CA_LOADING: case CA_PRIMED: // draw the game information screen and loading progress CL_CGameRendering(stereoFrame); // also draw the connection information, so it doesn't // flash away too briefly on local or lan games // refresh to update the time VM_Call( uivm, UI_REFRESH, cls.realtime ); VM_Call( uivm, UI_DRAW_CONNECT_SCREEN, qtrue ); break; case CA_ACTIVE: // always supply STEREO_CENTER as vieworg offset is now done by the engine. CL_CGameRendering(stereoFrame); #ifdef USE_VOIP SCR_DrawVoipMeter(); SCR_DrawVoipSender(); #endif break; } } // the menu draws next if ( Key_GetCatcher( ) & KEYCATCH_UI && uivm ) { VM_Call( uivm, UI_REFRESH, cls.realtime ); } // console draws next Con_DrawConsole (); // debug graph can be drawn on top of anything if ( cl_debuggraph->integer || cl_timegraph->integer || cl_debugMove->integer ) { SCR_DrawDebugGraph (); } }