diff --git a/Minecraft.Client/Common/Telemetry/TelemetryManager.h b/Minecraft.Client/Common/Telemetry/TelemetryManager.h index fbe48bdd3..e6c18dccd 100644 --- a/Minecraft.Client/Common/Telemetry/TelemetryManager.h +++ b/Minecraft.Client/Common/Telemetry/TelemetryManager.h @@ -1,6 +1,9 @@ #pragma once #include "../../Common/UI/UIEnums.h" +#include "../../Xbox/Sentient/SentientTelemetryCommon.h" + +enum ETelemetryChallenges {}; class CTelemetryManager { diff --git a/Minecraft.Client/Minecraft.h b/Minecraft.Client/Minecraft.h index 307603002..c2a9d0a52 100644 --- a/Minecraft.Client/Minecraft.h +++ b/Minecraft.Client/Minecraft.h @@ -38,9 +38,9 @@ class ColourTable; class MultiPlayerGameMode; class PsPlusUpsellWrapper; -#include "..\Minecraft.World\File.h" -#include "..\Minecraft.World\DisconnectPacket.h" -#include "..\Minecraft.World\C4JThread.h" +#include "../Minecraft.World/File.h" +#include "../Minecraft.World/DisconnectPacket.h" +#include "../Minecraft.World/C4JThread.h" using namespace std; diff --git a/Minecraft.Client/MinecraftServer.h b/Minecraft.Client/MinecraftServer.h index e61001a3d..7e1627659 100644 --- a/Minecraft.Client/MinecraftServer.h +++ b/Minecraft.Client/MinecraftServer.h @@ -1,8 +1,8 @@ #pragma once #include "ConsoleInputSource.h" -#include "..\Minecraft.World\ArrayWithLength.h" -#include "..\Minecraft.World\SharedConstants.h" -#include "..\Minecraft.World\C4JThread.h" +#include "../Minecraft.World/ArrayWithLength.h" +#include "../Minecraft.World/SharedConstants.h" +#include "../Minecraft.World/C4JThread.h" class ServerConnection; class Settings; diff --git a/Minecraft.Client/ServerLevel.h b/Minecraft.Client/ServerLevel.h index 644c15c01..d1ba2ac03 100644 --- a/Minecraft.Client/ServerLevel.h +++ b/Minecraft.Client/ServerLevel.h @@ -1,6 +1,6 @@ #pragma once -#include "..\Minecraft.World\net.minecraft.world.level.h" -#include "..\Minecraft.World\JavaIntHash.h" +#include "../Minecraft.World/net.minecraft.world.level.h" +#include "../Minecraft.World/JavaIntHash.h" class ServerChunkCache; class MinecraftServer; class Node; diff --git a/Minecraft.World/CMakeLists.txt b/Minecraft.World/CMakeLists.txt index 945862bb5..85570c60a 100644 --- a/Minecraft.World/CMakeLists.txt +++ b/Minecraft.World/CMakeLists.txt @@ -1992,3 +1992,5 @@ target_compile_options(${PROJECT_NAME} PRIVATE -fpermissive -Wtemplate-body ) + +target_include_directories(${PROJECT_NAME} PRIVATE x64headers) diff --git a/Minecraft.World/CompressedTileStorage.h b/Minecraft.World/CompressedTileStorage.h index 3d4335477..79fd9d6d5 100644 --- a/Minecraft.World/CompressedTileStorage.h +++ b/Minecraft.World/CompressedTileStorage.h @@ -1,5 +1,7 @@ #pragma once +#ifndef __linux__ #include "xmcore.h" +#endif // __linux__ // This class is used for the compressed storage of tile data. Unlike the SparseLightingStorage class, data is split into 512 blocks of 4x4x4 tiles. Then within each block, the // data is compressed as described below, with a selection of bits per tile available, in a method similar to a palettised image. diff --git a/Minecraft.World/ConsoleSaveFileConverter.cpp b/Minecraft.World/ConsoleSaveFileConverter.cpp index 9a3d572d3..ded87e948 100644 --- a/Minecraft.World/ConsoleSaveFileConverter.cpp +++ b/Minecraft.World/ConsoleSaveFileConverter.cpp @@ -62,7 +62,7 @@ void ConsoleSaveFileConverter::ConvertSave(ConsoleSaveFile *sourceSave, ConsoleS ConsoleSavePath ldatPath( wstring(L"level.dat") ); FileEntry *sourceLdatFe = sourceSave->createFile( ldatPath ); FileEntry *targetLdatFe = targetSave->createFile( ldatPath ); - app.DebugPrintf("Processing level.dat\n"); + printf("Processing level.dat\n"); ProcessSimpleFile(sourceSave, sourceLdatFe, targetSave, targetLdatFe); // Process game rules @@ -72,7 +72,7 @@ void ConsoleSaveFileConverter::ConvertSave(ConsoleSaveFile *sourceSave, ConsoleS { FileEntry *sourceFe = sourceSave->createFile( gameRulesPath ); FileEntry *targetFe = targetSave->createFile( gameRulesPath ); - app.DebugPrintf("Processing game rules\n"); + printf("Processing game rules\n"); ProcessSimpleFile(sourceSave, sourceFe, targetSave, targetFe); } } @@ -102,7 +102,7 @@ void ConsoleSaveFileConverter::ConvertSave(ConsoleSaveFile *sourceSave, ConsoleS { FileEntry *sourceFe = sourceSave->createFile( sourcePlayerDatPath ); FileEntry *targetFe = targetSave->createFile( targetPlayerDatPath ); - app.DebugPrintf("Processing player dat file %s\n", playerFiles->at(fileIdx)->data.filename); + printf("Processing player dat file %s\n", playerFiles->at(fileIdx)->data.filename); ProcessSimpleFile(sourceSave, sourceFe, targetSave, targetFe); targetFe->data.lastModifiedTime = sourceFe->data.lastModifiedTime; @@ -138,7 +138,7 @@ void ConsoleSaveFileConverter::ConvertSave(ConsoleSaveFile *sourceSave, ConsoleS // Overworld { - app.DebugPrintf("Processing the overworld\n"); + printf("Processing the overworld\n"); int halfXZSize = xzSize / 2; int progressTarget = (xzSize) * (xzSize); @@ -149,7 +149,7 @@ void ConsoleSaveFileConverter::ConvertSave(ConsoleSaveFile *sourceSave, ConsoleS { for(int z = -halfXZSize; z < halfXZSize; ++z) { - //app.DebugPrintf("Processing overworld chunk %d,%d\n",x,z); + //printf("Processing overworld chunk %d,%d\n",x,z); DataInputStream *dis = sourceCache._getChunkDataInputStream(sourceSave,L"",x,z); if(dis) @@ -181,7 +181,7 @@ void ConsoleSaveFileConverter::ConvertSave(ConsoleSaveFile *sourceSave, ConsoleS // Nether { - app.DebugPrintf("Processing the nether\n"); + printf("Processing the nether\n"); int hellSize = xzSize / hellScale; int halfXZSize = hellSize / 2; @@ -193,7 +193,7 @@ void ConsoleSaveFileConverter::ConvertSave(ConsoleSaveFile *sourceSave, ConsoleS { for(int z = -halfXZSize; z < halfXZSize; ++z) { - //app.DebugPrintf("Processing nether chunk %d,%d\n",x,z); + //printf("Processing nether chunk %d,%d\n",x,z); DataInputStream *dis = sourceCache._getChunkDataInputStream(sourceSave,L"DIM-1",x,z); if(dis) @@ -224,7 +224,7 @@ void ConsoleSaveFileConverter::ConvertSave(ConsoleSaveFile *sourceSave, ConsoleS // End { - app.DebugPrintf("Processing the end\n"); + printf("Processing the end\n"); int halfXZSize = END_LEVEL_MAX_WIDTH / 2; int progressTarget = (END_LEVEL_MAX_WIDTH) * (END_LEVEL_MAX_WIDTH); @@ -235,7 +235,7 @@ void ConsoleSaveFileConverter::ConvertSave(ConsoleSaveFile *sourceSave, ConsoleS { for(int z = -halfXZSize; z < halfXZSize; ++z) { - //app.DebugPrintf("Processing end chunk %d,%d\n",x,z); + //printf("Processing end chunk %d,%d\n",x,z); DataInputStream *dis = sourceCache._getChunkDataInputStream(sourceSave,L"DIM1/",x,z); if(dis) @@ -291,4 +291,4 @@ void ConsoleSaveFileConverter::ConvertSave(ConsoleSaveFile *sourceSave, ConsoleS } } #endif -} \ No newline at end of file +} diff --git a/Minecraft.World/ConsoleSaveFileInputStream.cpp b/Minecraft.World/ConsoleSaveFileInputStream.cpp index 93d49956f..4ea1f8ae2 100644 --- a/Minecraft.World/ConsoleSaveFileInputStream.cpp +++ b/Minecraft.World/ConsoleSaveFileInputStream.cpp @@ -25,7 +25,7 @@ ConsoleSaveFileInputStream::ConsoleSaveFileInputStream(ConsoleSaveFile *saveFile //the next byte of data, or -1 if the end of the file is reached. int ConsoleSaveFileInputStream::read() { - byte byteRead = 0; + byte byteRead = static_cast(0); DWORD numberOfBytesRead; BOOL result = m_saveFile->readFile( @@ -46,7 +46,7 @@ int ConsoleSaveFileInputStream::read() return -1; } - return byteRead; + return static_cast(byteRead); } //Reads up to b.length bytes of data from this input stream into an array of bytes. This method blocks until some input is available. diff --git a/Minecraft.World/ConsoleSaveFileOriginal.cpp b/Minecraft.World/ConsoleSaveFileOriginal.cpp index 139d99acf..803ebdfc4 100644 --- a/Minecraft.World/ConsoleSaveFileOriginal.cpp +++ b/Minecraft.World/ConsoleSaveFileOriginal.cpp @@ -4,13 +4,13 @@ #include "File.h" #include #include "compression.h" -#include "..\Minecraft.Client\Minecraft.h" -#include "..\Minecraft.Client\MinecraftServer.h" -#include "..\Minecraft.Client\ServerLevel.h" -#include "..\Minecraft.World\net.minecraft.world.level.h" -#include "..\Minecraft.World\LevelData.h" -#include "..\Minecraft.Client\Common\GameRules\LevelGenerationOptions.h" -#include "..\Minecraft.World\net.minecraft.world.level.chunk.storage.h" +#include "../Minecraft.Client/Minecraft.h" +#include "../Minecraft.Client/MinecraftServer.h" +#include "../Minecraft.Client/ServerLevel.h" +#include "../Minecraft.World/net.minecraft.world.level.h" +#include "../Minecraft.World/LevelData.h" +#include "../Minecraft.Client/Common/GameRules/LevelGenerationOptions.h" +#include "../Minecraft.World/net.minecraft.world.level.chunk.storage.h" #ifdef _XBOX diff --git a/Minecraft.World/Level.h b/Minecraft.World/Level.h index 361a40e84..a6872350e 100644 --- a/Minecraft.World/Level.h +++ b/Minecraft.World/Level.h @@ -7,7 +7,7 @@ using namespace std; #include "SavedData.h" #include "Definitions.h" #include "ParticleTypes.h" -#include "biome.h" +#include "Biome.h" #include "C4JThread.h" #ifdef __PSVITA__ diff --git a/Minecraft.World/PerformanceTimer.cpp b/Minecraft.World/PerformanceTimer.cpp index 5ed7ee0c8..dfaefba48 100644 --- a/Minecraft.World/PerformanceTimer.cpp +++ b/Minecraft.World/PerformanceTimer.cpp @@ -3,7 +3,7 @@ PerformanceTimer::PerformanceTimer() { -#ifndef _CONTENT_PACKAGE +#if !defined (__linux__) // Get the frequency of the timer LARGE_INTEGER qwTicksPerSec; QueryPerformanceFrequency( &qwTicksPerSec ); @@ -15,14 +15,14 @@ PerformanceTimer::PerformanceTimer() void PerformanceTimer::Reset() { -#ifndef _CONTENT_PACKAGE +#if !defined (__linux__) QueryPerformanceCounter( &m_qwStartTime ); #endif } void PerformanceTimer::PrintElapsedTime(const wstring &description) { -#ifndef _CONTENT_PACKAGE +#if !defined (__linux__) LARGE_INTEGER qwNewTime, qwDeltaTime; QueryPerformanceCounter( &qwNewTime ); @@ -32,4 +32,4 @@ void PerformanceTimer::PrintElapsedTime(const wstring &description) app.DebugPrintf("TIMER: %ls: Elapsed time %f\n", description.c_str(), fElapsedTime); #endif -} \ No newline at end of file +} diff --git a/Minecraft.World/SparseLightStorage.h b/Minecraft.World/SparseLightStorage.h index d05d76450..9d3e33c2d 100644 --- a/Minecraft.World/SparseLightStorage.h +++ b/Minecraft.World/SparseLightStorage.h @@ -1,5 +1,7 @@ #pragma once +#ifndef __linux__ #include "xmcore.h" +#endif // __linux__ // 4J added - Storage for block & sky light data. Lighting data is normally stored as 4-bits per tile, in a DataLayer class of 16384 bytes ( 128 x 16 x 16 x 0.5 ) // This class provides more economical storage for such data by taking into consideration that it is quite common for large parts of the lighting data in a level to diff --git a/Minecraft.World/linux/wlinux.h b/Minecraft.World/linux/wlinux.h index 1fbb6a7ff..569b33a4d 100644 --- a/Minecraft.World/linux/wlinux.h +++ b/Minecraft.World/linux/wlinux.h @@ -26,6 +26,9 @@ typedef int HRESULT; typedef unsigned int UINT; typedef void* HANDLE; typedef int INT; +typedef long* PLONG; +typedef unsigned int* LPDWORD; +typedef const void* LPCVOID; typedef char CHAR; typedef void* PVOID; typedef unsigned long* ULONG_PTR; @@ -48,6 +51,8 @@ typedef struct _FILETIME { DWORD dwHighDateTime; } FILETIME, *PFILETIME, *LPFILETIME; +#define FILE_BEGIN SEEK_SET + typedef short SHORT; typedef VOID* XMEMCOMPRESSION_CONTEXT;