BVB Source Codes

CRYENGINE Show StdAfx.h Source code

Return Download CRYENGINE: download StdAfx.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. /*************************************************************************
  4.    CryGame Source File.
  5.    -------------------------------------------------------------------------
  6.    $Id$
  7.    $DateTime$
  8.    Description: include file for standard system include files, or project
  9.                 specific include files that are used frequently, but are
  10.                 changed infrequently
  11.  
  12.    -------------------------------------------------------------------------
  13.    History:
  14.    - 20:7:2004   10:51 : Created by Marco Koegler
  15.  
  16. *************************************************************************/
  17. #if !defined(AFX_STDAFX_H__B36C365D_F0EA_4545_B3BC_1E0EAB3B5E42__INCLUDED_)
  18. #define AFX_STDAFX_H__B36C365D_F0EA_4545_B3BC_1E0EAB3B5E42__INCLUDED_
  19.  
  20. //#define _CRTDBG_MAP_ALLOC
  21.  
  22. #if _MSC_VER > 1000
  23.         #pragma once
  24. #endif // _MSC_VER > 1000
  25.  
  26. #include <CryCore/Project/CryModuleDefs.h>
  27. #define eCryModule   eCryM_Action
  28. #define RWI_NAME_TAG "RayWorldIntersection(Action)"
  29. #define PWI_NAME_TAG "PrimitiveWorldIntersection(Action)"
  30.  
  31. #define CRYACTION_EXPORTS
  32.  
  33. // Insert your headers here
  34. #include <CryCore/Platform/platform.h>
  35.  
  36. #include <memory>
  37. #include <vector>
  38. #include <map>
  39. #include <queue>
  40.  
  41. inline void GameWarning(const char*, ...) PRINTF_PARAMS(1, 2);
  42.  
  43. #include <CryCore/Project/ProjectDefines.h>
  44. #include <CryCore/StlUtils.h>
  45. #include <CryMath/Cry_Math.h>
  46. #include <CryMath/Cry_Camera.h>
  47. #include <CrySystem/ISystem.h>
  48. #include <CryNetwork/INetwork.h>
  49. #include <CryInput/IInput.h>
  50. #include <CryScriptSystem/IScriptSystem.h>
  51. #include <CryEntitySystem/IEntitySystem.h>
  52. #include <CryNetwork/NetHelpers.h>
  53. #include <CrySystem/File/ICryPak.h>
  54. #include <CrySystem/IConsole.h>
  55. #include <CrySystem/ITimer.h>
  56. #include <CrySystem/ILog.h>
  57. #include <CryNetwork/IRemoteControl.h>
  58. #include <CryNetwork/ISimpleHttpServer.h>
  59. #include <CryAction.h>
  60. #include <CryGame/IGameFramework.h>
  61. #include <IActorSystem.h>
  62. #include <IAnimatedCharacter.h>
  63. #include <CryGame/IGame.h>
  64. #include <IItem.h>
  65. #include <IItemSystem.h>
  66. #include <IViewSystem.h>
  67. #include <IVehicleSystem.h>
  68. #include <CryFlowGraph/IFlowSystem.h>
  69. #include <IGameplayRecorder.h>
  70. #include <CryGame/GameUtils.h>
  71.  
  72. #pragma warning(disable: 4018)  // conditional expression is constant
  73. #pragma warning(disable: 4018)  // conditional expression is constant
  74. #pragma warning(disable: 4503)  // decorated name length exceeded, name was truncated
  75.  
  76. #if !defined(_RELEASE)
  77.         #define ENABLE_NETDEBUG 1
  78. #endif
  79.  
  80. //////////////////////////////////////////////////////////////////////////
  81. //! Reports a Game Warning to validator with WARNING severity.
  82. inline void GameWarning(const char* format, ...)
  83. {
  84.         if (!format)
  85.                 return;
  86.  
  87.         va_list args;
  88.         va_start(args, format);
  89.         GetISystem()->WarningV(VALIDATOR_MODULE_GAME, VALIDATOR_WARNING, 0, 0, format, args);
  90.         va_end(args);
  91. }
  92.  
  93. #if 1
  94.         #define NET_USE_SIMPLE_BREAKAGE 1
  95. #else// deprecated and won't compile
  96.         #define NET_USE_SIMPLE_BREAKAGE 0
  97. #endif
  98.  
  99. #if !defined(RELEASE)
  100.         #define CRYACTION_AI_VERBOSITY
  101. #endif
  102.  
  103. #ifdef CRYACTION_AI_VERBOSITY
  104.         #define AIWarningID     gEnv->pAISystem->Warning
  105.         #define AIErrorID       gEnv->pAISystem->Error
  106.         #define AILogProgressID gEnv->pAISystem->LogProgress
  107.         #define AILogEventID    gEnv->pAISystem->LogEvent
  108.         #define AILogCommentID  gEnv->pAISystem->LogComment
  109. #else
  110.         #define AIWarningID     (void)
  111.         #define AIErrorID       (void)
  112.         #define AILogProgressID (void)
  113.         #define AILogEventID    (void)
  114.         #define AILogCommentID  (void)
  115. #endif
  116.  
  117. inline bool IsClientActor(EntityId id)
  118. {
  119.         IActor* pActor = CCryAction::GetCryAction()->GetClientActor();
  120.         if (pActor && pActor->GetEntity()->GetId() == id)
  121.                 return true;
  122.         return false;
  123. }
  124.  
  125. //////////////////////////////////////////////////////////////////////////
  126. // Get a proxy or make it if not found
  127. inline IEntityComponent* GetOrMakeProxy(IEntity* pEntity, EEntityProxy proxyType)
  128. {
  129.         IEntityComponent* pProxy = pEntity->GetProxy(proxyType);
  130.         if (!pProxy)
  131.         {
  132.                 if (pEntity->CreateProxy(proxyType))
  133.                         pProxy = pEntity->GetProxy(proxyType);
  134.         }
  135.         return pProxy;
  136. }
  137.  
  138. template<typename T> bool inline GetAttr(const XmlNodeRef& node, const char* key, T& val)
  139. {
  140.         return node->getAttr(key, val);
  141. }
  142.  
  143. bool inline GetTimeAttr(const XmlNodeRef& node, const char* key, time_t& val)
  144. {
  145.         const char* pVal = node->getAttr(key);
  146.         if (!pVal)
  147.                 return false;
  148.         val = GameUtils::stringToTime(pVal);
  149.         return true;
  150. }
  151.  
  152. template<> bool inline GetAttr(const XmlNodeRef& node, const char* key, string& val)
  153. {
  154.         const char* pVal = node->getAttr(key);
  155.         if (!pVal)
  156.                 return false;
  157.         val = pVal;
  158.         return true;
  159. }
  160.  
  161. #endif // !defined(AFX_STDAFX_H__B36C365D_F0EA_4545_B3BC_1E0EAB3B5E42__INCLUDED_)
  162.  
downloadStdAfx.h Source code - Download CRYENGINE Source code
Related Source Codes/Software:
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top