aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/PS3/PS3Extras/Ps3Types.h
blob: fe003c4a3b5aadf3228c66b673fcac8af365d30b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
#pragma once


#define BOOST_NO_CXX11_NULLPTR
#define BOOST_ENABLE_ASSERT_HANDLER
#include <typeinfo>

#include <cstdint>
#include <cstddef>
#include <boost/typeof/typeof.hpp>
#include <boost/tr1/memory.hpp>
#include "boost/tr1/unordered_map.hpp"
#include "boost/tr1/unordered_set.hpp"
#include "boost/pool/pool_alloc.hpp"
#include <boost/mpl/equal_to.hpp>


#define __forceinline inline

//#include "winerror.h"

using std::tr1::bad_weak_ptr;
using std::tr1::const_pointer_cast;
using std::tr1::dynamic_pointer_cast;
using std::tr1::enable_shared_from_this;
using std::tr1::get_deleter;
using std::tr1::shared_ptr;
using std::tr1::static_pointer_cast;
using std::tr1::swap;
using std::tr1::weak_ptr;
using std::tr1::unordered_map;
using std::tr1::unordered_set;
using boost::hash;


// user the pool_allocator for all unordered_set and unordered_map instances
// template <	class T, class H = hash<T>, class P = std::equal_to<T>, class A = boost::pool_allocator<T> >
// 	class unordered_set : public std::tr1::unordered_set<T, H, P, A >
// {};
//
// template <class K, class T, class H = hash<K>, class P = std::equal_to<K>, class A = boost::pool_allocator<std::pair<const K,T> > >
// 	class unordered_map : public std::tr1::unordered_map<K, T, H, P, A >
// {};



// template <	class T, class H = hash<T>, class P = std::equal_to<T>, class A = C4JPoolAllocator<T> >
// class unordered_set : public std::tr1::unordered_set<T, H, P, A >
// {};
//
// template <class K, class T, class H = hash<K>, class P = std::equal_to<K>, class A = C4JPoolAllocator<std::pair<const K,T> > >
// class unordered_map : public std::tr1::unordered_map<K, T, H, P, A >
// {};


// using boost::ublas::vector;

#define static_assert(a,b) BOOST_STATIC_ASSERT(a)

class Cnullptr{
public:
	template<typename T>
	operator shared_ptr<T>() { return shared_ptr<T>(); }
};

extern Cnullptr nullptr;




// #include <math.h>
// #include "DirectX\DirectXMath.h"
// using namespace DirectX;

#define S_OK 0


typedef unsigned long       DWORD;
typedef int                 BOOL;
typedef unsigned char       BYTE;
typedef unsigned short      WORD;
typedef float               FLOAT;

typedef int					__int32;

typedef FLOAT               *PFLOAT;
typedef BOOL           *PBOOL;
typedef BOOL            *LPBOOL;
typedef BYTE           *PBYTE;
typedef BYTE            *LPBYTE;
typedef int            *PINT;
typedef int             *LPINT;
typedef WORD           *PWORD;
typedef WORD            *LPWORD;
typedef long            *PLONG;
typedef long            *LPLONG;
typedef DWORD          *PDWORD;
typedef DWORD           *LPDWORD;
typedef void            *LPVOID;
typedef const void      *LPCVOID;
typedef void *PVOID;
typedef unsigned long ULONG;

typedef unsigned char boolean;

typedef int                 INT;
typedef unsigned int        UINT;
typedef unsigned int        *PUINT;


typedef unsigned char		byte;
typedef unsigned long		DWORD;
typedef int                 INT;
typedef unsigned long ULONG_PTR, *PULONG_PTR;
typedef ULONG_PTR SIZE_T, *PSIZE_T;

typedef long long LONG64, *PLONG64;

#define VOID void
typedef char CHAR;
typedef short SHORT;
typedef long LONG;
typedef int64_t LONGLONG;
typedef uint64_t ULONGLONG;


#define CONST               const
typedef wchar_t WCHAR;    // wc,   16-bit UNICODE character
typedef WCHAR *PWCHAR;
typedef WCHAR *LPWCH, *PWCH;
typedef CONST WCHAR *LPCWCH, *PCWCH;
typedef WCHAR *NWPSTR;
typedef WCHAR *LPWSTR, *PWSTR;
typedef CONST WCHAR *LPCWSTR, *PCWSTR;

//
// ANSI (Multi-byte Character) types
//
typedef CHAR *PCHAR;
typedef CHAR *LPCH, *PCH;
typedef CONST CHAR *LPCCH, *PCCH;
typedef CHAR *NPSTR;
typedef CHAR *LPSTR, *PSTR;
typedef CONST CHAR *LPCSTR, *PCSTR;

#ifndef FALSE
#define FALSE               0
#endif

#ifndef TRUE
#define TRUE                1
#endif


typedef struct _FILETIME {
#ifdef _M_PPCBE
	DWORD dwHighDateTime;
	DWORD dwLowDateTime;
#else
	DWORD dwLowDateTime;
	DWORD dwHighDateTime;
#endif
} FILETIME, *PFILETIME, *LPFILETIME;


#if defined(MIDL_PASS)
typedef struct _LARGE_INTEGER {
#else // MIDL_PASS
typedef union _LARGE_INTEGER {
	struct {
#if defined(_M_PPCBE)
		LONG HighPart;
		DWORD LowPart;
#else
		DWORD LowPart;
		LONG HighPart;
#endif
	};
	struct {
#if defined(_M_PPCBE)
		LONG HighPart;
		DWORD LowPart;
#else
		DWORD LowPart;
		LONG HighPart;
#endif
	} u;
#endif //MIDL_PASS
	LONGLONG QuadPart;
} LARGE_INTEGER;

typedef LARGE_INTEGER *PLARGE_INTEGER;

#if defined(MIDL_PASS)
typedef struct _ULARGE_INTEGER {
#else // MIDL_PASS
typedef union _ULARGE_INTEGER {
	struct {
#if defined(_M_PPCBE)
		DWORD HighPart;
		DWORD LowPart;
#else
		DWORD LowPart;
		DWORD HighPart;
#endif
	};
	struct {
#if defined(_M_PPCBE)
		DWORD HighPart;
		DWORD LowPart;
#else
		DWORD LowPart;
		DWORD HighPart;
#endif
	} u;
#endif //MIDL_PASS
	ULONGLONG QuadPart;
} ULARGE_INTEGER;

typedef ULARGE_INTEGER *PULARGE_INTEGER;

// 360 specifics
typedef long				HRESULT;
typedef void*				HANDLE;

#define DECLARE_HANDLE(name) typedef HANDLE name
DECLARE_HANDLE(HINSTANCE);

typedef HINSTANCE HMODULE;      /* HMODULEs can be used in place of HINSTANCEs */


typedef struct _OVERLAPPED {
	ULONG_PTR Internal;
	ULONG_PTR InternalHigh;
	DWORD   Offset;
	DWORD   OffsetHigh;
	HANDLE  hEvent;
} OVERLAPPED, *LPOVERLAPPED;

typedef LPVOID PSECURITY_ATTRIBUTES;
typedef LPVOID LPSECURITY_ATTRIBUTES;



#define __in_ecount(a)
#define __in_bcount(a)





// const int XUSER_MAX_COUNT = 4;