Reformat code
This commit is contained in:
parent
c3383032af
commit
8308b72e96
@ -98,7 +98,7 @@ workspace "open-iw5"
|
||||
pchsource "src/std_include.cpp"
|
||||
|
||||
linkoptions "/IGNORE:4254 /DYNAMICBASE:NO /SAFESEH:NO /LARGEADDRESSAWARE"
|
||||
linkoptions "/LAST:.zdata"
|
||||
linkoptions "/LAST:.main"
|
||||
|
||||
|
||||
files {
|
||||
|
@ -36,7 +36,7 @@ namespace binary_loader
|
||||
return {};
|
||||
}
|
||||
|
||||
std::string load_base(bool verify = true)
|
||||
std::string load_base(const bool verify = true)
|
||||
{
|
||||
std::string data;
|
||||
if (!utils::io::read_file("iw5mp_server.exe", &data))
|
||||
@ -87,7 +87,8 @@ namespace binary_loader
|
||||
|
||||
std::string build_binary(const std::string& base, const std::string& diff)
|
||||
{
|
||||
const auto* size = reinterpret_cast<const unsigned long long*>(diff.data() + diff.size() - sizeof(unsigned long long));
|
||||
const auto* size = reinterpret_cast<const unsigned long long*>(diff.data() + diff.size() - sizeof(unsigned long
|
||||
long));
|
||||
|
||||
std::string binary;
|
||||
binary.resize(size_t(*size));
|
||||
|
@ -5,7 +5,6 @@
|
||||
|
||||
loader::loader(const launcher::mode mode) : mode_(mode)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
FARPROC loader::load(const utils::nt::module& module) const
|
||||
@ -23,18 +22,21 @@ FARPROC loader::load(const utils::nt::module& module) const
|
||||
{
|
||||
const IMAGE_TLS_DIRECTORY* target_tls = reinterpret_cast<PIMAGE_TLS_DIRECTORY>(module.get_ptr() + module
|
||||
.get_optional_header()
|
||||
->DataDirectory
|
||||
->
|
||||
DataDirectory
|
||||
[IMAGE_DIRECTORY_ENTRY_TLS].VirtualAddress);
|
||||
const IMAGE_TLS_DIRECTORY* source_tls = reinterpret_cast<PIMAGE_TLS_DIRECTORY>(module.get_ptr() + source
|
||||
.get_optional_header()
|
||||
->DataDirectory
|
||||
->
|
||||
DataDirectory
|
||||
[IMAGE_DIRECTORY_ENTRY_TLS].VirtualAddress);
|
||||
|
||||
*reinterpret_cast<DWORD*>(source_tls->AddressOfIndex) = 0;
|
||||
|
||||
DWORD old_protect;
|
||||
VirtualProtect(PVOID(target_tls->StartAddressOfRawData),
|
||||
source_tls->EndAddressOfRawData - source_tls->StartAddressOfRawData, PAGE_READWRITE, &old_protect);
|
||||
source_tls->EndAddressOfRawData - source_tls->StartAddressOfRawData, PAGE_READWRITE,
|
||||
&old_protect);
|
||||
|
||||
const auto tls_base = *reinterpret_cast<LPVOID*>(__readfsdword(0x2C));
|
||||
std::memmove(tls_base, PVOID(source_tls->StartAddressOfRawData),
|
||||
@ -142,7 +144,8 @@ void loader::load_imports(const utils::nt::module& target, const utils::nt::modu
|
||||
|
||||
if (!function)
|
||||
{
|
||||
throw std::runtime_error(utils::string::va("Unable to load import '%s' from module '%s'", function_name.data(), name.data()));
|
||||
throw std::runtime_error(utils::string::va("Unable to load import '%s' from module '%s'",
|
||||
function_name.data(), name.data()));
|
||||
}
|
||||
|
||||
*address_table_entry = reinterpret_cast<uintptr_t>(function);
|
||||
|
@ -5,7 +5,7 @@
|
||||
class loader final
|
||||
{
|
||||
public:
|
||||
loader(launcher::mode mode);
|
||||
explicit loader(launcher::mode mode);
|
||||
|
||||
FARPROC load(const utils::nt::module& module) const;
|
||||
|
||||
@ -15,8 +15,8 @@ private:
|
||||
launcher::mode mode_;
|
||||
std::function<FARPROC(const std::string&, const std::string&)> import_resolver_;
|
||||
|
||||
static void load_section(const utils::nt::module& target, const utils::nt::module& source, IMAGE_SECTION_HEADER* section);
|
||||
static void load_section(const utils::nt::module& target, const utils::nt::module& source,
|
||||
IMAGE_SECTION_HEADER* section);
|
||||
void load_sections(const utils::nt::module& target, const utils::nt::module& source) const;
|
||||
void load_imports(const utils::nt::module& target, const utils::nt::module& source) const;
|
||||
|
||||
};
|
||||
|
@ -1,10 +1,17 @@
|
||||
#pragma once
|
||||
#include "launcher/launcher.hpp"
|
||||
|
||||
class module
|
||||
{
|
||||
public:
|
||||
virtual ~module() {};
|
||||
virtual void post_load() {}
|
||||
virtual void pre_destroy() {}
|
||||
virtual ~module()
|
||||
{
|
||||
}
|
||||
|
||||
virtual void post_load()
|
||||
{
|
||||
}
|
||||
|
||||
virtual void pre_destroy()
|
||||
{
|
||||
}
|
||||
};
|
||||
|
@ -5,7 +5,7 @@ class module_loader final
|
||||
{
|
||||
public:
|
||||
template <typename T>
|
||||
class installer
|
||||
class installer final
|
||||
{
|
||||
static_assert(std::is_base_of<module, T>::value, "Module has invalid base class");
|
||||
|
||||
|
@ -19,48 +19,65 @@ public:
|
||||
|
||||
utils::hook::signature signature(0x401000, 0x3E1000);
|
||||
|
||||
signature.add({ "\x56\xE8\x00\x00\x00\x00\x8B\xF0\xE8\x00\x00\x00\x00\x50\x56\xE8", "xx????xxx????xxx", [](char* address)
|
||||
signature.add({
|
||||
"\x56\xE8\x00\x00\x00\x00\x8B\xF0\xE8\x00\x00\x00\x00\x50\x56\xE8", "xx????xxx????xxx", [](char* address)
|
||||
{
|
||||
utils::hook::set<DWORD>(address, 0xC301B0);
|
||||
} });
|
||||
}
|
||||
});
|
||||
|
||||
// Generic killer caller.
|
||||
signature.add({ "\x55\x8B\xEC\x80\x7D\x08\x00\x75\x55", "xxxxxx?xx", []( char* address)
|
||||
signature.add({
|
||||
"\x55\x8B\xEC\x80\x7D\x08\x00\x75\x55", "xxxxxx?xx", [](char* address)
|
||||
{
|
||||
utils::hook::set<DWORD>(address, 0xC301B0);
|
||||
} });
|
||||
}
|
||||
});
|
||||
|
||||
// CEG initialization.
|
||||
signature.add({ "\x55\x8B\xEC\x83\xEC\x18\x53\x56\x57\xE8\x00\x00\x00\x00", "xxxxxxxxxx????", [](char* address)
|
||||
signature.add({
|
||||
"\x55\x8B\xEC\x83\xEC\x18\x53\x56\x57\xE8\x00\x00\x00\x00", "xxxxxxxxxx????", [](char* address)
|
||||
{
|
||||
utils::hook::set<BYTE>(address, 0xC3);
|
||||
} });
|
||||
}
|
||||
});
|
||||
|
||||
// Some odd trap.
|
||||
signature.add({ "\x55\x8B\xEC\x81\xEC\x00\x00\x00\x00\x53\x56\x57\x8B\x3D", "xxxxx??xxxxxxx", [](char* address)
|
||||
signature.add({
|
||||
"\x55\x8B\xEC\x81\xEC\x00\x00\x00\x00\x53\x56\x57\x8B\x3D", "xxxxx??xxxxxxx", [](char* address)
|
||||
{
|
||||
utils::hook::set<DWORD>(address, 0xC301B0);
|
||||
} });
|
||||
}
|
||||
});
|
||||
|
||||
// Custom shit
|
||||
signature.add({ "\x55\x8B\xEC\x68\x00\x00\x00\x00\x68\x00\x00\x00\x00\x64\xFF\x35\x00\x00\x00\x00\x64\x89\x25\x00\x00\x00\x00\xE8", "xxxx????x????xxx????xxx????x", [](char* address)
|
||||
signature.add({
|
||||
"\x55\x8B\xEC\x68\x00\x00\x00\x00\x68\x00\x00\x00\x00\x64\xFF\x35\x00\x00\x00\x00\x64\x89\x25\x00\x00\x00\x00\xE8",
|
||||
"xxxx????x????xxx????xxx????x", [](char* address)
|
||||
{
|
||||
utils::hook::set<BYTE>(address, 0xC3);
|
||||
} });
|
||||
}
|
||||
});
|
||||
|
||||
// hkcr guid check
|
||||
signature.add({ "\x55\x8B\xEC\xB8\x00\x00\x00\x00\xE8\x00\x00\x00\x00\xE8\x00\x00\x00\x00\x84\xC0\x75\x06", "xxxx????x????x????xxxx", [](char* address)
|
||||
signature.add({
|
||||
"\x55\x8B\xEC\xB8\x00\x00\x00\x00\xE8\x00\x00\x00\x00\xE8\x00\x00\x00\x00\x84\xC0\x75\x06",
|
||||
"xxxx????x????x????xxxx", [](char* address)
|
||||
{
|
||||
utils::hook::nop(address + 0xD, 5); // Call
|
||||
utils::hook::nop(address + 0x14, 2); // Jump
|
||||
} });
|
||||
}
|
||||
});
|
||||
|
||||
// hkcr guid check 2
|
||||
signature.add({ "\x55\x8B\xEC\x81\xEC\x00\x00\x00\x00\xE8\x00\x00\x00\x00\x84\xC0\x75\x06", "xxxxx????x????xxxx", [](char* address)
|
||||
signature.add({
|
||||
"\x55\x8B\xEC\x81\xEC\x00\x00\x00\x00\xE8\x00\x00\x00\x00\x84\xC0\x75\x06", "xxxxx????x????xxxx", [
|
||||
](char* address)
|
||||
{
|
||||
utils::hook::nop(address + 0x9, 5); // Call
|
||||
utils::hook::nop(address + 0x10, 2); // Jump
|
||||
} });
|
||||
}
|
||||
});
|
||||
|
||||
signature.process();
|
||||
|
||||
@ -70,7 +87,7 @@ public:
|
||||
// Some value obfuscation
|
||||
utils::hook(0x493B81, 0x493BFC, HOOK_JUMP).install()->quick();
|
||||
|
||||
// Ceg uninit
|
||||
// CEG uninitialization
|
||||
utils::hook::set<BYTE>(0x527110, 0xC3);
|
||||
}
|
||||
};
|
||||
|
@ -2,17 +2,15 @@
|
||||
|
||||
#pragma comment(linker, "/merge:.data=.cld")
|
||||
#pragma comment(linker, "/merge:.rdata=.clr")
|
||||
#pragma comment(linker, "/merge:.cl=.zdata")
|
||||
#pragma comment(linker, "/merge:.text=.zdata")
|
||||
#pragma comment(linker, "/section:.zdata,re")
|
||||
#pragma comment(linker, "/merge:.cl=.main")
|
||||
#pragma comment(linker, "/merge:.text=.main")
|
||||
#pragma comment(linker, "/section:.main,re")
|
||||
#pragma comment(linker, "/base:0x400000")
|
||||
|
||||
__declspec(thread) char tls_data[0x2000];
|
||||
|
||||
#pragma bss_seg(".cdummy")
|
||||
char dummy_seg[BINARY_PAYLOAD_SIZE];
|
||||
#pragma bss_seg(".payload")
|
||||
char payload_data[BINARY_PAYLOAD_SIZE];
|
||||
|
||||
char stub_seg[0x100000];
|
||||
|
||||
#pragma data_seg(".zdata")
|
||||
char zdata[200] = { 1 };
|
||||
#pragma data_seg(".main")
|
||||
char main_data[200] = {1};
|
||||
|
@ -58,7 +58,8 @@ namespace steam
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool apps::BGetDLCDataByIndex(int iDLC, unsigned int *pAppID, bool *pbAvailable, char *pchName, int cchNameBufferSize)
|
||||
bool apps::BGetDLCDataByIndex(int iDLC, unsigned int* pAppID, bool* pbAvailable, char* pchName,
|
||||
int cchNameBufferSize)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -16,7 +16,8 @@ namespace steam
|
||||
virtual unsigned int GetEarliestPurchaseUnixTime(unsigned int nAppID);
|
||||
virtual bool BIsSubscribedFromFreeWeekend();
|
||||
virtual int GetDLCCount();
|
||||
virtual bool BGetDLCDataByIndex(int iDLC, unsigned int *pAppID, bool *pbAvailable, char *pchName, int cchNameBufferSize);
|
||||
virtual bool BGetDLCDataByIndex(int iDLC, unsigned int* pAppID, bool* pbAvailable, char* pchName,
|
||||
int cchNameBufferSize);
|
||||
virtual void InstallDLC(unsigned int nAppID);
|
||||
virtual void UninstallDLC(unsigned int nAppID);
|
||||
};
|
||||
|
@ -10,7 +10,6 @@ namespace steam
|
||||
|
||||
void friends::SetPersonaName(const char* pchPersonaName)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int friends::GetPersonaState()
|
||||
|
@ -26,7 +26,8 @@ namespace steam
|
||||
return steam_id();
|
||||
}
|
||||
|
||||
bool game_server::SendUserConnectAndAuthenticate(unsigned int unIPClient, const void *pvAuthBlob, unsigned int cubAuthBlobSize, steam_id *pSteamIDUser)
|
||||
bool game_server::SendUserConnectAndAuthenticate(unsigned int unIPClient, const void* pvAuthBlob,
|
||||
unsigned int cubAuthBlobSize, steam_id* pSteamIDUser)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -45,12 +46,15 @@ namespace steam
|
||||
return true;
|
||||
}
|
||||
|
||||
bool game_server::SetServerType(unsigned int unServerFlags, unsigned int unGameIP, unsigned short unGamePort, unsigned short unSpectatorPort, unsigned short usQueryPort, const char *pchGameDir, const char *pchVersion, bool bLANMode)
|
||||
bool game_server::SetServerType(unsigned int unServerFlags, unsigned int unGameIP, unsigned short unGamePort,
|
||||
unsigned short unSpectatorPort, unsigned short usQueryPort, const char* pchGameDir,
|
||||
const char* pchVersion, bool bLANMode)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void game_server::UpdateServerStatus(int cPlayers, int cPlayersMax, int cBotPlayers, const char *pchServerName, const char *pSpectatorServerName, const char *pchMapName)
|
||||
void game_server::UpdateServerStatus(int cPlayers, int cPlayersMax, int cBotPlayers, const char* pchServerName,
|
||||
const char* pSpectatorServerName, const char* pchMapName)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -10,12 +10,16 @@ namespace steam
|
||||
virtual bool LoggedOn();
|
||||
virtual bool Secure();
|
||||
virtual steam_id GetSteamID();
|
||||
virtual bool SendUserConnectAndAuthenticate(unsigned int unIPClient, const void *pvAuthBlob, unsigned int cubAuthBlobSize, steam_id *pSteamIDUser);
|
||||
virtual bool SendUserConnectAndAuthenticate(unsigned int unIPClient, const void* pvAuthBlob,
|
||||
unsigned int cubAuthBlobSize, steam_id* pSteamIDUser);
|
||||
virtual steam_id CreateUnauthenticatedUserConnection();
|
||||
virtual void SendUserDisconnect(steam_id steamIDUser);
|
||||
virtual bool UpdateUserData(steam_id steamIDUser, const char* pchPlayerName, unsigned int uScore);
|
||||
virtual bool SetServerType(unsigned int unServerFlags, unsigned int unGameIP, unsigned short unGamePort, unsigned short unSpectatorPort, unsigned short usQueryPort, const char *pchGameDir, const char *pchVersion, bool bLANMode);
|
||||
virtual void UpdateServerStatus(int cPlayers, int cPlayersMax, int cBotPlayers, const char *pchServerName, const char *pSpectatorServerName, const char *pchMapName);
|
||||
virtual bool SetServerType(unsigned int unServerFlags, unsigned int unGameIP, unsigned short unGamePort,
|
||||
unsigned short unSpectatorPort, unsigned short usQueryPort, const char* pchGameDir,
|
||||
const char* pchVersion, bool bLANMode);
|
||||
virtual void UpdateServerStatus(int cPlayers, int cPlayersMax, int cBotPlayers, const char* pchServerName,
|
||||
const char* pSpectatorServerName, const char* pchMapName);
|
||||
virtual void UpdateSpectatorPort(unsigned short unSpectatorPort);
|
||||
virtual void SetGameType(const char* pchGameType);
|
||||
virtual bool GetUserAchievementStatus(steam_id steamID, const char* pchAchievementName);
|
||||
|
@ -11,17 +11,22 @@ namespace steam
|
||||
{
|
||||
}
|
||||
|
||||
bool master_server_updater::HandleIncomingPacket(const void *pData, int cbData, unsigned int srcIP, unsigned short srcPort)
|
||||
bool master_server_updater::HandleIncomingPacket(const void* pData, int cbData, unsigned int srcIP,
|
||||
unsigned short srcPort)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
int master_server_updater::GetNextOutgoingPacket(void *pOut, int cbMaxOut, unsigned int *pNetAdr, unsigned short *pPort)
|
||||
int master_server_updater::GetNextOutgoingPacket(void* pOut, int cbMaxOut, unsigned int* pNetAdr,
|
||||
unsigned short* pPort)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void master_server_updater::SetBasicServerData(unsigned short nProtocolVersion, bool bDedicatedServer, const char *pRegionName, const char *pProductName, unsigned short nMaxReportedClients, bool bPasswordProtected, const char *pGameDescription)
|
||||
void master_server_updater::SetBasicServerData(unsigned short nProtocolVersion, bool bDedicatedServer,
|
||||
const char* pRegionName, const char* pProductName,
|
||||
unsigned short nMaxReportedClients, bool bPasswordProtected,
|
||||
const char* pGameDescription)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,9 @@ namespace steam
|
||||
virtual void SetHeartbeatInterval(int iHeartbeatInterval);
|
||||
virtual bool HandleIncomingPacket(const void* pData, int cbData, unsigned int srcIP, unsigned short srcPort);
|
||||
virtual int GetNextOutgoingPacket(void* pOut, int cbMaxOut, unsigned int* pNetAdr, unsigned short* pPort);
|
||||
virtual void SetBasicServerData(unsigned short nProtocolVersion, bool bDedicatedServer, const char *pRegionName, const char *pProductName, unsigned short nMaxReportedClients, bool bPasswordProtected, const char *pGameDescription);
|
||||
virtual void SetBasicServerData(unsigned short nProtocolVersion, bool bDedicatedServer, const char* pRegionName,
|
||||
const char* pProductName, unsigned short nMaxReportedClients,
|
||||
bool bPasswordProtected, const char* pGameDescription);
|
||||
virtual void ClearAllKeyValues();
|
||||
virtual void SetKeyValue(const char* pKey, const char* pValue);
|
||||
virtual void NotifyShutdown();
|
||||
|
@ -8,17 +8,22 @@ namespace steam
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool matchmaking::GetFavoriteGame(int iGame, unsigned int *pnAppID, unsigned int *pnIP, unsigned short *pnConnPort, unsigned short *pnQueryPort, unsigned int *punFlags, unsigned int *pRTime32LastPlayedOnServer)
|
||||
bool matchmaking::GetFavoriteGame(int iGame, unsigned int* pnAppID, unsigned int* pnIP, unsigned short* pnConnPort,
|
||||
unsigned short* pnQueryPort, unsigned int* punFlags,
|
||||
unsigned int* pRTime32LastPlayedOnServer)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
int matchmaking::AddFavoriteGame(unsigned int nAppID, unsigned int nIP, unsigned short nConnPort, unsigned short nQueryPort, unsigned int unFlags, unsigned int rTime32LastPlayedOnServer)
|
||||
int matchmaking::AddFavoriteGame(unsigned int nAppID, unsigned int nIP, unsigned short nConnPort,
|
||||
unsigned short nQueryPort, unsigned int unFlags,
|
||||
unsigned int rTime32LastPlayedOnServer)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool matchmaking::RemoveFavoriteGame(unsigned int nAppID, unsigned int nIP, unsigned short nConnPort, unsigned short nQueryPort, unsigned int unFlags)
|
||||
bool matchmaking::RemoveFavoriteGame(unsigned int nAppID, unsigned int nIP, unsigned short nConnPort,
|
||||
unsigned short nQueryPort, unsigned int unFlags)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -28,11 +33,13 @@ namespace steam
|
||||
return 0;
|
||||
}
|
||||
|
||||
void matchmaking::AddRequestLobbyListStringFilter(const char *pchKeyToMatch, const char *pchValueToMatch, int eComparisonType)
|
||||
void matchmaking::AddRequestLobbyListStringFilter(const char* pchKeyToMatch, const char* pchValueToMatch,
|
||||
int eComparisonType)
|
||||
{
|
||||
}
|
||||
|
||||
void matchmaking::AddRequestLobbyListNumericalFilter(const char *pchKeyToMatch, int nValueToMatch, int eComparisonType)
|
||||
void matchmaking::AddRequestLobbyListNumericalFilter(const char* pchKeyToMatch, int nValueToMatch,
|
||||
int eComparisonType)
|
||||
{
|
||||
}
|
||||
|
||||
@ -60,7 +67,8 @@ namespace steam
|
||||
unsigned __int64 matchmaking::CreateLobby(int eLobbyType, int cMaxMembers)
|
||||
{
|
||||
const auto result = callbacks::register_call();
|
||||
auto retvals = static_cast<lobby_created*>(calloc(1, sizeof(lobby_created)));//::Utils::Memory::AllocateArray<LobbyCreated>();
|
||||
auto retvals = static_cast<lobby_created*>(calloc(1, sizeof(lobby_created)));
|
||||
//::Utils::Memory::AllocateArray<LobbyCreated>();
|
||||
steam_id id;
|
||||
|
||||
id.raw.account_id = 1337132;
|
||||
@ -81,7 +89,8 @@ namespace steam
|
||||
unsigned __int64 matchmaking::JoinLobby(steam_id steamIDLobby)
|
||||
{
|
||||
const auto result = callbacks::register_call();
|
||||
auto* retvals = static_cast<lobby_enter*>(calloc(1, sizeof(lobby_enter)));//::Utils::Memory::AllocateArray<LobbyEnter>();
|
||||
auto* retvals = static_cast<lobby_enter*>(calloc(1, sizeof(lobby_enter)));
|
||||
//::Utils::Memory::AllocateArray<LobbyEnter>();
|
||||
retvals->m_b_locked = false;
|
||||
retvals->m_e_chat_room_enter_response = 1;
|
||||
retvals->m_rgf_chat_permissions = 0xFFFFFFFF;
|
||||
@ -127,7 +136,8 @@ namespace steam
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool matchmaking::GetLobbyDataByIndex(steam_id steamIDLobby, int iLobbyData, char *pchKey, int cchKeyBufferSize, char *pchValue, int cchValueBufferSize)
|
||||
bool matchmaking::GetLobbyDataByIndex(steam_id steamIDLobby, int iLobbyData, char* pchKey, int cchKeyBufferSize,
|
||||
char* pchValue, int cchValueBufferSize)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -151,7 +161,8 @@ namespace steam
|
||||
return true;
|
||||
}
|
||||
|
||||
int matchmaking::GetLobbyChatEntry(steam_id steamIDLobby, int iChatID, steam_id *pSteamIDUser, void *pvData, int cubData, int *peChatEntryType)
|
||||
int matchmaking::GetLobbyChatEntry(steam_id steamIDLobby, int iChatID, steam_id* pSteamIDUser, void* pvData,
|
||||
int cubData, int* peChatEntryType)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -161,11 +172,13 @@ namespace steam
|
||||
return false;
|
||||
}
|
||||
|
||||
void matchmaking::SetLobbyGameServer(steam_id steamIDLobby, unsigned int unGameServerIP, unsigned short unGameServerPort, steam_id steamIDGameServer)
|
||||
void matchmaking::SetLobbyGameServer(steam_id steamIDLobby, unsigned int unGameServerIP,
|
||||
unsigned short unGameServerPort, steam_id steamIDGameServer)
|
||||
{
|
||||
}
|
||||
|
||||
bool matchmaking::GetLobbyGameServer(steam_id steamIDLobby, unsigned int *punGameServerIP, unsigned short *punGameServerPort, steam_id *psteamIDGameServer)
|
||||
bool matchmaking::GetLobbyGameServer(steam_id steamIDLobby, unsigned int* punGameServerIP,
|
||||
unsigned short* punGameServerPort, steam_id* psteamIDGameServer)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -25,12 +25,19 @@ namespace steam
|
||||
{
|
||||
public:
|
||||
virtual int GetFavoriteGameCount();
|
||||
virtual bool GetFavoriteGame(int iGame, unsigned int *pnAppID, unsigned int *pnIP, unsigned short *pnConnPort, unsigned short *pnQueryPort, unsigned int *punFlags, unsigned int *pRTime32LastPlayedOnServer);
|
||||
virtual int AddFavoriteGame(unsigned int nAppID, unsigned int nIP, unsigned short nConnPort, unsigned short nQueryPort, unsigned int unFlags, unsigned int rTime32LastPlayedOnServer);
|
||||
virtual bool RemoveFavoriteGame(unsigned int nAppID, unsigned int nIP, unsigned short nConnPort, unsigned short nQueryPort, unsigned int unFlags);
|
||||
virtual bool GetFavoriteGame(int iGame, unsigned int* pnAppID, unsigned int* pnIP, unsigned short* pnConnPort,
|
||||
unsigned short* pnQueryPort, unsigned int* punFlags,
|
||||
unsigned int* pRTime32LastPlayedOnServer);
|
||||
virtual int AddFavoriteGame(unsigned int nAppID, unsigned int nIP, unsigned short nConnPort,
|
||||
unsigned short nQueryPort, unsigned int unFlags,
|
||||
unsigned int rTime32LastPlayedOnServer);
|
||||
virtual bool RemoveFavoriteGame(unsigned int nAppID, unsigned int nIP, unsigned short nConnPort,
|
||||
unsigned short nQueryPort, unsigned int unFlags);
|
||||
virtual unsigned __int64 RequestLobbyList();
|
||||
virtual void AddRequestLobbyListStringFilter(const char *pchKeyToMatch, const char *pchValueToMatch, int eComparisonType);
|
||||
virtual void AddRequestLobbyListNumericalFilter(const char *pchKeyToMatch, int nValueToMatch, int eComparisonType);
|
||||
virtual void AddRequestLobbyListStringFilter(const char* pchKeyToMatch, const char* pchValueToMatch,
|
||||
int eComparisonType);
|
||||
virtual void AddRequestLobbyListNumericalFilter(const char* pchKeyToMatch, int nValueToMatch,
|
||||
int eComparisonType);
|
||||
virtual void AddRequestLobbyListNearValueFilter(const char* pchKeyToMatch, int nValueToBeCloseTo);
|
||||
virtual void AddRequestLobbyListFilterSlotsAvailable(int nSlotsAvailable);
|
||||
virtual void AddRequestLobbyListDistanceFilter(int eLobbyDistanceFilter);
|
||||
@ -45,15 +52,19 @@ namespace steam
|
||||
virtual const char* GetLobbyData(steam_id steamIDLobby, const char* pchKey);
|
||||
virtual bool SetLobbyData(steam_id steamIDLobby, const char* pchKey, const char* pchValue);
|
||||
virtual int GetLobbyDataCount(steam_id steamIDLobby);
|
||||
virtual bool GetLobbyDataByIndex(steam_id steamIDLobby, int iLobbyData, char *pchKey, int cchKeyBufferSize, char *pchValue, int cchValueBufferSize);
|
||||
virtual bool GetLobbyDataByIndex(steam_id steamIDLobby, int iLobbyData, char* pchKey, int cchKeyBufferSize,
|
||||
char* pchValue, int cchValueBufferSize);
|
||||
virtual bool DeleteLobbyData(steam_id steamIDLobby, const char* pchKey);
|
||||
virtual const char* GetLobbyMemberData(steam_id steamIDLobby, steam_id steamIDUser, const char* pchKey);
|
||||
virtual void SetLobbyMemberData(steam_id steamIDLobby, const char* pchKey, const char* pchValue);
|
||||
virtual bool SendLobbyChatMsg(steam_id steamIDLobby, const void* pvMsgBody, int cubMsgBody);
|
||||
virtual int GetLobbyChatEntry(steam_id steamIDLobby, int iChatID, steam_id *pSteamIDUser, void *pvData, int cubData, int *peChatEntryType);
|
||||
virtual int GetLobbyChatEntry(steam_id steamIDLobby, int iChatID, steam_id* pSteamIDUser, void* pvData,
|
||||
int cubData, int* peChatEntryType);
|
||||
virtual bool RequestLobbyData(steam_id steamIDLobby);
|
||||
virtual void SetLobbyGameServer(steam_id steamIDLobby, unsigned int unGameServerIP, unsigned short unGameServerPort, steam_id steamIDGameServer);
|
||||
virtual bool GetLobbyGameServer(steam_id steamIDLobby, unsigned int *punGameServerIP, unsigned short *punGameServerPort, steam_id *psteamIDGameServer);
|
||||
virtual void SetLobbyGameServer(steam_id steamIDLobby, unsigned int unGameServerIP,
|
||||
unsigned short unGameServerPort, steam_id steamIDGameServer);
|
||||
virtual bool GetLobbyGameServer(steam_id steamIDLobby, unsigned int* punGameServerIP,
|
||||
unsigned short* punGameServerPort, steam_id* psteamIDGameServer);
|
||||
virtual bool SetLobbyMemberLimit(steam_id steamIDLobby, int cMaxMembers);
|
||||
virtual int GetLobbyMemberLimit(steam_id steamIDLobby);
|
||||
virtual bool SetLobbyType(steam_id steamIDLobby, int eLobbyType);
|
||||
|
@ -3,7 +3,8 @@
|
||||
|
||||
namespace steam
|
||||
{
|
||||
void* matchmaking_servers::RequestInternetServerList(unsigned int iApp, void **ppchFilters, unsigned int nFilters, void *pRequestServersResponse)
|
||||
void* matchmaking_servers::RequestInternetServerList(unsigned int iApp, void** ppchFilters, unsigned int nFilters,
|
||||
void* pRequestServersResponse)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
@ -13,22 +14,26 @@ namespace steam
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void* matchmaking_servers::RequestFriendsServerList(unsigned int iApp, void **ppchFilters, unsigned int nFilters, void *pRequestServersResponse)
|
||||
void* matchmaking_servers::RequestFriendsServerList(unsigned int iApp, void** ppchFilters, unsigned int nFilters,
|
||||
void* pRequestServersResponse)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void* matchmaking_servers::RequestFavoritesServerList(unsigned int iApp, void **ppchFilters, unsigned int nFilters, void *pRequestServersResponse)
|
||||
void* matchmaking_servers::RequestFavoritesServerList(unsigned int iApp, void** ppchFilters, unsigned int nFilters,
|
||||
void* pRequestServersResponse)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void* matchmaking_servers::RequestHistoryServerList(unsigned int iApp, void **ppchFilters, unsigned int nFilters, void *pRequestServersResponse)
|
||||
void* matchmaking_servers::RequestHistoryServerList(unsigned int iApp, void** ppchFilters, unsigned int nFilters,
|
||||
void* pRequestServersResponse)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void* matchmaking_servers::RequestSpectatorServerList(unsigned int iApp, void **ppchFilters, unsigned int nFilters, void *pRequestServersResponse)
|
||||
void* matchmaking_servers::RequestSpectatorServerList(unsigned int iApp, void** ppchFilters, unsigned int nFilters,
|
||||
void* pRequestServersResponse)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -5,12 +5,17 @@ namespace steam
|
||||
class matchmaking_servers final
|
||||
{
|
||||
public:
|
||||
virtual void* RequestInternetServerList(unsigned int iApp, void **ppchFilters, unsigned int nFilters, void *pRequestServersResponse);
|
||||
virtual void* RequestInternetServerList(unsigned int iApp, void** ppchFilters, unsigned int nFilters,
|
||||
void* pRequestServersResponse);
|
||||
virtual void* RequestLANServerList(unsigned int iApp, void* pRequestServersResponse);
|
||||
virtual void* RequestFriendsServerList(unsigned int iApp, void **ppchFilters, unsigned int nFilters, void *pRequestServersResponse);
|
||||
virtual void* RequestFavoritesServerList(unsigned int iApp, void **ppchFilters, unsigned int nFilters, void *pRequestServersResponse);
|
||||
virtual void* RequestHistoryServerList(unsigned int iApp, void **ppchFilters, unsigned int nFilters, void *pRequestServersResponse);
|
||||
virtual void* RequestSpectatorServerList(unsigned int iApp, void **ppchFilters, unsigned int nFilters, void *pRequestServersResponse);
|
||||
virtual void* RequestFriendsServerList(unsigned int iApp, void** ppchFilters, unsigned int nFilters,
|
||||
void* pRequestServersResponse);
|
||||
virtual void* RequestFavoritesServerList(unsigned int iApp, void** ppchFilters, unsigned int nFilters,
|
||||
void* pRequestServersResponse);
|
||||
virtual void* RequestHistoryServerList(unsigned int iApp, void** ppchFilters, unsigned int nFilters,
|
||||
void* pRequestServersResponse);
|
||||
virtual void* RequestSpectatorServerList(unsigned int iApp, void** ppchFilters, unsigned int nFilters,
|
||||
void* pRequestServersResponse);
|
||||
virtual void ReleaseRequest(void* hServerListRequest);
|
||||
virtual void* GetServerDetails(void* hRequest, int iServer);
|
||||
virtual void CancelQuery(void* hRequest);
|
||||
|
@ -13,7 +13,8 @@ namespace steam
|
||||
return false;
|
||||
}
|
||||
|
||||
bool networking::ReadP2PPacket(void *pubDest, unsigned int cubDest, unsigned int *pcubMsgSize, steam_id *psteamIDRemote)
|
||||
bool networking::ReadP2PPacket(void* pubDest, unsigned int cubDest, unsigned int* pcubMsgSize,
|
||||
steam_id* psteamIDRemote)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -43,12 +44,14 @@ namespace steam
|
||||
return false;
|
||||
}
|
||||
|
||||
unsigned int networking::CreateListenSocket(int nVirtualP2PPort, unsigned int nIP, unsigned short nPort, bool bAllowUseOfPacketRelay)
|
||||
unsigned int networking::CreateListenSocket(int nVirtualP2PPort, unsigned int nIP, unsigned short nPort,
|
||||
bool bAllowUseOfPacketRelay)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
unsigned int networking::CreateP2PConnectionSocket(steam_id steamIDTarget, int nVirtualPort, int nTimeoutSec, bool bAllowUseOfPacketRelay)
|
||||
unsigned int networking::CreateP2PConnectionSocket(steam_id steamIDTarget, int nVirtualPort, int nTimeoutSec,
|
||||
bool bAllowUseOfPacketRelay)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
@ -78,7 +81,8 @@ namespace steam
|
||||
return false;
|
||||
}
|
||||
|
||||
bool networking::RetrieveDataFromSocket(unsigned int hSocket, void *pubDest, unsigned int cubDest, unsigned int *pcubMsgSize)
|
||||
bool networking::RetrieveDataFromSocket(unsigned int hSocket, void* pubDest, unsigned int cubDest,
|
||||
unsigned int* pcubMsgSize)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -88,12 +92,14 @@ namespace steam
|
||||
return false;
|
||||
}
|
||||
|
||||
bool networking::RetrieveData(unsigned int hListenSocket, void *pubDest, unsigned int cubDest, unsigned int *pcubMsgSize, unsigned int *phSocket)
|
||||
bool networking::RetrieveData(unsigned int hListenSocket, void* pubDest, unsigned int cubDest,
|
||||
unsigned int* pcubMsgSize, unsigned int* phSocket)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool networking::GetSocketInfo(unsigned int hSocket, steam_id *pSteamIDRemote, int *peSocketStatus, unsigned int *punIPRemote, unsigned short *punPortRemote)
|
||||
bool networking::GetSocketInfo(unsigned int hSocket, steam_id* pSteamIDRemote, int* peSocketStatus,
|
||||
unsigned int* punIPRemote, unsigned short* punPortRemote)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -7,23 +7,29 @@ namespace steam
|
||||
public:
|
||||
virtual bool SendP2PPacket(steam_id steamIDRemote, const void* pubData, unsigned int cubData, int eP2PSendType);
|
||||
virtual bool IsP2PPacketAvailable(unsigned int* pcubMsgSize, int idk);
|
||||
virtual bool ReadP2PPacket(void *pubDest, unsigned int cubDest, unsigned int *pcubMsgSize, steam_id *psteamIDRemote);
|
||||
virtual bool ReadP2PPacket(void* pubDest, unsigned int cubDest, unsigned int* pcubMsgSize,
|
||||
steam_id* psteamIDRemote);
|
||||
virtual bool AcceptP2PSessionWithUser(steam_id steamIDRemote);
|
||||
virtual bool CloseP2PSessionWithUser(steam_id steamIDRemote);
|
||||
virtual bool CloseP2PChannelWithUser(steam_id steamIDRemote, int iVirtualPort);
|
||||
virtual bool GetP2PSessionState(steam_id steamIDRemote, void* pConnectionState);
|
||||
virtual bool AllowP2PPacketRelay(bool bAllow);
|
||||
virtual unsigned int CreateListenSocket(int nVirtualP2PPort, unsigned int nIP, unsigned short nPort, bool bAllowUseOfPacketRelay);
|
||||
virtual unsigned int CreateP2PConnectionSocket(steam_id steamIDTarget, int nVirtualPort, int nTimeoutSec, bool bAllowUseOfPacketRelay);
|
||||
virtual unsigned int CreateListenSocket(int nVirtualP2PPort, unsigned int nIP, unsigned short nPort,
|
||||
bool bAllowUseOfPacketRelay);
|
||||
virtual unsigned int CreateP2PConnectionSocket(steam_id steamIDTarget, int nVirtualPort, int nTimeoutSec,
|
||||
bool bAllowUseOfPacketRelay);
|
||||
virtual unsigned int CreateConnectionSocket(unsigned int nIP, unsigned short nPort, int nTimeoutSec);
|
||||
virtual bool DestroySocket(unsigned int hSocket, bool bNotifyRemoteEnd);
|
||||
virtual bool DestroyListenSocket(unsigned int hSocket, bool bNotifyRemoteEnd);
|
||||
virtual bool SendDataOnSocket(unsigned int hSocket, void* pubData, unsigned int cubData, bool bReliable);
|
||||
virtual bool IsDataAvailableOnSocket(unsigned int hSocket, unsigned int* pcubMsgSize);
|
||||
virtual bool RetrieveDataFromSocket(unsigned int hSocket, void *pubDest, unsigned int cubDest, unsigned int *pcubMsgSize);
|
||||
virtual bool RetrieveDataFromSocket(unsigned int hSocket, void* pubDest, unsigned int cubDest,
|
||||
unsigned int* pcubMsgSize);
|
||||
virtual bool IsDataAvailable(unsigned int hListenSocket, unsigned int* pcubMsgSize, unsigned int* phSocket);
|
||||
virtual bool RetrieveData(unsigned int hListenSocket, void *pubDest, unsigned int cubDest, unsigned int *pcubMsgSize, unsigned int *phSocket);
|
||||
virtual bool GetSocketInfo(unsigned int hSocket, steam_id *pSteamIDRemote, int *peSocketStatus, unsigned int *punIPRemote, unsigned short *punPortRemote);
|
||||
virtual bool RetrieveData(unsigned int hListenSocket, void* pubDest, unsigned int cubDest,
|
||||
unsigned int* pcubMsgSize, unsigned int* phSocket);
|
||||
virtual bool GetSocketInfo(unsigned int hSocket, steam_id* pSteamIDRemote, int* peSocketStatus,
|
||||
unsigned int* punIPRemote, unsigned short* punPortRemote);
|
||||
virtual bool GetListenSocketInfo(unsigned int hListenSocket, unsigned int* pnIP, unsigned short* pnPort);
|
||||
virtual int GetSocketConnectionType(unsigned int hSocket);
|
||||
virtual int GetMaxPacketSize(unsigned int hSocket);
|
||||
|
@ -20,7 +20,8 @@ namespace steam
|
||||
return id;
|
||||
}
|
||||
|
||||
int user::InitiateGameConnection(void *pAuthBlob, int cbMaxAuthBlob, steam_id steamIDGameServer, unsigned int unIPServer, unsigned short usPortServer, bool bSecure)
|
||||
int user::InitiateGameConnection(void* pAuthBlob, int cbMaxAuthBlob, steam_id steamIDGameServer,
|
||||
unsigned int unIPServer, unsigned short usPortServer, bool bSecure)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -46,17 +47,22 @@ namespace steam
|
||||
{
|
||||
}
|
||||
|
||||
int user::GetAvailableVoice(unsigned int *pcbCompressed, unsigned int *pcbUncompressed, unsigned int nUncompressedVoiceDesiredSampleRate)
|
||||
int user::GetAvailableVoice(unsigned int* pcbCompressed, unsigned int* pcbUncompressed,
|
||||
unsigned int nUncompressedVoiceDesiredSampleRate)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int user::GetVoice(bool bWantCompressed, void *pDestBuffer, unsigned int cbDestBufferSize, unsigned int *nBytesWritten, bool bWantUncompressed, void *pUncompressedDestBuffer, unsigned int cbUncompressedDestBufferSize, unsigned int *nUncompressBytesWritten, unsigned int nUncompressedVoiceDesiredSampleRate)
|
||||
int user::GetVoice(bool bWantCompressed, void* pDestBuffer, unsigned int cbDestBufferSize,
|
||||
unsigned int* nBytesWritten, bool bWantUncompressed, void* pUncompressedDestBuffer,
|
||||
unsigned int cbUncompressedDestBufferSize, unsigned int* nUncompressBytesWritten,
|
||||
unsigned int nUncompressedVoiceDesiredSampleRate)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int user::DecompressVoice(void *pCompressed, unsigned int cbCompressed, void *pDestBuffer, unsigned int cbDestBufferSize, unsigned int *nBytesWritten)
|
||||
int user::DecompressVoice(void* pCompressed, unsigned int cbCompressed, void* pDestBuffer,
|
||||
unsigned int cbDestBufferSize, unsigned int* nBytesWritten)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -105,11 +111,13 @@ namespace steam
|
||||
|
||||
// Create the call response
|
||||
const auto result = callbacks::register_call();
|
||||
auto retvals = static_cast<encrypted_app_ticket_response*>(calloc(1, sizeof(encrypted_app_ticket_response)));//::Utils::Memory::AllocateArray<EncryptedAppTicketResponse>();
|
||||
auto retvals = static_cast<encrypted_app_ticket_response*>(calloc(1, sizeof(encrypted_app_ticket_response)));
|
||||
//::Utils::Memory::AllocateArray<EncryptedAppTicketResponse>();
|
||||
retvals->m_e_result = 1;
|
||||
|
||||
// Return the call response
|
||||
callbacks::return_call(retvals, sizeof(encrypted_app_ticket_response), encrypted_app_ticket_response::callback_id, result);
|
||||
callbacks::return_call(retvals, sizeof(encrypted_app_ticket_response),
|
||||
encrypted_app_ticket_response::callback_id, result);
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -117,6 +125,7 @@ namespace steam
|
||||
bool user::GetEncryptedAppTicket(void* pTicket, int cbMaxTicket, unsigned int* pcbTicket)
|
||||
{
|
||||
if (cbMaxTicket < 0) return false;
|
||||
return false;//Components::DemonWare::GetAuthTicket(pTicket, static_cast<unsigned int>(cbMaxTicket), pcbTicket);
|
||||
return false;
|
||||
//Components::DemonWare::GetAuthTicket(pTicket, static_cast<unsigned int>(cbMaxTicket), pcbTicket);
|
||||
}
|
||||
}
|
||||
|
@ -16,15 +16,21 @@ namespace steam
|
||||
virtual bool LoggedOn();
|
||||
virtual steam_id GetSteamID();
|
||||
|
||||
virtual int InitiateGameConnection(void *pAuthBlob, int cbMaxAuthBlob, steam_id steamIDGameServer, unsigned int unIPServer, unsigned short usPortServer, bool bSecure);
|
||||
virtual int InitiateGameConnection(void* pAuthBlob, int cbMaxAuthBlob, steam_id steamIDGameServer,
|
||||
unsigned int unIPServer, unsigned short usPortServer, bool bSecure);
|
||||
virtual void TerminateGameConnection(unsigned int unIPServer, unsigned short usPortServer);
|
||||
virtual void TrackAppUsageEvent(steam_id gameID, int eAppUsageEvent, const char* pchExtraInfo = "");
|
||||
virtual bool GetUserDataFolder(char* pchBuffer, int cubBuffer);
|
||||
virtual void StartVoiceRecording();
|
||||
virtual void StopVoiceRecording();
|
||||
virtual int GetAvailableVoice(unsigned int *pcbCompressed, unsigned int *pcbUncompressed, unsigned int nUncompressedVoiceDesiredSampleRate);
|
||||
virtual int GetVoice(bool bWantCompressed, void *pDestBuffer, unsigned int cbDestBufferSize, unsigned int *nBytesWritten, bool bWantUncompressed, void *pUncompressedDestBuffer, unsigned int cbUncompressedDestBufferSize, unsigned int *nUncompressBytesWritten, unsigned int nUncompressedVoiceDesiredSampleRate);
|
||||
virtual int DecompressVoice(void *pCompressed, unsigned int cbCompressed, void *pDestBuffer, unsigned int cbDestBufferSize, unsigned int *nBytesWritten);
|
||||
virtual int GetAvailableVoice(unsigned int* pcbCompressed, unsigned int* pcbUncompressed,
|
||||
unsigned int nUncompressedVoiceDesiredSampleRate);
|
||||
virtual int GetVoice(bool bWantCompressed, void* pDestBuffer, unsigned int cbDestBufferSize,
|
||||
unsigned int* nBytesWritten, bool bWantUncompressed, void* pUncompressedDestBuffer,
|
||||
unsigned int cbUncompressedDestBufferSize, unsigned int* nUncompressBytesWritten,
|
||||
unsigned int nUncompressedVoiceDesiredSampleRate);
|
||||
virtual int DecompressVoice(void* pCompressed, unsigned int cbCompressed, void* pDestBuffer,
|
||||
unsigned int cbDestBufferSize, unsigned int* nBytesWritten);
|
||||
virtual unsigned int GetVoiceOptimalSampleRate();
|
||||
virtual unsigned int GetAuthSessionTicket(void* pTicket, int cbMaxTicket, unsigned int* pcbTicket);
|
||||
virtual int BeginAuthSession(const void* pAuthTicket, int cbAuthTicket, steam_id steamID);
|
||||
|
@ -68,7 +68,8 @@ namespace steam
|
||||
return "";
|
||||
}
|
||||
|
||||
bool user_stats::IndicateAchievementProgress(const char *pchName, unsigned int nCurProgress, unsigned int nMaxProgress)
|
||||
bool user_stats::IndicateAchievementProgress(const char* pchName, unsigned int nCurProgress,
|
||||
unsigned int nMaxProgress)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -93,7 +94,8 @@ namespace steam
|
||||
return false;
|
||||
}
|
||||
|
||||
bool user_stats::GetUserAchievementAndUnlockTime(steam_id steamIDUser, const char *pchName, bool *pbAchieved, unsigned int *punUnlockTime)
|
||||
bool user_stats::GetUserAchievementAndUnlockTime(steam_id steamIDUser, const char* pchName, bool* pbAchieved,
|
||||
unsigned int* punUnlockTime)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -103,7 +105,8 @@ namespace steam
|
||||
return false;
|
||||
}
|
||||
|
||||
unsigned __int64 user_stats::FindOrCreateLeaderboard(const char *pchLeaderboardName, int eLeaderboardSortMethod, int eLeaderboardDisplayType)
|
||||
unsigned __int64 user_stats::FindOrCreateLeaderboard(const char* pchLeaderboardName, int eLeaderboardSortMethod,
|
||||
int eLeaderboardDisplayType)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -133,22 +136,27 @@ namespace steam
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned __int64 user_stats::DownloadLeaderboardEntries(unsigned __int64 hSteamLeaderboard, int eLeaderboardDataRequest, int nRangeStart, int nRangeEnd)
|
||||
unsigned __int64 user_stats::DownloadLeaderboardEntries(unsigned __int64 hSteamLeaderboard,
|
||||
int eLeaderboardDataRequest, int nRangeStart, int nRangeEnd)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned __int64 user_stats::DownloadLeaderboardEntriesForUsers(unsigned __int64 hSteamLeaderboard, steam_id *prgUsers, int cUsers)
|
||||
unsigned __int64 user_stats::DownloadLeaderboardEntriesForUsers(unsigned __int64 hSteamLeaderboard,
|
||||
steam_id* prgUsers, int cUsers)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool user_stats::GetDownloadedLeaderboardEntry(unsigned __int64 hSteamLeaderboardEntries, int index, int *pLeaderboardEntry, int *pDetails, int cDetailsMax)
|
||||
bool user_stats::GetDownloadedLeaderboardEntry(unsigned __int64 hSteamLeaderboardEntries, int index,
|
||||
int* pLeaderboardEntry, int* pDetails, int cDetailsMax)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
unsigned __int64 user_stats::UploadLeaderboardScore(unsigned __int64 hSteamLeaderboard, int eLeaderboardUploadScoreMethod, int nScore, const int *pScoreDetails, int cScoreDetailsCount)
|
||||
unsigned __int64 user_stats::UploadLeaderboardScore(unsigned __int64 hSteamLeaderboard,
|
||||
int eLeaderboardUploadScoreMethod, int nScore,
|
||||
const int* pScoreDetails, int cScoreDetailsCount)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -168,12 +176,14 @@ namespace steam
|
||||
return 0;
|
||||
}
|
||||
|
||||
int user_stats::GetMostAchievedAchievementInfo(char *pchName, unsigned int unNameBufLen, float *pflPercent, bool *pbAchieved)
|
||||
int user_stats::GetMostAchievedAchievementInfo(char* pchName, unsigned int unNameBufLen, float* pflPercent,
|
||||
bool* pbAchieved)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int user_stats::GetNextMostAchievedAchievementInfo(int iIteratorPrevious, char *pchName, unsigned int unNameBufLen, float *pflPercent, bool *pbAchieved)
|
||||
int user_stats::GetNextMostAchievedAchievementInfo(int iIteratorPrevious, char* pchName, unsigned int unNameBufLen,
|
||||
float* pflPercent, bool* pbAchieved)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -18,28 +18,39 @@ namespace steam
|
||||
virtual bool StoreStats();
|
||||
virtual int GetAchievementIcon(const char* pchName);
|
||||
virtual const char* GetAchievementDisplayAttribute(const char* pchName, const char* pchKey);
|
||||
virtual bool IndicateAchievementProgress(const char *pchName, unsigned int nCurProgress, unsigned int nMaxProgress);
|
||||
virtual bool IndicateAchievementProgress(const char* pchName, unsigned int nCurProgress,
|
||||
unsigned int nMaxProgress);
|
||||
virtual unsigned __int64 RequestUserStats(steam_id steamIDUser);
|
||||
virtual bool GetUserStat(steam_id steamIDUser, const char* pchName, int* pData);
|
||||
virtual bool GetUserStat(steam_id steamIDUser, const char* pchName, float* pData);
|
||||
virtual bool GetUserAchievement(steam_id steamIDUser, const char* pchName, bool* pbAchieved);
|
||||
virtual bool GetUserAchievementAndUnlockTime(steam_id steamIDUser, const char *pchName, bool *pbAchieved, unsigned int *punUnlockTime);
|
||||
virtual bool GetUserAchievementAndUnlockTime(steam_id steamIDUser, const char* pchName, bool* pbAchieved,
|
||||
unsigned int* punUnlockTime);
|
||||
virtual bool ResetAllStats(bool bAchievementsToo);
|
||||
virtual unsigned __int64 FindOrCreateLeaderboard(const char *pchLeaderboardName, int eLeaderboardSortMethod, int eLeaderboardDisplayType);
|
||||
virtual unsigned __int64 FindOrCreateLeaderboard(const char* pchLeaderboardName, int eLeaderboardSortMethod,
|
||||
int eLeaderboardDisplayType);
|
||||
virtual unsigned __int64 FindLeaderboard(const char* pchLeaderboardName);
|
||||
virtual const char* GetLeaderboardName(unsigned __int64 hSteamLeaderboard);
|
||||
virtual int GetLeaderboardEntryCount(unsigned __int64 hSteamLeaderboard);
|
||||
virtual int GetLeaderboardSortMethod(unsigned __int64 hSteamLeaderboard);
|
||||
virtual int GetLeaderboardDisplayType(unsigned __int64 hSteamLeaderboard);
|
||||
virtual unsigned __int64 DownloadLeaderboardEntries(unsigned __int64 hSteamLeaderboard, int eLeaderboardDataRequest, int nRangeStart, int nRangeEnd);
|
||||
virtual unsigned __int64 DownloadLeaderboardEntriesForUsers(unsigned __int64 hSteamLeaderboard, steam_id *prgUsers, int cUsers);
|
||||
virtual bool GetDownloadedLeaderboardEntry(unsigned __int64 hSteamLeaderboardEntries, int index, int *pLeaderboardEntry, int *pDetails, int cDetailsMax);
|
||||
virtual unsigned __int64 UploadLeaderboardScore(unsigned __int64 hSteamLeaderboard, int eLeaderboardUploadScoreMethod, int nScore, const int *pScoreDetails, int cScoreDetailsCount);
|
||||
virtual unsigned __int64 DownloadLeaderboardEntries(unsigned __int64 hSteamLeaderboard,
|
||||
int eLeaderboardDataRequest, int nRangeStart,
|
||||
int nRangeEnd);
|
||||
virtual unsigned __int64 DownloadLeaderboardEntriesForUsers(unsigned __int64 hSteamLeaderboard,
|
||||
steam_id* prgUsers, int cUsers);
|
||||
virtual bool GetDownloadedLeaderboardEntry(unsigned __int64 hSteamLeaderboardEntries, int index,
|
||||
int* pLeaderboardEntry, int* pDetails, int cDetailsMax);
|
||||
virtual unsigned __int64 UploadLeaderboardScore(unsigned __int64 hSteamLeaderboard,
|
||||
int eLeaderboardUploadScoreMethod, int nScore,
|
||||
const int* pScoreDetails, int cScoreDetailsCount);
|
||||
virtual unsigned __int64 AttachLeaderboardUGC(unsigned __int64 hSteamLeaderboard, unsigned __int64 hUGC);
|
||||
virtual unsigned __int64 GetNumberOfCurrentPlayers();
|
||||
virtual unsigned __int64 RequestGlobalAchievementPercentages();
|
||||
virtual int GetMostAchievedAchievementInfo(char *pchName, unsigned int unNameBufLen, float *pflPercent, bool *pbAchieved);
|
||||
virtual int GetNextMostAchievedAchievementInfo(int iIteratorPrevious, char *pchName, unsigned int unNameBufLen, float *pflPercent, bool *pbAchieved);
|
||||
virtual int GetMostAchievedAchievementInfo(char* pchName, unsigned int unNameBufLen, float* pflPercent,
|
||||
bool* pbAchieved);
|
||||
virtual int GetNextMostAchievedAchievementInfo(int iIteratorPrevious, char* pchName, unsigned int unNameBufLen,
|
||||
float* pflPercent, bool* pbAchieved);
|
||||
virtual bool GetAchievementAchievedPercent(const char* pchName, float* pflPercent);
|
||||
virtual unsigned __int64 RequestGlobalStats(int nHistoryDays);
|
||||
virtual bool GetGlobalStat(const char* pchStatName, __int64* pData);
|
||||
|
@ -71,7 +71,8 @@ namespace steam
|
||||
return -1;
|
||||
}
|
||||
|
||||
bool utils::GetAPICallResult(unsigned __int64 hSteamAPICall, void *pCallback, int cubCallback, int iCallbackExpected, bool *pbFailed)
|
||||
bool utils::GetAPICallResult(unsigned __int64 hSteamAPICall, void* pCallback, int cubCallback,
|
||||
int iCallbackExpected, bool* pbFailed)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -18,7 +18,8 @@ namespace steam
|
||||
virtual void SetOverlayNotificationPosition(int eNotificationPosition);
|
||||
virtual bool IsAPICallCompleted(unsigned __int64 hSteamAPICall, bool* pbFailed);
|
||||
virtual int GetAPICallFailureReason(unsigned __int64 hSteamAPICall);
|
||||
virtual bool GetAPICallResult(unsigned __int64 hSteamAPICall, void *pCallback, int cubCallback, int iCallbackExpected, bool *pbFailed);
|
||||
virtual bool GetAPICallResult(unsigned __int64 hSteamAPICall, void* pCallback, int cubCallback,
|
||||
int iCallbackExpected, bool* pbFailed);
|
||||
virtual void RunFrame();
|
||||
virtual unsigned int GetIPCCallCount();
|
||||
virtual void SetWarningMessageHook(void (*pFunction)(int hpipe, const char* message));
|
||||
|
@ -76,8 +76,7 @@ namespace steam
|
||||
results_.clear();
|
||||
}
|
||||
|
||||
extern "C"
|
||||
{
|
||||
extern "C" {
|
||||
bool SteamAPI_RestartAppIfNecessary()
|
||||
{
|
||||
return false;
|
||||
@ -90,11 +89,13 @@ namespace steam
|
||||
if (!overlay)
|
||||
{
|
||||
HKEY reg_key;
|
||||
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Valve\\Steam", 0, KEY_QUERY_VALUE, ®_key) == ERROR_SUCCESS)
|
||||
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Valve\\Steam", 0, KEY_QUERY_VALUE, ®_key) ==
|
||||
ERROR_SUCCESS)
|
||||
{
|
||||
char steam_path[MAX_PATH] = {0};
|
||||
DWORD length = sizeof(steam_path);
|
||||
RegQueryValueExA(reg_key, "InstallPath", nullptr, nullptr, reinterpret_cast<BYTE*>(steam_path), &length);
|
||||
RegQueryValueExA(reg_key, "InstallPath", nullptr, nullptr, reinterpret_cast<BYTE*>(steam_path),
|
||||
&length);
|
||||
RegCloseKey(reg_key);
|
||||
|
||||
std::string overlay_path = steam_path;
|
||||
|
@ -37,7 +37,9 @@ namespace steam
|
||||
class base
|
||||
{
|
||||
public:
|
||||
base() : flags_(0), callback_(0) {};
|
||||
base() : flags_(0), callback_(0)
|
||||
{
|
||||
}
|
||||
|
||||
virtual void run(void* pv_param) = 0;
|
||||
virtual void run(void* pv_param, bool failure, uint64_t handle) = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user