Prepare refactoring

This commit is contained in:
momo5502 2018-12-22 18:45:27 +01:00
parent 405b01389c
commit 948e4f1f0e
26 changed files with 5 additions and 2009 deletions

View File

@ -13,13 +13,13 @@ namespace main
}
}
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
BOOL APIENTRY DllMain(HMODULE, DWORD call_reason, LPVOID)
{
if (ul_reason_for_call == DLL_PROCESS_ATTACH)
if (call_reason == DLL_PROCESS_ATTACH)
{
main::initialize();
}
else if (ul_reason_for_call == DLL_PROCESS_DETACH)
else if (call_reason == DLL_PROCESS_DETACH)
{
main::uninitialize();
}

View File

@ -6,7 +6,8 @@
#include <map>
#include <vector>
#include <mutex>
#pragma warning(disable: 4100)
#include "steam\Steam.hpp"
#include "steam\steam.hpp"

View File

@ -1,72 +0,0 @@
#include <std_include.hpp>
namespace Steam
{
bool Apps::BIsSubscribed()
{
return true;
}
bool Apps::BIsLowViolence()
{
return false;
}
bool Apps::BIsCybercafe()
{
return false;
}
bool Apps::BIsVACBanned()
{
return false;
}
const char *Apps::GetCurrentGameLanguage()
{
return "english";
}
const char *Apps::GetAvailableGameLanguages()
{
return "english";
}
bool Apps::BIsSubscribedApp(unsigned int appID)
{
return true;
}
bool Apps::BIsDlcInstalled(unsigned int appID)
{
return true;
}
unsigned int Apps::GetEarliestPurchaseUnixTime(unsigned int nAppID)
{
return 0;
}
bool Apps::BIsSubscribedFromFreeWeekend()
{
return false;
}
int Apps::GetDLCCount()
{
return 0;
}
bool Apps::BGetDLCDataByIndex(int iDLC, unsigned int *pAppID, bool *pbAvailable, char *pchName, int cchNameBufferSize)
{
return false;
}
void Apps::InstallDLC(unsigned int nAppID)
{
}
void Apps::UninstallDLC(unsigned int nAppID)
{
}
}

View File

@ -1,21 +0,0 @@
namespace Steam
{
class Apps
{
public:
virtual bool BIsSubscribed();
virtual bool BIsLowViolence();
virtual bool BIsCybercafe();
virtual bool BIsVACBanned();
virtual const char *GetCurrentGameLanguage();
virtual const char *GetAvailableGameLanguages();
virtual bool BIsSubscribedApp(unsigned int appID);
virtual bool BIsDlcInstalled(unsigned int appID);
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 void InstallDLC(unsigned int nAppID);
virtual void UninstallDLC(unsigned int nAppID);
};
}

View File

@ -1,217 +0,0 @@
#include <std_include.hpp>
namespace Steam
{
const char *Friends::GetPersonaName()
{
return "GlaDos";
}
void Friends::SetPersonaName(const char *pchPersonaName)
{
}
int Friends::GetPersonaState()
{
return 1;
}
int Friends::GetFriendCount(int eFriendFlags)
{
return 0;
}
SteamID Friends::GetFriendByIndex(int iFriend, int iFriendFlags)
{
return SteamID();
}
int Friends::GetFriendRelationship(SteamID steamIDFriend)
{
return 0;
}
int Friends::GetFriendPersonaState(SteamID steamIDFriend)
{
return 0;
}
const char *Friends::GetFriendPersonaName(SteamID steamIDFriend)
{
return "";
}
bool Friends::GetFriendGamePlayed(SteamID steamIDFriend, void *pFriendGameInfo)
{
return false;
}
const char *Friends::GetFriendPersonaNameHistory(SteamID steamIDFriend, int iPersonaName)
{
return "";
}
bool Friends::HasFriend(SteamID steamIDFriend, int eFriendFlags)
{
return false;
}
int Friends::GetClanCount()
{
return 0;
}
SteamID Friends::GetClanByIndex(int iClan)
{
return SteamID();
}
const char *Friends::GetClanName(SteamID steamIDClan)
{
return "3arc";
}
const char *Friends::GetClanTag(SteamID steamIDClan)
{
return this->GetClanName(steamIDClan);
}
int Friends::GetFriendCountFromSource(SteamID steamIDSource)
{
return 0;
}
SteamID Friends::GetFriendFromSourceByIndex(SteamID steamIDSource, int iFriend)
{
return SteamID();
}
bool Friends::IsUserInSource(SteamID steamIDUser, SteamID steamIDSource)
{
return false;
}
void Friends::SetInGameVoiceSpeaking(SteamID steamIDUser, bool bSpeaking)
{
}
void Friends::ActivateGameOverlay(const char *pchDialog)
{
}
void Friends::ActivateGameOverlayToUser(const char *pchDialog, SteamID steamID)
{
}
void Friends::ActivateGameOverlayToWebPage(const char *pchURL)
{
}
void Friends::ActivateGameOverlayToStore(unsigned int nAppID)
{
OutputDebugStringA("Store requested!");
}
void Friends::SetPlayedWith(SteamID steamIDUserPlayedWith)
{
}
void Friends::ActivateGameOverlayInviteDialog(SteamID steamIDLobby)
{
}
int Friends::GetSmallFriendAvatar(SteamID steamIDFriend)
{
return 0;
}
int Friends::GetMediumFriendAvatar(SteamID steamIDFriend)
{
return 0;
}
int Friends::GetLargeFriendAvatar(SteamID steamIDFriend)
{
return 0;
}
bool Friends::RequestUserInformation(SteamID steamIDUser, bool bRequireNameOnly)
{
return false;
}
unsigned __int64 Friends::RequestClanOfficerList(SteamID steamIDClan)
{
return 0;
}
SteamID Friends::GetClanOwner(SteamID steamIDClan)
{
return SteamID();
}
int Friends::GetClanOfficerCount(SteamID steamIDClan)
{
return 0;
}
SteamID Friends::GetClanOfficerByIndex(SteamID steamIDClan, int iOfficer)
{
return SteamID();
}
int Friends::GetUserRestrictions()
{
return 0;
}
bool Friends::SetRichPresence(const char *pchKey, const char *pchValue)
{
return true;
}
void Friends::ClearRichPresence()
{
}
const char *Friends::GetFriendRichPresence(SteamID steamIDFriend, const char *pchKey)
{
return "";
}
int Friends::GetFriendRichPresenceKeyCount(SteamID steamIDFriend)
{
return 0;
}
const char *Friends::GetFriendRichPresenceKeyByIndex(SteamID steamIDFriend, int iKey)
{
return "a";
}
bool Friends::InviteUserToGame(SteamID steamIDFriend, const char *pchConnectString)
{
return false;
}
int Friends::GetCoplayFriendCount()
{
return 0;
}
SteamID Friends::GetCoplayFriend(int iCoplayFriend)
{
return SteamID();
}
int Friends::GetFriendCoplayTime(SteamID steamIDFriend)
{
return 0;
}
unsigned int Friends::GetFriendCoplayGame(SteamID steamIDFriend)
{
return 0;
}
}

View File

@ -1,51 +0,0 @@
namespace Steam
{
class Friends
{
public:
virtual const char *GetPersonaName();
virtual void SetPersonaName(const char *pchPersonaName);
virtual int GetPersonaState();
virtual int GetFriendCount(int eFriendFlags);
virtual SteamID GetFriendByIndex(int iFriend, int iFriendFlags);
virtual int GetFriendRelationship(SteamID steamIDFriend);
virtual int GetFriendPersonaState(SteamID steamIDFriend);
virtual const char *GetFriendPersonaName(SteamID steamIDFriend);
virtual bool GetFriendGamePlayed(SteamID steamIDFriend, void *pFriendGameInfo);
virtual const char *GetFriendPersonaNameHistory(SteamID steamIDFriend, int iPersonaName);
virtual bool HasFriend(SteamID steamIDFriend, int eFriendFlags);
virtual int GetClanCount();
virtual SteamID GetClanByIndex(int iClan);
virtual const char *GetClanName(SteamID steamIDClan);
virtual const char *GetClanTag(SteamID steamIDClan);
virtual int GetFriendCountFromSource(SteamID steamIDSource);
virtual SteamID GetFriendFromSourceByIndex(SteamID steamIDSource, int iFriend);
virtual bool IsUserInSource(SteamID steamIDUser, SteamID steamIDSource);
virtual void SetInGameVoiceSpeaking(SteamID steamIDUser, bool bSpeaking);
virtual void ActivateGameOverlay(const char *pchDialog);
virtual void ActivateGameOverlayToUser(const char *pchDialog, SteamID steamID);
virtual void ActivateGameOverlayToWebPage(const char *pchURL);
virtual void ActivateGameOverlayToStore(unsigned int nAppID);
virtual void SetPlayedWith(SteamID steamIDUserPlayedWith);
virtual void ActivateGameOverlayInviteDialog(SteamID steamIDLobby);
virtual int GetSmallFriendAvatar(SteamID steamIDFriend);
virtual int GetMediumFriendAvatar(SteamID steamIDFriend);
virtual int GetLargeFriendAvatar(SteamID steamIDFriend);
virtual bool RequestUserInformation(SteamID steamIDUser, bool bRequireNameOnly);
virtual unsigned __int64 RequestClanOfficerList(SteamID steamIDClan);
virtual SteamID GetClanOwner(SteamID steamIDClan);
virtual int GetClanOfficerCount(SteamID steamIDClan);
virtual SteamID GetClanOfficerByIndex(SteamID steamIDClan, int iOfficer);
virtual int GetUserRestrictions();
virtual bool SetRichPresence(const char *pchKey, const char *pchValue);
virtual void ClearRichPresence();
virtual const char *GetFriendRichPresence(SteamID steamIDFriend, const char *pchKey);
virtual int GetFriendRichPresenceKeyCount(SteamID steamIDFriend);
virtual const char *GetFriendRichPresenceKeyByIndex(SteamID steamIDFriend, int iKey);
virtual bool InviteUserToGame(SteamID steamIDFriend, const char *pchConnectString);
virtual int GetCoplayFriendCount();
virtual SteamID GetCoplayFriend(int iCoplayFriend);
virtual int GetFriendCoplayTime(SteamID steamIDFriend);
virtual unsigned int GetFriendCoplayGame(SteamID steamIDFriend);
};
}

View File

@ -1,96 +0,0 @@
#include <std_include.hpp>
namespace Steam
{
void GameServer::LogOn()
{
}
void GameServer::LogOff()
{
}
bool GameServer::LoggedOn()
{
return true;
}
bool GameServer::Secure()
{
return false;
}
SteamID GameServer::GetSteamID()
{
return SteamID();
}
bool GameServer::SendUserConnectAndAuthenticate(unsigned int unIPClient, const void *pvAuthBlob, unsigned int cubAuthBlobSize, SteamID *pSteamIDUser)
{
return true;
}
SteamID GameServer::CreateUnauthenticatedUserConnection()
{
return SteamID();
}
void GameServer::SendUserDisconnect(SteamID steamIDUser)
{
}
bool GameServer::UpdateUserData(SteamID steamIDUser, const char *pchPlayerName, unsigned int uScore)
{
return true;
}
bool GameServer::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 GameServer::UpdateServerStatus(int cPlayers, int cPlayersMax, int cBotPlayers, const char *pchServerName, const char *pSpectatorServerName, const char *pchMapName)
{
}
void GameServer::UpdateSpectatorPort(unsigned short unSpectatorPort)
{
}
void GameServer::SetGameType(const char *pchGameType)
{
}
bool GameServer::GetUserAchievementStatus(SteamID steamID, const char *pchAchievementName)
{
return false;
}
void GameServer::GetGameplayStats()
{
}
unsigned __int64 GameServer::GetServerReputation()
{
return 0;
}
bool GameServer::RequestUserGroupStatus(SteamID steamIDUser, SteamID steamIDGroup)
{
return false;
}
unsigned int GameServer::GetPublicIP()
{
return 0;
}
void GameServer::SetGameData(const char *pchGameData)
{
}
int GameServer::UserHasLicenseForApp(SteamID steamID, unsigned int appID)
{
return 0;
}
}

View File

@ -1,27 +0,0 @@
namespace Steam
{
class GameServer
{
public:
virtual void LogOn();
virtual void LogOff();
virtual bool LoggedOn();
virtual bool Secure();
virtual SteamID GetSteamID();
virtual bool SendUserConnectAndAuthenticate(unsigned int unIPClient, const void *pvAuthBlob, unsigned int cubAuthBlobSize, SteamID *pSteamIDUser);
virtual SteamID CreateUnauthenticatedUserConnection();
virtual void SendUserDisconnect(SteamID steamIDUser);
virtual bool UpdateUserData(SteamID 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 void UpdateSpectatorPort(unsigned short unSpectatorPort);
virtual void SetGameType(const char *pchGameType);
virtual bool GetUserAchievementStatus(SteamID steamID, const char *pchAchievementName);
virtual void GetGameplayStats();
virtual unsigned __int64 GetServerReputation();
virtual bool RequestUserGroupStatus(SteamID steamIDUser, SteamID steamIDGroup);
virtual unsigned int GetPublicIP();
virtual void SetGameData(const char *pchGameData);
virtual int UserHasLicenseForApp(SteamID steamID, unsigned int appID);
};
}

View File

@ -1,67 +0,0 @@
#include <std_include.hpp>
namespace Steam
{
void MasterServerUpdater::SetActive(bool bActive)
{
}
void MasterServerUpdater::SetHeartbeatInterval(int iHeartbeatInterval)
{
}
bool MasterServerUpdater::HandleIncomingPacket(const void *pData, int cbData, unsigned int srcIP, unsigned short srcPort)
{
return true;
}
int MasterServerUpdater::GetNextOutgoingPacket(void *pOut, int cbMaxOut, unsigned int *pNetAdr, unsigned short *pPort)
{
return 0;
}
void MasterServerUpdater::SetBasicServerData(unsigned short nProtocolVersion, bool bDedicatedServer, const char *pRegionName, const char *pProductName, unsigned short nMaxReportedClients, bool bPasswordProtected, const char *pGameDescription)
{
}
void MasterServerUpdater::ClearAllKeyValues()
{
}
void MasterServerUpdater::SetKeyValue(const char *pKey, const char *pValue)
{
}
void MasterServerUpdater::NotifyShutdown()
{
}
bool MasterServerUpdater::WasRestartRequested()
{
return false;
}
void MasterServerUpdater::ForceHeartbeat()
{
}
bool MasterServerUpdater::AddMasterServer(const char *pServerAddress)
{
return true;
}
bool MasterServerUpdater::RemoveMasterServer(const char *pServerAddress)
{
return true;
}
int MasterServerUpdater::GetNumMasterServers()
{
return 0;
}
int MasterServerUpdater::GetMasterServerAddress(int iServer, char *pOut, int outBufferSize)
{
return 0;
}
}

View File

@ -1,21 +0,0 @@
namespace Steam
{
class MasterServerUpdater
{
public:
virtual void SetActive(bool bActive);
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 ClearAllKeyValues();
virtual void SetKeyValue(const char *pKey, const char *pValue);
virtual void NotifyShutdown();
virtual bool WasRestartRequested();
virtual void ForceHeartbeat();
virtual bool AddMasterServer(const char *pServerAddress);
virtual bool RemoveMasterServer(const char *pServerAddress);
virtual int GetNumMasterServers();
virtual int GetMasterServerAddress(int iServer, char *pOut, int outBufferSize);
};
}

View File

@ -1,201 +0,0 @@
#include <std_include.hpp>
namespace Steam
{
int Matchmaking::GetFavoriteGameCount()
{
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)
{
return false;
}
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)
{
return false;
}
unsigned __int64 Matchmaking::RequestLobbyList()
{
return 0;
}
void Matchmaking::AddRequestLobbyListStringFilter(const char *pchKeyToMatch, const char *pchValueToMatch, int eComparisonType)
{
}
void Matchmaking::AddRequestLobbyListNumericalFilter(const char *pchKeyToMatch, int nValueToMatch, int eComparisonType)
{
}
void Matchmaking::AddRequestLobbyListNearValueFilter(const char *pchKeyToMatch, int nValueToBeCloseTo)
{
}
void Matchmaking::AddRequestLobbyListFilterSlotsAvailable(int nSlotsAvailable)
{
}
void Matchmaking::AddRequestLobbyListDistanceFilter(int eLobbyDistanceFilter)
{
}
void Matchmaking::AddRequestLobbyListResultCountFilter(int cMaxResults)
{
}
SteamID Matchmaking::GetLobbyByIndex(int iLobby)
{
return SteamID();
}
unsigned __int64 Matchmaking::CreateLobby(int eLobbyType, int cMaxMembers)
{
uint64_t result = Callbacks::RegisterCall();
LobbyCreated* retvals = (LobbyCreated*)calloc(1, sizeof(LobbyCreated));//::Utils::Memory::AllocateArray<LobbyCreated>();
SteamID id;
id.AccountID = 1337132;
id.Universe = 1;
id.AccountType = 8;
id.AccountInstance = 0x40000;
retvals->m_eResult = 1;
retvals->m_ulSteamIDLobby = id;
Callbacks::ReturnCall(retvals, sizeof(LobbyCreated), LobbyCreated::CallbackID, result);
Matchmaking::JoinLobby(id);
return result;
}
unsigned __int64 Matchmaking::JoinLobby(SteamID steamIDLobby)
{
uint64_t result = Callbacks::RegisterCall();
LobbyEnter* retvals = (LobbyEnter*)calloc(1, sizeof(LobbyEnter));//::Utils::Memory::AllocateArray<LobbyEnter>();
retvals->m_bLocked = false;
retvals->m_EChatRoomEnterResponse = 1;
retvals->m_rgfChatPermissions = 0xFFFFFFFF;
retvals->m_ulSteamIDLobby = steamIDLobby;
Callbacks::ReturnCall(retvals, sizeof(LobbyEnter), LobbyEnter::CallbackID, result);
return result;
}
void Matchmaking::LeaveLobby(SteamID steamIDLobby)
{
//Components::Party::RemoveLobby(steamIDLobby);
}
bool Matchmaking::InviteUserToLobby(SteamID steamIDLobby, SteamID steamIDInvitee)
{
return true;
}
int Matchmaking::GetNumLobbyMembers(SteamID steamIDLobby)
{
return 1;
}
SteamID Matchmaking::GetLobbyMemberByIndex(SteamID steamIDLobby, int iMember)
{
return SteamUser()->GetSteamID();
}
const char *Matchmaking::GetLobbyData(SteamID steamIDLobby, const char *pchKey)
{
return "212";//Components::Party::GetLobbyInfo(steamIDLobby, pchKey);
}
bool Matchmaking::SetLobbyData(SteamID steamIDLobby, const char *pchKey, const char *pchValue)
{
return true;
}
int Matchmaking::GetLobbyDataCount(SteamID steamIDLobby)
{
return 0;
}
bool Matchmaking::GetLobbyDataByIndex(SteamID steamIDLobby, int iLobbyData, char *pchKey, int cchKeyBufferSize, char *pchValue, int cchValueBufferSize)
{
return false;
}
bool Matchmaking::DeleteLobbyData(SteamID steamIDLobby, const char *pchKey)
{
return false;
}
const char *Matchmaking::GetLobbyMemberData(SteamID steamIDLobby, SteamID steamIDUser, const char *pchKey)
{
return "";
}
void Matchmaking::SetLobbyMemberData(SteamID steamIDLobby, const char *pchKey, const char *pchValue)
{
}
bool Matchmaking::SendLobbyChatMsg(SteamID steamIDLobby, const void *pvMsgBody, int cubMsgBody)
{
return true;
}
int Matchmaking::GetLobbyChatEntry(SteamID steamIDLobby, int iChatID, SteamID *pSteamIDUser, void *pvData, int cubData, int *peChatEntryType)
{
return 0;
}
bool Matchmaking::RequestLobbyData(SteamID steamIDLobby)
{
return false;
}
void Matchmaking::SetLobbyGameServer(SteamID steamIDLobby, unsigned int unGameServerIP, unsigned short unGameServerPort, SteamID steamIDGameServer)
{
}
bool Matchmaking::GetLobbyGameServer(SteamID steamIDLobby, unsigned int *punGameServerIP, unsigned short *punGameServerPort, SteamID *psteamIDGameServer)
{
return false;
}
bool Matchmaking::SetLobbyMemberLimit(SteamID steamIDLobby, int cMaxMembers)
{
return true;
}
int Matchmaking::GetLobbyMemberLimit(SteamID steamIDLobby)
{
return 0;
}
bool Matchmaking::SetLobbyType(SteamID steamIDLobby, int eLobbyType)
{
return true;
}
bool Matchmaking::SetLobbyJoinable(SteamID steamIDLobby, bool bLobbyJoinable)
{
return true;
}
SteamID Matchmaking::GetLobbyOwner(SteamID steamIDLobby)
{
return SteamUser()->GetSteamID();
}
bool Matchmaking::SetLobbyOwner(SteamID steamIDLobby, SteamID steamIDNewOwner)
{
return true;
}
}

View File

@ -1,62 +0,0 @@
namespace Steam
{
struct LobbyCreated
{
enum { CallbackID = 513 };
int m_eResult;
int m_pad;
SteamID m_ulSteamIDLobby;
};
struct LobbyEnter
{
enum { CallbackID = 504 };
SteamID m_ulSteamIDLobby;
int m_rgfChatPermissions;
bool m_bLocked;
int m_EChatRoomEnterResponse;
};
class Matchmaking
{
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 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 AddRequestLobbyListNearValueFilter(const char *pchKeyToMatch, int nValueToBeCloseTo);
virtual void AddRequestLobbyListFilterSlotsAvailable(int nSlotsAvailable);
virtual void AddRequestLobbyListDistanceFilter(int eLobbyDistanceFilter);
virtual void AddRequestLobbyListResultCountFilter(int cMaxResults);
virtual SteamID GetLobbyByIndex(int iLobby);
virtual unsigned __int64 CreateLobby(int eLobbyType, int cMaxMembers);
virtual unsigned __int64 JoinLobby(SteamID steamIDLobby);
virtual void LeaveLobby(SteamID steamIDLobby);
virtual bool InviteUserToLobby(SteamID steamIDLobby, SteamID steamIDInvitee);
virtual int GetNumLobbyMembers(SteamID steamIDLobby);
virtual SteamID GetLobbyMemberByIndex(SteamID steamIDLobby, int iMember);
virtual const char *GetLobbyData(SteamID steamIDLobby, const char *pchKey);
virtual bool SetLobbyData(SteamID steamIDLobby, const char *pchKey, const char *pchValue);
virtual int GetLobbyDataCount(SteamID steamIDLobby);
virtual bool GetLobbyDataByIndex(SteamID steamIDLobby, int iLobbyData, char *pchKey, int cchKeyBufferSize, char *pchValue, int cchValueBufferSize);
virtual bool DeleteLobbyData(SteamID steamIDLobby, const char *pchKey);
virtual const char *GetLobbyMemberData(SteamID steamIDLobby, SteamID steamIDUser, const char *pchKey);
virtual void SetLobbyMemberData(SteamID steamIDLobby, const char *pchKey, const char *pchValue);
virtual bool SendLobbyChatMsg(SteamID steamIDLobby, const void *pvMsgBody, int cubMsgBody);
virtual int GetLobbyChatEntry(SteamID steamIDLobby, int iChatID, SteamID *pSteamIDUser, void *pvData, int cubData, int *peChatEntryType);
virtual bool RequestLobbyData(SteamID steamIDLobby);
virtual void SetLobbyGameServer(SteamID steamIDLobby, unsigned int unGameServerIP, unsigned short unGameServerPort, SteamID steamIDGameServer);
virtual bool GetLobbyGameServer(SteamID steamIDLobby, unsigned int *punGameServerIP, unsigned short *punGameServerPort, SteamID *psteamIDGameServer);
virtual bool SetLobbyMemberLimit(SteamID steamIDLobby, int cMaxMembers);
virtual int GetLobbyMemberLimit(SteamID steamIDLobby);
virtual bool SetLobbyType(SteamID steamIDLobby, int eLobbyType);
virtual bool SetLobbyJoinable(SteamID steamIDLobby, bool bLobbyJoinable);
virtual SteamID GetLobbyOwner(SteamID steamIDLobby);
virtual bool SetLobbyOwner(SteamID steamIDLobby, SteamID steamIDNewOwner);
};
}

View File

@ -1,84 +0,0 @@
#include <std_include.hpp>
namespace Steam
{
void* MatchmakingServers::RequestInternetServerList(unsigned int iApp, void **ppchFilters, unsigned int nFilters, void *pRequestServersResponse)
{
return nullptr;
}
void* MatchmakingServers::RequestLANServerList(unsigned int iApp, void *pRequestServersResponse)
{
return nullptr;
}
void* MatchmakingServers::RequestFriendsServerList(unsigned int iApp, void **ppchFilters, unsigned int nFilters, void *pRequestServersResponse)
{
return nullptr;
}
void* MatchmakingServers::RequestFavoritesServerList(unsigned int iApp, void **ppchFilters, unsigned int nFilters, void *pRequestServersResponse)
{
return nullptr;
}
void* MatchmakingServers::RequestHistoryServerList(unsigned int iApp, void **ppchFilters, unsigned int nFilters, void *pRequestServersResponse)
{
return nullptr;
}
void* MatchmakingServers::RequestSpectatorServerList(unsigned int iApp, void **ppchFilters, unsigned int nFilters, void *pRequestServersResponse)
{
return nullptr;
}
void MatchmakingServers::ReleaseRequest(void* hServerListRequest)
{
}
void *MatchmakingServers::GetServerDetails(void* hRequest, int iServer)
{
return nullptr;
}
void MatchmakingServers::CancelQuery(void* hRequest)
{
}
void MatchmakingServers::RefreshQuery(void* hRequest)
{
}
bool MatchmakingServers::IsRefreshing(void* hRequest)
{
return false;
}
int MatchmakingServers::GetServerCount(void* hRequest)
{
return 0;
}
void MatchmakingServers::RefreshServer(void* hRequest, int iServer)
{
}
int MatchmakingServers::PingServer(unsigned int unIP, unsigned short usPort, void *pRequestServersResponse)
{
return 0;
}
int MatchmakingServers::PlayerDetails(unsigned int unIP, unsigned short usPort, void *pRequestServersResponse)
{
return 0;
}
int MatchmakingServers::ServerRules(unsigned int unIP, unsigned short usPort, void *pRequestServersResponse)
{
return 0;
}
void MatchmakingServers::CancelServerQuery(int hServerQuery)
{
}
}

View File

@ -1,24 +0,0 @@
namespace Steam
{
class MatchmakingServers
{
public:
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 ReleaseRequest(void* hServerListRequest);
virtual void *GetServerDetails(void* hRequest, int iServer);
virtual void CancelQuery(void* hRequest);
virtual void RefreshQuery(void* hRequest);
virtual bool IsRefreshing(void* hRequest);
virtual int GetServerCount(void* hRequest);
virtual void RefreshServer(void* hRequest, int iServer);
virtual int PingServer(unsigned int unIP, unsigned short usPort, void *pRequestServersResponse);
virtual int PlayerDetails(unsigned int unIP, unsigned short usPort, void *pRequestServersResponse);
virtual int ServerRules(unsigned int unIP, unsigned short usPort, void *pRequestServersResponse);
virtual void CancelServerQuery(int hServerQuery);
};
}

View File

@ -1,114 +0,0 @@
#include <std_include.hpp>
namespace Steam
{
bool Networking::SendP2PPacket(SteamID steamIDRemote, const void *pubData, unsigned int cubData, int eP2PSendType)
{
return false;
}
bool Networking::IsP2PPacketAvailable(unsigned int *pcubMsgSize, int idk)
{
return false;
}
bool Networking::ReadP2PPacket(void *pubDest, unsigned int cubDest, unsigned int *pcubMsgSize, SteamID *psteamIDRemote)
{
return false;
}
bool Networking::AcceptP2PSessionWithUser(SteamID steamIDRemote)
{
return false;
}
bool Networking::CloseP2PSessionWithUser(SteamID steamIDRemote)
{
return false;
}
bool Networking::CloseP2PChannelWithUser(SteamID steamIDRemote, int iVirtualPort)
{
return false;
}
bool Networking::GetP2PSessionState(SteamID steamIDRemote, void *pConnectionState)
{
return false;
}
bool Networking::AllowP2PPacketRelay(bool bAllow)
{
return false;
}
unsigned int Networking::CreateListenSocket(int nVirtualP2PPort, unsigned int nIP, unsigned short nPort, bool bAllowUseOfPacketRelay)
{
return NULL;
}
unsigned int Networking::CreateP2PConnectionSocket(SteamID steamIDTarget, int nVirtualPort, int nTimeoutSec, bool bAllowUseOfPacketRelay)
{
return NULL;
}
unsigned int Networking::CreateConnectionSocket(unsigned int nIP, unsigned short nPort, int nTimeoutSec)
{
return NULL;
}
bool Networking::DestroySocket(unsigned int hSocket, bool bNotifyRemoteEnd)
{
return false;
}
bool Networking::DestroyListenSocket(unsigned int hSocket, bool bNotifyRemoteEnd)
{
return false;
}
bool Networking::SendDataOnSocket(unsigned int hSocket, void *pubData, unsigned int cubData, bool bReliable)
{
return false;
}
bool Networking::IsDataAvailableOnSocket(unsigned int hSocket, unsigned int *pcubMsgSize)
{
return false;
}
bool Networking::RetrieveDataFromSocket(unsigned int hSocket, void *pubDest, unsigned int cubDest, unsigned int *pcubMsgSize)
{
return false;
}
bool Networking::IsDataAvailable(unsigned int hListenSocket, unsigned int *pcubMsgSize, unsigned int *phSocket)
{
return false;
}
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, SteamID *pSteamIDRemote, int *peSocketStatus, unsigned int *punIPRemote, unsigned short *punPortRemote)
{
return false;
}
bool Networking::GetListenSocketInfo(unsigned int hListenSocket, unsigned int *pnIP, unsigned short *pnPort)
{
return false;
}
int Networking::GetSocketConnectionType(unsigned int hSocket)
{
return 0;
}
int Networking::GetMaxPacketSize(unsigned int hSocket)
{
return 0;
}
}

