EditorDefs.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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. #pragma once
  9. #include <AzCore/PlatformDef.h>
  10. // It is vital that at least some Qt header is pulled in to this header, so that
  11. // QT_VERSION is defined and the editor gets the correct set of overloads in the
  12. // IXML interface. This also disambiguates the GUID/REFGUID situation in Guid.h
  13. #include <QUuid>
  14. #include <platform.h>
  15. #include "ProjectDefines.h"
  16. #ifdef NOMINMAX
  17. #include "Cry_Math.h"
  18. #endif //NOMINMAX
  19. // Resource includes
  20. #include "Resource.h"
  21. #include <Include/SandboxAPI.h>
  22. #include <Include/EditorCoreAPI.h>
  23. //////////////////////////////////////////////////////////////////////////
  24. // Simple type definitions.
  25. //////////////////////////////////////////////////////////////////////////
  26. #include "BaseTypes.h"
  27. // Which cfg file to use.
  28. #define EDITOR_CFG_FILE "editor.cfg"
  29. //////////////////////////////////////////////////////////////////////////
  30. // C runtime lib includes
  31. //////////////////////////////////////////////////////////////////////////
  32. #include <cstdlib>
  33. #include <cstring>
  34. #include <cstdio>
  35. #include <cmath>
  36. #include <cfloat>
  37. #include <climits>
  38. /////////////////////////////////////////////////////////////////////////////
  39. // STL
  40. /////////////////////////////////////////////////////////////////////////////
  41. #include <memory>
  42. #include <vector>
  43. #include <list>
  44. #include <map>
  45. #include <set>
  46. #include <algorithm>
  47. #include <functional>
  48. #undef rand // remove cryengine protection against wrong rand usage
  49. /////////////////////////////////////////////////////////////////////////////
  50. // VARIOUS MACROS AND DEFINES
  51. /////////////////////////////////////////////////////////////////////////////
  52. #ifdef new
  53. #undef new
  54. #endif
  55. #ifndef SAFE_DELETE
  56. #define SAFE_DELETE(p) { if (p) { delete (p); (p) = nullptr; } \
  57. }
  58. #endif
  59. #ifndef SAFE_DELETE_ARRAY
  60. #define SAFE_DELETE_ARRAY(p) { if (p) { delete[] (p); (p) = nullptr; } \
  61. }
  62. #endif
  63. #ifndef SAFE_RELEASE
  64. #define SAFE_RELEASE(p) { if (p) { (p)->Release(); (p) = nullptr; } \
  65. }
  66. #endif
  67. /////////////////////////////////////////////////////////////////////////////
  68. // CRY Stuff ////////////////////////////////////////////////////////////////
  69. /////////////////////////////////////////////////////////////////////////////
  70. #include <platform.h>
  71. #include <Cry_Math.h>
  72. #include <Cry_Geo.h>
  73. #include <Range.h>
  74. #include <StlUtils.h>
  75. #include <smartptr.h>
  76. #define TSmartPtr _smart_ptr
  77. #define TOOLBAR_TRANSPARENT_COLOR QColor(0xC0, 0xC0, 0xC0)
  78. /////////////////////////////////////////////////////////////////////////////
  79. // Interfaces ///////////////////////////////////////////////////////////////
  80. /////////////////////////////////////////////////////////////////////////////
  81. #include <IRenderer.h>
  82. #include <CryFile.h>
  83. #include <ISystem.h>
  84. #include <IIndexedMesh.h>
  85. #include <IXml.h>
  86. #include <IMovieSystem.h>
  87. //////////////////////////////////////////////////////////////////////////
  88. // Commonly used Editor includes.
  89. //////////////////////////////////////////////////////////////////////////
  90. // Utility classes.
  91. #include "Util/EditorUtils.h"
  92. #include "Util/FileEnum.h"
  93. #include <Editor/Util/EditorUtils.h>
  94. #include <CryCommon/Cry_GeoIntersect.h>
  95. #include "Util/AffineParts.h"
  96. // Xml support.
  97. #include "Util/XmlArchive.h"
  98. #include "Util/XmlTemplate.h"
  99. // Utility classes.
  100. #include "Util/RefCountBase.h"
  101. #include "Util/MemoryBlock.h"
  102. #include "Util/PathUtil.h"
  103. // Main Editor interface definition.
  104. #include "IEditor.h"
  105. // Log file access
  106. #include "LogFile.h"
  107. // Prevent macros to override certain function names
  108. #ifdef GetObject
  109. #undef GetObject
  110. #endif
  111. #ifdef max
  112. #undef max
  113. #undef min
  114. #endif
  115. #ifdef DeleteFile
  116. #undef DeleteFile
  117. #endif
  118. #ifdef CreateDirectory
  119. #undef CreateDirectory
  120. #endif
  121. #ifdef RemoveDirectory
  122. #undef RemoveDirectory
  123. #endif
  124. #ifdef CopyFile
  125. #undef CopyFile
  126. #endif
  127. #ifdef GetUserName
  128. #undef GetUserName
  129. #endif
  130. #ifdef LoadCursor
  131. #undef LoadCursor
  132. #endif