the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#pragma once
2using namespace std;
3
4#include "ArrayWithLength.h"
5
6// 4J Jev, just thought it would be easier this way.
7#define ArrayCopyFunctionDeclaration(x) static void arraycopy(arrayWithLength<x> src, unsigned int srcPos, arrayWithLength<x> *dst, unsigned int dstPos, unsigned int length);
8#define ArrayCopyFunctionDefinition(x) void System::arraycopy(arrayWithLength<x> src, unsigned int srcPos, arrayWithLength<x> *dst, unsigned int dstPos, unsigned int length)\
9{\
10 arraycopy<x>(src,srcPos,dst,dstPos,length);\
11}\
12
13class System
14{
15 template <class T> static void arraycopy(arrayWithLength<T> src, unsigned int srcPos, arrayWithLength<T> *dst, unsigned int dstPos, unsigned int length);
16
17public:
18 ArrayCopyFunctionDeclaration(byte)
19 ArrayCopyFunctionDeclaration(Node *)
20 ArrayCopyFunctionDeclaration(Biome *)
21 ArrayCopyFunctionDeclaration(int)
22
23 static __int64 nanoTime();
24 static __int64 currentTimeMillis();
25 static __int64 currentRealTimeMillis(); // 4J Added to get real-world time for timestamps in saves
26
27 static void ReverseUSHORT(unsigned short *pusVal);
28 static void ReverseSHORT(short *psVal);
29 static void ReverseULONG(unsigned long *pulVal);
30 static void ReverseULONG(unsigned int *pulVal);
31 static void ReverseINT(int *piVal);
32 static void ReverseULONGLONG(__int64 *pullVal);
33 static void ReverseWCHARA(WCHAR *pwch,int iLen);
34
35};
36
37#define MAKE_FOURCC(ch0, ch1, ch2, ch3) \
38 ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
39 ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))