This commit is contained in:
Michael Fabian Dirks
2016-03-19 14:22:11 +01:00
parent a52326d80a
commit d4de6a5e7b
37 changed files with 929 additions and 656 deletions
+1 -1
View File
@@ -18,7 +18,7 @@
// Macros // Macros
//#define DLL_FUNCTION(type) extern "C" type __stdcall //#define DLL_FUNCTION(type) extern "C" type __stdcall
#define DLL_FUNCTION(type) extern "C" __declspec(dllexport) type __stdcall #define DLL(type) extern "C" __declspec(dllexport) type __stdcall
// C/C++ Includes // C/C++ Includes
#include <math.h> #include <math.h>
+2 -2
View File
@@ -16,7 +16,7 @@
#include "Helper.h" #include "Helper.h"
DLL_FUNCTION(const char*) BS_Helper_FormatUnixTime(uint32_t unTime, const char* pchFormat) { DLL(const char*) BS_Helper_FormatUnixTime(uint32_t unTime, const char* pchFormat) {
char* output = new char[strlen(pchFormat) * 4]; char* output = new char[strlen(pchFormat) * 4];
time_t t = unTime; time_t t = unTime;
struct tm *tm = localtime(&t); struct tm *tm = localtime(&t);
@@ -25,7 +25,7 @@ DLL_FUNCTION(const char*) BS_Helper_FormatUnixTime(uint32_t unTime, const char*
return output; return output;
} }
DLL_FUNCTION(void) BS_Helper_CopyMemoryIntMangle(void* pSource, void* pDest, int32_t iMangling, DLL(void) BS_Helper_CopyMemoryIntMangle(void* pSource, void* pDest, int32_t iMangling,
uint32_t iSourceW, uint32_t iSourceH, uint32_t iDestW, uint32_t iDestH, uint32_t iSourceW, uint32_t iSourceH, uint32_t iDestW, uint32_t iDestH,
uint32_t iAreaX, uint32_t iAreaY, uint32_t iAreaW, uint32_t iAreaH) { uint32_t iAreaX, uint32_t iAreaY, uint32_t iAreaW, uint32_t iAreaH) {
int8_t iMangleByte0 = static_cast<int8_t>((iMangling & 0xFF)); int8_t iMangleByte0 = static_cast<int8_t>((iMangling & 0xFF));
+1 -1
View File
@@ -18,4 +18,4 @@
#include "BlitzSteam.h" #include "BlitzSteam.h"
#include <time.h> #include <time.h>
DLL_FUNCTION(const char*) BS_Helper_FormatUnixTime(uint32_t unTime, const char* pchFormat); DLL(const char*) BS_Helper_FormatUnixTime(uint32_t unTime, const char* pchFormat);
+15 -15
View File
@@ -205,62 +205,62 @@ void BlitzCallback::UnregisterResult() {
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// C-Callables // C-Callables
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(BlitzCallback*) BS_Callback_New(BP_BlitzFunction3_t pFunctionPointer) { DLL(BlitzCallback*) BS_Callback_New(BP_BlitzFunction3_t pFunctionPointer) {
return new BlitzCallback(pFunctionPointer); return new BlitzCallback(pFunctionPointer);
} }
DLL_FUNCTION(void) BS_Callback_Destroy(BlitzCallback* pCallback) { DLL(void) BS_Callback_Destroy(BlitzCallback* pCallback) {
delete pCallback; delete pCallback;
} }
DLL_FUNCTION(int32_t) BS_Callback_GetCallbackSizeBytes(BlitzCallback* pCallback) { DLL(int32_t) BS_Callback_GetCallbackSizeBytes(BlitzCallback* pCallback) {
return pCallback->GetCallbackSizeBytes(); return pCallback->GetCallbackSizeBytes();
} }
DLL_FUNCTION(void) BS_Callback_SetCallback(BlitzCallback* pCallback, int32_t iCallback) { DLL(void) BS_Callback_SetCallback(BlitzCallback* pCallback, int32_t iCallback) {
pCallback->SetCallback(iCallback); pCallback->SetCallback(iCallback);
} }
DLL_FUNCTION(int32_t) BS_Callback_GetCallback(BlitzCallback* pCallback) { DLL(int32_t) BS_Callback_GetCallback(BlitzCallback* pCallback) {
return pCallback->GetCallback(); return pCallback->GetCallback();
} }
DLL_FUNCTION(void) BS_Callback_SetFunction(BlitzCallback* pCallback, BP_BlitzFunction3_t pFunction) { DLL(void) BS_Callback_SetFunction(BlitzCallback* pCallback, BP_BlitzFunction3_t pFunction) {
pCallback->SetFunction(pFunction); pCallback->SetFunction(pFunction);
} }
DLL_FUNCTION(BP_BlitzFunction3_t) BS_Callback_GetFunction(BlitzCallback* pCallback) { DLL(BP_BlitzFunction3_t) BS_Callback_GetFunction(BlitzCallback* pCallback) {
return pCallback->GetFunction(); return pCallback->GetFunction();
} }
DLL_FUNCTION(int32_t) BS_Callback_IsRegistered(BlitzCallback* pCallback) { DLL(int32_t) BS_Callback_IsRegistered(BlitzCallback* pCallback) {
return pCallback->IsRegistered(); return pCallback->IsRegistered();
} }
DLL_FUNCTION(void) BS_Callback_SetRegistered(BlitzCallback* pCallback, int32_t bIsRegistered) { DLL(void) BS_Callback_SetRegistered(BlitzCallback* pCallback, int32_t bIsRegistered) {
pCallback->SetRegistered(!!bIsRegistered); pCallback->SetRegistered(!!bIsRegistered);
} }
DLL_FUNCTION(int32_t) BS_Callback_IsGameServer(BlitzCallback* pCallback) { DLL(int32_t) BS_Callback_IsGameServer(BlitzCallback* pCallback) {
return pCallback->IsGameServer(); return pCallback->IsGameServer();
} }
DLL_FUNCTION(void) BS_Callback_SetGameServer(BlitzCallback* pCallback, int32_t bIsGameServer) { DLL(void) BS_Callback_SetGameServer(BlitzCallback* pCallback, int32_t bIsGameServer) {
pCallback->SetGameServer(!!bIsGameServer); pCallback->SetGameServer(!!bIsGameServer);
} }
DLL_FUNCTION(void) BS_Callback_Register(BlitzCallback* pCallback, uint32_t iCallback) { DLL(void) BS_Callback_Register(BlitzCallback* pCallback, uint32_t iCallback) {
pCallback->Register(iCallback); pCallback->Register(iCallback);
} }
DLL_FUNCTION(void) BS_Callback_Unregister(BlitzCallback* pCallback) { DLL(void) BS_Callback_Unregister(BlitzCallback* pCallback) {
pCallback->Unregister(); pCallback->Unregister();
} }
DLL_FUNCTION(void) BS_Callback_RegisterResult(BlitzCallback* pCallback, SteamAPICall_t* pSteamAPICall, uint32_t iCallback) { DLL(void) BS_Callback_RegisterResult(BlitzCallback* pCallback, SteamAPICall_t* pSteamAPICall, uint32_t iCallback) {
pCallback->RegisterResult(*pSteamAPICall, iCallback); pCallback->RegisterResult(*pSteamAPICall, iCallback);
} }
DLL_FUNCTION(void) BS_Callback_UnregisterResult(BlitzCallback* pCallback) { DLL(void) BS_Callback_UnregisterResult(BlitzCallback* pCallback) {
pCallback->UnregisterResult(); pCallback->UnregisterResult();
} }
+15 -15
View File
@@ -77,20 +77,20 @@ class BlitzCallback : public CCallbackBase {
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// C-Callables // C-Callables
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(BlitzCallback*) BS_Callback_New(BP_BlitzFunction3_t pFunctionPointer); DLL(BlitzCallback*) BS_Callback_New(BP_BlitzFunction3_t pFunctionPointer);
DLL_FUNCTION(void) BS_Callback_Destroy(BlitzCallback* pCallback); DLL(void) BS_Callback_Destroy(BlitzCallback* pCallback);
DLL_FUNCTION(int32_t) BS_Callback_GetCallbackSizeBytes(BlitzCallback* pCallback); DLL(int32_t) BS_Callback_GetCallbackSizeBytes(BlitzCallback* pCallback);
DLL_FUNCTION(void) BS_Callback_SetCallback(BlitzCallback* pCallback, int32_t iCallback); DLL(void) BS_Callback_SetCallback(BlitzCallback* pCallback, int32_t iCallback);
DLL_FUNCTION(int32_t) BS_Callback_GetCallback(BlitzCallback* pCallback); DLL(int32_t) BS_Callback_GetCallback(BlitzCallback* pCallback);
DLL_FUNCTION(void) BS_Callback_SetFunction(BlitzCallback* pCallback, BP_BlitzFunction3_t pFunction); DLL(void) BS_Callback_SetFunction(BlitzCallback* pCallback, BP_BlitzFunction3_t pFunction);
DLL_FUNCTION(BP_BlitzFunction3_t) BS_Callback_GetFunction(BlitzCallback* pCallback); DLL(BP_BlitzFunction3_t) BS_Callback_GetFunction(BlitzCallback* pCallback);
DLL_FUNCTION(void) BS_Callback_SetRegistered(BlitzCallback* pCallback, int32_t bIsRegistered); DLL(void) BS_Callback_SetRegistered(BlitzCallback* pCallback, int32_t bIsRegistered);
DLL_FUNCTION(int32_t) BS_Callback_IsRegistered(BlitzCallback* pCallback); DLL(int32_t) BS_Callback_IsRegistered(BlitzCallback* pCallback);
DLL_FUNCTION(void) BS_Callback_SetGameServer(BlitzCallback* pCallback, int32_t bIsGameServer); DLL(void) BS_Callback_SetGameServer(BlitzCallback* pCallback, int32_t bIsGameServer);
DLL_FUNCTION(int32_t) BS_Callback_IsGameServer(BlitzCallback* pCallback); DLL(int32_t) BS_Callback_IsGameServer(BlitzCallback* pCallback);
DLL_FUNCTION(void) BS_Callback_Register(BlitzCallback* pCallback, uint32_t iCallback); DLL(void) BS_Callback_Register(BlitzCallback* pCallback, uint32_t iCallback);
DLL_FUNCTION(void) BS_Callback_Unregister(BlitzCallback* pCallback); DLL(void) BS_Callback_Unregister(BlitzCallback* pCallback);
DLL_FUNCTION(void) BS_Callback_RegisterResult(BlitzCallback* pCallback, SteamAPICall_t* pSteamAPICall, uint32_t iCallback); DLL(void) BS_Callback_RegisterResult(BlitzCallback* pCallback, SteamAPICall_t* pSteamAPICall, uint32_t iCallback);
DLL_FUNCTION(void) BS_Callback_UnregisterResult(BlitzCallback* pCallback); DLL(void) BS_Callback_UnregisterResult(BlitzCallback* pCallback);
+37 -37
View File
@@ -16,151 +16,151 @@
#include "CSteamID.h" #include "CSteamID.h"
DLL_FUNCTION(CSteamID*) BS_CSteamID_New() { DLL(CSteamID*) BS_CSteamID_New() {
return new CSteamID(); return new CSteamID();
} }
DLL_FUNCTION(CSteamID*) BS_CSteamID_Copy(CSteamID* pOther) { DLL(CSteamID*) BS_CSteamID_Copy(CSteamID* pOther) {
return new CSteamID(*pOther); return new CSteamID(*pOther);
} }
DLL_FUNCTION(void) BS_CSteamID_Destroy(CSteamID* pThis) { DLL(void) BS_CSteamID_Destroy(CSteamID* pThis) {
delete pThis; delete pThis;
} }
DLL_FUNCTION(CSteamID*) BS_CSteamID_New_IdUniverseType(AccountID_t iAccountId, EUniverse eUniverse, EAccountType eAccountType) { DLL(CSteamID*) BS_CSteamID_New_IdUniverseType(AccountID_t iAccountId, EUniverse eUniverse, EAccountType eAccountType) {
return new CSteamID(iAccountId, eUniverse, eAccountType); return new CSteamID(iAccountId, eUniverse, eAccountType);
} }
DLL_FUNCTION(CSteamID*) BS_CSteamID_New_IdInstanceUniverseType(AccountID_t iAccountId, uint32_t iInstance, EUniverse eUniverse, EAccountType eAccountType) { DLL(CSteamID*) BS_CSteamID_New_IdInstanceUniverseType(AccountID_t iAccountId, uint32_t iInstance, EUniverse eUniverse, EAccountType eAccountType) {
return new CSteamID(iAccountId, iInstance, eUniverse, eAccountType); return new CSteamID(iAccountId, iInstance, eUniverse, eAccountType);
} }
DLL_FUNCTION(CSteamID*) BS_CSteamID_FromL(int64_t* pOther) { DLL(CSteamID*) BS_CSteamID_FromL(int64_t* pOther) {
return new CSteamID((uint64_t)*pOther); return new CSteamID((uint64_t)*pOther);
} }
DLL_FUNCTION(int64_t*) BS_CSteamID_ToL(CSteamID* pThis) { DLL(int64_t*) BS_CSteamID_ToL(CSteamID* pThis) {
return new int64_t(pThis->ConvertToUint64()); return new int64_t(pThis->ConvertToUint64());
} }
DLL_FUNCTION(void) BS_CSteamID_Set(CSteamID* pThis, AccountID_t iAccountID, EUniverse eUniverse, EAccountType eAccountType) { DLL(void) BS_CSteamID_Set(CSteamID* pThis, AccountID_t iAccountID, EUniverse eUniverse, EAccountType eAccountType) {
pThis->Set(iAccountID, eUniverse, eAccountType); pThis->Set(iAccountID, eUniverse, eAccountType);
} }
DLL_FUNCTION(void) BS_CSteamID_InstancedSet(CSteamID* pThis, AccountID_t iAccountId, uint32_t iInstance, EUniverse eUniverse, EAccountType eAccountType) { DLL(void) BS_CSteamID_InstancedSet(CSteamID* pThis, AccountID_t iAccountId, uint32_t iInstance, EUniverse eUniverse, EAccountType eAccountType) {
pThis->InstancedSet(iAccountId, iInstance, eUniverse, eAccountType); pThis->InstancedSet(iAccountId, iInstance, eUniverse, eAccountType);
} }
DLL_FUNCTION(void) BS_CSteamID_FullSet(CSteamID* pThis, int64_t* plIdentifier, EUniverse eUniverse, EAccountType eAccountType) { DLL(void) BS_CSteamID_FullSet(CSteamID* pThis, int64_t* plIdentifier, EUniverse eUniverse, EAccountType eAccountType) {
pThis->FullSet(*plIdentifier, eUniverse, eAccountType); pThis->FullSet(*plIdentifier, eUniverse, eAccountType);
} }
DLL_FUNCTION(void) BS_CSteamID_SetFromLong(CSteamID* pThis, int64_t* plSteamID) { DLL(void) BS_CSteamID_SetFromLong(CSteamID* pThis, int64_t* plSteamID) {
pThis->SetFromUint64(*plSteamID); pThis->SetFromUint64(*plSteamID);
} }
DLL_FUNCTION(void) BS_CSteamID_Clear(CSteamID* pThis) { DLL(void) BS_CSteamID_Clear(CSteamID* pThis) {
pThis->Clear(); pThis->Clear();
} }
DLL_FUNCTION(int64_t*) BS_CSteamID_GetStaticAccountKey(CSteamID* pThis) { DLL(int64_t*) BS_CSteamID_GetStaticAccountKey(CSteamID* pThis) {
return new int64_t(pThis->GetStaticAccountKey()); return new int64_t(pThis->GetStaticAccountKey());
} }
DLL_FUNCTION(void) BS_CSteamID_CreateBlankAnonLogon(CSteamID* pThis, EUniverse eUniverse) { DLL(void) BS_CSteamID_CreateBlankAnonLogon(CSteamID* pThis, EUniverse eUniverse) {
pThis->CreateBlankAnonLogon(eUniverse); pThis->CreateBlankAnonLogon(eUniverse);
} }
DLL_FUNCTION(void) BS_CSteamID_CreateBlankAnonUserLogon(CSteamID* pThis, EUniverse eUniverse) { DLL(void) BS_CSteamID_CreateBlankAnonUserLogon(CSteamID* pThis, EUniverse eUniverse) {
pThis->CreateBlankAnonUserLogon(eUniverse); pThis->CreateBlankAnonUserLogon(eUniverse);
} }
DLL_FUNCTION(int32_t) BS_CSteamID_IsBlankAnonAccount(CSteamID* pThis) { DLL(int32_t) BS_CSteamID_IsBlankAnonAccount(CSteamID* pThis) {
return pThis->BBlankAnonAccount(); return pThis->BBlankAnonAccount();
} }
DLL_FUNCTION(int32_t) BS_CSteamID_IsGameServerAccount(CSteamID* pThis) { DLL(int32_t) BS_CSteamID_IsGameServerAccount(CSteamID* pThis) {
return pThis->BGameServerAccount(); return pThis->BGameServerAccount();
} }
DLL_FUNCTION(int32_t) BS_CSteamID_IsPersistentGameServerAccount(CSteamID* pThis) { DLL(int32_t) BS_CSteamID_IsPersistentGameServerAccount(CSteamID* pThis) {
return pThis->BPersistentGameServerAccount(); return pThis->BPersistentGameServerAccount();
} }
DLL_FUNCTION(int32_t) BS_CSteamID_IsAnonGameServerAccount(CSteamID* pThis) { DLL(int32_t) BS_CSteamID_IsAnonGameServerAccount(CSteamID* pThis) {
return pThis->BAnonGameServerAccount(); return pThis->BAnonGameServerAccount();
} }
DLL_FUNCTION(int32_t) BS_CSteamID_IsContentServerAccount(CSteamID* pThis) { DLL(int32_t) BS_CSteamID_IsContentServerAccount(CSteamID* pThis) {
return pThis->BContentServerAccount(); return pThis->BContentServerAccount();
} }
DLL_FUNCTION(int32_t) BS_CSteamID_IsClanAccount(CSteamID* pThis) { DLL(int32_t) BS_CSteamID_IsClanAccount(CSteamID* pThis) {
return pThis->BClanAccount(); return pThis->BClanAccount();
} }
DLL_FUNCTION(int32_t) BS_CSteamID_IsChatAccount(CSteamID* pThis) { DLL(int32_t) BS_CSteamID_IsChatAccount(CSteamID* pThis) {
return pThis->BChatAccount(); return pThis->BChatAccount();
} }
DLL_FUNCTION(int32_t) BS_CSteamID_IsLobby(CSteamID* pThis) { DLL(int32_t) BS_CSteamID_IsLobby(CSteamID* pThis) {
return pThis->IsLobby(); return pThis->IsLobby();
} }
DLL_FUNCTION(int32_t) BS_CSteamID_IsIndividualAccount(CSteamID* pThis) { DLL(int32_t) BS_CSteamID_IsIndividualAccount(CSteamID* pThis) {
return pThis->BIndividualAccount(); return pThis->BIndividualAccount();
} }
DLL_FUNCTION(int32_t) BS_CSteamID_IsAnonAccount(CSteamID* pThis) { DLL(int32_t) BS_CSteamID_IsAnonAccount(CSteamID* pThis) {
return pThis->BAnonAccount(); return pThis->BAnonAccount();
} }
DLL_FUNCTION(int32_t) BS_CSteamID_IsAnonUserAccount(CSteamID* pThis) { DLL(int32_t) BS_CSteamID_IsAnonUserAccount(CSteamID* pThis) {
return pThis->BAnonUserAccount(); return pThis->BAnonUserAccount();
} }
DLL_FUNCTION(int32_t) BS_CSteamID_IsConsoleUserAccount(CSteamID* pThis) { DLL(int32_t) BS_CSteamID_IsConsoleUserAccount(CSteamID* pThis) {
return pThis->BConsoleUserAccount(); return pThis->BConsoleUserAccount();
} }
DLL_FUNCTION(void) BS_CSteamID_SetAccountID(CSteamID* pThis, AccountID_t iAccountId) { DLL(void) BS_CSteamID_SetAccountID(CSteamID* pThis, AccountID_t iAccountId) {
pThis->SetAccountID(iAccountId); pThis->SetAccountID(iAccountId);
} }
DLL_FUNCTION(AccountID_t) BS_CSteamID_GetAccountID(CSteamID* pThis) { DLL(AccountID_t) BS_CSteamID_GetAccountID(CSteamID* pThis) {
return pThis->GetAccountID(); return pThis->GetAccountID();
} }
DLL_FUNCTION(void) BS_CSteamID_SetAccountInstance(CSteamID* pThis, uint32_t iInstance) { DLL(void) BS_CSteamID_SetAccountInstance(CSteamID* pThis, uint32_t iInstance) {
pThis->SetAccountInstance(iInstance); pThis->SetAccountInstance(iInstance);
} }
DLL_FUNCTION(void) BS_CSteamID_ClearIndividualInstance(CSteamID* pThis) { DLL(void) BS_CSteamID_ClearIndividualInstance(CSteamID* pThis) {
pThis->ClearIndividualInstance(); pThis->ClearIndividualInstance();
} }
DLL_FUNCTION(int32_t) BS_CSteamID_HasNoIndividualInstance(CSteamID* pThis) { DLL(int32_t) BS_CSteamID_HasNoIndividualInstance(CSteamID* pThis) {
return pThis->HasNoIndividualInstance(); return pThis->HasNoIndividualInstance();
} }
DLL_FUNCTION(uint32_t) BS_CSteamID_GetAccountInstance(CSteamID* pThis) { DLL(uint32_t) BS_CSteamID_GetAccountInstance(CSteamID* pThis) {
return pThis->GetUnAccountInstance(); return pThis->GetUnAccountInstance();
} }
DLL_FUNCTION(EAccountType) BS_CSteamID_GetEAccountType(CSteamID* pThis) { DLL(EAccountType) BS_CSteamID_GetEAccountType(CSteamID* pThis) {
return pThis->GetEAccountType(); return pThis->GetEAccountType();
} }
DLL_FUNCTION(void) BS_CSteamID_SetEUniverse(CSteamID* pThis, EUniverse eUniverse) { DLL(void) BS_CSteamID_SetEUniverse(CSteamID* pThis, EUniverse eUniverse) {
pThis->SetEUniverse(eUniverse); pThis->SetEUniverse(eUniverse);
} }
DLL_FUNCTION(EUniverse) BS_CSteamID_GetEUniverse(CSteamID* pThis) { DLL(EUniverse) BS_CSteamID_GetEUniverse(CSteamID* pThis) {
return pThis->GetEUniverse(); return pThis->GetEUniverse();
} }
DLL_FUNCTION(int32_t) BS_CSteamID_Compare(CSteamID* pThis, CSteamID* pOther) { DLL(int32_t) BS_CSteamID_Compare(CSteamID* pThis, CSteamID* pOther) {
return /* It can either be Equal (0) or Smaller or Greater. Easy to check. */ return /* It can either be Equal (0) or Smaller or Greater. Easy to check. */
/* Greater */ /* Greater */
(*pThis > *pOther ? 1 : 0) + (*pThis > *pOther ? 1 : 0) +
+37 -37
View File
@@ -20,9 +20,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Constructor // Purpose: Constructor
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(CSteamID*) BS_CSteamID_New(); DLL(CSteamID*) BS_CSteamID_New();
DLL_FUNCTION(CSteamID*) BS_CSteamID_Copy(CSteamID* pOther); DLL(CSteamID*) BS_CSteamID_Copy(CSteamID* pOther);
DLL_FUNCTION(void) BS_CSteamID_Destroy(CSteamID* pThis); DLL(void) BS_CSteamID_Destroy(CSteamID* pThis);
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Constructor // Purpose: Constructor
@@ -30,7 +30,7 @@ DLL_FUNCTION(void) BS_CSteamID_Destroy(CSteamID* pThis);
// eUniverse - Universe this account belongs to // eUniverse - Universe this account belongs to
// eAccountType - Type of account // eAccountType - Type of account
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(CSteamID*) BS_CSteamID_New_IdUniverseType(AccountID_t iAccountId, EUniverse eUniverse, EAccountType eAccountType); DLL(CSteamID*) BS_CSteamID_New_IdUniverseType(AccountID_t iAccountId, EUniverse eUniverse, EAccountType eAccountType);
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Constructor // Purpose: Constructor
@@ -39,7 +39,7 @@ DLL_FUNCTION(CSteamID*) BS_CSteamID_New_IdUniverseType(AccountID_t iAccountId, E
// eUniverse - Universe this account belongs to // eUniverse - Universe this account belongs to
// eAccountType - Type of account // eAccountType - Type of account
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(CSteamID*) BS_CSteamID_New_IdInstanceUniverseType(AccountID_t iAccountId, uint32_t iInstance, EUniverse eUniverse, EAccountType eAccountType); DLL(CSteamID*) BS_CSteamID_New_IdInstanceUniverseType(AccountID_t iAccountId, uint32_t iInstance, EUniverse eUniverse, EAccountType eAccountType);
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Constructor // Purpose: Constructor
@@ -47,8 +47,8 @@ DLL_FUNCTION(CSteamID*) BS_CSteamID_New_IdInstanceUniverseType(AccountID_t iAcco
// Note: Will not accept a uint32 or int32 as input, as that is a probable mistake. // Note: Will not accept a uint32 or int32 as input, as that is a probable mistake.
// See the stubbed out overloads in the private: section for more info. // See the stubbed out overloads in the private: section for more info.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(CSteamID*) BS_CSteamID_FromL(int64_t* pOther); DLL(CSteamID*) BS_CSteamID_FromL(int64_t* pOther);
DLL_FUNCTION(int64_t*) BS_CSteamID_ToL(CSteamID* pThis); DLL(int64_t*) BS_CSteamID_ToL(CSteamID* pThis);
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Sets parameters for steam ID // Purpose: Sets parameters for steam ID
@@ -56,7 +56,7 @@ DLL_FUNCTION(int64_t*) BS_CSteamID_ToL(CSteamID* pThis);
// eUniverse - Universe this account belongs to // eUniverse - Universe this account belongs to
// eAccountType - Type of account // eAccountType - Type of account
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(void) BS_CSteamID_Set(CSteamID* pThis, AccountID_t iAccountID, EUniverse eUniverse, EAccountType eAccountType); DLL(void) BS_CSteamID_Set(CSteamID* pThis, AccountID_t iAccountID, EUniverse eUniverse, EAccountType eAccountType);
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Sets parameters for steam ID // Purpose: Sets parameters for steam ID
@@ -64,24 +64,24 @@ DLL_FUNCTION(void) BS_CSteamID_Set(CSteamID* pThis, AccountID_t iAccountID, EUni
// eUniverse - Universe this account belongs to // eUniverse - Universe this account belongs to
// eAccountType - Type of account // eAccountType - Type of account
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(void) BS_CSteamID_InstancedSet(CSteamID* pThis, AccountID_t iAccountId, uint32_t iInstance, EUniverse eUniverse, EAccountType eAccountType); DLL(void) BS_CSteamID_InstancedSet(CSteamID* pThis, AccountID_t iAccountId, uint32_t iInstance, EUniverse eUniverse, EAccountType eAccountType);
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Initializes a steam ID from its 52 bit parts and universe/type // Purpose: Initializes a steam ID from its 52 bit parts and universe/type
// Input : ulIdentifier - 52 bits of goodness // Input : ulIdentifier - 52 bits of goodness
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(void) BS_CSteamID_FullSet(CSteamID* pThis, int64_t* plIdentifier, EUniverse eUniverse, EAccountType eAccountType); DLL(void) BS_CSteamID_FullSet(CSteamID* pThis, int64_t* plIdentifier, EUniverse eUniverse, EAccountType eAccountType);
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Initializes a steam ID from its 64-bit representation // Purpose: Initializes a steam ID from its 64-bit representation
// Input : ulSteamID - 64-bit representation of a Steam ID // Input : ulSteamID - 64-bit representation of a Steam ID
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(void) BS_CSteamID_SetFromLong(CSteamID* pThis, int64_t* plSteamID); DLL(void) BS_CSteamID_SetFromLong(CSteamID* pThis, int64_t* plSteamID);
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Clear all fields, leaving an invalid ID. // Purpose: Clear all fields, leaving an invalid ID.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(void) BS_CSteamID_Clear(CSteamID* pThis); DLL(void) BS_CSteamID_Clear(CSteamID* pThis);
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Converts the static parts of a steam ID to a 64-bit representation. // Purpose: Converts the static parts of a steam ID to a 64-bit representation.
@@ -90,90 +90,90 @@ DLL_FUNCTION(void) BS_CSteamID_Clear(CSteamID* pThis);
// account key. // account key.
// Output : 64-bit static account key // Output : 64-bit static account key
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(int64_t*) BS_CSteamID_GetStaticAccountKey(CSteamID* pThis); DLL(int64_t*) BS_CSteamID_GetStaticAccountKey(CSteamID* pThis);
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: create an anonymous game server login to be filled in by the AM // Purpose: create an anonymous game server login to be filled in by the AM
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(void) BS_CSteamID_CreateBlankAnonLogon(CSteamID* pThis, EUniverse eUniverse); DLL(void) BS_CSteamID_CreateBlankAnonLogon(CSteamID* pThis, EUniverse eUniverse);
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: create an anonymous game server login to be filled in by the AM // Purpose: create an anonymous game server login to be filled in by the AM
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(void) BS_CSteamID_CreateBlankAnonUserLogon(CSteamID* pThis, EUniverse eUniverse); DLL(void) BS_CSteamID_CreateBlankAnonUserLogon(CSteamID* pThis, EUniverse eUniverse);
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Is this an anonymous game server login that will be filled in? // Purpose: Is this an anonymous game server login that will be filled in?
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(int32_t) BS_CSteamID_IsBlankAnonAccount(CSteamID* pThis); DLL(int32_t) BS_CSteamID_IsBlankAnonAccount(CSteamID* pThis);
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Is this a game server account id? (Either persistent or anonymous) // Purpose: Is this a game server account id? (Either persistent or anonymous)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(int32_t) BS_CSteamID_IsGameServerAccount(CSteamID* pThis); DLL(int32_t) BS_CSteamID_IsGameServerAccount(CSteamID* pThis);
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Is this a persistent (not anonymous) game server account id? // Purpose: Is this a persistent (not anonymous) game server account id?
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(int32_t) BS_CSteamID_IsPersistentGameServerAccount(CSteamID* pThis); DLL(int32_t) BS_CSteamID_IsPersistentGameServerAccount(CSteamID* pThis);
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Is this an anonymous game server account id? // Purpose: Is this an anonymous game server account id?
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(int32_t) BS_CSteamID_IsAnonGameServerAccount(CSteamID* pThis); DLL(int32_t) BS_CSteamID_IsAnonGameServerAccount(CSteamID* pThis);
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Is this a content server account id? // Purpose: Is this a content server account id?
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(int32_t) BS_CSteamID_IsContentServerAccount(CSteamID* pThis); DLL(int32_t) BS_CSteamID_IsContentServerAccount(CSteamID* pThis);
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Is this a clan account id? // Purpose: Is this a clan account id?
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(int32_t) BS_CSteamID_IsClanAccount(CSteamID* pThis); DLL(int32_t) BS_CSteamID_IsClanAccount(CSteamID* pThis);
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Is this a chat account id? // Purpose: Is this a chat account id?
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(int32_t) BS_CSteamID_IsChatAccount(CSteamID* pThis); DLL(int32_t) BS_CSteamID_IsChatAccount(CSteamID* pThis);
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Is this a Lobby? // Purpose: Is this a Lobby?
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(int32_t) BS_CSteamID_IsLobby(CSteamID* pThis); DLL(int32_t) BS_CSteamID_IsLobby(CSteamID* pThis);
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Is this an individual user account id? // Purpose: Is this an individual user account id?
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(int32_t) BS_CSteamID_IsIndividualAccount(CSteamID* pThis); DLL(int32_t) BS_CSteamID_IsIndividualAccount(CSteamID* pThis);
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Is this an anonymous account? // Purpose: Is this an anonymous account?
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(int32_t) BS_CSteamID_IsAnonAccount(CSteamID* pThis); DLL(int32_t) BS_CSteamID_IsAnonAccount(CSteamID* pThis);
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Is this an anonymous user account? ( used to create an account or reset a password ) // Purpose: Is this an anonymous user account? ( used to create an account or reset a password )
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(int32_t) BS_CSteamID_IsAnonUserAccount(CSteamID* pThis); DLL(int32_t) BS_CSteamID_IsAnonUserAccount(CSteamID* pThis);
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Is this a faked up Steam ID for a PSN friend account? // Purpose: Is this a faked up Steam ID for a PSN friend account?
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(int32_t) BS_CSteamID_IsConsoleUserAccount(CSteamID* pThis); DLL(int32_t) BS_CSteamID_IsConsoleUserAccount(CSteamID* pThis);
// simple accessors // simple accessors
DLL_FUNCTION(void) BS_CSteamID_SetAccountID(CSteamID* pThis, AccountID_t iAccountId); DLL(void) BS_CSteamID_SetAccountID(CSteamID* pThis, AccountID_t iAccountId);
DLL_FUNCTION(AccountID_t) BS_CSteamID_GetAccountID(CSteamID* pThis); DLL(AccountID_t) BS_CSteamID_GetAccountID(CSteamID* pThis);
DLL_FUNCTION(void) BS_CSteamID_SetAccountInstance(CSteamID* pThis, uint32_t iInstance); DLL(void) BS_CSteamID_SetAccountInstance(CSteamID* pThis, uint32_t iInstance);
DLL_FUNCTION(void) BS_CSteamID_ClearIndividualInstance(CSteamID* pThis); DLL(void) BS_CSteamID_ClearIndividualInstance(CSteamID* pThis);
DLL_FUNCTION(int32_t) BS_CSteamID_HasNoIndividualInstance(CSteamID* pThis); DLL(int32_t) BS_CSteamID_HasNoIndividualInstance(CSteamID* pThis);
DLL_FUNCTION(uint32_t) BS_CSteamID_GetAccountInstance(CSteamID* pThis); DLL(uint32_t) BS_CSteamID_GetAccountInstance(CSteamID* pThis);
DLL_FUNCTION(EAccountType) BS_CSteamID_GetEAccountType(CSteamID* pThis); DLL(EAccountType) BS_CSteamID_GetEAccountType(CSteamID* pThis);
DLL_FUNCTION(void) BS_CSteamID_SetEUniverse(CSteamID* pThis, EUniverse eUniverse); DLL(void) BS_CSteamID_SetEUniverse(CSteamID* pThis, EUniverse eUniverse);
DLL_FUNCTION(EUniverse) BS_CSteamID_GetEUniverse(CSteamID* pThis); DLL(EUniverse) BS_CSteamID_GetEUniverse(CSteamID* pThis);
DLL_FUNCTION(int32_t) BS_CSteamID_Compare(CSteamID* pThis, CSteamID* pOther); DLL(int32_t) BS_CSteamID_Compare(CSteamID* pThis, CSteamID* pOther);
+24 -24
View File
@@ -16,18 +16,18 @@
#include "Long.h" #include "Long.h"
DLL_FUNCTION(double_t*) BS_Double_New() { DLL(double_t*) BS_Double_New() {
return new double_t; return new double_t;
} }
DLL_FUNCTION(double_t*) BS_Double_Copy(double_t* pOther) { DLL(double_t*) BS_Double_Copy(double_t* pOther) {
return new double_t(*pOther); return new double_t(*pOther);
} }
DLL_FUNCTION(void) BS_Double_Destroy(double_t* pThis) { DLL(void) BS_Double_Destroy(double_t* pThis) {
delete pThis; delete pThis;
} }
char* BS_Double_Buffer = new char[32]; char* BS_Double_Buffer = new char[32];
DLL_FUNCTION(const char*) BS_Double_ToString(double_t* pThis) { DLL(const char*) BS_Double_ToString(double_t* pThis) {
std::stringstream myStream; std::stringstream myStream;
myStream << (*pThis); myStream << (*pThis);
@@ -35,35 +35,35 @@ DLL_FUNCTION(const char*) BS_Double_ToString(double_t* pThis) {
strcpy_s(BS_Double_Buffer, 32, myBuffer); strcpy_s(BS_Double_Buffer, 32, myBuffer);
return BS_Double_Buffer; return BS_Double_Buffer;
} }
DLL_FUNCTION(double_t*) BS_Double_FromString(const char* pString) { DLL(double_t*) BS_Double_FromString(const char* pString) {
double_t* pThis = new double_t; double_t* pThis = new double_t;
std::stringstream myStream = std::stringstream(pString); std::stringstream myStream = std::stringstream(pString);
myStream >> *pThis; myStream >> *pThis;
return pThis; return pThis;
} }
DLL_FUNCTION(double_t*) BS_Double_FromF(float_t fOther) { DLL(double_t*) BS_Double_FromF(float_t fOther) {
return new double_t(fOther); return new double_t(fOther);
} }
DLL_FUNCTION(float_t) BS_Double_ToF(double_t* pThis) { DLL(float_t) BS_Double_ToF(double_t* pThis) {
return (float_t)*pThis; return (float_t)*pThis;
} }
DLL_FUNCTION(double_t*) BS_Double_FromI(int32_t iOther) { DLL(double_t*) BS_Double_FromI(int32_t iOther) {
return new double_t(iOther); return new double_t(iOther);
} }
DLL_FUNCTION(int32_t) BS_Double_ToI(double_t* pThis) { DLL(int32_t) BS_Double_ToI(double_t* pThis) {
return (int32_t)*pThis; return (int32_t)*pThis;
} }
DLL_FUNCTION(double_t*) BS_Double_FromL(int64_t* pOther) { DLL(double_t*) BS_Double_FromL(int64_t* pOther) {
return new double_t((double_t)*pOther); return new double_t((double_t)*pOther);
} }
DLL_FUNCTION(int64_t*) BS_Double_ToL(double_t* pThis) { DLL(int64_t*) BS_Double_ToL(double_t* pThis) {
return new int64_t((int64_t)*pThis); return new int64_t((int64_t)*pThis);
} }
DLL_FUNCTION(int32_t) BS_Double_Compare(double_t* pThis, double_t* pOther) { DLL(int32_t) BS_Double_Compare(double_t* pThis, double_t* pOther) {
return /* It can either be Equal (0) or Smaller or Greater. Easy to check. */ return /* It can either be Equal (0) or Smaller or Greater. Easy to check. */
/* Greater */ /* Greater */
(*pThis > *pOther ? 1 : 0) + (*pThis > *pOther ? 1 : 0) +
@@ -71,52 +71,52 @@ DLL_FUNCTION(int32_t) BS_Double_Compare(double_t* pThis, double_t* pOther) {
(*pThis < *pOther ? -1 : 0); (*pThis < *pOther ? -1 : 0);
} }
DLL_FUNCTION(double_t*) BS_Double_Set(double_t* pThis, double_t* pOther) { DLL(double_t*) BS_Double_Set(double_t* pThis, double_t* pOther) {
*pThis = *pOther; *pThis = *pOther;
return pThis; return pThis;
} }
DLL_FUNCTION(double_t*) BS_Double_Add(double_t* pThis, double_t* pOther) { DLL(double_t*) BS_Double_Add(double_t* pThis, double_t* pOther) {
*pThis += *pOther; *pThis += *pOther;
return pThis; return pThis;
} }
DLL_FUNCTION(double_t*) BS_Double_Sub(double_t* pThis, double_t* pOther) { DLL(double_t*) BS_Double_Sub(double_t* pThis, double_t* pOther) {
*pThis -= *pOther; *pThis -= *pOther;
return pThis; return pThis;
} }
DLL_FUNCTION(double_t*) BS_Double_Div(double_t* pThis, double_t* pOther) { DLL(double_t*) BS_Double_Div(double_t* pThis, double_t* pOther) {
*pThis /= *pOther; *pThis /= *pOther;
return pThis; return pThis;
} }
DLL_FUNCTION(double_t*) BS_Double_Mul(double_t* pThis, double_t* pOther) { DLL(double_t*) BS_Double_Mul(double_t* pThis, double_t* pOther) {
*pThis *= *pOther; *pThis *= *pOther;
return pThis; return pThis;
} }
DLL_FUNCTION(double_t*) BS_Double_Mod(double_t* pThis, double_t* pOther) { DLL(double_t*) BS_Double_Mod(double_t* pThis, double_t* pOther) {
*pThis = fmod(*pThis, *pOther); *pThis = fmod(*pThis, *pOther);
return pThis; return pThis;
} }
DLL_FUNCTION(double_t*) BS_Double_SetF(double_t* pThis, float_t fOther) { DLL(double_t*) BS_Double_SetF(double_t* pThis, float_t fOther) {
*pThis = fOther; *pThis = fOther;
return pThis; return pThis;
} }
DLL_FUNCTION(double_t*) BS_Double_AddF(double_t* pThis, float_t fOther) { DLL(double_t*) BS_Double_AddF(double_t* pThis, float_t fOther) {
*pThis += fOther; *pThis += fOther;
return pThis; return pThis;
} }
DLL_FUNCTION(double_t*) BS_Double_SubF(double_t* pThis, float_t fOther) { DLL(double_t*) BS_Double_SubF(double_t* pThis, float_t fOther) {
*pThis -= fOther; *pThis -= fOther;
return pThis; return pThis;
} }
DLL_FUNCTION(double_t*) BS_Double_DivF(double_t* pThis, float_t fOther) { DLL(double_t*) BS_Double_DivF(double_t* pThis, float_t fOther) {
*pThis /= fOther; *pThis /= fOther;
return pThis; return pThis;
} }
DLL_FUNCTION(double_t*) BS_Double_MulF(double_t* pThis, float_t fOther) { DLL(double_t*) BS_Double_MulF(double_t* pThis, float_t fOther) {
*pThis *= fOther; *pThis *= fOther;
return pThis; return pThis;
} }
DLL_FUNCTION(double_t*) BS_Double_ModF(double_t* pThis, float_t fOther) { DLL(double_t*) BS_Double_ModF(double_t* pThis, float_t fOther) {
*pThis = fmod(*pThis, fOther); *pThis = fmod(*pThis, fOther);
return pThis; return pThis;
} }
+24 -24
View File
@@ -18,34 +18,34 @@
#include "BlitzSteamInternal.h" #include "BlitzSteamInternal.h"
#include <sstream> #include <sstream>
DLL_FUNCTION(double_t*) BS_Double_New(); DLL(double_t*) BS_Double_New();
DLL_FUNCTION(double_t*) BS_Double_Copy(double_t* pRight); DLL(double_t*) BS_Double_Copy(double_t* pRight);
DLL_FUNCTION(void) BS_Double_Destroy(double_t* pThis); DLL(void) BS_Double_Destroy(double_t* pThis);
DLL_FUNCTION(const char*) BS_Double_ToString(double_t* pThis); DLL(const char*) BS_Double_ToString(double_t* pThis);
DLL_FUNCTION(double_t*) BS_Double_FromString(const char* pString); DLL(double_t*) BS_Double_FromString(const char* pString);
DLL_FUNCTION(double_t*) BS_Double_FromF(float_t fOther); DLL(double_t*) BS_Double_FromF(float_t fOther);
DLL_FUNCTION(float_t) BS_Double_ToF(double_t* pThis); DLL(float_t) BS_Double_ToF(double_t* pThis);
DLL_FUNCTION(double_t*) BS_Double_FromI(int32_t iOther); DLL(double_t*) BS_Double_FromI(int32_t iOther);
DLL_FUNCTION(int32_t) BS_Double_ToI(double_t* pThis); DLL(int32_t) BS_Double_ToI(double_t* pThis);
DLL_FUNCTION(double_t*) BS_Double_FromL(int64_t* pOther); DLL(double_t*) BS_Double_FromL(int64_t* pOther);
DLL_FUNCTION(int64_t*) BS_Double_ToL(double_t* pThis); DLL(int64_t*) BS_Double_ToL(double_t* pThis);
DLL_FUNCTION(int32_t) BS_Double_Compare(double_t* pThis, double_t* pOther); DLL(int32_t) BS_Double_Compare(double_t* pThis, double_t* pOther);
DLL_FUNCTION(double_t*) BS_Double_Set(double_t* pThis, double_t* pOther); DLL(double_t*) BS_Double_Set(double_t* pThis, double_t* pOther);
DLL_FUNCTION(double_t*) BS_Double_Add(double_t* pThis, double_t* pOther); DLL(double_t*) BS_Double_Add(double_t* pThis, double_t* pOther);
DLL_FUNCTION(double_t*) BS_Double_Sub(double_t* pThis, double_t* pOther); DLL(double_t*) BS_Double_Sub(double_t* pThis, double_t* pOther);
DLL_FUNCTION(double_t*) BS_Double_Div(double_t* pThis, double_t* pOther); DLL(double_t*) BS_Double_Div(double_t* pThis, double_t* pOther);
DLL_FUNCTION(double_t*) BS_Double_Mul(double_t* pThis, double_t* pOther); DLL(double_t*) BS_Double_Mul(double_t* pThis, double_t* pOther);
DLL_FUNCTION(double_t*) BS_Double_Mod(double_t* pThis, double_t* pOther); DLL(double_t*) BS_Double_Mod(double_t* pThis, double_t* pOther);
DLL_FUNCTION(double_t*) BS_Double_SetF(double_t* pThis, float_t fOther); DLL(double_t*) BS_Double_SetF(double_t* pThis, float_t fOther);
DLL_FUNCTION(double_t*) BS_Double_AddF(double_t* pThis, float_t fOther); DLL(double_t*) BS_Double_AddF(double_t* pThis, float_t fOther);
DLL_FUNCTION(double_t*) BS_Double_SubF(double_t* pThis, float_t fOther); DLL(double_t*) BS_Double_SubF(double_t* pThis, float_t fOther);
DLL_FUNCTION(double_t*) BS_Double_DivF(double_t* pThis, float_t fOther); DLL(double_t*) BS_Double_DivF(double_t* pThis, float_t fOther);
DLL_FUNCTION(double_t*) BS_Double_MulF(double_t* pThis, float_t fOther); DLL(double_t*) BS_Double_MulF(double_t* pThis, float_t fOther);
DLL_FUNCTION(double_t*) BS_Double_ModF(double_t* pThis, float_t fOther); DLL(double_t*) BS_Double_ModF(double_t* pThis, float_t fOther);
+34 -34
View File
@@ -16,18 +16,18 @@
#include "Long.h" #include "Long.h"
DLL_FUNCTION(int64_t*) BS_Long_New() { DLL(int64_t*) BS_Long_New() {
return new int64_t; return new int64_t;
} }
DLL_FUNCTION(int64_t*) BS_Long_Copy(int64_t* pOther) { DLL(int64_t*) BS_Long_Copy(int64_t* pOther) {
return new int64_t(*pOther); return new int64_t(*pOther);
} }
DLL_FUNCTION(void) BS_Long_Destroy(int64_t* pThis) { DLL(void) BS_Long_Destroy(int64_t* pThis) {
delete pThis; delete pThis;
} }
char* BS_Long_Buffer = new char[32]; char* BS_Long_Buffer = new char[32];
DLL_FUNCTION(const char*) BS_Long_ToString(int64_t* pThis) { DLL(const char*) BS_Long_ToString(int64_t* pThis) {
std::stringstream myStream; std::stringstream myStream;
myStream << (*pThis); myStream << (*pThis);
@@ -35,47 +35,47 @@ DLL_FUNCTION(const char*) BS_Long_ToString(int64_t* pThis) {
strcpy_s(BS_Long_Buffer, 32, myBuffer); strcpy_s(BS_Long_Buffer, 32, myBuffer);
return BS_Long_Buffer; return BS_Long_Buffer;
} }
DLL_FUNCTION(int64_t*) BS_Long_FromString(const char* pString) { DLL(int64_t*) BS_Long_FromString(const char* pString) {
int64_t* pThis = new int64_t; int64_t* pThis = new int64_t;
std::stringstream myStream = std::stringstream(pString); std::stringstream myStream = std::stringstream(pString);
myStream >> *pThis; myStream >> *pThis;
return pThis; return pThis;
} }
DLL_FUNCTION(int64_t*) BS_Long_FromI(int32_t iRight) { DLL(int64_t*) BS_Long_FromI(int32_t iRight) {
return new int64_t(iRight); return new int64_t(iRight);
} }
DLL_FUNCTION(int64_t*) BS_Long_FromII(int32_t iLeft, int32_t iRight) { DLL(int64_t*) BS_Long_FromII(int32_t iLeft, int32_t iRight) {
return new int64_t(((int64_t)(iLeft) << 32) + iRight); return new int64_t(((int64_t)(iLeft) << 32) + iRight);
} }
DLL_FUNCTION(int32_t) BS_Long_ToI(int64_t* pThis, int32_t iShift) { DLL(int32_t) BS_Long_ToI(int64_t* pThis, int32_t iShift) {
if (iShift >= 0) if (iShift >= 0)
return (int32_t)(*pThis >> iShift); return (int32_t)(*pThis >> iShift);
else else
return (int32_t)(*pThis << -iShift); return (int32_t)(*pThis << -iShift);
} }
DLL_FUNCTION(int32_t) BS_Long_ToIH(int64_t* pThis) { DLL(int32_t) BS_Long_ToIH(int64_t* pThis) {
return (int32_t)(*pThis >> 32); return (int32_t)(*pThis >> 32);
} }
DLL_FUNCTION(int32_t) BS_Long_ToIL(int64_t* pThis) { DLL(int32_t) BS_Long_ToIL(int64_t* pThis) {
return (int32_t)*pThis; return (int32_t)*pThis;
} }
DLL_FUNCTION(int64_t*) BS_Long_FromF(float_t fOther) { DLL(int64_t*) BS_Long_FromF(float_t fOther) {
return new int64_t((int64_t)fOther); return new int64_t((int64_t)fOther);
} }
DLL_FUNCTION(float_t) BS_Long_ToF(int64_t* pThis) { DLL(float_t) BS_Long_ToF(int64_t* pThis) {
return (float_t)*pThis; return (float_t)*pThis;
} }
DLL_FUNCTION(int64_t*) BS_Long_FromD(double_t* pOther) { DLL(int64_t*) BS_Long_FromD(double_t* pOther) {
return new int64_t((int64_t)*pOther); return new int64_t((int64_t)*pOther);
} }
DLL_FUNCTION(double_t*) BS_Long_ToD(int64_t* pThis) { DLL(double_t*) BS_Long_ToD(int64_t* pThis) {
return new double_t((double_t)*pThis); return new double_t((double_t)*pThis);
} }
DLL_FUNCTION(int32_t) BS_Long_Compare(int64_t* pThis, int64_t* pOther) { DLL(int32_t) BS_Long_Compare(int64_t* pThis, int64_t* pOther) {
return /* It can either be Equal (0) or Smaller or Greater. Easy to check. */ return /* It can either be Equal (0) or Smaller or Greater. Easy to check. */
/* Greater */ /* Greater */
(*pThis > *pOther ? 1 : 0) + (*pThis > *pOther ? 1 : 0) +
@@ -83,82 +83,82 @@ DLL_FUNCTION(int32_t) BS_Long_Compare(int64_t* pThis, int64_t* pOther) {
(*pThis < *pOther ? -1 : 0); (*pThis < *pOther ? -1 : 0);
} }
DLL_FUNCTION(int64_t*) BS_Long_Set(int64_t* pThis, int64_t* pOther) { DLL(int64_t*) BS_Long_Set(int64_t* pThis, int64_t* pOther) {
*pThis = *pOther; *pThis = *pOther;
return pThis; return pThis;
} }
DLL_FUNCTION(int64_t*) BS_Long_Add(int64_t* pThis, int64_t* pOther) { DLL(int64_t*) BS_Long_Add(int64_t* pThis, int64_t* pOther) {
*pThis += *pOther; *pThis += *pOther;
return pThis; return pThis;
} }
DLL_FUNCTION(int64_t*) BS_Long_Sub(int64_t* pThis, int64_t* pOther) { DLL(int64_t*) BS_Long_Sub(int64_t* pThis, int64_t* pOther) {
*pThis -= *pOther; *pThis -= *pOther;
return pThis; return pThis;
} }
DLL_FUNCTION(int64_t*) BS_Long_Div(int64_t* pThis, int64_t* pOther) { DLL(int64_t*) BS_Long_Div(int64_t* pThis, int64_t* pOther) {
*pThis /= *pOther; *pThis /= *pOther;
return pThis; return pThis;
} }
DLL_FUNCTION(int64_t*) BS_Long_Mul(int64_t* pThis, int64_t* pOther) { DLL(int64_t*) BS_Long_Mul(int64_t* pThis, int64_t* pOther) {
*pThis *= *pOther; *pThis *= *pOther;
return pThis; return pThis;
} }
DLL_FUNCTION(int64_t*) BS_Long_Mod(int64_t* pThis, int64_t* pOther) { DLL(int64_t*) BS_Long_Mod(int64_t* pThis, int64_t* pOther) {
*pThis %= *pOther; *pThis %= *pOther;
return pThis; return pThis;
} }
DLL_FUNCTION(int64_t*) BS_Long_SetI(int64_t* pThis, int32_t iRight) { DLL(int64_t*) BS_Long_SetI(int64_t* pThis, int32_t iRight) {
*pThis = iRight; *pThis = iRight;
return pThis; return pThis;
} }
DLL_FUNCTION(int64_t*) BS_Long_AddI(int64_t* pThis, int32_t iRight) { DLL(int64_t*) BS_Long_AddI(int64_t* pThis, int32_t iRight) {
*pThis += iRight; *pThis += iRight;
return pThis; return pThis;
} }
DLL_FUNCTION(int64_t*) BS_Long_SubI(int64_t* pThis, int32_t iRight) { DLL(int64_t*) BS_Long_SubI(int64_t* pThis, int32_t iRight) {
*pThis -= iRight; *pThis -= iRight;
return pThis; return pThis;
} }
DLL_FUNCTION(int64_t*) BS_Long_DivI(int64_t* pThis, int32_t iRight) { DLL(int64_t*) BS_Long_DivI(int64_t* pThis, int32_t iRight) {
*pThis /= iRight; *pThis /= iRight;
return pThis; return pThis;
} }
DLL_FUNCTION(int64_t*) BS_Long_MulI(int64_t* pThis, int32_t iRight) { DLL(int64_t*) BS_Long_MulI(int64_t* pThis, int32_t iRight) {
*pThis *= iRight; *pThis *= iRight;
return pThis; return pThis;
} }
DLL_FUNCTION(int64_t*) BS_Long_ModI(int64_t* pThis, int32_t iRight) { DLL(int64_t*) BS_Long_ModI(int64_t* pThis, int32_t iRight) {
*pThis %= iRight; *pThis %= iRight;
return pThis; return pThis;
} }
DLL_FUNCTION(int64_t*) BS_Long_SetII(int64_t* pThis, int32_t iLeft, int32_t iRight) { DLL(int64_t*) BS_Long_SetII(int64_t* pThis, int32_t iLeft, int32_t iRight) {
*pThis = (((int64_t)iLeft << 32) + iRight); *pThis = (((int64_t)iLeft << 32) + iRight);
return pThis; return pThis;
} }
DLL_FUNCTION(int64_t*) BS_Long_AddII(int64_t* pThis, int32_t iLeft, int32_t iRight) { DLL(int64_t*) BS_Long_AddII(int64_t* pThis, int32_t iLeft, int32_t iRight) {
*pThis += (((int64_t)iLeft << 32) + iRight); *pThis += (((int64_t)iLeft << 32) + iRight);
return pThis; return pThis;
} }
DLL_FUNCTION(int64_t*) BS_Long_SubII(int64_t* pThis, int32_t iLeft, int32_t iRight) { DLL(int64_t*) BS_Long_SubII(int64_t* pThis, int32_t iLeft, int32_t iRight) {
*pThis -= (((int64_t)iLeft << 32) + iRight); *pThis -= (((int64_t)iLeft << 32) + iRight);
return pThis; return pThis;
} }
DLL_FUNCTION(int64_t*) BS_Long_DivII(int64_t* pThis, int32_t iLeft, int32_t iRight) { DLL(int64_t*) BS_Long_DivII(int64_t* pThis, int32_t iLeft, int32_t iRight) {
*pThis /= (((int64_t)iLeft << 32) + iRight); *pThis /= (((int64_t)iLeft << 32) + iRight);
return pThis; return pThis;
} }
DLL_FUNCTION(int64_t*) BS_Long_MulII(int64_t* pThis, int32_t iLeft, int32_t iRight) { DLL(int64_t*) BS_Long_MulII(int64_t* pThis, int32_t iLeft, int32_t iRight) {
*pThis *= (((int64_t)iLeft << 32) + iRight); *pThis *= (((int64_t)iLeft << 32) + iRight);
return pThis; return pThis;
} }
DLL_FUNCTION(int64_t*) BS_Long_ModII(int64_t* pThis, int32_t iLeft, int32_t iRight) { DLL(int64_t*) BS_Long_ModII(int64_t* pThis, int32_t iLeft, int32_t iRight) {
*pThis %= (((int64_t)iLeft << 32) + iRight); *pThis %= (((int64_t)iLeft << 32) + iRight);
return pThis; return pThis;
} }
DLL_FUNCTION(int64_t*) BS_Long_Shift(int64_t* pThis, int32_t iRight) { DLL(int64_t*) BS_Long_Shift(int64_t* pThis, int32_t iRight) {
if (iRight >= 0) if (iRight >= 0)
*pThis >>= iRight; *pThis >>= iRight;
else else
+34 -34
View File
@@ -18,46 +18,46 @@
#include "BlitzSteamInternal.h" #include "BlitzSteamInternal.h"
#include <sstream> #include <sstream>
DLL_FUNCTION(int64_t*) BS_Long_New(); DLL(int64_t*) BS_Long_New();
DLL_FUNCTION(int64_t*) BS_Long_Copy(int64_t* pRight); DLL(int64_t*) BS_Long_Copy(int64_t* pRight);
DLL_FUNCTION(void) BS_Long_Destroy(int64_t* pThis); DLL(void) BS_Long_Destroy(int64_t* pThis);
DLL_FUNCTION(const char*) BS_Long_ToString(int64_t* pThis); DLL(const char*) BS_Long_ToString(int64_t* pThis);
DLL_FUNCTION(int64_t*) BS_Long_FromString(const char* pString); DLL(int64_t*) BS_Long_FromString(const char* pString);
DLL_FUNCTION(int64_t*) BS_Long_FromI(int32_t iRight); DLL(int64_t*) BS_Long_FromI(int32_t iRight);
DLL_FUNCTION(int64_t*) BS_Long_FromII(int32_t iLeft, int32_t iRight); DLL(int64_t*) BS_Long_FromII(int32_t iLeft, int32_t iRight);
DLL_FUNCTION(int32_t) BS_Long_ToI(int64_t* pThis, int32_t iShift); DLL(int32_t) BS_Long_ToI(int64_t* pThis, int32_t iShift);
DLL_FUNCTION(int32_t) BS_Long_ToIH(int64_t* pThis); DLL(int32_t) BS_Long_ToIH(int64_t* pThis);
DLL_FUNCTION(int32_t) BS_Long_ToIL(int64_t* pThis); DLL(int32_t) BS_Long_ToIL(int64_t* pThis);
DLL_FUNCTION(int64_t*) BS_Long_FromF(float_t fOther); DLL(int64_t*) BS_Long_FromF(float_t fOther);
DLL_FUNCTION(float_t) BS_Long_ToF(int64_t* pThis); DLL(float_t) BS_Long_ToF(int64_t* pThis);
DLL_FUNCTION(int64_t*) BS_Long_FromD(double_t* pOther); DLL(int64_t*) BS_Long_FromD(double_t* pOther);
DLL_FUNCTION(double_t*) BS_Long_ToD(int64_t* pThis); DLL(double_t*) BS_Long_ToD(int64_t* pThis);
DLL_FUNCTION(int32_t) BS_Long_Compare(int64_t* pThis, int64_t* pOther); DLL(int32_t) BS_Long_Compare(int64_t* pThis, int64_t* pOther);
DLL_FUNCTION(int64_t*) BS_Long_Set(int64_t* pThis, int64_t* pOther); DLL(int64_t*) BS_Long_Set(int64_t* pThis, int64_t* pOther);
DLL_FUNCTION(int64_t*) BS_Long_Add(int64_t* pThis, int64_t* pOther); DLL(int64_t*) BS_Long_Add(int64_t* pThis, int64_t* pOther);
DLL_FUNCTION(int64_t*) BS_Long_Sub(int64_t* pThis, int64_t* pOther); DLL(int64_t*) BS_Long_Sub(int64_t* pThis, int64_t* pOther);
DLL_FUNCTION(int64_t*) BS_Long_Div(int64_t* pThis, int64_t* pOther); DLL(int64_t*) BS_Long_Div(int64_t* pThis, int64_t* pOther);
DLL_FUNCTION(int64_t*) BS_Long_Mul(int64_t* pThis, int64_t* pOther); DLL(int64_t*) BS_Long_Mul(int64_t* pThis, int64_t* pOther);
DLL_FUNCTION(int64_t*) BS_Long_Mod(int64_t* pThis, int64_t* pOther); DLL(int64_t*) BS_Long_Mod(int64_t* pThis, int64_t* pOther);
DLL_FUNCTION(int64_t*) BS_Long_SetI(int64_t* pThis, int32_t iRight); DLL(int64_t*) BS_Long_SetI(int64_t* pThis, int32_t iRight);
DLL_FUNCTION(int64_t*) BS_Long_AddI(int64_t* pThis, int32_t iRight); DLL(int64_t*) BS_Long_AddI(int64_t* pThis, int32_t iRight);
DLL_FUNCTION(int64_t*) BS_Long_SubI(int64_t* pThis, int32_t iRight); DLL(int64_t*) BS_Long_SubI(int64_t* pThis, int32_t iRight);
DLL_FUNCTION(int64_t*) BS_Long_DivI(int64_t* pThis, int32_t iRight); DLL(int64_t*) BS_Long_DivI(int64_t* pThis, int32_t iRight);
DLL_FUNCTION(int64_t*) BS_Long_MulI(int64_t* pThis, int32_t iRight); DLL(int64_t*) BS_Long_MulI(int64_t* pThis, int32_t iRight);
DLL_FUNCTION(int64_t*) BS_Long_ModI(int64_t* pThis, int32_t iRight); DLL(int64_t*) BS_Long_ModI(int64_t* pThis, int32_t iRight);
DLL_FUNCTION(int64_t*) BS_Long_SetII(int64_t* pThis, int32_t iLeft, int32_t iRight); DLL(int64_t*) BS_Long_SetII(int64_t* pThis, int32_t iLeft, int32_t iRight);
DLL_FUNCTION(int64_t*) BS_Long_AddII(int64_t* pThis, int32_t iLeft, int32_t iRight); DLL(int64_t*) BS_Long_AddII(int64_t* pThis, int32_t iLeft, int32_t iRight);
DLL_FUNCTION(int64_t*) BS_Long_SubII(int64_t* pThis, int32_t iLeft, int32_t iRight); DLL(int64_t*) BS_Long_SubII(int64_t* pThis, int32_t iLeft, int32_t iRight);
DLL_FUNCTION(int64_t*) BS_Long_DivII(int64_t* pThis, int32_t iLeft, int32_t iRight); DLL(int64_t*) BS_Long_DivII(int64_t* pThis, int32_t iLeft, int32_t iRight);
DLL_FUNCTION(int64_t*) BS_Long_MulII(int64_t* pThis, int32_t iLeft, int32_t iRight); DLL(int64_t*) BS_Long_MulII(int64_t* pThis, int32_t iLeft, int32_t iRight);
DLL_FUNCTION(int64_t*) BS_Long_ModII(int64_t* pThis, int32_t iLeft, int32_t iRight); DLL(int64_t*) BS_Long_ModII(int64_t* pThis, int32_t iLeft, int32_t iRight);
DLL_FUNCTION(int64_t*) BS_Long_Shift(int64_t* pThis, int32_t iShift); DLL(int64_t*) BS_Long_Shift(int64_t* pThis, int32_t iShift);
+15 -15
View File
@@ -16,62 +16,62 @@
#include "Memory.h" #include "Memory.h"
DLL_FUNCTION(void*) BS_Memory_Alloc(uint32_t iSize) { DLL(void*) BS_Memory_Alloc(uint32_t iSize) {
return malloc(iSize); return malloc(iSize);
} }
DLL_FUNCTION(void*) BS_Memory_ReAlloc(void* pMemory, uint32_t iNewSize) { DLL(void*) BS_Memory_ReAlloc(void* pMemory, uint32_t iNewSize) {
return realloc(pMemory, iNewSize); return realloc(pMemory, iNewSize);
} }
DLL_FUNCTION(void) BS_Memory_Free(void* pMemory) { DLL(void) BS_Memory_Free(void* pMemory) {
free(pMemory); free(pMemory);
} }
DLL_FUNCTION(void) BS_Memory_PokeByte(void* pMemory, uint32_t offset, int8_t value) { DLL(void) BS_Memory_PokeByte(void* pMemory, uint32_t offset, int8_t value) {
*((reinterpret_cast<uint8_t*>(pMemory) + offset)) = value; *((reinterpret_cast<uint8_t*>(pMemory) + offset)) = value;
} }
DLL_FUNCTION(int32_t) BS_Memory_PeekByte(void* pMemory, uint32_t offset) { DLL(int32_t) BS_Memory_PeekByte(void* pMemory, uint32_t offset) {
return *(reinterpret_cast<uint8_t*>(pMemory) + offset); return *(reinterpret_cast<uint8_t*>(pMemory) + offset);
} }
DLL_FUNCTION(void) BS_Memory_PokeShort(void* pMemory, uint32_t offset, int16_t value) { DLL(void) BS_Memory_PokeShort(void* pMemory, uint32_t offset, int16_t value) {
*(reinterpret_cast<int16_t*>(reinterpret_cast<uint8_t*>(pMemory) + offset)) = value; *(reinterpret_cast<int16_t*>(reinterpret_cast<uint8_t*>(pMemory) + offset)) = value;
} }
DLL_FUNCTION(int32_t) BS_Memory_PeekShort(void* pMemory, uint32_t offset) { DLL(int32_t) BS_Memory_PeekShort(void* pMemory, uint32_t offset) {
return *(int16_t*)(reinterpret_cast<uint8_t*>(pMemory) + offset); return *(int16_t*)(reinterpret_cast<uint8_t*>(pMemory) + offset);
} }
DLL_FUNCTION(void) BS_Memory_PokeInt(void* pMemory, uint32_t offset, int32_t value) { DLL(void) BS_Memory_PokeInt(void* pMemory, uint32_t offset, int32_t value) {
*(reinterpret_cast<uint32_t*>(reinterpret_cast<uint8_t*>(pMemory) + offset)) = value; *(reinterpret_cast<uint32_t*>(reinterpret_cast<uint8_t*>(pMemory) + offset)) = value;
} }
DLL_FUNCTION(int32_t) BS_Memory_PeekInt(void* pMemory, uint32_t offset) { DLL(int32_t) BS_Memory_PeekInt(void* pMemory, uint32_t offset) {
return *(int32_t*)(reinterpret_cast<uint8_t*>(pMemory) + offset); return *(int32_t*)(reinterpret_cast<uint8_t*>(pMemory) + offset);
} }
DLL_FUNCTION(void) BS_Memory_PokeFloat(void* pMemory, uint32_t offset, float_t value) { DLL(void) BS_Memory_PokeFloat(void* pMemory, uint32_t offset, float_t value) {
*(reinterpret_cast<float_t*>(reinterpret_cast<uint8_t*>(pMemory) + offset)) = value; *(reinterpret_cast<float_t*>(reinterpret_cast<uint8_t*>(pMemory) + offset)) = value;
} }
DLL_FUNCTION(float_t) BS_Memory_PeekFloat(void* pMemory, uint32_t offset) { DLL(float_t) BS_Memory_PeekFloat(void* pMemory, uint32_t offset) {
return *(float_t*)(reinterpret_cast<uint8_t*>(pMemory) + offset); return *(float_t*)(reinterpret_cast<uint8_t*>(pMemory) + offset);
} }
DLL_FUNCTION(void) BS_Memory_PokeLong(void* pMemory, uint32_t offset, int64_t* value) { DLL(void) BS_Memory_PokeLong(void* pMemory, uint32_t offset, int64_t* value) {
*(reinterpret_cast<int64_t*>(reinterpret_cast<uint8_t*>(pMemory) + offset)) = *value; *(reinterpret_cast<int64_t*>(reinterpret_cast<uint8_t*>(pMemory) + offset)) = *value;
} }
DLL_FUNCTION(int64_t*) BS_Memory_PeekLong(void* pMemory, uint32_t offset) { DLL(int64_t*) BS_Memory_PeekLong(void* pMemory, uint32_t offset) {
return new int64_t(*(reinterpret_cast<int64_t*>(reinterpret_cast<uint8_t*>(pMemory) + offset))); return new int64_t(*(reinterpret_cast<int64_t*>(reinterpret_cast<uint8_t*>(pMemory) + offset)));
} }
DLL_FUNCTION(void) BS_Memory_PokeDouble(void* pMemory, uint32_t offset, double_t* value) { DLL(void) BS_Memory_PokeDouble(void* pMemory, uint32_t offset, double_t* value) {
*(reinterpret_cast<double_t*>(reinterpret_cast<uint8_t*>(pMemory) + offset)) = *value; *(reinterpret_cast<double_t*>(reinterpret_cast<uint8_t*>(pMemory) + offset)) = *value;
} }
DLL_FUNCTION(double_t*) BS_Memory_PeekDouble(void* pMemory, uint32_t offset) { DLL(double_t*) BS_Memory_PeekDouble(void* pMemory, uint32_t offset) {
return new double_t(*(reinterpret_cast<double_t*>(reinterpret_cast<uint8_t*>(pMemory) + offset))); return new double_t(*(reinterpret_cast<double_t*>(reinterpret_cast<uint8_t*>(pMemory) + offset)));
} }
+15 -15
View File
@@ -19,24 +19,24 @@
#include <stdlib.h> #include <stdlib.h>
DLL_FUNCTION(void*) BS_Memory_Alloc(uint32_t iSize); DLL(void*) BS_Memory_Alloc(uint32_t iSize);
DLL_FUNCTION(void*) BS_Memory_ReAlloc(void* pMemory, uint32_t iNewSize); DLL(void*) BS_Memory_ReAlloc(void* pMemory, uint32_t iNewSize);
DLL_FUNCTION(void) BS_Memory_Free(void* pMemory); DLL(void) BS_Memory_Free(void* pMemory);
DLL_FUNCTION(void) BS_Memory_PokeByte(void* pMemory, uint32_t offset, int8_t value); DLL(void) BS_Memory_PokeByte(void* pMemory, uint32_t offset, int8_t value);
DLL_FUNCTION(int32_t) BS_Memory_PeekByte(void* pMemory, uint32_t offset); DLL(int32_t) BS_Memory_PeekByte(void* pMemory, uint32_t offset);
DLL_FUNCTION(void) BS_Memory_PokeShort(void* pMemory, uint32_t offset, int16_t value); DLL(void) BS_Memory_PokeShort(void* pMemory, uint32_t offset, int16_t value);
DLL_FUNCTION(int32_t) BS_Memory_PeekShort(void* pMemory, uint32_t offset); DLL(int32_t) BS_Memory_PeekShort(void* pMemory, uint32_t offset);
DLL_FUNCTION(void) BS_Memory_PokeInt(void* pMemory, uint32_t offset, int32_t value); DLL(void) BS_Memory_PokeInt(void* pMemory, uint32_t offset, int32_t value);
DLL_FUNCTION(int32_t) BS_Memory_PeekInt(void* pMemory, uint32_t offset); DLL(int32_t) BS_Memory_PeekInt(void* pMemory, uint32_t offset);
DLL_FUNCTION(void) BS_Memory_PokeFloat(void* pMemory, uint32_t offset, float_t value); DLL(void) BS_Memory_PokeFloat(void* pMemory, uint32_t offset, float_t value);
DLL_FUNCTION(float_t) BS_Memory_PeekFloat(void* pMemory, uint32_t offset); DLL(float_t) BS_Memory_PeekFloat(void* pMemory, uint32_t offset);
DLL_FUNCTION(void) BS_Memory_PokeLong(void* pMemory, uint32_t offset, int64_t* value); DLL(void) BS_Memory_PokeLong(void* pMemory, uint32_t offset, int64_t* value);
DLL_FUNCTION(int64_t*) BS_Memory_PeekLong(void* pMemory, uint32_t offset); DLL(int64_t*) BS_Memory_PeekLong(void* pMemory, uint32_t offset);
DLL_FUNCTION(void) BS_Memory_PokeDouble(void* pMemory, uint32_t offset, double_t* value); DLL(void) BS_Memory_PokeDouble(void* pMemory, uint32_t offset, double_t* value);
DLL_FUNCTION(double_t*) BS_Memory_PeekDouble(void* pMemory, uint32_t offset); DLL(double_t*) BS_Memory_PeekDouble(void* pMemory, uint32_t offset);
+8 -8
View File
@@ -23,16 +23,16 @@
// //
//----------------------------------------------------------------------------------------------------------------------------------------------------------// //----------------------------------------------------------------------------------------------------------------------------------------------------------//
DLL_FUNCTION(int32_t) BS_SteamAPI_Init() { DLL(int32_t) BS_SteamAPI_Init() {
return SteamAPI_Init(); return SteamAPI_Init();
} }
DLL_FUNCTION(void) BS_SteamAPI_Shutdown() { DLL(void) BS_SteamAPI_Shutdown() {
SteamAPI_Shutdown(); SteamAPI_Shutdown();
} }
// checks if a local Steam client is running // checks if a local Steam client is running
DLL_FUNCTION(int32_t) BS_SteamAPI_IsSteamRunning() { DLL(int32_t) BS_SteamAPI_IsSteamRunning() {
return SteamAPI_IsSteamRunning(); return SteamAPI_IsSteamRunning();
} }
@@ -47,16 +47,16 @@ DLL_FUNCTION(int32_t) BS_SteamAPI_IsSteamRunning() {
// //
// NOTE: This function should be used only if you are using CEG or not using Steam's DRM. Once applied // NOTE: This function should be used only if you are using CEG or not using Steam's DRM. Once applied
// to your executable, Steam's DRM will handle restarting through Steam if necessary. // to your executable, Steam's DRM will handle restarting through Steam if necessary.
DLL_FUNCTION(int32_t) BS_SteamAPI_RestartAppIfNecessary(uint32_t unOwnAppID) { DLL(int32_t) BS_SteamAPI_RestartAppIfNecessary(uint32_t unOwnAppID) {
return SteamAPI_RestartAppIfNecessary(unOwnAppID); return SteamAPI_RestartAppIfNecessary(unOwnAppID);
} }
// crash dump recording functions // crash dump recording functions
DLL_FUNCTION(void) BS_SteamAPI_WriteMiniDump(uint32_t uStructuredExceptionCode, void* pvExceptionInfo, uint32_t uBuildID) { DLL(void) BS_SteamAPI_WriteMiniDump(uint32_t uStructuredExceptionCode, void* pvExceptionInfo, uint32_t uBuildID) {
SteamAPI_WriteMiniDump(uStructuredExceptionCode, pvExceptionInfo, uBuildID); SteamAPI_WriteMiniDump(uStructuredExceptionCode, pvExceptionInfo, uBuildID);
} }
DLL_FUNCTION(void) BS_SteamAPI_SetMiniDumpComment(const char* pchMsg) { DLL(void) BS_SteamAPI_SetMiniDumpComment(const char* pchMsg) {
SteamAPI_SetMiniDumpComment(pchMsg); SteamAPI_SetMiniDumpComment(pchMsg);
} }
@@ -65,7 +65,7 @@ DLL_FUNCTION(void) BS_SteamAPI_SetMiniDumpComment(const char* pchMsg) {
// will free all API-related memory associated with the calling thread. // will free all API-related memory associated with the calling thread.
// This memory is also released automatically by SteamAPI_RunCallbacks(), so // This memory is also released automatically by SteamAPI_RunCallbacks(), so
// a single-threaded program does not need to explicitly call this function. // a single-threaded program does not need to explicitly call this function.
DLL_FUNCTION(void) BS_SteamAPI_ReleaseCurrentThreadMemory() { DLL(void) BS_SteamAPI_ReleaseCurrentThreadMemory() {
return SteamAPI_ReleaseCurrentThreadMemory(); return SteamAPI_ReleaseCurrentThreadMemory();
} }
@@ -94,6 +94,6 @@ DLL_FUNCTION(void) BS_SteamAPI_ReleaseCurrentThreadMemory() {
// SteamAPI_RunCallbacks is safe to call from multiple threads simultaneously, // SteamAPI_RunCallbacks is safe to call from multiple threads simultaneously,
// but if you choose to do this, callback code may be executed on any thread. // but if you choose to do this, callback code may be executed on any thread.
DLL_FUNCTION(void) BS_SteamAPI_RunCallbacks() { DLL(void) BS_SteamAPI_RunCallbacks() {
SteamAPI_RunCallbacks(); SteamAPI_RunCallbacks();
} }
+6 -6
View File
@@ -22,29 +22,29 @@
// This interface lets you detect installed apps for the local Steam client, useful for debugging tools // This interface lets you detect installed apps for the local Steam client, useful for debugging tools
// to offer lists of apps to debug via Steam. // to offer lists of apps to debug via Steam.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(ISteamAppList*) BS_SteamAppList() { DLL(ISteamAppList*) BS_SteamAppList() {
return SteamAppList(); return SteamAppList();
} }
DLL_FUNCTION(int32_t) BS_ISteamAppList_GetNumInstalledApps(ISteamAppList* lpSteamAppList) { DLL(int32_t) BS_ISteamAppList_GetNumInstalledApps(ISteamAppList* lpSteamAppList) {
return lpSteamAppList->GetNumInstalledApps(); return lpSteamAppList->GetNumInstalledApps();
} }
DLL_FUNCTION(int32_t) BS_ISteamAppList_GetInstalledApps(ISteamAppList* lpSteamAppList, AppId_t *pvecAppID, uint32_t unMaxAppIDs) { DLL(int32_t) BS_ISteamAppList_GetInstalledApps(ISteamAppList* lpSteamAppList, AppId_t *pvecAppID, uint32_t unMaxAppIDs) {
return lpSteamAppList->GetInstalledApps(pvecAppID, unMaxAppIDs); return lpSteamAppList->GetInstalledApps(pvecAppID, unMaxAppIDs);
} }
// returns -1 if no name was found // returns -1 if no name was found
DLL_FUNCTION(int32_t) BS_ISteamAppList_GetAppName(ISteamAppList* lpSteamAppList, AppId_t nAppID, const char* pchName, uint32_t cchNameMax) { DLL(int32_t) BS_ISteamAppList_GetAppName(ISteamAppList* lpSteamAppList, AppId_t nAppID, const char* pchName, uint32_t cchNameMax) {
return lpSteamAppList->GetAppName(nAppID, (char*)pchName, cchNameMax); return lpSteamAppList->GetAppName(nAppID, (char*)pchName, cchNameMax);
} }
// returns -1 if no dir was found // returns -1 if no dir was found
DLL_FUNCTION(int32_t) BS_ISteamAppList_GetAppInstallDir(ISteamAppList* lpSteamAppList, AppId_t nAppID, char* pchDirectoryBuffer, uint32_t cchDirectoryMax) { DLL(int32_t) BS_ISteamAppList_GetAppInstallDir(ISteamAppList* lpSteamAppList, AppId_t nAppID, char* pchDirectoryBuffer, uint32_t cchDirectoryMax) {
return lpSteamAppList->GetAppInstallDir(nAppID, pchDirectoryBuffer, cchDirectoryMax); return lpSteamAppList->GetAppInstallDir(nAppID, pchDirectoryBuffer, cchDirectoryMax);
} }
// return the buildid of this app, may change at any time based on backend updates to the game // return the buildid of this app, may change at any time based on backend updates to the game
DLL_FUNCTION(int32_t) BS_ISteamAppList_GetAppBuildId(ISteamAppList* lpSteamAppList, AppId_t nAppID) { DLL(int32_t) BS_ISteamAppList_GetAppBuildId(ISteamAppList* lpSteamAppList, AppId_t nAppID) {
return lpSteamAppList->GetAppBuildId(nAppID); return lpSteamAppList->GetAppBuildId(nAppID);
} }
+25 -25
View File
@@ -19,72 +19,72 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: interface to app data // Purpose: interface to app data
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(ISteamApps*) BS_SteamApps() { DLL(ISteamApps*) BS_SteamApps() {
return SteamApps(); return SteamApps();
} }
DLL_FUNCTION(int32_t) BS_ISteamApps_IsSubscribed(ISteamApps* lpSteamApps) { DLL(int32_t) BS_ISteamApps_IsSubscribed(ISteamApps* lpSteamApps) {
return lpSteamApps->BIsSubscribed(); return lpSteamApps->BIsSubscribed();
} }
DLL_FUNCTION(int32_t) BS_ISteamApps_IsLowViolence(ISteamApps* lpSteamApps) { DLL(int32_t) BS_ISteamApps_IsLowViolence(ISteamApps* lpSteamApps) {
return lpSteamApps->BIsLowViolence(); return lpSteamApps->BIsLowViolence();
} }
DLL_FUNCTION(int32_t) BS_ISteamApps_IsCybercafe(ISteamApps* lpSteamApps) { DLL(int32_t) BS_ISteamApps_IsCybercafe(ISteamApps* lpSteamApps) {
return lpSteamApps->BIsCybercafe(); return lpSteamApps->BIsCybercafe();
} }
DLL_FUNCTION(int32_t) BS_ISteamApps_IsVACBanned(ISteamApps* lpSteamApps) { DLL(int32_t) BS_ISteamApps_IsVACBanned(ISteamApps* lpSteamApps) {
return lpSteamApps->BIsVACBanned(); return lpSteamApps->BIsVACBanned();
} }
DLL_FUNCTION(const char*) BS_ISteamApps_GetCurrentGameLanguage(ISteamApps* lpSteamApps) { DLL(const char*) BS_ISteamApps_GetCurrentGameLanguage(ISteamApps* lpSteamApps) {
return lpSteamApps->GetCurrentGameLanguage(); return lpSteamApps->GetCurrentGameLanguage();
} }
DLL_FUNCTION(const char*) BS_ISteamApps_GetAvailableGameLanguages(ISteamApps* lpSteamApps) { DLL(const char*) BS_ISteamApps_GetAvailableGameLanguages(ISteamApps* lpSteamApps) {
return lpSteamApps->GetAvailableGameLanguages(); return lpSteamApps->GetAvailableGameLanguages();
} }
// only use this member if you need to check ownership of another game related to yours, a demo for example // only use this member if you need to check ownership of another game related to yours, a demo for example
DLL_FUNCTION(int32_t) BS_ISteamApps_IsSubscribedApp(ISteamApps* lpSteamApps, AppId_t appID) { DLL(int32_t) BS_ISteamApps_IsSubscribedApp(ISteamApps* lpSteamApps, AppId_t appID) {
return lpSteamApps->BIsSubscribedApp(appID); return lpSteamApps->BIsSubscribedApp(appID);
} }
// Takes AppID of DLC and checks if the user owns the DLC & if the DLC is installed // Takes AppID of DLC and checks if the user owns the DLC & if the DLC is installed
DLL_FUNCTION(int32_t) BS_ISteamApps_IsDlcInstalled(ISteamApps* lpSteamApps, AppId_t appID) { DLL(int32_t) BS_ISteamApps_IsDlcInstalled(ISteamApps* lpSteamApps, AppId_t appID) {
return lpSteamApps->BIsDlcInstalled(appID); return lpSteamApps->BIsDlcInstalled(appID);
} }
// returns the Unix time of the purchase of the app // returns the Unix time of the purchase of the app
DLL_FUNCTION(int32_t) BS_ISteamApps_GetEarliestPurchaseUnixTime(ISteamApps* lpSteamApps, AppId_t appID) { DLL(int32_t) BS_ISteamApps_GetEarliestPurchaseUnixTime(ISteamApps* lpSteamApps, AppId_t appID) {
return lpSteamApps->GetEarliestPurchaseUnixTime(appID); return lpSteamApps->GetEarliestPurchaseUnixTime(appID);
} }
// Checks if the user is subscribed to the current app through a free weekend // Checks if the user is subscribed to the current app through a free weekend
// This function will return false for users who have a retail or other type of license // This function will return false for users who have a retail or other type of license
// Before using, please ask your Valve technical contact how to package and secure your free weekened // Before using, please ask your Valve technical contact how to package and secure your free weekened
DLL_FUNCTION(int32_t) BS_ISteamApps_IsSubscribedFromFreeWeekend(ISteamApps* lpSteamApps) { DLL(int32_t) BS_ISteamApps_IsSubscribedFromFreeWeekend(ISteamApps* lpSteamApps) {
return lpSteamApps->BIsSubscribedFromFreeWeekend(); return lpSteamApps->BIsSubscribedFromFreeWeekend();
} }
// Returns the number of DLC pieces for the running app // Returns the number of DLC pieces for the running app
DLL_FUNCTION(int32_t) BS_ISteamApps_GetDLCCount(ISteamApps* lpSteamApps) { DLL(int32_t) BS_ISteamApps_GetDLCCount(ISteamApps* lpSteamApps) {
return lpSteamApps->GetDLCCount(); return lpSteamApps->GetDLCCount();
} }
// Returns metadata for DLC by index, of range [0, GetDLCCount()] // Returns metadata for DLC by index, of range [0, GetDLCCount()]
DLL_FUNCTION(int32_t) BS_ISteamApps_GetDLCDataByIndex(ISteamApps* lpSteamApps, uint32_t iDLC, AppId_t *pAppIdBuffer, bool* pbAvailableBuffer, char *pchNameBuffer, uint32_t cchNameBufferSize) { DLL(int32_t) BS_ISteamApps_GetDLCDataByIndex(ISteamApps* lpSteamApps, uint32_t iDLC, AppId_t *pAppIdBuffer, bool* pbAvailableBuffer, char *pchNameBuffer, uint32_t cchNameBufferSize) {
return lpSteamApps->BGetDLCDataByIndex(iDLC, pAppIdBuffer, (bool*)pbAvailableBuffer, pchNameBuffer, cchNameBufferSize); return lpSteamApps->BGetDLCDataByIndex(iDLC, pAppIdBuffer, (bool*)pbAvailableBuffer, pchNameBuffer, cchNameBufferSize);
} }
// Install/Uninstall control for optional DLC // Install/Uninstall control for optional DLC
DLL_FUNCTION(void) BS_ISteamApps_InstallDLC(ISteamApps* lpSteamApps, AppId_t nAppID) { DLL(void) BS_ISteamApps_InstallDLC(ISteamApps* lpSteamApps, AppId_t nAppID) {
lpSteamApps->InstallDLC(nAppID); lpSteamApps->InstallDLC(nAppID);
} }
DLL_FUNCTION(void) BS_ISteamApps_UninstallDLC(ISteamApps* lpSteamApps, AppId_t nAppID) { DLL(void) BS_ISteamApps_UninstallDLC(ISteamApps* lpSteamApps, AppId_t nAppID) {
lpSteamApps->UninstallDLC(nAppID); lpSteamApps->UninstallDLC(nAppID);
} }
@@ -93,37 +93,37 @@ DLL_FUNCTION(void) BS_ISteamApps_UninstallDLC(ISteamApps* lpSteamApps, AppId_t n
// to users when they purchase the game, before the game ships. // to users when they purchase the game, before the game ships.
// You'll receive an AppProofOfPurchaseKeyResponse_t callback when // You'll receive an AppProofOfPurchaseKeyResponse_t callback when
// the key is available (which may be immediately). // the key is available (which may be immediately).
DLL_FUNCTION(void) BS_ISteamApps_RequestAppProofOfPurchaseKey(ISteamApps* lpSteamApps, AppId_t nAppID) { DLL(void) BS_ISteamApps_RequestAppProofOfPurchaseKey(ISteamApps* lpSteamApps, AppId_t nAppID) {
lpSteamApps->RequestAppProofOfPurchaseKey(nAppID); lpSteamApps->RequestAppProofOfPurchaseKey(nAppID);
} }
// returns current beta branch name, 'public' is the default branch // returns current beta branch name, 'public' is the default branch
DLL_FUNCTION(int32_t) BS_ISteamApps_GetCurrentBetaName(ISteamApps* lpSteamApps, char* pchNameBuffer, int cchNameBufferSize) { DLL(int32_t) BS_ISteamApps_GetCurrentBetaName(ISteamApps* lpSteamApps, char* pchNameBuffer, int cchNameBufferSize) {
return lpSteamApps->GetCurrentBetaName(pchNameBuffer, cchNameBufferSize); return lpSteamApps->GetCurrentBetaName(pchNameBuffer, cchNameBufferSize);
} }
// signal Steam that game files seems corrupt or missing // signal Steam that game files seems corrupt or missing
DLL_FUNCTION(int32_t) BS_ISteamApps_MarkContentCorrupt(ISteamApps* lpSteamApps, uint32_t bMissingFilesOnly) { DLL(int32_t) BS_ISteamApps_MarkContentCorrupt(ISteamApps* lpSteamApps, uint32_t bMissingFilesOnly) {
return lpSteamApps->MarkContentCorrupt(bMissingFilesOnly != 0); return lpSteamApps->MarkContentCorrupt(bMissingFilesOnly != 0);
} }
// return installed depots in mount order // return installed depots in mount order
DLL_FUNCTION(int32_t) BS_ISteamApps_GetInstalledDepots(ISteamApps* lpSteamApps, AppId_t nAppID, DepotId_t *pDepotsBuffer, uint32_t cMaxDepots) { DLL(int32_t) BS_ISteamApps_GetInstalledDepots(ISteamApps* lpSteamApps, AppId_t nAppID, DepotId_t *pDepotsBuffer, uint32_t cMaxDepots) {
return lpSteamApps->GetInstalledDepots(nAppID, pDepotsBuffer, cMaxDepots); return lpSteamApps->GetInstalledDepots(nAppID, pDepotsBuffer, cMaxDepots);
} }
// returns current app install folder for AppID, returns folder name length // returns current app install folder for AppID, returns folder name length
DLL_FUNCTION(int32_t) BS_ISteamApps_GetAppInstallDir(ISteamApps* lpSteamApps, AppId_t appID, char *pchFolderBuffer, uint32_t cchFolderBufferSize) { DLL(int32_t) BS_ISteamApps_GetAppInstallDir(ISteamApps* lpSteamApps, AppId_t appID, char *pchFolderBuffer, uint32_t cchFolderBufferSize) {
return lpSteamApps->GetAppInstallDir(appID, pchFolderBuffer, cchFolderBufferSize); return lpSteamApps->GetAppInstallDir(appID, pchFolderBuffer, cchFolderBufferSize);
} }
// returns true if that app is installed (not necessarily owned) // returns true if that app is installed (not necessarily owned)
DLL_FUNCTION(int32_t) BS_ISteamApps_IsAppInstalled(ISteamApps* lpSteamApps, AppId_t appID) { DLL(int32_t) BS_ISteamApps_IsAppInstalled(ISteamApps* lpSteamApps, AppId_t appID) {
return lpSteamApps->BIsAppInstalled(appID); return lpSteamApps->BIsAppInstalled(appID);
} }
// returns the SteamID of the original owner. If different from current user, it's borrowed // returns the SteamID of the original owner. If different from current user, it's borrowed
DLL_FUNCTION(CSteamID*) BS_ISteamApps_GetAppOwner(ISteamApps* lpSteamApps) { DLL(CSteamID*) BS_ISteamApps_GetAppOwner(ISteamApps* lpSteamApps) {
return new CSteamID(lpSteamApps->GetAppOwner()); return new CSteamID(lpSteamApps->GetAppOwner());
} }
@@ -131,16 +131,16 @@ DLL_FUNCTION(CSteamID*) BS_ISteamApps_GetAppOwner(ISteamApps* lpSteamApps) {
// Parameter names starting with the character '@' are reserved for internal use and will always return and empty string. // Parameter names starting with the character '@' are reserved for internal use and will always return and empty string.
// Parameter names starting with an underscore '_' are reserved for steam features -- they can be queried by the game, // Parameter names starting with an underscore '_' are reserved for steam features -- they can be queried by the game,
// but it is advised that you not param names beginning with an underscore for your own features. // but it is advised that you not param names beginning with an underscore for your own features.
DLL_FUNCTION(const char*) BS_ISteamApps_GetLaunchQueryParam(ISteamApps* lpSteamApps, const char *pchKey) { DLL(const char*) BS_ISteamApps_GetLaunchQueryParam(ISteamApps* lpSteamApps, const char *pchKey) {
return lpSteamApps->GetLaunchQueryParam(pchKey); return lpSteamApps->GetLaunchQueryParam(pchKey);
} }
// get download progress for optional DLC // get download progress for optional DLC
DLL_FUNCTION(int32_t) BS_ISteamApps_GetDlcDownloadProgress(ISteamApps* lpSteamApps, AppId_t nAppID, uint64_t* pLLBytesDownloaded, uint64_t* pLLBytesTotal) { DLL(int32_t) BS_ISteamApps_GetDlcDownloadProgress(ISteamApps* lpSteamApps, AppId_t nAppID, uint64_t* pLLBytesDownloaded, uint64_t* pLLBytesTotal) {
return lpSteamApps->GetDlcDownloadProgress(nAppID, pLLBytesDownloaded, pLLBytesTotal); return lpSteamApps->GetDlcDownloadProgress(nAppID, pLLBytesDownloaded, pLLBytesTotal);
} }
// return the buildid of this app, may change at any time based on backend updates to the game // return the buildid of this app, may change at any time based on backend updates to the game
DLL_FUNCTION(int32_t) BS_ISteamApps_GetAppBuildId(ISteamApps* lpSteamApps) { DLL(int32_t) BS_ISteamApps_GetAppBuildId(ISteamApps* lpSteamApps) {
return lpSteamApps->GetAppBuildId(); return lpSteamApps->GetAppBuildId();
} }
+32 -32
View File
@@ -16,132 +16,132 @@
#include "BlitzSteam.h" #include "BlitzSteam.h"
DLL_FUNCTION(ISteamClient*) BS_SteamClient() { DLL(ISteamClient*) BS_SteamClient() {
return SteamClient(); return SteamClient();
} }
DLL_FUNCTION(HSteamPipe) BS_ISteamClient_CreateSteamPipe(ISteamClient* lpSteamClient) { DLL(HSteamPipe) BS_ISteamClient_CreateSteamPipe(ISteamClient* lpSteamClient) {
return lpSteamClient->CreateSteamPipe(); return lpSteamClient->CreateSteamPipe();
} }
DLL_FUNCTION(int32_t) BS_ISteamClient_ReleaseSteamPipe(ISteamClient* lpSteamClient, HSteamPipe hSteamPipe) { DLL(int32_t) BS_ISteamClient_ReleaseSteamPipe(ISteamClient* lpSteamClient, HSteamPipe hSteamPipe) {
return lpSteamClient->BReleaseSteamPipe(hSteamPipe); return lpSteamClient->BReleaseSteamPipe(hSteamPipe);
} }
DLL_FUNCTION(HSteamUser) BS_ISteamClient_ConnectToGlobalUser(ISteamClient* lpSteamClient, HSteamPipe hSteamPipe) { DLL(HSteamUser) BS_ISteamClient_ConnectToGlobalUser(ISteamClient* lpSteamClient, HSteamPipe hSteamPipe) {
return lpSteamClient->ConnectToGlobalUser(hSteamPipe); return lpSteamClient->ConnectToGlobalUser(hSteamPipe);
} }
DLL_FUNCTION(void) BS_ISteamClient_SetLocalIPBinding(ISteamClient* lpSteamClient, uint32_t unIP, uint16 usPort) { DLL(void) BS_ISteamClient_SetLocalIPBinding(ISteamClient* lpSteamClient, uint32_t unIP, uint16 usPort) {
return lpSteamClient->SetLocalIPBinding(unIP, usPort); return lpSteamClient->SetLocalIPBinding(unIP, usPort);
} }
DLL_FUNCTION(HSteamUser) BS_ISteamClient_CreateLocalUser(ISteamClient* lpSteamClient, HSteamPipe* phSteamPipe, EAccountType eAccountType) { DLL(HSteamUser) BS_ISteamClient_CreateLocalUser(ISteamClient* lpSteamClient, HSteamPipe* phSteamPipe, EAccountType eAccountType) {
return lpSteamClient->CreateLocalUser(phSteamPipe, eAccountType); return lpSteamClient->CreateLocalUser(phSteamPipe, eAccountType);
} }
DLL_FUNCTION(void) BS_ISteamClient_ReleaseUser(ISteamClient* lpSteamClient, HSteamPipe hSteamPipe, HSteamUser hSteamUser) { DLL(void) BS_ISteamClient_ReleaseUser(ISteamClient* lpSteamClient, HSteamPipe hSteamPipe, HSteamUser hSteamUser) {
return lpSteamClient->ReleaseUser(hSteamPipe, hSteamUser); return lpSteamClient->ReleaseUser(hSteamPipe, hSteamUser);
} }
DLL_FUNCTION(int32_t) BS_ISteamClient_GetIPCCallCount(ISteamClient* lpSteamClient) { DLL(int32_t) BS_ISteamClient_GetIPCCallCount(ISteamClient* lpSteamClient) {
return lpSteamClient->GetIPCCallCount(); return lpSteamClient->GetIPCCallCount();
} }
DLL_FUNCTION(int32_t) BS_ISteamClient_ShutdownIfAllPipesClosed(ISteamClient* lpSteamClient) { DLL(int32_t) BS_ISteamClient_ShutdownIfAllPipesClosed(ISteamClient* lpSteamClient) {
return lpSteamClient->BShutdownIfAllPipesClosed(); return lpSteamClient->BShutdownIfAllPipesClosed();
} }
// Interfaces // Interfaces
DLL_FUNCTION(ISteamAppList*) BS_ISteamClient_GetSteamAppList(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) { DLL(ISteamAppList*) BS_ISteamClient_GetSteamAppList(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) {
return lpSteamClient->GetISteamAppList(hSteamUser, hSteamPipe, pchVersion); return lpSteamClient->GetISteamAppList(hSteamUser, hSteamPipe, pchVersion);
} }
DLL_FUNCTION(ISteamApps*) BS_ISteamClient_GetSteamApps(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) { DLL(ISteamApps*) BS_ISteamClient_GetSteamApps(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) {
return lpSteamClient->GetISteamApps(hSteamUser, hSteamPipe, pchVersion); return lpSteamClient->GetISteamApps(hSteamUser, hSteamPipe, pchVersion);
} }
DLL_FUNCTION(ISteamController*) BS_ISteamClient_GetSteamController(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) { DLL(ISteamController*) BS_ISteamClient_GetSteamController(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) {
return lpSteamClient->GetISteamController(hSteamUser, hSteamPipe, pchVersion); return lpSteamClient->GetISteamController(hSteamUser, hSteamPipe, pchVersion);
} }
DLL_FUNCTION(ISteamFriends*) BS_ISteamClient_GetSteamFriends(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) { DLL(ISteamFriends*) BS_ISteamClient_GetSteamFriends(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) {
return lpSteamClient->GetISteamFriends(hSteamUser, hSteamPipe, pchVersion); return lpSteamClient->GetISteamFriends(hSteamUser, hSteamPipe, pchVersion);
} }
DLL_FUNCTION(ISteamGameServer*) BS_ISteamClient_GetSteamGameServer(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) { DLL(ISteamGameServer*) BS_ISteamClient_GetSteamGameServer(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) {
return lpSteamClient->GetISteamGameServer(hSteamUser, hSteamPipe, pchVersion); return lpSteamClient->GetISteamGameServer(hSteamUser, hSteamPipe, pchVersion);
} }
DLL_FUNCTION(ISteamGameServerStats*) BS_ISteamClient_GetSteamGameServerStats(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) { DLL(ISteamGameServerStats*) BS_ISteamClient_GetSteamGameServerStats(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) {
return lpSteamClient->GetISteamGameServerStats(hSteamUser, hSteamPipe, pchVersion); return lpSteamClient->GetISteamGameServerStats(hSteamUser, hSteamPipe, pchVersion);
} }
DLL_FUNCTION(ISteamHTMLSurface*) BS_ISteamClient_GetSteamHTMLSurface(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) { DLL(ISteamHTMLSurface*) BS_ISteamClient_GetSteamHTMLSurface(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) {
return lpSteamClient->GetISteamHTMLSurface(hSteamUser, hSteamPipe, pchVersion); return lpSteamClient->GetISteamHTMLSurface(hSteamUser, hSteamPipe, pchVersion);
} }
DLL_FUNCTION(ISteamHTTP*) BS_ISteamClient_GetSteamHTTP(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) { DLL(ISteamHTTP*) BS_ISteamClient_GetSteamHTTP(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) {
return lpSteamClient->GetISteamHTTP(hSteamUser, hSteamPipe, pchVersion); return lpSteamClient->GetISteamHTTP(hSteamUser, hSteamPipe, pchVersion);
} }
DLL_FUNCTION(ISteamInventory*) BS_ISteamClient_GetSteamInventory(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) { DLL(ISteamInventory*) BS_ISteamClient_GetSteamInventory(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) {
return lpSteamClient->GetISteamInventory(hSteamUser, hSteamPipe, pchVersion); return lpSteamClient->GetISteamInventory(hSteamUser, hSteamPipe, pchVersion);
} }
DLL_FUNCTION(ISteamMatchmaking*) BS_ISteamClient_GetSteamMatchmaking(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) { DLL(ISteamMatchmaking*) BS_ISteamClient_GetSteamMatchmaking(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) {
return lpSteamClient->GetISteamMatchmaking(hSteamUser, hSteamPipe, pchVersion); return lpSteamClient->GetISteamMatchmaking(hSteamUser, hSteamPipe, pchVersion);
} }
DLL_FUNCTION(ISteamMatchmakingServers*) BS_ISteamClient_GetSteamMatchmakingServers(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) { DLL(ISteamMatchmakingServers*) BS_ISteamClient_GetSteamMatchmakingServers(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) {
return lpSteamClient->GetISteamMatchmakingServers(hSteamUser, hSteamPipe, pchVersion); return lpSteamClient->GetISteamMatchmakingServers(hSteamUser, hSteamPipe, pchVersion);
} }
DLL_FUNCTION(ISteamMusic*) BS_ISteamClient_GetSteamMusic(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) { DLL(ISteamMusic*) BS_ISteamClient_GetSteamMusic(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) {
return lpSteamClient->GetISteamMusic(hSteamUser, hSteamPipe, pchVersion); return lpSteamClient->GetISteamMusic(hSteamUser, hSteamPipe, pchVersion);
} }
DLL_FUNCTION(ISteamMusicRemote*) BS_ISteamClient_GetSteamMusicRemote(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) { DLL(ISteamMusicRemote*) BS_ISteamClient_GetSteamMusicRemote(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) {
return lpSteamClient->GetISteamMusicRemote(hSteamUser, hSteamPipe, pchVersion); return lpSteamClient->GetISteamMusicRemote(hSteamUser, hSteamPipe, pchVersion);
} }
DLL_FUNCTION(ISteamNetworking*) BS_ISteamClient_GetSteamNetworking(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) { DLL(ISteamNetworking*) BS_ISteamClient_GetSteamNetworking(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) {
return lpSteamClient->GetISteamNetworking(hSteamUser, hSteamPipe, pchVersion); return lpSteamClient->GetISteamNetworking(hSteamUser, hSteamPipe, pchVersion);
} }
DLL_FUNCTION(ISteamRemoteStorage*) BS_ISteamClient_GetSteamRemoteStorage(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) { DLL(ISteamRemoteStorage*) BS_ISteamClient_GetSteamRemoteStorage(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) {
return lpSteamClient->GetISteamRemoteStorage(hSteamUser, hSteamPipe, pchVersion); return lpSteamClient->GetISteamRemoteStorage(hSteamUser, hSteamPipe, pchVersion);
} }
DLL_FUNCTION(ISteamScreenshots*) BS_ISteamClient_GetSteamScreenshots(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) { DLL(ISteamScreenshots*) BS_ISteamClient_GetSteamScreenshots(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) {
return lpSteamClient->GetISteamScreenshots(hSteamUser, hSteamPipe, pchVersion); return lpSteamClient->GetISteamScreenshots(hSteamUser, hSteamPipe, pchVersion);
} }
DLL_FUNCTION(ISteamUGC*) BS_ISteamClient_GetSteamUGC(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) { DLL(ISteamUGC*) BS_ISteamClient_GetSteamUGC(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) {
return lpSteamClient->GetISteamUGC(hSteamUser, hSteamPipe, pchVersion); return lpSteamClient->GetISteamUGC(hSteamUser, hSteamPipe, pchVersion);
} }
DLL_FUNCTION(ISteamUnifiedMessages*) BS_ISteamClient_GetSteamUnifiedMessages(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) { DLL(ISteamUnifiedMessages*) BS_ISteamClient_GetSteamUnifiedMessages(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) {
return lpSteamClient->GetISteamUnifiedMessages(hSteamUser, hSteamPipe, pchVersion); return lpSteamClient->GetISteamUnifiedMessages(hSteamUser, hSteamPipe, pchVersion);
} }
DLL_FUNCTION(ISteamUser*) BS_ISteamClient_GetSteamUser(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) { DLL(ISteamUser*) BS_ISteamClient_GetSteamUser(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) {
return lpSteamClient->GetISteamUser(hSteamUser, hSteamPipe, pchVersion); return lpSteamClient->GetISteamUser(hSteamUser, hSteamPipe, pchVersion);
} }
DLL_FUNCTION(ISteamUserStats*) BS_ISteamClient_GetSteamUserStats(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) { DLL(ISteamUserStats*) BS_ISteamClient_GetSteamUserStats(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) {
return lpSteamClient->GetISteamUserStats(hSteamUser, hSteamPipe, pchVersion); return lpSteamClient->GetISteamUserStats(hSteamUser, hSteamPipe, pchVersion);
} }
DLL_FUNCTION(ISteamUtils*) BS_ISteamClient_GetSteamUtils(ISteamClient* lpSteamClient, HSteamPipe hSteamPipe, const char *pchVersion) { DLL(ISteamUtils*) BS_ISteamClient_GetSteamUtils(ISteamClient* lpSteamClient, HSteamPipe hSteamPipe, const char *pchVersion) {
return lpSteamClient->GetISteamUtils(hSteamPipe, pchVersion); return lpSteamClient->GetISteamUtils(hSteamPipe, pchVersion);
} }
DLL_FUNCTION(ISteamVideo*) BS_ISteamClient_GetSteamVideo(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) { DLL(ISteamVideo*) BS_ISteamClient_GetSteamVideo(ISteamClient* lpSteamClient, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion) {
return lpSteamClient->GetISteamVideo(hSteamUser, hSteamPipe, pchVersion); return lpSteamClient->GetISteamVideo(hSteamUser, hSteamPipe, pchVersion);
} }
// Callbacks & Hooks // Callbacks & Hooks
DLL_FUNCTION(void) BS_ISteamClient_SetWarningMessageHook(ISteamClient* lpSteamClient, SteamAPIWarningMessageHook_t fpfunction) { DLL(void) BS_ISteamClient_SetWarningMessageHook(ISteamClient* lpSteamClient, SteamAPIWarningMessageHook_t fpfunction) {
lpSteamClient->SetWarningMessageHook(fpfunction); lpSteamClient->SetWarningMessageHook(fpfunction);
} }
+20 -20
View File
@@ -19,39 +19,39 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Native Steam controller support API // Purpose: Native Steam controller support API
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(ISteamController*) BS_SteamController() { DLL(ISteamController*) BS_SteamController() {
return SteamController(); return SteamController();
} }
// Init and Shutdown must be called when starting/ending use of this interface // Init and Shutdown must be called when starting/ending use of this interface
DLL_FUNCTION(int32_t) BS_ISteamController_Init(ISteamController* lpSteamController) { DLL(int32_t) BS_ISteamController_Init(ISteamController* lpSteamController) {
return lpSteamController->Init(); return lpSteamController->Init();
} }
// Init and Shutdown must be called when starting/ending use of this interface // Init and Shutdown must be called when starting/ending use of this interface
DLL_FUNCTION(int32_t) BS_ISteamController_Shutdown(ISteamController* lpSteamController) { DLL(int32_t) BS_ISteamController_Shutdown(ISteamController* lpSteamController) {
return lpSteamController->Shutdown(); return lpSteamController->Shutdown();
} }
// Pump callback/callresult events // Pump callback/callresult events
// Note: SteamAPI_RunCallbacks will do this for you, so you should never need to call this directly. // Note: SteamAPI_RunCallbacks will do this for you, so you should never need to call this directly.
DLL_FUNCTION(void) BS_ISteamController_RunFrame(ISteamController* lpSteamController) { DLL(void) BS_ISteamController_RunFrame(ISteamController* lpSteamController) {
lpSteamController->RunFrame(); lpSteamController->RunFrame();
} }
// Enumerate currently connected controllers // Enumerate currently connected controllers
// handlesOut should point to a STEAM_CONTROLLER_MAX_COUNT sized array of ControllerHandle_t handles // handlesOut should point to a STEAM_CONTROLLER_MAX_COUNT sized array of ControllerHandle_t handles
// Returns the number of handles written to handlesOut // Returns the number of handles written to handlesOut
DLL_FUNCTION(int32_t) BS_ISteamController_GetConnectedControllers(ISteamController* lpSteamController, ControllerHandle_t* pHandlesOut) { DLL(int32_t) BS_ISteamController_GetConnectedControllers(ISteamController* lpSteamController, ControllerHandle_t* pHandlesOut) {
return lpSteamController->GetConnectedControllers(pHandlesOut); return lpSteamController->GetConnectedControllers(pHandlesOut);
} }
ControllerHandle_t* pControllerHandles = new ControllerHandle_t[STEAM_CONTROLLER_MAX_COUNT]; ControllerHandle_t* pControllerHandles = new ControllerHandle_t[STEAM_CONTROLLER_MAX_COUNT];
DLL_FUNCTION(int32_t) BS_ISteamController_GetConnectedControllersSimple(ISteamController* lpSteamController) { DLL(int32_t) BS_ISteamController_GetConnectedControllersSimple(ISteamController* lpSteamController) {
return lpSteamController->GetConnectedControllers(pControllerHandles); return lpSteamController->GetConnectedControllers(pControllerHandles);
} }
DLL_FUNCTION(ControllerHandle_t*) BS_ISteamController_GetConnectedControllersSimple_Index(uint32_t index) { DLL(ControllerHandle_t*) BS_ISteamController_GetConnectedControllersSimple_Index(uint32_t index) {
if (index >= STEAM_CONTROLLER_MAX_COUNT) if (index >= STEAM_CONTROLLER_MAX_COUNT)
index = STEAM_CONTROLLER_MAX_COUNT - 1; index = STEAM_CONTROLLER_MAX_COUNT - 1;
return &(pControllerHandles[index]); return &(pControllerHandles[index]);
@@ -59,68 +59,68 @@ DLL_FUNCTION(ControllerHandle_t*) BS_ISteamController_GetConnectedControllersSim
// Invokes the Steam overlay and brings up the binding screen // Invokes the Steam overlay and brings up the binding screen
// Returns false is overlay is disabled / unavailable, or the user is not in Big Picture mode // Returns false is overlay is disabled / unavailable, or the user is not in Big Picture mode
DLL_FUNCTION(int32_t) BS_ISteamController_ShowBindingPanel(ISteamController* lpSteamController, ControllerHandle_t* pControllerHandle) { DLL(int32_t) BS_ISteamController_ShowBindingPanel(ISteamController* lpSteamController, ControllerHandle_t* pControllerHandle) {
return lpSteamController->ShowBindingPanel(*pControllerHandle); return lpSteamController->ShowBindingPanel(*pControllerHandle);
} }
// ACTION SETS // ACTION SETS
// Lookup the handle for an Action Set. Best to do this once on startup, and store the handles for all future API calls. // Lookup the handle for an Action Set. Best to do this once on startup, and store the handles for all future API calls.
DLL_FUNCTION(ControllerActionSetHandle_t*) BS_ISteamController_GetActionSetHandle(ISteamController* lpSteamController, const char* pszActionSetName) { DLL(ControllerActionSetHandle_t*) BS_ISteamController_GetActionSetHandle(ISteamController* lpSteamController, const char* pszActionSetName) {
return new ControllerActionSetHandle_t(lpSteamController->GetActionSetHandle(pszActionSetName)); return new ControllerActionSetHandle_t(lpSteamController->GetActionSetHandle(pszActionSetName));
} }
// Reconfigure the controller to use the specified action set (ie 'Menu', 'Walk' or 'Drive') // Reconfigure the controller to use the specified action set (ie 'Menu', 'Walk' or 'Drive')
// This is cheap, and can be safely called repeatedly. It's often easier to repeatedly call it in // This is cheap, and can be safely called repeatedly. It's often easier to repeatedly call it in
// your state loops, instead of trying to place it in all of your state transitions. // your state loops, instead of trying to place it in all of your state transitions.
DLL_FUNCTION(void) BS_ISteamController_ActivateActionSet(ISteamController* lpSteamController, ControllerHandle_t* pControllerHandle, ControllerActionSetHandle_t* pActionSetHandle) { DLL(void) BS_ISteamController_ActivateActionSet(ISteamController* lpSteamController, ControllerHandle_t* pControllerHandle, ControllerActionSetHandle_t* pActionSetHandle) {
lpSteamController->ActivateActionSet(*pControllerHandle, *pActionSetHandle); lpSteamController->ActivateActionSet(*pControllerHandle, *pActionSetHandle);
} }
DLL_FUNCTION(ControllerActionSetHandle_t*) BS_ISteamController_GetCurrentActionSet(ISteamController* lpSteamController, ControllerHandle_t* pControllerHandle) { DLL(ControllerActionSetHandle_t*) BS_ISteamController_GetCurrentActionSet(ISteamController* lpSteamController, ControllerHandle_t* pControllerHandle) {
return new ControllerActionSetHandle_t(lpSteamController->GetCurrentActionSet(*pControllerHandle)); return new ControllerActionSetHandle_t(lpSteamController->GetCurrentActionSet(*pControllerHandle));
} }
// Lookup the handle for a digital action. Best to do this once on startup, and store the handles for all future API calls. // Lookup the handle for a digital action. Best to do this once on startup, and store the handles for all future API calls.
DLL_FUNCTION(ControllerDigitalActionHandle_t*) BS_ISteamController_GetDigitalActionHandle(ISteamController* lpSteamController, const char* pszActionName) { DLL(ControllerDigitalActionHandle_t*) BS_ISteamController_GetDigitalActionHandle(ISteamController* lpSteamController, const char* pszActionName) {
return new ControllerDigitalActionHandle_t(lpSteamController->GetDigitalActionHandle(pszActionName)); return new ControllerDigitalActionHandle_t(lpSteamController->GetDigitalActionHandle(pszActionName));
} }
// Returns the current state of the supplied digital game action // Returns the current state of the supplied digital game action
DLL_FUNCTION(ControllerDigitalActionData_t*) BS_ISteamController_GetDigitalActionData(ISteamController* lpSteamController, ControllerHandle_t* pControllerHandle, ControllerDigitalActionHandle_t* pDigitalActionHandle) { DLL(ControllerDigitalActionData_t*) BS_ISteamController_GetDigitalActionData(ISteamController* lpSteamController, ControllerHandle_t* pControllerHandle, ControllerDigitalActionHandle_t* pDigitalActionHandle) {
return &lpSteamController->GetDigitalActionData(*pControllerHandle, *pDigitalActionHandle); return &lpSteamController->GetDigitalActionData(*pControllerHandle, *pDigitalActionHandle);
} }
// Get the origin(s) for a digital action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action. // Get the origin(s) for a digital action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action.
// originsOut should point to a STEAM_CONTROLLER_MAX_ORIGINS sized array of EControllerActionOrigin handles // originsOut should point to a STEAM_CONTROLLER_MAX_ORIGINS sized array of EControllerActionOrigin handles
DLL_FUNCTION(int32_t) BS_ISteamController_GetDigitalActionOrigins(ISteamController* lpSteamController, ControllerHandle_t* pControllerHandle, ControllerActionSetHandle_t* pActionSetHandle, ControllerDigitalActionHandle_t* pDigitalActionHandle, EControllerActionOrigin *pEControllerActionOrigin) { DLL(int32_t) BS_ISteamController_GetDigitalActionOrigins(ISteamController* lpSteamController, ControllerHandle_t* pControllerHandle, ControllerActionSetHandle_t* pActionSetHandle, ControllerDigitalActionHandle_t* pDigitalActionHandle, EControllerActionOrigin *pEControllerActionOrigin) {
return lpSteamController->GetDigitalActionOrigins(*pControllerHandle, *pActionSetHandle, *pDigitalActionHandle, pEControllerActionOrigin); return lpSteamController->GetDigitalActionOrigins(*pControllerHandle, *pActionSetHandle, *pDigitalActionHandle, pEControllerActionOrigin);
} }
// Lookup the handle for an analog action. Best to do this once on startup, and store the handles for all future API calls. // Lookup the handle for an analog action. Best to do this once on startup, and store the handles for all future API calls.
DLL_FUNCTION(ControllerAnalogActionHandle_t*) BS_ISteamController_GetAnalogActionHandle(ISteamController* lpSteamController, const char *pszActionName) { DLL(ControllerAnalogActionHandle_t*) BS_ISteamController_GetAnalogActionHandle(ISteamController* lpSteamController, const char *pszActionName) {
return new ControllerAnalogActionHandle_t(lpSteamController->GetAnalogActionHandle(pszActionName)); return new ControllerAnalogActionHandle_t(lpSteamController->GetAnalogActionHandle(pszActionName));
} }
// Returns the current state of these supplied analog game action // Returns the current state of these supplied analog game action
DLL_FUNCTION(ControllerAnalogActionData_t*) BS_ISteamController_GetAnalogActionData(ISteamController* lpSteamController, ControllerHandle_t* pControllerHandle, ControllerAnalogActionHandle_t* pAnalogActionHandle) { DLL(ControllerAnalogActionData_t*) BS_ISteamController_GetAnalogActionData(ISteamController* lpSteamController, ControllerHandle_t* pControllerHandle, ControllerAnalogActionHandle_t* pAnalogActionHandle) {
return &lpSteamController->GetAnalogActionData(*pControllerHandle, *pAnalogActionHandle); return &lpSteamController->GetAnalogActionData(*pControllerHandle, *pAnalogActionHandle);
} }
// Get the origin(s) for an analog action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action. // Get the origin(s) for an analog action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action.
// originsOut should point to a STEAM_CONTROLLER_MAX_ORIGINS sized array of EControllerActionOrigin handles // originsOut should point to a STEAM_CONTROLLER_MAX_ORIGINS sized array of EControllerActionOrigin handles
DLL_FUNCTION(int32_t) BS_ISteamController_GetAnalogActionOrigins(ISteamController* lpSteamController, ControllerHandle_t* pControllerHandle, ControllerActionSetHandle_t* pActionSetHandle, ControllerAnalogActionHandle_t* pAnalogActionHandle, EControllerActionOrigin *pEControllerActionOrigin) { DLL(int32_t) BS_ISteamController_GetAnalogActionOrigins(ISteamController* lpSteamController, ControllerHandle_t* pControllerHandle, ControllerActionSetHandle_t* pActionSetHandle, ControllerAnalogActionHandle_t* pAnalogActionHandle, EControllerActionOrigin *pEControllerActionOrigin) {
return lpSteamController->GetAnalogActionOrigins(*pControllerHandle, *pActionSetHandle, *pAnalogActionHandle, pEControllerActionOrigin); return lpSteamController->GetAnalogActionOrigins(*pControllerHandle, *pActionSetHandle, *pAnalogActionHandle, pEControllerActionOrigin);
} }
DLL_FUNCTION(void) BS_ISteamController_StopAnalogActionMomentum(ISteamController* lpSteamController, ControllerHandle_t* pControllerHandle, ControllerAnalogActionHandle_t* pAnalogActionHandle) { DLL(void) BS_ISteamController_StopAnalogActionMomentum(ISteamController* lpSteamController, ControllerHandle_t* pControllerHandle, ControllerAnalogActionHandle_t* pAnalogActionHandle) {
lpSteamController->StopAnalogActionMomentum(*pControllerHandle, *pAnalogActionHandle); lpSteamController->StopAnalogActionMomentum(*pControllerHandle, *pAnalogActionHandle);
} }
// Trigger a haptic pulse on a controller // Trigger a haptic pulse on a controller
DLL_FUNCTION(void) BS_ISteamController_TriggerHapticPulse(ISteamController* lpSteamController, ControllerHandle_t* pControllerHandle, ESteamControllerPad eTargetPad, uint32_t usDurationMicroSec) { DLL(void) BS_ISteamController_TriggerHapticPulse(ISteamController* lpSteamController, ControllerHandle_t* pControllerHandle, ESteamControllerPad eTargetPad, uint32_t usDurationMicroSec) {
lpSteamController->TriggerHapticPulse(*pControllerHandle, eTargetPad, (uint16_t)usDurationMicroSec); lpSteamController->TriggerHapticPulse(*pControllerHandle, eTargetPad, (uint16_t)usDurationMicroSec);
} }
DLL_FUNCTION(void) BS_ISteamController_TriggerRepeatedHapticPulse(ISteamController* lpSteamController, ControllerHandle_t* pControllerHandle, ESteamControllerPad eTargetPad, uint32_t usDurationMicroSec, uint32_t usOffMicroSec, uint32_t unRepeat, uint32_t nFlags) { DLL(void) BS_ISteamController_TriggerRepeatedHapticPulse(ISteamController* lpSteamController, ControllerHandle_t* pControllerHandle, ESteamControllerPad eTargetPad, uint32_t usDurationMicroSec, uint32_t usOffMicroSec, uint32_t unRepeat, uint32_t nFlags) {
lpSteamController->TriggerRepeatedHapticPulse(*pControllerHandle, eTargetPad, usDurationMicroSec, usOffMicroSec, unRepeat, nFlags); lpSteamController->TriggerRepeatedHapticPulse(*pControllerHandle, eTargetPad, usDurationMicroSec, usOffMicroSec, unRepeat, nFlags);
} }
+71 -71
View File
@@ -20,7 +20,7 @@
// Purpose: interface to accessing information about individual users, // Purpose: interface to accessing information about individual users,
// that can be a friend, in a group, on a game server or in a lobby with the local user // that can be a friend, in a group, on a game server or in a lobby with the local user
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(ISteamFriends*) BS_SteamFriends() { DLL(ISteamFriends*) BS_SteamFriends() {
return SteamFriends(); return SteamFriends();
} }
@@ -29,7 +29,7 @@ DLL_FUNCTION(ISteamFriends*) BS_SteamFriends() {
// this is stored in UTF-8 format // this is stored in UTF-8 format
// like all the other interface functions that return a char *, it's important that this pointer is not saved // like all the other interface functions that return a char *, it's important that this pointer is not saved
// off; it will eventually be free'd or re-allocated // off; it will eventually be free'd or re-allocated
DLL_FUNCTION(const char*) BS_ISteamFriends_GetPersonaName(ISteamFriends* lpSteamFriends) { DLL(const char*) BS_ISteamFriends_GetPersonaName(ISteamFriends* lpSteamFriends) {
return lpSteamFriends->GetPersonaName(); return lpSteamFriends->GetPersonaName();
} }
@@ -40,19 +40,19 @@ DLL_FUNCTION(const char*) BS_ISteamFriends_GetPersonaName(ISteamFriends* lpSteam
// //
// If the name change fails to happen on the server, then an additional global PersonaStateChange_t will be posted // If the name change fails to happen on the server, then an additional global PersonaStateChange_t will be posted
// to change the name back, in addition to the SetPersonaNameResponse_t callback. // to change the name back, in addition to the SetPersonaNameResponse_t callback.
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamFriends_SetPersonaName(ISteamFriends* lpSteamFriends, const char* pchPersonaName) { DLL(SteamAPICall_t*) BS_ISteamFriends_SetPersonaName(ISteamFriends* lpSteamFriends, const char* pchPersonaName) {
return new uint64_t(lpSteamFriends->SetPersonaName(pchPersonaName)); return new uint64_t(lpSteamFriends->SetPersonaName(pchPersonaName));
} }
// gets the status of the current user // gets the status of the current user
DLL_FUNCTION(int32_t) BS_ISteamFriends_GetPersonaState(ISteamFriends* lpSteamFriends) { DLL(int32_t) BS_ISteamFriends_GetPersonaState(ISteamFriends* lpSteamFriends) {
return lpSteamFriends->GetPersonaState(); return lpSteamFriends->GetPersonaState();
} }
// friend iteration // friend iteration
// takes a set of k_EFriendFlags, and returns the number of users the client knows about who meet that criteria // takes a set of k_EFriendFlags, and returns the number of users the client knows about who meet that criteria
// then GetFriendByIndex() can then be used to return the id's of each of those users // then GetFriendByIndex() can then be used to return the id's of each of those users
DLL_FUNCTION(int32_t) BS_ISteamFriends_GetFriendCount(ISteamFriends* lpSteamFriends, int32_t iFriendFlags) { DLL(int32_t) BS_ISteamFriends_GetFriendCount(ISteamFriends* lpSteamFriends, int32_t iFriendFlags) {
return lpSteamFriends->GetFriendCount(iFriendFlags); return lpSteamFriends->GetFriendCount(iFriendFlags);
} }
@@ -60,45 +60,45 @@ DLL_FUNCTION(int32_t) BS_ISteamFriends_GetFriendCount(ISteamFriends* lpSteamFrie
// iFriend is a index of range [0, GetFriendCount()) // iFriend is a index of range [0, GetFriendCount())
// iFriendsFlags must be the same value as used in GetFriendCount() // iFriendsFlags must be the same value as used in GetFriendCount()
// the returned CSteamID can then be used by all the functions below to access details about the user // the returned CSteamID can then be used by all the functions below to access details about the user
DLL_FUNCTION(CSteamID*) BS_ISteamFriends_GetFriendByIndex(ISteamFriends* lpSteamFriends, int32_t iFriend, int32_t iFriendFlags) { DLL(CSteamID*) BS_ISteamFriends_GetFriendByIndex(ISteamFriends* lpSteamFriends, int32_t iFriend, int32_t iFriendFlags) {
return new CSteamID(lpSteamFriends->GetFriendByIndex(iFriend, iFriendFlags)); return new CSteamID(lpSteamFriends->GetFriendByIndex(iFriend, iFriendFlags));
} }
// returns a relationship to a user // returns a relationship to a user
DLL_FUNCTION(EFriendRelationship) BS_ISteamFriends_GetFriendRelationship(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend) { DLL(EFriendRelationship) BS_ISteamFriends_GetFriendRelationship(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend) {
return lpSteamFriends->GetFriendRelationship(*steamIDFriend); return lpSteamFriends->GetFriendRelationship(*steamIDFriend);
} }
// returns the current status of the specified user // returns the current status of the specified user
// this will only be known by the local user if steamIDFriend is in their friends list; on the same game server; in a chat room or lobby; or in a small group with the local user // this will only be known by the local user if steamIDFriend is in their friends list; on the same game server; in a chat room or lobby; or in a small group with the local user
DLL_FUNCTION(EPersonaState) BS_ISteamFriends_GetFriendPersonaState(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend) { DLL(EPersonaState) BS_ISteamFriends_GetFriendPersonaState(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend) {
return lpSteamFriends->GetFriendPersonaState(*steamIDFriend); return lpSteamFriends->GetFriendPersonaState(*steamIDFriend);
} }
// returns the name another user - guaranteed to not be NULL. // returns the name another user - guaranteed to not be NULL.
// same rules as GetFriendPersonaState() apply as to whether or not the user knowns the name of the other user // same rules as GetFriendPersonaState() apply as to whether or not the user knowns the name of the other user
// note that on first joining a lobby, chat room or game server the local user will not known the name of the other users automatically; that information will arrive asyncronously // note that on first joining a lobby, chat room or game server the local user will not known the name of the other users automatically; that information will arrive asyncronously
DLL_FUNCTION(const char*) BS_ISteamFriends_GetFriendPersonaName(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend) { DLL(const char*) BS_ISteamFriends_GetFriendPersonaName(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend) {
return lpSteamFriends->GetFriendPersonaName(*steamIDFriend); return lpSteamFriends->GetFriendPersonaName(*steamIDFriend);
} }
// returns true if the friend is actually in a game, and fills in pFriendGameInfo with an extra details // returns true if the friend is actually in a game, and fills in pFriendGameInfo with an extra details
DLL_FUNCTION(uint32_t) BS_ISteamFriends_GetFriendGamePlayed(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend, FriendGameInfo_t *pFriendGameInfo) { DLL(uint32_t) BS_ISteamFriends_GetFriendGamePlayed(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend, FriendGameInfo_t *pFriendGameInfo) {
return lpSteamFriends->GetFriendGamePlayed(*steamIDFriend, pFriendGameInfo); return lpSteamFriends->GetFriendGamePlayed(*steamIDFriend, pFriendGameInfo);
} }
// accesses old friends names - returns an empty string when their are no more items in the history // accesses old friends names - returns an empty string when their are no more items in the history
DLL_FUNCTION(const char*) BS_ISteamFriends_GetFriendPersonaNameHistory(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend, int32_t iPersonaName) { DLL(const char*) BS_ISteamFriends_GetFriendPersonaNameHistory(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend, int32_t iPersonaName) {
return lpSteamFriends->GetFriendPersonaNameHistory(*steamIDFriend, iPersonaName); return lpSteamFriends->GetFriendPersonaNameHistory(*steamIDFriend, iPersonaName);
} }
// friends steam level // friends steam level
DLL_FUNCTION(int32_t) BS_ISteamFriends_GetFriendSteamLevel(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend) { DLL(int32_t) BS_ISteamFriends_GetFriendSteamLevel(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend) {
return lpSteamFriends->GetFriendSteamLevel(*steamIDFriend); return lpSteamFriends->GetFriendSteamLevel(*steamIDFriend);
} }
// Returns nickname the current user has set for the specified player. Returns NULL if the no nickname has been set for that player. // Returns nickname the current user has set for the specified player. Returns NULL if the no nickname has been set for that player.
DLL_FUNCTION(const char*) BS_ISteamFriends_GetPlayerNickname(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriends) { DLL(const char*) BS_ISteamFriends_GetPlayerNickname(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriends) {
const char* nickname = lpSteamFriends->GetPlayerNickname(*steamIDFriends); const char* nickname = lpSteamFriends->GetPlayerNickname(*steamIDFriends);
if (nickname == NULL) { if (nickname == NULL) {
nickname = ""; nickname = "";
@@ -108,61 +108,61 @@ DLL_FUNCTION(const char*) BS_ISteamFriends_GetPlayerNickname(ISteamFriends* lpSt
// friend grouping (tag) apis // friend grouping (tag) apis
// returns the number of friends groups // returns the number of friends groups
DLL_FUNCTION(int32_t) BS_ISteamFriends_GetFriendsGroupCount(ISteamFriends* lpSteamFriends) { DLL(int32_t) BS_ISteamFriends_GetFriendsGroupCount(ISteamFriends* lpSteamFriends) {
return lpSteamFriends->GetFriendsGroupCount(); return lpSteamFriends->GetFriendsGroupCount();
} }
// returns the friends group ID for the given index (invalid indices return k_FriendsGroupID_Invalid) // returns the friends group ID for the given index (invalid indices return k_FriendsGroupID_Invalid)
DLL_FUNCTION(FriendsGroupID_t) BS_ISteamFriends_GetFriendsGroupIDByIndex(ISteamFriends* lpSteamFriends, FriendsGroupID_t friendsGroupID) { DLL(FriendsGroupID_t) BS_ISteamFriends_GetFriendsGroupIDByIndex(ISteamFriends* lpSteamFriends, FriendsGroupID_t friendsGroupID) {
return lpSteamFriends->GetFriendsGroupIDByIndex(friendsGroupID); return lpSteamFriends->GetFriendsGroupIDByIndex(friendsGroupID);
} }
// returns the name for the given friends group (NULL in the case of invalid friends group IDs) // returns the name for the given friends group (NULL in the case of invalid friends group IDs)
DLL_FUNCTION(const char*) BS_ISteamFriends_GetFriendsGroupName(ISteamFriends* lpSteamFriends, FriendsGroupID_t friendsGroupID) { DLL(const char*) BS_ISteamFriends_GetFriendsGroupName(ISteamFriends* lpSteamFriends, FriendsGroupID_t friendsGroupID) {
return lpSteamFriends->GetFriendsGroupName(friendsGroupID); return lpSteamFriends->GetFriendsGroupName(friendsGroupID);
} }
// returns the number of members in a given friends group // returns the number of members in a given friends group
DLL_FUNCTION(int32_t) BS_ISteamFriends_GetFriendsGroupMembersCount(ISteamFriends* lpSteamFriends, FriendsGroupID_t friendsGroupID) { DLL(int32_t) BS_ISteamFriends_GetFriendsGroupMembersCount(ISteamFriends* lpSteamFriends, FriendsGroupID_t friendsGroupID) {
return lpSteamFriends->GetFriendsGroupMembersCount(friendsGroupID); return lpSteamFriends->GetFriendsGroupMembersCount(friendsGroupID);
} }
// gets up to nMembersCount members of the given friends group, if fewer exist than requested those positions' SteamIDs will be invalid // gets up to nMembersCount members of the given friends group, if fewer exist than requested those positions' SteamIDs will be invalid
DLL_FUNCTION(void) BS_ISteamFriends_GetFriendsGroupMembersList(ISteamFriends* lpSteamFriends, FriendsGroupID_t friendsGroupID, CSteamID* pOutSteamIDMembers, int32_t nMembersCount) { DLL(void) BS_ISteamFriends_GetFriendsGroupMembersList(ISteamFriends* lpSteamFriends, FriendsGroupID_t friendsGroupID, CSteamID* pOutSteamIDMembers, int32_t nMembersCount) {
lpSteamFriends->GetFriendsGroupMembersList(friendsGroupID, pOutSteamIDMembers, nMembersCount); lpSteamFriends->GetFriendsGroupMembersList(friendsGroupID, pOutSteamIDMembers, nMembersCount);
} }
// returns true if the specified user meets any of the criteria specified in iFriendFlags // returns true if the specified user meets any of the criteria specified in iFriendFlags
// iFriendFlags can be the union (binary or, |) of one or more k_EFriendFlags values // iFriendFlags can be the union (binary or, |) of one or more k_EFriendFlags values
DLL_FUNCTION(uint32_t) BS_ISteamFriends_HasFriend(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend, int32_t iFriendsFlags) { DLL(uint32_t) BS_ISteamFriends_HasFriend(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend, int32_t iFriendsFlags) {
return lpSteamFriends->HasFriend(*steamIDFriend, iFriendsFlags); return lpSteamFriends->HasFriend(*steamIDFriend, iFriendsFlags);
} }
// clan (group) iteration and access functions // clan (group) iteration and access functions
DLL_FUNCTION(int32_t) BS_ISteamFriends_GetClanCount(ISteamFriends* lpSteamFriends) { DLL(int32_t) BS_ISteamFriends_GetClanCount(ISteamFriends* lpSteamFriends) {
return lpSteamFriends->GetClanCount(); return lpSteamFriends->GetClanCount();
} }
DLL_FUNCTION(CSteamID*) BS_ISteamFriends_GetClanByIndex(ISteamFriends* lpSteamFriends, int32_t iClan) { DLL(CSteamID*) BS_ISteamFriends_GetClanByIndex(ISteamFriends* lpSteamFriends, int32_t iClan) {
CSteamID* steamID = new CSteamID(lpSteamFriends->GetClanByIndex(iClan)); CSteamID* steamID = new CSteamID(lpSteamFriends->GetClanByIndex(iClan));
return steamID; return steamID;
} }
DLL_FUNCTION(const char*) BS_ISteamFriends_GetClanName(ISteamFriends* lpSteamFriends, CSteamID* steamIDClan) { DLL(const char*) BS_ISteamFriends_GetClanName(ISteamFriends* lpSteamFriends, CSteamID* steamIDClan) {
return lpSteamFriends->GetClanName(*steamIDClan); return lpSteamFriends->GetClanName(*steamIDClan);
} }
DLL_FUNCTION(const char*) BS_ISteamFriends_GetClanTag(ISteamFriends* lpSteamFriends, CSteamID* steamIDClan) { DLL(const char*) BS_ISteamFriends_GetClanTag(ISteamFriends* lpSteamFriends, CSteamID* steamIDClan) {
return lpSteamFriends->GetClanTag(*steamIDClan); return lpSteamFriends->GetClanTag(*steamIDClan);
} }
// returns the most recent information we have about what's happening in a clan // returns the most recent information we have about what's happening in a clan
DLL_FUNCTION(uint32_t) BS_ISteamFriends_GetClanActivityCounts(ISteamFriends* lpSteamFriends, CSteamID* steamIDClan, int32_t* pnOnline, int32_t* pnInGame, int32_t* pnChatting) { DLL(uint32_t) BS_ISteamFriends_GetClanActivityCounts(ISteamFriends* lpSteamFriends, CSteamID* steamIDClan, int32_t* pnOnline, int32_t* pnInGame, int32_t* pnChatting) {
return lpSteamFriends->GetClanActivityCounts(*steamIDClan, pnOnline, pnInGame, pnChatting); return lpSteamFriends->GetClanActivityCounts(*steamIDClan, pnOnline, pnInGame, pnChatting);
} }
// for clans a user is a member of, they will have reasonably up-to-date information, but for others you'll have to download the info to have the latest // for clans a user is a member of, they will have reasonably up-to-date information, but for others you'll have to download the info to have the latest
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamFriends_DownloadClanActivityCounts(ISteamFriends* lpSteamFriends, CSteamID* psteamIDClans, int32_t cClansToRequest) { DLL(SteamAPICall_t*) BS_ISteamFriends_DownloadClanActivityCounts(ISteamFriends* lpSteamFriends, CSteamID* psteamIDClans, int32_t cClansToRequest) {
return new uint64_t(lpSteamFriends->DownloadClanActivityCounts(psteamIDClans, cClansToRequest)); return new uint64_t(lpSteamFriends->DownloadClanActivityCounts(psteamIDClans, cClansToRequest));
} }
@@ -170,27 +170,27 @@ DLL_FUNCTION(SteamAPICall_t*) BS_ISteamFriends_DownloadClanActivityCounts(ISteam
// note that large clans that cannot be iterated by the local user // note that large clans that cannot be iterated by the local user
// note that the current user must be in a lobby to retrieve CSteamIDs of other users in that lobby // note that the current user must be in a lobby to retrieve CSteamIDs of other users in that lobby
// steamIDSource can be the steamID of a group, game server, lobby or chat room // steamIDSource can be the steamID of a group, game server, lobby or chat room
DLL_FUNCTION(int32_t) BS_ISteamFriends_GetFriendCountFromSource(ISteamFriends* lpSteamFriends, CSteamID* steamIDSource) { DLL(int32_t) BS_ISteamFriends_GetFriendCountFromSource(ISteamFriends* lpSteamFriends, CSteamID* steamIDSource) {
return lpSteamFriends->GetFriendCountFromSource(*steamIDSource); return lpSteamFriends->GetFriendCountFromSource(*steamIDSource);
} }
DLL_FUNCTION(CSteamID*) BS_ISteamFriends_GetFriendFromSourceByIndex(ISteamFriends* lpSteamFriends, CSteamID* steamIDSource, int32_t iFriend) { DLL(CSteamID*) BS_ISteamFriends_GetFriendFromSourceByIndex(ISteamFriends* lpSteamFriends, CSteamID* steamIDSource, int32_t iFriend) {
return new CSteamID(lpSteamFriends->GetFriendFromSourceByIndex(*steamIDSource, iFriend)); return new CSteamID(lpSteamFriends->GetFriendFromSourceByIndex(*steamIDSource, iFriend));
} }
// returns true if the local user can see that steamIDUser is a member or in steamIDSource // returns true if the local user can see that steamIDUser is a member or in steamIDSource
DLL_FUNCTION(uint32_t) BS_ISteamFriends_IsUserInSource(ISteamFriends* lpSteamFriends, CSteamID* steamIDUser, CSteamID* steamIDSource) { DLL(uint32_t) BS_ISteamFriends_IsUserInSource(ISteamFriends* lpSteamFriends, CSteamID* steamIDUser, CSteamID* steamIDSource) {
return lpSteamFriends->IsUserInSource(*steamIDUser, *steamIDSource); return lpSteamFriends->IsUserInSource(*steamIDUser, *steamIDSource);
} }
// User is in a game pressing the talk button (will suppress the microphone for all voice comms from the Steam friends UI) // User is in a game pressing the talk button (will suppress the microphone for all voice comms from the Steam friends UI)
DLL_FUNCTION(void) BS_ISteamFriends_SetInGameVoiceSpeaking(ISteamFriends* lpSteamFriends, CSteamID* steamIDUser, uint32_t bSpeaking) { DLL(void) BS_ISteamFriends_SetInGameVoiceSpeaking(ISteamFriends* lpSteamFriends, CSteamID* steamIDUser, uint32_t bSpeaking) {
lpSteamFriends->SetInGameVoiceSpeaking(*steamIDUser, bSpeaking != 0); lpSteamFriends->SetInGameVoiceSpeaking(*steamIDUser, bSpeaking != 0);
} }
// activates the game overlay, with an optional dialog to open // activates the game overlay, with an optional dialog to open
// valid options are "Friends", "Community", "Players", "Settings", "OfficialGameGroup", "Stats", "Achievements" // valid options are "Friends", "Community", "Players", "Settings", "OfficialGameGroup", "Stats", "Achievements"
DLL_FUNCTION(void) BS_ISteamFriends_ActivateGameOverlay(ISteamFriends* lpSteamFriends, const char* pchDialog) { DLL(void) BS_ISteamFriends_ActivateGameOverlay(ISteamFriends* lpSteamFriends, const char* pchDialog) {
lpSteamFriends->ActivateGameOverlay(pchDialog); lpSteamFriends->ActivateGameOverlay(pchDialog);
} }
@@ -205,45 +205,45 @@ DLL_FUNCTION(void) BS_ISteamFriends_ActivateGameOverlay(ISteamFriends* lpSteamFr
// "friendremove" - opens the overlay in minimal mode prompting the user to remove the target friend // "friendremove" - opens the overlay in minimal mode prompting the user to remove the target friend
// "friendrequestaccept" - opens the overlay in minimal mode prompting the user to accept an incoming friend invite // "friendrequestaccept" - opens the overlay in minimal mode prompting the user to accept an incoming friend invite
// "friendrequestignore" - opens the overlay in minimal mode prompting the user to ignore an incoming friend invite // "friendrequestignore" - opens the overlay in minimal mode prompting the user to ignore an incoming friend invite
DLL_FUNCTION(void) BS_ISteamFriends_ActivateGameOverlayToUser(ISteamFriends* lpSteamFriends, const char* pchDialog, CSteamID* steamID) { DLL(void) BS_ISteamFriends_ActivateGameOverlayToUser(ISteamFriends* lpSteamFriends, const char* pchDialog, CSteamID* steamID) {
lpSteamFriends->ActivateGameOverlayToUser(pchDialog, *steamID); lpSteamFriends->ActivateGameOverlayToUser(pchDialog, *steamID);
} }
// activates game overlay web browser directly to the specified URL // activates game overlay web browser directly to the specified URL
// full address with protocol type is required, e.g. http://www.steamgames.com/ // full address with protocol type is required, e.g. http://www.steamgames.com/
DLL_FUNCTION(void) BS_ISteamFriends_ActivateGameOverlayToWebPage(ISteamFriends* lpSteamFriends, const char* pchURL) { DLL(void) BS_ISteamFriends_ActivateGameOverlayToWebPage(ISteamFriends* lpSteamFriends, const char* pchURL) {
lpSteamFriends->ActivateGameOverlayToWebPage(pchURL); lpSteamFriends->ActivateGameOverlayToWebPage(pchURL);
} }
// activates game overlay to store page for app // activates game overlay to store page for app
DLL_FUNCTION(void) BS_ISteamFriends_ActivateGameOverlayToStore(ISteamFriends* lpSteamFriends, AppId_t nAppID, EOverlayToStoreFlag eFlag) { DLL(void) BS_ISteamFriends_ActivateGameOverlayToStore(ISteamFriends* lpSteamFriends, AppId_t nAppID, EOverlayToStoreFlag eFlag) {
lpSteamFriends->ActivateGameOverlayToStore(nAppID, eFlag); lpSteamFriends->ActivateGameOverlayToStore(nAppID, eFlag);
} }
// Mark a target user as 'played with'. This is a client-side only feature that requires that the calling user is // Mark a target user as 'played with'. This is a client-side only feature that requires that the calling user is
// in game // in game
DLL_FUNCTION(void) BS_ISteamFriends_SetPlayedWith(ISteamFriends* lpSteamFriends, CSteamID* steamIDUserPlayedWith) { DLL(void) BS_ISteamFriends_SetPlayedWith(ISteamFriends* lpSteamFriends, CSteamID* steamIDUserPlayedWith) {
lpSteamFriends->SetPlayedWith(*steamIDUserPlayedWith); lpSteamFriends->SetPlayedWith(*steamIDUserPlayedWith);
} }
// activates game overlay to open the invite dialog. Invitations will be sent for the provided lobby. // activates game overlay to open the invite dialog. Invitations will be sent for the provided lobby.
DLL_FUNCTION(void) BS_ISteamFriends_ActivateGameOverlayInviteDialog(ISteamFriends* lpSteamFriends, CSteamID* steamIDLobby) { DLL(void) BS_ISteamFriends_ActivateGameOverlayInviteDialog(ISteamFriends* lpSteamFriends, CSteamID* steamIDLobby) {
lpSteamFriends->ActivateGameOverlayInviteDialog(*steamIDLobby); lpSteamFriends->ActivateGameOverlayInviteDialog(*steamIDLobby);
} }
// gets the small (32x32) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set // gets the small (32x32) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set
DLL_FUNCTION(int32_t) BS_ISteamFriends_GetSmallFriendAvatar(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend) { DLL(int32_t) BS_ISteamFriends_GetSmallFriendAvatar(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend) {
return lpSteamFriends->GetSmallFriendAvatar(*steamIDFriend); return lpSteamFriends->GetSmallFriendAvatar(*steamIDFriend);
} }
// gets the medium (64x64) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set // gets the medium (64x64) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set
DLL_FUNCTION(int32_t) BS_ISteamFriends_GetMediumFriendAvatar(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend) { DLL(int32_t) BS_ISteamFriends_GetMediumFriendAvatar(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend) {
return lpSteamFriends->GetMediumFriendAvatar(*steamIDFriend); return lpSteamFriends->GetMediumFriendAvatar(*steamIDFriend);
} }
// gets the large (184x184) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set // gets the large (184x184) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set
// returns -1 if this image has yet to be loaded, in this case wait for a AvatarImageLoaded_t callback and then call this again // returns -1 if this image has yet to be loaded, in this case wait for a AvatarImageLoaded_t callback and then call this again
DLL_FUNCTION(int32_t) BS_ISteamFriends_GetLargeFriendAvatar(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend) { DLL(int32_t) BS_ISteamFriends_GetLargeFriendAvatar(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend) {
return lpSteamFriends->GetLargeFriendAvatar(*steamIDFriend); return lpSteamFriends->GetLargeFriendAvatar(*steamIDFriend);
} }
@@ -252,7 +252,7 @@ DLL_FUNCTION(int32_t) BS_ISteamFriends_GetLargeFriendAvatar(ISteamFriends* lpSte
// - it's a lot slower to download avatars and churns the local cache, so if you don't need avatars, don't request them // - it's a lot slower to download avatars and churns the local cache, so if you don't need avatars, don't request them
// if returns true, it means that data is being requested, and a PersonaStateChanged_t callback will be posted when it's retrieved // if returns true, it means that data is being requested, and a PersonaStateChanged_t callback will be posted when it's retrieved
// if returns false, it means that we already have all the details about that user, and functions can be called immediately // if returns false, it means that we already have all the details about that user, and functions can be called immediately
DLL_FUNCTION(uint32_t) BS_ISteamFriends_RequestUserInformation(ISteamFriends* lpSteamFriends, CSteamID* steamIDUser, uint32_t bRequireNameOnly) { DLL(uint32_t) BS_ISteamFriends_RequestUserInformation(ISteamFriends* lpSteamFriends, CSteamID* steamIDUser, uint32_t bRequireNameOnly) {
return lpSteamFriends->RequestUserInformation(*steamIDUser, bRequireNameOnly != 0); return lpSteamFriends->RequestUserInformation(*steamIDUser, bRequireNameOnly != 0);
} }
@@ -262,31 +262,31 @@ DLL_FUNCTION(uint32_t) BS_ISteamFriends_RequestUserInformation(ISteamFriends* lp
// you can only ask about clans that a user is a member of // you can only ask about clans that a user is a member of
// note that this won't download avatars automatically; if you get an officer, // note that this won't download avatars automatically; if you get an officer,
// and no avatar image is available, call RequestUserInformation( steamID, false ) to download the avatar // and no avatar image is available, call RequestUserInformation( steamID, false ) to download the avatar
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamFriends_RequestClanOfficerList(ISteamFriends* lpSteamFriends, CSteamID* steamIDClan) { DLL(SteamAPICall_t*) BS_ISteamFriends_RequestClanOfficerList(ISteamFriends* lpSteamFriends, CSteamID* steamIDClan) {
return new uint64_t(lpSteamFriends->RequestClanOfficerList(*steamIDClan)); return new uint64_t(lpSteamFriends->RequestClanOfficerList(*steamIDClan));
} }
// iteration of clan officers - can only be done when a RequestClanOfficerList() call has completed // iteration of clan officers - can only be done when a RequestClanOfficerList() call has completed
// returns the steamID of the clan owner // returns the steamID of the clan owner
DLL_FUNCTION(CSteamID*) BS_ISteamFriends_GetClanOwner(ISteamFriends* lpSteamFriends, CSteamID* steamIDClan) { DLL(CSteamID*) BS_ISteamFriends_GetClanOwner(ISteamFriends* lpSteamFriends, CSteamID* steamIDClan) {
return new CSteamID(lpSteamFriends->GetClanOwner(*steamIDClan)); return new CSteamID(lpSteamFriends->GetClanOwner(*steamIDClan));
} }
// returns the number of officers in a clan (including the owner) // returns the number of officers in a clan (including the owner)
DLL_FUNCTION(int32_t) BS_ISteamFriends_GetClanOfficerCount(ISteamFriends* lpSteamFriends, CSteamID* steamIDClan) { DLL(int32_t) BS_ISteamFriends_GetClanOfficerCount(ISteamFriends* lpSteamFriends, CSteamID* steamIDClan) {
return lpSteamFriends->GetClanOfficerCount(*steamIDClan); return lpSteamFriends->GetClanOfficerCount(*steamIDClan);
} }
// returns the steamID of a clan officer, by index, of range [0,GetClanOfficerCount) // returns the steamID of a clan officer, by index, of range [0,GetClanOfficerCount)
DLL_FUNCTION(CSteamID*) BS_ISteamFriends_GetClanOfficerByIndex(ISteamFriends* lpSteamFriends, CSteamID* steamIDClan, int32_t iOfficer) { DLL(CSteamID*) BS_ISteamFriends_GetClanOfficerByIndex(ISteamFriends* lpSteamFriends, CSteamID* steamIDClan, int32_t iOfficer) {
return new CSteamID(lpSteamFriends->GetClanOfficerByIndex(*steamIDClan, iOfficer)); return new CSteamID(lpSteamFriends->GetClanOfficerByIndex(*steamIDClan, iOfficer));
} }
// if current user is chat restricted, he can't send or receive any text/voice chat messages. // if current user is chat restricted, he can't send or receive any text/voice chat messages.
// the user can't see custom avatars. But the user can be online and send/recv game invites. // the user can't see custom avatars. But the user can be online and send/recv game invites.
// a chat restricted user can't add friends or join any groups. // a chat restricted user can't add friends or join any groups.
DLL_FUNCTION(EUserRestriction) BS_ISteamFriends_GetUserRestrictions(ISteamFriends* lpSteamFriends) { DLL(EUserRestriction) BS_ISteamFriends_GetUserRestrictions(ISteamFriends* lpSteamFriends) {
return (EUserRestriction)lpSteamFriends->GetUserRestrictions(); return (EUserRestriction)lpSteamFriends->GetUserRestrictions();
} }
@@ -300,28 +300,28 @@ DLL_FUNCTION(EUserRestriction) BS_ISteamFriends_GetUserRestrictions(ISteamFriend
// SetRichPresence() to a NULL or an empty string deletes the key // SetRichPresence() to a NULL or an empty string deletes the key
// You can iterate the current set of keys for a friend with GetFriendRichPresenceKeyCount() // You can iterate the current set of keys for a friend with GetFriendRichPresenceKeyCount()
// and GetFriendRichPresenceKeyByIndex() (typically only used for debugging) // and GetFriendRichPresenceKeyByIndex() (typically only used for debugging)
DLL_FUNCTION(uint32_t) BS_ISteamFriends_SetRichPresence(ISteamFriends* lpSteamFriends, const char* pchKey, const char* pchValue) { DLL(uint32_t) BS_ISteamFriends_SetRichPresence(ISteamFriends* lpSteamFriends, const char* pchKey, const char* pchValue) {
return lpSteamFriends->SetRichPresence(pchKey, pchValue); return lpSteamFriends->SetRichPresence(pchKey, pchValue);
} }
DLL_FUNCTION(void) BS_ISteamFriends_ClearRichPresence(ISteamFriends* lpSteamFriends) { DLL(void) BS_ISteamFriends_ClearRichPresence(ISteamFriends* lpSteamFriends) {
lpSteamFriends->ClearRichPresence(); lpSteamFriends->ClearRichPresence();
} }
DLL_FUNCTION(const char*) BS_ISteamFriends_GetFriendRichPresence(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend, const char* pchKey) { DLL(const char*) BS_ISteamFriends_GetFriendRichPresence(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend, const char* pchKey) {
return lpSteamFriends->GetFriendRichPresence(*steamIDFriend, pchKey); return lpSteamFriends->GetFriendRichPresence(*steamIDFriend, pchKey);
} }
DLL_FUNCTION(int32_t) BS_ISteamFriends_GetFriendRichPresenceKeyCount(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend) { DLL(int32_t) BS_ISteamFriends_GetFriendRichPresenceKeyCount(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend) {
return lpSteamFriends->GetFriendRichPresenceKeyCount(*steamIDFriend); return lpSteamFriends->GetFriendRichPresenceKeyCount(*steamIDFriend);
} }
DLL_FUNCTION(const char*) BS_ISteamFriends_GetFriendRichPresenceKeyByIndex(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend, int32_t iKey) { DLL(const char*) BS_ISteamFriends_GetFriendRichPresenceKeyByIndex(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend, int32_t iKey) {
return lpSteamFriends->GetFriendRichPresenceKeyByIndex(*steamIDFriend, iKey); return lpSteamFriends->GetFriendRichPresenceKeyByIndex(*steamIDFriend, iKey);
} }
// Requests rich presence for a specific user. // Requests rich presence for a specific user.
DLL_FUNCTION(void) BS_ISteamFriends_RequestFriendRichPresence(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend) { DLL(void) BS_ISteamFriends_RequestFriendRichPresence(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend) {
lpSteamFriends->RequestFriendRichPresence(*steamIDFriend); lpSteamFriends->RequestFriendRichPresence(*steamIDFriend);
} }
@@ -329,26 +329,26 @@ DLL_FUNCTION(void) BS_ISteamFriends_RequestFriendRichPresence(ISteamFriends* lpS
// if the target accepts the invite, the pchConnectString gets added to the command-line for launching the game // if the target accepts the invite, the pchConnectString gets added to the command-line for launching the game
// if the game is already running, a GameRichPresenceJoinRequested_t callback is posted containing the connect string // if the game is already running, a GameRichPresenceJoinRequested_t callback is posted containing the connect string
// invites can only be sent to friends // invites can only be sent to friends
DLL_FUNCTION(uint32_t) BS_ISteamFriends_InviteUserToGame(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend, const char *pchConnectString) { DLL(uint32_t) BS_ISteamFriends_InviteUserToGame(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend, const char *pchConnectString) {
return lpSteamFriends->InviteUserToGame(*steamIDFriend, pchConnectString); return lpSteamFriends->InviteUserToGame(*steamIDFriend, pchConnectString);
} }
// recently-played-with friends iteration // recently-played-with friends iteration
// this iterates the entire list of users recently played with, across games // this iterates the entire list of users recently played with, across games
// GetFriendCoplayTime() returns as a unix time // GetFriendCoplayTime() returns as a unix time
DLL_FUNCTION(int32_t) BS_ISteamFriends_GetCoplayFriendCount(ISteamFriends* lpSteamFriends) { DLL(int32_t) BS_ISteamFriends_GetCoplayFriendCount(ISteamFriends* lpSteamFriends) {
return lpSteamFriends->GetCoplayFriendCount(); return lpSteamFriends->GetCoplayFriendCount();
} }
DLL_FUNCTION(CSteamID*) BS_ISteamFriends_GetCoplayFriend(ISteamFriends* lpSteamFriends, int32_t iCoplayFriend) { DLL(CSteamID*) BS_ISteamFriends_GetCoplayFriend(ISteamFriends* lpSteamFriends, int32_t iCoplayFriend) {
return new CSteamID(lpSteamFriends->GetCoplayFriend(iCoplayFriend)); return new CSteamID(lpSteamFriends->GetCoplayFriend(iCoplayFriend));
} }
DLL_FUNCTION(int32_t) BS_ISteamFriends_GetFriendCoplayTime(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend) { DLL(int32_t) BS_ISteamFriends_GetFriendCoplayTime(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend) {
return lpSteamFriends->GetFriendCoplayTime(*steamIDFriend); return lpSteamFriends->GetFriendCoplayTime(*steamIDFriend);
} }
DLL_FUNCTION(AppId_t) BS_ISteamFriends_GetFriendCoplayGame(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend) { DLL(AppId_t) BS_ISteamFriends_GetFriendCoplayGame(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend) {
return lpSteamFriends->GetFriendCoplayGame(*steamIDFriend); return lpSteamFriends->GetFriendCoplayGame(*steamIDFriend);
} }
@@ -356,70 +356,70 @@ DLL_FUNCTION(AppId_t) BS_ISteamFriends_GetFriendCoplayGame(ISteamFriends* lpStea
// this allows in-game access to group (clan) chats from in the game // this allows in-game access to group (clan) chats from in the game
// the behavior is somewhat sophisticated, because the user may or may not be already in the group chat from outside the game or in the overlay // the behavior is somewhat sophisticated, because the user may or may not be already in the group chat from outside the game or in the overlay
// use ActivateGameOverlayToUser( "chat", steamIDClan ) to open the in-game overlay version of the chat // use ActivateGameOverlayToUser( "chat", steamIDClan ) to open the in-game overlay version of the chat
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamFriends_JoinClanChatRoom(ISteamFriends* lpSteamFriends, CSteamID* steamIDClan) { DLL(SteamAPICall_t*) BS_ISteamFriends_JoinClanChatRoom(ISteamFriends* lpSteamFriends, CSteamID* steamIDClan) {
return new SteamAPICall_t(lpSteamFriends->JoinClanChatRoom(*steamIDClan)); return new SteamAPICall_t(lpSteamFriends->JoinClanChatRoom(*steamIDClan));
} }
DLL_FUNCTION(uint32_t) BS_ISteamFriends_LeaveClanChatRoom(ISteamFriends* lpSteamFriends, CSteamID* steamIDClan) { DLL(uint32_t) BS_ISteamFriends_LeaveClanChatRoom(ISteamFriends* lpSteamFriends, CSteamID* steamIDClan) {
return lpSteamFriends->LeaveClanChatRoom(*steamIDClan); return lpSteamFriends->LeaveClanChatRoom(*steamIDClan);
} }
DLL_FUNCTION(int32_t) BS_ISteamFriends_GetClanChatMemberCount(ISteamFriends* lpSteamFriends, CSteamID* steamIDClan) { DLL(int32_t) BS_ISteamFriends_GetClanChatMemberCount(ISteamFriends* lpSteamFriends, CSteamID* steamIDClan) {
return lpSteamFriends->GetClanChatMemberCount(*steamIDClan); return lpSteamFriends->GetClanChatMemberCount(*steamIDClan);
} }
DLL_FUNCTION(CSteamID*) BS_ISteamFriends_GetChatMemberByIndex(ISteamFriends* lpSteamFriends, CSteamID* steamIDClan, int32_t iUser) { DLL(CSteamID*) BS_ISteamFriends_GetChatMemberByIndex(ISteamFriends* lpSteamFriends, CSteamID* steamIDClan, int32_t iUser) {
return new CSteamID(lpSteamFriends->GetChatMemberByIndex(*steamIDClan, iUser)); return new CSteamID(lpSteamFriends->GetChatMemberByIndex(*steamIDClan, iUser));
} }
DLL_FUNCTION(uint32_t) BS_ISteamFriends_SendClanChatMessage(ISteamFriends* lpSteamFriends, CSteamID* steamIDClanChat, const char *pchText) { DLL(uint32_t) BS_ISteamFriends_SendClanChatMessage(ISteamFriends* lpSteamFriends, CSteamID* steamIDClanChat, const char *pchText) {
return lpSteamFriends->SendClanChatMessage(*steamIDClanChat, pchText); return lpSteamFriends->SendClanChatMessage(*steamIDClanChat, pchText);
} }
DLL_FUNCTION(int32_t) BS_ISteamFriends_GetClanChatMessage(ISteamFriends* lpSteamFriends, CSteamID* steamIDClanChat, int32_t iMessage, void* prgchText, int32_t cchTextMax, EChatEntryType* peChatEntryType, CSteamID* psteamidChatter) { DLL(int32_t) BS_ISteamFriends_GetClanChatMessage(ISteamFriends* lpSteamFriends, CSteamID* steamIDClanChat, int32_t iMessage, void* prgchText, int32_t cchTextMax, EChatEntryType* peChatEntryType, CSteamID* psteamidChatter) {
return lpSteamFriends->GetClanChatMessage(*steamIDClanChat, iMessage, prgchText, cchTextMax, peChatEntryType, psteamidChatter); return lpSteamFriends->GetClanChatMessage(*steamIDClanChat, iMessage, prgchText, cchTextMax, peChatEntryType, psteamidChatter);
} }
DLL_FUNCTION(uint32_t) BS_ISteamFriends_IsClanChatAdmin(ISteamFriends* lpSteamFriends, CSteamID* steamIDClanChat, CSteamID* steamIDUser) { DLL(uint32_t) BS_ISteamFriends_IsClanChatAdmin(ISteamFriends* lpSteamFriends, CSteamID* steamIDClanChat, CSteamID* steamIDUser) {
return lpSteamFriends->IsClanChatAdmin(*steamIDClanChat, *steamIDUser); return lpSteamFriends->IsClanChatAdmin(*steamIDClanChat, *steamIDUser);
} }
// interact with the Steam (game overlay / desktop) // interact with the Steam (game overlay / desktop)
DLL_FUNCTION(uint32_t) BS_ISteamFriends_IsClanChatWindowOpenInSteam(ISteamFriends* lpSteamFriends, CSteamID* steamIDClanChat) { DLL(uint32_t) BS_ISteamFriends_IsClanChatWindowOpenInSteam(ISteamFriends* lpSteamFriends, CSteamID* steamIDClanChat) {
return lpSteamFriends->IsClanChatWindowOpenInSteam(*steamIDClanChat); return lpSteamFriends->IsClanChatWindowOpenInSteam(*steamIDClanChat);
} }
DLL_FUNCTION(uint32_t) BS_ISteamFriends_OpenClanChatWindowInSteam(ISteamFriends* lpSteamFriends, CSteamID* steamIDClanChat) { DLL(uint32_t) BS_ISteamFriends_OpenClanChatWindowInSteam(ISteamFriends* lpSteamFriends, CSteamID* steamIDClanChat) {
return lpSteamFriends->OpenClanChatWindowInSteam(*steamIDClanChat); return lpSteamFriends->OpenClanChatWindowInSteam(*steamIDClanChat);
} }
DLL_FUNCTION(uint32_t) BS_ISteamFriends_CloseClanChatWindowInSteam(ISteamFriends* lpSteamFriends, CSteamID* steamIDClanChat) { DLL(uint32_t) BS_ISteamFriends_CloseClanChatWindowInSteam(ISteamFriends* lpSteamFriends, CSteamID* steamIDClanChat) {
return lpSteamFriends->CloseClanChatWindowInSteam(*steamIDClanChat); return lpSteamFriends->CloseClanChatWindowInSteam(*steamIDClanChat);
} }
// peer-to-peer chat interception // peer-to-peer chat interception
// this is so you can show P2P chats inline in the game // this is so you can show P2P chats inline in the game
DLL_FUNCTION(uint32_t) BS_ISteamFriends_SetListenForFriendsMessages(ISteamFriends* lpSteamFriends, uint32_t bInterceptEnabled) { DLL(uint32_t) BS_ISteamFriends_SetListenForFriendsMessages(ISteamFriends* lpSteamFriends, uint32_t bInterceptEnabled) {
return lpSteamFriends->SetListenForFriendsMessages(bInterceptEnabled != 0); return lpSteamFriends->SetListenForFriendsMessages(bInterceptEnabled != 0);
} }
DLL_FUNCTION(uint32_t) BS_ISteamFriends_ReplyToFriendMessage(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend, const char* pchMsgToSend) { DLL(uint32_t) BS_ISteamFriends_ReplyToFriendMessage(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend, const char* pchMsgToSend) {
return lpSteamFriends->ReplyToFriendMessage(*steamIDFriend, pchMsgToSend); return lpSteamFriends->ReplyToFriendMessage(*steamIDFriend, pchMsgToSend);
} }
DLL_FUNCTION(int32_t) BS_ISteamFriends_GetFriendMessage(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend, int32_t iMessageID, void* pvData, int32_t cubData, EChatEntryType* peChatEntryType) { DLL(int32_t) BS_ISteamFriends_GetFriendMessage(ISteamFriends* lpSteamFriends, CSteamID* steamIDFriend, int32_t iMessageID, void* pvData, int32_t cubData, EChatEntryType* peChatEntryType) {
return lpSteamFriends->GetFriendMessage(*steamIDFriend, iMessageID, pvData, cubData, peChatEntryType); return lpSteamFriends->GetFriendMessage(*steamIDFriend, iMessageID, pvData, cubData, peChatEntryType);
} }
// following apis // following apis
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamFriends_GetFollowerCount(ISteamFriends* lpSteamFriends, CSteamID* steamID) { DLL(SteamAPICall_t*) BS_ISteamFriends_GetFollowerCount(ISteamFriends* lpSteamFriends, CSteamID* steamID) {
return new SteamAPICall_t(lpSteamFriends->GetFollowerCount(*steamID)); return new SteamAPICall_t(lpSteamFriends->GetFollowerCount(*steamID));
} }
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamFriends_IsFollowing(ISteamFriends* lpSteamFriends, CSteamID* steamID) { DLL(SteamAPICall_t*) BS_ISteamFriends_IsFollowing(ISteamFriends* lpSteamFriends, CSteamID* steamID) {
return new SteamAPICall_t(lpSteamFriends->IsFollowing(*steamID)); return new SteamAPICall_t(lpSteamFriends->IsFollowing(*steamID));
} }
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamFriends_EnumerateFollowingList(ISteamFriends* lpSteamFriends, uint32_t unStartIndex) { DLL(SteamAPICall_t*) BS_ISteamFriends_EnumerateFollowingList(ISteamFriends* lpSteamFriends, uint32_t unStartIndex) {
return new SteamAPICall_t(lpSteamFriends->EnumerateFollowingList(unStartIndex)); return new SteamAPICall_t(lpSteamFriends->EnumerateFollowingList(unStartIndex));
} }
+49 -49
View File
@@ -29,23 +29,23 @@
// UDP packets for the master server updater. See references to GameSocketShare in isteamgameserver.h. // UDP packets for the master server updater. See references to GameSocketShare in isteamgameserver.h.
// - The version string is usually in the form x.x.x.x, and is used by the master server to detect when the // - The version string is usually in the form x.x.x.x, and is used by the master server to detect when the
// server is out of date. (Only servers with the latest version will be listed.) // server is out of date. (Only servers with the latest version will be listed.)
DLL_FUNCTION(uint32_t) BS_SteamGameServer_Init(uint32_t unIP, uint16_t usSteamPort, uint16_t usGamePort, uint16_t usQueryPort, EServerMode eServerMode, const char *pchVersionString) { DLL(uint32_t) BS_SteamGameServer_Init(uint32_t unIP, uint16_t usSteamPort, uint16_t usGamePort, uint16_t usQueryPort, EServerMode eServerMode, const char *pchVersionString) {
return SteamGameServer_Init(unIP, usSteamPort, usGamePort, usQueryPort, eServerMode, pchVersionString); return SteamGameServer_Init(unIP, usSteamPort, usGamePort, usQueryPort, eServerMode, pchVersionString);
} }
DLL_FUNCTION(void) BS_SteamGameServer_Shutdown() { DLL(void) BS_SteamGameServer_Shutdown() {
SteamGameServer_Shutdown(); SteamGameServer_Shutdown();
} }
DLL_FUNCTION(void) BS_SteamGameServer_RunCallbacks() { DLL(void) BS_SteamGameServer_RunCallbacks() {
SteamGameServer_RunCallbacks(); SteamGameServer_RunCallbacks();
} }
DLL_FUNCTION(uint32_t) BS_SteamGameServer_IsSecure() { DLL(uint32_t) BS_SteamGameServer_IsSecure() {
return SteamGameServer_BSecure(); return SteamGameServer_BSecure();
} }
DLL_FUNCTION(CSteamID*) BS_SteamGameServer_GetSteamID() { DLL(CSteamID*) BS_SteamGameServer_GetSteamID() {
return new CSteamID(SteamGameServer_GetSteamID()); return new CSteamID(SteamGameServer_GetSteamID());
} }
@@ -54,7 +54,7 @@ DLL_FUNCTION(CSteamID*) BS_SteamGameServer_GetSteamID() {
// //
// The following functions are part of abstracting API access to the steamclient.dll, but should only be used in very specific cases // The following functions are part of abstracting API access to the steamclient.dll, but should only be used in very specific cases
//----------------------------------------------------------------------------------------------------------------------------------------------------------// //----------------------------------------------------------------------------------------------------------------------------------------------------------//
DLL_FUNCTION(HSteamPipe) BS_SteamGameServer_GetHSteamPipe() { DLL(HSteamPipe) BS_SteamGameServer_GetHSteamPipe() {
return SteamGameServer_GetHSteamPipe(); return SteamGameServer_GetHSteamPipe();
} }
@@ -62,7 +62,7 @@ DLL_FUNCTION(HSteamPipe) BS_SteamGameServer_GetHSteamPipe() {
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Functions for authenticating users via Steam to play on a game server // Purpose: Functions for authenticating users via Steam to play on a game server
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(ISteamGameServer*) BS_SteamGameServer() { DLL(ISteamGameServer*) BS_SteamGameServer() {
return SteamGameServer(); return SteamGameServer();
} }
@@ -72,19 +72,19 @@ DLL_FUNCTION(ISteamGameServer*) BS_SteamGameServer() {
// //
/// This is called by SteamGameServer_Init, and you will usually not need to call it directly /// This is called by SteamGameServer_Init, and you will usually not need to call it directly
DLL_FUNCTION(uint32_t) BS_ISteamGameServer_InitGameServer(ISteamGameServer* pSteamGameServer, uint32_t unIP, uint16_t usGamePort, uint16_t usQueryPort, uint32_t unFlags, AppId_t nGameAppId, const char *pchVersionString) { DLL(uint32_t) BS_ISteamGameServer_InitGameServer(ISteamGameServer* pSteamGameServer, uint32_t unIP, uint16_t usGamePort, uint16_t usQueryPort, uint32_t unFlags, AppId_t nGameAppId, const char *pchVersionString) {
return pSteamGameServer->InitGameServer(unIP, usGamePort, usQueryPort, unFlags, nGameAppId, pchVersionString); return pSteamGameServer->InitGameServer(unIP, usGamePort, usQueryPort, unFlags, nGameAppId, pchVersionString);
} }
/// Game product identifier. This is currently used by the master server for version checking purposes. /// Game product identifier. This is currently used by the master server for version checking purposes.
/// It's a required field, but will eventually will go away, and the AppID will be used for this purpose. /// It's a required field, but will eventually will go away, and the AppID will be used for this purpose.
DLL_FUNCTION(void) BS_ISteamGameServer_SetProduct(ISteamGameServer* pSteamGameServer, const char *pszProduct) { DLL(void) BS_ISteamGameServer_SetProduct(ISteamGameServer* pSteamGameServer, const char *pszProduct) {
pSteamGameServer->SetProduct(pszProduct); pSteamGameServer->SetProduct(pszProduct);
} }
/// Description of the game. This is a required field and is displayed in the steam server browser....for now. /// Description of the game. This is a required field and is displayed in the steam server browser....for now.
/// This is a required field, but it will go away eventually, as the data should be determined from the AppID. /// This is a required field, but it will go away eventually, as the data should be determined from the AppID.
DLL_FUNCTION(void) BS_ISteamGameServer_SetGameDescription(ISteamGameServer* pSteamGameServer, const char *pszGameDescription) { DLL(void) BS_ISteamGameServer_SetGameDescription(ISteamGameServer* pSteamGameServer, const char *pszGameDescription) {
pSteamGameServer->SetGameDescription(pszGameDescription); pSteamGameServer->SetGameDescription(pszGameDescription);
} }
@@ -92,12 +92,12 @@ DLL_FUNCTION(void) BS_ISteamGameServer_SetGameDescription(ISteamGameServer* pSte
/// this application is the original game, not a mod. /// this application is the original game, not a mod.
/// ///
/// @see k_cbMaxGameServerGameDir /// @see k_cbMaxGameServerGameDir
DLL_FUNCTION(void) BS_ISteamGameServer_SetModDir(ISteamGameServer* pSteamGameServer, const char *pszModDir) { DLL(void) BS_ISteamGameServer_SetModDir(ISteamGameServer* pSteamGameServer, const char *pszModDir) {
pSteamGameServer->SetModDir(pszModDir); pSteamGameServer->SetModDir(pszModDir);
} }
/// Is this is a dedicated server? The default value is false. /// Is this is a dedicated server? The default value is false.
DLL_FUNCTION(void) BS_ISteamGameServer_SetDedicatedServer(ISteamGameServer* pSteamGameServer, uint32_t bDedicated) { DLL(void) BS_ISteamGameServer_SetDedicatedServer(ISteamGameServer* pSteamGameServer, uint32_t bDedicated) {
pSteamGameServer->SetDedicatedServer(!!bDedicated); pSteamGameServer->SetDedicatedServer(!!bDedicated);
} }
@@ -111,7 +111,7 @@ DLL_FUNCTION(void) BS_ISteamGameServer_SetDedicatedServer(ISteamGameServer* pSte
/// @see SteamServersConnected_t /// @see SteamServersConnected_t
/// @see SteamServerConnectFailure_t /// @see SteamServerConnectFailure_t
/// @see SteamServersDisconnected_t /// @see SteamServersDisconnected_t
DLL_FUNCTION(void) BS_ISteamGameServer_LogOn(ISteamGameServer* pSteamGameServer, const char *pszToken) { DLL(void) BS_ISteamGameServer_LogOn(ISteamGameServer* pSteamGameServer, const char *pszToken) {
pSteamGameServer->LogOn(pszToken); pSteamGameServer->LogOn(pszToken);
} }
@@ -119,31 +119,31 @@ DLL_FUNCTION(void) BS_ISteamGameServer_LogOn(ISteamGameServer* pSteamGameServer,
/// ///
/// Note: in previous versions of the SDK, this was automatically called within SteamGameServer_Init, /// Note: in previous versions of the SDK, this was automatically called within SteamGameServer_Init,
/// but this is no longer the case. /// but this is no longer the case.
DLL_FUNCTION(void) BS_ISteamGameServer_LogOnAnonymous(ISteamGameServer* pSteamGameServer) { DLL(void) BS_ISteamGameServer_LogOnAnonymous(ISteamGameServer* pSteamGameServer) {
pSteamGameServer->LogOnAnonymous(); pSteamGameServer->LogOnAnonymous();
} }
/// Begin process of logging game server out of steam /// Begin process of logging game server out of steam
DLL_FUNCTION(void) BS_ISteamGameServer_LogOff(ISteamGameServer* pSteamGameServer) { DLL(void) BS_ISteamGameServer_LogOff(ISteamGameServer* pSteamGameServer) {
pSteamGameServer->LogOff(); pSteamGameServer->LogOff();
} }
// status functions // status functions
DLL_FUNCTION(uint32_t) BS_ISteamGameServer_IsLoggedOn(ISteamGameServer* pSteamGameServer) { DLL(uint32_t) BS_ISteamGameServer_IsLoggedOn(ISteamGameServer* pSteamGameServer) {
return pSteamGameServer->BLoggedOn(); return pSteamGameServer->BLoggedOn();
} }
DLL_FUNCTION(uint32_t) BS_ISteamGameServer_IsSecure(ISteamGameServer* pSteamGameServer) { DLL(uint32_t) BS_ISteamGameServer_IsSecure(ISteamGameServer* pSteamGameServer) {
return pSteamGameServer->BSecure(); return pSteamGameServer->BSecure();
} }
DLL_FUNCTION(CSteamID*) BS_ISteamGameServer_GetSteamID(ISteamGameServer* pSteamGameServer) { DLL(CSteamID*) BS_ISteamGameServer_GetSteamID(ISteamGameServer* pSteamGameServer) {
return new CSteamID(pSteamGameServer->GetSteamID()); return new CSteamID(pSteamGameServer->GetSteamID());
} }
/// Returns true if the master server has requested a restart. /// Returns true if the master server has requested a restart.
/// Only returns true once per request. /// Only returns true once per request.
DLL_FUNCTION(uint32_t) BS_ISteamGameServer_WasRestartRequested(ISteamGameServer* pSteamGameServer) { DLL(uint32_t) BS_ISteamGameServer_WasRestartRequested(ISteamGameServer* pSteamGameServer) {
return pSteamGameServer->WasRestartRequested(); return pSteamGameServer->WasRestartRequested();
} }
@@ -152,54 +152,54 @@ DLL_FUNCTION(uint32_t) BS_ISteamGameServer_WasRestartRequested(ISteamGameServer*
// //
/// Max player count that will be reported to server browser and client queries /// Max player count that will be reported to server browser and client queries
DLL_FUNCTION(void) BS_ISteamGameServer_SetMaxPlayerCount(ISteamGameServer* pSteamGameServer, int32_t cPlayersMax) { DLL(void) BS_ISteamGameServer_SetMaxPlayerCount(ISteamGameServer* pSteamGameServer, int32_t cPlayersMax) {
pSteamGameServer->SetMaxPlayerCount(cPlayersMax); pSteamGameServer->SetMaxPlayerCount(cPlayersMax);
} }
/// Number of bots. Default value is zero /// Number of bots. Default value is zero
DLL_FUNCTION(void) BS_ISteamGameServer_SetBotPlayerCount(ISteamGameServer* pSteamGameServer, int32_t cBotplayers) { DLL(void) BS_ISteamGameServer_SetBotPlayerCount(ISteamGameServer* pSteamGameServer, int32_t cBotplayers) {
pSteamGameServer->SetBotPlayerCount(cBotplayers); pSteamGameServer->SetBotPlayerCount(cBotplayers);
} }
/// Set the name of server as it will appear in the server browser /// Set the name of server as it will appear in the server browser
/// ///
/// @see k_cbMaxGameServerName /// @see k_cbMaxGameServerName
DLL_FUNCTION(void) BS_ISteamGameServer_SetServerName(ISteamGameServer* pSteamGameServer, const char *pszServerName) { DLL(void) BS_ISteamGameServer_SetServerName(ISteamGameServer* pSteamGameServer, const char *pszServerName) {
pSteamGameServer->SetServerName(pszServerName); pSteamGameServer->SetServerName(pszServerName);
} }
/// Set name of map to report in the server browser /// Set name of map to report in the server browser
/// ///
/// @see k_cbMaxGameServerName /// @see k_cbMaxGameServerName
DLL_FUNCTION(void) BS_ISteamGameServer_SetMapName(ISteamGameServer* pSteamGameServer, const char *pszMapName) { DLL(void) BS_ISteamGameServer_SetMapName(ISteamGameServer* pSteamGameServer, const char *pszMapName) {
pSteamGameServer->SetMapName(pszMapName); pSteamGameServer->SetMapName(pszMapName);
} }
/// Let people know if your server will require a password /// Let people know if your server will require a password
DLL_FUNCTION(void) BS_ISteamGameServer_SetPasswordProtected(ISteamGameServer* pSteamGameServer, uint32_t bPasswordProtected) { DLL(void) BS_ISteamGameServer_SetPasswordProtected(ISteamGameServer* pSteamGameServer, uint32_t bPasswordProtected) {
pSteamGameServer->SetPasswordProtected(!!bPasswordProtected); pSteamGameServer->SetPasswordProtected(!!bPasswordProtected);
} }
/// Spectator server. The default value is zero, meaning the service /// Spectator server. The default value is zero, meaning the service
/// is not used. /// is not used.
DLL_FUNCTION(void) BS_ISteamGameServer_SetSpectatorPort(ISteamGameServer* pSteamGameServer, uint16_t unSpectatorPort) { DLL(void) BS_ISteamGameServer_SetSpectatorPort(ISteamGameServer* pSteamGameServer, uint16_t unSpectatorPort) {
pSteamGameServer->SetSpectatorPort(unSpectatorPort); pSteamGameServer->SetSpectatorPort(unSpectatorPort);
} }
/// Name of the spectator server. (Only used if spectator port is nonzero.) /// Name of the spectator server. (Only used if spectator port is nonzero.)
/// ///
/// @see k_cbMaxGameServerMapName /// @see k_cbMaxGameServerMapName
DLL_FUNCTION(void) BS_ISteamGameServer_SetSpectatorServerName(ISteamGameServer* pSteamGameServer, const char *pszSpectatorServerName) { DLL(void) BS_ISteamGameServer_SetSpectatorServerName(ISteamGameServer* pSteamGameServer, const char *pszSpectatorServerName) {
pSteamGameServer->SetSpectatorServerName(pszSpectatorServerName); pSteamGameServer->SetSpectatorServerName(pszSpectatorServerName);
} }
/// Call this to clear the whole list of key/values that are sent in rules queries. /// Call this to clear the whole list of key/values that are sent in rules queries.
DLL_FUNCTION(void) BS_ISteamGameServer_ClearAllKeyValues(ISteamGameServer* pSteamGameServer) { DLL(void) BS_ISteamGameServer_ClearAllKeyValues(ISteamGameServer* pSteamGameServer) {
pSteamGameServer->ClearAllKeyValues(); pSteamGameServer->ClearAllKeyValues();
} }
/// Call this to add/update a key/value pair. /// Call this to add/update a key/value pair.
DLL_FUNCTION(void) BS_ISteamGameServer_SetKeyValue(ISteamGameServer* pSteamGameServer, const char *pKey, const char *pValue) { DLL(void) BS_ISteamGameServer_SetKeyValue(ISteamGameServer* pSteamGameServer, const char *pKey, const char *pValue) {
pSteamGameServer->SetKeyValue(pKey, pValue); pSteamGameServer->SetKeyValue(pKey, pValue);
} }
@@ -207,7 +207,7 @@ DLL_FUNCTION(void) BS_ISteamGameServer_SetKeyValue(ISteamGameServer* pSteamGameS
/// it allows users to filter in the matchmaking/server-browser interfaces based on the value /// it allows users to filter in the matchmaking/server-browser interfaces based on the value
/// ///
/// @see k_cbMaxGameServerTags /// @see k_cbMaxGameServerTags
DLL_FUNCTION(void) BS_ISteamGameServer_SetGameTags(ISteamGameServer* pSteamGameServer, const char *pchGameTags) { DLL(void) BS_ISteamGameServer_SetGameTags(ISteamGameServer* pSteamGameServer, const char *pchGameTags) {
pSteamGameServer->SetGameTags(pchGameTags); pSteamGameServer->SetGameTags(pchGameTags);
} }
@@ -217,12 +217,12 @@ DLL_FUNCTION(void) BS_ISteamGameServer_SetGameTags(ISteamGameServer* pSteamGameS
/// acknowledged) /// acknowledged)
/// ///
/// @see k_cbMaxGameServerGameData /// @see k_cbMaxGameServerGameData
DLL_FUNCTION(void) BS_ISteamGameServer_SetGameData(ISteamGameServer* pSteamGameServer, const char *pchGameData) { DLL(void) BS_ISteamGameServer_SetGameData(ISteamGameServer* pSteamGameServer, const char *pchGameData) {
pSteamGameServer->SetGameData(pchGameData); pSteamGameServer->SetGameData(pchGameData);
} }
/// Region identifier. This is an optional field, the default value is empty, meaning the "world" region /// Region identifier. This is an optional field, the default value is empty, meaning the "world" region
DLL_FUNCTION(void) BS_ISteamGameServer_SetRegion(ISteamGameServer* pSteamGameServer, const char *pszRegion) { DLL(void) BS_ISteamGameServer_SetRegion(ISteamGameServer* pSteamGameServer, const char *pszRegion) {
pSteamGameServer->SetRegion(pszRegion); pSteamGameServer->SetRegion(pszRegion);
} }
@@ -239,7 +239,7 @@ DLL_FUNCTION(void) BS_ISteamGameServer_SetRegion(ISteamGameServer* pSteamGameSer
// Return Value: returns true if the users ticket passes basic checks. pSteamIDUser will contain the Steam ID of this user. pSteamIDUser must NOT be NULL // Return Value: returns true if the users ticket passes basic checks. pSteamIDUser will contain the Steam ID of this user. pSteamIDUser must NOT be NULL
// If the call succeeds then you should expect a GSClientApprove_t or GSClientDeny_t callback which will tell you whether authentication // If the call succeeds then you should expect a GSClientApprove_t or GSClientDeny_t callback which will tell you whether authentication
// for the user has succeeded or failed (the steamid in the callback will match the one returned by this call) // for the user has succeeded or failed (the steamid in the callback will match the one returned by this call)
DLL_FUNCTION(uint32_t) BS_ISteamGameServer_SendUserConnectAndAuthenticate(ISteamGameServer* pSteamGameServer, uint32_t unIPClient, const void *pvAuthBlob, uint32_t cubAuthBlobSize, CSteamID *pSteamIDUser) { DLL(uint32_t) BS_ISteamGameServer_SendUserConnectAndAuthenticate(ISteamGameServer* pSteamGameServer, uint32_t unIPClient, const void *pvAuthBlob, uint32_t cubAuthBlobSize, CSteamID *pSteamIDUser) {
return pSteamGameServer->SendUserConnectAndAuthenticate(unIPClient, pvAuthBlob, cubAuthBlobSize, pSteamIDUser); return pSteamGameServer->SendUserConnectAndAuthenticate(unIPClient, pvAuthBlob, cubAuthBlobSize, pSteamIDUser);
} }
@@ -247,14 +247,14 @@ DLL_FUNCTION(uint32_t) BS_ISteamGameServer_SendUserConnectAndAuthenticate(ISteam
// //
// Return Value: Returns a SteamID for the user to be tracked with, you should call HandleUserDisconnect() // Return Value: Returns a SteamID for the user to be tracked with, you should call HandleUserDisconnect()
// when this user leaves the server just like you would for a real user. // when this user leaves the server just like you would for a real user.
DLL_FUNCTION(CSteamID*) BS_ISteamGameServer_CreateUnauthenticatedUserConnection(ISteamGameServer* pSteamGameServer) { DLL(CSteamID*) BS_ISteamGameServer_CreateUnauthenticatedUserConnection(ISteamGameServer* pSteamGameServer) {
return new CSteamID(pSteamGameServer->CreateUnauthenticatedUserConnection()); return new CSteamID(pSteamGameServer->CreateUnauthenticatedUserConnection());
} }
// Should be called whenever a user leaves our game server, this lets Steam internally // Should be called whenever a user leaves our game server, this lets Steam internally
// track which users are currently on which servers for the purposes of preventing a single // track which users are currently on which servers for the purposes of preventing a single
// account being logged into multiple servers, showing who is currently on a server, etc. // account being logged into multiple servers, showing who is currently on a server, etc.
DLL_FUNCTION(void) BS_ISteamGameServer_SendUserDisconnect(ISteamGameServer* pSteamGameServer, CSteamID* pSteamIDUser) { DLL(void) BS_ISteamGameServer_SendUserDisconnect(ISteamGameServer* pSteamGameServer, CSteamID* pSteamIDUser) {
pSteamGameServer->SendUserDisconnect(*pSteamIDUser); pSteamGameServer->SendUserDisconnect(*pSteamIDUser);
} }
@@ -263,7 +263,7 @@ DLL_FUNCTION(void) BS_ISteamGameServer_SendUserDisconnect(ISteamGameServer* pSte
// GSUserValidationSuccess callback. // GSUserValidationSuccess callback.
// //
// Return Value: true if successful, false if failure (ie, steamIDUser wasn't for an active player) // Return Value: true if successful, false if failure (ie, steamIDUser wasn't for an active player)
DLL_FUNCTION(uint32_t) BS_ISteamGameServer_UpdateUserData(ISteamGameServer* pSteamGameServer, CSteamID* pSteamIDUser, const char *pchPlayerName, uint32_t uScore) { DLL(uint32_t) BS_ISteamGameServer_UpdateUserData(ISteamGameServer* pSteamGameServer, CSteamID* pSteamIDUser, const char *pchPlayerName, uint32_t uScore) {
return pSteamGameServer->BUpdateUserData(*pSteamIDUser, pchPlayerName, uScore); return pSteamGameServer->BUpdateUserData(*pSteamIDUser, pchPlayerName, uScore);
} }
@@ -272,42 +272,42 @@ DLL_FUNCTION(uint32_t) BS_ISteamGameServer_UpdateUserData(ISteamGameServer* pSte
// Retrieve ticket to be sent to the entity who wishes to authenticate you ( using BeginAuthSession API ). // Retrieve ticket to be sent to the entity who wishes to authenticate you ( using BeginAuthSession API ).
// pcbTicket retrieves the length of the actual ticket. // pcbTicket retrieves the length of the actual ticket.
DLL_FUNCTION(HAuthTicket) BS_ISteamGameServer_GetAuthSessionTicket(ISteamGameServer* pSteamGameServer, void *pTicket, int32_t cbMaxTicket, uint32_t *pcbTicket) { DLL(HAuthTicket) BS_ISteamGameServer_GetAuthSessionTicket(ISteamGameServer* pSteamGameServer, void *pTicket, int32_t cbMaxTicket, uint32_t *pcbTicket) {
return pSteamGameServer->GetAuthSessionTicket(pTicket, cbMaxTicket, pcbTicket); return pSteamGameServer->GetAuthSessionTicket(pTicket, cbMaxTicket, pcbTicket);
} }
// Authenticate ticket ( from GetAuthSessionTicket ) from entity steamID to be sure it is valid and isnt reused // Authenticate ticket ( from GetAuthSessionTicket ) from entity steamID to be sure it is valid and isnt reused
// Registers for callbacks if the entity goes offline or cancels the ticket ( see ValidateAuthTicketResponse_t callback and EAuthSessionResponse ) // Registers for callbacks if the entity goes offline or cancels the ticket ( see ValidateAuthTicketResponse_t callback and EAuthSessionResponse )
DLL_FUNCTION(EBeginAuthSessionResult) BS_ISteamGameServer_BeginAuthSession(ISteamGameServer* pSteamGameServer, const void *pAuthTicket, int32_t cbAuthTicket, CSteamID* pSteamID) { DLL(EBeginAuthSessionResult) BS_ISteamGameServer_BeginAuthSession(ISteamGameServer* pSteamGameServer, const void *pAuthTicket, int32_t cbAuthTicket, CSteamID* pSteamID) {
return pSteamGameServer->BeginAuthSession(pAuthTicket, cbAuthTicket, *pSteamID); return pSteamGameServer->BeginAuthSession(pAuthTicket, cbAuthTicket, *pSteamID);
} }
// Stop tracking started by BeginAuthSession - called when no longer playing game with this entity // Stop tracking started by BeginAuthSession - called when no longer playing game with this entity
DLL_FUNCTION(void) BS_ISteamGameServer_EndAuthSession(ISteamGameServer* pSteamGameServer, CSteamID* pSteamID) { DLL(void) BS_ISteamGameServer_EndAuthSession(ISteamGameServer* pSteamGameServer, CSteamID* pSteamID) {
pSteamGameServer->EndAuthSession(*pSteamID); pSteamGameServer->EndAuthSession(*pSteamID);
} }
// Cancel auth ticket from GetAuthSessionTicket, called when no longer playing game with the entity you gave the ticket to // Cancel auth ticket from GetAuthSessionTicket, called when no longer playing game with the entity you gave the ticket to
DLL_FUNCTION(void) BS_ISteamGameServer_CancelAuthTicket(ISteamGameServer* pSteamGameServer, HAuthTicket hAuthTicket) { DLL(void) BS_ISteamGameServer_CancelAuthTicket(ISteamGameServer* pSteamGameServer, HAuthTicket hAuthTicket) {
pSteamGameServer->CancelAuthTicket(hAuthTicket); pSteamGameServer->CancelAuthTicket(hAuthTicket);
} }
// After receiving a user's authentication data, and passing it to SendUserConnectAndAuthenticate, use this function // After receiving a user's authentication data, and passing it to SendUserConnectAndAuthenticate, use this function
// to determine if the user owns downloadable content specified by the provided AppID. // to determine if the user owns downloadable content specified by the provided AppID.
DLL_FUNCTION(EUserHasLicenseForAppResult) BS_ISteamGameServer_UserHasLicenseForApp(ISteamGameServer* pSteamGameServer, CSteamID* pSteamID, AppId_t appID) { DLL(EUserHasLicenseForAppResult) BS_ISteamGameServer_UserHasLicenseForApp(ISteamGameServer* pSteamGameServer, CSteamID* pSteamID, AppId_t appID) {
return pSteamGameServer->UserHasLicenseForApp(*pSteamID, appID); return pSteamGameServer->UserHasLicenseForApp(*pSteamID, appID);
} }
// Ask if a user in in the specified group, results returns async by GSUserGroupStatus_t // Ask if a user in in the specified group, results returns async by GSUserGroupStatus_t
// returns false if we're not connected to the steam servers and thus cannot ask // returns false if we're not connected to the steam servers and thus cannot ask
DLL_FUNCTION(uint32_t) BS_ISteamGameServer_RequestUserGroupStatus(ISteamGameServer* pSteamGameServer, CSteamID* pSteamIDUser, CSteamID* pSteamIDGroup) { DLL(uint32_t) BS_ISteamGameServer_RequestUserGroupStatus(ISteamGameServer* pSteamGameServer, CSteamID* pSteamIDUser, CSteamID* pSteamIDGroup) {
return pSteamGameServer->RequestUserGroupStatus(*pSteamIDUser, *pSteamIDGroup); return pSteamGameServer->RequestUserGroupStatus(*pSteamIDUser, *pSteamIDGroup);
} }
// Returns the public IP of the server according to Steam, useful when the server is // Returns the public IP of the server according to Steam, useful when the server is
// behind NAT and you want to advertise its IP in a lobby for other clients to directly // behind NAT and you want to advertise its IP in a lobby for other clients to directly
// connect to // connect to
DLL_FUNCTION(uint32_t) BS_ISteamGameServer_GetPublicIP(ISteamGameServer* pSteamGameServer) { DLL(uint32_t) BS_ISteamGameServer_GetPublicIP(ISteamGameServer* pSteamGameServer) {
return pSteamGameServer->GetPublicIP(); return pSteamGameServer->GetPublicIP();
} }
@@ -326,7 +326,7 @@ DLL_FUNCTION(uint32_t) BS_ISteamGameServer_GetPublicIP(ISteamGameServer* pSteamG
// Call this when a packet that starts with 0xFFFFFFFF comes in. That means // Call this when a packet that starts with 0xFFFFFFFF comes in. That means
// it's for us. // it's for us.
DLL_FUNCTION(uint32_t) BS_ISteamGameServer_HandleIncomingPacket(ISteamGameServer* pSteamGameServer, const void *pData, int32_t cbData, uint32_t srcIP, uint16_t srcPort) { DLL(uint32_t) BS_ISteamGameServer_HandleIncomingPacket(ISteamGameServer* pSteamGameServer, const void *pData, int32_t cbData, uint32_t srcIP, uint16_t srcPort) {
return pSteamGameServer->HandleIncomingPacket(pData, cbData, srcIP, srcPort); return pSteamGameServer->HandleIncomingPacket(pData, cbData, srcIP, srcPort);
} }
@@ -334,7 +334,7 @@ DLL_FUNCTION(uint32_t) BS_ISteamGameServer_HandleIncomingPacket(ISteamGameServer
// This gets a packet that the master server updater needs to send out on UDP. // This gets a packet that the master server updater needs to send out on UDP.
// It returns the length of the packet it wants to send, or 0 if there are no more packets to send. // It returns the length of the packet it wants to send, or 0 if there are no more packets to send.
// Call this each frame until it returns 0. // Call this each frame until it returns 0.
DLL_FUNCTION(uint32_t) BS_ISteamGameServer_GetNextOutgoingPacket(ISteamGameServer* pSteamGameServer, void *pOut, int32_t cbMaxOut, uint32_t *pNetAdr, uint16_t *pPort) { DLL(uint32_t) BS_ISteamGameServer_GetNextOutgoingPacket(ISteamGameServer* pSteamGameServer, void *pOut, int32_t cbMaxOut, uint32_t *pNetAdr, uint16_t *pPort) {
return pSteamGameServer->GetNextOutgoingPacket(pOut, cbMaxOut, pNetAdr, pPort); return pSteamGameServer->GetNextOutgoingPacket(pOut, cbMaxOut, pNetAdr, pPort);
} }
@@ -344,28 +344,28 @@ DLL_FUNCTION(uint32_t) BS_ISteamGameServer_GetNextOutgoingPacket(ISteamGameServe
// Call this as often as you like to tell the master server updater whether or not // Call this as often as you like to tell the master server updater whether or not
// you want it to be active (default: off). // you want it to be active (default: off).
DLL_FUNCTION(void) BS_ISteamGameServer_EnableHeartbeats(ISteamGameServer* pSteamGameServer, uint32_t bActive) { DLL(void) BS_ISteamGameServer_EnableHeartbeats(ISteamGameServer* pSteamGameServer, uint32_t bActive) {
pSteamGameServer->EnableHeartbeats(!!bActive); pSteamGameServer->EnableHeartbeats(!!bActive);
} }
// You usually don't need to modify this. // You usually don't need to modify this.
// Pass -1 to use the default value for iHeartbeatInterval. // Pass -1 to use the default value for iHeartbeatInterval.
// Some mods change this. // Some mods change this.
DLL_FUNCTION(void) BS_ISteamGameServer_SetHeartbeatInterval(ISteamGameServer* pSteamGameServer, int32_t iHeartbeatInterval) { DLL(void) BS_ISteamGameServer_SetHeartbeatInterval(ISteamGameServer* pSteamGameServer, int32_t iHeartbeatInterval) {
pSteamGameServer->SetHeartbeatInterval(iHeartbeatInterval); pSteamGameServer->SetHeartbeatInterval(iHeartbeatInterval);
} }
// Force a heartbeat to steam at the next opportunity // Force a heartbeat to steam at the next opportunity
DLL_FUNCTION(void) BS_ISteamGameServer_ForceHeartbeat(ISteamGameServer* pSteamGameServer) { DLL(void) BS_ISteamGameServer_ForceHeartbeat(ISteamGameServer* pSteamGameServer) {
pSteamGameServer->ForceHeartbeat(); pSteamGameServer->ForceHeartbeat();
} }
// associate this game server with this clan for the purposes of computing player compat // associate this game server with this clan for the purposes of computing player compat
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamGameServer_AssociateWithClan(ISteamGameServer* pSteamGameServer, CSteamID* pSteamIDClan) { DLL(SteamAPICall_t*) BS_ISteamGameServer_AssociateWithClan(ISteamGameServer* pSteamGameServer, CSteamID* pSteamIDClan) {
return new SteamAPICall_t(pSteamGameServer->AssociateWithClan(*pSteamIDClan)); return new SteamAPICall_t(pSteamGameServer->AssociateWithClan(*pSteamIDClan));
} }
// ask if any of the current players dont want to play with this new player - or vice versa // ask if any of the current players dont want to play with this new player - or vice versa
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamGameServer_ComputeNewPlayerCompatibility(ISteamGameServer* pSteamGameServer, CSteamID* pSteamIDNewPlayer) { DLL(SteamAPICall_t*) BS_ISteamGameServer_ComputeNewPlayerCompatibility(ISteamGameServer* pSteamGameServer, CSteamID* pSteamIDNewPlayer) {
return new SteamAPICall_t(pSteamGameServer->ComputeNewPlayerCompatibility(*pSteamIDNewPlayer)); return new SteamAPICall_t(pSteamGameServer->ComputeNewPlayerCompatibility(*pSteamIDNewPlayer));
} }
+11 -11
View File
@@ -19,7 +19,7 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Functions for authenticating users via Steam to play on a game server // Purpose: Functions for authenticating users via Steam to play on a game server
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(ISteamGameServerStats*) BS_SteamGameServerStats() { DLL(ISteamGameServerStats*) BS_SteamGameServerStats() {
return SteamGameServerStats(); return SteamGameServerStats();
} }
@@ -28,7 +28,7 @@ DLL_FUNCTION(ISteamGameServerStats*) BS_SteamGameServerStats() {
// if the user has no stats, GSStatsReceived_t.m_eResult will be set to k_EResultFail // if the user has no stats, GSStatsReceived_t.m_eResult will be set to k_EResultFail
// these stats will only be auto-updated for clients playing on the server. For other // these stats will only be auto-updated for clients playing on the server. For other
// users you'll need to call RequestUserStats() again to refresh any data // users you'll need to call RequestUserStats() again to refresh any data
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamGameServerStats_RequestUserStats(ISteamGameServerStats* pSteamGameServerStats, CSteamID* steamIDUser) { DLL(SteamAPICall_t*) BS_ISteamGameServerStats_RequestUserStats(ISteamGameServerStats* pSteamGameServerStats, CSteamID* steamIDUser) {
return new SteamAPICall_t(pSteamGameServerStats->RequestUserStats(*steamIDUser)); return new SteamAPICall_t(pSteamGameServerStats->RequestUserStats(*steamIDUser));
} }
@@ -38,20 +38,20 @@ DLL_FUNCTION(SteamAPICall_t*) BS_ISteamGameServerStats_RequestUserStats(ISteamGa
// uploaded has been rejected, either because they broke constraints // uploaded has been rejected, either because they broke constraints
// or were out of date. In this case the server sends back updated values. // or were out of date. In this case the server sends back updated values.
// The stats should be re-iterated to keep in sync. // The stats should be re-iterated to keep in sync.
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamGameServerStats_StoreUserStats(ISteamGameServerStats* pSteamGameServerStats, CSteamID* steamIDUser) { DLL(SteamAPICall_t*) BS_ISteamGameServerStats_StoreUserStats(ISteamGameServerStats* pSteamGameServerStats, CSteamID* steamIDUser) {
return new SteamAPICall_t(pSteamGameServerStats->StoreUserStats(*steamIDUser)); return new SteamAPICall_t(pSteamGameServerStats->StoreUserStats(*steamIDUser));
} }
// requests stat information for a user, usable after a successful call to RequestUserStats() // requests stat information for a user, usable after a successful call to RequestUserStats()
DLL_FUNCTION(uint32_t) BS_ISteamGameServerStats_GetUserStat(ISteamGameServerStats* pSteamGameServerStats, CSteamID* steamIDUser, const char* pchName, uint32_t* pData) { DLL(uint32_t) BS_ISteamGameServerStats_GetUserStat(ISteamGameServerStats* pSteamGameServerStats, CSteamID* steamIDUser, const char* pchName, uint32_t* pData) {
return pSteamGameServerStats->GetUserStat(*steamIDUser, pchName, (int32_t*)pData); return pSteamGameServerStats->GetUserStat(*steamIDUser, pchName, (int32_t*)pData);
} }
DLL_FUNCTION(uint32_t) BS_ISteamGameServerStats_GetUserStatF(ISteamGameServerStats* pSteamGameServerStats, CSteamID* steamIDUser, const char* pchName, float_t* pData) { DLL(uint32_t) BS_ISteamGameServerStats_GetUserStatF(ISteamGameServerStats* pSteamGameServerStats, CSteamID* steamIDUser, const char* pchName, float_t* pData) {
return pSteamGameServerStats->GetUserStat(*steamIDUser, pchName, pData); return pSteamGameServerStats->GetUserStat(*steamIDUser, pchName, pData);
} }
DLL_FUNCTION(uint32_t) BS_ISteamGameServerStats_GetUserAchievement(ISteamGameServerStats* pSteamGameServerStats, CSteamID* steamIDUser, const char* pchName, uint32_t* pbAchieved) { DLL(uint32_t) BS_ISteamGameServerStats_GetUserAchievement(ISteamGameServerStats* pSteamGameServerStats, CSteamID* steamIDUser, const char* pchName, uint32_t* pbAchieved) {
return pSteamGameServerStats->GetUserAchievement(*steamIDUser, pchName, (bool*)pbAchieved); return pSteamGameServerStats->GetUserAchievement(*steamIDUser, pchName, (bool*)pbAchieved);
} }
@@ -59,23 +59,23 @@ DLL_FUNCTION(uint32_t) BS_ISteamGameServerStats_GetUserAchievement(ISteamGameSer
// Note: These updates will work only on stats game servers are allowed to edit and only for // Note: These updates will work only on stats game servers are allowed to edit and only for
// game servers that have been declared as officially controlled by the game creators. // game servers that have been declared as officially controlled by the game creators.
// Set the IP range of your official servers on the Steamworks page // Set the IP range of your official servers on the Steamworks page
DLL_FUNCTION(uint32_t) BS_ISteamGameServerStats_SetUserStat(ISteamGameServerStats* pSteamGameServerStats, CSteamID* steamIDUser, const char* pchName, uint32_t nData) { DLL(uint32_t) BS_ISteamGameServerStats_SetUserStat(ISteamGameServerStats* pSteamGameServerStats, CSteamID* steamIDUser, const char* pchName, uint32_t nData) {
return pSteamGameServerStats->SetUserStat(*steamIDUser, pchName, (int32_t)nData); return pSteamGameServerStats->SetUserStat(*steamIDUser, pchName, (int32_t)nData);
} }
DLL_FUNCTION(uint32_t) BS_ISteamGameServerStats_SetUserStatF(ISteamGameServerStats* pSteamGameServerStats, CSteamID* steamIDUser, const char* pchName, float_t fData) { DLL(uint32_t) BS_ISteamGameServerStats_SetUserStatF(ISteamGameServerStats* pSteamGameServerStats, CSteamID* steamIDUser, const char* pchName, float_t fData) {
return pSteamGameServerStats->SetUserStat(*steamIDUser, pchName, fData); return pSteamGameServerStats->SetUserStat(*steamIDUser, pchName, fData);
} }
DLL_FUNCTION(uint32_t) BS_ISteamGameServerStats_UpdateUserAvgRateStat(ISteamGameServerStats* pSteamGameServerStats, CSteamID* steamIDUser, const char *pchName, float flCountThisSession, double* pdSessionLength) { DLL(uint32_t) BS_ISteamGameServerStats_UpdateUserAvgRateStat(ISteamGameServerStats* pSteamGameServerStats, CSteamID* steamIDUser, const char *pchName, float flCountThisSession, double* pdSessionLength) {
return pSteamGameServerStats->UpdateUserAvgRateStat(*steamIDUser, pchName, flCountThisSession, *pdSessionLength); return pSteamGameServerStats->UpdateUserAvgRateStat(*steamIDUser, pchName, flCountThisSession, *pdSessionLength);
} }
DLL_FUNCTION(uint32_t) BS_ISteamGameServerStats_SetUserAchievement(ISteamGameServerStats* pSteamGameServerStats, CSteamID* steamIDUser, const char* pchName) { DLL(uint32_t) BS_ISteamGameServerStats_SetUserAchievement(ISteamGameServerStats* pSteamGameServerStats, CSteamID* steamIDUser, const char* pchName) {
return pSteamGameServerStats->SetUserAchievement(*steamIDUser, pchName); return pSteamGameServerStats->SetUserAchievement(*steamIDUser, pchName);
} }
DLL_FUNCTION(uint32_t) BS_ISteamGameServerStats_ClearUserAchievement(ISteamGameServerStats* pSteamGameServerStats, CSteamID* steamIDUser, const char* pchName) { DLL(uint32_t) BS_ISteamGameServerStats_ClearUserAchievement(ISteamGameServerStats* pSteamGameServerStats, CSteamID* steamIDUser, const char* pchName) {
return pSteamGameServerStats->ClearUserAchievement(*steamIDUser, pchName); return pSteamGameServerStats->ClearUserAchievement(*steamIDUser, pchName);
} }
+36 -36
View File
@@ -17,16 +17,16 @@
#include "BlitzSteam.h" #include "BlitzSteam.h"
#include "SteamworksSDK/public/steam/isteamhtmlsurface.h" #include "SteamworksSDK/public/steam/isteamhtmlsurface.h"
DLL_FUNCTION(ISteamHTMLSurface*) BS_SteamHTMLSurface() { DLL(ISteamHTMLSurface*) BS_SteamHTMLSurface() {
return SteamHTMLSurface(); return SteamHTMLSurface();
} }
// Must call init and shutdown when starting/ending use of the interface // Must call init and shutdown when starting/ending use of the interface
DLL_FUNCTION(uint32_t) BS_ISteamHTMLSurface_Init(ISteamHTMLSurface* pSteamHTMLSurface) { DLL(uint32_t) BS_ISteamHTMLSurface_Init(ISteamHTMLSurface* pSteamHTMLSurface) {
return pSteamHTMLSurface->Init(); return pSteamHTMLSurface->Init();
} }
DLL_FUNCTION(uint32_t) BS_ISteamHTMLSurface_Shutdown(ISteamHTMLSurface* pSteamHTMLSurface) { DLL(uint32_t) BS_ISteamHTMLSurface_Shutdown(ISteamHTMLSurface* pSteamHTMLSurface) {
return pSteamHTMLSurface->Shutdown(); return pSteamHTMLSurface->Shutdown();
} }
@@ -36,143 +36,143 @@ DLL_FUNCTION(uint32_t) BS_ISteamHTMLSurface_Shutdown(ISteamHTMLSurface* pSteamHT
// identify your client on web servers. // identify your client on web servers.
// The userCSS string lets you apply a CSS style sheet to every displayed page, leave null if // The userCSS string lets you apply a CSS style sheet to every displayed page, leave null if
// you do not require this functionality. // you do not require this functionality.
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamHTMLSurface_CreateBrowser(ISteamHTMLSurface* pSteamHTMLSurface, const char* pchUserAgent, const char* pchUserCSS) { DLL(SteamAPICall_t*) BS_ISteamHTMLSurface_CreateBrowser(ISteamHTMLSurface* pSteamHTMLSurface, const char* pchUserAgent, const char* pchUserCSS) {
return new SteamAPICall_t(pSteamHTMLSurface->CreateBrowser(pchUserAgent, pchUserCSS)); return new SteamAPICall_t(pSteamHTMLSurface->CreateBrowser(pchUserAgent, pchUserCSS));
} }
// Call this when you are done with a html surface, this lets us free the resources being used by it // Call this when you are done with a html surface, this lets us free the resources being used by it
DLL_FUNCTION(void) BS_ISteamHTMLSurface_RemoveBrowser(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) { DLL(void) BS_ISteamHTMLSurface_RemoveBrowser(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) {
pSteamHTMLSurface->RemoveBrowser(unBrowserHandle); pSteamHTMLSurface->RemoveBrowser(unBrowserHandle);
} }
// Navigate to this URL, results in a HTML_StartRequest_t as the request commences // Navigate to this URL, results in a HTML_StartRequest_t as the request commences
DLL_FUNCTION(void) BS_ISteamHTMLSurface_LoadURL(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, const char* pchURL, const char* pchPostData) { DLL(void) BS_ISteamHTMLSurface_LoadURL(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, const char* pchURL, const char* pchPostData) {
pSteamHTMLSurface->LoadURL(unBrowserHandle, pchURL, pchPostData); pSteamHTMLSurface->LoadURL(unBrowserHandle, pchURL, pchPostData);
} }
// Tells the surface the size in pixels to display the surface // Tells the surface the size in pixels to display the surface
DLL_FUNCTION(void) BS_ISteamHTMLSurface_SetSize(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, uint32_t unWidth, uint32_t unHeight) { DLL(void) BS_ISteamHTMLSurface_SetSize(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, uint32_t unWidth, uint32_t unHeight) {
pSteamHTMLSurface->SetSize(unBrowserHandle, unWidth, unHeight); pSteamHTMLSurface->SetSize(unBrowserHandle, unWidth, unHeight);
} }
// Stop the load of the current html page // Stop the load of the current html page
DLL_FUNCTION(void) BS_ISteamHTMLSurface_StopLoad(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) { DLL(void) BS_ISteamHTMLSurface_StopLoad(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) {
pSteamHTMLSurface->StopLoad(unBrowserHandle); pSteamHTMLSurface->StopLoad(unBrowserHandle);
} }
// Reload (most likely from local cache) the current page // Reload (most likely from local cache) the current page
DLL_FUNCTION(void) BS_ISteamHTMLSurface_Reload(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) { DLL(void) BS_ISteamHTMLSurface_Reload(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) {
pSteamHTMLSurface->Reload(unBrowserHandle); pSteamHTMLSurface->Reload(unBrowserHandle);
} }
// navigate back in the page history // navigate back in the page history
DLL_FUNCTION(void) BS_ISteamHTMLSurface_GoBack(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) { DLL(void) BS_ISteamHTMLSurface_GoBack(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) {
pSteamHTMLSurface->GoBack(unBrowserHandle); pSteamHTMLSurface->GoBack(unBrowserHandle);
} }
// navigate forward in the page history // navigate forward in the page history
DLL_FUNCTION(void) BS_ISteamHTMLSurface_GoForward(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) { DLL(void) BS_ISteamHTMLSurface_GoForward(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) {
pSteamHTMLSurface->GoForward(unBrowserHandle); pSteamHTMLSurface->GoForward(unBrowserHandle);
} }
// add this header to any url requests from this browser // add this header to any url requests from this browser
DLL_FUNCTION(void) BS_ISteamHTMLSurface_AddHeader(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, const char* pchKey, const char* pchValue) { DLL(void) BS_ISteamHTMLSurface_AddHeader(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, const char* pchKey, const char* pchValue) {
pSteamHTMLSurface->AddHeader(unBrowserHandle, pchKey, pchValue); pSteamHTMLSurface->AddHeader(unBrowserHandle, pchKey, pchValue);
} }
// run this javascript script in the currently loaded page // run this javascript script in the currently loaded page
DLL_FUNCTION(void) BS_ISteamHTMLSurface_ExecuteJavascript(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, const char* pchScript) { DLL(void) BS_ISteamHTMLSurface_ExecuteJavascript(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, const char* pchScript) {
pSteamHTMLSurface->ExecuteJavascript(unBrowserHandle, pchScript); pSteamHTMLSurface->ExecuteJavascript(unBrowserHandle, pchScript);
} }
// Mouse click and mouse movement commands // Mouse click and mouse movement commands
DLL_FUNCTION(void) BS_ISteamHTMLSurface_MouseUp(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, ISteamHTMLSurface::EHTMLMouseButton eMouseButton) { DLL(void) BS_ISteamHTMLSurface_MouseUp(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, ISteamHTMLSurface::EHTMLMouseButton eMouseButton) {
pSteamHTMLSurface->MouseUp(unBrowserHandle, eMouseButton); pSteamHTMLSurface->MouseUp(unBrowserHandle, eMouseButton);
} }
DLL_FUNCTION(void) BS_ISteamHTMLSurface_MouseDown(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, ISteamHTMLSurface::EHTMLMouseButton eMouseButton) { DLL(void) BS_ISteamHTMLSurface_MouseDown(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, ISteamHTMLSurface::EHTMLMouseButton eMouseButton) {
pSteamHTMLSurface->MouseDown(unBrowserHandle, eMouseButton); pSteamHTMLSurface->MouseDown(unBrowserHandle, eMouseButton);
} }
DLL_FUNCTION(void) BS_ISteamHTMLSurface_MouseDoubleClick(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, ISteamHTMLSurface::EHTMLMouseButton eMouseButton) { DLL(void) BS_ISteamHTMLSurface_MouseDoubleClick(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, ISteamHTMLSurface::EHTMLMouseButton eMouseButton) {
pSteamHTMLSurface->MouseDoubleClick(unBrowserHandle, eMouseButton); pSteamHTMLSurface->MouseDoubleClick(unBrowserHandle, eMouseButton);
} }
// x and y are relative to the HTML bounds // x and y are relative to the HTML bounds
DLL_FUNCTION(void) BS_ISteamHTMLSurface_MouseMove(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, int32_t x, int32_t y) { DLL(void) BS_ISteamHTMLSurface_MouseMove(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, int32_t x, int32_t y) {
pSteamHTMLSurface->MouseMove(unBrowserHandle, x, y); pSteamHTMLSurface->MouseMove(unBrowserHandle, x, y);
} }
// nDelta is pixels of scroll // nDelta is pixels of scroll
DLL_FUNCTION(void) BS_ISteamHTMLSurface_MouseWheel(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, int32_t nDelta) { DLL(void) BS_ISteamHTMLSurface_MouseWheel(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, int32_t nDelta) {
pSteamHTMLSurface->MouseWheel(unBrowserHandle, nDelta); pSteamHTMLSurface->MouseWheel(unBrowserHandle, nDelta);
} }
// keyboard interactions, native keycode is the virtual key code value from your OS // keyboard interactions, native keycode is the virtual key code value from your OS
DLL_FUNCTION(void) BS_ISteamHTMLSurface_KeyDown(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, ISteamHTMLSurface::EHTMLKeyModifiers eHTMLKeyModifiers) { DLL(void) BS_ISteamHTMLSurface_KeyDown(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, ISteamHTMLSurface::EHTMLKeyModifiers eHTMLKeyModifiers) {
pSteamHTMLSurface->KeyDown(unBrowserHandle, nNativeKeyCode, eHTMLKeyModifiers); pSteamHTMLSurface->KeyDown(unBrowserHandle, nNativeKeyCode, eHTMLKeyModifiers);
} }
DLL_FUNCTION(void) BS_ISteamHTMLSurface_KeyUp(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, ISteamHTMLSurface::EHTMLKeyModifiers eHTMLKeyModifiers) { DLL(void) BS_ISteamHTMLSurface_KeyUp(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, ISteamHTMLSurface::EHTMLKeyModifiers eHTMLKeyModifiers) {
pSteamHTMLSurface->KeyUp(unBrowserHandle, nNativeKeyCode, eHTMLKeyModifiers); pSteamHTMLSurface->KeyUp(unBrowserHandle, nNativeKeyCode, eHTMLKeyModifiers);
} }
// cUnicodeChar is the unicode character point for this keypress (and potentially multiple chars per press) // cUnicodeChar is the unicode character point for this keypress (and potentially multiple chars per press)
DLL_FUNCTION(void) BS_ISteamHTMLSurface_KeyChar(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, uint32 cUnicodeChar, ISteamHTMLSurface::EHTMLKeyModifiers eHTMLKeyModifiers) { DLL(void) BS_ISteamHTMLSurface_KeyChar(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, uint32 cUnicodeChar, ISteamHTMLSurface::EHTMLKeyModifiers eHTMLKeyModifiers) {
pSteamHTMLSurface->KeyChar(unBrowserHandle, cUnicodeChar, eHTMLKeyModifiers); pSteamHTMLSurface->KeyChar(unBrowserHandle, cUnicodeChar, eHTMLKeyModifiers);
} }
// programmatically scroll this many pixels on the page // programmatically scroll this many pixels on the page
DLL_FUNCTION(void) BS_ISteamHTMLSurface_SetHorizontalScroll(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll) { DLL(void) BS_ISteamHTMLSurface_SetHorizontalScroll(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll) {
pSteamHTMLSurface->SetHorizontalScroll(unBrowserHandle, nAbsolutePixelScroll); pSteamHTMLSurface->SetHorizontalScroll(unBrowserHandle, nAbsolutePixelScroll);
} }
DLL_FUNCTION(void) BS_ISteamHTMLSurface_SetVerticalScroll(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll) { DLL(void) BS_ISteamHTMLSurface_SetVerticalScroll(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll) {
pSteamHTMLSurface->SetVerticalScroll(unBrowserHandle, nAbsolutePixelScroll); pSteamHTMLSurface->SetVerticalScroll(unBrowserHandle, nAbsolutePixelScroll);
} }
// tell the html control if it has key focus currently, controls showing the I-beam cursor in text controls amongst other things // tell the html control if it has key focus currently, controls showing the I-beam cursor in text controls amongst other things
DLL_FUNCTION(void) BS_ISteamHTMLSurface_SetKeyFocus(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, bool bHasKeyFocus) { DLL(void) BS_ISteamHTMLSurface_SetKeyFocus(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, bool bHasKeyFocus) {
pSteamHTMLSurface->SetKeyFocus(unBrowserHandle, bHasKeyFocus); pSteamHTMLSurface->SetKeyFocus(unBrowserHandle, bHasKeyFocus);
} }
// open the current pages html code in the local editor of choice, used for debugging // open the current pages html code in the local editor of choice, used for debugging
DLL_FUNCTION(void) BS_ISteamHTMLSurface_ViewSource(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) { DLL(void) BS_ISteamHTMLSurface_ViewSource(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) {
pSteamHTMLSurface->ViewSource(unBrowserHandle); pSteamHTMLSurface->ViewSource(unBrowserHandle);
} }
// copy the currently selected text on the html page to the local clipboard // copy the currently selected text on the html page to the local clipboard
DLL_FUNCTION(void) BS_ISteamHTMLSurface_CopyToClipboard(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) { DLL(void) BS_ISteamHTMLSurface_CopyToClipboard(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) {
pSteamHTMLSurface->CopyToClipboard(unBrowserHandle); pSteamHTMLSurface->CopyToClipboard(unBrowserHandle);
} }
// paste from the local clipboard to the current html page // paste from the local clipboard to the current html page
DLL_FUNCTION(void) BS_ISteamHTMLSurface_PasteFromClipboard(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) { DLL(void) BS_ISteamHTMLSurface_PasteFromClipboard(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) {
pSteamHTMLSurface->PasteFromClipboard(unBrowserHandle); pSteamHTMLSurface->PasteFromClipboard(unBrowserHandle);
} }
// find this string in the browser, if bCurrentlyInFind is true then instead cycle to the next matching element // find this string in the browser, if bCurrentlyInFind is true then instead cycle to the next matching element
DLL_FUNCTION(void) BS_ISteamHTMLSurface_Find(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, const char *pchSearchStr, bool bCurrentlyInFind, bool bReverse) { DLL(void) BS_ISteamHTMLSurface_Find(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, const char *pchSearchStr, bool bCurrentlyInFind, bool bReverse) {
pSteamHTMLSurface->Find(unBrowserHandle, pchSearchStr, bCurrentlyInFind, bReverse); pSteamHTMLSurface->Find(unBrowserHandle, pchSearchStr, bCurrentlyInFind, bReverse);
} }
// cancel a currently running find // cancel a currently running find
DLL_FUNCTION(void) BS_ISteamHTMLSurface_StopFind(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) { DLL(void) BS_ISteamHTMLSurface_StopFind(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) {
pSteamHTMLSurface->StopFind(unBrowserHandle); pSteamHTMLSurface->StopFind(unBrowserHandle);
} }
// return details about the link at position x,y on the current page // return details about the link at position x,y on the current page
DLL_FUNCTION(void) BS_ISteamHTMLSurface_GetLinkAtPosition(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, int x, int y) { DLL(void) BS_ISteamHTMLSurface_GetLinkAtPosition(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, int x, int y) {
pSteamHTMLSurface->GetLinkAtPosition(unBrowserHandle, x, y); pSteamHTMLSurface->GetLinkAtPosition(unBrowserHandle, x, y);
} }
// set a webcookie for the hostname in question // set a webcookie for the hostname in question
DLL_FUNCTION(void) BS_ISteamHTMLSurface_SetCookie(ISteamHTMLSurface* pSteamHTMLSurface, const char *pchHostname, const char *pchKey, const char *pchValue, const char *pchPath, RTime32 nExpires, bool bSecure, bool bHTTPOnly) { DLL(void) BS_ISteamHTMLSurface_SetCookie(ISteamHTMLSurface* pSteamHTMLSurface, const char *pchHostname, const char *pchKey, const char *pchValue, const char *pchPath, RTime32 nExpires, bool bSecure, bool bHTTPOnly) {
pSteamHTMLSurface->SetCookie(pchHostname, pchKey, pchValue, pchPath, nExpires, bSecure, bHTTPOnly); pSteamHTMLSurface->SetCookie(pchHostname, pchKey, pchValue, pchPath, nExpires, bSecure, bHTTPOnly);
} }
// Zoom the current page by flZoom ( from 0.0 to 2.0, so to zoom to 120% use 1.2 ), zooming around point X,Y in the page (use 0,0 if you don't care) // Zoom the current page by flZoom ( from 0.0 to 2.0, so to zoom to 120% use 1.2 ), zooming around point X,Y in the page (use 0,0 if you don't care)
DLL_FUNCTION(void) BS_ISteamHTMLSurface_SetPageScaleFactor(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY) { DLL(void) BS_ISteamHTMLSurface_SetPageScaleFactor(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY) {
pSteamHTMLSurface->SetPageScaleFactor(unBrowserHandle, flZoom, nPointX, nPointY); pSteamHTMLSurface->SetPageScaleFactor(unBrowserHandle, flZoom, nPointX, nPointY);
} }
@@ -180,7 +180,7 @@ DLL_FUNCTION(void) BS_ISteamHTMLSurface_SetPageScaleFactor(ISteamHTMLSurface* pS
// more aggressively purged from memory, and audio/video elements are paused. When background mode is enabled, // more aggressively purged from memory, and audio/video elements are paused. When background mode is enabled,
// all HTML5 video and audio objects will execute ".pause()" and gain the property "._steam_background_paused = 1". // all HTML5 video and audio objects will execute ".pause()" and gain the property "._steam_background_paused = 1".
// When background mode is disabled, any video or audio objects with that property will resume with ".play()". // When background mode is disabled, any video or audio objects with that property will resume with ".play()".
DLL_FUNCTION(void) BS_ISteamHTMLSurface_SetBackgroundMode(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, bool bBackgroundMode) { DLL(void) BS_ISteamHTMLSurface_SetBackgroundMode(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, bool bBackgroundMode) {
pSteamHTMLSurface->SetBackgroundMode(unBrowserHandle, bBackgroundMode); pSteamHTMLSurface->SetBackgroundMode(unBrowserHandle, bBackgroundMode);
} }
@@ -193,17 +193,17 @@ DLL_FUNCTION(void) BS_ISteamHTMLSurface_SetBackgroundMode(ISteamHTMLSurface* pSt
// Set bAllowed to true to allow this navigation, false to cancel it and stay // Set bAllowed to true to allow this navigation, false to cancel it and stay
// on the current page. You can use this feature to limit the valid pages // on the current page. You can use this feature to limit the valid pages
// allowed in your HTML surface. // allowed in your HTML surface.
DLL_FUNCTION(void) BS_ISteamHTMLSurface_AllowStartRequest(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, bool bAllowed) { DLL(void) BS_ISteamHTMLSurface_AllowStartRequest(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, bool bAllowed) {
pSteamHTMLSurface->AllowStartRequest(unBrowserHandle, bAllowed); pSteamHTMLSurface->AllowStartRequest(unBrowserHandle, bAllowed);
} }
// You MUST call this in response to a HTML_JSAlert_t or HTML_JSConfirm_t callback // You MUST call this in response to a HTML_JSAlert_t or HTML_JSConfirm_t callback
// Set bResult to true for the OK option of a confirm, use false otherwise // Set bResult to true for the OK option of a confirm, use false otherwise
DLL_FUNCTION(void) BS_ISteamHTMLSurface_JSDialogResponse(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, bool bResult) { DLL(void) BS_ISteamHTMLSurface_JSDialogResponse(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, bool bResult) {
pSteamHTMLSurface->JSDialogResponse(unBrowserHandle, bResult); pSteamHTMLSurface->JSDialogResponse(unBrowserHandle, bResult);
} }
// You MUST call this in response to a HTML_FileOpenDialog_t callback // You MUST call this in response to a HTML_FileOpenDialog_t callback
DLL_FUNCTION(void) BS_ISteamHTMLSurface_FileLoadDialogResponse(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, const char **pchSelectedFiles) { DLL(void) BS_ISteamHTMLSurface_FileLoadDialogResponse(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, const char **pchSelectedFiles) {
pSteamHTMLSurface->FileLoadDialogResponse(unBrowserHandle, pchSelectedFiles); pSteamHTMLSurface->FileLoadDialogResponse(unBrowserHandle, pchSelectedFiles);
} }
+27 -27
View File
@@ -19,11 +19,11 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: interface to http client // Purpose: interface to http client
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(ISteamHTTP*) BS_HTTP() { DLL(ISteamHTTP*) BS_HTTP() {
return SteamHTTP(); return SteamHTTP();
} }
DLL_FUNCTION(ISteamHTTP*) BS_GameServerHTTP() { DLL(ISteamHTTP*) BS_GameServerHTTP() {
return SteamGameServerHTTP(); return SteamGameServerHTTP();
} }
@@ -31,33 +31,33 @@ DLL_FUNCTION(ISteamHTTP*) BS_GameServerHTTP() {
// the method (GET or POST) and the absolute URL for the request. Both http and https are supported, // the method (GET or POST) and the absolute URL for the request. Both http and https are supported,
// so this string must start with http:// or https:// and should look like http://store.steampowered.com/app/250/ // so this string must start with http:// or https:// and should look like http://store.steampowered.com/app/250/
// or such. // or such.
DLL_FUNCTION(HTTPRequestHandle) BS_ISteamHTTP_CreateHTTPRequest(ISteamHTTP* pThis, EHTTPMethod eHTTPRequestMethod, const char* cAbsoluteUrl) { DLL(HTTPRequestHandle) BS_ISteamHTTP_CreateHTTPRequest(ISteamHTTP* pThis, EHTTPMethod eHTTPRequestMethod, const char* cAbsoluteUrl) {
return pThis->CreateHTTPRequest(eHTTPRequestMethod, cAbsoluteUrl); return pThis->CreateHTTPRequest(eHTTPRequestMethod, cAbsoluteUrl);
} }
// Set a context value for the request, which will be returned in the HTTPRequestCompleted_t callback after // Set a context value for the request, which will be returned in the HTTPRequestCompleted_t callback after
// sending the request. This is just so the caller can easily keep track of which callbacks go with which request data. // sending the request. This is just so the caller can easily keep track of which callbacks go with which request data.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_SetHTTPRequestContextValue(ISteamHTTP* pThis, HTTPRequestHandle hRequest, uint64_t* plContextValue) { DLL(int32_t) BS_ISteamHTTP_SetHTTPRequestContextValue(ISteamHTTP* pThis, HTTPRequestHandle hRequest, uint64_t* plContextValue) {
return pThis->SetHTTPRequestContextValue(hRequest, *plContextValue); return pThis->SetHTTPRequestContextValue(hRequest, *plContextValue);
} }
// Set a timeout in seconds for the HTTP request, must be called prior to sending the request. Default // Set a timeout in seconds for the HTTP request, must be called prior to sending the request. Default
// timeout is 60 seconds if you don't call this. Returns false if the handle is invalid, or the request // timeout is 60 seconds if you don't call this. Returns false if the handle is invalid, or the request
// has already been sent. // has already been sent.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_SetHTTPNetworkActivityTimeout(ISteamHTTP* pThis, HTTPRequestHandle hRequest, uint32 unTimeoutSeconds) { DLL(int32_t) BS_ISteamHTTP_SetHTTPNetworkActivityTimeout(ISteamHTTP* pThis, HTTPRequestHandle hRequest, uint32 unTimeoutSeconds) {
return pThis->SetHTTPRequestNetworkActivityTimeout(hRequest, unTimeoutSeconds); return pThis->SetHTTPRequestNetworkActivityTimeout(hRequest, unTimeoutSeconds);
} }
// Set a request header value for the request, must be called prior to sending the request. Will // Set a request header value for the request, must be called prior to sending the request. Will
// return false if the handle is invalid or the request is already sent. // return false if the handle is invalid or the request is already sent.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_SetHTTPRequestHeaderValue(ISteamHTTP* pThis, HTTPRequestHandle hRequest, const char *pchHeaderName, const char *pchHeaderValue) { DLL(int32_t) BS_ISteamHTTP_SetHTTPRequestHeaderValue(ISteamHTTP* pThis, HTTPRequestHandle hRequest, const char *pchHeaderName, const char *pchHeaderValue) {
return pThis->SetHTTPRequestHeaderValue(hRequest, pchHeaderName, pchHeaderValue); return pThis->SetHTTPRequestHeaderValue(hRequest, pchHeaderName, pchHeaderValue);
} }
// Set a GET or POST parameter value on the request, which is set will depend on the EHTTPMethod specified // Set a GET or POST parameter value on the request, which is set will depend on the EHTTPMethod specified
// when creating the request. Must be called prior to sending the request. Will return false if the // when creating the request. Must be called prior to sending the request. Will return false if the
// handle is invalid or the request is already sent. // handle is invalid or the request is already sent.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_SetHTTPRequestGetOrPostParameter(ISteamHTTP* pThis, HTTPRequestHandle hRequest, const char *pchParamName, const char *pchParamValue) { DLL(int32_t) BS_ISteamHTTP_SetHTTPRequestGetOrPostParameter(ISteamHTTP* pThis, HTTPRequestHandle hRequest, const char *pchParamName, const char *pchParamValue) {
return pThis->SetHTTPRequestGetOrPostParameter(hRequest, pchParamName, pchParamValue); return pThis->SetHTTPRequestGetOrPostParameter(hRequest, pchParamName, pchParamValue);
} }
@@ -66,80 +66,80 @@ DLL_FUNCTION(int32_t) BS_ISteamHTTP_SetHTTPRequestGetOrPostParameter(ISteamHTTP*
// //
// Note: If the user is in offline mode in Steam, then this will add a only-if-cached cache-control // Note: If the user is in offline mode in Steam, then this will add a only-if-cached cache-control
// header and only do a local cache lookup rather than sending any actual remote request. // header and only do a local cache lookup rather than sending any actual remote request.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_SendHTTPRequest(ISteamHTTP* pThis, HTTPRequestHandle hRequest, SteamAPICall_t *pCallHandle) { DLL(int32_t) BS_ISteamHTTP_SendHTTPRequest(ISteamHTTP* pThis, HTTPRequestHandle hRequest, SteamAPICall_t *pCallHandle) {
return pThis->SendHTTPRequest(hRequest, pCallHandle); return pThis->SendHTTPRequest(hRequest, pCallHandle);
} }
// Sends the HTTP request, will return false on a bad handle, otherwise use SteamCallHandle to wait on // Sends the HTTP request, will return false on a bad handle, otherwise use SteamCallHandle to wait on
// asynchronous response via callback for completion, and listen for HTTPRequestHeadersReceived_t and // asynchronous response via callback for completion, and listen for HTTPRequestHeadersReceived_t and
// HTTPRequestDataReceived_t callbacks while streaming. // HTTPRequestDataReceived_t callbacks while streaming.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_SendHTTPRequestAndStreamResponse(ISteamHTTP* pThis, HTTPRequestHandle hRequest, SteamAPICall_t *pCallHandle) { DLL(int32_t) BS_ISteamHTTP_SendHTTPRequestAndStreamResponse(ISteamHTTP* pThis, HTTPRequestHandle hRequest, SteamAPICall_t *pCallHandle) {
return pThis->SendHTTPRequestAndStreamResponse(hRequest, pCallHandle); return pThis->SendHTTPRequestAndStreamResponse(hRequest, pCallHandle);
} }
// Defers a request you have sent, the actual HTTP client code may have many requests queued, and this will move // Defers a request you have sent, the actual HTTP client code may have many requests queued, and this will move
// the specified request to the tail of the queue. Returns false on invalid handle, or if the request is not yet sent. // the specified request to the tail of the queue. Returns false on invalid handle, or if the request is not yet sent.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_DeferHTTPRequest(ISteamHTTP* pThis, HTTPRequestHandle hRequest) { DLL(int32_t) BS_ISteamHTTP_DeferHTTPRequest(ISteamHTTP* pThis, HTTPRequestHandle hRequest) {
return pThis->DeferHTTPRequest(hRequest); return pThis->DeferHTTPRequest(hRequest);
} }
// Prioritizes a request you have sent, the actual HTTP client code may have many requests queued, and this will move // Prioritizes a request you have sent, the actual HTTP client code may have many requests queued, and this will move
// the specified request to the head of the queue. Returns false on invalid handle, or if the request is not yet sent. // the specified request to the head of the queue. Returns false on invalid handle, or if the request is not yet sent.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_PrioritizeHTTPRequest(ISteamHTTP* pThis, HTTPRequestHandle hRequest) { DLL(int32_t) BS_ISteamHTTP_PrioritizeHTTPRequest(ISteamHTTP* pThis, HTTPRequestHandle hRequest) {
return pThis->PrioritizeHTTPRequest(hRequest); return pThis->PrioritizeHTTPRequest(hRequest);
} }
// Checks if a response header is present in a HTTP response given a handle from HTTPRequestCompleted_t, also // Checks if a response header is present in a HTTP response given a handle from HTTPRequestCompleted_t, also
// returns the size of the header value if present so the caller and allocate a correctly sized buffer for // returns the size of the header value if present so the caller and allocate a correctly sized buffer for
// GetHTTPResponseHeaderValue. // GetHTTPResponseHeaderValue.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_GetHTTPResponseHeaderSize(ISteamHTTP* pThis, HTTPRequestHandle hRequest, const char *pchHeaderName, uint32 *unResponseHeaderSize) { DLL(int32_t) BS_ISteamHTTP_GetHTTPResponseHeaderSize(ISteamHTTP* pThis, HTTPRequestHandle hRequest, const char *pchHeaderName, uint32 *unResponseHeaderSize) {
return pThis->GetHTTPResponseHeaderSize(hRequest, pchHeaderName, unResponseHeaderSize); return pThis->GetHTTPResponseHeaderSize(hRequest, pchHeaderName, unResponseHeaderSize);
} }
// Gets header values from a HTTP response given a handle from HTTPRequestCompleted_t, will return false if the // Gets header values from a HTTP response given a handle from HTTPRequestCompleted_t, will return false if the
// header is not present or if your buffer is too small to contain it's value. You should first call // header is not present or if your buffer is too small to contain it's value. You should first call
// BGetHTTPResponseHeaderSize to check for the presence of the header and to find out the size buffer needed. // BGetHTTPResponseHeaderSize to check for the presence of the header and to find out the size buffer needed.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_GetHTTPResponseHeaderValue(ISteamHTTP* pThis, HTTPRequestHandle hRequest, const char *pchHeaderName, uint8 *pHeaderValueBuffer, uint32 unBufferSize) { DLL(int32_t) BS_ISteamHTTP_GetHTTPResponseHeaderValue(ISteamHTTP* pThis, HTTPRequestHandle hRequest, const char *pchHeaderName, uint8 *pHeaderValueBuffer, uint32 unBufferSize) {
return pThis->GetHTTPResponseHeaderValue(hRequest, pchHeaderName, pHeaderValueBuffer, unBufferSize); return pThis->GetHTTPResponseHeaderValue(hRequest, pchHeaderName, pHeaderValueBuffer, unBufferSize);
} }
// Gets the size of the body data from a HTTP response given a handle from HTTPRequestCompleted_t, will return false if the // Gets the size of the body data from a HTTP response given a handle from HTTPRequestCompleted_t, will return false if the
// handle is invalid. // handle is invalid.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_GetHTTPResponseBodySize(ISteamHTTP* pThis, HTTPRequestHandle hRequest, uint32 *unBodySize) { DLL(int32_t) BS_ISteamHTTP_GetHTTPResponseBodySize(ISteamHTTP* pThis, HTTPRequestHandle hRequest, uint32 *unBodySize) {
return pThis->GetHTTPResponseBodySize(hRequest, unBodySize); return pThis->GetHTTPResponseBodySize(hRequest, unBodySize);
} }
// Gets the body data from a HTTP response given a handle from HTTPRequestCompleted_t, will return false if the // Gets the body data from a HTTP response given a handle from HTTPRequestCompleted_t, will return false if the
// handle is invalid or is to a streaming response, or if the provided buffer is not the correct size. Use BGetHTTPResponseBodySize first to find out // handle is invalid or is to a streaming response, or if the provided buffer is not the correct size. Use BGetHTTPResponseBodySize first to find out
// the correct buffer size to use. // the correct buffer size to use.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_GetHTTPResponseBodyData(ISteamHTTP* pThis, HTTPRequestHandle hRequest, uint8 *pBodyDataBuffer, uint32 unBufferSize) { DLL(int32_t) BS_ISteamHTTP_GetHTTPResponseBodyData(ISteamHTTP* pThis, HTTPRequestHandle hRequest, uint8 *pBodyDataBuffer, uint32 unBufferSize) {
return pThis->GetHTTPResponseBodyData(hRequest, pBodyDataBuffer, unBufferSize); return pThis->GetHTTPResponseBodyData(hRequest, pBodyDataBuffer, unBufferSize);
} }
// Gets the body data from a streaming HTTP response given a handle from HTTPRequestDataReceived_t. Will return false if the // Gets the body data from a streaming HTTP response given a handle from HTTPRequestDataReceived_t. Will return false if the
// handle is invalid or is to a non-streaming response (meaning it wasn't sent with SendHTTPRequestAndStreamResponse), or if the buffer size and offset // handle is invalid or is to a non-streaming response (meaning it wasn't sent with SendHTTPRequestAndStreamResponse), or if the buffer size and offset
// do not match the size and offset sent in HTTPRequestDataReceived_t. // do not match the size and offset sent in HTTPRequestDataReceived_t.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_GetHTTPStreamingResponseBodyData(ISteamHTTP* pThis, HTTPRequestHandle hRequest, uint32 cOffset, uint8 *pBodyDataBuffer, uint32 unBufferSize) { DLL(int32_t) BS_ISteamHTTP_GetHTTPStreamingResponseBodyData(ISteamHTTP* pThis, HTTPRequestHandle hRequest, uint32 cOffset, uint8 *pBodyDataBuffer, uint32 unBufferSize) {
return pThis->GetHTTPStreamingResponseBodyData(hRequest, cOffset, pBodyDataBuffer, unBufferSize); return pThis->GetHTTPStreamingResponseBodyData(hRequest, cOffset, pBodyDataBuffer, unBufferSize);
} }
// Releases an HTTP response handle, should always be called to free resources after receiving a HTTPRequestCompleted_t // Releases an HTTP response handle, should always be called to free resources after receiving a HTTPRequestCompleted_t
// callback and finishing using the response. // callback and finishing using the response.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_ReleaseHTTPRequest(ISteamHTTP* pThis, HTTPRequestHandle hRequest) { DLL(int32_t) BS_ISteamHTTP_ReleaseHTTPRequest(ISteamHTTP* pThis, HTTPRequestHandle hRequest) {
return pThis->ReleaseHTTPRequest(hRequest); return pThis->ReleaseHTTPRequest(hRequest);
} }
// Gets progress on downloading the body for the request. This will be zero unless a response header has already been // Gets progress on downloading the body for the request. This will be zero unless a response header has already been
// received which included a content-length field. For responses that contain no content-length it will report // received which included a content-length field. For responses that contain no content-length it will report
// zero for the duration of the request as the size is unknown until the connection closes. // zero for the duration of the request as the size is unknown until the connection closes.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_GetHTTPDownloadProgressPct(ISteamHTTP* pThis, HTTPRequestHandle hRequest, float *pflPercentOut) { DLL(int32_t) BS_ISteamHTTP_GetHTTPDownloadProgressPct(ISteamHTTP* pThis, HTTPRequestHandle hRequest, float *pflPercentOut) {
return pThis->GetHTTPDownloadProgressPct(hRequest, pflPercentOut); return pThis->GetHTTPDownloadProgressPct(hRequest, pflPercentOut);
} }
// Sets the body for an HTTP Post request. Will fail and return false on a GET request, and will fail if POST params // Sets the body for an HTTP Post request. Will fail and return false on a GET request, and will fail if POST params
// have already been set for the request. Setting this raw body makes it the only contents for the post, the pchContentType // have already been set for the request. Setting this raw body makes it the only contents for the post, the pchContentType
// parameter will set the content-type header for the request so the server may know how to interpret the body. // parameter will set the content-type header for the request so the server may know how to interpret the body.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_SetHTTPRequestRawPostBody(ISteamHTTP* pThis, HTTPRequestHandle hRequest, const char *pchContentType, uint8 *pubBody, uint32 unBodyLen) { DLL(int32_t) BS_ISteamHTTP_SetHTTPRequestRawPostBody(ISteamHTTP* pThis, HTTPRequestHandle hRequest, const char *pchContentType, uint8 *pubBody, uint32 unBodyLen) {
return pThis->SetHTTPRequestRawPostBody(hRequest, pchContentType, pubBody, unBodyLen); return pThis->SetHTTPRequestRawPostBody(hRequest, pchContentType, pubBody, unBodyLen);
} }
@@ -148,42 +148,42 @@ DLL_FUNCTION(int32_t) BS_ISteamHTTP_SetHTTPRequestRawPostBody(ISteamHTTP* pThis,
// future requests. If bAllowResponsesToModify=false than only cookies you explicitly set will be sent. This API is just for // future requests. If bAllowResponsesToModify=false than only cookies you explicitly set will be sent. This API is just for
// during process lifetime, after steam restarts no cookies are persisted and you have no way to access the cookie container across // during process lifetime, after steam restarts no cookies are persisted and you have no way to access the cookie container across
// repeat executions of your process. // repeat executions of your process.
DLL_FUNCTION(HTTPCookieContainerHandle) BS_ISteamHTTP_CreateCookieContainer(ISteamHTTP* pThis, bool bAllowResponsesToModify) { DLL(HTTPCookieContainerHandle) BS_ISteamHTTP_CreateCookieContainer(ISteamHTTP* pThis, bool bAllowResponsesToModify) {
return pThis->CreateCookieContainer(bAllowResponsesToModify); return pThis->CreateCookieContainer(bAllowResponsesToModify);
} }
// Release a cookie container you are finished using, freeing it's memory // Release a cookie container you are finished using, freeing it's memory
DLL_FUNCTION(int32_t) BS_ISteamHTTP_ReleaseCookieContainer(ISteamHTTP* pThis, HTTPCookieContainerHandle hCookieContainer) { DLL(int32_t) BS_ISteamHTTP_ReleaseCookieContainer(ISteamHTTP* pThis, HTTPCookieContainerHandle hCookieContainer) {
return pThis->ReleaseCookieContainer(hCookieContainer); return pThis->ReleaseCookieContainer(hCookieContainer);
} }
// Adds a cookie to the specified cookie container that will be used with future requests. // Adds a cookie to the specified cookie container that will be used with future requests.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_SetCookie(ISteamHTTP* pThis, HTTPCookieContainerHandle hCookieContainer, const char *pchHost, const char *pchUrl, const char *pchCookie) { DLL(int32_t) BS_ISteamHTTP_SetCookie(ISteamHTTP* pThis, HTTPCookieContainerHandle hCookieContainer, const char *pchHost, const char *pchUrl, const char *pchCookie) {
return pThis->SetCookie(hCookieContainer, pchHost, pchUrl, pchCookie); return pThis->SetCookie(hCookieContainer, pchHost, pchUrl, pchCookie);
} }
// Set the cookie container to use for a HTTP request // Set the cookie container to use for a HTTP request
DLL_FUNCTION(int32_t) BS_ISteamHTTP_SetHTTPRequestCookieContainer(ISteamHTTP* pThis, HTTPRequestHandle hRequest, HTTPCookieContainerHandle hCookieContainer) { DLL(int32_t) BS_ISteamHTTP_SetHTTPRequestCookieContainer(ISteamHTTP* pThis, HTTPRequestHandle hRequest, HTTPCookieContainerHandle hCookieContainer) {
return pThis->SetHTTPRequestCookieContainer(hRequest, hCookieContainer); return pThis->SetHTTPRequestCookieContainer(hRequest, hCookieContainer);
} }
// Set the extra user agent info for a request, this doesn't clobber the normal user agent, it just adds the extra info on the end // Set the extra user agent info for a request, this doesn't clobber the normal user agent, it just adds the extra info on the end
DLL_FUNCTION(int32_t) BS_ISteamHTTP_SetHTTPRequestUserAgentInfo(ISteamHTTP* pThis, HTTPRequestHandle hRequest, const char *pchUserAgentInfo) { DLL(int32_t) BS_ISteamHTTP_SetHTTPRequestUserAgentInfo(ISteamHTTP* pThis, HTTPRequestHandle hRequest, const char *pchUserAgentInfo) {
return pThis->SetHTTPRequestUserAgentInfo(hRequest, pchUserAgentInfo); return pThis->SetHTTPRequestUserAgentInfo(hRequest, pchUserAgentInfo);
} }
// Set that https request should require verified SSL certificate via machines certificate trust store // Set that https request should require verified SSL certificate via machines certificate trust store
DLL_FUNCTION(int32_t) BS_ISteamHTTP_SetHTTPRequestRequiresVerifiedCertificate(ISteamHTTP* pThis, HTTPRequestHandle hRequest, bool bRequireVerifiedCertificate) { DLL(int32_t) BS_ISteamHTTP_SetHTTPRequestRequiresVerifiedCertificate(ISteamHTTP* pThis, HTTPRequestHandle hRequest, bool bRequireVerifiedCertificate) {
return pThis->SetHTTPRequestRequiresVerifiedCertificate(hRequest, bRequireVerifiedCertificate); return pThis->SetHTTPRequestRequiresVerifiedCertificate(hRequest, bRequireVerifiedCertificate);
} }
// Set an absolute timeout on the HTTP request, this is just a total time timeout different than the network activity timeout // Set an absolute timeout on the HTTP request, this is just a total time timeout different than the network activity timeout
// which can bump everytime we get more data // which can bump everytime we get more data
DLL_FUNCTION(int32_t) BS_ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS(ISteamHTTP* pThis, HTTPRequestHandle hRequest, uint32 unMilliseconds) { DLL(int32_t) BS_ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS(ISteamHTTP* pThis, HTTPRequestHandle hRequest, uint32 unMilliseconds) {
return pThis->SetHTTPRequestAbsoluteTimeoutMS(hRequest, unMilliseconds); return pThis->SetHTTPRequestAbsoluteTimeoutMS(hRequest, unMilliseconds);
} }
// Check if the reason the request failed was because we timed it out (rather than some harder failure) // Check if the reason the request failed was because we timed it out (rather than some harder failure)
DLL_FUNCTION(int32_t) BS_ISteamHTTP_GetHTTPRequestWasTimedOut(ISteamHTTP* pThis, HTTPRequestHandle hRequest, bool *pbWasTimedOut) { DLL(int32_t) BS_ISteamHTTP_GetHTTPRequestWasTimedOut(ISteamHTTP* pThis, HTTPRequestHandle hRequest, bool *pbWasTimedOut) {
return pThis->GetHTTPRequestWasTimedOut(hRequest, pbWasTimedOut); return pThis->GetHTTPRequestWasTimedOut(hRequest, pbWasTimedOut);
} }
+24 -24
View File
@@ -19,11 +19,11 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Steam Inventory query and manipulation API // Purpose: Steam Inventory query and manipulation API
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(ISteamInventory*) BS_SteamInventory() { DLL(ISteamInventory*) BS_SteamInventory() {
return SteamInventory(); return SteamInventory();
} }
DLL_FUNCTION(ISteamInventory*) BS_SteamGameServerInventory() { DLL(ISteamInventory*) BS_SteamGameServerInventory() {
return SteamGameServerInventory(); return SteamGameServerInventory();
} }
@@ -42,13 +42,13 @@ DLL_FUNCTION(ISteamInventory*) BS_SteamGameServerInventory() {
// k_EResultServiceUnavailable - ERROR: service temporarily down, you may retry later // k_EResultServiceUnavailable - ERROR: service temporarily down, you may retry later
// k_EResultLimitExceeded - ERROR: operation would exceed per-user inventory limits // k_EResultLimitExceeded - ERROR: operation would exceed per-user inventory limits
// k_EResultFail - ERROR: unknown / generic error // k_EResultFail - ERROR: unknown / generic error
DLL_FUNCTION(EResult) BS_ISteamInventory_GetResultStatus(ISteamInventory* pThis, SteamInventoryResult_t resultHandle) { DLL(EResult) BS_ISteamInventory_GetResultStatus(ISteamInventory* pThis, SteamInventoryResult_t resultHandle) {
return pThis->GetResultStatus(resultHandle); return pThis->GetResultStatus(resultHandle);
} }
// Copies the contents of a result set into a flat array. The specific // Copies the contents of a result set into a flat array. The specific
// contents of the result set depend on which query which was used. // contents of the result set depend on which query which was used.
DLL_FUNCTION(bool) BS_ISteamInventory_GetResultItems(ISteamInventory* pThis, SteamInventoryResult_t resultHandle, DLL(bool) BS_ISteamInventory_GetResultItems(ISteamInventory* pThis, SteamInventoryResult_t resultHandle,
OUT_ARRAY_COUNT(punOutItemsArraySize, Output array) SteamItemDetails_t *pOutItemsArray, OUT_ARRAY_COUNT(punOutItemsArraySize, Output array) SteamItemDetails_t *pOutItemsArray,
uint32 *punOutItemsArraySize) { uint32 *punOutItemsArraySize) {
return pThis->GetResultItems(resultHandle, pOutItemsArray, punOutItemsArraySize); return pThis->GetResultItems(resultHandle, pOutItemsArray, punOutItemsArraySize);
@@ -56,19 +56,19 @@ DLL_FUNCTION(bool) BS_ISteamInventory_GetResultItems(ISteamInventory* pThis, Ste
// Returns the server time at which the result was generated. Compare against // Returns the server time at which the result was generated. Compare against
// the value of IClientUtils::GetServerRealTime() to determine age. // the value of IClientUtils::GetServerRealTime() to determine age.
DLL_FUNCTION(uint32) BS_ISteamInventory_GetResultTimestamp(ISteamInventory* pThis, SteamInventoryResult_t resultHandle) { DLL(uint32) BS_ISteamInventory_GetResultTimestamp(ISteamInventory* pThis, SteamInventoryResult_t resultHandle) {
return pThis->GetResultTimestamp(resultHandle); return pThis->GetResultTimestamp(resultHandle);
} }
// Returns true if the result belongs to the target steam ID, false if the // Returns true if the result belongs to the target steam ID, false if the
// result does not. This is important when using DeserializeResult, to verify // result does not. This is important when using DeserializeResult, to verify
// that a remote player is not pretending to have a different user's inventory. // that a remote player is not pretending to have a different user's inventory.
DLL_FUNCTION(bool) BS_ISteamInventory_CheckResultSteamID(ISteamInventory* pThis, SteamInventoryResult_t resultHandle, CSteamID* steamIDExpected) { DLL(bool) BS_ISteamInventory_CheckResultSteamID(ISteamInventory* pThis, SteamInventoryResult_t resultHandle, CSteamID* steamIDExpected) {
return pThis->CheckResultSteamID(resultHandle, *steamIDExpected); return pThis->CheckResultSteamID(resultHandle, *steamIDExpected);
} }
// Destroys a result handle and frees all associated memory. // Destroys a result handle and frees all associated memory.
DLL_FUNCTION(void) BS_ISteamInventory_DestroyResult(ISteamInventory* pThis, SteamInventoryResult_t resultHandle) { DLL(void) BS_ISteamInventory_DestroyResult(ISteamInventory* pThis, SteamInventoryResult_t resultHandle) {
return pThis->DestroyResult(resultHandle); return pThis->DestroyResult(resultHandle);
} }
@@ -82,7 +82,7 @@ DLL_FUNCTION(void) BS_ISteamInventory_DestroyResult(ISteamInventory* pThis, Stea
// cached results if called too frequently. It is suggested that you call // cached results if called too frequently. It is suggested that you call
// this function only when you are about to display the user's full inventory, // this function only when you are about to display the user's full inventory,
// or if you expect that the inventory may have changed. // or if you expect that the inventory may have changed.
DLL_FUNCTION(bool) BS_ISteamInventory_GetAllItems(ISteamInventory* pThis, SteamInventoryResult_t *pResultHandle) { DLL(bool) BS_ISteamInventory_GetAllItems(ISteamInventory* pThis, SteamInventoryResult_t *pResultHandle) {
return pThis->GetAllItems(pResultHandle); return pThis->GetAllItems(pResultHandle);
} }
@@ -94,7 +94,7 @@ DLL_FUNCTION(bool) BS_ISteamInventory_GetAllItems(ISteamInventory* pThis, SteamI
// For example, you could call GetItemsByID with the IDs of the user's // For example, you could call GetItemsByID with the IDs of the user's
// currently equipped cosmetic items and serialize this to a buffer, and // currently equipped cosmetic items and serialize this to a buffer, and
// then transmit this buffer to other players upon joining a game. // then transmit this buffer to other players upon joining a game.
DLL_FUNCTION(bool) BS_ISteamInventory_GetItemsByID(ISteamInventory* pThis, SteamInventoryResult_t *pResultHandle, ARRAY_COUNT(unCountInstanceIDs) const SteamItemInstanceID_t *pInstanceIDs, uint32 unCountInstanceIDs) { DLL(bool) BS_ISteamInventory_GetItemsByID(ISteamInventory* pThis, SteamInventoryResult_t *pResultHandle, ARRAY_COUNT(unCountInstanceIDs) const SteamItemInstanceID_t *pInstanceIDs, uint32 unCountInstanceIDs) {
return pThis->GetItemsByID(pResultHandle, pInstanceIDs, unCountInstanceIDs); return pThis->GetItemsByID(pResultHandle, pInstanceIDs, unCountInstanceIDs);
} }
@@ -114,7 +114,7 @@ DLL_FUNCTION(bool) BS_ISteamInventory_GetItemsByID(ISteamInventory* pThis, Steam
// recommended to use "GetItemsByID" first to create a minimal result set. // recommended to use "GetItemsByID" first to create a minimal result set.
// Results have a built-in timestamp which will be considered "expired" after // Results have a built-in timestamp which will be considered "expired" after
// an hour has elapsed. See DeserializeResult for expiration handling. // an hour has elapsed. See DeserializeResult for expiration handling.
DLL_FUNCTION(bool) BS_ISteamInventory_SerializeResult(ISteamInventory* pThis, SteamInventoryResult_t resultHandle, OUT_BUFFER_COUNT(punOutBufferSize) void *pOutBuffer, uint32 *punOutBufferSize) { DLL(bool) BS_ISteamInventory_SerializeResult(ISteamInventory* pThis, SteamInventoryResult_t resultHandle, OUT_BUFFER_COUNT(punOutBufferSize) void *pOutBuffer, uint32 *punOutBufferSize) {
return pThis->SerializeResult(resultHandle, pOutBuffer, punOutBufferSize); return pThis->SerializeResult(resultHandle, pOutBuffer, punOutBufferSize);
} }
@@ -134,7 +134,7 @@ DLL_FUNCTION(bool) BS_ISteamInventory_SerializeResult(ISteamInventory* pThis, St
// ISteamUtils::GetServerRealTime() to determine how old the data is. You could // ISteamUtils::GetServerRealTime() to determine how old the data is. You could
// simply ignore the "expired" result code and continue as normal, or you // simply ignore the "expired" result code and continue as normal, or you
// could challenge the player with expired data to send an updated result set. // could challenge the player with expired data to send an updated result set.
DLL_FUNCTION(bool) BS_ISteamInventory_DeserializeResult(ISteamInventory* pThis, SteamInventoryResult_t *pOutResultHandle, BUFFER_COUNT(punOutBufferSize) const void *pBuffer, uint32 unBufferSize, bool bRESERVED_MUST_BE_FALSE = false) { DLL(bool) BS_ISteamInventory_DeserializeResult(ISteamInventory* pThis, SteamInventoryResult_t *pOutResultHandle, BUFFER_COUNT(punOutBufferSize) const void *pBuffer, uint32 unBufferSize, bool bRESERVED_MUST_BE_FALSE = false) {
return pThis->DeserializeResult(pOutResultHandle, pBuffer, unBufferSize, bRESERVED_MUST_BE_FALSE); return pThis->DeserializeResult(pOutResultHandle, pBuffer, unBufferSize, bRESERVED_MUST_BE_FALSE);
} }
@@ -149,7 +149,7 @@ DLL_FUNCTION(bool) BS_ISteamInventory_DeserializeResult(ISteamInventory* pThis,
// be restricted to certain item definitions or fully blocked via the Steamworks website. // be restricted to certain item definitions or fully blocked via the Steamworks website.
// If punArrayQuantity is not NULL, it should be the same length as pArrayItems and should // If punArrayQuantity is not NULL, it should be the same length as pArrayItems and should
// describe the quantity of each item to generate. // describe the quantity of each item to generate.
DLL_FUNCTION(bool) BS_ISteamInventory_GenerateItems(ISteamInventory* pThis, SteamInventoryResult_t *pResultHandle, ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, ARRAY_COUNT(unArrayLength) const uint32 *punArrayQuantity, uint32 unArrayLength) { DLL(bool) BS_ISteamInventory_GenerateItems(ISteamInventory* pThis, SteamInventoryResult_t *pResultHandle, ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, ARRAY_COUNT(unArrayLength) const uint32 *punArrayQuantity, uint32 unArrayLength) {
return pThis->GenerateItems(pResultHandle, pArrayItemDefs, punArrayQuantity, unArrayLength); return pThis->GenerateItems(pResultHandle, pArrayItemDefs, punArrayQuantity, unArrayLength);
} }
@@ -157,7 +157,7 @@ DLL_FUNCTION(bool) BS_ISteamInventory_GenerateItems(ISteamInventory* pThis, Stea
// and grants the items (one time only). On success, the result set will include items which // and grants the items (one time only). On success, the result set will include items which
// were granted, if any. If no items were granted because the user isn't eligible for any // were granted, if any. If no items were granted because the user isn't eligible for any
// promotions, this is still considered a success. // promotions, this is still considered a success.
DLL_FUNCTION(bool) BS_ISteamInventory_GrantPromoItems(ISteamInventory* pThis, SteamInventoryResult_t *pResultHandle) { DLL(bool) BS_ISteamInventory_GrantPromoItems(ISteamInventory* pThis, SteamInventoryResult_t *pResultHandle) {
return pThis->GrantPromoItems(pResultHandle); return pThis->GrantPromoItems(pResultHandle);
} }
@@ -165,10 +165,10 @@ DLL_FUNCTION(bool) BS_ISteamInventory_GrantPromoItems(ISteamInventory* pThis, St
// scanning for all eligible promotional items, the check is restricted to a single item // scanning for all eligible promotional items, the check is restricted to a single item
// definition or set of item definitions. This can be useful if your game has custom UI for // definition or set of item definitions. This can be useful if your game has custom UI for
// showing a specific promo item to the user. // showing a specific promo item to the user.
DLL_FUNCTION(bool) BS_ISteamInventory_AddPromoItem(ISteamInventory* pThis, SteamInventoryResult_t *pResultHandle, SteamItemDef_t itemDef) { DLL(bool) BS_ISteamInventory_AddPromoItem(ISteamInventory* pThis, SteamInventoryResult_t *pResultHandle, SteamItemDef_t itemDef) {
return pThis->AddPromoItem(pResultHandle, itemDef); return pThis->AddPromoItem(pResultHandle, itemDef);
} }
DLL_FUNCTION(bool) BS_ISteamInventory_AddPromoItems(ISteamInventory* pThis, SteamInventoryResult_t *pResultHandle, ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, uint32 unArrayLength) { DLL(bool) BS_ISteamInventory_AddPromoItems(ISteamInventory* pThis, SteamInventoryResult_t *pResultHandle, ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, uint32 unArrayLength) {
return pThis->AddPromoItems(pResultHandle, pArrayItemDefs, unArrayLength); return pThis->AddPromoItems(pResultHandle, pArrayItemDefs, unArrayLength);
} }
@@ -179,7 +179,7 @@ DLL_FUNCTION(bool) BS_ISteamInventory_AddPromoItems(ISteamInventory* pThis, Stea
// of each item to destroy. ConsumeItem can be restricted to certain item definitions or // of each item to destroy. ConsumeItem can be restricted to certain item definitions or
// fully blocked via the Steamworks website to minimize support/abuse issues such as the // fully blocked via the Steamworks website to minimize support/abuse issues such as the
// clasic "my brother borrowed my laptop and deleted all of my rare items". // clasic "my brother borrowed my laptop and deleted all of my rare items".
DLL_FUNCTION(bool) BS_ISteamInventory_ConsumeItem(ISteamInventory* pThis, SteamInventoryResult_t *pResultHandle, SteamItemInstanceID_t itemConsume, uint32 unQuantity) { DLL(bool) BS_ISteamInventory_ConsumeItem(ISteamInventory* pThis, SteamInventoryResult_t *pResultHandle, SteamItemInstanceID_t itemConsume, uint32 unQuantity) {
return pThis->ConsumeItem(pResultHandle, itemConsume, unQuantity); return pThis->ConsumeItem(pResultHandle, itemConsume, unQuantity);
} }
@@ -191,7 +191,7 @@ DLL_FUNCTION(bool) BS_ISteamInventory_ConsumeItem(ISteamInventory* pThis, SteamI
// corresponding to recipes. // corresponding to recipes.
// (Note: although GenerateItems may be hard or impossible to use securely in your game, // (Note: although GenerateItems may be hard or impossible to use securely in your game,
// ExchangeItems is perfectly reasonable to use once the whitelists are set accordingly.) // ExchangeItems is perfectly reasonable to use once the whitelists are set accordingly.)
DLL_FUNCTION(bool) BS_ISteamInventory_ExchangeItems(ISteamInventory* pThis, SteamInventoryResult_t *pResultHandle, DLL(bool) BS_ISteamInventory_ExchangeItems(ISteamInventory* pThis, SteamInventoryResult_t *pResultHandle,
ARRAY_COUNT(unArrayGenerateLength) const SteamItemDef_t *pArrayGenerate, ARRAY_COUNT(unArrayGenerateLength) const uint32 *punArrayGenerateQuantity, uint32 unArrayGenerateLength, ARRAY_COUNT(unArrayGenerateLength) const SteamItemDef_t *pArrayGenerate, ARRAY_COUNT(unArrayGenerateLength) const uint32 *punArrayGenerateQuantity, uint32 unArrayGenerateLength,
ARRAY_COUNT(unArrayDestroyLength) const SteamItemInstanceID_t *pArrayDestroy, ARRAY_COUNT(unArrayDestroyLength) const uint32 *punArrayDestroyQuantity, uint32 unArrayDestroyLength) { ARRAY_COUNT(unArrayDestroyLength) const SteamItemInstanceID_t *pArrayDestroy, ARRAY_COUNT(unArrayDestroyLength) const uint32 *punArrayDestroyQuantity, uint32 unArrayDestroyLength) {
return pThis->ExchangeItems(pResultHandle, pArrayGenerate, punArrayGenerateQuantity, unArrayGenerateLength, pArrayDestroy, punArrayDestroyQuantity, unArrayDestroyLength); return pThis->ExchangeItems(pResultHandle, pArrayGenerate, punArrayGenerateQuantity, unArrayGenerateLength, pArrayDestroy, punArrayDestroyQuantity, unArrayDestroyLength);
@@ -202,7 +202,7 @@ DLL_FUNCTION(bool) BS_ISteamInventory_ExchangeItems(ISteamInventory* pThis, Stea
// quantity greater than one). It can be used to split a stack into two, or to transfer // quantity greater than one). It can be used to split a stack into two, or to transfer
// quantity from one stack into another stack of identical items. To split one stack into // quantity from one stack into another stack of identical items. To split one stack into
// two, pass k_SteamItemInstanceIDInvalid for itemIdDest and a new item will be generated. // two, pass k_SteamItemInstanceIDInvalid for itemIdDest and a new item will be generated.
DLL_FUNCTION(bool) BS_ISteamInventory_TransferItemQuantity(ISteamInventory* pThis, SteamInventoryResult_t *pResultHandle, SteamItemInstanceID_t itemIdSource, uint32 unQuantity, SteamItemInstanceID_t itemIdDest) { DLL(bool) BS_ISteamInventory_TransferItemQuantity(ISteamInventory* pThis, SteamInventoryResult_t *pResultHandle, SteamItemInstanceID_t itemIdSource, uint32 unQuantity, SteamItemInstanceID_t itemIdDest) {
return pThis->TransferItemQuantity(pResultHandle, itemIdSource, unQuantity, itemIdDest); return pThis->TransferItemQuantity(pResultHandle, itemIdSource, unQuantity, itemIdDest);
} }
@@ -224,7 +224,7 @@ DLL_FUNCTION(bool) BS_ISteamInventory_TransferItemQuantity(ISteamInventory* pThi
// Playtime credit accumulation can be capped on a daily or weekly basis through your // Playtime credit accumulation can be capped on a daily or weekly basis through your
// Steamworks configuration. // Steamworks configuration.
// //
DLL_FUNCTION(void) BS_ISteamInventory_SendItemDropHeartbeat(ISteamInventory* pThis) { DLL(void) BS_ISteamInventory_SendItemDropHeartbeat(ISteamInventory* pThis) {
return pThis->SendItemDropHeartbeat(); return pThis->SendItemDropHeartbeat();
} }
@@ -236,7 +236,7 @@ DLL_FUNCTION(void) BS_ISteamInventory_SendItemDropHeartbeat(ISteamInventory* pTh
// hack their clients could modify the value of "dropListDefinition", so do not use it // hack their clients could modify the value of "dropListDefinition", so do not use it
// to directly control rarity. It is primarily useful during testing and development, // to directly control rarity. It is primarily useful during testing and development,
// where you may wish to perform experiments with different types of drops. // where you may wish to perform experiments with different types of drops.
DLL_FUNCTION(bool) BS_ISteamInventory_TriggerItemDrop(ISteamInventory* pThis, SteamInventoryResult_t *pResultHandle, SteamItemDef_t dropListDefinition) { DLL(bool) BS_ISteamInventory_TriggerItemDrop(ISteamInventory* pThis, SteamInventoryResult_t *pResultHandle, SteamItemDef_t dropListDefinition) {
return pThis->TriggerItemDrop(pResultHandle, dropListDefinition); return pThis->TriggerItemDrop(pResultHandle, dropListDefinition);
} }
@@ -252,7 +252,7 @@ DLL_FUNCTION(bool) BS_ISteamInventory_TriggerItemDrop(ISteamInventory* pThis, St
// confirming the removal or quantity changes of the items given away, and the new // confirming the removal or quantity changes of the items given away, and the new
// item instance id numbers and quantities of the received items. // item instance id numbers and quantities of the received items.
// (Note: new item instance IDs are generated whenever an item changes ownership.) // (Note: new item instance IDs are generated whenever an item changes ownership.)
DLL_FUNCTION(bool) BS_ISteamInventory_TradeItems(ISteamInventory* pThis, SteamInventoryResult_t *pResultHandle, CSteamID* steamIDTradePartner, DLL(bool) BS_ISteamInventory_TradeItems(ISteamInventory* pThis, SteamInventoryResult_t *pResultHandle, CSteamID* steamIDTradePartner,
ARRAY_COUNT(nArrayGiveLength) const SteamItemInstanceID_t *pArrayGive, ARRAY_COUNT(nArrayGiveLength) const uint32 *pArrayGiveQuantity, uint32 nArrayGiveLength, ARRAY_COUNT(nArrayGiveLength) const SteamItemInstanceID_t *pArrayGive, ARRAY_COUNT(nArrayGiveLength) const uint32 *pArrayGiveQuantity, uint32 nArrayGiveLength,
ARRAY_COUNT(nArrayGetLength) const SteamItemInstanceID_t *pArrayGet, ARRAY_COUNT(nArrayGetLength) const uint32 *pArrayGetQuantity, uint32 nArrayGetLength) { ARRAY_COUNT(nArrayGetLength) const SteamItemInstanceID_t *pArrayGet, ARRAY_COUNT(nArrayGetLength) const uint32 *pArrayGetQuantity, uint32 nArrayGetLength) {
return pThis->TradeItems(pResultHandle, *steamIDTradePartner, pArrayGive, pArrayGiveQuantity, nArrayGiveLength, pArrayGet, pArrayGetQuantity, nArrayGetLength); return pThis->TradeItems(pResultHandle, *steamIDTradePartner, pArrayGive, pArrayGiveQuantity, nArrayGiveLength, pArrayGet, pArrayGetQuantity, nArrayGetLength);
@@ -273,7 +273,7 @@ DLL_FUNCTION(bool) BS_ISteamInventory_TradeItems(ISteamInventory* pThis, SteamIn
// Every time new item definitions are available (eg, from the dynamic addition of new // Every time new item definitions are available (eg, from the dynamic addition of new
// item types while players are still in-game), a SteamInventoryDefinitionUpdate_t // item types while players are still in-game), a SteamInventoryDefinitionUpdate_t
// callback will be fired. // callback will be fired.
DLL_FUNCTION(bool) BS_ISteamInventory_LoadItemDefinitions(ISteamInventory* pThis) { DLL(bool) BS_ISteamInventory_LoadItemDefinitions(ISteamInventory* pThis) {
return pThis->LoadItemDefinitions(); return pThis->LoadItemDefinitions();
} }
@@ -282,7 +282,7 @@ DLL_FUNCTION(bool) BS_ISteamInventory_LoadItemDefinitions(ISteamInventory* pThis
// If pItemDefIDs is null, the call will return true and *punItemDefIDsArraySize will // If pItemDefIDs is null, the call will return true and *punItemDefIDsArraySize will
// contain the total size necessary for a subsequent call. Otherwise, the call will // contain the total size necessary for a subsequent call. Otherwise, the call will
// return false if and only if there is not enough space in the output array. // return false if and only if there is not enough space in the output array.
DLL_FUNCTION(bool) BS_ISteamInventory_GetItemDefinitionIDs(ISteamInventory* pThis, DLL(bool) BS_ISteamInventory_GetItemDefinitionIDs(ISteamInventory* pThis,
OUT_ARRAY_COUNT(punItemDefIDsArraySize, List of item definition IDs) SteamItemDef_t *pItemDefIDs, OUT_ARRAY_COUNT(punItemDefIDsArraySize, List of item definition IDs) SteamItemDef_t *pItemDefIDs,
DESC(Size of array is passed in and actual size used is returned in this param) uint32 *punItemDefIDsArraySize) { DESC(Size of array is passed in and actual size used is returned in this param) uint32 *punItemDefIDsArraySize) {
return pThis->GetItemDefinitionIDs(pItemDefIDs, punItemDefIDsArraySize); return pThis->GetItemDefinitionIDs(pItemDefIDs, punItemDefIDsArraySize);
@@ -294,7 +294,7 @@ DLL_FUNCTION(bool) BS_ISteamInventory_GetItemDefinitionIDs(ISteamInventory* pThi
// Property names are always composed of ASCII letters, numbers, and/or underscores. // Property names are always composed of ASCII letters, numbers, and/or underscores.
// Pass a NULL pointer for pchPropertyName to get a comma - separated list of available // Pass a NULL pointer for pchPropertyName to get a comma - separated list of available
// property names. // property names.
DLL_FUNCTION(bool) BS_ISteamInventory_GetItemDefinitionProperty(ISteamInventory* pThis, SteamItemDef_t iDefinition, const char *pchPropertyName, DLL(bool) BS_ISteamInventory_GetItemDefinitionProperty(ISteamInventory* pThis, SteamItemDef_t iDefinition, const char *pchPropertyName,
OUT_STRING_COUNT(punValueBufferSize) char *pchValueBuffer, uint32 *punValueBufferSize) { OUT_STRING_COUNT(punValueBufferSize) char *pchValueBuffer, uint32 *punValueBufferSize) {
return pThis->GetItemDefinitionProperty(iDefinition, pchPropertyName, pchValueBuffer, punValueBufferSize); return pThis->GetItemDefinitionProperty(iDefinition, pchPropertyName, pchValueBuffer, punValueBufferSize);
} }
+275 -2
View File
@@ -16,8 +16,281 @@
#include "BlitzSteam.h" #include "BlitzSteam.h"
DLL_FUNCTION(ISteamMatchmaking*) BS_SteamMatchmaking() { DLL(ISteamMatchmaking*) BS_SteamMatchmaking() {
return SteamMatchmaking(); return SteamMatchmaking();
} }
#pragma message("SteamMatchmaking is not ported yet. TODO!")
// game server favorites storage
// saves basic details about a multiplayer game server locally
// returns the number of favorites servers the user has stored
DLL(int32_t) BS_ISteamMatchmaking_GetFavoriteGameCount(ISteamMatchmaking* pThis) {
return pThis->GetFavoriteGameCount();
}
// returns the details of the game server
// iGame is of range [0,GetFavoriteGameCount())
// *pnIP, *pnConnPort are filled in the with IP:port of the game server
// *punFlags specify whether the game server was stored as an explicit favorite or in the history of connections
// *pRTime32LastPlayedOnServer is filled in the with the Unix time the favorite was added
DLL(int32_t) BS_ISteamMatchmaking_GetFavoriteGame(ISteamMatchmaking* pThis, int32_t iGame,
AppId_t *pnAppID, uint32_t *pnIP, uint16_t *pnConnPort, uint16_t *pnQueryPort,
uint32_t *punFlags, uint32_t *pRTime32LastPlayedOnServer) {
return pThis->GetFavoriteGame(iGame, pnAppID, pnIP, pnConnPort, pnQueryPort, punFlags, pRTime32LastPlayedOnServer);
}
// adds the game server to the local list; updates the time played of the server if it already exists in the list
DLL(int) BS_ISteamMatchmaking_AddFavoriteGame(ISteamMatchmaking* pThis, AppId_t nAppID, uint32 nIP, uint16 nConnPort,
uint16 nQueryPort, uint32 unFlags, uint32 rTime32LastPlayedOnServer) {
return pThis->AddFavoriteGame(nAppID, nIP, nConnPort, nQueryPort, unFlags, rTime32LastPlayedOnServer);
}
// removes the game server from the local storage; returns true if one was removed
DLL(bool) BS_ISteamMatchmaking_RemoveFavoriteGame(ISteamMatchmaking* pThis, AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags) {
return pThis->RemoveFavoriteGame(nAppID, nIP, nConnPort, nQueryPort, unFlags);
}
///////
// Game lobby functions
// Get a list of relevant lobbies
// this is an asynchronous request
// results will be returned by LobbyMatchList_t callback & call result, with the number of lobbies found
// this will never return lobbies that are full
// to add more filter, the filter calls below need to be call before each and every RequestLobbyList() call
// use the CCallResult<> object in steam_api.h to match the SteamAPICall_t call result to a function in an object, e.g.
/*
class CMyLobbyListManager
{
CCallResult<CMyLobbyListManager, LobbyMatchList_t> m_CallResultLobbyMatchList;
void FindLobbies()
{
// SteamMatchmaking()->AddRequestLobbyListFilter*() functions would be called here, before RequestLobbyList()
SteamAPICall_t hSteamAPICall = SteamMatchmaking()->RequestLobbyList();
m_CallResultLobbyMatchList.Set( hSteamAPICall, this, &CMyLobbyListManager::OnLobbyMatchList );
}
void OnLobbyMatchList( LobbyMatchList_t *pLobbyMatchList, bool bIOFailure )
{
// lobby list has be retrieved from Steam back-end, use results
}
}
*/
//
//CALL_RESULT(LobbyMatchList_t)
DLL(SteamAPICall_t) BS_ISteamMatchmaking_RequestLobbyList(ISteamMatchmaking* pThis) {
return pThis->RequestLobbyList();
}
// filters for lobbies
// this needs to be called before RequestLobbyList() to take effect
// these are cleared on each call to RequestLobbyList()
DLL(void) BS_ISteamMatchmaking_AddRequestLobbyListStringFilter(ISteamMatchmaking* pThis, const char *pchKeyToMatch, const char *pchValueToMatch, ELobbyComparison eComparisonType) {
pThis->AddRequestLobbyListStringFilter(pchKeyToMatch, pchValueToMatch, eComparisonType);
}
// numerical comparison
DLL(void) BS_ISteamMatchmaking_AddRequestLobbyListNumericalFilter(ISteamMatchmaking* pThis, const char *pchKeyToMatch, int nValueToMatch, ELobbyComparison eComparisonType) {
pThis->AddRequestLobbyListNumericalFilter(pchKeyToMatch, nValueToMatch, eComparisonType);
}
// returns results closest to the specified value. Multiple near filters can be added, with early filters taking precedence
DLL(void) BS_ISteamMatchmaking_AddRequestLobbyListNearValueFilter(ISteamMatchmaking* pThis, const char *pchKeyToMatch, int nValueToBeCloseTo) {
pThis->AddRequestLobbyListNearValueFilter(pchKeyToMatch, nValueToBeCloseTo);
}
// returns only lobbies with the specified number of slots available
DLL(void) BS_ISteamMatchmaking_AddRequestLobbyListFilterSlotsAvailable(ISteamMatchmaking* pThis, int nSlotsAvailable) {
pThis->AddRequestLobbyListFilterSlotsAvailable(nSlotsAvailable);
}
// sets the distance for which we should search for lobbies (based on users IP address to location map on the Steam backed)
DLL(void) BS_ISteamMatchmaking_AddRequestLobbyListDistanceFilter(ISteamMatchmaking* pThis, ELobbyDistanceFilter eLobbyDistanceFilter) {
pThis->AddRequestLobbyListDistanceFilter(eLobbyDistanceFilter);
}
// sets how many results to return, the lower the count the faster it is to download the lobby results & details to the client
DLL(void) BS_ISteamMatchmaking_AddRequestLobbyListResultCountFilter(ISteamMatchmaking* pThis, int cMaxResults) {
pThis->AddRequestLobbyListResultCountFilter(cMaxResults);
}
DLL(void) BS_ISteamMatchmaking_AddRequestLobbyListCompatibleMembersFilter(ISteamMatchmaking* pThis, CSteamID* steamIDLobby) {
pThis->AddRequestLobbyListCompatibleMembersFilter(*steamIDLobby);
}
// returns the CSteamID* of a lobby, as retrieved by a RequestLobbyList call
// should only be called after a LobbyMatchList_t callback is received
// iLobby is of the range [0, LobbyMatchList_t::m_nLobbiesMatching)
// the returned CSteamID*::IsValid() will be false if iLobby is out of range
DLL(CSteamID*) BS_ISteamMatchmaking_GetLobbyByIndex(ISteamMatchmaking* pThis, int iLobby) {
return &(pThis->GetLobbyByIndex(iLobby));
}
// Create a lobby on the Steam servers.
// If private, then the lobby will not be returned by any RequestLobbyList() call; the CSteamID*
// of the lobby will need to be communicated via game channels or via InviteUserToLobby()
// this is an asynchronous request
// results will be returned by LobbyCreated_t callback and call result; lobby is joined & ready to use at this point
// a LobbyEnter_t callback will also be received (since the local user is joining their own lobby)
//CALL_RESULT(LobbyCreated_t)
DLL(SteamAPICall_t) BS_ISteamMatchmaking_CreateLobby(ISteamMatchmaking* pThis, ELobbyType eLobbyType, int cMaxMembers) {
return pThis->CreateLobby(eLobbyType, cMaxMembers);
}
// Joins an existing lobby
// this is an asynchronous request
// results will be returned by LobbyEnter_t callback & call result, check m_EChatRoomEnterResponse to see if was successful
// lobby metadata is available to use immediately on this call completing
//CALL_RESULT(LobbyEnter_t)
DLL(SteamAPICall_t) BS_ISteamMatchmaking_JoinLobby(ISteamMatchmaking* pThis, CSteamID* steamIDLobby) {
return pThis->JoinLobby(*steamIDLobby);
}
// Leave a lobby; this will take effect immediately on the client side
// other users in the lobby will be notified by a LobbyChatUpdate_t callback
DLL(void) BS_ISteamMatchmaking_LeaveLobby(ISteamMatchmaking* pThis, CSteamID* steamIDLobby) {
return pThis->LeaveLobby(*steamIDLobby);
}
// Invite another user to the lobby
// the target user will receive a LobbyInvite_t callback
// will return true if the invite is successfully sent, whether or not the target responds
// returns false if the local user is not connected to the Steam servers
// if the other user clicks the join link, a GameLobbyJoinRequested_t will be posted if the user is in-game,
// or if the game isn't running yet the game will be launched with the parameter +connect_lobby <64-bit lobby id>
DLL(bool) BS_ISteamMatchmaking_InviteUserToLobby(ISteamMatchmaking* pThis, CSteamID* steamIDLobby, CSteamID* steamIDInvitee) {
return pThis->InviteUserToLobby(*steamIDLobby, *steamIDInvitee);
}
// Lobby iteration, for viewing details of users in a lobby
// only accessible if the lobby user is a member of the specified lobby
// persona information for other lobby members (name, avatar, etc.) will be asynchronously received
// and accessible via ISteamFriends interface
// returns the number of users in the specified lobby
DLL(int) BS_ISteamMatchmaking_GetNumLobbyMembers(ISteamMatchmaking* pThis, CSteamID* steamIDLobby) {
return pThis->GetNumLobbyMembers(*steamIDLobby);
}
// returns the CSteamID* of a user in the lobby
// iMember is of range [0,GetNumLobbyMembers())
// note that the current user must be in a lobby to retrieve CSteamID*s of other users in that lobby
DLL(CSteamID*) BS_ISteamMatchmaking_GetLobbyMemberByIndex(ISteamMatchmaking* pThis, CSteamID* steamIDLobby, int iMember) {
return &(pThis->GetLobbyMemberByIndex(*steamIDLobby, iMember));
}
// Get data associated with this lobby
// takes a simple key, and returns the string associated with it
// "" will be returned if no value is set, or if steamIDLobby is invalid
DLL(const char*) BS_ISteamMatchmaking_GetLobbyData(ISteamMatchmaking* pThis, CSteamID* steamIDLobby, const char *pchKey) {
return pThis->GetLobbyData(*steamIDLobby, pchKey);
}
// Sets a key/value pair in the lobby metadata
// each user in the lobby will be broadcast this new value, and any new users joining will receive any existing data
// this can be used to set lobby names, map, etc.
// to reset a key, just set it to ""
// other users in the lobby will receive notification of the lobby data change via a LobbyDataUpdate_t callback
DLL(bool) BS_ISteamMatchmaking_SetLobbyData(ISteamMatchmaking* pThis, CSteamID* steamIDLobby, const char *pchKey, const char *pchValue) {
return pThis->SetLobbyData(*steamIDLobby, pchKey, pchValue);
}
// returns the number of metadata keys set on the specified lobby
DLL(int) BS_ISteamMatchmaking_GetLobbyDataCount(ISteamMatchmaking* pThis, CSteamID* steamIDLobby) {
return pThis->GetLobbyDataCount(*steamIDLobby);
}
// returns a lobby metadata key/values pair by index, of range [0, GetLobbyDataCount())
DLL(bool) BS_ISteamMatchmaking_GetLobbyDataByIndex(ISteamMatchmaking* pThis, CSteamID* steamIDLobby, int iLobbyData, char *pchKey, int cchKeyBufferSize, char *pchValue, int cchValueBufferSize) {
return pThis->GetLobbyDataByIndex(*steamIDLobby, iLobbyData, pchKey, cchKeyBufferSize, pchValue, cchValueBufferSize);
}
// removes a metadata key from the lobby
DLL(bool) BS_ISteamMatchmaking_DeleteLobbyData(ISteamMatchmaking* pThis, CSteamID* steamIDLobby, const char *pchKey) {
return pThis->DeleteLobbyData(*steamIDLobby, pchKey);
}
// Gets per-user metadata for someone in this lobby
DLL(const char*) BS_ISteamMatchmaking_GetLobbyMemberData(ISteamMatchmaking* pThis, CSteamID* steamIDLobby, CSteamID* steamIDUser, const char *pchKey) {
return pThis->GetLobbyMemberData(*steamIDLobby, *steamIDUser, pchKey);
}
// Sets per-user metadata (for the local user implicitly)
DLL(void) BS_ISteamMatchmaking_SetLobbyMemberData(ISteamMatchmaking* pThis, CSteamID* steamIDLobby, const char *pchKey, const char *pchValue) {
pThis->SetLobbyMemberData(*steamIDLobby, pchKey, pchValue);
}
// Broadcasts a chat message to the all the users in the lobby
// users in the lobby (including the local user) will receive a LobbyChatMsg_t callback
// returns true if the message is successfully sent
// pvMsgBody can be binary or text data, up to 4k
// if pvMsgBody is text, cubMsgBody should be strlen( text ) + 1, to include the null terminator
DLL(bool) BS_ISteamMatchmaking_SendLobbyChatMsg(ISteamMatchmaking* pThis, CSteamID* steamIDLobby, const void *pvMsgBody, int cubMsgBody) {
return pThis->SendLobbyChatMsg(*steamIDLobby, pvMsgBody, cubMsgBody);
}
// Get a chat message as specified in a LobbyChatMsg_t callback
// iChatID is the LobbyChatMsg_t::m_iChatID value in the callback
// *pSteamIDUser is filled in with the CSteamID* of the member
// *pvData is filled in with the message itself
// return value is the number of bytes written into the buffer
DLL(int) BS_ISteamMatchmaking_GetLobbyChatEntry(ISteamMatchmaking* pThis, CSteamID* steamIDLobby, int iChatID, OUT_STRUCT() CSteamID* *pSteamIDUser, void *pvData, int cubData, EChatEntryType *peChatEntryType) {
return pThis->GetLobbyChatEntry(*steamIDLobby, iChatID, *pSteamIDUser, pvData, cubData, peChatEntryType);
}
// Refreshes metadata for a lobby you're not necessarily in right now
// you never do this for lobbies you're a member of, only if your
// this will send down all the metadata associated with a lobby
// this is an asynchronous call
// returns false if the local user is not connected to the Steam servers
// results will be returned by a LobbyDataUpdate_t callback
// if the specified lobby doesn't exist, LobbyDataUpdate_t::m_bSuccess will be set to false
DLL(bool) BS_ISteamMatchmaking_RequestLobbyData(ISteamMatchmaking* pThis, CSteamID* steamIDLobby) {
return pThis->RequestLobbyData(*steamIDLobby);
}
// sets the game server associated with the lobby
// usually at this point, the users will join the specified game server
// either the IP/Port or the steamID of the game server has to be valid, depending on how you want the clients to be able to connect
DLL(void) BS_ISteamMatchmaking_SetLobbyGameServer(ISteamMatchmaking* pThis, CSteamID* steamIDLobby, uint32 unGameServerIP, uint16 unGameServerPort, CSteamID* steamIDGameServer) {
pThis->SetLobbyGameServer(*steamIDLobby, unGameServerIP, unGameServerPort, *steamIDGameServer);
}
// returns the details of a game server set in a lobby - returns false if there is no game server set, or that lobby doesn't exist
DLL(bool) BS_ISteamMatchmaking_GetLobbyGameServer(ISteamMatchmaking* pThis, CSteamID* steamIDLobby, uint32 *punGameServerIP, uint16 *punGameServerPort, OUT_STRUCT() CSteamID* *psteamIDGameServer) {
return pThis->GetLobbyGameServer(*steamIDLobby, punGameServerIP, punGameServerPort, *psteamIDGameServer);
}
// set the limit on the # of users who can join the lobby
DLL(bool) BS_ISteamMatchmaking_SetLobbyMemberLimit(ISteamMatchmaking* pThis, CSteamID* steamIDLobby, int cMaxMembers) {
return pThis->SetLobbyMemberLimit(*steamIDLobby, cMaxMembers);
}
// returns the current limit on the # of users who can join the lobby; returns 0 if no limit is defined
DLL(int) BS_ISteamMatchmaking_GetLobbyMemberLimit(ISteamMatchmaking* pThis, CSteamID* steamIDLobby) {
return pThis->GetLobbyMemberLimit(*steamIDLobby);
}
// updates which type of lobby it is
// only lobbies that are k_ELobbyTypePublic or k_ELobbyTypeInvisible, and are set to joinable, will be returned by RequestLobbyList() calls
DLL(bool) BS_ISteamMatchmaking_SetLobbyType(ISteamMatchmaking* pThis, CSteamID* steamIDLobby, ELobbyType eLobbyType) {
return pThis->SetLobbyType(*steamIDLobby, eLobbyType);
}
// sets whether or not a lobby is joinable - defaults to true for a new lobby
// if set to false, no user can join, even if they are a friend or have been invited
DLL(bool) BS_ISteamMatchmaking_SetLobbyJoinable(ISteamMatchmaking* pThis, CSteamID* steamIDLobby, bool bLobbyJoinable) {
return pThis->SetLobbyJoinable(*steamIDLobby, bLobbyJoinable);
}
// returns the current lobby owner
// you must be a member of the lobby to access this
// there always one lobby owner - if the current owner leaves, another user will become the owner
// it is possible (bur rare) to join a lobby just as the owner is leaving, thus entering a lobby with self as the owner
DLL(CSteamID*) BS_ISteamMatchmaking_GetLobbyOwner(ISteamMatchmaking* pThis, CSteamID* steamIDLobby) {
return &(pThis->GetLobbyOwner(*steamIDLobby));
}
// changes who the lobby owner is
// you must be the lobby owner for this to succeed, and steamIDNewOwner must be in the lobby
// after completion, the local user will no longer be the owner
DLL(bool) BS_ISteamMatchmaking_SetLobbyOwner(ISteamMatchmaking* pThis, CSteamID* steamIDLobby, CSteamID* steamIDNewOwner) {
return pThis->SetLobbyOwner(*steamIDLobby, *steamIDNewOwner);
}
// link two lobbies for the purposes of checking player compatibility
// you must be the lobby owner of both lobbies
DLL(bool) BS_ISteamMatchmaking_SetLinkedLobby(ISteamMatchmaking* pThis, CSteamID* steamIDLobby, CSteamID* steamIDLobbyDependent) {
return pThis->SetLinkedLobby(*steamIDLobby, *steamIDLobbyDependent);
}
+1 -1
View File
@@ -16,7 +16,7 @@
#include "BlitzSteam.h" #include "BlitzSteam.h"
DLL_FUNCTION(ISteamMatchmakingServers*) BS_SteamMatchmakingServers() { DLL(ISteamMatchmakingServers*) BS_SteamMatchmakingServers() {
return SteamMatchmakingServers(); return SteamMatchmakingServers();
} }
+1 -1
View File
@@ -16,7 +16,7 @@
#include "BlitzSteam.h" #include "BlitzSteam.h"
DLL_FUNCTION(ISteamMusic*) BS_SteamMusic() { DLL(ISteamMusic*) BS_SteamMusic() {
return SteamMusic(); return SteamMusic();
} }
+1 -1
View File
@@ -16,7 +16,7 @@
#include "BlitzSteam.h" #include "BlitzSteam.h"
DLL_FUNCTION(ISteamMusicRemote*) BS_SteamMusicRemote() { DLL(ISteamMusicRemote*) BS_SteamMusicRemote() {
return SteamMusicRemote(); return SteamMusicRemote();
} }
+10 -10
View File
@@ -20,11 +20,11 @@
// Purpose: Functions for making connections and sending data between clients, // Purpose: Functions for making connections and sending data between clients,
// traversing NAT's where possible // traversing NAT's where possible
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(ISteamNetworking*) BS_SteamNetworking() { DLL(ISteamNetworking*) BS_SteamNetworking() {
return SteamNetworking(); return SteamNetworking();
} }
DLL_FUNCTION(ISteamNetworking*) BS_SteamGameServerNetworking() { DLL(ISteamNetworking*) BS_SteamGameServerNetworking() {
return SteamGameServerNetworking(); return SteamGameServerNetworking();
} }
@@ -41,12 +41,12 @@ DLL_FUNCTION(ISteamNetworking*) BS_SteamGameServerNetworking() {
// nChannel is a routing number you can use to help route message to different systems - you'll have to call ReadP2PPacket() // nChannel is a routing number you can use to help route message to different systems - you'll have to call ReadP2PPacket()
// with the same channel number in order to retrieve the data on the other end // with the same channel number in order to retrieve the data on the other end
// using different channels to talk to the same user will still use the same underlying p2p connection, saving on resources // using different channels to talk to the same user will still use the same underlying p2p connection, saving on resources
DLL_FUNCTION(uint32_t) BS_ISteamNetworking_SendP2PPacket(ISteamNetworking* pThis, CSteamID* pSteamIDRemote, const void* pubData, uint32_t cubData, EP2PSend eP2PSendType, uint32_t nChannel) { DLL(uint32_t) BS_ISteamNetworking_SendP2PPacket(ISteamNetworking* pThis, CSteamID* pSteamIDRemote, const void* pubData, uint32_t cubData, EP2PSend eP2PSendType, uint32_t nChannel) {
return pThis->SendP2PPacket(*pSteamIDRemote, pubData, cubData, eP2PSendType, nChannel); return pThis->SendP2PPacket(*pSteamIDRemote, pubData, cubData, eP2PSendType, nChannel);
} }
// returns true if any data is available for read, and the amount of data that will need to be read // returns true if any data is available for read, and the amount of data that will need to be read
DLL_FUNCTION(uint32_t) BS_ISteamNetworking_IsP2PPacketAvailable(ISteamNetworking* pThis, uint32_t* pcubMsgSize, uint32_t nChannel) { DLL(uint32_t) BS_ISteamNetworking_IsP2PPacketAvailable(ISteamNetworking* pThis, uint32_t* pcubMsgSize, uint32_t nChannel) {
return pThis->IsP2PPacketAvailable(pcubMsgSize, nChannel); return pThis->IsP2PPacketAvailable(pcubMsgSize, nChannel);
} }
@@ -54,7 +54,7 @@ DLL_FUNCTION(uint32_t) BS_ISteamNetworking_IsP2PPacketAvailable(ISteamNetworking
// returns the size of the message and the steamID of the user who sent it in the last two parameters // returns the size of the message and the steamID of the user who sent it in the last two parameters
// if the buffer passed in is too small, the message will be truncated // if the buffer passed in is too small, the message will be truncated
// this call is not blocking, and will return false if no data is available // this call is not blocking, and will return false if no data is available
DLL_FUNCTION(uint32_t) BS_ISteamNetworking_ReadP2PPacket(ISteamNetworking* pThis, void* pubDest, uint32_t cubDest, uint32_t* pcubMsgSize, CSteamID* pSteamIDRemote, uint32_t nChannel) { DLL(uint32_t) BS_ISteamNetworking_ReadP2PPacket(ISteamNetworking* pThis, void* pubDest, uint32_t cubDest, uint32_t* pcubMsgSize, CSteamID* pSteamIDRemote, uint32_t nChannel) {
return pThis->ReadP2PPacket(pubDest, cubDest, pcubMsgSize, pSteamIDRemote, nChannel); return pThis->ReadP2PPacket(pubDest, cubDest, pcubMsgSize, pSteamIDRemote, nChannel);
} }
@@ -64,27 +64,27 @@ DLL_FUNCTION(uint32_t) BS_ISteamNetworking_ReadP2PPacket(ISteamNetworking* pThis
// if the user continues to send you packets, another P2PSessionRequest_t will be posted periodically // if the user continues to send you packets, another P2PSessionRequest_t will be posted periodically
// this may be called multiple times for a single user // this may be called multiple times for a single user
// (if you've called SendP2PPacket() on the other user, this implicitly accepts the session request) // (if you've called SendP2PPacket() on the other user, this implicitly accepts the session request)
DLL_FUNCTION(uint32_t) BS_ISteamNetworking_AcceptP2PSessionWithUser(ISteamNetworking* pThis, CSteamID* pSteamIDRemote) { DLL(uint32_t) BS_ISteamNetworking_AcceptP2PSessionWithUser(ISteamNetworking* pThis, CSteamID* pSteamIDRemote) {
return pThis->AcceptP2PSessionWithUser(*pSteamIDRemote); return pThis->AcceptP2PSessionWithUser(*pSteamIDRemote);
} }
// call CloseP2PSessionWithUser() when you're done talking to a user, will free up resources under-the-hood // call CloseP2PSessionWithUser() when you're done talking to a user, will free up resources under-the-hood
// if the remote user tries to send data to you again, another P2PSessionRequest_t callback will be posted // if the remote user tries to send data to you again, another P2PSessionRequest_t callback will be posted
DLL_FUNCTION(uint32_t) BS_ISteamNetworking_CloseP2PSessionWithUser(ISteamNetworking* pThis, CSteamID* pSteamIDRemote) { DLL(uint32_t) BS_ISteamNetworking_CloseP2PSessionWithUser(ISteamNetworking* pThis, CSteamID* pSteamIDRemote) {
return pThis->CloseP2PSessionWithUser(*pSteamIDRemote); return pThis->CloseP2PSessionWithUser(*pSteamIDRemote);
} }
// call CloseP2PChannelWithUser() when you're done talking to a user on a specific channel. Once all channels // call CloseP2PChannelWithUser() when you're done talking to a user on a specific channel. Once all channels
// open channels to a user have been closed, the open session to the user will be closed and new data from this // open channels to a user have been closed, the open session to the user will be closed and new data from this
// user will trigger a P2PSessionRequest_t callback // user will trigger a P2PSessionRequest_t callback
DLL_FUNCTION(uint32_t) BS_ISteamNetworking_CloseP2PChannelWithUser(ISteamNetworking* pThis, CSteamID* pSteamIDRemote, uint32_t nChannel) { DLL(uint32_t) BS_ISteamNetworking_CloseP2PChannelWithUser(ISteamNetworking* pThis, CSteamID* pSteamIDRemote, uint32_t nChannel) {
return pThis->CloseP2PChannelWithUser(*pSteamIDRemote, nChannel); return pThis->CloseP2PChannelWithUser(*pSteamIDRemote, nChannel);
} }
// fills out P2PSessionState_t structure with details about the underlying connection to the user // fills out P2PSessionState_t structure with details about the underlying connection to the user
// should only needed for debugging purposes // should only needed for debugging purposes
// returns false if no connection exists to the specified user // returns false if no connection exists to the specified user
DLL_FUNCTION(uint32_t) BS_ISteamNetworking_GetP2PSessionState(ISteamNetworking* pThis, CSteamID* pSteamIDRemote, P2PSessionState_t* pConnectionState) { DLL(uint32_t) BS_ISteamNetworking_GetP2PSessionState(ISteamNetworking* pThis, CSteamID* pSteamIDRemote, P2PSessionState_t* pConnectionState) {
return pThis->GetP2PSessionState(*pSteamIDRemote, pConnectionState); return pThis->GetP2PSessionState(*pSteamIDRemote, pConnectionState);
} }
@@ -93,6 +93,6 @@ DLL_FUNCTION(uint32_t) BS_ISteamNetworking_GetP2PSessionState(ISteamNetworking*
// or to existing connections that need to automatically reconnect after this value is set. // or to existing connections that need to automatically reconnect after this value is set.
// //
// P2P packet relay is allowed by default // P2P packet relay is allowed by default
DLL_FUNCTION(uint32_t) BS_ISteamNetworking_AllowP2PPacketRelay(ISteamNetworking* pThis, uint32_t bAllow) { DLL(uint32_t) BS_ISteamNetworking_AllowP2PPacketRelay(ISteamNetworking* pThis, uint32_t bAllow) {
return pThis->AllowP2PPacketRelay(!!bAllow); return pThis->AllowP2PPacketRelay(!!bAllow);
} }
+1 -1
View File
@@ -16,7 +16,7 @@
#include "BlitzSteam.h" #include "BlitzSteam.h"
DLL_FUNCTION(ISteamRemoteStorage*) BS_SteamRemoteStorage() { DLL(ISteamRemoteStorage*) BS_SteamRemoteStorage() {
return SteamRemoteStorage(); return SteamRemoteStorage();
} }
+1 -1
View File
@@ -16,7 +16,7 @@
#include "BlitzSteam.h" #include "BlitzSteam.h"
DLL_FUNCTION(ISteamScreenshots*) BS_SteamScreenshots() { DLL(ISteamScreenshots*) BS_SteamScreenshots() {
return SteamScreenshots(); return SteamScreenshots();
} }
+2 -2
View File
@@ -16,11 +16,11 @@
#include "BlitzSteam.h" #include "BlitzSteam.h"
DLL_FUNCTION(ISteamUGC*) BS_SteamUGC() { DLL(ISteamUGC*) BS_SteamUGC() {
return SteamUGC(); return SteamUGC();
} }
DLL_FUNCTION(ISteamUGC*) BS_SteamGameServerUGC() { DLL(ISteamUGC*) BS_SteamGameServerUGC() {
return SteamGameServerUGC(); return SteamGameServerUGC();
} }
+1 -1
View File
@@ -16,7 +16,7 @@
#include "BlitzSteam.h" #include "BlitzSteam.h"
DLL_FUNCTION(ISteamUnifiedMessages*) BS_SteamUnifiedMessages() { DLL(ISteamUnifiedMessages*) BS_SteamUnifiedMessages() {
return SteamUnifiedMessages(); return SteamUnifiedMessages();
} }
+26 -26
View File
@@ -20,26 +20,26 @@
// Purpose: Functions for accessing and manipulating a steam account // Purpose: Functions for accessing and manipulating a steam account
// associated with one client instance // associated with one client instance
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(ISteamUser*) BS_SteamUser() { DLL(ISteamUser*) BS_SteamUser() {
return SteamUser(); return SteamUser();
} }
// returns the HSteamUser this interface represents // returns the HSteamUser this interface represents
// this is only used internally by the API, and by a few select interfaces that support multi-user // this is only used internally by the API, and by a few select interfaces that support multi-user
DLL_FUNCTION(HSteamUser) BS_ISteamUser_GetHSteamUser( ISteamUser* lpSteamUser ) { DLL(HSteamUser) BS_ISteamUser_GetHSteamUser( ISteamUser* lpSteamUser ) {
return lpSteamUser->GetHSteamUser( ); return lpSteamUser->GetHSteamUser( );
} }
// returns true if the Steam client current has a live connection to the Steam servers. // returns true if the Steam client current has a live connection to the Steam servers.
// If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy. // If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy.
// The Steam client will automatically be trying to recreate the connection as often as possible. // The Steam client will automatically be trying to recreate the connection as often as possible.
DLL_FUNCTION(uint32_t) BS_ISteamUser_IsLoggedOn( ISteamUser* lpSteamUser ) { DLL(uint32_t) BS_ISteamUser_IsLoggedOn( ISteamUser* lpSteamUser ) {
return lpSteamUser->BLoggedOn( ); return lpSteamUser->BLoggedOn( );
} }
// returns the CSteamID of the account currently logged into the Steam client // returns the CSteamID of the account currently logged into the Steam client
// a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API // a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API
DLL_FUNCTION(CSteamID*) BS_ISteamUser_GetSteamID( ISteamUser* lpSteamUser ) { DLL(CSteamID*) BS_ISteamUser_GetSteamID( ISteamUser* lpSteamUser ) {
return &(lpSteamUser->GetSteamID( )); return &(lpSteamUser->GetSteamID( ));
} }
@@ -58,38 +58,38 @@ DLL_FUNCTION(CSteamID*) BS_ISteamUser_GetSteamID( ISteamUser* lpSteamUser ) {
// //
// return value - returns the number of bytes written to pBlob. If the return is 0, then the buffer passed in was too small, and the call has failed // return value - returns the number of bytes written to pBlob. If the return is 0, then the buffer passed in was too small, and the call has failed
// The contents of pBlob should then be sent to the game server, for it to use to complete the authentication process. // The contents of pBlob should then be sent to the game server, for it to use to complete the authentication process.
DLL_FUNCTION(uint32_t) BS_ISteamUser_InitiateGameConnection( ISteamUser* lpSteamUser, void* pAuthBlob, uint32_t cbMaxAuthBlob, CSteamID* SteamIDGameServer, uint32_t unIPServer, uint16_t usPortServer, uint32_t bSecure ) { DLL(uint32_t) BS_ISteamUser_InitiateGameConnection( ISteamUser* lpSteamUser, void* pAuthBlob, uint32_t cbMaxAuthBlob, CSteamID* SteamIDGameServer, uint32_t unIPServer, uint16_t usPortServer, uint32_t bSecure ) {
return lpSteamUser->InitiateGameConnection( pAuthBlob, cbMaxAuthBlob, *SteamIDGameServer, unIPServer, usPortServer, bSecure != 0 ); return lpSteamUser->InitiateGameConnection( pAuthBlob, cbMaxAuthBlob, *SteamIDGameServer, unIPServer, usPortServer, bSecure != 0 );
} }
// notify of disconnect // notify of disconnect
// needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call // needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call
DLL_FUNCTION(void) BS_ISteamUser_TerminateGameConnection( ISteamUser* lpSteamUser, uint32_t unIPServer, uint16_t usPortServer ) { DLL(void) BS_ISteamUser_TerminateGameConnection( ISteamUser* lpSteamUser, uint32_t unIPServer, uint16_t usPortServer ) {
lpSteamUser->TerminateGameConnection( unIPServer, usPortServer ); lpSteamUser->TerminateGameConnection( unIPServer, usPortServer );
} }
// Legacy functions // Legacy functions
// used by only a few games to track usage events // used by only a few games to track usage events
DLL_FUNCTION(void) BS_ISteamUser_TrackAppUsageEvent( ISteamUser* lpSteamUser, CGameID* gameId, uint32_t eAppUsageEvent, const char* pchExtraInfo ) { DLL(void) BS_ISteamUser_TrackAppUsageEvent( ISteamUser* lpSteamUser, CGameID* gameId, uint32_t eAppUsageEvent, const char* pchExtraInfo ) {
lpSteamUser->TrackAppUsageEvent( *gameId, eAppUsageEvent, pchExtraInfo ); lpSteamUser->TrackAppUsageEvent( *gameId, eAppUsageEvent, pchExtraInfo );
} }
// get the local storage folder for current Steam account to write application data, e.g. save games, configs etc. // get the local storage folder for current Steam account to write application data, e.g. save games, configs etc.
// this will usually be something like "C:\Progam Files\Steam\userdata\<SteamID>\<AppID>\local" // this will usually be something like "C:\Progam Files\Steam\userdata\<SteamID>\<AppID>\local"
DLL_FUNCTION(uint32_t) BS_ISteamUser_GetUserDataFolder( ISteamUser* lpSteamUser, char* pchBuffer, uint32_t cubBuffer ) { DLL(uint32_t) BS_ISteamUser_GetUserDataFolder( ISteamUser* lpSteamUser, char* pchBuffer, uint32_t cubBuffer ) {
return lpSteamUser->GetUserDataFolder( pchBuffer, cubBuffer ); return lpSteamUser->GetUserDataFolder( pchBuffer, cubBuffer );
} }
// Starts voice recording. Once started, use GetVoice() to get the data // Starts voice recording. Once started, use GetVoice() to get the data
DLL_FUNCTION(void) BS_ISteamUser_StartVoiceRecording( ISteamUser* lpSteamUser ) { DLL(void) BS_ISteamUser_StartVoiceRecording( ISteamUser* lpSteamUser ) {
lpSteamUser->StartVoiceRecording( ); lpSteamUser->StartVoiceRecording( );
} }
// Stops voice recording. Because people often release push-to-talk keys early, the system will keep recording for // Stops voice recording. Because people often release push-to-talk keys early, the system will keep recording for
// a little bit after this function is called. GetVoice() should continue to be called until it returns // a little bit after this function is called. GetVoice() should continue to be called until it returns
// k_eVoiceResultNotRecording // k_eVoiceResultNotRecording
DLL_FUNCTION(void) BS_ISteamUser_StopVoiceRecording( ISteamUser* lpSteamUser ) { DLL(void) BS_ISteamUser_StopVoiceRecording( ISteamUser* lpSteamUser ) {
lpSteamUser->StopVoiceRecording( ); lpSteamUser->StopVoiceRecording( );
} }
@@ -99,7 +99,7 @@ DLL_FUNCTION(void) BS_ISteamUser_StopVoiceRecording( ISteamUser* lpSteamUser ) {
// levels of speech are detected. // levels of speech are detected.
// nUncompressedVoiceDesiredSampleRate is necessary to know the number of bytes to return in pcbUncompressed - can be set to 0 if you don't need uncompressed (the usual case) // nUncompressedVoiceDesiredSampleRate is necessary to know the number of bytes to return in pcbUncompressed - can be set to 0 if you don't need uncompressed (the usual case)
// If you're upgrading from an older Steamworks API, you'll want to pass in 11025 to nUncompressedVoiceDesiredSampleRate // If you're upgrading from an older Steamworks API, you'll want to pass in 11025 to nUncompressedVoiceDesiredSampleRate
DLL_FUNCTION(EVoiceResult) BS_ISteamUser_GetAvailableVoice( ISteamUser* lpSteamUser, uint32_t* pcbCompressed, uint32_t* pcbUncompressed, uint32_t nUncompressedVoiceDesiredSampleRate ) { DLL(EVoiceResult) BS_ISteamUser_GetAvailableVoice( ISteamUser* lpSteamUser, uint32_t* pcbCompressed, uint32_t* pcbUncompressed, uint32_t nUncompressedVoiceDesiredSampleRate ) {
return lpSteamUser->GetAvailableVoice( pcbCompressed, pcbUncompressed, nUncompressedVoiceDesiredSampleRate ); return lpSteamUser->GetAvailableVoice( pcbCompressed, pcbUncompressed, nUncompressedVoiceDesiredSampleRate );
} }
@@ -114,7 +114,7 @@ DLL_FUNCTION(EVoiceResult) BS_ISteamUser_GetAvailableVoice( ISteamUser* lpSteamU
// Matching data that is not read during this call will be thrown away. // Matching data that is not read during this call will be thrown away.
// GetAvailableVoice() can be used to determine how much data is actually available. // GetAvailableVoice() can be used to determine how much data is actually available.
// If you're upgrading from an older Steamworks API, you'll want to pass in 11025 to nUncompressedVoiceDesiredSampleRate // If you're upgrading from an older Steamworks API, you'll want to pass in 11025 to nUncompressedVoiceDesiredSampleRate
DLL_FUNCTION(EVoiceResult) BS_ISteamUser_GetVoice( ISteamUser* lpSteamUser, uint32_t bWantCompressed, void *pDestBuffer, uint32_t cbDestBufferSize, uint32_t *nBytesWritten, uint32_t bWantUncompressed, void *pUncompressedDestBuffer, uint32_t cbUncompressedDestBufferSize, uint32_t *nUncompressBytesWritten, uint32_t nUncompressedVoiceDesiredSampleRate ) { DLL(EVoiceResult) BS_ISteamUser_GetVoice( ISteamUser* lpSteamUser, uint32_t bWantCompressed, void *pDestBuffer, uint32_t cbDestBufferSize, uint32_t *nBytesWritten, uint32_t bWantUncompressed, void *pUncompressedDestBuffer, uint32_t cbUncompressedDestBufferSize, uint32_t *nUncompressBytesWritten, uint32_t nUncompressedVoiceDesiredSampleRate ) {
return lpSteamUser->GetVoice( bWantCompressed != 0, pDestBuffer, cbDestBufferSize, nBytesWritten, bWantUncompressed != 0, pUncompressedDestBuffer, cbUncompressedDestBufferSize, nUncompressBytesWritten, nUncompressedVoiceDesiredSampleRate ); return lpSteamUser->GetVoice( bWantCompressed != 0, pDestBuffer, cbDestBufferSize, nBytesWritten, bWantUncompressed != 0, pUncompressedDestBuffer, cbUncompressedDestBufferSize, nUncompressBytesWritten, nUncompressedVoiceDesiredSampleRate );
} }
@@ -124,53 +124,53 @@ DLL_FUNCTION(EVoiceResult) BS_ISteamUser_GetVoice( ISteamUser* lpSteamUser, uint
// data. The suggested buffer size for the destination buffer is 22 kilobytes. // data. The suggested buffer size for the destination buffer is 22 kilobytes.
// The output format of the data is 16-bit signed at the requested samples per second. // The output format of the data is 16-bit signed at the requested samples per second.
// If you're upgrading from an older Steamworks API, you'll want to pass in 11025 to nDesiredSampleRate // If you're upgrading from an older Steamworks API, you'll want to pass in 11025 to nDesiredSampleRate
DLL_FUNCTION(EVoiceResult) BS_ISteamUser_DecompressVoice( ISteamUser* lpSteamUser, const void *pCompressed, uint32_t cbCompressed, void *pDestBuffer, uint32_t cbDestBufferSize, uint32_t *nBytesWritten, uint32_t nDesiredSampleRate ) { DLL(EVoiceResult) BS_ISteamUser_DecompressVoice( ISteamUser* lpSteamUser, const void *pCompressed, uint32_t cbCompressed, void *pDestBuffer, uint32_t cbDestBufferSize, uint32_t *nBytesWritten, uint32_t nDesiredSampleRate ) {
return lpSteamUser->DecompressVoice( pCompressed, cbCompressed, pDestBuffer, cbDestBufferSize, nBytesWritten, nDesiredSampleRate ); return lpSteamUser->DecompressVoice( pCompressed, cbCompressed, pDestBuffer, cbDestBufferSize, nBytesWritten, nDesiredSampleRate );
} }
// This returns the frequency of the voice data as it's stored internally; calling DecompressVoice() with this size will yield the best results // This returns the frequency of the voice data as it's stored internally; calling DecompressVoice() with this size will yield the best results
DLL_FUNCTION(uint32_t) BS_ISteamUser_GetVoiceOptimalSampleRate( ISteamUser* lpSteamUser ) { DLL(uint32_t) BS_ISteamUser_GetVoiceOptimalSampleRate( ISteamUser* lpSteamUser ) {
return lpSteamUser->GetVoiceOptimalSampleRate( ); return lpSteamUser->GetVoiceOptimalSampleRate( );
} }
// Retrieve ticket to be sent to the entity who wishes to authenticate you. // Retrieve ticket to be sent to the entity who wishes to authenticate you.
// pcbTicket retrieves the length of the actual ticket. // pcbTicket retrieves the length of the actual ticket.
DLL_FUNCTION(HAuthTicket) BS_ISteamUser_GetAuthSessionTicket( ISteamUser* lpSteamUser, void* pTicket, uint32_t cbMaxTicket, uint32_t* pcbTicket ) { DLL(HAuthTicket) BS_ISteamUser_GetAuthSessionTicket( ISteamUser* lpSteamUser, void* pTicket, uint32_t cbMaxTicket, uint32_t* pcbTicket ) {
return lpSteamUser->GetAuthSessionTicket( pTicket, cbMaxTicket, pcbTicket ); return lpSteamUser->GetAuthSessionTicket( pTicket, cbMaxTicket, pcbTicket );
} }
// Authenticate ticket from entity steamID to be sure it is valid and isnt reused // Authenticate ticket from entity steamID to be sure it is valid and isnt reused
// Registers for callbacks if the entity goes offline or cancels the ticket ( see ValidateAuthTicketResponse_t callback and EAuthSessionResponse ) // Registers for callbacks if the entity goes offline or cancels the ticket ( see ValidateAuthTicketResponse_t callback and EAuthSessionResponse )
DLL_FUNCTION(EBeginAuthSessionResult) BS_ISteamUser_BeginAuthSession( ISteamUser* lpSteamUser, const void *pAuthTicket, uint32_t cbAuthTicket, CSteamID* steamID ) { DLL(EBeginAuthSessionResult) BS_ISteamUser_BeginAuthSession( ISteamUser* lpSteamUser, const void *pAuthTicket, uint32_t cbAuthTicket, CSteamID* steamID ) {
return lpSteamUser->BeginAuthSession( pAuthTicket, cbAuthTicket, *steamID ); return lpSteamUser->BeginAuthSession( pAuthTicket, cbAuthTicket, *steamID );
} }
// Stop tracking started by BeginAuthSession - called when no longer playing game with this entity // Stop tracking started by BeginAuthSession - called when no longer playing game with this entity
DLL_FUNCTION(void) BS_ISteamUser_EndAuthSession( ISteamUser* lpSteamUser, CSteamID* steamID ) { DLL(void) BS_ISteamUser_EndAuthSession( ISteamUser* lpSteamUser, CSteamID* steamID ) {
lpSteamUser->EndAuthSession( *steamID ); lpSteamUser->EndAuthSession( *steamID );
} }
// Cancel auth ticket from GetAuthSessionTicket, called when no longer playing game with the entity you gave the ticket to // Cancel auth ticket from GetAuthSessionTicket, called when no longer playing game with the entity you gave the ticket to
DLL_FUNCTION(void) BS_ISteamUser_CancelAuthTicket( ISteamUser* lpSteamUser, HAuthTicket hAuthTicket ) { DLL(void) BS_ISteamUser_CancelAuthTicket( ISteamUser* lpSteamUser, HAuthTicket hAuthTicket ) {
lpSteamUser->CancelAuthTicket( hAuthTicket ); lpSteamUser->CancelAuthTicket( hAuthTicket );
} }
// After receiving a user's authentication data, and passing it to BeginAuthSession, use this function // After receiving a user's authentication data, and passing it to BeginAuthSession, use this function
// to determine if the user owns downloadable content specified by the provided AppID. // to determine if the user owns downloadable content specified by the provided AppID.
DLL_FUNCTION(EUserHasLicenseForAppResult) BS_ISteamUser_UserHasLicenseForApp( ISteamUser* lpSteamUser, CSteamID* steamID, AppId_t appID ) { DLL(EUserHasLicenseForAppResult) BS_ISteamUser_UserHasLicenseForApp( ISteamUser* lpSteamUser, CSteamID* steamID, AppId_t appID ) {
return lpSteamUser->UserHasLicenseForApp( *steamID, appID ); return lpSteamUser->UserHasLicenseForApp( *steamID, appID );
} }
// returns true if this users looks like they are behind a NAT device. Only valid once the user has connected to steam // returns true if this users looks like they are behind a NAT device. Only valid once the user has connected to steam
// (i.e a SteamServersConnected_t has been issued) and may not catch all forms of NAT. // (i.e a SteamServersConnected_t has been issued) and may not catch all forms of NAT.
DLL_FUNCTION(uint32_t) BS_ISteamUser_IsBehindNAT( ISteamUser* lpSteamUser ) { DLL(uint32_t) BS_ISteamUser_IsBehindNAT( ISteamUser* lpSteamUser ) {
return lpSteamUser->BIsBehindNAT( ); return lpSteamUser->BIsBehindNAT( );
} }
// set data to be replicated to friends so that they can join your game // set data to be replicated to friends so that they can join your game
// CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client // CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client
// uint32 unIPServer, uint16 usPortServer - the IP address of the game server // uint32 unIPServer, uint16 usPortServer - the IP address of the game server
DLL_FUNCTION(void) BS_ISteamUser_AdvertiseGame( ISteamUser* lpSteamUser, CSteamID* steamIDGameServer, uint32_t unIPServer, uint16_t usPortServer ) { DLL(void) BS_ISteamUser_AdvertiseGame( ISteamUser* lpSteamUser, CSteamID* steamIDGameServer, uint32_t unIPServer, uint16_t usPortServer ) {
lpSteamUser->AdvertiseGame( *steamIDGameServer, unIPServer, usPortServer ); lpSteamUser->AdvertiseGame( *steamIDGameServer, unIPServer, usPortServer );
} }
@@ -178,24 +178,24 @@ DLL_FUNCTION(void) BS_ISteamUser_AdvertiseGame( ISteamUser* lpSteamUser, CSteamI
// pDataToInclude, cbDataToInclude will be encrypted into the ticket // pDataToInclude, cbDataToInclude will be encrypted into the ticket
// ( This is asynchronous, you must wait for the ticket to be completed by the server ) // ( This is asynchronous, you must wait for the ticket to be completed by the server )
//CALL_RESULT( EncryptedAppTicketResponse_t ) //CALL_RESULT( EncryptedAppTicketResponse_t )
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamUser_RequestEncryptedAppTicket( ISteamUser* lpSteamUser, void* pDataToInclude, uint32_t cbDataToInclude ) { DLL(SteamAPICall_t*) BS_ISteamUser_RequestEncryptedAppTicket( ISteamUser* lpSteamUser, void* pDataToInclude, uint32_t cbDataToInclude ) {
return new uint64_t(lpSteamUser->RequestEncryptedAppTicket( pDataToInclude, cbDataToInclude )); return new uint64_t(lpSteamUser->RequestEncryptedAppTicket( pDataToInclude, cbDataToInclude ));
} }
// retrieve a finished ticket // retrieve a finished ticket
DLL_FUNCTION(uint32_t) BS_ISteamUser_GetEncryptedAppTicket( ISteamUser* lpSteamUser, void *pTicket, uint32_t cbMaxTicket, uint32_t* pcbTicket ) { DLL(uint32_t) BS_ISteamUser_GetEncryptedAppTicket( ISteamUser* lpSteamUser, void *pTicket, uint32_t cbMaxTicket, uint32_t* pcbTicket ) {
return lpSteamUser->GetEncryptedAppTicket( pTicket, cbMaxTicket, pcbTicket ); return lpSteamUser->GetEncryptedAppTicket( pTicket, cbMaxTicket, pcbTicket );
} }
// Trading Card badges data access // Trading Card badges data access
// if you only have one set of cards, the series will be 1 // if you only have one set of cards, the series will be 1
// the user has can have two different badges for a series; the regular (max level 5) and the foil (max level 1) // the user has can have two different badges for a series; the regular (max level 5) and the foil (max level 1)
DLL_FUNCTION(uint32_t) BS_ISteamUser_GetGameBadgeLevel( ISteamUser* lpSteamUser, uint32_t nSeries, uint32_t bFoil ) { DLL(uint32_t) BS_ISteamUser_GetGameBadgeLevel( ISteamUser* lpSteamUser, uint32_t nSeries, uint32_t bFoil ) {
return lpSteamUser->GetGameBadgeLevel( nSeries, bFoil != 0 ); return lpSteamUser->GetGameBadgeLevel( nSeries, bFoil != 0 );
} }
// gets the Steam Level of the user, as shown on their profile // gets the Steam Level of the user, as shown on their profile
DLL_FUNCTION(uint32_t) BS_ISteamUser_GetPlayerSteamLevel( ISteamUser* lpSteamUser ) { DLL(uint32_t) BS_ISteamUser_GetPlayerSteamLevel( ISteamUser* lpSteamUser ) {
return lpSteamUser->GetPlayerSteamLevel( ); return lpSteamUser->GetPlayerSteamLevel( );
} }
@@ -209,6 +209,6 @@ DLL_FUNCTION(uint32_t) BS_ISteamUser_GetPlayerSteamLevel( ISteamUser* lpSteamUse
// or else immediately navigate to the result URL using a hidden browser window. // or else immediately navigate to the result URL using a hidden browser window.
// NOTE 2: The resulting authorization cookie has an expiration time of one day, // NOTE 2: The resulting authorization cookie has an expiration time of one day,
// so it would be a good idea to request and visit a new auth URL every 12 hours. // so it would be a good idea to request and visit a new auth URL every 12 hours.
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamUser_RequestStoreAuthURL( ISteamUser* lpSteamUser, const char* pchRedirectURL ) { DLL(SteamAPICall_t*) BS_ISteamUser_RequestStoreAuthURL( ISteamUser* lpSteamUser, const char* pchRedirectURL ) {
return new uint64_t(lpSteamUser->RequestStoreAuthURL( pchRedirectURL )); return new uint64_t(lpSteamUser->RequestStoreAuthURL( pchRedirectURL ));
} }
+44 -44
View File
@@ -19,55 +19,55 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Functions for accessing stats, achievements, and leaderboard information // Purpose: Functions for accessing stats, achievements, and leaderboard information
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
DLL_FUNCTION(ISteamUserStats*) BS_SteamUserStats() { DLL(ISteamUserStats*) BS_SteamUserStats() {
return SteamUserStats(); return SteamUserStats();
} }
// Ask the server to send down this user's data and achievements for this game // Ask the server to send down this user's data and achievements for this game
//CALL_BACK(UserStatsReceived_t) //CALL_BACK(UserStatsReceived_t)
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_RequestCurrentStats( ISteamUserStats* lpSteamUserStats ) { DLL(uint32_t) BS_ISteamUserStats_RequestCurrentStats( ISteamUserStats* lpSteamUserStats ) {
return lpSteamUserStats->RequestCurrentStats( ); return lpSteamUserStats->RequestCurrentStats( );
} }
// Data accessors // Data accessors
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetStat( ISteamUserStats* lpSteamUserStats, const char* pchName, int32_t* pData ) { DLL(uint32_t) BS_ISteamUserStats_GetStat( ISteamUserStats* lpSteamUserStats, const char* pchName, int32_t* pData ) {
return lpSteamUserStats->GetStat( pchName, pData ); return lpSteamUserStats->GetStat( pchName, pData );
} }
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetStatF( ISteamUserStats* lpSteamUserStats, const char* pchName, float_t* pData ) { DLL(uint32_t) BS_ISteamUserStats_GetStatF( ISteamUserStats* lpSteamUserStats, const char* pchName, float_t* pData ) {
return lpSteamUserStats->GetStat( pchName, pData ); return lpSteamUserStats->GetStat( pchName, pData );
} }
// Set / update data // Set / update data
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_SetStat( ISteamUserStats* lpSteamUserStats, const char* pchName, int32_t pData ) { DLL(uint32_t) BS_ISteamUserStats_SetStat( ISteamUserStats* lpSteamUserStats, const char* pchName, int32_t pData ) {
return lpSteamUserStats->SetStat( pchName, pData ); return lpSteamUserStats->SetStat( pchName, pData );
} }
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_SetStatF( ISteamUserStats* lpSteamUserStats, const char* pchName, float_t pData ) { DLL(uint32_t) BS_ISteamUserStats_SetStatF( ISteamUserStats* lpSteamUserStats, const char* pchName, float_t pData ) {
return lpSteamUserStats->SetStat( pchName, pData ); return lpSteamUserStats->SetStat( pchName, pData );
} }
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_UpdateAvgRateStat( ISteamUserStats* lpSteamUserStats, const char* pchName, float_t flCountThisSession, double_t* dSessionLength ) { DLL(uint32_t) BS_ISteamUserStats_UpdateAvgRateStat( ISteamUserStats* lpSteamUserStats, const char* pchName, float_t flCountThisSession, double_t* dSessionLength ) {
return lpSteamUserStats->UpdateAvgRateStat( pchName, flCountThisSession, *dSessionLength ); return lpSteamUserStats->UpdateAvgRateStat( pchName, flCountThisSession, *dSessionLength );
} }
// Achievement flag accessors // Achievement flag accessors
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetAchievement( ISteamUserStats* lpSteamUserStats, const char* pchName, bool* pbAchieved ) { DLL(uint32_t) BS_ISteamUserStats_GetAchievement( ISteamUserStats* lpSteamUserStats, const char* pchName, bool* pbAchieved ) {
return lpSteamUserStats->GetAchievement( pchName, (bool*)pbAchieved ); return lpSteamUserStats->GetAchievement( pchName, (bool*)pbAchieved );
} }
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_SetAchievement( ISteamUserStats* lpSteamUserStats, const char* pchName ) { DLL(uint32_t) BS_ISteamUserStats_SetAchievement( ISteamUserStats* lpSteamUserStats, const char* pchName ) {
return lpSteamUserStats->SetAchievement( pchName ); return lpSteamUserStats->SetAchievement( pchName );
} }
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_ClearAchievement( ISteamUserStats* lpSteamUserStats, const char* pchName ) { DLL(uint32_t) BS_ISteamUserStats_ClearAchievement( ISteamUserStats* lpSteamUserStats, const char* pchName ) {
return lpSteamUserStats->ClearAchievement( pchName ); return lpSteamUserStats->ClearAchievement( pchName );
} }
// Get the achievement status, and the time it was unlocked if unlocked. // Get the achievement status, and the time it was unlocked if unlocked.
// If the return value is true, but the unlock time is zero, that means it was unlocked before Steam // If the return value is true, but the unlock time is zero, that means it was unlocked before Steam
// began tracking achievement unlock times (December 2009). Time is seconds since January 1, 1970. // began tracking achievement unlock times (December 2009). Time is seconds since January 1, 1970.
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetAchievementAndUnlockTime( ISteamUserStats* lpSteamUserStats, const char* pchName, bool* pbAchieved, uint32_t* punUnlockTime ) { DLL(uint32_t) BS_ISteamUserStats_GetAchievementAndUnlockTime( ISteamUserStats* lpSteamUserStats, const char* pchName, bool* pbAchieved, uint32_t* punUnlockTime ) {
return lpSteamUserStats->GetAchievementAndUnlockTime( pchName, (bool*)pbAchieved, punUnlockTime ); return lpSteamUserStats->GetAchievementAndUnlockTime( pchName, (bool*)pbAchieved, punUnlockTime );
} }
@@ -78,7 +78,7 @@ DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetAchievementAndUnlockTime( ISteamUse
// uploaded has been rejected, either because they broke constraints // uploaded has been rejected, either because they broke constraints
// or were out of date. In this case the server sends back updated values. // or were out of date. In this case the server sends back updated values.
// The stats should be re-iterated to keep in sync. // The stats should be re-iterated to keep in sync.
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_StoreStats( ISteamUserStats* lpSteamUserStats ) { DLL(uint32_t) BS_ISteamUserStats_StoreStats( ISteamUserStats* lpSteamUserStats ) {
return lpSteamUserStats->StoreStats( ); return lpSteamUserStats->StoreStats( );
} }
@@ -88,31 +88,31 @@ DLL_FUNCTION(uint32_t) BS_ISteamUserStats_StoreStats( ISteamUserStats* lpSteamUs
// A return value of 0 may indicate we are still fetching data, and you can wait for the UserAchievementIconFetched_t callback // A return value of 0 may indicate we are still fetching data, and you can wait for the UserAchievementIconFetched_t callback
// which will notify you when the bits are ready. If the callback still returns zero, then there is no image set for the // which will notify you when the bits are ready. If the callback still returns zero, then there is no image set for the
// specified achievement. // specified achievement.
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetAchievementIcon( ISteamUserStats* lpSteamUserStats, const char* pchName ) { DLL(uint32_t) BS_ISteamUserStats_GetAchievementIcon( ISteamUserStats* lpSteamUserStats, const char* pchName ) {
return lpSteamUserStats->GetAchievementIcon( pchName ); return lpSteamUserStats->GetAchievementIcon( pchName );
} }
// Get general attributes for an achievement. Accepts the following keys: // Get general attributes for an achievement. Accepts the following keys:
// - "name" and "desc" for retrieving the localized achievement name and description (returned in UTF8) // - "name" and "desc" for retrieving the localized achievement name and description (returned in UTF8)
// - "hidden" for retrieving if an achievement is hidden (returns "0" when not hidden, "1" when hidden) // - "hidden" for retrieving if an achievement is hidden (returns "0" when not hidden, "1" when hidden)
DLL_FUNCTION(const char*) BS_ISteamUserStats_GetAchievementDisplayAttribute( ISteamUserStats* lpSteamUserStats, const char* pchName, const char* pchKey ) { DLL(const char*) BS_ISteamUserStats_GetAchievementDisplayAttribute( ISteamUserStats* lpSteamUserStats, const char* pchName, const char* pchKey ) {
return lpSteamUserStats->GetAchievementDisplayAttribute( pchName, pchKey ); return lpSteamUserStats->GetAchievementDisplayAttribute( pchName, pchKey );
} }
// Achievement progress - triggers an AchievementProgress callback, that is all. // Achievement progress - triggers an AchievementProgress callback, that is all.
// Calling this w/ N out of N progress will NOT set the achievement, the game must still do that. // Calling this w/ N out of N progress will NOT set the achievement, the game must still do that.
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_IndicateAchievementProgress( ISteamUserStats* lpSteamUserStats, const char* pchName, uint32_t nCurProgress, uint32_t nMaxProgress ) { DLL(uint32_t) BS_ISteamUserStats_IndicateAchievementProgress( ISteamUserStats* lpSteamUserStats, const char* pchName, uint32_t nCurProgress, uint32_t nMaxProgress ) {
return lpSteamUserStats->IndicateAchievementProgress( pchName, nCurProgress, nMaxProgress ); return lpSteamUserStats->IndicateAchievementProgress( pchName, nCurProgress, nMaxProgress );
} }
// Used for iterating achievements. In general games should not need these functions because they should have a // Used for iterating achievements. In general games should not need these functions because they should have a
// list of existing achievements compiled into them // list of existing achievements compiled into them
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetNumAchievements( ISteamUserStats* lpSteamUserStats ) { DLL(uint32_t) BS_ISteamUserStats_GetNumAchievements( ISteamUserStats* lpSteamUserStats ) {
return lpSteamUserStats->GetNumAchievements( ); return lpSteamUserStats->GetNumAchievements( );
} }
// Get achievement name iAchievement in [0,GetNumAchievements) // Get achievement name iAchievement in [0,GetNumAchievements)
DLL_FUNCTION(const char*) BS_ISteamUserStats_GetAchievementName( ISteamUserStats* lpSteamUserStats, uint32_t iAchievement ) { DLL(const char*) BS_ISteamUserStats_GetAchievementName( ISteamUserStats* lpSteamUserStats, uint32_t iAchievement ) {
return lpSteamUserStats->GetAchievementName( iAchievement ); return lpSteamUserStats->GetAchievementName( iAchievement );
} }
@@ -123,30 +123,30 @@ DLL_FUNCTION(const char*) BS_ISteamUserStats_GetAchievementName( ISteamUserStats
// if the other user has no stats, UserStatsReceived_t.m_eResult will be set to k_EResultFail // if the other user has no stats, UserStatsReceived_t.m_eResult will be set to k_EResultFail
// these stats won't be auto-updated; you'll need to call RequestUserStats() again to refresh any data // these stats won't be auto-updated; you'll need to call RequestUserStats() again to refresh any data
//CALL_RESULT(UserStatsReceived_t) //CALL_RESULT(UserStatsReceived_t)
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamUserStats_RequestUserStats( ISteamUserStats* lpSteamUserStats, CSteamID* steamIDUser ) { DLL(SteamAPICall_t*) BS_ISteamUserStats_RequestUserStats( ISteamUserStats* lpSteamUserStats, CSteamID* steamIDUser ) {
return new uint64_t( lpSteamUserStats->RequestUserStats( *steamIDUser ) ); return new uint64_t( lpSteamUserStats->RequestUserStats( *steamIDUser ) );
} }
// requests stat information for a user, usable after a successful call to RequestUserStats() // requests stat information for a user, usable after a successful call to RequestUserStats()
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetUserStat( ISteamUserStats* lpSteamUserStats, CSteamID* steamIDUser, const char* pchName, uint32_t* pData ) { DLL(uint32_t) BS_ISteamUserStats_GetUserStat( ISteamUserStats* lpSteamUserStats, CSteamID* steamIDUser, const char* pchName, uint32_t* pData ) {
return lpSteamUserStats->GetUserStat( *steamIDUser, pchName, (int32_t*)pData ); return lpSteamUserStats->GetUserStat( *steamIDUser, pchName, (int32_t*)pData );
} }
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetUserStatF( ISteamUserStats* lpSteamUserStats, CSteamID* steamIDUser, const char* pchName, float_t* pData ) { DLL(uint32_t) BS_ISteamUserStats_GetUserStatF( ISteamUserStats* lpSteamUserStats, CSteamID* steamIDUser, const char* pchName, float_t* pData ) {
return lpSteamUserStats->GetUserStat( *steamIDUser, pchName, pData ); return lpSteamUserStats->GetUserStat( *steamIDUser, pchName, pData );
} }
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetUserAchievement( ISteamUserStats* lpSteamUserStats, CSteamID* steamIDUser, const char* pchName, bool* pbAchieved ) { DLL(uint32_t) BS_ISteamUserStats_GetUserAchievement( ISteamUserStats* lpSteamUserStats, CSteamID* steamIDUser, const char* pchName, bool* pbAchieved ) {
return lpSteamUserStats->GetUserAchievement( *steamIDUser, pchName, (bool*)pbAchieved ); return lpSteamUserStats->GetUserAchievement( *steamIDUser, pchName, (bool*)pbAchieved );
} }
// See notes for GetAchievementAndUnlockTime above // See notes for GetAchievementAndUnlockTime above
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetUserAchievementAndUnlockTime( ISteamUserStats* lpSteamUserStats, CSteamID* steamIDUser, const char* pchName, bool* pbAchieved, uint32_t* punUnlockTime ) { DLL(uint32_t) BS_ISteamUserStats_GetUserAchievementAndUnlockTime( ISteamUserStats* lpSteamUserStats, CSteamID* steamIDUser, const char* pchName, bool* pbAchieved, uint32_t* punUnlockTime ) {
return lpSteamUserStats->GetUserAchievementAndUnlockTime( *steamIDUser, pchName, (bool*)pbAchieved, punUnlockTime ); return lpSteamUserStats->GetUserAchievementAndUnlockTime( *steamIDUser, pchName, (bool*)pbAchieved, punUnlockTime );
} }
// Reset stats // Reset stats
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_ResetAllStats( ISteamUserStats* lpSteamUserStats, uint32_t bAchievementsToo ) { DLL(uint32_t) BS_ISteamUserStats_ResetAllStats( ISteamUserStats* lpSteamUserStats, uint32_t bAchievementsToo ) {
return lpSteamUserStats->ResetAllStats( bAchievementsToo != 0 ); return lpSteamUserStats->ResetAllStats( bAchievementsToo != 0 );
} }
@@ -155,34 +155,34 @@ DLL_FUNCTION(uint32_t) BS_ISteamUserStats_ResetAllStats( ISteamUserStats* lpStea
// asks the Steam back-end for a leaderboard by name, and will create it if it's not yet // asks the Steam back-end for a leaderboard by name, and will create it if it's not yet
// This call is asynchronous, with the result returned in LeaderboardFindResult_t // This call is asynchronous, with the result returned in LeaderboardFindResult_t
//CALL_RESULT(LeaderboardFindResult_t) //CALL_RESULT(LeaderboardFindResult_t)
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamUserStats_FindOrCreateLeaderboard( ISteamUserStats* lpSteamUserStats, const char* pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType ) { DLL(SteamAPICall_t*) BS_ISteamUserStats_FindOrCreateLeaderboard( ISteamUserStats* lpSteamUserStats, const char* pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType ) {
return new uint64_t( lpSteamUserStats->FindOrCreateLeaderboard( pchLeaderboardName, eLeaderboardSortMethod, eLeaderboardDisplayType ) ); return new uint64_t( lpSteamUserStats->FindOrCreateLeaderboard( pchLeaderboardName, eLeaderboardSortMethod, eLeaderboardDisplayType ) );
} }
// as above, but won't create the leaderboard if it's not found // as above, but won't create the leaderboard if it's not found
// This call is asynchronous, with the result returned in LeaderboardFindResult_t // This call is asynchronous, with the result returned in LeaderboardFindResult_t
//CALL_RESULT(LeaderboardFindResult_t) //CALL_RESULT(LeaderboardFindResult_t)
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamUserStats_FindLeaderboard( ISteamUserStats* lpSteamUserStats, const char *pchLeaderboardName ) { DLL(SteamAPICall_t*) BS_ISteamUserStats_FindLeaderboard( ISteamUserStats* lpSteamUserStats, const char *pchLeaderboardName ) {
return new uint64_t( lpSteamUserStats->FindLeaderboard( pchLeaderboardName ) ); return new uint64_t( lpSteamUserStats->FindLeaderboard( pchLeaderboardName ) );
} }
// returns the name of a leaderboard // returns the name of a leaderboard
DLL_FUNCTION(const char*) BS_ISteamUserStats_GetLeaderboardName( ISteamUserStats* lpSteamUserStats, SteamLeaderboard_t* hSteamLeaderboard ) { DLL(const char*) BS_ISteamUserStats_GetLeaderboardName( ISteamUserStats* lpSteamUserStats, SteamLeaderboard_t* hSteamLeaderboard ) {
return lpSteamUserStats->GetLeaderboardName( *hSteamLeaderboard ); return lpSteamUserStats->GetLeaderboardName( *hSteamLeaderboard );
} }
// returns the total number of entries in a leaderboard, as of the last request // returns the total number of entries in a leaderboard, as of the last request
DLL_FUNCTION(int) BS_ISteamUserStats_GetLeaderboardEntryCount( ISteamUserStats* lpSteamUserStats, SteamLeaderboard_t* hSteamLeaderboard ) { DLL(int) BS_ISteamUserStats_GetLeaderboardEntryCount( ISteamUserStats* lpSteamUserStats, SteamLeaderboard_t* hSteamLeaderboard ) {
return lpSteamUserStats->GetLeaderboardEntryCount( *hSteamLeaderboard ); return lpSteamUserStats->GetLeaderboardEntryCount( *hSteamLeaderboard );
} }
// returns the sort method of the leaderboard // returns the sort method of the leaderboard
DLL_FUNCTION(ELeaderboardSortMethod) BS_ISteamUserStats_GetLeaderboardSortMethod( ISteamUserStats* lpSteamUserStats, SteamLeaderboard_t* hSteamLeaderboard ) { DLL(ELeaderboardSortMethod) BS_ISteamUserStats_GetLeaderboardSortMethod( ISteamUserStats* lpSteamUserStats, SteamLeaderboard_t* hSteamLeaderboard ) {
return lpSteamUserStats->GetLeaderboardSortMethod( *hSteamLeaderboard ); return lpSteamUserStats->GetLeaderboardSortMethod( *hSteamLeaderboard );
} }
// returns the display type of the leaderboard // returns the display type of the leaderboard
DLL_FUNCTION(ELeaderboardDisplayType) BS_ISteamUserStats_GetLeaderboardDisplayType( ISteamUserStats* lpSteamUserStats, SteamLeaderboard_t* hSteamLeaderboard ) { DLL(ELeaderboardDisplayType) BS_ISteamUserStats_GetLeaderboardDisplayType( ISteamUserStats* lpSteamUserStats, SteamLeaderboard_t* hSteamLeaderboard ) {
return lpSteamUserStats->GetLeaderboardDisplayType( *hSteamLeaderboard ); return lpSteamUserStats->GetLeaderboardDisplayType( *hSteamLeaderboard );
} }
@@ -195,7 +195,7 @@ DLL_FUNCTION(ELeaderboardDisplayType) BS_ISteamUserStats_GetLeaderboardDisplayTy
// e.g. DownloadLeaderboardEntries( hLeaderboard, k_ELeaderboardDataRequestGlobalAroundUser, -3, 3 ) will return 7 rows, 3 before the user, 3 after // e.g. DownloadLeaderboardEntries( hLeaderboard, k_ELeaderboardDataRequestGlobalAroundUser, -3, 3 ) will return 7 rows, 3 before the user, 3 after
// k_ELeaderboardDataRequestFriends requests all the rows for friends of the current user // k_ELeaderboardDataRequestFriends requests all the rows for friends of the current user
//CALL_RESULT(LeaderboardScoresDownloaded_t) //CALL_RESULT(LeaderboardScoresDownloaded_t)
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamUserStats_DownloadLeaderboardEntries( ISteamUserStats* lpSteamUserStats, SteamLeaderboard_t* hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd ) { DLL(SteamAPICall_t*) BS_ISteamUserStats_DownloadLeaderboardEntries( ISteamUserStats* lpSteamUserStats, SteamLeaderboard_t* hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd ) {
return new uint64_t( lpSteamUserStats->DownloadLeaderboardEntries( *hSteamLeaderboard, eLeaderboardDataRequest, nRangeStart, nRangeEnd ) ); return new uint64_t( lpSteamUserStats->DownloadLeaderboardEntries( *hSteamLeaderboard, eLeaderboardDataRequest, nRangeStart, nRangeEnd ) );
} }
///##### ///#####
@@ -204,7 +204,7 @@ DLL_FUNCTION(SteamAPICall_t*) BS_ISteamUserStats_DownloadLeaderboardEntries( ISt
// if a user doesn't have a leaderboard entry, they won't be included in the result // if a user doesn't have a leaderboard entry, they won't be included in the result
// a max of 100 users can be downloaded at a time, with only one outstanding call at a time // a max of 100 users can be downloaded at a time, with only one outstanding call at a time
//CALL_RESULT(LeaderboardScoresDownloaded_t) //CALL_RESULT(LeaderboardScoresDownloaded_t)
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamUserStats_DownloadLeaderboardEntriesForUsers( ISteamUserStats* lpSteamUserStats, SteamLeaderboard_t* hSteamLeaderboard, CSteamID* prgUsers, int cUsers ) { DLL(SteamAPICall_t*) BS_ISteamUserStats_DownloadLeaderboardEntriesForUsers( ISteamUserStats* lpSteamUserStats, SteamLeaderboard_t* hSteamLeaderboard, CSteamID* prgUsers, int cUsers ) {
return new uint64_t( lpSteamUserStats->DownloadLeaderboardEntriesForUsers( *hSteamLeaderboard, prgUsers, cUsers ) ); return new uint64_t( lpSteamUserStats->DownloadLeaderboardEntriesForUsers( *hSteamLeaderboard, prgUsers, cUsers ) );
} }
@@ -222,7 +222,7 @@ DLL_FUNCTION(SteamAPICall_t*) BS_ISteamUserStats_DownloadLeaderboardEntriesForUs
// ... // ...
// } // }
// once you've accessed all the entries, the data will be free'd, and the SteamLeaderboardEntries_t handle will become invalid // once you've accessed all the entries, the data will be free'd, and the SteamLeaderboardEntries_t handle will become invalid
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetDownloadedLeaderboardEntry( ISteamUserStats* lpSteamUserStats, SteamLeaderboardEntries_t* hSteamLeaderboardEntries, int index, LeaderboardEntry_t *pLeaderboardEntry, int32 *pDetails, int cDetailsMax ) { DLL(uint32_t) BS_ISteamUserStats_GetDownloadedLeaderboardEntry( ISteamUserStats* lpSteamUserStats, SteamLeaderboardEntries_t* hSteamLeaderboardEntries, int index, LeaderboardEntry_t *pLeaderboardEntry, int32 *pDetails, int cDetailsMax ) {
return lpSteamUserStats->GetDownloadedLeaderboardEntry( *hSteamLeaderboardEntries, index, pLeaderboardEntry, pDetails, cDetailsMax ); return lpSteamUserStats->GetDownloadedLeaderboardEntry( *hSteamLeaderboardEntries, index, pLeaderboardEntry, pDetails, cDetailsMax );
} }
@@ -231,7 +231,7 @@ DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetDownloadedLeaderboardEntry( ISteamU
// Details are extra game-defined information regarding how the user got that score // Details are extra game-defined information regarding how the user got that score
// pScoreDetails points to an array of int32's, cScoreDetailsCount is the number of int32's in the list // pScoreDetails points to an array of int32's, cScoreDetailsCount is the number of int32's in the list
//CALL_RESULT(LeaderboardScoreUploaded_t) //CALL_RESULT(LeaderboardScoreUploaded_t)
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamUserStats_UploadLeaderboardScore( ISteamUserStats* lpSteamUserStats, SteamLeaderboard_t* hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int32 nScore, const int32_t* pScoreDetails, int cScoreDetailsCount ) { DLL(SteamAPICall_t*) BS_ISteamUserStats_UploadLeaderboardScore( ISteamUserStats* lpSteamUserStats, SteamLeaderboard_t* hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int32 nScore, const int32_t* pScoreDetails, int cScoreDetailsCount ) {
return new uint64_t(lpSteamUserStats->UploadLeaderboardScore( *hSteamLeaderboard, eLeaderboardUploadScoreMethod, nScore, pScoreDetails, cScoreDetailsCount )); return new uint64_t(lpSteamUserStats->UploadLeaderboardScore( *hSteamLeaderboard, eLeaderboardUploadScoreMethod, nScore, pScoreDetails, cScoreDetailsCount ));
} }
@@ -239,14 +239,14 @@ DLL_FUNCTION(SteamAPICall_t*) BS_ISteamUserStats_UploadLeaderboardScore( ISteamU
// hContent is a handle to a piece of user generated content that was shared using ISteamUserRemoteStorage::FileShare(). // hContent is a handle to a piece of user generated content that was shared using ISteamUserRemoteStorage::FileShare().
// This call is asynchronous, with the result returned in LeaderboardUGCSet_t. // This call is asynchronous, with the result returned in LeaderboardUGCSet_t.
//CALL_RESULT(LeaderboardUGCSet_t) //CALL_RESULT(LeaderboardUGCSet_t)
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamUserStats_AttachLeaderboardUGC( ISteamUserStats* lpSteamUserStats, SteamLeaderboard_t* hSteamLeaderboard, UGCHandle_t* hUGC ) { DLL(SteamAPICall_t*) BS_ISteamUserStats_AttachLeaderboardUGC( ISteamUserStats* lpSteamUserStats, SteamLeaderboard_t* hSteamLeaderboard, UGCHandle_t* hUGC ) {
return new uint64_t( lpSteamUserStats->AttachLeaderboardUGC( *hSteamLeaderboard, *hUGC ) ); return new uint64_t( lpSteamUserStats->AttachLeaderboardUGC( *hSteamLeaderboard, *hUGC ) );
} }
// Retrieves the number of players currently playing your game (online + offline) // Retrieves the number of players currently playing your game (online + offline)
// This call is asynchronous, with the result returned in NumberOfCurrentPlayers_t // This call is asynchronous, with the result returned in NumberOfCurrentPlayers_t
//CALL_RESULT(NumberOfCurrentPlayers_t) //CALL_RESULT(NumberOfCurrentPlayers_t)
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamUserStats_GetNumberOfCurrentPlayers( ISteamUserStats* lpSteamUserStats ) { DLL(SteamAPICall_t*) BS_ISteamUserStats_GetNumberOfCurrentPlayers( ISteamUserStats* lpSteamUserStats ) {
return new uint64_t( lpSteamUserStats->GetNumberOfCurrentPlayers( ) ); return new uint64_t( lpSteamUserStats->GetNumberOfCurrentPlayers( ) );
} }
@@ -254,26 +254,26 @@ DLL_FUNCTION(SteamAPICall_t*) BS_ISteamUserStats_GetNumberOfCurrentPlayers( ISte
// for the game globally. // for the game globally.
// This call is asynchronous, with the result returned in GlobalAchievementPercentagesReady_t. // This call is asynchronous, with the result returned in GlobalAchievementPercentagesReady_t.
//CALL_RESULT(GlobalAchievementPercentagesReady_t) //CALL_RESULT(GlobalAchievementPercentagesReady_t)
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamUserStats_RequestGlobalAchievementPercentages( ISteamUserStats* lpSteamUserStats ) { DLL(SteamAPICall_t*) BS_ISteamUserStats_RequestGlobalAchievementPercentages( ISteamUserStats* lpSteamUserStats ) {
return new uint64_t( lpSteamUserStats->RequestGlobalAchievementPercentages( ) ); return new uint64_t( lpSteamUserStats->RequestGlobalAchievementPercentages( ) );
} }
// Get the info on the most achieved achievement for the game, returns an iterator index you can use to fetch // Get the info on the most achieved achievement for the game, returns an iterator index you can use to fetch
// the next most achieved afterwards. Will return -1 if there is no data on achievement // the next most achieved afterwards. Will return -1 if there is no data on achievement
// percentages (ie, you haven't called RequestGlobalAchievementPercentages and waited on the callback). // percentages (ie, you haven't called RequestGlobalAchievementPercentages and waited on the callback).
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetMostAchievedAchievementInfo( ISteamUserStats* lpSteamUserStats, char *pchName, uint32_t unNameBufLen, float *pflPercent, bool* pbAchieved ) { DLL(uint32_t) BS_ISteamUserStats_GetMostAchievedAchievementInfo( ISteamUserStats* lpSteamUserStats, char *pchName, uint32_t unNameBufLen, float *pflPercent, bool* pbAchieved ) {
return lpSteamUserStats->GetMostAchievedAchievementInfo( pchName, unNameBufLen, pflPercent, pbAchieved ); return lpSteamUserStats->GetMostAchievedAchievementInfo( pchName, unNameBufLen, pflPercent, pbAchieved );
} }
// Get the info on the next most achieved achievement for the game. Call this after GetMostAchievedAchievementInfo or another // Get the info on the next most achieved achievement for the game. Call this after GetMostAchievedAchievementInfo or another
// GetNextMostAchievedAchievementInfo call passing the iterator from the previous call. Returns -1 after the last // GetNextMostAchievedAchievementInfo call passing the iterator from the previous call. Returns -1 after the last
// achievement has been iterated. // achievement has been iterated.
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetNextMostAchievedAchievementInfo( ISteamUserStats* lpSteamUserStats, int iIteratorPrevious, char *pchName, uint32_t unNameBufLen, float *pflPercent, bool *pbAchieved ) { DLL(uint32_t) BS_ISteamUserStats_GetNextMostAchievedAchievementInfo( ISteamUserStats* lpSteamUserStats, int iIteratorPrevious, char *pchName, uint32_t unNameBufLen, float *pflPercent, bool *pbAchieved ) {
return lpSteamUserStats->GetNextMostAchievedAchievementInfo( iIteratorPrevious, pchName, unNameBufLen, pflPercent, pbAchieved ); return lpSteamUserStats->GetNextMostAchievedAchievementInfo( iIteratorPrevious, pchName, unNameBufLen, pflPercent, pbAchieved );
} }
// Returns the percentage of users who have achieved the specified achievement. // Returns the percentage of users who have achieved the specified achievement.
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetAchievementAchievedPercent( ISteamUserStats* lpSteamUserStats, const char *pchName, float *pflPercent ) { DLL(uint32_t) BS_ISteamUserStats_GetAchievementAchievedPercent( ISteamUserStats* lpSteamUserStats, const char *pchName, float *pflPercent ) {
return lpSteamUserStats->GetAchievementAchievedPercent( pchName, pflPercent ); return lpSteamUserStats->GetAchievementAchievedPercent( pchName, pflPercent );
} }
@@ -282,16 +282,16 @@ DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetAchievementAchievedPercent( ISteamU
// nHistoryDays specifies how many days of day-by-day history to retrieve in addition // nHistoryDays specifies how many days of day-by-day history to retrieve in addition
// to the overall totals. The limit is 60. // to the overall totals. The limit is 60.
//CALL_RESULT(GlobalStatsReceived_t) //CALL_RESULT(GlobalStatsReceived_t)
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamUserStats_RequestGlobalStats( ISteamUserStats* lpSteamUserStats, int nHistoryDays ) { DLL(SteamAPICall_t*) BS_ISteamUserStats_RequestGlobalStats( ISteamUserStats* lpSteamUserStats, int nHistoryDays ) {
return new uint64_t( lpSteamUserStats->RequestGlobalStats( nHistoryDays ) ); return new uint64_t( lpSteamUserStats->RequestGlobalStats( nHistoryDays ) );
} }
// Gets the lifetime totals for an aggregated stat // Gets the lifetime totals for an aggregated stat
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetGlobalStatL( ISteamUserStats* lpSteamUserStats, const char *pchStatName, int64* pData ) { DLL(uint32_t) BS_ISteamUserStats_GetGlobalStatL( ISteamUserStats* lpSteamUserStats, const char *pchStatName, int64* pData ) {
return lpSteamUserStats->GetGlobalStat( pchStatName, pData ); return lpSteamUserStats->GetGlobalStat( pchStatName, pData );
} }
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetGlobalStatD( ISteamUserStats* lpSteamUserStats, const char *pchStatName, double* pData ) { DLL(uint32_t) BS_ISteamUserStats_GetGlobalStatD( ISteamUserStats* lpSteamUserStats, const char *pchStatName, double* pData ) {
return lpSteamUserStats->GetGlobalStat( pchStatName, pData ); return lpSteamUserStats->GetGlobalStat( pchStatName, pData );
} }
@@ -299,10 +299,10 @@ DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetGlobalStatD( ISteamUserStats* lpSte
// So when called, pData[0] will be today, pData[1] will be yesterday, and pData[2] will be two days ago, // So when called, pData[0] will be today, pData[1] will be yesterday, and pData[2] will be two days ago,
// etc. cubData is the size in bytes of the pubData buffer. Returns the number of // etc. cubData is the size in bytes of the pubData buffer. Returns the number of
// elements actually set. // elements actually set.
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetGlobalStatHistoryL( ISteamUserStats* lpSteamUserStats, const char *pchStatName, int64 *pData, uint32_t cubData ) { DLL(uint32_t) BS_ISteamUserStats_GetGlobalStatHistoryL( ISteamUserStats* lpSteamUserStats, const char *pchStatName, int64 *pData, uint32_t cubData ) {
return lpSteamUserStats->GetGlobalStatHistory( pchStatName, pData, cubData ); return lpSteamUserStats->GetGlobalStatHistory( pchStatName, pData, cubData );
} }
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetGlobalStatHistoryD( ISteamUserStats* lpSteamUserStats, const char *pchStatName, double *pData, uint32_t cubData ) { DLL(uint32_t) BS_ISteamUserStats_GetGlobalStatHistoryD( ISteamUserStats* lpSteamUserStats, const char *pchStatName, double *pData, uint32_t cubData ) {
return lpSteamUserStats->GetGlobalStatHistory( pchStatName, pData, cubData ); return lpSteamUserStats->GetGlobalStatHistory( pchStatName, pData, cubData );
} }
+2 -2
View File
@@ -16,11 +16,11 @@
#include "BlitzSteam.h" #include "BlitzSteam.h"
DLL_FUNCTION(ISteamUtils*) BS_SteamUtils() { DLL(ISteamUtils*) BS_SteamUtils() {
return SteamUtils(); return SteamUtils();
} }
DLL_FUNCTION(ISteamUtils*) BS_SteamGameServerUtils() { DLL(ISteamUtils*) BS_SteamGameServerUtils() {
return SteamGameServerUtils(); return SteamGameServerUtils();
} }
+1 -1
View File
@@ -16,7 +16,7 @@
#include "BlitzSteam.h" #include "BlitzSteam.h"
DLL_FUNCTION(ISteamVideo*) BS_SteamVideo() { DLL(ISteamVideo*) BS_SteamVideo() {
return SteamVideo(); return SteamVideo();
} }