the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1
2
3#pragma once
4
5
6#define BOOST_NO_CXX11_NULLPTR
7#define BOOST_ENABLE_ASSERT_HANDLER
8#include <typeinfo>
9
10#include <stddef.h>
11#include <boost/typeof/typeof.hpp>
12#include <boost/tr1/memory.hpp>
13#include "boost/tr1/unordered_map.hpp"
14#include "boost/tr1/unordered_set.hpp"
15#include "boost/pool/pool_alloc.hpp"
16#include <boost/mpl/equal_to.hpp>
17
18
19#define __forceinline inline
20
21//#include "winerror.h"
22
23using std::tr1::bad_weak_ptr;
24using std::tr1::const_pointer_cast;
25using std::tr1::dynamic_pointer_cast;
26using std::tr1::enable_shared_from_this;
27using std::tr1::get_deleter;
28using std::tr1::shared_ptr;
29using std::tr1::static_pointer_cast;
30using std::tr1::swap;
31using std::tr1::weak_ptr;
32using std::tr1::unordered_map;
33using std::tr1::unordered_set;
34using boost::hash;
35
36
37// user the pool_allocator for all unordered_set and unordered_map instances
38// template < class T, class H = hash<T>, class P = std::equal_to<T>, class A = boost::pool_allocator<T> >
39// class unordered_set : public std::tr1::unordered_set<T, H, P, A >
40// {};
41//
42// 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> > >
43// class unordered_map : public std::tr1::unordered_map<K, T, H, P, A >
44// {};
45
46
47
48// template < class T, class H = hash<T>, class P = std::equal_to<T>, class A = C4JPoolAllocator<T> >
49// class unordered_set : public std::tr1::unordered_set<T, H, P, A >
50// {};
51//
52// template <class K, class T, class H = hash<K>, class P = std::equal_to<K>, class A = C4JPoolAllocator<std::pair<const K,T> > >
53// class unordered_map : public std::tr1::unordered_map<K, T, H, P, A >
54// {};
55
56
57// using boost::ublas::vector;
58
59#define static_assert(a,b) BOOST_STATIC_ASSERT(a)
60#define AUTO_VAR BOOST_AUTO
61
62class Cnullptr{
63public:
64 template<typename T>
65 operator shared_ptr<T>() { return shared_ptr<T>(); }
66};
67
68extern Cnullptr nullptr;
69
70
71
72
73// #include <math.h>
74// #include "DirectX\DirectXMath.h"
75// using namespace DirectX;
76
77#define S_OK 0
78
79
80typedef unsigned long DWORD;
81typedef int BOOL;
82typedef unsigned char BYTE;
83typedef unsigned short WORD;
84typedef float FLOAT;
85
86typedef int __int32;
87
88typedef FLOAT *PFLOAT;
89typedef BOOL *PBOOL;
90typedef BOOL *LPBOOL;
91typedef BYTE *PBYTE;
92typedef BYTE *LPBYTE;
93typedef int *PINT;
94typedef int *LPINT;
95typedef WORD *PWORD;
96typedef WORD *LPWORD;
97typedef long *PLONG;
98typedef long *LPLONG;
99typedef DWORD *PDWORD;
100typedef DWORD *LPDWORD;
101typedef void *LPVOID;
102typedef const void *LPCVOID;
103typedef void *PVOID;
104typedef unsigned long ULONG;
105
106typedef unsigned char boolean;
107
108typedef int INT;
109typedef unsigned int UINT;
110typedef unsigned int *PUINT;
111
112
113typedef unsigned char byte;
114typedef long long __int64;
115typedef unsigned long long __uint64;
116typedef unsigned long DWORD;
117typedef int INT;
118typedef unsigned long ULONG_PTR, *PULONG_PTR;
119typedef ULONG_PTR SIZE_T, *PSIZE_T;
120
121typedef __int64 LONG64, *PLONG64;
122
123#define VOID void
124typedef char CHAR;
125typedef short SHORT;
126typedef long LONG;
127typedef __int64 LONGLONG;
128typedef __uint64 ULONGLONG;
129
130
131#define CONST const
132typedef wchar_t WCHAR; // wc, 16-bit UNICODE character
133typedef WCHAR *PWCHAR;
134typedef WCHAR *LPWCH, *PWCH;
135typedef CONST WCHAR *LPCWCH, *PCWCH;
136typedef WCHAR *NWPSTR;
137typedef WCHAR *LPWSTR, *PWSTR;
138typedef CONST WCHAR *LPCWSTR, *PCWSTR;
139
140//
141// ANSI (Multi-byte Character) types
142//
143typedef CHAR *PCHAR;
144typedef CHAR *LPCH, *PCH;
145typedef CONST CHAR *LPCCH, *PCCH;
146typedef CHAR *NPSTR;
147typedef CHAR *LPSTR, *PSTR;
148typedef CONST CHAR *LPCSTR, *PCSTR;
149
150#ifndef FALSE
151#define FALSE 0
152#endif
153
154#ifndef TRUE
155#define TRUE 1
156#endif
157
158
159typedef struct _FILETIME {
160#ifdef _M_PPCBE
161 DWORD dwHighDateTime;
162 DWORD dwLowDateTime;
163#else
164 DWORD dwLowDateTime;
165 DWORD dwHighDateTime;
166#endif
167} FILETIME, *PFILETIME, *LPFILETIME;
168
169
170#if defined(MIDL_PASS)
171typedef struct _LARGE_INTEGER {
172#else // MIDL_PASS
173typedef union _LARGE_INTEGER {
174 struct {
175#if defined(_M_PPCBE)
176 LONG HighPart;
177 DWORD LowPart;
178#else
179 DWORD LowPart;
180 LONG HighPart;
181#endif
182 };
183 struct {
184#if defined(_M_PPCBE)
185 LONG HighPart;
186 DWORD LowPart;
187#else
188 DWORD LowPart;
189 LONG HighPart;
190#endif
191 } u;
192#endif //MIDL_PASS
193 LONGLONG QuadPart;
194} LARGE_INTEGER;
195
196typedef LARGE_INTEGER *PLARGE_INTEGER;
197
198#if defined(MIDL_PASS)
199typedef struct _ULARGE_INTEGER {
200#else // MIDL_PASS
201typedef union _ULARGE_INTEGER {
202 struct {
203#if defined(_M_PPCBE)
204 DWORD HighPart;
205 DWORD LowPart;
206#else
207 DWORD LowPart;
208 DWORD HighPart;
209#endif
210 };
211 struct {
212#if defined(_M_PPCBE)
213 DWORD HighPart;
214 DWORD LowPart;
215#else
216 DWORD LowPart;
217 DWORD HighPart;
218#endif
219 } u;
220#endif //MIDL_PASS
221 ULONGLONG QuadPart;
222} ULARGE_INTEGER;
223
224typedef ULARGE_INTEGER *PULARGE_INTEGER;
225
226// 360 specifics
227typedef long HRESULT;
228typedef void* HANDLE;
229
230#define DECLARE_HANDLE(name) typedef HANDLE name
231DECLARE_HANDLE(HINSTANCE);
232
233typedef HINSTANCE HMODULE; /* HMODULEs can be used in place of HINSTANCEs */
234
235
236typedef struct _OVERLAPPED {
237 ULONG_PTR Internal;
238 ULONG_PTR InternalHigh;
239 DWORD Offset;
240 DWORD OffsetHigh;
241 HANDLE hEvent;
242} OVERLAPPED, *LPOVERLAPPED;
243
244typedef LPVOID PSECURITY_ATTRIBUTES;
245typedef LPVOID LPSECURITY_ATTRIBUTES;
246
247
248
249#define __in_ecount(a)
250#define __in_bcount(a)
251
252
253
254
255
256// const int XUSER_MAX_COUNT = 4;
257