Bullet Collision Detection & Physics Library
PlatformDefinitions.h
Go to the documentation of this file.
1 #ifndef BT_TYPE_DEFINITIONS_H
2 #define BT_TYPE_DEFINITIONS_H
3 
5 #include "LinearMath/btScalar.h"
6 #include "LinearMath/btMinMax.h"
7 
8 #ifdef PFX_USE_FREE_VECTORMATH
9 #include "physics_effects/base_level/base/pfx_vectormath_include.win32.h"
15 #else
16 #include "vectormath/vmInclude.h"
17 #endif//PFX_USE_FREE_VECTORMATH
18 
19 
20 
21 
22 
23 #ifdef _WIN32
24 
25 typedef union
26 {
27  unsigned int u;
28  void *p;
29 } addr64;
30 
31 #define USE_WIN32_THREADING 1
32 
33  #if defined(__MINGW32__) || defined(__CYGWIN__) || (defined (_MSC_VER) && _MSC_VER < 1300)
34  #else
35  #endif //__MINGW32__
36 
37  typedef unsigned char uint8_t;
38 #ifndef __PHYSICS_COMMON_H__
39 #ifndef PFX_USE_FREE_VECTORMATH
40 #ifndef __BT_SKIP_UINT64_H
41  typedef unsigned long int uint64_t;
42 #endif //__BT_SKIP_UINT64_H
43 #endif //PFX_USE_FREE_VECTORMATH
44  typedef unsigned int uint32_t;
45 #endif //__PHYSICS_COMMON_H__
46  typedef unsigned short uint16_t;
47 
48  #include <malloc.h>
49  #define memalign(alignment, size) malloc(size);
50 
51 #include <string.h> //memcpy
52 
53 
54 
55  #include <stdio.h>
56  #define spu_printf printf
57 
58 #else
59  #include <stdint.h>
60  #include <stdlib.h>
61  #include <string.h> //for memcpy
62 
63 #if defined (__CELLOS_LV2__)
64  // Playstation 3 Cell SDK
65 #include <spu_printf.h>
66 
67 #else
68  // posix system
69 
70 #define USE_PTHREADS (1)
71 
72 #ifdef USE_LIBSPE2
73 #include <stdio.h>
74 #define spu_printf printf
75 #define DWORD unsigned int
76  typedef union
77  {
78  unsigned long long ull;
79  unsigned int ui[2];
80  void *p;
81  } addr64;
82 #endif // USE_LIBSPE2
83 
84 #endif //__CELLOS_LV2__
85 
86 #endif
87 
88 #ifdef __SPU__
89 #include <stdio.h>
90 #define printf spu_printf
91 #endif
92 
93 /* Included here because we need uint*_t typedefs */
94 #include "PpuAddressSpace.h"
95 
96 #endif //BT_TYPE_DEFINITIONS_H
97 
98 
99