CrySystem_precompiled.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. // Description : Precompiled Header.
  9. #pragma once
  10. #include <AzCore/PlatformIncl.h>
  11. #include <string.h>
  12. #include <stdio.h>
  13. #include <stdarg.h>
  14. #include <fcntl.h>
  15. #if defined(AZ_RESTRICTED_PLATFORM)
  16. #undef AZ_RESTRICTED_SECTION
  17. #define STDAFX_H_SECTION_1 1
  18. #define STDAFX_H_SECTION_2 2
  19. #endif
  20. #if defined(AZ_RESTRICTED_PLATFORM)
  21. #define AZ_RESTRICTED_SECTION STDAFX_H_SECTION_1
  22. #include AZ_RESTRICTED_FILE(CrySystem_precompiled_h)
  23. #elif defined(LINUX) // Scrubber friendly negated define pattern
  24. #elif !defined(APPLE)
  25. #include <memory.h>
  26. #include <malloc.h>
  27. #endif
  28. //on mac the precompiled header is auto included in every .c and .cpp file, no include line necessary.
  29. //.c files don't like the cpp things in here
  30. #ifdef __cplusplus
  31. #include <vector>
  32. #if defined(AZ_RESTRICTED_PLATFORM)
  33. #define AZ_RESTRICTED_SECTION STDAFX_H_SECTION_2
  34. #include AZ_RESTRICTED_FILE(CrySystem_precompiled_h)
  35. #endif
  36. #if defined(AZ_RESTRICTED_SECTION_IMPLEMENTED)
  37. #undef AZ_RESTRICTED_SECTION_IMPLEMENTED
  38. #elif defined(APPLE) // Scrubber friendly negated define pattern
  39. #elif defined(ANDROID) // Scrubber friendly negated define pattern
  40. #elif defined(LINUX)
  41. #if !defined(__ARM_ARCH)
  42. # include <sys/io.h>
  43. #endif // __ARM_ARCH
  44. #else
  45. # include <io.h>
  46. #endif
  47. //#define DEFINE_MODULE_NAME "CrySystem"
  48. #define CRYSYSTEM_EXPORTS
  49. #include <platform.h>
  50. #ifdef WIN32
  51. #include <AzCore/PlatformIncl.h>
  52. #include <tlhelp32.h>
  53. #undef GetCharWidth
  54. #undef GetUserName
  55. #endif
  56. /////////////////////////////////////////////////////////////////////////////
  57. // CRY Stuff ////////////////////////////////////////////////////////////////
  58. /////////////////////////////////////////////////////////////////////////////
  59. #include "Cry_Math.h"
  60. #include <smartptr.h>
  61. #include <Range.h>
  62. #include <StlUtils.h>
  63. inline int RoundToClosestMB(size_t memSize)
  64. {
  65. // add half a MB and shift down to get closest MB
  66. return((int) ((memSize + (1 << 19)) >> 20));
  67. }
  68. //////////////////////////////////////////////////////////////////////////
  69. // For faster compilation
  70. //////////////////////////////////////////////////////////////////////////
  71. #include <IRenderer.h>
  72. #include <CryFile.h>
  73. #include <ISystem.h>
  74. #include <IXml.h>
  75. #include <ICmdLine.h>
  76. #include <IConsole.h>
  77. #include <ILog.h>
  78. /////////////////////////////////////////////////////////////////////////////
  79. //forward declarations for common Interfaces.
  80. /////////////////////////////////////////////////////////////////////////////
  81. class ITexture;
  82. struct IRenderer;
  83. struct ISystem;
  84. struct ITimer;
  85. struct IFFont;
  86. struct ICVar;
  87. struct IConsole;
  88. namespace AZ::IO
  89. {
  90. struct IArchive;
  91. }
  92. struct ICryFont;
  93. struct IMovieSystem;
  94. struct IPhysicalWorld;
  95. #endif //__cplusplus