From 32f065e21de6387248e4a763e8df9093b63246c8 Mon Sep 17 00:00:00 2001 From: ThePixelMoon Date: Sun, 1 Mar 2026 21:14:51 +0200 Subject: [PATCH] Minecraft.World: move linux win defs into its own file --- Minecraft.World/linux/wlinux.h | 80 ++++++++++++++++++++++++++++++++++ Minecraft.World/stdafx.h | 73 +------------------------------ 2 files changed, 81 insertions(+), 72 deletions(-) create mode 100644 Minecraft.World/linux/wlinux.h diff --git a/Minecraft.World/linux/wlinux.h b/Minecraft.World/linux/wlinux.h new file mode 100644 index 000000000..605ce56fa --- /dev/null +++ b/Minecraft.World/linux/wlinux.h @@ -0,0 +1,80 @@ +#ifndef WLINUX_H +#define WLINUX_H + +#pragma once + +#include +#include + +typedef unsigned int DWORD; +typedef const char *LPCSTR; +typedef bool BOOL; +typedef void* LPVOID; +typedef char WCHAR; +typedef unsigned char BYTE; +typedef BYTE* PBYTE; +typedef const wchar_t* LPCWSTR; +typedef unsigned long long ULONGLONG; +typedef int HRESULT; +typedef unsigned int UINT; +#define TRUE true +#define WINAPI +typedef void* HANDLE; +typedef int INT; +typedef char CHAR; +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; + +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 { + // // + // // The following field is used for blocking when there is contention for + // // the resource + // // + // + union { + ULONG_PTR RawEvent[4]; + } Synchronization; + // + // // + // // The following three fields control entering and exiting the critical + // // section for the resource + // // + // + LONG LockCount; + LONG RecursionCount; + HANDLE OwningThread; +} RTL_CRITICAL_SECTION, *PRTL_CRITICAL_SECTION; + +typedef RTL_CRITICAL_SECTION CRITICAL_SECTION; + +#endif // WLINUX_H \ No newline at end of file diff --git a/Minecraft.World/stdafx.h b/Minecraft.World/stdafx.h index 3e570b6db..34f815375 100644 --- a/Minecraft.World/stdafx.h +++ b/Minecraft.World/stdafx.h @@ -13,78 +13,7 @@ typedef unsigned __int64; typedef unsigned __uint64; #if defined( __linux__ ) -#include -typedef unsigned int DWORD; -typedef const char *LPCSTR; -typedef bool BOOL; -typedef void* LPVOID; -typedef char WCHAR; -typedef unsigned char BYTE; -typedef BYTE* PBYTE; -typedef const wchar_t* LPCWSTR; -typedef unsigned long long ULONGLONG; -typedef int HRESULT; -typedef unsigned int UINT; -#define TRUE true -#define WINAPI -typedef void* HANDLE; -typedef int INT; -typedef char CHAR; -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; - -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 { - // // - // // The following field is used for blocking when there is contention for - // // the resource - // // - // - union { - ULONG_PTR RawEvent[4]; - } Synchronization; - // - // // - // // The following three fields control entering and exiting the critical - // // section for the resource - // // - // - LONG LockCount; - LONG RecursionCount; - HANDLE OwningThread; -} RTL_CRITICAL_SECTION, *PRTL_CRITICAL_SECTION; - -typedef RTL_CRITICAL_SECTION CRITICAL_SECTION; - +#include "linux/wlinux.h" #include "linux/xbox_valve.h" #endif