您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ CG_DrawInformation函数代码示例

51自学网 2021-06-01 20:00:02
  C++
这篇教程C++ CG_DrawInformation函数代码示例写得很实用,希望能帮到您。

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

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

示例1: trap_CM_LoadMap

void trap_CM_LoadMap(const char *mapname){	DEBUG_REGISTERPROFILE_INIT	CG_DrawInformation(qtrue);	syscall(CG_CM_LOADMAP, mapname);	DEBUG_REGISTERPROFILE_EXEC("trap_CM_LoadMap", mapname)}
开发者ID:Ponce,项目名称:etlegacy,代码行数:7,


示例2: trap_R_RegisterFont

void trap_R_RegisterFont(const char *fontName, int pointSize, fontInfo_t *font) {	DEBUG_REGISTERPROFILE_INIT	CG_DrawInformation( qtrue );	syscall(CG_R_REGISTERFONT, fontName, pointSize, font );	DEBUG_REGISTERPROFILE_EXEC("trap_R_RegisterFont",fontName)	trap_PumpEventLoop();}
开发者ID:BackupTheBerlios,项目名称:et-flf-svn,代码行数:7,


示例3: trap_R_LoadWorldMap

void	trap_R_LoadWorldMap( const char *mapname ) {	DEBUG_REGISTERPROFILE_INIT	CG_DrawInformation( qtrue );	syscall( CG_R_LOADWORLDMAP, mapname );	DEBUG_REGISTERPROFILE_EXEC("trap_R_LoadWorldMap",mapname)	trap_PumpEventLoop();}
开发者ID:BackupTheBerlios,项目名称:et-flf-svn,代码行数:7,


示例4: trap_R_RegisterSkin

qhandle_t trap_R_RegisterSkin( const char *name ) {	qhandle_t handle;	DEBUG_REGISTERPROFILE_INIT	CG_DrawInformation( qtrue );	handle = syscall( CG_R_REGISTERSKIN, name );	DEBUG_REGISTERPROFILE_EXEC("trap_R_RegisterSkin",name)	trap_PumpEventLoop();	return handle;}
开发者ID:BackupTheBerlios,项目名称:et-flf-svn,代码行数:9,


示例5: trap_R_RegisterModel

