PlatformDefinitions.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. #ifndef BT_TYPE_DEFINITIONS_H
  2. #define BT_TYPE_DEFINITIONS_H
  3. ///This file provides some platform/compiler checks for common definitions
  4. #include "bullet/LinearMath/btScalar.h"
  5. #include "bullet/LinearMath/btMinMax.h"
  6. #ifdef PFX_USE_FREE_VECTORMATH
  7. #include "physics_effects/base_level/base/pfx_vectormath_include.win32.h"
  8. typedef Vectormath::Aos::Vector3 vmVector3;
  9. typedef Vectormath::Aos::Quat vmQuat;
  10. typedef Vectormath::Aos::Matrix3 vmMatrix3;
  11. typedef Vectormath::Aos::Transform3 vmTransform3;
  12. typedef Vectormath::Aos::Point3 vmPoint3;
  13. #else
  14. #include "bullet/vectormath/vmInclude.h"
  15. #endif//PFX_USE_FREE_VECTORMATH
  16. #ifdef _WIN32
  17. typedef union
  18. {
  19. unsigned int u;
  20. void *p;
  21. } addr64;
  22. #define USE_WIN32_THREADING 1
  23. #if defined(__MINGW32__) || defined(__CYGWIN__) || (defined (_MSC_VER) && _MSC_VER < 1300)
  24. #else
  25. #endif //__MINGW32__
  26. typedef unsigned char uint8_t;
  27. #ifndef __PHYSICS_COMMON_H__
  28. #ifndef PFX_USE_FREE_VECTORMATH
  29. #ifndef __BT_SKIP_UINT64_H
  30. #if defined(_WIN64) && defined(_MSC_VER)
  31. typedef unsigned __int64 uint64_t;
  32. #elif defined(_M_ARM)
  33. typedef unsigned __int64 uint64_t;
  34. #else
  35. typedef unsigned long int uint64_t;
  36. #endif
  37. #endif //__BT_SKIP_UINT64_H
  38. #endif //PFX_USE_FREE_VECTORMATH
  39. typedef unsigned int uint32_t;
  40. #endif //__PHYSICS_COMMON_H__
  41. typedef unsigned short uint16_t;
  42. #include <malloc.h>
  43. #define memalign(alignment, size) malloc(size);
  44. #include <string.h> //memcpy
  45. #include <stdio.h>
  46. #define spu_printf printf
  47. #else
  48. #include <stdint.h>
  49. #include <stdlib.h>
  50. #include <string.h> //for memcpy
  51. #if defined (__CELLOS_LV2__)
  52. // Playstation 3 Cell SDK
  53. #include <spu_printf.h>
  54. #else
  55. // posix system
  56. #define USE_PTHREADS (1)
  57. #ifdef USE_LIBSPE2
  58. #include <stdio.h>
  59. #define spu_printf printf
  60. #define DWORD unsigned int
  61. typedef union
  62. {
  63. unsigned long long ull;
  64. unsigned int ui[2];
  65. void *p;
  66. } addr64;
  67. #endif // USE_LIBSPE2
  68. #endif //__CELLOS_LV2__
  69. #endif
  70. #ifdef __SPU__
  71. #include <stdio.h>
  72. #define printf spu_printf
  73. #endif
  74. /* Included here because we need uint*_t typedefs */
  75. #include "PpuAddressSpace.h"
  76. #endif //BT_TYPE_DEFINITIONS_H