refactor(Minecraft.World): Implement LCEMP changes.

This commit is contained in:
pieeebot committed 2026-07-13 00:14:53 +03:00
1 parent 3fce0538c5
commit 21e2add09a
64 files changed
+655 -372

No files matched your search

+38 -11
View File
@@ -13,15 +13,27 @@
typedef unsigned char byte;
const int XUSER_INDEX_ANY = 255;
const int XUSER_INDEX_FOCUS = 254;
#ifdef __PSVITA__
const int XUSER_MAX_COUNT = 1;
const int MINECRAFT_NET_MAX_PLAYERS = 4;
#else
const int XUSER_MAX_COUNT = 4;
const int MINECRAFT_NET_MAX_PLAYERS = 8;
#ifndef XUSER_INDEX_ANY
const int XUSER_INDEX_ANY = 255;
#endif
#ifndef XUSER_INDEX_FOCUS
const int XUSER_INDEX_FOCUS = 254;
#endif
#ifdef __PSVITA__
#ifndef XUSER_MAX_COUNT
const int XUSER_MAX_COUNT = 1;
#endif
const int MINECRAFT_NET_MAX_PLAYERS = 4;
#else
#ifndef XUSER_MAX_COUNT
const int XUSER_MAX_COUNT = 4;
#endif
#if defined(_DEDICATED_SERVER) || defined(_WINDOWS64)
const int MINECRAFT_NET_MAX_PLAYERS = 255;
#else
const int MINECRAFT_NET_MAX_PLAYERS = 8;
#endif
#endif
@@ -215,10 +227,19 @@ public:
int GetUserIndex();
void SetCustomDataValue(ULONG_PTR ulpCustomDataValue);
ULONG_PTR GetCustomDataValue();
BYTE m_smallId;
bool m_isRemote;
bool m_isHostPlayer;
wchar_t m_gamertag[32];
private:
ULONG_PTR m_customData;
};
void Win64_SetupRemoteQNetPlayer(IQNetPlayer *player, BYTE smallId, bool isHost, bool isLocal);
PlayerUID Win64_UsernameToXuid(const char* username);
PlayerUID Win64_UsernameToXuid(const wchar_t* username);
const int QNET_GETSENDQUEUESIZE_SECONDARY_TYPE = 0;
const int QNET_GETSENDQUEUESIZE_MESSAGES = 0;
const int QNET_GETSENDQUEUESIZE_BYTES = 0;
@@ -309,9 +330,15 @@ public:
bool IsHost();
HRESULT JoinGameFromInviteInfo(DWORD dwUserIndex, DWORD dwUserMask, const INVITE_INFO *pInviteInfo);
void HostGame();
void ClientJoinGame();
void EndGame();
static IQNetPlayer m_player[4];
static void SetPlayerCapacity(DWORD capacity);
static DWORD GetPlayerCapacity();
static IQNetPlayer *m_player;
static DWORD s_playerCapacity;
static DWORD s_playerCount;
static bool s_isHosting;
};
#ifdef _DURANGO
+2
View File
@@ -0,0 +1,2 @@
#pragma once
#include "extraX64.h"
+2
View File
@@ -0,0 +1,2 @@
#pragma once
#include "extraX64.h"
+2
View File
@@ -0,0 +1,2 @@
#pragma once
#include "extraX64.h"
+2
View File
@@ -0,0 +1,2 @@
#pragma once
#include "extraX64.h"
+2
View File
@@ -0,0 +1,2 @@
#pragma once
#include "extraX64.h"
+2
View File
@@ -0,0 +1,2 @@
#pragma once
#include "extraX64.h"