From 9bc3f561d9f7ec4adeed8b782cb430850a56e71c Mon Sep 17 00:00:00 2001 From: Mohamed Ashraf Date: Sun, 1 Mar 2026 22:48:35 +0400 Subject: [PATCH] fix(Renderer): Fix renderer compile --- Minecraft.Client/CMakeLists.txt | 2 +- Minecraft.Client/PS3/4JLibs/inc/4J_Render.h | 2 +- .../Windows64/4JLibs/inc/4J_Render.h | 2 +- Minecraft.World/CMakeLists.txt | 2 +- Minecraft.World/stdafx.h | 30 +++++++++++++++++++ 5 files changed, 34 insertions(+), 4 deletions(-) diff --git a/Minecraft.Client/CMakeLists.txt b/Minecraft.Client/CMakeLists.txt index e2daf46e4..faf127f51 100644 --- a/Minecraft.Client/CMakeLists.txt +++ b/Minecraft.Client/CMakeLists.txt @@ -5203,5 +5203,5 @@ elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Xbox 360") "xonline" ) endif() -add_compile_options(-fpermissive) +add_compile_options(-fpermissive -Wtemplate-body) target_link_libraries(${PROJECT_NAME} PRIVATE "${ADDITIONAL_LIBRARY_DEPENDENCIES}") diff --git a/Minecraft.Client/PS3/4JLibs/inc/4J_Render.h b/Minecraft.Client/PS3/4JLibs/inc/4J_Render.h index d55f440bf..a4b3c3601 100644 --- a/Minecraft.Client/PS3/4JLibs/inc/4J_Render.h +++ b/Minecraft.Client/PS3/4JLibs/inc/4J_Render.h @@ -60,7 +60,7 @@ public: void InitialiseContext(); void StartFrame(); void Present(); - void Clear(int flags, D3D11_RECT *pRect = NULL); + void Clear(int flags/*, D3D11_RECT *pRect = NULL*/); void SetClearColour(const float colourRGBA[4]); bool IsWidescreen(); bool IsHiDef(); diff --git a/Minecraft.Client/Windows64/4JLibs/inc/4J_Render.h b/Minecraft.Client/Windows64/4JLibs/inc/4J_Render.h index 64a2c76e5..7b003fa5a 100644 --- a/Minecraft.Client/Windows64/4JLibs/inc/4J_Render.h +++ b/Minecraft.Client/Windows64/4JLibs/inc/4J_Render.h @@ -57,7 +57,7 @@ public: void Set_matrixDirty(); // Core - void Initialise(ID3D11Device *pDevice, IDXGISwapChain *pSwapChain); + void Initialise(); void InitialiseContext(); void StartFrame(); void DoScreenGrabOnNextPresent(); diff --git a/Minecraft.World/CMakeLists.txt b/Minecraft.World/CMakeLists.txt index 93aa5804b..853af61fb 100644 --- a/Minecraft.World/CMakeLists.txt +++ b/Minecraft.World/CMakeLists.txt @@ -1988,4 +1988,4 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE ">" ) -add_compile_options(-fpermissive) +add_compile_options(-fpermissive -Wtemplate-body) diff --git a/Minecraft.World/stdafx.h b/Minecraft.World/stdafx.h index 9f8657db1..cdd04f1e4 100644 --- a/Minecraft.World/stdafx.h +++ b/Minecraft.World/stdafx.h @@ -37,7 +37,37 @@ typedef void* PVOID; typedef unsigned long* ULONG_PTR; typedef long LONG; typedef void VOID; +#define RtlZeroMemory(Destination,Length) memset((Destination),0,(Length)) +#define ZeroMemory RtlZeroMemory +typedef ULONGLONG PlayerUID; +typedef DWORD WORD; +#define FALSE false +typedef struct { + DWORD LowPart; + long long QuadPart; + LONG HighPart; +} LARGE_INTEGER; +#define XCONTENT_MAX_FILENAME_LENGTH 42 +#define XCONTENT_MAX_DISPLAYNAME_LENGTH MAX_DISPLAYNAME_LENGTH + +typedef short SHORT; + +typedef struct { + int xuidInvitee; + int xuidInviter; + DWORD dwTitleID; + int hostInfo; + bool fFromGameInvite; +} XINVITE_INFO, * PXINVITE_INFO; + +typedef XINVITE_INFO INVITE_INFO; + +typedef struct HXUIOBJ { + // Stub fields representing the actual Xbox HXUIOBJ structure. + int id; + const char* name; +} HXUIOBJ; typedef struct _RTL_CRITICAL_SECTION { // //