Last change
on this file since 1963 was
1963,
checked in by rgrieder, 16 years ago
|
Added Bullet physics engine.
|
-
Property svn:eol-style set to
native
|
File size:
1.4 KB
|
Line | |
---|
1 | #ifndef TYPE_DEFINITIONS_H |
---|
2 | #define TYPE_DEFINITIONS_H |
---|
3 | |
---|
4 | ///This file provides some platform/compiler checks for common definitions |
---|
5 | |
---|
6 | #ifdef WIN32 |
---|
7 | |
---|
8 | typedef union |
---|
9 | { |
---|
10 | unsigned int u; |
---|
11 | void *p; |
---|
12 | } addr64; |
---|
13 | |
---|
14 | #define USE_WIN32_THREADING 1 |
---|
15 | |
---|
16 | #if defined(__MINGW32__) || defined(__CYGWIN__) || (defined (_MSC_VER) && _MSC_VER < 1300) |
---|
17 | #else |
---|
18 | #endif //__MINGW32__ |
---|
19 | |
---|
20 | typedef unsigned char uint8_t; |
---|
21 | #ifndef __PHYSICS_COMMON_H__ |
---|
22 | typedef unsigned long int uint64_t; |
---|
23 | typedef unsigned int uint32_t; |
---|
24 | #endif //__PHYSICS_COMMON_H__ |
---|
25 | typedef unsigned short uint16_t; |
---|
26 | |
---|
27 | #include <malloc.h> |
---|
28 | #define memalign(alignment, size) malloc(size); |
---|
29 | |
---|
30 | #include <string.h> //memcpy |
---|
31 | |
---|
32 | |
---|
33 | |
---|
34 | #include <stdio.h> |
---|
35 | #define spu_printf printf |
---|
36 | |
---|
37 | #else |
---|
38 | #include <stdint.h> |
---|
39 | #include <stdlib.h> |
---|
40 | #include <string.h> //for memcpy |
---|
41 | |
---|
42 | #if defined (__CELLOS_LV2__) |
---|
43 | // Playstation 3 Cell SDK |
---|
44 | #include <spu_printf.h> |
---|
45 | |
---|
46 | #else |
---|
47 | // posix system |
---|
48 | |
---|
49 | #define USE_PTHREADS (1) |
---|
50 | |
---|
51 | #ifdef USE_LIBSPE2 |
---|
52 | #include <stdio.h> |
---|
53 | #define spu_printf printf |
---|
54 | #define DWORD unsigned int |
---|
55 | |
---|
56 | typedef union |
---|
57 | { |
---|
58 | unsigned long long ull; |
---|
59 | unsigned int ui[2]; |
---|
60 | void *p; |
---|
61 | } addr64; |
---|
62 | |
---|
63 | |
---|
64 | #else |
---|
65 | |
---|
66 | #include <stdio.h> |
---|
67 | #define spu_printf printf |
---|
68 | |
---|
69 | #endif // USE_LIBSPE2 |
---|
70 | |
---|
71 | #endif //__CELLOS_LV2__ |
---|
72 | |
---|
73 | #endif |
---|
74 | |
---|
75 | |
---|
76 | /* Included here because we need uint*_t typedefs */ |
---|
77 | #include "PpuAddressSpace.h" |
---|
78 | |
---|
79 | #endif //TYPE_DEFINITIONS_H |
---|
80 | |
---|
81 | |
---|
82 | |
---|
Note: See
TracBrowser
for help on using the repository browser.