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


C++ CG_DrawInformation函数代码示例

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


在下文中一共展示了CG_DrawInformation函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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,代码来源:cg_syscalls.c

示例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,代码来源:cg_syscalls.c

示例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,代码来源:cg_syscalls.c

示例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,代码来源:cg_syscalls.c

示例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,代码来源:cg_syscalls.c

示例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,代码来源:cg_syscalls.c

示例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,代码来源:cg_syscalls.c

示例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,代码来源:cg_syscalls.c

示例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,代码来源:cg_syscalls.c

示例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,代码来源:cg_syscalls.c

示例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,代码来源:cg_syscalls.c

示例12: CG_DrawActiveFrame

/*
=================
CG_DrawActiveFrame

Generates 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,代码来源:cg_view.c

示例13: CG_DrawActiveFrame

/*
=================
CG_DrawActiveFrame

Generates 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,代码来源:cg_view.c

示例14: CG_DrawActiveFrame

/*
=================
CG_DrawActiveFrame

Generates 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,代码来源:cg_view.c

示例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,代码来源:cg_demos.c


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