当前位置: 首页>>代码示例>>C++>>正文


C++ Con_DrawConsole函数代码示例

本文整理汇总了C++中Con_DrawConsole函数的典型用法代码示例。如果您正苦于以下问题:C++ Con_DrawConsole函数的具体用法?C++ Con_DrawConsole怎么用?C++ Con_DrawConsole使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了Con_DrawConsole函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SCR_DrawConsole

/*
==================
SCR_DrawConsole
modified by carbon14 to draw black behind a 
fully down console in support of transparency
==================
*/
void SCR_DrawConsole (void)
{
	Con_CheckResize ();

	if (cls.state == ca_disconnected || cls.state == ca_connecting)
	{	// forced full screen console
		re.DrawFill (0, 0, viddef.width, viddef.height, 0);   // c14 add this line
		MenuRefdefActive = 0;	// NeVo
		Con_DrawConsole (1.0);
		return;
	}

	if (cls.state != ca_active || !cl.refresh_prepped)
	{	// connected, but can't render
		re.DrawFill (0, 0, viddef.width, viddef.height, 0);   // c14 change this line and it needs moving to before Con_DrawConsole
		MenuRefdefActive = 0;	// NeVo
		Con_DrawConsole (0.5);
		return;
	}

	if (scr_con_current)
	{
		MenuRefdefActive = 0;	// NeVo
		Con_DrawConsole (scr_con_current);
	}
	else
	{
		MenuRefdefActive = 0;	// NeVo
		if (cls.key_dest == key_game || cls.key_dest == key_message)
			Con_DrawNotify ();	// only draw notify in game
	}
}
开发者ID:Jaegermeiste,项目名称:quake2_322,代码行数:39,代码来源:cl_scrn.c

示例2: SCR_DrawConsole

/*
==================
SCR_DrawConsole
==================
*/
void SCR_DrawConsole (void)
{
	Con_CheckResize ();
	
	if (cls.state == ca_disconnected || cls.state == ca_connecting)
	{	// forced full screen console
		Con_DrawConsole (1.0);
		return;
	}

	if (cls.state != ca_active || !cl.refresh_prepped)
	{	// connected, but can't render
		Con_DrawConsole (0.5);
		Draw_Fill (0, viddef.height/2, viddef.width, viddef.height/2, 0, 1.0);
		return;
	}

	if (scr_con_current)
	{
		Con_DrawConsole (scr_con_current);
	}
// mattx86: we want the console notify lines always visible, even with the console down.
	//else
	//{
		//if (cls.key_dest == key_game || cls.key_dest == key_message)
			Con_DrawNotify ();	// only draw notify in game
	//}
}
开发者ID:mattx86,项目名称:myq2,代码行数:33,代码来源:cl_scrn.c

示例3: SCR_DrawConsole

/*
==================
SCR_DrawConsole
==================
*/
void SCR_DrawConsole (void)
{
	Con_CheckResize ();
	
	if (cls.state == ca_disconnected || cls.state == ca_connecting)
	{	// forced full screen console
		Con_DrawConsole (1.0);
		return;
	}

	if (cls.state != ca_active || !cl.refresh_prepped)
	{	// connected, but can't render
		Con_DrawConsole (0.5);
		re.DrawFill (0, viddef.height/2, viddef.width, viddef.height/2, 0);
		return;
	}

	if (scr_con_current)
	{
		Con_DrawConsole (scr_con_current);
	}
	else
	{
		if (cls.key_dest == key_game || cls.key_dest == key_message)
			Con_DrawNotify ();	// only draw notify in game
	}
}
开发者ID:davepkennedy,项目名称:quake2_FoD,代码行数:32,代码来源:cl_scrn.c

示例4: SCR_DrawConsole

