这篇教程C++ IsPC函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中IsPC函数的典型用法代码示例。如果您正苦于以下问题:C++ IsPC函数的具体用法?C++ IsPC怎么用?C++ IsPC使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了IsPC函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: ControllerMove/*===========ControllerMove===========*/void CInput::ControllerMove( float frametime, CUserCmd *cmd ){ if ( IsPC() ) { if (!m_fCameraInterceptingMouse && m_fMouseActive) { MouseMove( cmd); } } JoyStickMove( frametime, cmd);}
开发者ID:iosoccer,项目名称:iosoccer-game,代码行数:17,
示例2: ReloadFilesInListvoid CTextureManager::ReloadFilesInList( IFileList *pFilesToReload ){ if ( !IsPC() ) return; for ( int i=m_TextureList.First(); i != m_TextureList.InvalidIndex(); i=m_TextureList.Next( i ) ) { ITextureInternal *pTex = m_TextureList[i]; pTex->ReloadFilesInList( pFilesToReload ); }}
开发者ID:DeadZoneLuna,项目名称:SourceEngine2007,代码行数:12,
示例3: DevWarning//-----------------------------------------------------------------------------// Purpose://-----------------------------------------------------------------------------void CMaterialSubRect::ParseMaterialVars( KeyValues &keyValues ){ KeyValues *pKeyValues = &keyValues; // I'm not quite sure how this can happen, but we'll see... const char *pShaderName = pKeyValues->GetName(); if ( !pShaderName ) { DevWarning( 1, "CMaterialSubRect::InitializeShader: Shader not specified in material %s./n", GetName() ); Assert( 0 ); pShaderName = IsPC() ? "Wireframe_DX6" : "Wireframe_DX9"; } // Verify we have the correct "shader." There is only one type. if ( !Q_strcmp( pShaderName, "Subrect" ) ) { KeyValues *pVar = pKeyValues->GetFirstSubKey(); while ( pVar ) { if ( !Q_strcmp( pVar->GetName(), "$Pos" ) ) { sscanf( pVar->GetString(), "%f %f", &m_vecOffset.x, &m_vecOffset.y ); } if ( !Q_strcmp( pVar->GetName(), "$Size" ) ) { sscanf( pVar->GetString(), "%f %f", &m_vecSize.x, &m_vecSize.y ); } if ( !Q_strcmp( pVar->GetName(), "$Material" ) ) { m_pMaterialPage = static_cast<IMaterialInternal*>( MaterialSystem()->FindMaterial( pVar->GetString(), TEXTURE_GROUP_DECAL ) ); m_pMaterialPage = m_pMaterialPage->GetRealTimeVersion(); //always work with the realtime material internally }// if ( !Q_strcmp( pVar->GetName(), "$decalscale" ) )// {// m_flDecalScale = pVar->GetFloat();// } // Add var to list. IMaterialVar *pNewVar = CreateMaterialVarFromKeyValue( this, pVar ); if ( pNewVar ) { m_aMaterialVars.AddToTail( pNewVar ); } // Continue getting the keys until they are all found. pVar = pVar->GetNextKey(); } }}
开发者ID:DeadZoneLuna,项目名称:SourceEngine2007,代码行数:55,
示例4: Init void Init() { SetFlags( ACH_LISTEN_KILL_ENEMY_EVENTS | ACH_SAVE_WITH_GAME ); SetInflictorFilter( "npc_grenade_frag" ); SetVictimFilter( "npc_combine_s" ); SetGoal( 1 ); if ( IsPC() ) { // only in Ep2 for PC. (Shared across HLX for X360.) SetGameDirFilter( "ep2" ); } }
开发者ID:NEITMod,项目名称:HL2BM2,代码行数:13,
示例5: ControllerMove/*===========ControllerMove===========*/void CInput::ControllerMove( float frametime, CUserCmd *cmd ){ if ( IsPC() ) { if ( !m_fCameraInterceptingMouse && m_fMouseActive ) { MouseMove( cmd); } } JoyStickMove( frametime, cmd);#ifdef C17_HAPTICS cliHaptics->HapticsMove ( frametime, cmd); // Haptics addition#endif}
开发者ID:KyleGospo,项目名称:City-17-Episode-One-Source,代码行数:20,
示例6: Connect//-----------------------------------------------------------------------------// Connect, disconnect//-----------------------------------------------------------------------------bool CEngineAPI::Connect( CreateInterfaceFn factory ) { // Store off the app system factory... g_AppSystemFactory = factory; if ( !BaseClass::Connect( factory ) ) return false; g_pFileSystem = g_pFullFileSystem; if ( !g_pFileSystem ) return false; g_pFileSystem->SetWarningFunc( Warning ); if ( !Shader_Connect( true ) ) return false; g_pPhysics = (IPhysics*)factory( VPHYSICS_INTERFACE_VERSION, NULL ); if ( IsPC() ) { avi = (IAvi*)factory( AVI_INTERFACE_VERSION, NULL ); if ( !avi ) return false; } bik = (IBik*)factory( BIK_INTERFACE_VERSION, NULL ); if ( !bik ) return false; if ( !g_pStudioRender || !g_pDataCache || !g_pPhysics || !g_pMDLCache || !g_pMatSystemSurface || !g_pInputSystem ) { Warning( "Engine wasn't able to acquire required interfaces!/n" ); return false; } if (!g_pStudioRender) { Sys_Error( "Unable to init studio render system version %s/n", STUDIO_RENDER_INTERFACE_VERSION ); return false; } g_pHammer = (IHammer*)factory( INTERFACEVERSION_HAMMER, NULL ); ConnectMDLCacheNotify(); return true; }
开发者ID:Axitonium,项目名称:SourceEngine2007,代码行数:51,
示例7: COM_TimestampedLog//-----------------------------------------------------------------------------// Purpose: For debugging startup times, etc.// Input : *fmt - // ... - //-----------------------------------------------------------------------------void COM_TimestampedLog( char const *fmt, ... ){ static float s_LastStamp = 0.0; static bool s_bShouldLog = false; static bool s_bChecked = false; static bool s_bFirstWrite = false; if ( !s_bChecked ) {// s_bShouldLog = ( IsX360() || CommandLine()->CheckParm( "-profile" ) ) ? true : false; s_bShouldLog = false; s_bChecked = true; } if ( !s_bShouldLog ) { return; } char string[1024]; va_list argptr; va_start( argptr, fmt ); _vsnprintf( string, sizeof( string ), fmt, argptr ); va_end( argptr ); float curStamp = Plat_FloatTime();#if defined( _X360 ) XBX_rTimeStampLog( curStamp, string );#endif if ( IsPC() ) { if ( !s_bFirstWrite ) { unlink( "timestamped.log" ); s_bFirstWrite = true; } FILE* fp = fopen( "timestamped.log", "at+" ); fprintf( fp, "%8.4f / %8.4f: %s/n", curStamp, curStamp - s_LastStamp, string ); fclose( fp ); } s_LastStamp = curStamp;}
开发者ID:hzqst,项目名称:CaptionMod,代码行数:50,
示例8: IsLowViolenceBuild// checks the registry for the low violence setting// Check "HKEY_CURRENT_USER/Software/Valve/Source/Settings" and "User Token 2" or "User Token 3"bool IsLowViolenceBuild( void ){#if defined(_WIN32) HKEY hKey; char szValue[64]; unsigned long len = sizeof(szValue) - 1; bool retVal = false; if ( IsPC() && RegOpenKeyEx( HKEY_CURRENT_USER, "Software//Valve//Source//Settings", NULL, KEY_READ, &hKey) == ERROR_SUCCESS ) { // User Token 2 if ( RegQueryValueEx( hKey, "User Token 2", NULL, NULL, (unsigned char*)szValue, &len ) == ERROR_SUCCESS ) { if ( Q_strlen( szValue ) > 0 ) { retVal = true; } } if ( !retVal ) { // reset "len" for the next check len = sizeof(szValue) - 1; // User Token 3 if ( RegQueryValueEx( hKey, "User Token 3", NULL, NULL, (unsigned char*)szValue, &len ) == ERROR_SUCCESS ) { if ( Q_strlen( szValue ) > 0 ) { retVal = true; } } } RegCloseKey(hKey); } return retVal;#elif _LINUX return false;#else #error "Fix me"#endif}
开发者ID:SizzlingStats,项目名称:hl2sdk-ob-valve,代码行数:46,
示例9: ControllerMove/*===========ControllerMove===========*/void CInput::ControllerMove( float frametime, CUserCmd *cmd ){ if ( IsPC() ) { if ( !m_fCameraInterceptingMouse && m_fMouseActive ) { MouseMove( cmd); } } JoyStickMove( frametime, cmd);#ifdef C17_HAPTICS cliHaptics->HapticsMove(frametime, cmd); // Haptics addition#endif // NVNT if we have a haptic device.. if(haptics && haptics->HasDevice()) { if(engine->IsPaused() || engine->IsLevelMainMenuBackground() || vgui::surface()->IsCursorVisible() || !engine->IsInGame()) { // NVNT send a menu process to the haptics system. haptics->MenuProcess(); return; }#ifdef CSTRIKE_DLL // NVNT cstrike fov grabing. C_BasePlayer *player = C_BasePlayer::GetLocalPlayer(); if(player){ haptics->UpdatePlayerFOV(player->GetFOV()); }#endif // NVNT calculate move with the navigation on the haptics system. haptics->CalculateMove(cmd->forwardmove, cmd->sidemove, frametime); // NVNT send a game process to the haptics system. haptics->GameProcess();#if defined( WIN32 ) && !defined( _X360 ) // NVNT update our avatar effect. UpdateAvatarEffect();#endif }}
开发者ID:KyleGospo,项目名称:City-17-Episode-One-Source-2013,代码行数:49,
示例10: GetPointvoid CHARACTER::ClearAffect(bool bSave){ TAffectFlag afOld = m_afAffectFlag; WORD wMovSpd = GetPoint(POINT_MOV_SPEED); WORD wAttSpd = GetPoint(POINT_ATT_SPEED); itertype(m_list_pkAffect) it = m_list_pkAffect.begin(); while (it != m_list_pkAffect.end()) { CAffect * pkAff = *it; if (bSave) { if ( IS_NO_CLEAR_ON_DEATH_AFFECT(pkAff->dwType) || IS_NO_SAVE_AFFECT(pkAff->dwType) ) { ++it; continue; } if (IsPC()) { SendAffectRemovePacket(GetDesc(), GetPlayerID(), pkAff->dwType, pkAff->bApplyOn); } } ComputeAffect(pkAff, false); it = m_list_pkAffect.erase(it); CAffect::Release(pkAff); } if (afOld != m_afAffectFlag || wMovSpd != GetPoint(POINT_MOV_SPEED) || wAttSpd != GetPoint(POINT_ATT_SPEED)) UpdatePacket(); CheckMaximumPoints(); if (m_list_pkAffect.empty()) event_cancel(&m_pkAffectEvent);}
开发者ID:adi97ida,项目名称:Server,代码行数:42,
示例11: FindPlatformDirectory//-----------------------------------------------------------------------------// Purpose: Finds which directory the platform resides in// Output : Returns true on success, false on failure.//-----------------------------------------------------------------------------bool CGameUI::FindPlatformDirectory(char *platformDir, int bufferSize){ platformDir[0] = '/0'; if ( platformDir[0] == '/0' ) { // we're not under steam, so setup using path relative to game if ( IsPC() ) { if ( ::GetModuleFileName( ( HINSTANCE )GetModuleHandle( NULL ), platformDir, bufferSize ) ) { char *lastslash = strrchr(platformDir, '//'); // this should be just before the filename if ( lastslash ) { *lastslash = 0; Q_strncat(platformDir, "//platform//", bufferSize, COPY_ALL_CHARACTERS ); return true; } } } else { // xbox fetches the platform path from exisiting platform search path // path to executeable is not correct for xbox remote configuration if ( g_pFullFileSystem->GetSearchPath( "PLATFORM", false, platformDir, bufferSize ) ) { char *pSeperator = strchr( platformDir, ';' ); if ( pSeperator ) *pSeperator = '/0'; return true; } } Error( "Unable to determine platform directory/n" ); return false; } return (platformDir[0] != 0);}
开发者ID:DonnaLisa,项目名称:swarm-deferred,代码行数:43,
示例12: UpdateFullScreenDepthTexturevoid UpdateFullScreenDepthTexture( void ){ if( !g_pMaterialSystemHardwareConfig->SupportsPixelShaders_2_b() ) return; ITexture *pDepthTex = GetFullFrameDepthTexture(); CMatRenderContextPtr pRenderContext( materials ); if( IsX360() ) { pRenderContext->CopyRenderTargetToTextureEx( pDepthTex, -1, NULL, NULL ); } else { pRenderContext->CopyRenderTargetToTextureEx( pDepthTex, 0, NULL, NULL ); } pRenderContext->SetFullScreenDepthTextureValidityFlag( true ); if( r_depthoverlay.GetBool() ) { IMaterial *pMaterial = materials->FindMaterial( "debug/showz", TEXTURE_GROUP_OTHER, true ); pMaterial->IncrementReferenceCount(); IMaterialVar *BaseTextureVar = pMaterial->FindVar( "$basetexture", NULL, false ); IMaterialVar *pDepthInAlpha = NULL; if( IsPC() ) { pDepthInAlpha = pMaterial->FindVar( "$ALPHADEPTH", NULL, false ); pDepthInAlpha->SetIntValue( 1 ); } BaseTextureVar->SetTextureValue( pDepthTex ); pRenderContext->OverrideDepthEnable( true, false ); //don't write to depth, or else we'll never see translucents pRenderContext->DrawScreenSpaceQuad( pMaterial ); pRenderContext->OverrideDepthEnable( false, true ); pMaterial->DecrementReferenceCount(); }}
开发者ID:TalonBraveInfo,项目名称:InvasionSource,代码行数:39,
|