View File

@ -1,29 +0,0 @@
namespace Steam
{
class Networking
{
public:
virtual bool SendP2PPacket(SteamID 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, SteamID *psteamIDRemote);
virtual bool AcceptP2PSessionWithUser(SteamID steamIDRemote);
virtual bool CloseP2PSessionWithUser(SteamID steamIDRemote);
virtual bool CloseP2PChannelWithUser(SteamID steamIDRemote, int iVirtualPort);
virtual bool GetP2PSessionState(SteamID 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(SteamID 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 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, SteamID *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);
};
}

View File

@ -1,43 +0,0 @@
#include <std_include.hpp>
namespace Steam
{
bool RemoteStorage::FileWrite(const char *pchFile, const void *pvData, int cubData)
{
return true;
}
int RemoteStorage::GetFileSize(const char *pchFile)
{
return 0;
}
int RemoteStorage::FileRead(const char *pchFile, void *pvData, int cubDataToRead)
{
OutputDebugStringA(pchFile);
return 0;
}
bool RemoteStorage::FileExists(const char *pchFile)
{
return false;
}
int RemoteStorage::GetFileCount()
{
return 0;
}
const char *RemoteStorage::GetFileNameAndSize(int iFile, int *pnFileSizeInBytes)
{
*pnFileSizeInBytes = 0;
return "";
}
bool RemoteStorage::GetQuota(int *pnTotalBytes, int *puAvailableBytes)
{
*pnTotalBytes = 0x10000000;
*puAvailableBytes = 0x10000000;
return false;
}
}

View File

@ -1,14 +0,0 @@
namespace Steam
{
class RemoteStorage
{
public:
virtual bool FileWrite(const char *pchFile, const void *pvData, int cubData);
virtual int GetFileSize(const char *pchFile);
virtual int FileRead(const char *pchFile, void *pvData, int cubDataToRead);
virtual bool FileExists(const char *pchFile);
virtual int GetFileCount();
virtual const char *GetFileNameAndSize(int iFile, int *pnFileSizeInBytes);
virtual bool GetQuota(int *pnTotalBytes, int *puAvailableBytes);
};
}

View File

@ -1,121 +0,0 @@
#include <std_include.hpp>
namespace Steam
{
int User::GetHSteamUser()
{
return NULL;
}
bool User::LoggedOn()
{
return true;
}
SteamID User::GetSteamID()
{
SteamID id;
id.Bits = 0x110000100000000 | (0x1377 & ~0x80000000);
return id;
}
int User::InitiateGameConnection(void *pAuthBlob, int cbMaxAuthBlob, SteamID steamIDGameServer, unsigned int unIPServer, unsigned short usPortServer, bool bSecure)
{
return 0;
}
void User::TerminateGameConnection(unsigned int unIPServer, unsigned short usPortServer)
{
}
void User::TrackAppUsageEvent(SteamID gameID, int eAppUsageEvent, const char *pchExtraInfo)
{
}
bool User::GetUserDataFolder(char *pchBuffer, int cubBuffer)
{
return false;
}
void User::StartVoiceRecording()
{
}
void User::StopVoiceRecording()
{
}
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)
{
return 0;
}
int User::DecompressVoice(void *pCompressed, unsigned int cbCompressed, void *pDestBuffer, unsigned int cbDestBufferSize, unsigned int *nBytesWritten)
{
return 0;
}
unsigned int User::GetVoiceOptimalSampleRate()
{
return 0;
}
unsigned int User::GetAuthSessionTicket(void *pTicket, int cbMaxTicket, unsigned int *pcbTicket)
{
return 0;
}
int User::BeginAuthSession(const void *pAuthTicket, int cbAuthTicket, SteamID steamID)
{
return 0;
}
void User::EndAuthSession(SteamID steamID)
{
}
void User::CancelAuthTicket(unsigned int hAuthTicket)
{
}
unsigned int User::UserHasLicenseForApp(SteamID steamID, unsigned int appID)
{
return 0;
}
bool User::BIsBehindNAT()
{
return false;
}
void User::AdvertiseGame(SteamID steamIDGameServer, unsigned int unIPServer, unsigned short usPortServer)
{
}
unsigned __int64 User::RequestEncryptedAppTicket(void *pUserData, int cbUserData)
{
// Generate the authentication ticket
//Components::DemonWare::GenerateAuthTicket(std::string(reinterpret_cast<char*>(pUserData), cbUserData));
// Create the call response
uint64_t result = Callbacks::RegisterCall();
EncryptedAppTicketResponse* retvals = (EncryptedAppTicketResponse*)calloc(1, sizeof(EncryptedAppTicketResponse));//::Utils::Memory::AllocateArray<EncryptedAppTicketResponse>();
retvals->m_eResult = 1;
// Return the call response
Callbacks::ReturnCall(retvals, sizeof(EncryptedAppTicketResponse), EncryptedAppTicketResponse::CallbackID, result);
return result;
}
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);
}
}