void
SCR_DrawConsole(void)
{
	Con_CheckResize();

	if ((cls.state == ca_disconnected) || (cls.state == ca_connecting))
	{
		/* forced full screen console */
		Con_DrawConsole(1.0);
		return;
	}

	if ((cls.state != ca_active) || !cl.refresh_prepped)
	{
		/* connected, but can't render */
		Con_DrawConsole(0.5);
		Draw_Fill(0, viddef.height / 2, viddef.width, viddef.height / 2, 0);
		return;
	}

	if (scr_con_current)
	{
		Con_DrawConsole(scr_con_current);
	}
	else
	{
		if ((cls.key_dest == key_game) || (cls.key_dest == key_message))
		{
			Con_DrawNotify(); /* only draw notify in game */
		}
	}
}
开发者ID:siraj,项目名称:yquake2,代码行数:32,代码来源:cl_screen.c

示例5: main

int
main (int argc, const char *argv[])
{
	int         frame = 0;

	COM_InitArgv (argc, argv);

	qtv_init ();

	Sys_Printf ("Ohayou gozaimasu\n");

	while (1) {
		Cbuf_Execute_Stack (qtv_cbuf);

		Sys_CheckInput (1, net_socket);
		realtime = Sys_DoubleTime () + 1;

		qtv_read_packets ();

		Con_ProcessInput ();

		Server_Frame ();
		Client_Frame ();

		if (++frame == 100) {
			frame = 0;
			Con_DrawConsole ();
		}
	}
	return 0;
}
开发者ID:EIREXE,项目名称:Quakeforge-gcw0,代码行数:31,代码来源:qtv.c

示例6: V_PostRender

/*
==================
V_PostRender

==================
*/
void V_PostRender( void )
{
	R_Set2DMode( true );

	if( cls.state == ca_active )
	{
		CL_DrawHUD( CL_ACTIVE );
#ifndef NO_VGUI
		VGui_Paint();
#endif
	}

	if( cls.scrshot_action == scrshot_inactive || cls.scrshot_action == scrshot_normal )
	{
		SCR_RSpeeds();
		SCR_NetSpeeds();
		SCR_DrawFPS();
		CL_DrawDemoRecording();
		R_ShowTextures();
		CL_DrawHUD( CL_CHANGELEVEL );
		Con_DrawConsole();
		UI_UpdateMenu( host.realtime );
		Con_DrawDebug(); // must be last
		S_ExtraUpdate();
	}

	SCR_MakeScreenShot();
	R_EndFrame();
}
开发者ID:bmk10,项目名称:sing-engine,代码行数:35,代码来源:cl_view.c

示例7: SCR_DrawConsole

/**
 * @sa SCR_UpdateScreen
 * @sa Con_DrawConsole
 * @sa Con_DrawNotify
 */
static void SCR_DrawConsole (void)
{
	Con_CheckResize();

	if (!viddef.viewWidth || !viddef.viewHeight) {
		/* active full screen menu */
		/* draw the console like in game */
		if (scr_con_current > 0.0)
			Con_DrawConsole(scr_con_current);
		return;
	}

	if (scr_con_current > 0.0) {
		Con_DrawConsole(scr_con_current);
	}
}
开发者ID:ptitSeb,项目名称:UFO--AI-OpenPandora,代码行数:21,代码来源:cl_screen.c

示例8: SCR_DrawScreenField

/*
==================
SCR_DrawScreenField

This will be called twice if rendering in stereo mode
==================
*/
void SCR_DrawScreenField( stereoFrame_t stereoFrame ) {

	re.BeginFrame( stereoFrame );

	qboolean uiFullscreen = _UI_IsFullscreen();

	// if the menu is going to cover the entire screen, we
	// don't need to render anything under it
	if ( !uiFullscreen ) {
		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
			UI_SetActiveMenu( "mainMenu", NULL );
			break;
		case CA_CONNECTING:
		case CA_CHALLENGING:
		case CA_CONNECTED:
			// connecting clients will only show the connection dialog
			UI_DrawConnect( clc.servername, cls.updateInfoString );
			break;
		case CA_LOADING:
		case CA_PRIMED:
			// draw the game information screen and loading progress
			CL_CGameRendering( stereoFrame );
			break;
		case CA_ACTIVE:
			if (CL_IsRunningInGameCinematic() || CL_InGameCinematicOnStandBy())
			{
				SCR_DrawCinematic();
			}
			else
			{
				CL_CGameRendering( stereoFrame );
			}
			break;
		}
	}

	re.ProcessDissolve();

	// draw downloading progress bar

	// the menu draws next
	_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 ) {
		SCR_DrawDebugGraph ();
	}
}
开发者ID:DustysPatch,项目名称:OpenJK,代码行数:66,代码来源:cl_scrn.cpp

