diff --git a/CMakeLists.txt b/CMakeLists.txt index a0fcade4f..4832ae6be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,7 @@ project(MinecraftConsoles C CXX) # Set target arch type if empty. Visual studio solution generator provides it. ################################################################################ set(CMAKE_VS_PLATFORM_NAME "Linux") +set(CMAKE_CXX_STANDARD 11) ################################################################################ # Global configuration types diff --git a/Minecraft.Client/LevelRenderer.h b/Minecraft.Client/LevelRenderer.h index 3a6a8572f..e9849a021 100644 --- a/Minecraft.Client/LevelRenderer.h +++ b/Minecraft.Client/LevelRenderer.h @@ -4,7 +4,9 @@ #include "OffsettedRenderList.h" #include "../Minecraft.World/JavaIntHash.h" #include "../Minecraft.World/Level.h" +#ifndef __linux__ #include +#endif // __linux__ #ifdef __PS3__ #include "C4JSpursJob.h" #endif diff --git a/Minecraft.Client/Linux/LinuxStubs.h b/Minecraft.Client/Linux/LinuxStubs.h index ffc7be279..997d53914 100644 --- a/Minecraft.Client/Linux/LinuxStubs.h +++ b/Minecraft.Client/Linux/LinuxStubs.h @@ -30,8 +30,10 @@ typedef unsigned int DWORD; typedef const char *LPCSTR; typedef bool BOOL; +typedef BOOL *PBOOL; +typedef BOOL *LPBOOL; typedef void* LPVOID; -typedef char WCHAR; +typedef wchar_t WCHAR; typedef unsigned char BYTE; typedef BYTE* PBYTE; typedef const wchar_t* LPCWSTR; @@ -51,6 +53,7 @@ typedef long LONG64, *PLONG64; typedef void VOID; typedef ULONGLONG PlayerUID; typedef DWORD WORD; +typedef DWORD* PDWORD; typedef struct { DWORD LowPart; LONG HighPart; @@ -62,8 +65,10 @@ typedef std::wstring LPWSTR; typedef unsigned char boolean; // java brainrot #define __debugbreak() #define __int32 int +typedef int64_t __int64; +typedef uint64_t __uint64; typedef unsigned long ULONG; -typedef unsigned char byte; +// typedef unsigned char byte; typedef short SHORT; typedef float FLOAT; diff --git a/Minecraft.Client/stdafx.h b/Minecraft.Client/stdafx.h index 84cd90805..140d27f0b 100644 --- a/Minecraft.Client/stdafx.h +++ b/Minecraft.Client/stdafx.h @@ -54,6 +54,15 @@ #include "PSVitaTypes.h" #include "PSVitaStubs.h" #include "PSVitaMaths.h" +#elif defined __linux__ +#define AUTO_VAR(_var, _val) auto _var = _val +#include +#include +#include +#include +#include +#include "Linux/LinuxStubs.h" +#include "Linux/xbox_valve.h" #else #define AUTO_VAR(_var, _val) auto _var = _val #include @@ -178,6 +187,12 @@ typedef XUID GameSessionUID; #include "Windows64/4JLibs/inc/4J_Profile.h" #include "Windows64/4JLibs/inc/4J_Render.h" #include "Windows64/4JLibs/inc/4J_Storage.h" +#elif defined __linux__ + // draw the rest of the owl + #include "Windows64/4JLibs/inc/4J_Input.h" + #include "Windows64/4JLibs/inc/4J_Profile.h" + #include "Windows64/4JLibs/inc/4J_Render.h" + #include "Windows64/4JLibs/inc/4J_Storage.h" #elif defined __PSVITA__ #include "PSVita/4JLibs/inc/4J_Input.h" #include "PSVita/4JLibs/inc/4J_Profile.h" @@ -280,13 +295,11 @@ typedef XUID GameSessionUID; #include "Windows64/Iggy/gdraw/gdraw_d3d11.h" #include "Windows64/Windows64_UIController.h" #elif defined __linux__ - #include "Windows64Media/strings.h" - #include "Linux/LinuxStubs.h" - #include "Linux/xbox_valve.h" // #include "Windows64/Sentient/MinecraftTelemetry.h" + #include "Windows64Media/strings.h" // #include "Windows64/Windows64_App.h" // #include "Windows64/Sentient/DynamicConfigurations.h" - // #include "Windows64/Sentient/SentientTelemetryCommon.h" + #include "Windows64/Sentient/SentientTelemetryCommon.h" // not platform-specific so we can steal win64's homework here for now. // #include "Windows64/GameConfig/Minecraft.spa.h" // #include "Windows64/XML/ATGXmlParser.h" // #include "Windows64/Social/SocialManager.h" diff --git a/Minecraft.World/stdafx.h b/Minecraft.World/stdafx.h index a1394e1cc..87ad6832f 100644 --- a/Minecraft.World/stdafx.h +++ b/Minecraft.World/stdafx.h @@ -9,8 +9,9 @@ #define AUTO_VAR(_var, _val) auto _var = _val #endif -typedef unsigned __int64; -typedef unsigned __uint64; +#if ( defined _XBOX || defined _WINDOWS64 || defined _DURANGO ) +typedef unsigned __int64 __uint64; +#endif #ifdef _WINDOWS64 #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers