mirror of
https://github.com/ValveSoftware/Proton.git
synced 2025-01-14 23:58:17 +03:00
314 lines
11 KiB
C++
314 lines
11 KiB
C++
#include "steamclient_private.h"
|
|
#include "steam_defs.h"
|
|
#include "steamworks_sdk_112/steam_api.h"
|
|
#include "steamworks_sdk_112/isteamgameserver.h"
|
|
#include "steamworks_sdk_112/isteamgameserverstats.h"
|
|
#include "steamworks_sdk_112/isteamgamecoordinator.h"
|
|
extern "C" {
|
|
#pragma pack( push, 8 )
|
|
struct winCallbackMsg_t_112 {
|
|
HSteamUser m_hSteamUser;
|
|
int m_iCallback;
|
|
uint8 * m_pubParam;
|
|
int m_cubParam;
|
|
} __attribute__ ((ms_struct));
|
|
#pragma pack( pop )
|
|
void win_to_lin_struct_CallbackMsg_t_112(void *w, void *l)
|
|
{
|
|
CallbackMsg_t *lin = (CallbackMsg_t *)l;
|
|
struct winCallbackMsg_t_112 *win = (struct winCallbackMsg_t_112 *)w;
|
|
lin->m_hSteamUser = win->m_hSteamUser;
|
|
lin->m_iCallback = win->m_iCallback;
|
|
lin->m_pubParam = win->m_pubParam;
|
|
lin->m_cubParam = win->m_cubParam;
|
|
}
|
|
|
|
void lin_to_win_struct_CallbackMsg_t_112(void *l, void *w)
|
|
{
|
|
CallbackMsg_t *lin = (CallbackMsg_t *)l;
|
|
struct winCallbackMsg_t_112 *win = (struct winCallbackMsg_t_112 *)w;
|
|
win->m_hSteamUser = lin->m_hSteamUser;
|
|
win->m_iCallback = lin->m_iCallback;
|
|
win->m_pubParam = lin->m_pubParam;
|
|
win->m_cubParam = lin->m_cubParam;
|
|
}
|
|
|
|
#pragma pack( push, 8 )
|
|
struct winFriendGameInfo_t_112 {
|
|
CGameID m_gameID;
|
|
uint32 m_unGameIP;
|
|
uint16 m_usGamePort;
|
|
uint16 m_usQueryPort;
|
|
CSteamID m_steamIDLobby;
|
|
} __attribute__ ((ms_struct));
|
|
#pragma pack( pop )
|
|
void win_to_lin_struct_FriendGameInfo_t_112(void *w, void *l)
|
|
{
|
|
FriendGameInfo_t *lin = (FriendGameInfo_t *)l;
|
|
struct winFriendGameInfo_t_112 *win = (struct winFriendGameInfo_t_112 *)w;
|
|
lin->m_gameID = win->m_gameID;
|
|
lin->m_unGameIP = win->m_unGameIP;
|
|
lin->m_usGamePort = win->m_usGamePort;
|
|
lin->m_usQueryPort = win->m_usQueryPort;
|
|
lin->m_steamIDLobby = win->m_steamIDLobby;
|
|
}
|
|
|
|
void lin_to_win_struct_FriendGameInfo_t_112(void *l, void *w)
|
|
{
|
|
FriendGameInfo_t *lin = (FriendGameInfo_t *)l;
|
|
struct winFriendGameInfo_t_112 *win = (struct winFriendGameInfo_t_112 *)w;
|
|
win->m_gameID = lin->m_gameID;
|
|
win->m_unGameIP = lin->m_unGameIP;
|
|
win->m_usGamePort = lin->m_usGamePort;
|
|
win->m_usQueryPort = lin->m_usQueryPort;
|
|
win->m_steamIDLobby = lin->m_steamIDLobby;
|
|
}
|
|
|
|
#pragma pack( push, 8 )
|
|
struct winservernetadr_t_112 {
|
|
uint16 m_usConnectionPort;
|
|
uint16 m_usQueryPort;
|
|
uint32 m_unIP;
|
|
} __attribute__ ((ms_struct));
|
|
#pragma pack( pop )
|
|
void win_to_lin_struct_servernetadr_t_112(void *w, void *l)
|
|
{
|
|
servernetadr_t *lin = (servernetadr_t *)l;
|
|
struct winservernetadr_t_112 *win = (struct winservernetadr_t_112 *)w;
|
|
lin->m_usConnectionPort = win->m_usConnectionPort;
|
|
lin->m_usQueryPort = win->m_usQueryPort;
|
|
lin->m_unIP = win->m_unIP;
|
|
}
|
|
|
|
void lin_to_win_struct_servernetadr_t_112(void *l, void *w)
|
|
{
|
|
servernetadr_t *lin = (servernetadr_t *)l;
|
|
struct winservernetadr_t_112 *win = (struct winservernetadr_t_112 *)w;
|
|
win->m_usConnectionPort = lin->m_usConnectionPort;
|
|
win->m_usQueryPort = lin->m_usQueryPort;
|
|
win->m_unIP = lin->m_unIP;
|
|
}
|
|
|
|
#pragma pack( push, 8 )
|
|
struct wingameserveritem_t_112 {
|
|
servernetadr_t m_NetAdr;
|
|
int m_nPing;
|
|
bool m_bHadSuccessfulResponse;
|
|
bool m_bDoNotRefresh;
|
|
char m_szGameDir[32];
|
|
char m_szMap[32];
|
|
char m_szGameDescription[64];
|
|
uint32 m_nAppID;
|
|
int m_nPlayers;
|
|
int m_nMaxPlayers;
|
|
int m_nBotPlayers;
|
|
bool m_bPassword;
|
|
bool m_bSecure;
|
|
uint32 m_ulTimeLastPlayed;
|
|
int m_nServerVersion;
|
|
char m_szServerName[64];
|
|
char m_szGameTags[128];
|
|
CSteamID m_steamID;
|
|
} __attribute__ ((ms_struct));
|
|
#pragma pack( pop )
|
|
void win_to_lin_struct_gameserveritem_t_112(void *w, void *l)
|
|
{
|
|
gameserveritem_t *lin = (gameserveritem_t *)l;
|
|
struct wingameserveritem_t_112 *win = (struct wingameserveritem_t_112 *)w;
|
|
win_to_lin_struct_servernetadr_t_112(&win->m_NetAdr, &lin->m_NetAdr);
|
|
lin->m_nPing = win->m_nPing;
|
|
lin->m_bHadSuccessfulResponse = win->m_bHadSuccessfulResponse;
|
|
lin->m_bDoNotRefresh = win->m_bDoNotRefresh;
|
|
memcpy(lin->m_szGameDir, win->m_szGameDir, sizeof(lin->m_szGameDir));
|
|
memcpy(lin->m_szMap, win->m_szMap, sizeof(lin->m_szMap));
|
|
memcpy(lin->m_szGameDescription, win->m_szGameDescription, sizeof(lin->m_szGameDescription));
|
|
lin->m_nAppID = win->m_nAppID;
|
|
lin->m_nPlayers = win->m_nPlayers;
|
|
lin->m_nMaxPlayers = win->m_nMaxPlayers;
|
|
lin->m_nBotPlayers = win->m_nBotPlayers;
|
|
lin->m_bPassword = win->m_bPassword;
|
|
lin->m_bSecure = win->m_bSecure;
|
|
lin->m_ulTimeLastPlayed = win->m_ulTimeLastPlayed;
|
|
lin->m_nServerVersion = win->m_nServerVersion;
|
|
memcpy(lin->m_szServerName, win->m_szServerName, sizeof(lin->m_szServerName));
|
|
memcpy(lin->m_szGameTags, win->m_szGameTags, sizeof(lin->m_szGameTags));
|
|
lin->m_steamID = win->m_steamID;
|
|
}
|
|
|
|
void lin_to_win_struct_gameserveritem_t_112(void *l, void *w)
|
|
{
|
|
gameserveritem_t *lin = (gameserveritem_t *)l;
|
|
struct wingameserveritem_t_112 *win = (struct wingameserveritem_t_112 *)w;
|
|
lin_to_win_struct_servernetadr_t_112(&lin->m_NetAdr, &win->m_NetAdr);
|
|
win->m_nPing = lin->m_nPing;
|
|
win->m_bHadSuccessfulResponse = lin->m_bHadSuccessfulResponse;
|
|
win->m_bDoNotRefresh = lin->m_bDoNotRefresh;
|
|
memcpy(win->m_szGameDir, lin->m_szGameDir, sizeof(win->m_szGameDir));
|
|
memcpy(win->m_szMap, lin->m_szMap, sizeof(win->m_szMap));
|
|
memcpy(win->m_szGameDescription, lin->m_szGameDescription, sizeof(win->m_szGameDescription));
|
|
win->m_nAppID = lin->m_nAppID;
|
|
win->m_nPlayers = lin->m_nPlayers;
|
|
win->m_nMaxPlayers = lin->m_nMaxPlayers;
|
|
win->m_nBotPlayers = lin->m_nBotPlayers;
|
|
win->m_bPassword = lin->m_bPassword;
|
|
win->m_bSecure = lin->m_bSecure;
|
|
win->m_ulTimeLastPlayed = lin->m_ulTimeLastPlayed;
|
|
win->m_nServerVersion = lin->m_nServerVersion;
|
|
memcpy(win->m_szServerName, lin->m_szServerName, sizeof(win->m_szServerName));
|
|
memcpy(win->m_szGameTags, lin->m_szGameTags, sizeof(win->m_szGameTags));
|
|
win->m_steamID = lin->m_steamID;
|
|
}
|
|
|
|
#pragma pack( push, 8 )
|
|
struct winLobbyInvite_t_16 {
|
|
uint64 m_ulSteamIDUser;
|
|
uint64 m_ulSteamIDLobby;
|
|
} __attribute__ ((ms_struct));
|
|
#pragma pack( pop )
|
|
void cb_LobbyInvite_t_16(void *l, void *w)
|
|
{
|
|
LobbyInvite_t *lin = (LobbyInvite_t *)l;
|
|
struct winLobbyInvite_t_16 *win = (struct winLobbyInvite_t_16 *)w;
|
|
win->m_ulSteamIDUser = lin->m_ulSteamIDUser;
|
|
win->m_ulSteamIDLobby = lin->m_ulSteamIDLobby;
|
|
}
|
|
|
|
#pragma pack( push, 8 )
|
|
struct winLeaderboardEntry_t_112 {
|
|
CSteamID m_steamIDUser;
|
|
int32 m_nGlobalRank;
|
|
int32 m_nScore;
|
|
int32 m_cDetails;
|
|
UGCHandle_t m_hUGC;
|
|
} __attribute__ ((ms_struct));
|
|
#pragma pack( pop )
|
|
void win_to_lin_struct_LeaderboardEntry_t_112(void *w, void *l)
|
|
{
|
|
LeaderboardEntry_t *lin = (LeaderboardEntry_t *)l;
|
|
struct winLeaderboardEntry_t_112 *win = (struct winLeaderboardEntry_t_112 *)w;
|
|
lin->m_steamIDUser = win->m_steamIDUser;
|
|
lin->m_nGlobalRank = win->m_nGlobalRank;
|
|
lin->m_nScore = win->m_nScore;
|
|
lin->m_cDetails = win->m_cDetails;
|
|
lin->m_hUGC = win->m_hUGC;
|
|
}
|
|
|
|
void lin_to_win_struct_LeaderboardEntry_t_112(void *l, void *w)
|
|
{
|
|
LeaderboardEntry_t *lin = (LeaderboardEntry_t *)l;
|
|
struct winLeaderboardEntry_t_112 *win = (struct winLeaderboardEntry_t_112 *)w;
|
|
win->m_steamIDUser = lin->m_steamIDUser;
|
|
win->m_nGlobalRank = lin->m_nGlobalRank;
|
|
win->m_nScore = lin->m_nScore;
|
|
win->m_cDetails = lin->m_cDetails;
|
|
win->m_hUGC = lin->m_hUGC;
|
|
}
|
|
|
|
#pragma pack( push, 8 )
|
|
struct winP2PSessionState_t_112 {
|
|
uint8 m_bConnectionActive;
|
|
uint8 m_bConnecting;
|
|
uint8 m_eP2PSessionError;
|
|
uint8 m_bUsingRelay;
|
|
int32 m_nBytesQueuedForSend;
|
|
int32 m_nPacketsQueuedForSend;
|
|
uint32 m_nRemoteIP;
|
|
uint16 m_nRemotePort;
|
|
} __attribute__ ((ms_struct));
|
|
#pragma pack( pop )
|
|
void win_to_lin_struct_P2PSessionState_t_112(void *w, void *l)
|
|
{
|
|
P2PSessionState_t *lin = (P2PSessionState_t *)l;
|
|
struct winP2PSessionState_t_112 *win = (struct winP2PSessionState_t_112 *)w;
|
|
lin->m_bConnectionActive = win->m_bConnectionActive;
|
|
lin->m_bConnecting = win->m_bConnecting;
|
|
lin->m_eP2PSessionError = win->m_eP2PSessionError;
|
|
lin->m_bUsingRelay = win->m_bUsingRelay;
|
|
lin->m_nBytesQueuedForSend = win->m_nBytesQueuedForSend;
|
|
lin->m_nPacketsQueuedForSend = win->m_nPacketsQueuedForSend;
|
|
lin->m_nRemoteIP = win->m_nRemoteIP;
|
|
lin->m_nRemotePort = win->m_nRemotePort;
|
|
}
|
|
|
|
void lin_to_win_struct_P2PSessionState_t_112(void *l, void *w)
|
|
{
|
|
P2PSessionState_t *lin = (P2PSessionState_t *)l;
|
|
struct winP2PSessionState_t_112 *win = (struct winP2PSessionState_t_112 *)w;
|
|
win->m_bConnectionActive = lin->m_bConnectionActive;
|
|
win->m_bConnecting = lin->m_bConnecting;
|
|
win->m_eP2PSessionError = lin->m_eP2PSessionError;
|
|
win->m_bUsingRelay = lin->m_bUsingRelay;
|
|
win->m_nBytesQueuedForSend = lin->m_nBytesQueuedForSend;
|
|
win->m_nPacketsQueuedForSend = lin->m_nPacketsQueuedForSend;
|
|
win->m_nRemoteIP = lin->m_nRemoteIP;
|
|
win->m_nRemotePort = lin->m_nRemotePort;
|
|
}
|
|
|
|
#pragma pack( push, 8 )
|
|
struct winSteamPS3Params_t_112 {
|
|
void * pReserved;
|
|
AppId_t m_nAppId;
|
|
char m_rgchInstallationPath[1055];
|
|
char m_rgchSystemCache[1055];
|
|
char m_rgchGameData[1055];
|
|
char m_rgchNpServiceID[32];
|
|
unsigned int m_cSteamInputTTY;
|
|
struct Ps3netInit_t m_sysNetInitInfo;
|
|
struct Ps3jpgInit_t m_sysJpgInitInfo;
|
|
} __attribute__ ((ms_struct));
|
|
#pragma pack( pop )
|
|
void win_to_lin_struct_SteamPS3Params_t_112(void *w, void *l)
|
|
{
|
|
SteamPS3Params_t *lin = (SteamPS3Params_t *)l;
|
|
struct winSteamPS3Params_t_112 *win = (struct winSteamPS3Params_t_112 *)w;
|
|
lin->pReserved = win->pReserved;
|
|
lin->m_nAppId = win->m_nAppId;
|
|
memcpy(lin->m_rgchInstallationPath, win->m_rgchInstallationPath, sizeof(lin->m_rgchInstallationPath));
|
|
memcpy(lin->m_rgchSystemCache, win->m_rgchSystemCache, sizeof(lin->m_rgchSystemCache));
|
|
memcpy(lin->m_rgchGameData, win->m_rgchGameData, sizeof(lin->m_rgchGameData));
|
|
memcpy(lin->m_rgchNpServiceID, win->m_rgchNpServiceID, sizeof(lin->m_rgchNpServiceID));
|
|
lin->m_cSteamInputTTY = win->m_cSteamInputTTY;
|
|
lin->m_sysNetInitInfo = win->m_sysNetInitInfo;
|
|
lin->m_sysJpgInitInfo = win->m_sysJpgInitInfo;
|
|
}
|
|
|
|
void lin_to_win_struct_SteamPS3Params_t_112(void *l, void *w)
|
|
{
|
|
SteamPS3Params_t *lin = (SteamPS3Params_t *)l;
|
|
struct winSteamPS3Params_t_112 *win = (struct winSteamPS3Params_t_112 *)w;
|
|
win->pReserved = lin->pReserved;
|
|
win->m_nAppId = lin->m_nAppId;
|
|
memcpy(win->m_rgchInstallationPath, lin->m_rgchInstallationPath, sizeof(win->m_rgchInstallationPath));
|
|
memcpy(win->m_rgchSystemCache, lin->m_rgchSystemCache, sizeof(win->m_rgchSystemCache));
|
|
memcpy(win->m_rgchGameData, lin->m_rgchGameData, sizeof(win->m_rgchGameData));
|
|
memcpy(win->m_rgchNpServiceID, lin->m_rgchNpServiceID, sizeof(win->m_rgchNpServiceID));
|
|
win->m_cSteamInputTTY = lin->m_cSteamInputTTY;
|
|
win->m_sysNetInitInfo = lin->m_sysNetInitInfo;
|
|
win->m_sysJpgInitInfo = lin->m_sysJpgInitInfo;
|
|
}
|
|
|
|
#pragma pack( push, 8 )
|
|
struct winCCallbackBase_112 {
|
|
uint8 m_nCallbackFlags;
|
|
int m_iCallback;
|
|
} __attribute__ ((ms_struct));
|
|
#pragma pack( pop )
|
|
void win_to_lin_struct_CCallbackBase_112(void *w, void *l)
|
|
{
|
|
CCallbackBase *lin = (CCallbackBase *)l;
|
|
struct winCCallbackBase_112 *win = (struct winCCallbackBase_112 *)w;
|
|
lin->m_nCallbackFlags = win->m_nCallbackFlags;
|
|
lin->m_iCallback = win->m_iCallback;
|
|
}
|
|
|
|
void lin_to_win_struct_CCallbackBase_112(void *l, void *w)
|
|
{
|
|
CCallbackBase *lin = (CCallbackBase *)l;
|
|
struct winCCallbackBase_112 *win = (struct winCCallbackBase_112 *)w;
|
|
win->m_nCallbackFlags = lin->m_nCallbackFlags;
|
|
win->m_iCallback = lin->m_iCallback;
|
|
}
|
|
|
|
|
|
}
|