示例9: SCR_DrawConsole

void SCR_DrawConsole(void) {
	if (scr_con_current) {
		scr_copyeverything = 1;
		Con_DrawConsole(scr_con_current, true);
		clearconsole = 0;
	} else {
		if (key_dest == key_game || key_dest == key_message)
			Con_DrawNotify(); // only draw notify in game
	}
}
开发者ID:DrLabman,项目名称:QMB,代码行数:10,代码来源:gl_screen.cpp

示例10: Client_Screen_DrawConsole

/**
 * \brief Draw the console on the screen.
 */
PUBLIC void Client_Screen_DrawConsole( void )
{
    if( r_world != NULL )
    {
        R_DrawWorld();
    }

	Con_CheckResize();
	
	if( ClientStatic.state == ca_disconnected || ClientStatic.state == ca_connecting )
	{	// forced full screen console
		Con_DrawConsole( 1.0 );
		return;
	}

	if( ClientStatic.state != ca_active )// || !ClientState.refresh_prepped )
	{	// connected, but can't render
		Con_DrawConsole( 0.5 );
		R_Draw_Fill( 0, viddef.height >> 1, viddef.width, viddef.height >> 1, colourBlack );
		return;
	}
开发者ID:MichaelLiebscher,项目名称:Wolfenstein3D_Redux,代码行数:24,代码来源:client_screen.c

示例11: V_PostRender

/*
==================
V_PostRender

==================
*/
void V_PostRender( void )
{
	qboolean	draw_2d = false;

	R_Set2DMode( true );

	if( cls.state == ca_active )
	{
		SCR_TileClear();
		CL_DrawHUD( CL_ACTIVE );
#ifdef XASH_VGUI
		VGui_Paint();
#endif
	}

	switch( cls.scrshot_action )
	{
	case scrshot_inactive:
	case scrshot_normal:
	case scrshot_snapshot:
		draw_2d = true;
		break;
	}

	if( draw_2d )
	{
		SCR_RSpeeds();
		SCR_NetSpeeds();
		SCR_DrawFPS();
		SV_DrawOrthoTriangles();
		CL_DrawDemoRecording();
		R_ShowTextures();
		CL_DrawHUD( CL_CHANGELEVEL );
		Con_DrawConsole();
		UI_UpdateMenu( host.realtime );
		Con_DrawVersion();
		Con_DrawDebug(); // must be last
		S_ExtraUpdate();
	}

	SCR_MakeScreenShot();
	R_EndFrame();
}
开发者ID:mittorn,项目名称:xash3d,代码行数:49,代码来源:cl_view.c

示例12: CG_RunConsole

/*
==================
CG_RunConsole

Scroll it up or down and draw it
==================
*/
void CG_RunConsole( connstate_t state ) {
	// decide on the destination height of the console
	if ( trap_Key_GetCatcher( ) & KEYCATCH_CONSOLE )
		con.finalFrac = 0.5;		// half screen
	else
		con.finalFrac = 0;				// none visible
	
	// scroll towards the destination height
	if (con.finalFrac < con.displayFrac)
	{
		con.displayFrac -= con_conspeed.value*cg.realFrameTime*0.001;
		if (con.finalFrac > con.displayFrac)
			con.displayFrac = con.finalFrac;

	}
	else if (con.finalFrac > con.displayFrac)
	{
		con.displayFrac += con_conspeed.value*cg.realFrameTime*0.001;
		if (con.finalFrac < con.displayFrac)
			con.displayFrac = con.finalFrac;
	}

	Con_DrawConsole( state );
}
开发者ID:mecwerks,项目名称:spearmint-ios,代码行数:31,代码来源:cg_console.c

示例13: SCR_DrawScreenField

void SCR_DrawScreenField( stereoFrame_t stereoFrame ) {
	re.BeginFrame( stereoFrame );

#ifdef _XBOX
//	if(ClientManager::splitScreenMode == qtrue) 
//		cls.state = ClientManager::ActiveClient().state;
#endif

	// wide aspect ratio screens need to have the sides cleared
	// unless they are displaying game renderings
#ifndef _XBOX
	// Xbox no likey
	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 );
		}
	}
