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