View File

@ -1,37 +0,0 @@
namespace Steam
{
struct EncryptedAppTicketResponse
{
enum { CallbackID = 154 };
int m_eResult;
};
class User
{
public:
virtual int GetHSteamUser();
virtual bool LoggedOn();
virtual SteamID GetSteamID();
virtual int InitiateGameConnection(void *pAuthBlob, int cbMaxAuthBlob, SteamID steamIDGameServer, unsigned int unIPServer, unsigned short usPortServer, bool bSecure);
virtual void TerminateGameConnection(unsigned int unIPServer, unsigned short usPortServer);
virtual void TrackAppUsageEvent(SteamID 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 unsigned int GetVoiceOptimalSampleRate();
virtual unsigned int GetAuthSessionTicket(void *pTicket, int cbMaxTicket, unsigned int *pcbTicket);
virtual int BeginAuthSession(const void *pAuthTicket, int cbAuthTicket, SteamID steamID);
virtual void EndAuthSession(SteamID steamID);
virtual void CancelAuthTicket(unsigned int hAuthTicket);
virtual unsigned int UserHasLicenseForApp(SteamID steamID, unsigned int appID);
virtual bool BIsBehindNAT();
virtual void AdvertiseGame(SteamID steamIDGameServer, unsigned int unIPServer, unsigned short usPortServer);
virtual unsigned __int64 RequestEncryptedAppTicket(void *pUserData, int cbUserData);
virtual bool GetEncryptedAppTicket(void *pTicket, int cbMaxTicket, unsigned int *pcbTicket);
};
}

View File

@ -1,209 +0,0 @@
#include <std_include.hpp>
namespace Steam
{
bool UserStats::RequestCurrentStats()
{
return true;
}
bool UserStats::GetStat(const char *pchName, int *pData)
{
return false;
}
bool UserStats::GetStat(const char *pchName, float *pData)
{
return false;
}
bool UserStats::SetStat(const char *pchName, int nData)
{
return false;
}
bool UserStats::SetStat(const char *pchName, float fData)
{
return false;
}
bool UserStats::UpdateAvgRateStat(const char *pchName, float flCountThisSession, double dSessionLength)
{
return false;
}
bool UserStats::GetAchievement(const char *pchName, bool *pbAchieved)
{
return false;
}
bool UserStats::SetAchievement(const char *pchName)
{
return false;
}
bool UserStats::ClearAchievement(const char *pchName)
{
return false;
}
bool UserStats::GetAchievementAndUnlockTime(const char *pchName, bool *pbAchieved, unsigned int *punUnlockTime)
{
return false;
}
bool UserStats::StoreStats()
{
return false;
}
int UserStats::GetAchievementIcon(const char *pchName)
{
return 0;
}
const char *UserStats::GetAchievementDisplayAttribute(const char *pchName, const char *pchKey)
{
return "";
}
bool UserStats::IndicateAchievementProgress(const char *pchName, unsigned int nCurProgress, unsigned int nMaxProgress)
{
return false;
}
unsigned __int64 UserStats::RequestUserStats(SteamID steamIDUser)
{
return 0;
}
bool UserStats::GetUserStat(SteamID steamIDUser, const char *pchName, int *pData)
{
return false;
}
bool UserStats::GetUserStat(SteamID steamIDUser, const char *pchName, float *pData)
{
return false;
}
bool UserStats::GetUserAchievement(SteamID steamIDUser, const char *pchName, bool *pbAchieved)
{
return false;
}
bool UserStats::GetUserAchievementAndUnlockTime(SteamID steamIDUser, const char *pchName, bool *pbAchieved, unsigned int *punUnlockTime)
{
return false;
}
bool UserStats::ResetAllStats(bool bAchievementsToo)
{
return false;
}
unsigned __int64 UserStats::FindOrCreateLeaderboard(const char *pchLeaderboardName, int eLeaderboardSortMethod, int eLeaderboardDisplayType)
{
return 0;
}
unsigned __int64 UserStats::FindLeaderboard(const char *pchLeaderboardName)
{
return 0;
}
const char *UserStats::GetLeaderboardName(unsigned __int64 hSteamLeaderboard)
{
return "";
}
int UserStats::GetLeaderboardEntryCount(unsigned __int64 hSteamLeaderboard)
{
return 0;
}
int UserStats::GetLeaderboardSortMethod(unsigned __int64 hSteamLeaderboard)
{
return 0;
}
int UserStats::GetLeaderboardDisplayType(unsigned __int64 hSteamLeaderboard)
{
return 0;
}
unsigned __int64 UserStats::DownloadLeaderboardEntries(unsigned __int64 hSteamLeaderboard, int eLeaderboardDataRequest, int nRangeStart, int nRangeEnd)
{
return 0;
}
unsigned __int64 UserStats::DownloadLeaderboardEntriesForUsers(unsigned __int64 hSteamLeaderboard, SteamID *prgUsers, int cUsers)
{
return 0;
}
bool UserStats::GetDownloadedLeaderboardEntry(unsigned __int64 hSteamLeaderboardEntries, int index, int *pLeaderboardEntry, int *pDetails, int cDetailsMax)
{
return false;
}
unsigned __int64 UserStats::UploadLeaderboardScore(unsigned __int64 hSteamLeaderboard, int eLeaderboardUploadScoreMethod, int nScore, const int *pScoreDetails, int cScoreDetailsCount)
{
return 0;
}
unsigned __int64 UserStats::AttachLeaderboardUGC(unsigned __int64 hSteamLeaderboard, unsigned __int64 hUGC)
{
return 0;
}
unsigned __int64 UserStats::GetNumberOfCurrentPlayers()
{
return 0;
}
unsigned __int64 UserStats::RequestGlobalAchievementPercentages()
{
return 0;
}
int UserStats::GetMostAchievedAchievementInfo(char *pchName, unsigned int unNameBufLen, float *pflPercent, bool *pbAchieved)
{
return 0;
}
int UserStats::GetNextMostAchievedAchievementInfo(int iIteratorPrevious, char *pchName, unsigned int unNameBufLen, float *pflPercent, bool *pbAchieved)
{
return 0;
}
bool UserStats::GetAchievementAchievedPercent(const char *pchName, float *pflPercent)
{
return false;
}
unsigned __int64 UserStats::RequestGlobalStats(int nHistoryDays)
{
return 0;
}
bool UserStats::GetGlobalStat(const char *pchStatName, __int64 *pData)
{
return false;
}
bool UserStats::GetGlobalStat(const char *pchStatName, double *pData)
{
return false;
}
int UserStats::GetGlobalStatHistory(const char *pchStatName, __int64 *pData, unsigned int cubData)
{
return 0;
}
int UserStats::GetGlobalStatHistory(const char *pchStatName, double *pData, unsigned int cubData)
{
return 0;
}
}

View File

@ -1,48 +0,0 @@
namespace Steam
{
class UserStats
{
public:
virtual bool RequestCurrentStats();
virtual bool GetStat(const char *pchName, int *pData);
virtual bool GetStat(const char *pchName, float *pData);
virtual bool SetStat(const char *pchName, int nData);
virtual bool SetStat(const char *pchName, float fData);
virtual bool UpdateAvgRateStat(const char *pchName, float flCountThisSession, double dSessionLength);
virtual bool GetAchievement(const char *pchName, bool *pbAchieved);
virtual bool SetAchievement(const char *pchName);
virtual bool ClearAchievement(const char *pchName);
virtual bool GetAchievementAndUnlockTime(const char *pchName, bool *pbAchieved, unsigned int *punUnlockTime);
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 unsigned __int64 RequestUserStats(SteamID steamIDUser);
virtual bool GetUserStat(SteamID steamIDUser, const char *pchName, int *pData);
virtual bool GetUserStat(SteamID steamIDUser, const char *pchName, float *pData);
virtual bool GetUserAchievement(SteamID steamIDUser, const char *pchName, bool *pbAchieved);
virtual bool GetUserAchievementAndUnlockTime(SteamID 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 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, SteamID *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 bool GetAchievementAchievedPercent(const char *pchName, float *pflPercent);
virtual unsigned __int64 RequestGlobalStats(int nHistoryDays);
virtual bool GetGlobalStat(const char *pchStatName, __int64 *pData);
virtual bool GetGlobalStat(const char *pchStatName, double *pData);
virtual int GetGlobalStatHistory(const char *pchStatName, __int64 *pData, unsigned int cubData);
virtual int GetGlobalStatHistory(const char *pchStatName, double *pData, unsigned int cubData);
};
}

View File

@ -1,110 +0,0 @@
#include <std_include.hpp>
namespace Steam
{
unsigned int Utils::GetSecondsSinceAppActive()
{
return 0;
}
unsigned int Utils::GetSecondsSinceComputerActive()
{
return 0;
}
int Utils::GetConnectedUniverse()
{
return 1;
}
unsigned int Utils::GetServerRealTime()
{
return 0;
}
const char* Utils::GetIPCountry()
{
return "US";
}
bool Utils::GetImageSize(int iImage, unsigned int *pnWidth, unsigned int *pnHeight)
{
return false;
}
bool Utils::GetImageRGBA(int iImage, unsigned char *pubDest, int nDestBufferSize)
{
return false;
}
bool Utils::GetCSERIPPort(unsigned int *unIP, unsigned short *usPort)
{
return false;
}
unsigned char Utils::GetCurrentBatteryPower()
{
return 255;
}
unsigned int Utils::GetAppID()
{
return 42690;
}
void Utils::SetOverlayNotificationPosition(int eNotificationPosition)
{
if (Steam::Overlay)
{
FARPROC setPosition = GetProcAddress(Steam::Overlay, "SetNotificationPosition");
if (setPosition)
{
((void(*)(int))setPosition)(eNotificationPosition);
}
}
}
bool Utils::IsAPICallCompleted(unsigned __int64 hSteamAPICall, bool *pbFailed)
{
return false;
}
int Utils::GetAPICallFailureReason(unsigned __int64 hSteamAPICall)
{
return -1;
}
bool Utils::GetAPICallResult(unsigned __int64 hSteamAPICall, void *pCallback, int cubCallback, int iCallbackExpected, bool *pbFailed)
{
return false;
}
void Utils::RunFrame()
{
}
unsigned int Utils::GetIPCCallCount()
{
return 0;
}
void Utils::SetWarningMessageHook(void(*pFunction)(int hpipe, const char *message))
{
}
bool Utils::IsOverlayEnabled()
{
return false;
}
bool Utils::BOverlayNeedsPresent()
{
return false;
}
unsigned __int64 Utils::CheckFileSignature(const char *szFileName)
{
return 0;
}
}

View File

@ -1,27 +0,0 @@
namespace Steam
{
class Utils
{
public:
virtual unsigned int GetSecondsSinceAppActive();
virtual unsigned int GetSecondsSinceComputerActive();
virtual int GetConnectedUniverse();
virtual unsigned int GetServerRealTime();
virtual const char *GetIPCountry();
virtual bool GetImageSize(int iImage, unsigned int *pnWidth, unsigned int *pnHeight);
virtual bool GetImageRGBA(int iImage, unsigned char *pubDest, int nDestBufferSize);
virtual bool GetCSERIPPort(unsigned int *unIP, unsigned short *usPort);
virtual unsigned char GetCurrentBatteryPower();
virtual unsigned int GetAppID();
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 void RunFrame();
virtual unsigned int GetIPCCallCount();
virtual void SetWarningMessageHook(void(*pFunction)(int hpipe, const char *message));
virtual bool IsOverlayEnabled();
virtual bool BOverlayNeedsPresent();
virtual unsigned __int64 CheckFileSignature(const char *szFileName);
};
}

View File

@ -1,210 +0,0 @@
#include <std_include.hpp>
namespace Steam
{
HMODULE Overlay = 0;
uint64_t Callbacks::CallID = 0;
std::map<uint64_t, bool> Callbacks::Calls;
std::map<uint64_t, Callbacks::Base*> Callbacks::ResultHandlers;
std::vector<Callbacks::Result> Callbacks::Results;
std::vector<Callbacks::Base*> Callbacks::CallbackList;
uint64_t Callbacks::RegisterCall()
{
Callbacks::Calls[++Callbacks::CallID] = false;
return Callbacks::CallID;
}
void Callbacks::RegisterCallback(Callbacks::Base* handler, int callback)
{
handler->SetICallback(callback);
Callbacks::CallbackList.push_back(handler);
}
void Callbacks::RegisterCallResult(uint64_t call, Callbacks::Base* result)
{
Callbacks::ResultHandlers[call] = result;
}
void Callbacks::ReturnCall(void* data, int size, int type, uint64_t call)
{
Callbacks::Result result;
Callbacks::Calls[call] = true;
result.call = call;
result.data = data;
result.size = size;
result.type = type;
Callbacks::Results.push_back(result);
}
void Callbacks::RunCallbacks()
{
for (auto result : Callbacks::Results)
{
if (Callbacks::ResultHandlers.find(result.call) != Callbacks::ResultHandlers.end())
{
Callbacks::ResultHandlers[result.call]->Run(result.data, false, result.call);
}
for (auto callback : Callbacks::CallbackList)
{
if (callback && callback->GetICallback() == result.type)
{
callback->Run(result.data, false, 0);
}
}
if (result.data)
{
free(result.data);
}
}
Callbacks::Results.clear();
}
extern "C"
{
bool SteamAPI_RestartAppIfNecessary()
{
return false;
}
bool SteamAPI_Init()
{
Overlay = GetModuleHandleA("gameoverlayrenderer.dll");
if (!Overlay)
{
HKEY hRegKey;
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Valve\\Steam", 0, KEY_QUERY_VALUE, &hRegKey) == ERROR_SUCCESS)
{
char steamPath[MAX_PATH] = { 0 };
DWORD dwLength = sizeof(steamPath);
RegQueryValueExA(hRegKey, "InstallPath", NULL, NULL, reinterpret_cast<BYTE*>(steamPath), &dwLength);
RegCloseKey(hRegKey);
SetDllDirectoryA(steamPath);
strcat_s(steamPath, "gameoverlayrenderer.dll");
Overlay = LoadLibraryA(steamPath);
}
}
return true;
}
void SteamAPI_RegisterCallResult(Callbacks::Base* result, uint64_t call)
{
Callbacks::RegisterCallResult(call, result);
}
void SteamAPI_RegisterCallback(Callbacks::Base* handler, int callback)
{
Callbacks::RegisterCallback(handler, callback);
}
void SteamAPI_RunCallbacks()
{
Callbacks::RunCallbacks();
}
void SteamAPI_Shutdown()
{
}
void SteamAPI_UnregisterCallResult()
{
}
void SteamAPI_UnregisterCallback()
{
}
bool SteamGameServer_Init()
{
return true;
}
void SteamGameServer_RunCallbacks()
{
}
void SteamGameServer_Shutdown()
{
}
Steam::Friends* SteamFriends()
{
static Steam::Friends iFriends;
return &iFriends;
}
Steam::Matchmaking* SteamMatchmaking()
{
static Steam::Matchmaking iMatchmaking;
return &iMatchmaking;
}
Steam::MatchmakingServers* SteamMatchmakingServers()
{
static Steam::MatchmakingServers iMatchmakingServers;
return &iMatchmakingServers;
}
Steam::GameServer* SteamGameServer()
{
static Steam::GameServer iGameServer;
return &iGameServer;
}
Steam::MasterServerUpdater* SteamMasterServerUpdater()
{
static Steam::MasterServerUpdater iMasterServerUpdater;
return &iMasterServerUpdater;
}
Steam::Networking* SteamNetworking()
{
static Steam::Networking iNetworking;
return &iNetworking;
}
Steam::RemoteStorage* SteamRemoteStorage()
{
static Steam::RemoteStorage iRemoteStorage;
return &iRemoteStorage;
}
Steam::User* SteamUser()
{
static Steam::User iUser;
return &iUser;
}
Steam::Utils* SteamUtils()
{
static Steam::Utils iUtils;
return &iUtils;
}
Steam::Apps* SteamApps()
{
static Steam::Apps iApps;
return &iApps;
}
Steam::UserStats* SteamUserStats()
{
static Steam::UserStats iUserStats;
return &iUserStats;
}
}
}

View File

@ -1,100 +0,0 @@
#pragma once
#define STEAM_EXPORT extern "C" __declspec(dllexport)
typedef union
{
struct
{
unsigned int AccountID : 32;
unsigned int AccountInstance : 20;
unsigned int AccountType : 4;
int Universe : 8;
};
unsigned long long Bits;
} SteamID;
#include "Interfaces\SteamApps.hpp"
#include "Interfaces\SteamUser.hpp"
#include "Interfaces\SteamUtils.hpp"
#include "Interfaces\SteamFriends.hpp"
#include "Interfaces\SteamUserStats.hpp"
#include "Interfaces\SteamGameServer.hpp"
#include "Interfaces\SteamNetworking.hpp"
#include "Interfaces\SteamMatchmaking.hpp"
#include "Interfaces\SteamRemoteStorage.hpp"
#include "Interfaces\SteamMatchmakingServers.hpp"
#include "Interfaces\SteamMasterServerUpdater.hpp"
namespace Steam
{
class Callbacks
{
public:
class Base
{
public:
Base() : Flags(0), Callback(0) {};
virtual void Run(void *pvParam) = 0;
virtual void Run(void *pvParam, bool bIOFailure, uint64_t hSteamAPICall) = 0;
virtual int GetCallbackSizeBytes() = 0;
int GetICallback() { return Callback; }
void SetICallback(int iCallback) { Callback = iCallback; }
protected:
unsigned char Flags;
int Callback;
};
struct Result
{
void* data;
int size;
int type;
uint64_t call;
};
static uint64_t RegisterCall();
static void RegisterCallback(Base* handler, int callback);
static void RegisterCallResult(uint64_t call, Base* result);
static void ReturnCall(void* data, int size, int type, uint64_t call);
static void RunCallbacks();
private:
static uint64_t CallID;
static std::map<uint64_t, bool> Calls;
static std::map<uint64_t, Base*> ResultHandlers;
static std::vector<Result> Results;
static std::vector<Base*> CallbackList;
};
STEAM_EXPORT bool SteamAPI_RestartAppIfNecessary();
STEAM_EXPORT bool SteamAPI_Init();
STEAM_EXPORT void SteamAPI_RegisterCallResult(Callbacks::Base* result, uint64_t call);
STEAM_EXPORT void SteamAPI_RegisterCallback(Callbacks::Base* handler, int callback);
STEAM_EXPORT void SteamAPI_RunCallbacks();
STEAM_EXPORT void SteamAPI_Shutdown();
STEAM_EXPORT void SteamAPI_UnregisterCallResult();
STEAM_EXPORT void SteamAPI_UnregisterCallback();
STEAM_EXPORT bool SteamGameServer_Init();
STEAM_EXPORT void SteamGameServer_RunCallbacks();
STEAM_EXPORT void SteamGameServer_Shutdown();
STEAM_EXPORT Steam::Friends* SteamFriends();
STEAM_EXPORT Steam::Matchmaking* SteamMatchmaking();
STEAM_EXPORT Steam::MatchmakingServers* SteamMatchmakingServers();
STEAM_EXPORT Steam::GameServer* SteamGameServer();
STEAM_EXPORT Steam::MasterServerUpdater* SteamMasterServerUpdater();
STEAM_EXPORT Steam::Networking* SteamNetworking();
STEAM_EXPORT Steam::RemoteStorage* SteamRemoteStorage();
STEAM_EXPORT Steam::User* SteamUser();
STEAM_EXPORT Steam::Utils* SteamUtils();
STEAM_EXPORT Steam::Apps* SteamApps();
STEAM_EXPORT Steam::UserStats* SteamUserStats();
extern HMODULE Overlay;
}