fix(solution): HOLY SHIT IT'S COMPILING

This commit is contained in:
Mohamed Ashraf 2026-03-02 09:38:48 +04:00
parent 401d8fec96
commit 96e219ee1e
13 changed files with 46 additions and 32 deletions

View file

@ -1,6 +1,9 @@
#pragma once
#include "../../Common/UI/UIEnums.h"
#include "../../Xbox/Sentient/SentientTelemetryCommon.h"
enum ETelemetryChallenges {};
class CTelemetryManager
{

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -1992,3 +1992,5 @@ target_compile_options(${PROJECT_NAME} PRIVATE
-fpermissive
-Wtemplate-body
)
target_include_directories(${PROJECT_NAME} PRIVATE x64headers)

View file

@ -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.

View file

@ -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
}
}

View file

@ -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<std::byte>(0);
DWORD numberOfBytesRead;
BOOL result = m_saveFile->readFile(
@ -46,7 +46,7 @@ int ConsoleSaveFileInputStream::read()
return -1;
}
return byteRead;
return static_cast<int>(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.

View file

@ -4,13 +4,13 @@
#include "File.h"
#include <xuiapp.h>
#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

View file

@ -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__

View file

@ -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
}
}

View file

@ -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

View file

@ -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;