qhandle_t trap_R_RegisterModel( const char *name ) {	qhandle_t handle;	DEBUG_REGISTERPROFILE_INIT	CG_DrawInformation( qtrue );	handle = syscall( CG_R_REGISTERMODEL, name );	DEBUG_REGISTERPROFILE_EXEC("trap_R_RegisterModel",name)//	trap_PumpEventLoop();	return handle;}
开发者ID:BulldogDrummond,项目名称:etpub,代码行数:9,


示例6: trap_R_RegisterShaderNoMip

qhandle_t trap_R_RegisterShaderNoMip( const char *name ) {	qhandle_t handle;	DEBUG_REGISTERPROFILE_INIT	CG_DrawInformation( qtrue );	handle = syscall( CG_R_REGISTERSHADERNOMIP, name );	trap_PumpEventLoop();	DEBUG_REGISTERPROFILE_EXEC("trap_R_RegisterShaderNpMip", name);	return handle;}
开发者ID:BackupTheBerlios,项目名称:et-flf-svn,代码行数:9,


示例7: trap_R_RegisterFont

void trap_R_RegisterFont(const char *fontName, int pointSize, fontInfo_t *font) {	CG_DrawInformation( qtrue );//	trap_PumpEventLoop();	syscall(CG_R_REGISTERFONT, fontName, pointSize, font );	//mcwf 0xff handle fix (ET bug ?)	if (!font->glyphs[0xff].glyph) {	     font->glyphs[0xff].glyph = trap_R_RegisterShaderNoMip(font->glyphs[0xff].shaderName);	}	//mcwf}
开发者ID:BulldogDrummond,项目名称:etpub,代码行数:10,


示例8: trap_S_RegisterSound

sfxHandle_t	trap_S_RegisterSound( const char *sample, qboolean compressed ) {	sfxHandle_t snd;	DEBUG_REGISTERPROFILE_INIT	CG_DrawInformation( qtrue );	snd = syscall( CG_S_REGISTERSOUND, sample, qfalse /* compressed */ );	if(!*sample) {		Com_Printf("^1Warning: Null Sample filename/n");	}	if(snd == 0) {		Com_Printf("^1Warning: Failed to load sound: %s/n", sample);	}	DEBUG_REGISTERPROFILE_EXEC("trap_S_RegisterSound",sample)	trap_PumpEventLoop();	return snd;}
开发者ID:BackupTheBerlios,项目名称:et-flf-svn,代码行数:15,


示例9: trap_R_RegisterShaderNoMip

qhandle_t trap_R_RegisterShaderNoMip(const char *name){	qhandle_t handle;	DEBUG_REGISTERPROFILE_INIT	CG_DrawInformation(qtrue);	handle = syscall(CG_R_REGISTERSHADERNOMIP, name);	if (!name || !name[0])	{		Com_Printf("^1trap_R_RegisterShaderNoMip: Null or empty name/n");	}	if (handle == 0)	{		Com_Printf("^1trap_R_RegisterShaderNoMip: Failed to load shader no mip: %s/n", name);	}	else	{		CG_DPrintf("^2trap_R_RegisterShaderNoMip: register shader no mip: %s/n", name);	}	DEBUG_REGISTERPROFILE_EXEC("trap_R_RegisterShaderNpMip", name);	return handle;}
开发者ID:Ponce,项目名称:etlegacy,代码行数:21,


示例10: trap_R_RegisterSkin

qhandle_t trap_R_RegisterSkin(const char *name){	qhandle_t handle;	DEBUG_REGISTERPROFILE_INIT	CG_DrawInformation(qtrue);	handle = syscall(CG_R_REGISTERSKIN, name);	if (!name || !name[0])	{		Com_Printf("^1trap_R_RegisterSkin: Null or empty name/n");	}	if (handle == 0)	{		Com_Printf("^1trap_R_RegisterSkin: Failed to load skin: %s/n", name);	}	else	{		CG_DPrintf("^2trap_R_RegisterSkin: register skin: %s/n", name);	}	DEBUG_REGISTERPROFILE_EXEC("trap_R_RegisterSkin", name)	return handle;}
开发者ID:Ponce,项目名称:etlegacy,代码行数:21,


示例11: trap_S_RegisterSound

sfxHandle_t trap_S_RegisterSound(const char *sample, qboolean compressed){	sfxHandle_t snd;	DEBUG_REGISTERPROFILE_INIT	CG_DrawInformation(qtrue);	snd = syscall(CG_S_REGISTERSOUND, sample, compressed);	if (!sample || !sample[0])	{		Com_Printf("^1trap_S_RegisterSound: Null sample filename/n");	}	if (snd == 0)	{		Com_Printf("^1trap_S_RegisterSound: Failed to load sound: %s/n", sample);	}	else	{		CG_DPrintf("^2trap_S_RegisterSound: register sound: %s/n", sample);	}	DEBUG_REGISTERPROFILE_EXEC("trap_S_RegisterSound", sample)	return snd;}
开发者ID:Ponce,项目名称:etlegacy,代码行数:21,


示例12: CG_DrawActiveFrame

/*=================CG_DrawActiveFrameGenerates and draws a game scene and status information at the given time.=================*/void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView, qboolean demoPlayback ) {	int		inwater;	int		mpSetup;			// NERVE - SMF#ifdef DEBUGTIME_ENABLED	int dbgTime=trap_Milliseconds(),elapsed;	int dbgCnt=0;#endif	cg.time = serverTime;	cg.demoPlayback = demoPlayback;	// update cvars	CG_UpdateCvars();#ifdef DEBUGTIME_ENABLED	CG_Printf("/n");#endif	DEBUGTIME	// if we are only updating the screen as a loading	// pacifier, don't even try to read snapshots	if ( cg.infoScreenText[0] != 0 ) {		CG_DrawInformation();		return;	}	// any looped sounds will be respecified as entities	// are added to the render list	trap_S_ClearLoopingSounds(qfalse);	DEBUGTIME	// clear all the render lists	trap_R_ClearScene();	DEBUGTIME	// set up cg.snap and possibly cg.nextSnap	CG_ProcessSnapshots();	DEBUGTIME	// if we haven't received any snapshots yet, all	// we can draw is the information screen	if ( !cg.snap || ( cg.snap->snapFlags & SNAPFLAG_NOT_ACTIVE ) ) {		CG_DrawInformation();		return;	}	// check for server set weapons we might not know about	// (FIXME: this is a hack for the time being since a scripted "selectweapon" does	// not hit the first snap, the server weapon set in cg_playerstate.c line 219 doesn't	// do the trick)	if( !cg.weaponSelect && cg.snap->ps.weapon) {		cg.weaponSelect = cg.snap->ps.weapon;		cg.weaponSelectTime = cg.time;	}//----(SA)	nerve uses this for snooper/sniper	if (cg.weaponSelect == WP_FG42SCOPE) {		float spd;		spd = VectorLength(cg.snap->ps.velocity);		if (spd > 180.0f)			CG_FinishWeaponChange(WP_FG42SCOPE, WP_FG42);	}	DEBUGTIME	if(!cg.lightstylesInited)		CG_SetupDlightstyles();	DEBUGTIME	// if we have been told not to render, don't	if (cg_norender.integer) {		return;	}	// this counter will be bumped for every valid scene we generate	cg.clientFrame++;	// update cg.predictedPlayerState	CG_PredictPlayerState();	DEBUGTIME	// decide on third person view	cg.renderingThirdPerson = cg_thirdPerson.integer || (cg.snap->ps.stats[STAT_HEALTH] <= 0);	// build cg.refdef	inwater = CG_CalcViewValues();//.........这里部分代码省略.........
开发者ID:natelo,项目名称:rtcwPub,代码行数:101,


示例13: CG_DrawActiveFrame

/*=================CG_DrawActiveFrameGenerates and draws a game scene and status information at the given time.=================*/void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView, qboolean demoPlayback ) {	int inwater;	cg.cld = 0;         // NERVE - SMF - reset clientDamage#ifdef DEBUGTIME_ENABLED	int dbgTime = trap_Milliseconds(),elapsed;	int dbgCnt = 0;#endif	cg.time = serverTime;	cg.demoPlayback = demoPlayback;	// update cvars	CG_UpdateCvars();/*	// RF, if we should force a weapon, then do so	if( !cg.weaponSelect ) {		if (cg_loadWeaponSelect.integer > 0) {			cg.weaponSelect = cg_loadWeaponSelect.integer;			cg.weaponSelectTime = cg.time;			trap_Cvar_Set( "cg_loadWeaponSelect", "0" );	// turn it off		}	}*/#ifdef DEBUGTIME_ENABLED	CG_Printf( "/n" );#endif	DEBUGTIME	// if we are only updating the screen as a loading	// pacifier, don't even try to read snapshots	if ( cg.infoScreenText[0] != 0 ) {		CG_DrawInformation();		return;	}	// any looped sounds will be respecified as entities	// are added to the render list	trap_S_ClearLoopingSounds( qfalse );	DEBUGTIME	// clear all the render lists	trap_R_ClearScene();	DEBUGTIME	// set up cg.snap and possibly cg.nextSnap	CG_ProcessSnapshots();	DEBUGTIME	// if we haven't received any snapshots yet, all	// we can draw is the information screen	if ( !cg.snap || ( cg.snap->snapFlags & SNAPFLAG_NOT_ACTIVE ) ) {		CG_DrawInformation();		return;	}	if ( cg.weaponSelect == WP_FG42SCOPE || cg.weaponSelect == WP_SNOOPERSCOPE || cg.weaponSelect == WP_SNIPERRIFLE ) {		float spd;		spd = VectorLength( cg.snap->ps.velocity );		if ( spd > 180.0f ) {			switch ( cg.weaponSelect ) {			case WP_FG42SCOPE:				CG_FinishWeaponChange( cg.weaponSelect, WP_FG42 );				break;			case WP_SNOOPERSCOPE:				CG_FinishWeaponChange( cg.weaponSelect, WP_GARAND );				break;			case WP_SNIPERRIFLE:				CG_FinishWeaponChange( cg.weaponSelect, WP_MAUSER );				break;			}		}	}	DEBUGTIME	if ( !cg.lightstylesInited ) {		CG_SetupDlightstyles();	}	DEBUGTIME	// if we have been told not to render, don't	if ( cg_norender.integer ) {		return;	}	// this counter will be bumped for every valid scene we generate	cg.clientFrame++;//.........这里部分代码省略.........
开发者ID:MAN-AT-ARMS,项目名称:iortcw-archive,代码行数:101,


示例14: CG_DrawActiveFrame

/*=================CG_DrawActiveFrameGenerates and draws a game scene and status information at the given time.=================*/void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView, qboolean demoPlayback ) {	int		inwater;	cg.time = serverTime;	cg.demoPlayback = demoPlayback;	if (cg.snap && ui_myteam.integer != cg.snap->ps.persistant[PERS_TEAM])	{		trap_Cvar_Set ( "ui_myteam", va("%i", cg.snap->ps.persistant[PERS_TEAM]) );	}	// update cvars	CG_UpdateCvars();	// if we are only updating the screen as a loading	// pacifier, don't even try to read snapshots	if ( cg.infoScreenText[0] != 0 ) {		CG_DrawInformation();		return;	}	trap_FX_AdjustTime( cg.time, cg.refdef.vieworg, cg.refdef.viewaxis );	CG_RunLightStyles();	// any looped sounds will be respecified as entities	// are added to the render list	trap_S_ClearLoopingSounds(qfalse);	// clear all the render lists	trap_R_ClearScene();	// set up cg.snap and possibly cg.nextSnap	CG_ProcessSnapshots();	trap_ROFF_UpdateEntities();	// if we haven't received any snapshots yet, all	// we can draw is the information screen	if ( !cg.snap || ( cg.snap->snapFlags & SNAPFLAG_NOT_ACTIVE ) ) {		CG_DrawInformation();		return;	}	// let the client system know what our weapon and zoom settings are	if (cg.snap && cg.snap->ps.saberLockTime > cg.time)	{		trap_SetUserCmdValue( cg.weaponSelect, 0.01, cg.forceSelect, cg.itemSelect );	}	else if (cg.snap && cg.snap->ps.usingATST)	{		trap_SetUserCmdValue( cg.weaponSelect, 0.2, cg.forceSelect, cg.itemSelect );	}	else	{		trap_SetUserCmdValue( cg.weaponSelect, cg.zoomSensitivity, cg.forceSelect, cg.itemSelect );	}	// this counter will be bumped for every valid scene we generate	cg.clientFrame++;	// update cg.predictedPlayerState	CG_PredictPlayerState();	// decide on third person view	cg.renderingThirdPerson = cg_thirdPerson.integer || (cg.snap->ps.stats[STAT_HEALTH] <= 0);	if (cg.snap->ps.stats[STAT_HEALTH] > 0 && (cg.predictedPlayerState.weapon == WP_SABER || cg.predictedPlayerState.usingATST ||		cg.predictedPlayerState.forceHandExtend == HANDEXTEND_KNOCKDOWN || cg.predictedPlayerState.fallingToDeath))	{		cg.renderingThirdPerson = 1;	}	else if (cg.snap->ps.zoomMode)	{ //always force first person when zoomed		cg.renderingThirdPerson = 0;	}	// build cg.refdef	inwater = CG_CalcViewValues();	CG_CalcScreenEffects();	// first person blend blobs, done after AnglesToAxis	if ( !cg.renderingThirdPerson ) {		CG_DamageBlendBlob();	}	// build the render lists	if ( !cg.hyperspace ) {		CG_AddPacketEntities();			// adter calcViewValues, so predicted player state is correct		CG_AddMarks();		CG_AddParticles ();		CG_AddLocalEntities();//.........这里部分代码省略.........
开发者ID:blaenk,项目名称:jedioutcast,代码行数:101,


示例15: CG_DemosDrawActiveFrame

void CG_DemosDrawActiveFrame( int serverTime, stereoFrame_t stereoView ) {	int deltaTime;	qboolean hadSkip;	qboolean captureFrame;	float captureFPS;	float frameSpeed;	int blurTotal, blurIndex;	float blurFraction;	float stereoSep = CG_Cvar_Get( "r_stereoSeparation" );	int inwater, entityNum;	if (!demo.initDone) {		if ( !cg.snap ) {			demoProcessSnapShots( qtrue );		}		if ( !cg.snap ) {			CG_Error( "No Initial demo snapshot found" );		}		demoPlaybackInit();	}	cg.demoPlayback = 2;		// update cvars	CG_UpdateCvars();	// if we are only updating the screen as a loading	// pacifier, don't even try to read snapshots	if ( cg.loading ) {		CG_DrawInformation();		return;	}	captureFrame = demo.capture.active && !demo.play.paused;	if ( captureFrame ) {		trap_MME_BlurInfo( &blurTotal, &blurIndex );		captureFPS = mov_captureFPS.value;		if ( blurTotal > 0) {			captureFPS *= blurTotal;			blurFraction = blurIndex / (float)blurTotal;		} else {			blurFraction = 0;		}	} else {	}	/* Forward the demo */	deltaTime = serverTime - demo.serverTime;	if (deltaTime > 50)		deltaTime = 50;	demo.serverTime = serverTime;	demo.serverDeltaTime = 0.001 * deltaTime;	cg.oldTime = cg.time;	cg.oldTimeFraction = cg.timeFraction;	if (demo.play.time < 0) {		demo.play.time = demo.play.fraction = 0;	}	demo.play.oldTime = demo.play.time;	/* Handle the music */	if ( demo.play.paused ) {		if ( lastMusicStart >= 0)			demoSynchMusic( -1, 0 ); 	} else {		int musicStart = (demo.play.time - mov_musicStart.value * 1000 );		if ( musicStart <= 0 ) {			if (lastMusicStart >= 0 )				demoSynchMusic( -1, 0 );		} else {			if ( demo.play.time != demo.play.lastTime || lastMusicStart < 0)				demoSynchMusic( musicStart, 0 );		}	}	/* forward the time a bit till the moment of capture */	if ( captureFrame && demo.capture.locked && demo.play.time < demo.capture.start ) {		int left = demo.capture.start - demo.play.time;		if ( left > 2000) {			left -= 1000;			captureFrame = qfalse;		} else if (left > 5) {			captureFrame = qfalse;			left = 5;		}		demo.play.time += left;	} else if ( captureFrame && demo.loop.total && blurTotal ) {		float loopFraction = demo.loop.index / (float)demo.loop.total;		demo.play.time = demo.loop.start;		demo.play.fraction = demo.loop.range * loopFraction;		demo.play.time += (int)demo.play.fraction;		demo.play.fraction -= (int)demo.play.fraction;	} else if (captureFrame) {		float frameDelay = 1000.0f / captureFPS;		demo.play.fraction += frameDelay * demo.play.speed;		demo.play.time += (int)demo.play.fraction;		demo.play.fraction -= (int)demo.play.fraction;	} else if ( demo.find ) {//.........这里部分代码省略.........
开发者ID:entdark,项目名称:q3mme,代码行数:101,


示例16: CG_DrawActiveFrame

/*=================CG_DrawActiveFrameGenerates and draws a game scene and status information at the given time.=================*/void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView, qbool demoPlayback ) {    int		inwater;    cg.time = serverTime;//unlagged - lag simulation #1    // adjust the clock to reflect latent snaps    cg.time -= cg_latentSnaps.integer * (1000 / sv_fps.integer);//unlagged - lag simulation #1    cg.demoPlayback = demoPlayback;    // update cvars    CG_UpdateCvars();    // if we are only updating the screen as a loading    // pacifier, don't even try to read snapshots    if ( cg.infoScreenText[0] != 0 ) {        CG_DrawInformation();        return;    }    // any looped sounds will be respecified as entities    // are added to the render list    trap_S_ClearLoopingSounds(qfalse);    // clear all the render lists    trap_R_ClearScene();    // set up cg.snap and possibly cg.nextSnap    CG_ProcessSnapshots();    // if we haven't received any snapshots yet, all    // we can draw is the information screen    if ( !cg.snap || ( cg.snap->snapFlags & SNAPFLAG_NOT_ACTIVE ) ) {        CG_DrawInformation();        return;    }    // let the client system know what our weapon and zoom settings are    trap_SetUserCmdValue( cg.weaponSelect, cg.zoomSensitivity );    // WP_SEC_PISTOL 's special value has been transmitted.    // Restore cg.weaponSelect    if (cg.weaponSelect == WP_SEC_PISTOL)        cg.weaponSelect = cg._weaponSelect;    // this counter will be bumped for every valid scene we generate    cg.clientFrame++;    // check if duel start sound has to be played    if(cg.roundstarttime && cg.roundstarttime <= cg.time && cgs.gametype == GT_DUEL) {        cg.introstart = cg.roundstarttime;        cg.introend = cg.introstart + DU_INTRO_CAM + DU_INTRO_DRAW;        cg.roundstarttime = 0;        // cycle through the start tracks        trap_S_StartLocalSound( cgs.media.duelstart[cg.duelstartsound], CHAN_ANNOUNCER );        cg.duelstartsound++;        if(cg.duelstartsound == 5)            cg.duelstartsound = 0;    }    // update cg.predictedPlayerState    CG_PredictPlayerState();    // decide on third person view    cg.renderingThirdPerson = cg_thirdPerson.integer || cg.introstart || (cgs.deathcam && (cg.snap->ps.stats[STAT_HEALTH] <= 0)                              && !(cg.snap->ps.pm_flags & PMF_SUICIDE) && !(cg.snap->ps.pm_flags & PMF_FOLLOW)                              && (cg.snap->ps.pm_type != PM_CHASECAM) && (cgs.gametype != GT_DUEL));    // build cg.refdef    inwater = CG_CalcViewValues();    // build cg_frustum, from cg.refdef    CG_SetupFrustum();    // first person blend blobs, done after AnglesToAxis    if ( !cg.renderingThirdPerson ) {        CG_DamageBlendBlob();    }    // build the render lists    if ( !cg.hyperspace ) {        CG_AddPacketEntities();			// adter calcViewValues, so predicted player state is correct        CG_AddMarks();        CG_AddLocalEntities();    }    CG_AddViewWeapon( &cg.predictedPlayerState );    // add buffered sounds    CG_PlayBufferedSounds();//.........这里部分代码省略.........
开发者ID:LuckyBro,项目名称:sgfork,代码行数:101,


示例17: trap_S_RegisterSound

sfxHandle_t trap_S_RegisterSound( const char *sample ) {	CG_DrawInformation();	return syscall( CG_S_REGISTERSOUND, sample );}
开发者ID:LBoksha,项目名称:RTCW-SP-linux,代码行数:4,


示例18: trap_R_RegisterModel

qhandle_t trap_R_RegisterModel( const char *name ) {	CG_DrawInformation();	return syscall( CG_R_REGISTERMODEL, name );}
开发者ID:LBoksha,项目名称:RTCW-SP-linux,代码行数:4,


示例19: trap_R_RegisterShader

qhandle_t trap_R_RegisterShader( const char *name ) {	CG_DrawInformation();	return syscall( CG_R_REGISTERSHADER, name );}
开发者ID:LBoksha,项目名称:RTCW-SP-linux,代码行数:4,


示例20: CG_DrawActiveFrame

/*=================CG_DrawActiveFrameGenerates and draws a game scene and status information at the given time.=================*/void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView, qboolean demoPlayback ) {	int		inwater;	cg.time = serverTime;	cg.demoPlayback = demoPlayback;	// update cvars	CG_UpdateCvars();	// if we are only updating the screen as a loading	// pacifier, don't even try to read snapshots	if ( cg.infoScreenText[0] != 0 ) {		CG_DrawInformation();		return;	}	// any looped sounds will be respecified as entities	// are added to the render list	trap_S_ClearLoopingSounds(qfalse);	// clear all the render lists	trap_R_ClearScene();	// set up cg.snap and possibly cg.nextSnap	CG_ProcessSnapshots();	// if we haven't received any snapshots yet, all	// we can draw is the information screen	if ( !cg.snap || ( cg.snap->snapFlags & SNAPFLAG_NOT_ACTIVE ) ) {		CG_DrawInformation();		return;	}	// let the client system know what our weapon and zoom settings are	trap_SetUserCmdValue( cg.weaponSelect, cg.zoomSensitivity );	// this counter will be bumped for every valid scene we generate	cg.clientFrame++;	// update cg.predictedPlayerState	CG_PredictPlayerState();	// decide on third person view	cg.renderingThirdPerson = cg_thirdPerson.integer || (cg.snap->ps.stats[STAT_HEALTH] <= 0);	// build cg.refdef	inwater = CG_CalcViewValues();	// first person blend blobs, done after AnglesToAxis	if ( !cg.renderingThirdPerson ) {		CG_DamageBlendBlob();	}	// build the render lists	if ( !cg.hyperspace ) {		CG_AddPacketEntities();			// adter calcViewValues, so predicted player state is correct		CG_AddMarks();		CG_AddParticles ();		CG_AddLocalEntities();	}	CG_AddViewWeapon( &cg.predictedPlayerState );	// add buffered sounds	CG_PlayBufferedSounds();	// play buffered voice chats	CG_PlayBufferedVoiceChats();	// finish up the rest of the refdef	if ( cg.testModelEntity.hModel ) {		CG_AddTestModel();	}	cg.refdef.time = cg.time;	memcpy( cg.refdef.areamask, cg.snap->areamask, sizeof( cg.refdef.areamask ) );	// warning sounds when powerup is wearing off	CG_PowerupTimerSounds();	// update audio positions	trap_S_Respatialize( cg.snap->ps.clientNum, cg.refdef.vieworg, cg.refdef.viewaxis, inwater );	// make sure the lagometerSample and frame timing isn't done twice when in stereo	if ( stereoView != STEREO_RIGHT ) {		cg.frametime = cg.time - cg.oldTime;		if ( cg.frametime < 0 ) {			cg.frametime = 0;		}		cg.oldTime = cg.time;		CG_AddLagometerFrameInfo();	}	if (cg_timescale.value != cg_timescaleFadeEnd.value) {		if (cg_timescale.value < cg_timescaleFadeEnd.value) {			cg_timescale.value += cg_timescaleFadeSpeed.value * ((float)cg.frametime) / 1000;//.........这里部分代码省略.........
开发者ID:Cpasjuste,项目名称:quake3_pandora_gles,代码行数:101,


示例21: CG_DrawActiveFrame

void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView ) {	qboolean	inwater = qfalse;	cg.time = serverTime;	CG_BuildSolidList();	// update cvars	CG_UpdateCvars();	// if we are only updating the screen as a loading	// pacifier, don't even try to read snapshots	if ( cg.infoScreenText[0] != 0 ) {		CG_DrawInformation();		return;	}	// any looped sounds will be respecified as entities	// are added to the render list	cgi_S_ClearLoopingSounds();	// clear all the render lists	cgi_R_ClearScene();	// set up cg.snap and possibly cg.nextSnap	CG_ProcessSnapshots();	// if we haven't received any snapshots yet, all	// we can draw is the information screen	if ( !cg.snap ) {		CG_DrawInformation();		return;	}	// let the client system know what our weapon and zoom settings are	cgi_SetUserCmdValue( cg.weaponSelect, cg.refdef.fov_y / 75.0 );	// this counter will be bumped for every valid scene we generate	cg.clientFrame++;	// update cg.predicted_player_state	CG_PredictPlayerState();	// decide on third person view	cg.renderingThirdPerson = cg_thirdPerson.integer || (cg.snap->ps.stats[STAT_HEALTH] <= 0);	if ( in_camera )	{		// The camera takes over the view		CGCam_RenderScene();			}	else	{				//Finish any fading that was happening		CGCam_UpdateFade();		// build cg.refdef		inwater = CG_CalcViewValues();	}	//This is done from the vieworg to get origin for non-attenuated sounds	cgi_S_UpdateAmbientSet( CG_ConfigString( CS_AMBIENT_SET ), cg.refdef.vieworg );	// first person blend blobs, done after AnglesToAxis	if ( !cg.renderingThirdPerson ) {		CG_DamageBlendBlob();	}	// build the render lists	if ( !cg.hyperspace ) {		CG_AddPacketEntities();			// adter calcViewValues, so predicted player state is correct		CG_AddMarks();		CG_AddLocalEntities();	}	// Don't draw the in-view weapon when in camera mode	if ( !in_camera && !cg_pano.integer )		CG_AddViewWeapon( &cg.predicted_player_state );	// finish up the rest of the refdef	if ( cg.testModelEntity.hModel ) {		CG_AddTestModel();	}		cg.refdef.time = cg.time;	memcpy( cg.refdef.areamask, cg.snap->areamask, sizeof( cg.refdef.areamask ) );	// update audio positions	cgi_S_Respatialize( cg.snap->ps.clientNum, cg.refdef.vieworg, cg.refdef.viewaxis, inwater );	// warning sounds when powerup is wearing off	CG_PowerupTimerSounds();	// make sure the lagometerSample and frame timing isn't done twice when in stereo	if ( stereoView != STEREO_RIGHT ) {		cg.frametime = cg.time - cg.oldTime;		cg.oldTime = cg.time;	}	//Add all effects	if (cg.frametime >= 0) {		FX_Add();//.........这里部分代码省略.........
开发者ID:UberGames,项目名称:SP-Mod-Source-Code,代码行数:101,



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


C++ CG_DrawPic函数代码示例
C++ CG_CrosshairPlayer函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。