Win64specific.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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 : Specific to Win32 declarations, inline functions etc.
  9. #ifndef CRYINCLUDE_CRYCOMMON_WIN64SPECIFIC_H
  10. #define CRYINCLUDE_CRYCOMMON_WIN64SPECIFIC_H
  11. #pragma once
  12. #define _CPU_AMD64
  13. #define _CPU_SSE
  14. #define ILINE __forceinline
  15. #define DEPRECATED __declspec(deprecated)
  16. #ifndef _WIN32_WINNT
  17. # define _WIN32_WINNT 0x501
  18. #endif
  19. //////////////////////////////////////////////////////////////////////////
  20. // Standard includes.
  21. //////////////////////////////////////////////////////////////////////////
  22. #include <stdexcept>
  23. #include <malloc.h>
  24. #include <io.h>
  25. #include <new.h>
  26. #include <direct.h>
  27. #include <fcntl.h>
  28. #include <sys/types.h>
  29. #include <sys/stat.h>
  30. #include <time.h>
  31. //////////////////////////////////////////////////////////////////////////
  32. // Special intrinsics
  33. #include <math.h> // Should be included before intrin.h
  34. #include <intrin.h>
  35. //////////////////////////////////////////////////////////////////////////
  36. // Define platform independent types.
  37. //////////////////////////////////////////////////////////////////////////
  38. #include "BaseTypes.h"
  39. typedef long LONG;
  40. typedef unsigned char BYTE;
  41. typedef unsigned long threadID;
  42. typedef unsigned long DWORD;
  43. typedef double real; //biggest float-type on this machine
  44. typedef long LONG;
  45. typedef void* THREAD_HANDLE;
  46. typedef void* EVENT_HANDLE;
  47. typedef __int64 INT_PTR, * PINT_PTR;
  48. typedef unsigned __int64 UINT_PTR, * PUINT_PTR;
  49. typedef __int64 LONG_PTR, * PLONG_PTR;
  50. typedef unsigned __int64 ULONG_PTR, * PULONG_PTR;
  51. typedef ULONG_PTR DWORD_PTR, * PDWORD_PTR;
  52. int64 CryGetTicks();
  53. int64 CryGetTicksPerSec();
  54. #ifndef SAFE_DELETE
  55. #define SAFE_DELETE(p) { if (p) { delete (p); (p) = NULL; } \
  56. }
  57. #endif
  58. #ifndef SAFE_DELETE_ARRAY
  59. #define SAFE_DELETE_ARRAY(p) { if (p) { delete [] (p); (p) = NULL; } \
  60. }
  61. #endif
  62. #ifndef SAFE_RELEASE
  63. #define SAFE_RELEASE(p) { if (p) { (p)->Release(); (p) = NULL; } \
  64. }
  65. #endif
  66. #ifndef FILE_ATTRIBUTE_NORMAL
  67. #define FILE_ATTRIBUTE_NORMAL 0x00000080
  68. #endif
  69. #define TARGET_DEFAULT_ALIGN (0x8U)
  70. #define PLATFORM_64BIT
  71. #endif // CRYINCLUDE_CRYCOMMON_WIN64SPECIFIC_H