#endif

	if ( !uivm ) {
		Com_DPrintf("draw screen without UI loaded\n");
		return;
	}

	// if the menu is going to cover the entire screen, we
	// don't need to render anything under it
	//actually, yes you do, unless you want clients to cycle out their reliable
	//commands from sitting in the menu. -rww
	if ( !VM_Call( uivm, UI_IS_FULLSCREEN ) || (!(cls.framecount&7) && cls.state == CA_ACTIVE)) {

		switch( cls.state ) {
		default:
#ifdef _XBOX
			if(ClientManager::splitScreenMode == qfalse)
#endif
			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:
			// 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 );

			// draw the game information screen and loading progress
			CL_CGameRendering( stereoFrame );
			break;
		case CA_ACTIVE:
			CL_CGameRendering( stereoFrame );
//			SCR_DrawDemoRecording();
			break;
		}
	}

	// the menu draws next
	if ( cls.keyCatchers & KEYCATCH_UI && uivm ) {
		VM_Call( uivm, UI_REFRESH, cls.realtime );
	}

	// console draws next
	Con_DrawConsole ();

#ifndef FINAL_BUILD
	// Debugging output for voice system
	if( cl_debugVoice->integer )
		g_Voice.DrawVoiceStats();
#endif

#ifdef _DEBUG
	// debug graph can be drawn on top of anything
	if ( cl_debuggraph->integer || cl_timegraph->integer || cl_debugMove->integer ) {
		SCR_DrawDebugGraph ();
	}
#endif
}
开发者ID:3ddy,项目名称:Jedi-Academy,代码行数:94,代码来源:cl_scrn.cpp

示例14: SCR_DrawScreenField

/*
==================
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 ) {
		Com_DPrintf("draw screen without UI loaded\n");
		return;
	}

	// if the menu is going to cover the entire screen, we
	// don't need to render anything under it
	if ( !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:
			CL_CGameRendering( stereoFrame );
			SCR_DrawDemoRecording();
			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 ();
	}
}
开发者ID:5Quintessential,项目名称:jedioutcast,代码行数:79,代码来源:cl_scrn.cpp

示例15: SCR_DrawScreenField

/*
==================
SCR_DrawScreenField

This will be called twice if rendering in stereo mode
==================
*/
void SCR_DrawScreenField( stereoFrame_t stereoFrame ) {
	re->BeginFrame( stereoFrame );

	qboolean uiFullscreen = (qboolean)(cls.uiStarted && UIVM_IsFullscreen());

	if ( !cls.uiStarted ) {
		Com_DPrintf("draw screen without UI loaded\n");
		return;
	}

	// if the menu is going to cover the entire screen, we
	// don't need to render anything under it
	//actually, yes you do, unless you want clients to cycle out their reliable
	//commands from sitting in the menu. -rww
	if ( (cls.uiStarted && !uiFullscreen) || (!(cls.framecount&7) && cls.state == CA_ACTIVE) ) {
		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();
			UIVM_SetActiveMenu( 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
			UIVM_Refresh( cls.realtime );
			UIVM_DrawConnectScreen( 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
			UIVM_Refresh( cls.realtime );
			UIVM_DrawConnectScreen( qtrue );
			break;
		case CA_ACTIVE:
			CL_CGameRendering( stereoFrame );
			SCR_DrawDemoRecording();
			break;
		}
	}

	// the menu draws next
	if ( Key_GetCatcher( ) & KEYCATCH_UI && cls.uiStarted ) {
		UIVM_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 ();
	}
}
开发者ID:DarthFutuza,项目名称:JediKnightGalaxies,代码行数:73,代码来源:cl_scrn.cpp


注:本文中的Con_DrawConsole函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。