This commit is contained in:
Michael Fabian Dirks
2016-03-11 14:13:25 +01:00
parent 2bf8361797
commit a52326d80a
60 changed files with 2776 additions and 1059 deletions
+1
View File
@@ -16,6 +16,7 @@
#include "BlitzSteam.h"
#include <windows.h>
uint32_t WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
switch (fdwReason) {
case DLL_PROCESS_ATTACH:
+4 -19
View File
@@ -14,28 +14,13 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
BS_I
// Macros
//#define DLL_FUNCTION(type) extern "C" type __stdcall
#define DLL_FUNCTION(type) extern "C" __declspec(dllexport) type __stdcall
// Standard Library
#include <time.h>
#include <exception>
#include <stdexcept>
#include <memory>
// Platform specific: Windows
#include <windows.h>
// Steam
#include "SteamworksSDK/public/steam/steam_api.h"
#include "SteamworksSDK/public/steam/steam_gameserver.h"
#pragma once
#include "BlitzSteamInternal.h"
// Our Stuff
#include "Helpers/BlitzCallback.h"
#include "Helpers/BlitzPointer.h"
#include "Helpers/Memory.h"
#include "Types/BlitzCallback.h"
#include "Types/CSteamID.h"
#include "Types/Double.h"
#include "Types/Long.h"
#include "Types/Memory.h"
+51 -5
View File
@@ -156,12 +156,12 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="BlitzSteam.cpp" />
<ClCompile Include="Helpers\BlitzCallback.cpp" />
<ClCompile Include="Helpers\Helper.cpp" />
<ClCompile Include="Helpers\Memory.cpp" />
<ClCompile Include="Types\BlitzCallback.cpp" />
<ClCompile Include="Types\CSteamID.cpp" />
<ClCompile Include="Types\Double.cpp" />
<ClCompile Include="Types\Long.cpp" />
<ClCompile Include="Types\Memory.cpp" />
<ClCompile Include="Wrapper\Steam.cpp" />
<ClCompile Include="Wrapper\SteamAppList.cpp" />
<ClCompile Include="Wrapper\SteamApps.cpp" />
@@ -189,15 +189,61 @@
</ItemGroup>
<ItemGroup>
<ClInclude Include="BlitzSteam.h" />
<ClInclude Include="BlitzSteamInternal.h" />
<ClInclude Include="Helpers\BlitzPointer.h" />
<ClInclude Include="Helpers\BlitzCallback.h" />
<ClInclude Include="Helpers\Helper.h" />
<ClInclude Include="Helpers\Memory.h" />
<ClInclude Include="Types\BlitzCallback.h" />
<ClInclude Include="Types\CSteamID.h" />
<ClInclude Include="Types\Double.h" />
<ClInclude Include="Types\Long.h" />
<ClInclude Include="Types\Memory.h" />
</ItemGroup>
<Target Name="CopyResources" AfterTargets="Build">
<ItemGroup>
<None Include="Resources\BlitzSteam.bb" />
<None Include="Resources\BlitzSteam.ipf" />
<None Include="Resources\BlitzSteamUtility.bb" />
<None Include="Resources\Decls\BlitzSteam.decls" />
<None Include="Resources\Decls\BlitzSteam_BlitzCallback.decls" />
<None Include="Resources\Decls\BlitzSteam_CSteamID.decls" />
<None Include="Resources\Decls\BlitzSteam_Double.decls" />
<None Include="Resources\Decls\BlitzSteam_Long.decls" />
<None Include="Resources\Decls\BlitzSteam_Memory.decls" />
<None Include="Resources\Decls\BlitzSteam_Steam.decls" />
<None Include="Resources\Decls\BlitzSteam_SteamAppList.decls" />
<None Include="Resources\Decls\BlitzSteam_SteamApps.decls" />
<None Include="Resources\Decls\BlitzSteam_SteamClient.decls" />
<None Include="Resources\Decls\BlitzSteam_SteamController.decls" />
<None Include="Resources\Decls\BlitzSteam_SteamFriends.decls" />
<None Include="Resources\Decls\BlitzSteam_SteamGameServer.decls" />
<None Include="Resources\Decls\BlitzSteam_SteamGameServerStats.decls" />
<None Include="Resources\Decls\BlitzSteam_SteamHTMLSurface.decls" />
<None Include="Resources\Decls\BlitzSteam_SteamHTTP.decls" />
<None Include="Resources\Decls\BlitzSteam_SteamInventory.decls" />
<None Include="Resources\Decls\BlitzSteam_SteamMatchmaking.decls" />
<None Include="Resources\Decls\BlitzSteam_SteamMatchmakingServers.decls" />
<None Include="Resources\Decls\BlitzSteam_SteamMusic.decls" />
<None Include="Resources\Decls\BlitzSteam_SteamMusicRemote.decls" />
<None Include="Resources\Decls\BlitzSteam_SteamNetworking.decls" />
<None Include="Resources\Decls\BlitzSteam_SteamRemoteStorage.decls" />
<None Include="Resources\Decls\BlitzSteam_SteamScreenshots.decls" />
<None Include="Resources\Decls\BlitzSteam_SteamUGC.decls" />
<None Include="Resources\Decls\BlitzSteam_SteamUnifiedMessages.decls" />
<None Include="Resources\Decls\BlitzSteam_SteamUser.decls" />
<None Include="Resources\Decls\BlitzSteam_SteamUserStats.decls" />
<None Include="Resources\Decls\BlitzSteam_SteamUtils.decls" />
<None Include="Resources\Decls\BlitzSteam_SteamVideo.decls" />
<None Include="Resources\Examples\SteamAPI_Example.bb" />
<None Include="Resources\Examples\SteamAppList_Example.bb" />
<None Include="Resources\Examples\SteamApps_Example.bb" />
<None Include="Resources\Examples\SteamController_Example.bb" />
<None Include="Resources\Examples\SteamHTMLSurface_Example.bb" />
<None Include="Resources\BlitzSteam.LICENSE" />
<None Include="Resources\BlitzSteam.LICENSE.lesser" />
</ItemGroup>
<ItemGroup>
<Text Include="Resources\Examples\steam_appid.txt" />
</ItemGroup>
<Target Name="CopyResources" BeforeTargets="Build">
<ItemGroup>
<Resources Include="$(ProjectDir)\Resources\**\*.*" />
<Resources Include="$(ProjectDir)\SteamworksSDK\redistributable_bin\steam_api.dll" />
+149 -12
View File
@@ -24,6 +24,15 @@
<Filter Include="Header Files\Types">
<UniqueIdentifier>{812e0ab3-866c-4b15-ae9d-a24d92b05c9a}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{65d7146d-e626-44dd-bd9e-525ea8e9252f}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files\Examples">
<UniqueIdentifier>{65e28d96-6d00-47b5-8211-0cf2753aef67}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files\Decls">
<UniqueIdentifier>{59a50312-f52e-475b-9362-7cbb22381620}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Wrapper\SteamClient.cpp">
@@ -101,12 +110,6 @@
<ClCompile Include="Wrapper\SteamMatchmakingServers.cpp">
<Filter>Source Files\Wrapper</Filter>
</ClCompile>
<ClCompile Include="Helpers\Memory.cpp">
<Filter>Source Files\Helpers</Filter>
</ClCompile>
<ClCompile Include="Helpers\BlitzCallback.cpp">
<Filter>Source Files\Helpers</Filter>
</ClCompile>
<ClCompile Include="Types\Long.cpp">
<Filter>Source Files\Types</Filter>
</ClCompile>
@@ -119,23 +122,23 @@
<ClCompile Include="Wrapper\Steam.cpp">
<Filter>Source Files\Wrapper</Filter>
</ClCompile>
<ClCompile Include="Types\BlitzCallback.cpp">
<Filter>Source Files\Types</Filter>
</ClCompile>
<ClCompile Include="Types\Memory.cpp">
<Filter>Source Files\Types</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="BlitzSteam.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Helpers\BlitzCallback.h">
<Filter>Header Files\Helpers</Filter>
</ClInclude>
<ClInclude Include="Helpers\BlitzPointer.h">
<Filter>Header Files\Helpers</Filter>
</ClInclude>
<ClInclude Include="Helpers\Helper.h">
<Filter>Header Files\Helpers</Filter>
</ClInclude>
<ClInclude Include="Helpers\Memory.h">
<Filter>Header Files\Helpers</Filter>
</ClInclude>
<ClInclude Include="Types\Long.h">
<Filter>Header Files\Types</Filter>
</ClInclude>
@@ -145,6 +148,15 @@
<ClInclude Include="Types\CSteamID.h">
<Filter>Header Files\Types</Filter>
</ClInclude>
<ClInclude Include="Types\BlitzCallback.h">
<Filter>Header Files\Types</Filter>
</ClInclude>
<ClInclude Include="Types\Memory.h">
<Filter>Header Files\Types</Filter>
</ClInclude>
<ClInclude Include="BlitzSteamInternal.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="$(ProjectDir)\Blitz\*.*" />
@@ -161,5 +173,130 @@
<None Include="$(ProjectDir)\Blitz\**\*.*" />
<None Include="$(ProjectDir)\Blitz\**\*.*" />
<None Include="$(ProjectDir)\Blitz\**\*.*" />
<None Include="Resources\BlitzSteam.bb">
<Filter>Resource Files</Filter>
</None>
<None Include="Resources\BlitzSteamUtility.bb">
<Filter>Resource Files</Filter>
</None>
<None Include="Resources\BlitzSteam.ipf">
<Filter>Resource Files</Filter>
</None>
<None Include="Resources\Examples\SteamAPI_Example.bb">
<Filter>Resource Files\Examples</Filter>
</None>
<None Include="Resources\Examples\SteamAppList_Example.bb">
<Filter>Resource Files\Examples</Filter>
</None>
<None Include="Resources\Examples\SteamApps_Example.bb">
<Filter>Resource Files\Examples</Filter>
</None>
<None Include="Resources\Examples\SteamController_Example.bb">
<Filter>Resource Files\Examples</Filter>
</None>
<None Include="Resources\Examples\SteamHTMLSurface_Example.bb">
<Filter>Resource Files\Examples</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam_BlitzCallback.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam_CSteamID.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam_Double.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam_Long.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam_Memory.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam_Steam.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam_SteamAppList.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam_SteamApps.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam_SteamClient.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam_SteamController.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam_SteamFriends.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam_SteamGameServer.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam_SteamGameServerStats.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam_SteamHTMLSurface.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam_SteamHTTP.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam_SteamInventory.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam_SteamMatchmaking.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam_SteamMatchmakingServers.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam_SteamMusic.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam_SteamMusicRemote.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam_SteamNetworking.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam_SteamRemoteStorage.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam_SteamScreenshots.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam_SteamUGC.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam_SteamUnifiedMessages.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam_SteamUser.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam_SteamUserStats.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam_SteamUtils.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\Decls\BlitzSteam_SteamVideo.decls">
<Filter>Resource Files\Decls</Filter>
</None>
<None Include="Resources\BlitzSteam.LICENSE">
<Filter>Resource Files</Filter>
</None>
<None Include="Resources\BlitzSteam.LICENSE.lesser">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
<ItemGroup>
<Text Include="Resources\Examples\steam_appid.txt">
<Filter>Resource Files\Examples</Filter>
</Text>
</ItemGroup>
</Project>
+31
View File
@@ -0,0 +1,31 @@
// BlitzSteam - Steam wrapper for Blitz
// Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
// Macros
//#define DLL_FUNCTION(type) extern "C" type __stdcall
#define DLL_FUNCTION(type) extern "C" __declspec(dllexport) type __stdcall
// C/C++ Includes
#include <math.h>
#include <stddef.h>
#include <float.h>
#include <inttypes.h>
// Steam
#include "SteamworksSDK/public/steam/steam_api.h"
#include "SteamworksSDK/public/steam/steam_gameserver.h"
-195
View File
@@ -1,195 +0,0 @@
// BlitzSteam - Steam wrapper for Blitz
// Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "BlitzCallback.h"
std::map<uint32_t, size_t>* BlitzCallback_Sizes;
#define BlitzCallback_Sizes_Add(T) BlitzCallback_Sizes->emplace(T::k_iCallback, sizeof(T))
void BlitzCallback_Init() {
BlitzCallback_Sizes = new std::map<uint32_t, size_t>();
BlitzCallback_Sizes->emplace(0, sizeof(BlitzCallback));
// SteamAPI
// SteamAppList
BlitzCallback_Sizes_Add(SteamAppInstalled_t);
BlitzCallback_Sizes_Add(SteamAppUninstalled_t);
// SteamApps
BlitzCallback_Sizes_Add(DlcInstalled_t);
BlitzCallback_Sizes_Add(RegisterActivationCodeResponse_t);
BlitzCallback_Sizes_Add(AppProofOfPurchaseKeyResponse_t);
BlitzCallback_Sizes_Add(NewLaunchQueryParameters_t);
// SteamController
// SteamFriends
BlitzCallback_Sizes_Add(PersonaStateChange_t);
BlitzCallback_Sizes_Add(GameOverlayActivated_t);
BlitzCallback_Sizes_Add(GameServerChangeRequested_t);
BlitzCallback_Sizes_Add(GameLobbyJoinRequested_t);
BlitzCallback_Sizes_Add(AvatarImageLoaded_t);
BlitzCallback_Sizes_Add(ClanOfficerListResponse_t);
BlitzCallback_Sizes_Add(FriendRichPresenceUpdate_t);
BlitzCallback_Sizes_Add(GameRichPresenceJoinRequested_t);
BlitzCallback_Sizes_Add(GameConnectedClanChatMsg_t);
BlitzCallback_Sizes_Add(GameConnectedChatJoin_t);
BlitzCallback_Sizes_Add(GameConnectedChatLeave_t);
BlitzCallback_Sizes_Add(DownloadClanActivityCountsResult_t);
BlitzCallback_Sizes_Add(JoinClanChatRoomCompletionResult_t);
BlitzCallback_Sizes_Add(GameConnectedFriendChatMsg_t);
BlitzCallback_Sizes_Add(FriendsGetFollowerCount_t);
BlitzCallback_Sizes_Add(FriendsIsFollowing_t);
BlitzCallback_Sizes_Add(FriendsEnumerateFollowingList_t);
BlitzCallback_Sizes_Add(SetPersonaNameResponse_t);
// SteamGameServer
BlitzCallback_Sizes_Add(GSClientApprove_t);
BlitzCallback_Sizes_Add(GSClientDeny_t);
BlitzCallback_Sizes_Add(GSClientKick_t);
BlitzCallback_Sizes_Add(GSClientAchievementStatus_t);
BlitzCallback_Sizes_Add(GSPolicyResponse_t);
BlitzCallback_Sizes_Add(GSGameplayStats_t);
BlitzCallback_Sizes_Add(GSClientGroupStatus_t);
BlitzCallback_Sizes_Add(GSReputation_t);
BlitzCallback_Sizes_Add(AssociateWithClanResult_t);
BlitzCallback_Sizes_Add(ComputeNewPlayerCompatibilityResult_t);
// SteamGameServerStats
BlitzCallback_Sizes_Add(GSStatsReceived_t);
BlitzCallback_Sizes_Add(GSStatsStored_t);
BlitzCallback_Sizes_Add(GSStatsUnloaded_t);
// SteamHTMLSurface
BlitzCallback_Sizes_Add(HTML_BrowserReady_t);
}
BlitzCallback::BlitzCallback(BP_BlitzFunction3_t pFunctionPointer) {
this->m_pFunctionPointer = pFunctionPointer;
this->m_hSteamAPICall = 0;
this->m_iCallback = 0;
// Initialize BlitzCallback_Sizes
if (BlitzCallback_Sizes == 0)
BlitzCallback_Init();
}
BlitzCallback::~BlitzCallback() {
this->Unregister();
this->UnregisterResult();
}
int BlitzCallback::GetCallbackSizeBytes() {
return (BlitzCallback_Sizes->find(this->m_iCallback)->second);
}
void BlitzCallback::Run(void *pvParam) {
if (m_hSteamAPICall != 0)
m_hSteamAPICall = 0; // Caller unregisters for us.
BP_CallFunction3(m_pFunctionPointer, reinterpret_cast<int32_t>(pvParam), 0, 0);
}
void BlitzCallback::Run(void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall) {
if (m_hSteamAPICall != 0)
m_hSteamAPICall = 0; // Caller unregisters for us.
BP_CallFunction3(m_pFunctionPointer, reinterpret_cast<int32_t>(pvParam), (bIOFailure ? 0 : 1), reinterpret_cast<int32_t>(&hSteamAPICall));
}
bool BlitzCallback::IsRegistered() {
return (this->m_nCallbackFlags & this->k_ECallbackFlagsRegistered) != 0;
}
void BlitzCallback::Register(uint32_t iCallback) {
if (this->IsRegistered())
this->Unregister();
SteamAPI_RegisterCallback(this, iCallback);
}
void BlitzCallback::Unregister() {
if (this->IsRegistered())
SteamAPI_UnregisterCallback(this);
}
void BlitzCallback::RegisterResult(SteamAPICall_t hSteamAPICall, uint32_t iCallback) {
if (this->m_hSteamAPICall == 0)
this->UnregisterResult();
this->m_hSteamAPICall = hSteamAPICall;
this->m_iCallback = iCallback;
SteamAPI_RegisterCallResult(this, hSteamAPICall);
}
void BlitzCallback::UnregisterResult() {
if (this->m_hSteamAPICall != 0)
SteamAPI_UnregisterCallResult(this, this->m_hSteamAPICall);
this->m_hSteamAPICall = 0;
this->m_iCallback = 0;
}
bool BlitzCallback::IsGameServer() {
return (this->m_nCallbackFlags & this->k_ECallbackFlagsGameServer) != 0;
}
void BlitzCallback::SetGameServer(bool bIsGameServer) {
this->m_nCallbackFlags &= ~k_ECallbackFlagsGameServer;
if (bIsGameServer)
this->m_nCallbackFlags |= k_ECallbackFlagsGameServer;
}
// DLL-Callables
DLL_FUNCTION(BlitzCallback*) BS_Callback_Create(BP_BlitzFunction3_t pFunctionPointer) {
return new BlitzCallback(pFunctionPointer);
}
DLL_FUNCTION(void) BS_Callback_Destroy(BlitzCallback* pCallback) {
delete pCallback;
}
DLL_FUNCTION(int32_t) BS_Callback_IsRegistered(BlitzCallback* pCallback) {
return pCallback->IsRegistered();
}
DLL_FUNCTION(int32_t) BS_Callback_IsGameServer(BlitzCallback* pCallback) {
return pCallback->IsGameServer();
}
DLL_FUNCTION(int32_t) BS_Callback_SetGameServerFlag(BlitzCallback* pCallback, int32_t bIsGameServer) {
bool isGameServer = pCallback->IsGameServer();
pCallback->SetGameServer(!!bIsGameServer);
return isGameServer;
}
DLL_FUNCTION(void) BS_Callback_Register(BlitzCallback* pCallback, uint32_t iCallback) {
pCallback->Register(iCallback);
}
DLL_FUNCTION(void) BS_Callback_Unregister(BlitzCallback* pCallback) {
pCallback->Unregister();
}
DLL_FUNCTION(void) BS_Callback_RegisterResult(BlitzCallback* pCallback, SteamAPICall_t* pSteamAPICall, uint32_t iCallback) {
pCallback->RegisterResult(*pSteamAPICall, iCallback);
}
DLL_FUNCTION(void) BS_Callback_UnregisterResult(BlitzCallback* pCallback) {
pCallback->UnregisterResult();
}
+2 -1
View File
@@ -14,7 +14,8 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
BS_I
#pragma once
// Types of Blitz Functions.
typedef int32_t(__stdcall *BP_BlitzFunction0_t)();
typedef int32_t(__stdcall *BP_BlitzFunction1_t)(int32_t);
+62 -5
View File
@@ -24,10 +24,67 @@ DLL_FUNCTION(const char*) BS_Helper_FormatUnixTime(uint32_t unTime, const char*
delete tm;
return output;
}
DLL_FUNCTION(double_t*) BS_Helper_CreateDouble(float_t value) {
return new double_t(value);
}
DLL_FUNCTION(void) BS_Helper_DeleteDouble(double_t* pDouble) {
delete pDouble;
DLL_FUNCTION(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 iAreaX, uint32_t iAreaY, uint32_t iAreaW, uint32_t iAreaH) {
int8_t iMangleByte0 = static_cast<int8_t>((iMangling & 0xFF));
int8_t iMangleByte1 = static_cast<int8_t>((iMangling & 0xFF00) >> 8);
int8_t iMangleByte2 = static_cast<int8_t>((iMangling & 0xFF0000) >> 16);
int8_t iMangleByte3 = static_cast<int8_t>((iMangling & 0xFF000000) >> 24);
if (pSource > pDest) {
// Start at beginning
for (uint32_t iY = iAreaY; iY < (iAreaY + iAreaH); iY++) {
// Only do this once per loop
for (uint32_t iX = iAreaX; iX < (iAreaX + iAreaW); iX++) {
// Could technically optimize the following into single instructions, but this is fast enough for now.
uint32_t* pSourceOff = reinterpret_cast<uint32_t*>(pSource) + ((iSourceW * iY) + iX);
uint32_t* pDestOff = reinterpret_cast<uint32_t*>(pDest) + ((iDestW * iY) + iX);
// Allow Mangling using just a single integer and checking on the fly if it's positive or negative to branch out to the correct shift.
*pDestOff =
(iMangleByte0 > 0 ?
(*pSourceOff & 0xFF) >> iMangleByte0 :
(*pSourceOff & 0xFF) << -iMangleByte0)
+ (iMangleByte1 > 0 ?
(*pSourceOff & 0xFF00) >> iMangleByte1 :
(*pSourceOff & 0xFF00) << -iMangleByte1)
+ (iMangleByte2 > 0 ?
(*pSourceOff & 0xFF0000) >> iMangleByte2 :
(*pSourceOff & 0xFF0000) << -iMangleByte2)
+ (iMangleByte3 > 0 ?
(*pSourceOff & 0xFF000000) >> iMangleByte3 :
(*pSourceOff & 0xFF000000) << -iMangleByte3);
}
}
} else {
//ToDo, mirror the above. Instead of adding we subtract.
//// Start at end
//for (uint32_t iY = y + h; iY >= y; iY--) {
// pSourceOff = reinterpret_cast<uint32_t*>(pSource) + ((tw * iY) + x);
// pDestOff = reinterpret_cast<uint32_t*>(pDest) + ((tw * iY) + x);
// for (uint32_t iX = x + w; iX >= x; iX--) {
// *pDestOff =
// (iMangleByte0 > 0 ?
// (*pSourceOff & 0xFF) >> iMangleByte0 :
// (*pSourceOff & 0xFF) << -iMangleByte0)
// + (iMangleByte1 > 0 ?
// (*pSourceOff & 0xFF00) >> iMangleByte1 :
// (*pSourceOff & 0xFF00) << -iMangleByte1)
// + (iMangleByte2 > 0 ?
// (*pSourceOff & 0xFF0000) >> iMangleByte2 :
// (*pSourceOff & 0xFF0000) << -iMangleByte2)
// + (iMangleByte3 > 0 ?
// (*pSourceOff & 0xFF000000) >> iMangleByte3 :
// (*pSourceOff & 0xFF000000) << -iMangleByte3);
// // Above is some mangling magic i learned in some source code. Allows you to define a byte bit shift using a single integer.
// pSourceOff -= 1;
// pDestOff -= 1;
// }
//}
}
}
+3 -1
View File
@@ -14,6 +14,8 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
BS_I#include "BlitzSteam.h"
#pragma once
#include "BlitzSteam.h"
#include <time.h>
DLL_FUNCTION(const char*) BS_Helper_FormatUnixTime(uint32_t unTime, const char* pchFormat);
+347 -170
View File
@@ -398,6 +398,88 @@ Const BS_EFriendFlags_ChatMember = $1000
Const BS_EFriendFlags_All = $FFFF
;[End Block]
;[Block] Enumeration: EHTTPMethod
;------------------------------------------------------------------------------
;! Enumeration - EHTTPMethod
;------------------------------------------------------------------------------
; This enum is used in client API methods, do not re-number existing values.
Const BS_EHTTPMethod_Invalid = 0
Const BS_EHTTPMethod_GET = 1
Const BS_EHTTPMethod_HEAD = 2
Const BS_EHTTPMethod_POST = 3
Const BS_EHTTPMethod_PUT = 4
Const BS_EHTTPMethod_DELETE = 5
Const BS_EHTTPMethod_OPTIONS = 6
;Const BS_EHTTPMethod_TRACE = 7
;Const BS_EHTTPMethod_CONNECT = 8
;[End Block]
;[Block] Enumeration: EHTTPStatusCode
;------------------------------------------------------------------------------
;! Enumeration - EHTTPStatusCode
;------------------------------------------------------------------------------
; HTTP Status codes that the server can send in response to a request, see rfc2616 section 10.3 for descriptions
; of each of these.
; Invalid status code (this isn't defined in HTTP, used to indicate unset in our code)
Const BS_EHTTPStatusCode_Invalid = 0
; Informational codes
Const BS_EHTTPStatusCode_100Continue = 100
Const BS_EHTTPStatusCode_101SwitchingProtocols = 101
; Success codes
Const BS_EHTTPStatusCode_200OK = 200
Const BS_EHTTPStatusCode_201Created = 201
Const BS_EHTTPStatusCode_202Accepted = 202
Const BS_EHTTPStatusCode_203NonAuthoritative = 203
Const BS_EHTTPStatusCode_204NoContent = 204
Const BS_EHTTPStatusCode_205ResetContent = 205
Const BS_EHTTPStatusCode_206PartialContent = 206
; Redirection codes
Const BS_EHTTPStatusCode_300MultipleChoices = 300
Const BS_EHTTPStatusCode_301MovedPermanently = 301
Const BS_EHTTPStatusCode_302Found = 302
Const BS_EHTTPStatusCode_303SeeOther = 303
Const BS_EHTTPStatusCode_304NotModified = 304
Const BS_EHTTPStatusCode_305UseProxy = 305
;k_EHTTPStatusCode306Unused = 306, (used in old HTTP spec, now unused in 1.1)
Const BS_EHTTPStatusCode_307TemporaryRedirect = 307
; Error codes
Const BS_EHTTPStatusCode_400BadRequest = 400
Const BS_EHTTPStatusCode_401Unauthorized = 401 ; You probably want 403 or something else. 401 implies you're sending a WWW-Authenticate header and the client can sent an Authorization header in response.
Const BS_EHTTPStatusCode_402PaymentRequired = 402 ; This is reserved for future HTTP specs, not really supported by clients
Const BS_EHTTPStatusCode_403Forbidden = 403
Const BS_EHTTPStatusCode_404NotFound = 404
Const BS_EHTTPStatusCode_405MethodNotAllowed = 405
Const BS_EHTTPStatusCode_406NotAcceptable = 406
Const BS_EHTTPStatusCode_407ProxyAuthRequired = 407
Const BS_EHTTPStatusCode_408RequestTimeout = 408
Const BS_EHTTPStatusCode_409Conflict = 409
Const BS_EHTTPStatusCode_410Gone = 410
Const BS_EHTTPStatusCode_411LengthRequired = 411
Const BS_EHTTPStatusCode_412PreconditionFailed = 412
Const BS_EHTTPStatusCode_413RequestEntityTooLarge = 413
Const BS_EHTTPStatusCode_414RequestURITooLong = 414
Const BS_EHTTPStatusCode_415UnsupportedMediaType = 415
Const BS_EHTTPStatusCode_416RequestedRangeNotSatisfiable = 416
Const BS_EHTTPStatusCode_417ExpectationFailed = 417
Const BS_EHTTPStatusCode_4xxUnknown = 418 ; 418 is reserved, so we'll use it to mean unknown
Const BS_EHTTPStatusCode_429TooManyRequests = 429
; Server error codes
Const BS_EHTTPStatusCode_500InternalServerError = 500
Const BS_EHTTPStatusCode_501NotImplemented = 501
Const BS_EHTTPStatusCode_502BadGateway = 502
Const BS_EHTTPStatusCode_503ServiceUnavailable = 503
Const BS_EHTTPStatusCode_504GatewayTimeout = 504
Const BS_EHTTPStatusCode_505HTTPVersionNotSupported = 505
Const BS_EHTTPStatusCode_5xxUnknown = 599
;[End Block]
;[Block] Enumeration: EHTMLMouseButton
;------------------------------------------------------------------------------
;! Enumeration - EHTMLMouseButton
@@ -752,6 +834,19 @@ Const BS_ESteamControllerPad_Left = 0
Const BS_ESteamControllerPad_Right = 1
;[End Block]
;[Block] Enumeration: ESteamItemFlags
;------------------------------------------------------------------------------
;! Enumeration - ESteamItemFlags
;------------------------------------------------------------------------------
;// Item status flags - these flags are permanently attached to specific item instances
Const BS_ESteamItemFlags_NoTrade = 1 Shl 0 ;// This item is account-locked and cannot be traded or given away.
;// Action confirmation flags - these flags are set one time only, as part of a result set
Const BS_ESteamItemFlags_Removed = 1 Shl 8;// The item has been destroyed, traded away, expired, or otherwise invalidated
Const BS_ESteamItemFlags_Consumed = 1 Shl 9;// The item quantity has been decreased by 1 via ConsumeItem API.
;// All other flag bits are currently reserved for internal Steam use at this time.
;// Do not assume anything about the state of other flags which are not defined here.
;[End Block]
;[Block] Enumeration: ESteamUserStatType
;------------------------------------------------------------------------------
;! Enumeration - ESteamUserStatType
@@ -839,7 +934,7 @@ Const BS_EVoiceResult_ReceiverDidNotAnswer = 9
;//---------------------------------------------------------------------------------
;// Purpose: Sent when a new app is installed
;//---------------------------------------------------------------------------------
Const BS_AppList_AppInstalled = BS_ECallback_SteamAppListCallbacks + 1
Const BS_SteamAppList_AppInstalled = BS_ECallback_SteamAppListCallbacks + 1
;DEFINE_CALLBACK( SteamAppInstalled_t, k_iSteamAppListCallbacks + 1 );
; CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs
;END_DEFINE_CALLBACK_1()
@@ -847,7 +942,7 @@ Const BS_AppList_AppInstalled = BS_ECallback_SteamAppListCallbacks + 1
;//---------------------------------------------------------------------------------
;// Purpose: Sent when an app is uninstalled
;//---------------------------------------------------------------------------------
Const BS_AppList_AppUninstalled = BS_ECallback_SteamAppListCallbacks + 2
Const BS_SteamAppList_AppUninstalled = BS_ECallback_SteamAppListCallbacks + 2
;DEFINE_CALLBACK( SteamAppUninstalled_t, k_iSteamAppListCallbacks + 2 );
; CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs
;END_DEFINE_CALLBACK_1()
@@ -857,12 +952,12 @@ Const BS_AppList_AppUninstalled = BS_ECallback_SteamAppListCallbacks + 2
;------------------------------------------------------------------------------
;! Apps
;------------------------------------------------------------------------------
Const BS_Apps_AppProofOfPurchaseKeyMax = 64; // max bytes of a legacy cd key we support
Const BS_SteamApps_AppProofOfPurchaseKeyMax = 64; // max bytes of a legacy cd key we support
;//-----------------------------------------------------------------------------
;// Purpose: posted after the user gains ownership of DLC & that DLC is installed
;//-----------------------------------------------------------------------------
Const BS_Apps_DLCInstalled = BS_ECallback_SteamAppsCallbacks + 5
Const BS_SteamApps_DLCInstalled = BS_ECallback_SteamAppsCallbacks + 5
;struct DlcInstalled_t
;{
; enum { k_iCallback = k_iSteamAppsCallbacks + 5 };
@@ -872,7 +967,7 @@ Const BS_Apps_DLCInstalled = BS_ECallback_SteamAppsCallbacks + 5
;//-----------------------------------------------------------------------------
;// Purpose: response to RegisterActivationCode()
;//-----------------------------------------------------------------------------
Const BS_Apps_RegisterActivationCodeResponse = BS_ECallback_SteamAppsCallbacks + 8
Const BS_SteamApps_RegisterActivationCodeResponse = BS_ECallback_SteamAppsCallbacks + 8
;;struct RegisterActivationCodeResponse_t
;{
; enum { k_iCallback = k_iSteamAppsCallbacks + 8 };
@@ -883,7 +978,7 @@ Const BS_Apps_RegisterActivationCodeResponse = BS_ECallback_SteamAppsCallback
;//-----------------------------------------------------------------------------
;// Purpose: response to RegisterActivationCode()
;//-----------------------------------------------------------------------------
Const BS_Apps_AppProofOfPurchaseKeyResponse = BS_ECallback_SteamAppsCallbacks + 13
Const BS_SteamApps_AppProofOfPurchaseKeyResponse = BS_ECallback_SteamAppsCallbacks + 13
;struct AppProofOfPurchaseKeyResponse_t
;{
; enum { k_iCallback = k_iSteamAppsCallbacks + 13 };
@@ -898,7 +993,7 @@ Const BS_Apps_AppProofOfPurchaseKeyResponse = BS_ECallback_SteamAppsCallback
;// while the game is already running. The new params can be queried
;// with GetLaunchQueryParam.
;//---------------------------------------------------------------------------------
Const BS_Apps_NewLaunchQueryParameters = BS_ECallback_SteamAppsCallbacks + 14
Const BS_SteamApps_NewLaunchQueryParameters = BS_ECallback_SteamAppsCallbacks + 14
;struct NewLaunchQueryParameters_t
;{
; enum { k_iCallback = k_iSteamAppsCallbacks + 14 };
@@ -909,31 +1004,31 @@ Const BS_Apps_NewLaunchQueryParameters = BS_ECallback_SteamAppsCallbacks +
;------------------------------------------------------------------------------
;! Client
;------------------------------------------------------------------------------
Const BS_Client_SteamAccountIDMask = $FFFFFFFF
Const BS_Client_SteamAccountInstanceMask = $0000FFFF
Const BS_Client_SteamUserDesktopInstance = 1
Const BS_Client_SteamUserConsoleInstance = 2
Const BS_Client_SteamUserWebInstance = 4
Const BS_SteamClient_SteamAccountIDMask = $FFFFFFFF
Const BS_SteamClient_SteamAccountInstanceMask = $0000FFFF
Const BS_SteamClient_SteamUserDesktopInstance = 1
Const BS_SteamClient_SteamUserConsoleInstance = 2
Const BS_SteamClient_SteamUserWebInstance = 4
; generic invalid CSteamID
Global BS_Client_SteamIDNil = BS_CSteamID_New()
Global BS_SteamClient_SteamIDNil = BS_CSteamID_New()
; This steamID comes from a user game connection to an out of date GS that hasnt implemented the protocol
; to provide its steamID
Global BS_Client_SteamIDOutOfDateGS = BS_CSteamID_FromIDInstance(0, 0, BS_EUniverse_Invalid, BS_EAccountType_Invalid)
Global BS_SteamClient_SteamIDOutOfDateGS = BS_CSteamID_New_IdInstanceUniverseType(0, 0, BS_EUniverse_Invalid, BS_EAccountType_Invalid)
; This steamID comes from a user game connection to an sv_lan GS
Global BS_Client_SteamIDLanModeGS = BS_CSteamID_FromIDInstance(0, 0, BS_EUniverse_Public, BS_EAccountType_Invalid)
Global BS_SteamClient_SteamIDLanModeGS = BS_CSteamID_New_IdInstanceUniverseType(0, 0, BS_EUniverse_Public, BS_EAccountType_Invalid)
; This steamID can come from a user game connection to a GS that has just booted but hasnt yet even initialized
; its steam3 component and started logging on.
Global BS_Client_SteamIDNotInitYetGS = BS_CSteamID_FromIDInstance(1, 0, BS_EUniverse_Invalid, BS_EAccountType_Invalid)
Global BS_SteamClient_SteamIDNotInitYetGS = BS_CSteamID_New_IdInstanceUniverseType(1, 0, BS_EUniverse_Invalid, BS_EAccountType_Invalid)
; This steamID can come from a user game connection to a GS that isn't using the steam authentication system but still
; wants to support the "Join Game" option in the friends list
Global BS_Client_SteamIDNonSteamGS = BS_CSteamID_FromIDInstance(2, 0, BS_EUniverse_Invalid, BS_EAccountType_Invalid)
Global BS_SteamClient_SteamIDNonSteamGS = BS_CSteamID_New_IdInstanceUniverseType(2, 0, BS_EUniverse_Invalid, BS_EAccountType_Invalid)
; Constants used for query ports.
Const BS_Client_Query_Port_Not_Initialized = $FFFF ;We haven't asked the GS for this query port's actual value yet.
Const BS_Client_Query_Port_Error = $FFFE ;We were unable to get the query port for this server.
Const BS_SteamClient_Query_Port_Not_Initialized = $FFFF ;We haven't asked the GS for this query port's actual value yet.
Const BS_SteamClient_Query_Port_Error = $FFFE ;We were unable to get the query port for this server.
Const BS_Client_GameExtraInfoMax = 64
Const BS_SteamClient_GameExtraInfoMax = 64
;[End Block]
@@ -941,14 +1036,14 @@ Const BS_Client_GameExtraInfoMax = 64
;------------------------------------------------------------------------------
;! Controller
;------------------------------------------------------------------------------
Const BS_Controller_Max_Count = 16
Const BS_Controller_Max_Analog_Actions = 16
Const BS_Controller_Max_Digital_Actions = 128
Const BS_Controller_Max_Origins = 8
Const BS_SteamController_Max_Count = 16
Const BS_SteamController_Max_Analog_Actions = 16
Const BS_SteamController_Max_Digital_Actions = 128
Const BS_SteamController_Max_Origins = 8
;// When sending an option to a specific controller handle, you can send to all controllers via this command
Global BS_Controller_Handle_All_Controllers = BS_Long_FromII($FFFFFFFF, $FFFFFFFF)
Const BS_Controller_Min_Analog_Action_Data# = -1.0
Const BS_Controller_Max_Analog_Action_Data# = 1.0
Global BS_SteamController_Handle_All_Controllers = BS_Long_FromII($FFFFFFFF, $FFFFFFFF)
Const BS_SteamController_Min_Analog_Action_Data# = -1.0
Const BS_SteamController_Max_Analog_Action_Data# = 1.0
; Memory Structure: ControllerAnalogActionData_t
; Offs. Len Description
@@ -973,23 +1068,23 @@ Const BS_Controller_Max_Analog_Action_Data# = 1.0
;! Friends
;------------------------------------------------------------------------------
;// maximum length of friend group name (not including terminating nul!)
Const BS_Friends_MaxFriendsGroupName = 64
Const BS_SteamFriends_MaxFriendsGroupName = 64
;// maximum number of groups a single user is allowed
Const BS_Friends_FriendsGroupLimit = 100
Const BS_SteamFriends_FriendsGroupLimit = 100
;// invalid friends group identifier constant
Const BS_Friends_GroupID_Invalid = -1
Const BS_Friends_EnumerateFollowersMax = 50
Const BS_SteamFriends_GroupID_Invalid = -1
Const BS_SteamFriends_EnumerateFollowersMax = 50
;// maximum number of characters in a user's name. Two flavors; one for UTF-8 and one for UTF-16.
;// The UTF-8 version has to be very generous to accomodate characters that get large when encoded
;// in UTF-8.
Const BS_Friends_PersonaNameMax = 128
Const BS_Friends_PersonaNameMaxW = 32
Const BS_SteamFriends_PersonaNameMax = 128
Const BS_SteamFriends_PersonaNameMaxW = 32
;// size limit on chat room or member metadata
Const BS_Friends_ChatMetadataMax = 8192
Const BS_SteamFriends_ChatMetadataMax = 8192
;// size limits on Rich Presence data
Const BS_Friends_MaxRichPresenceKeys = 20
Const BS_Friends_MaxRichPresenceKeyLength = 64
Const BS_Friends_MaxRichPresenceValueLength = 256
Const BS_SteamFriends_MaxRichPresenceKeys = 20
Const BS_SteamFriends_MaxRichPresenceKeyLength = 64
Const BS_SteamFriends_MaxRichPresenceValueLength = 256
;// friend game played information
; Memory Structure: FriendGameInfo_t
@@ -1013,7 +1108,7 @@ Const BS_Friends_MaxRichPresenceValueLength = 256
;//-----------------------------------------------------------------------------
;// Purpose: called when a friends' status changes
;//-----------------------------------------------------------------------------
Const BS_Friends_PersonaStateChange = BS_ECallback_SteamFriendsCallbacks + 4
Const BS_SteamFriends_PersonaStateChange = BS_ECallback_SteamFriendsCallbacks + 4
;struct PersonaStateChange_t
;{
; enum { k_iCallback = k_iSteamFriendsCallbacks + 4 };
@@ -1026,7 +1121,7 @@ Const BS_Friends_PersonaStateChange = BS_ECallback_SteamFriendsCallbacks +
;// Purpose: posted when game overlay activates or deactivates
;// the game can use this to be pause or resume single player games
;//-----------------------------------------------------------------------------
Const BS_Friends_GameOverlayActivated = BS_ECallback_SteamFriendsCallbacks + 31
Const BS_SteamFriends_GameOverlayActivated = BS_ECallback_SteamFriendsCallbacks + 31
;struct GameOverlayActivated_t
;{
; enum { k_iCallback = k_iSteamFriendsCallbacks + 31 };
@@ -1037,7 +1132,7 @@ Const BS_Friends_GameOverlayActivated = BS_ECallback_SteamFriendsCallbacks
;// Purpose: called when the user tries to join a different game server from their friends list
;// game client should attempt to connect to specified server when this is received
;//-----------------------------------------------------------------------------
Const BS_Friends_GameServerChangeRequested = BS_ECallback_SteamFriendsCallbacks + 32
Const BS_SteamFriends_GameServerChangeRequested = BS_ECallback_SteamFriendsCallbacks + 32
;struct GameServerChangeRequested_t
;{
; enum { k_iCallback = k_iSteamFriendsCallbacks + 32 };
@@ -1049,7 +1144,7 @@ Const BS_Friends_GameServerChangeRequested = BS_ECallback_SteamFriendsCallba
;// Purpose: called when the user tries to join a lobby from their friends list
;// game client should attempt to connect to specified lobby when this is received
;//-----------------------------------------------------------------------------
Const BS_Friends_GameLobbyJoinRequested = BS_ECallback_SteamFriendsCallbacks + 33
Const BS_SteamFriends_GameLobbyJoinRequested = BS_ECallback_SteamFriendsCallbacks + 33
;struct GameLobbyJoinRequested_t
;{
; enum { k_iCallback = k_iSteamFriendsCallbacks + 33 };
@@ -1067,7 +1162,7 @@ Const BS_Friends_GameLobbyJoinRequested = BS_ECallback_SteamFriendsCallback
;// Purpose: called when an avatar is loaded in from a previous GetLargeFriendAvatar() call
;// if the image wasn't already available
;//-----------------------------------------------------------------------------
Const BS_Friends_AvatarImageLoaded = BS_ECallback_SteamFriendsCallbacks + 34
Const BS_SteamFriends_AvatarImageLoaded = BS_ECallback_SteamFriendsCallbacks + 34
;struct AvatarImageLoaded_t
;{
; enum { k_iCallback = k_iSteamFriendsCallbacks + 34 };
@@ -1080,7 +1175,7 @@ Const BS_Friends_AvatarImageLoaded = BS_ECallback_SteamFriendsCallbacks +
;//-----------------------------------------------------------------------------
;// Purpose: marks the return of a request officer list call
;//-----------------------------------------------------------------------------
Const BS_Friends_ClanOfficerListResponse = BS_ECallback_SteamFriendsCallbacks + 35
Const BS_SteamFriends_ClanOfficerListResponse = BS_ECallback_SteamFriendsCallbacks + 35
;struct ClanOfficerListResponse_t
;{
; enum { k_iCallback = k_iSteamFriendsCallbacks + 35 };
@@ -1092,7 +1187,7 @@ Const BS_Friends_ClanOfficerListResponse = BS_ECallback_SteamFriendsCallback
;//-----------------------------------------------------------------------------
;// Purpose: callback indicating updated data about friends rich presence information
;//-----------------------------------------------------------------------------
Const BS_Friends_FriendRichPresenceUpdate = BS_ECallback_SteamFriendsCallbacks + 36
Const BS_SteamFriends_FriendRichPresenceUpdate = BS_ECallback_SteamFriendsCallbacks + 36
;struct FriendRichPresenceUpdate_t
;{
; enum { k_iCallback = k_iSteamFriendsCallbacks + 36 };
@@ -1104,7 +1199,7 @@ Const BS_Friends_FriendRichPresenceUpdate = BS_ECallback_SteamFriendsCallbac
;// Purpose: called when the user tries to join a game from their friends list
;// rich presence will have been set with the "connect" key which is set here
;//-----------------------------------------------------------------------------
Const BS_Friends_GameRichPresenceJoinRequested = BS_ECallback_SteamFriendsCallbacks + 37
Const BS_SteamFriends_GameRichPresenceJoinRequested = BS_ECallback_SteamFriendsCallbacks + 37
;struct GameRichPresenceJoinRequested_t
;{
; enum { k_iCallback = k_iSteamFriendsCallbacks + 37 };
@@ -1115,7 +1210,7 @@ Const BS_Friends_GameRichPresenceJoinRequested = BS_ECallback_SteamFriendsCal
;//-----------------------------------------------------------------------------
;// Purpose: a chat message has been received for a clan chat the game has joined
;//-----------------------------------------------------------------------------
Const BS_Friends_GameConnectedClanChatMsg = BS_ECallback_SteamFriendsCallbacks + 38
Const BS_SteamFriends_GameConnectedClanChatMsg = BS_ECallback_SteamFriendsCallbacks + 38
;struct GameConnectedClanChatMsg_t
;{
; enum { k_iCallback = k_iSteamFriendsCallbacks + 38 };
@@ -1127,7 +1222,7 @@ Const BS_Friends_GameConnectedClanChatMsg = BS_ECallback_SteamFriendsCallbac
;//-----------------------------------------------------------------------------
;// Purpose: a user has joined a clan chat
;//-----------------------------------------------------------------------------
Const BS_Friends_GameConnectedChatJoin = BS_ECallback_SteamFriendsCallbacks + 39
Const BS_SteamFriends_GameConnectedChatJoin = BS_ECallback_SteamFriendsCallbacks + 39
;struct GameConnectedChatJoin_t
;{
; enum { k_iCallback = k_iSteamFriendsCallbacks + 39 };
@@ -1138,7 +1233,7 @@ Const BS_Friends_GameConnectedChatJoin = BS_ECallback_SteamFriendsCallbacks
;//-----------------------------------------------------------------------------
;// Purpose: a user has left the chat we're in
;//-----------------------------------------------------------------------------
Const BS_Friends_GameConnectedChatLeave = BS_ECallback_SteamFriendsCallbacks + 40
Const BS_SteamFriends_GameConnectedChatLeave = BS_ECallback_SteamFriendsCallbacks + 40
;struct GameConnectedChatLeave_t
;{
; enum { k_iCallback = k_iSteamFriendsCallbacks + 40 };
@@ -1151,7 +1246,7 @@ Const BS_Friends_GameConnectedChatLeave = BS_ECallback_SteamFriendsCallback
;//-----------------------------------------------------------------------------
;// Purpose: a DownloadClanActivityCounts() call has finished
;//-----------------------------------------------------------------------------
Const BS_Friends_DownloadClanActivityCountsResult = BS_ECallback_SteamFriendsCallbacks + 41
Const BS_SteamFriends_DownloadClanActivityCountsResult = BS_ECallback_SteamFriendsCallbacks + 41
;struct DownloadClanActivityCountsResult_t
;{
; enum { k_iCallback = k_iSteamFriendsCallbacks + 41 };
@@ -1161,7 +1256,7 @@ Const BS_Friends_DownloadClanActivityCountsResult = BS_ECallback_SteamFriendsC
;//-----------------------------------------------------------------------------
;// Purpose: a JoinClanChatRoom() call has finished
;//-----------------------------------------------------------------------------
Const BS_Friends_JoinClanChatRoomCompletionResult = BS_ECallback_SteamFriendsCallbacks + 42
Const BS_SteamFriends_JoinClanChatRoomCompletionResult = BS_ECallback_SteamFriendsCallbacks + 42
;struct JoinClanChatRoomCompletionResult_t
;{
; enum { k_iCallback = k_iSteamFriendsCallbacks + 42 };
@@ -1172,7 +1267,7 @@ Const BS_Friends_JoinClanChatRoomCompletionResult = BS_ECallback_SteamFriendsC
;//-----------------------------------------------------------------------------
;// Purpose: a chat message has been received from a user
;//-----------------------------------------------------------------------------
Const BS_Friends_GameConnectedFriendChatMsg = BS_ECallback_SteamFriendsCallbacks + 43
Const BS_SteamFriends_GameConnectedFriendChatMsg = BS_ECallback_SteamFriendsCallbacks + 43
;struct GameConnectedFriendChatMsg_t
;{
; enum { k_iCallback = k_iSteamFriendsCallbacks + 43 };
@@ -1180,7 +1275,7 @@ Const BS_Friends_GameConnectedFriendChatMsg = BS_ECallback_SteamFriendsCallb
; int m_iMessageID;
;};
Const BS_Friends_FriendsGetFollowerCount = BS_ECallback_SteamFriendsCallbacks + 44
Const BS_SteamFriends_FriendsGetFollowerCount = BS_ECallback_SteamFriendsCallbacks + 44
;struct FriendsGetFollowerCount_t
;{
; enum { k_iCallback = k_iSteamFriendsCallbacks + 44 };
@@ -1189,7 +1284,7 @@ Const BS_Friends_FriendsGetFollowerCount = BS_ECallback_SteamFriendsCallback
; int m_nCount;
;};
Const BS_Friends_FriendsIsFollowing = BS_ECallback_SteamFriendsCallbacks + 45
Const BS_SteamFriends_FriendsIsFollowing = BS_ECallback_SteamFriendsCallbacks + 45
;struct FriendsIsFollowing_t
;{
; enum { k_iCallback = k_iSteamFriendsCallbacks + 45 };
@@ -1198,7 +1293,7 @@ Const BS_Friends_FriendsIsFollowing = BS_ECallback_SteamFriendsCallbacks +
; bool m_bIsFollowing;
;};
Const BS_Friends_FriendsEnumerateFollowingList = BS_ECallback_SteamFriendsCallbacks + 46
Const BS_SteamFriends_FriendsEnumerateFollowingList = BS_ECallback_SteamFriendsCallbacks + 46
;struct FriendsEnumerateFollowingList_t
;{
; enum { k_iCallback = k_iSteamFriendsCallbacks + 46 };
@@ -1208,7 +1303,7 @@ Const BS_Friends_FriendsEnumerateFollowingList = BS_ECallback_SteamFriendsCal
; int32 m_nTotalResultCount;
;};
Const BS_Friends_SetPersonaNameResponse = BS_ECallback_SteamFriendsCallbacks + 47
Const BS_SteamFriends_SetPersonaNameResponse = BS_ECallback_SteamFriendsCallbacks + 47
;struct SetPersonaNameResponse_t
;{
; enum { k_iCallback = k_iSteamFriendsCallbacks + 47 };
@@ -1223,6 +1318,58 @@ Const BS_Friends_SetPersonaNameResponse = BS_ECallback_SteamFriendsCallback
;[Block] API: GameServer
;------------------------------------------------------------------------------
;! GameServer
;------------------------------------------------------------------------------
Const BS_SteamGameServer_MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE = $FFFF
;// client has been approved to connect to this game server
Const BS_SteamGameServer_GSClientApprove = BS_ECallback_SteamGameServerCallbacks + 1
;// client has been denied to connection to this game server
Const BS_SteamGameServer_GSClientDeny = BS_ECallback_SteamGameServerCallbacks + 2
;// request the game server should kick the user
Const BS_SteamGameServer_GSClientKick = BS_ECallback_SteamGameServerCallbacks + 3
;// client achievement info
Const BS_SteamGameServer_GSClientAchievementStatus = BS_ECallback_SteamGameServerCallbacks + 6
;// received when the game server requests to be displayed as secure (VAC protected)
;// m_bSecure is true if the game server should display itself as secure to users, false otherwise
Const BS_SteamGameServer_GSPolicyResponse = BS_ECallback_SteamUserCallbacks + 15
;// GS gameplay stats info
Const BS_SteamGameServer_GSGameplayStats = BS_ECallback_SteamGameServerCallbacks + 7
;// send as a reply to RequestUserGroupStatus()
Const BS_SteamGameServer_GSClientGroupStatus = BS_ECallback_SteamGameServerCallbacks + 8
;// Sent as a reply to GetServerReputation()
Const BS_SteamGameServer_GSReputation = BS_ECallback_SteamGameServerCallbacks + 9
;// Sent as a reply to AssociateWithClan()
Const BS_SteamGameServer_AssociateWithClanResult = BS_ECallback_SteamGameServerCallbacks + 10
;// Sent as a reply to ComputeNewPlayerCompatibility()
Const BS_SteamGameServer_ComputeNewPlayerCompatibilityResult = BS_ECallback_SteamGameServerCallbacks + 11
;[End Block]
;[Block] API: GameServerStats
;------------------------------------------------------------------------------
;! GameServerStats
;------------------------------------------------------------------------------
; Purpose: called when the latests stats and achievements have been received
; from the server
Const BS_SteamGameServerStats_GSStatsReceived = BS_ECallback_SteamUserStatsCallbacks
; Purpose: result of a request to store the user stats for a game
Const BS_SteamGameServerStats_GSStatsStored = BS_ECallback_SteamUserStatsCallbacks + 1
; Purpose: Callback indicating that a user's stats have been unloaded.
; Call RequestUserStats again to access stats for this user
Const BS_SteamGameServerStats_GSStatsUnloaded = BS_ECallback_SteamUserStatsCallbacks + 8
;[End Block]
;[Block] API: HTTP
;------------------------------------------------------------------------------
;! HTTP
;------------------------------------------------------------------------------
Const BS_SteamHTTP_INVALID_HTTPREQUEST_HANDLE = 0
Const BS_SteamHTTP_INVALID_HTTPCOOKIE_HANDLE = 0
Const BS_SteamHTTP_HTTPRequestCompleted = BS_ECallback_ClientHTTPCallbacks + 1
Const BS_SteamHTTP_HTTPRequestHeadersReceived = BS_ECallback_ClientHTTPCallbacks + 2
Const BS_SteamHTTP_HTTPRequestDataReceived = BS_ECallback_ClientHTTPCallbacks + 3
;[End Block]
@@ -1234,7 +1381,7 @@ Const BS_Friends_SetPersonaNameResponse = BS_ECallback_SteamFriendsCallback
;//-----------------------------------------------------------------------------
;// Purpose: The browser is ready for use
;//-----------------------------------------------------------------------------
;//-----------------------------------------------------------------------------
Const BS_SteamHTMLSurface_BrowserReady = BS_ECallback_SteamHTMLSurfaceCallbacks + 1
;DEFINE_CALLBACK( HTML_BrowserReady_t, k_iSteamHTMLSurfaceCallbacks + 1 )
;CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // this browser is now fully created and ready to navigate to pages
@@ -1242,7 +1389,7 @@ Const BS_HTMLSurface_BrowserReady = BS_ECallback_SteamHTMLSurfaceCallbacks
;//-----------------------------------------------------------------------------
;// Purpose: the browser has a pending paint
;//-----------------------------------------------------------------------------
;//-----------------------------------------------------------------------------
Const BS_SteamHTMLSurface_NeedsPaint = BS_ECallback_SteamHTMLSurfaceCallbacks + 2
;DEFINE_CALLBACK(HTML_NeedsPaint_t, k_iSteamHTMLSurfaceCallbacks + 2)
;CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the browser that needs the paint
@@ -1262,7 +1409,7 @@ Const BS_HTMLSurface_NeedsPaint = BS_ECallback_SteamHTMLSurfaceCallbacks
;//-----------------------------------------------------------------------------
;// Purpose: The browser wanted to navigate to a new page
;// NOTE - you MUST call AllowStartRequest in response to this callback
;//-----------------------------------------------------------------------------
;//-----------------------------------------------------------------------------
Const BS_SteamHTMLSurface_StartRequest = BS_ECallback_SteamHTMLSurfaceCallbacks + 3
;DEFINE_CALLBACK(HTML_StartRequest_t, k_iSteamHTMLSurfaceCallbacks + 3)
;CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the surface navigating
@@ -1274,7 +1421,7 @@ Const BS_HTMLSurface_StartRequest = BS_ECallback_SteamHTMLSurfaceCallbacks
;//-----------------------------------------------------------------------------
;// Purpose: The browser has been requested to close due to user interaction (usually from a javascript window.close() call)
;//-----------------------------------------------------------------------------
;//-----------------------------------------------------------------------------
Const BS_SteamHTMLSurface_CloseBrowser = BS_ECallback_SteamHTMLSurfaceCallbacks + 4
;DEFINE_CALLBACK(HTML_CloseBrowser_t, k_iSteamHTMLSurfaceCallbacks + 4)
;CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the surface
@@ -1282,7 +1429,7 @@ Const BS_HTMLSurface_CloseBrowser = BS_ECallback_SteamHTMLSurfaceCallbacks
;//-----------------------------------------------------------------------------
;// Purpose: the browser is navigating to a new url
;//-----------------------------------------------------------------------------
;//-----------------------------------------------------------------------------
Const BS_SteamHTMLSurface_URLChanged = BS_ECallback_SteamHTMLSurfaceCallbacks + 5
;DEFINE_CALLBACK( HTML_URLChanged_t, k_iSteamHTMLSurfaceCallbacks + 5 )
;CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface navigating
@@ -1295,7 +1442,7 @@ Const BS_HTMLSurface_URLChanged = BS_ECallback_SteamHTMLSurfaceCallbacks
;//-----------------------------------------------------------------------------
;// Purpose: A page is finished loading
;//-----------------------------------------------------------------------------
;//-----------------------------------------------------------------------------
Const BS_SteamHTMLSurface_FinishedRequest = BS_ECallback_SteamHTMLSurfaceCallbacks + 6
;DEFINE_CALLBACK( HTML_FinishedRequest_t, k_iSteamHTMLSurfaceCallbacks + 6 )
;CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the Handle of the surface
@@ -1305,7 +1452,7 @@ Const BS_HTMLSurface_FinishedRequest = BS_ECallback_SteamHTMLSurfaceCallbac
;//-----------------------------------------------------------------------------
;// Purpose: a request To load this url in a New tab
;//-----------------------------------------------------------------------------
;//-----------------------------------------------------------------------------
Const BS_SteamHTMLSurface_OpenLinkInNewTab = BS_ECallback_SteamHTMLSurfaceCallbacks + 7
;DEFINE_CALLBACK( HTML_OpenLinkInNewTab_t, k_iSteamHTMLSurfaceCallbacks + 7 )
;CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the Handle of the surface
@@ -1314,7 +1461,7 @@ Const BS_HTMLSurface_OpenLinkInNewTab = BS_ECallback_SteamHTMLSurfaceCallba
;//-----------------------------------------------------------------------------
;// Purpose: the page has a New title now
;//-----------------------------------------------------------------------------
;//-----------------------------------------------------------------------------
Const BS_SteamHTMLSurface_ChangedTitle = BS_ECallback_SteamHTMLSurfaceCallbacks + 8
;DEFINE_CALLBACK( HTML_ChangedTitle_t, k_iSteamHTMLSurfaceCallbacks + 8 )
;CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the Handle of the surface
@@ -1323,7 +1470,7 @@ Const BS_HTMLSurface_ChangedTitle = BS_ECallback_SteamHTMLSurfaceCallbacks
;//-----------------------------------------------------------------------------
;// Purpose: results from a search
;//-----------------------------------------------------------------------------
;//-----------------------------------------------------------------------------
Const BS_SteamHTMLSurface_SearchResults = BS_ECallback_SteamHTMLSurfaceCallbacks + 9
;DEFINE_CALLBACK( HTML_SearchResults_t, k_iSteamHTMLSurfaceCallbacks + 9 )
;CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the Handle of the surface
@@ -1333,7 +1480,7 @@ Const BS_HTMLSurface_SearchResults = BS_ECallback_SteamHTMLSurfaceCallback
;//-----------------------------------------------------------------------------
;// Purpose: page history status changed on the ability To go backwards And forward
;//-----------------------------------------------------------------------------
;//-----------------------------------------------------------------------------
Const BS_SteamHTMLSurface_CanGoBackAndForward = BS_ECallback_SteamHTMLSurfaceCallbacks + 10
;DEFINE_CALLBACK( HTML_CanGoBackAndForward_t, k_iSteamHTMLSurfaceCallbacks + 10 )
;CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the Handle of the surface
@@ -1343,7 +1490,7 @@ Const BS_HTMLSurface_CanGoBackAndForward = BS_ECallback_SteamHTMLSurfaceCall
;//-----------------------------------------------------------------------------
;// Purpose: details on the visibility And size of the horizontal scrollbar
;//-----------------------------------------------------------------------------
;//-----------------------------------------------------------------------------
Const BS_SteamHTMLSurface_HorizontalScroll = BS_ECallback_SteamHTMLSurfaceCallbacks + 11
;DEFINE_CALLBACK( HTML_HorizontalScroll_t, k_iSteamHTMLSurfaceCallbacks + 11 )
;CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the Handle of the surface
@@ -1356,7 +1503,7 @@ Const BS_HTMLSurface_HorizontalScroll = BS_ECallback_SteamHTMLSurfaceCallba
;//-----------------------------------------------------------------------------
;// Purpose: details on the visibility And size of the vertical scrollbar
;//-----------------------------------------------------------------------------
;//-----------------------------------------------------------------------------
Const BS_SteamHTMLSurface_VerticalScroll = BS_ECallback_SteamHTMLSurfaceCallbacks + 12
;DEFINE_CALLBACK( HTML_VerticalScroll_t, k_iSteamHTMLSurfaceCallbacks + 12 )
;CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the Handle of the surface
@@ -1369,7 +1516,7 @@ Const BS_HTMLSurface_VerticalScroll = BS_ECallback_SteamHTMLSurfaceCallbac
;//-----------------------------------------------------------------------------
;// Purpose: response To GetLinkAtPosition call
;//-----------------------------------------------------------------------------
;//-----------------------------------------------------------------------------
Const BS_SteamHTMLSurface_LinkAtPosition = BS_ECallback_SteamHTMLSurfaceCallbacks + 13
;DEFINE_CALLBACK( HTML_LinkAtPosition_t, k_iSteamHTMLSurfaceCallbacks + 13 )
;CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the Handle of the surface
@@ -1383,7 +1530,7 @@ Const BS_HTMLSurface_LinkAtPosition = BS_ECallback_SteamHTMLSurfaceCallbac
;//-----------------------------------------------------------------------------
;// Purpose: show a Javascript alert dialog, call JSDialogResponse
;// when the user dismisses this dialog (Or Right away To ignore it)
;//-----------------------------------------------------------------------------
;//-----------------------------------------------------------------------------
Const BS_SteamHTMLSurface_JSAlert = BS_ECallback_SteamHTMLSurfaceCallbacks + 14
;DEFINE_CALLBACK( HTML_JSAlert_t, k_iSteamHTMLSurfaceCallbacks + 14 )
;CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the Handle of the surface
@@ -1393,7 +1540,7 @@ Const BS_HTMLSurface_JSAlert = BS_ECallback_SteamHTMLSurfaceCallbacks + 1
;//-----------------------------------------------------------------------------
;// Purpose: show a Javascript confirmation dialog, call JSDialogResponse
;// when the user dismisses this dialog (Or Right away To ignore it)
;//-----------------------------------------------------------------------------
;//-----------------------------------------------------------------------------
Const BS_SteamHTMLSurface_JSConfirm = BS_ECallback_SteamHTMLSurfaceCallbacks + 15
;DEFINE_CALLBACK( HTML_JSConfirm_t, k_iSteamHTMLSurfaceCallbacks + 15 )
;CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the Handle of the surface
@@ -1403,7 +1550,7 @@ Const BS_HTMLSurface_JSConfirm = BS_ECallback_SteamHTMLSurfaceCallbacks +
;//-----------------------------------------------------------------------------
;// Purpose: when received show a file open dialog
;// Then call FileLoadDialogResponse with the file(s) the user selected.
;//-----------------------------------------------------------------------------
;//-----------------------------------------------------------------------------
Const BS_SteamHTMLSurface_FileOpenDialog = BS_ECallback_SteamHTMLSurfaceCallbacks + 16
;DEFINE_CALLBACK( HTML_FileOpenDialog_t, k_iSteamHTMLSurfaceCallbacks + 16 )
;CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the Handle of the surface
@@ -1413,7 +1560,7 @@ Const BS_HTMLSurface_FileOpenDialog = BS_ECallback_SteamHTMLSurfaceCallbac
;//-----------------------------------------------------------------------------
;// Purpose: a New html window has been created
;//-----------------------------------------------------------------------------
;//-----------------------------------------------------------------------------
Const BS_SteamHTMLSurface_NewWindow = BS_ECallback_SteamHTMLSurfaceCallbacks + 21
;DEFINE_CALLBACK( HTML_NewWindow_t, k_iSteamHTMLSurfaceCallbacks + 21 )
;CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the Handle of the current surface
@@ -1427,7 +1574,7 @@ Const BS_HTMLSurface_NewWindow = BS_ECallback_SteamHTMLSurfaceCallbacks +
;//-----------------------------------------------------------------------------
;// Purpose: change the cursor To display
;//-----------------------------------------------------------------------------
;//-----------------------------------------------------------------------------
Const BS_SteamHTMLSurface_SetCursor = BS_ECallback_SteamHTMLSurfaceCallbacks + 22
;DEFINE_CALLBACK( HTML_SetCursor_t, k_iSteamHTMLSurfaceCallbacks + 22 )
;CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the Handle of the surface
@@ -1436,7 +1583,7 @@ Const BS_HTMLSurface_SetCursor = BS_ECallback_SteamHTMLSurfaceCallbacks +
;//-----------------------------------------------------------------------------
;// Purpose: informational message from the browser
;//-----------------------------------------------------------------------------
;//-----------------------------------------------------------------------------
Const BS_SteamHTMLSurface_StatusText = BS_ECallback_SteamHTMLSurfaceCallbacks + 23
;DEFINE_CALLBACK( HTML_StatusText_t, k_iSteamHTMLSurfaceCallbacks + 23 )
;CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the Handle of the surface
@@ -1445,7 +1592,7 @@ Const BS_HTMLSurface_StatusText = BS_ECallback_SteamHTMLSurfaceCallbacks
;//-----------------------------------------------------------------------------
;// Purpose: show a tooltip
;//-----------------------------------------------------------------------------
;//-----------------------------------------------------------------------------
Const BS_SteamHTMLSurface_ShowToolTip = BS_ECallback_SteamHTMLSurfaceCallbacks + 24
;DEFINE_CALLBACK( HTML_ShowToolTip_t, k_iSteamHTMLSurfaceCallbacks + 24 )
;CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the Handle of the surface
@@ -1454,7 +1601,7 @@ Const BS_HTMLSurface_ShowToolTip = BS_ECallback_SteamHTMLSurfaceCallbacks
;//-----------------------------------------------------------------------------
;// Purpose: update the Text of an existing tooltip
;//-----------------------------------------------------------------------------
;//-----------------------------------------------------------------------------
Const BS_SteamHTMLSurface_UpdateToolTip = BS_ECallback_SteamHTMLSurfaceCallbacks + 25
;DEFINE_CALLBACK( HTML_UpdateToolTip_t, k_iSteamHTMLSurfaceCallbacks + 25 )
;CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the Handle of the surface
@@ -1463,86 +1610,133 @@ Const BS_HTMLSurface_UpdateToolTip = BS_ECallback_SteamHTMLSurfaceCallback
;//-----------------------------------------------------------------------------
;// Purpose: hide the tooltip you are showing
;//-----------------------------------------------------------------------------
;//-----------------------------------------------------------------------------
Const BS_SteamHTMLSurface_HideToolTip = BS_ECallback_SteamHTMLSurfaceCallbacks + 26
;DEFINE_CALLBACK( HTML_HideToolTip_t, k_iSteamHTMLSurfaceCallbacks + 26 )
;CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the Handle of the surface
;END_DEFINE_CALLBACK_1()
;[End Block]
;[Block] API: Inventory
;------------------------------------------------------------------------------
;------------------------------------------------------------------------------
;! Inventory
;------------------------------------------------------------------------------
Const BS_CALLBACK_GSClientApprove = BS_ECallback_SteamGameServerCallbacks + 1 ; client has been approved to connect to this game server
Type BS_GSClientApprove_t
Field SteamIDHigh%, SteamIDLow% ; SteamID of approved player
;------------------------------------------------------------------------------
Global BS_SteamInventory_SteamItemInstanceIDInvalid = BS_Long_FromII($FFFFFFFF, $FFFFFFFF)
Const BS_SteamInventory_ResultInvalid = -1
;// Types of items in your game are identified by a 32-bit "item definition number".
;// Valid definition numbers are between 1 and 999999999; numbers less than or equal to
;// zero are invalid, and numbers greater than or equal to one billion (1x10^9) are
;// reserved for internal Steam use.
Type BS_SteamInventory_SteamItemDetails
Field m_ItemIdHigh%, m_ItemIdLow%
Field m_iDefinition%, m_pad0%
Field m_unQuantity%, m_pad1%
Field m_unFlags%, m_pad2%
End Type
Const BS_CALLBACK_GSClientDeny = BS_ECallback_SteamGameServerCallbacks + 2 ; client has been denied to connection to this game server
Type BS_GSClientDeny_t
Field SteamIDHigh%, SteamIDLow%
Field eDenyReason%, pad0%
End Type
; SteamInventoryResultReady_t callbacks are fired whenever asynchronous
; results transition from "Pending" to "OK" or an error state. There will
; always be exactly one callback per handle.
Const BS_SteamInventory_SteamInventoryResultReady = BS_ECallback_ClientInventoryCallbacks
; SteamInventoryFullUpdate_t callbacks are triggered when GetAllItems
; successfully returns a result which is newer / fresher than the last
; known result. (It will not trigger if the inventory hasn't changed,
; or if results from two overlapping calls are reversed in flight and
; the earlier result is already known to be stale/out-of-date.)
; The normal ResultReady callback will still be triggered immediately
; afterwards; this is an additional notification for your convenience.
Const BS_SteamInventory_SteamInventoryFullUpdate = BS_ECallback_ClientInventoryCallbacks + 1
; A SteamInventoryDefinitionUpdate_t callback is triggered whenever
; item definitions have been updated, which could be in response to
; LoadItemDefinitions() or any other async request which required
; a definition update in order to process results from the server.
Const BS_SteamInventoryDefinitionUpdate = BS_ECallback_ClientInventoryCallbacks + 2
;[End Block]
;[Block] API: Matchmaking
;------------------------------------------------------------------------------
;! Matchmaking
;------------------------------------------------------------------------------
;[End Block]
;[Block] API: MatchmakingServers
;------------------------------------------------------------------------------
;! MatchmakingServers
;------------------------------------------------------------------------------
;[End Block]
;[Block] API: Music
;------------------------------------------------------------------------------
;! Music
;------------------------------------------------------------------------------
;[End Block]
;[Block] API: MusicRemote
;------------------------------------------------------------------------------
;! MusicRemote
;------------------------------------------------------------------------------
;[End Block]
;[Block] API: Networking
;------------------------------------------------------------------------------
;! Networking
;------------------------------------------------------------------------------
Type BS_P2PSessionState_t
Field bConnectionActive%, m_pad0%
Field bConnecting%, m_pad1%
Field eP2PSessionError%, m_pad2%
Field bUsingRelay%, m_pad3%
Field nBytesQueuedForSend%, m_pad4%
Field nPacketsQueuedForSend%, m_pad5%
Field nRemoteIP%, m_pad6%
Field nRemotePort%, m_pad7%
End Type
Const BS_CALLBACK_GSClientKick = BS_ECallback_SteamGameServerCallbacks + 3 ; request the game server should kick the user
Type BS_GSClientKick_t
Field SteamIDHigh%, SteamIDLow%
End Type
; callback notification - a user wants to talk to us over the P2P channel via the SendP2PPacket() API
; in response, a call to AcceptP2PPacketsFromUser() needs to be made, if you want to talk with them
Const BS_SteamNetworking_P2PSessionRequest = BS_ECallback_SteamNetworkingCallbacks + 2
Type BS_P2PSessionRequest_t
Field steamIDRemoteHigh%, steamIDRemoteLow% ; user who wants to talk to us
End Type
Const BS_CALLBACK_GSClientAchievementStatus = BS_ECallback_SteamGameServerCallbacks + 6 ; client achievement info
Type BS_GSClientAchievementStatus_t
Field SteamIDHigh%, SteamIDLow%
Field pchAchievement[31] ; 128 byte C-String Achievement
Field bUnlocked%, pad0%
End Type
Const BS_CALLBACK_GSPolicyResponse = BS_ECallback_SteamUserCallbacks + 15 ; received when the game server requests to be displayed as secure (VAC protected)
Type BS_GSPolicyResponse_t ; m_bSecure is true if the game server should display itself as secure to users, false otherwise
Field m_bSecure%, pad0%
End Type
Const BS_CALLBACK_GSGameplayStats = BS_ECallback_SteamGameServerCallbacks + 7 ; GS gameplay stats info
Type BS_GSGameplayStats_t
Field eResult%, pad0% ; Result of the call
Field nRank%, pad1% ; Overall rank of the server (0-based)
Field unTotalConnects%, pad2% ; Total number of clients who have ever connected to the server
Field unTotalMinutesPlayed%, pad3% ; Total number of minutes ever played on the server
End Type
Const BS_CALLBACK_GSClientGroupStatus = BS_ECallback_SteamGameServerCallbacks + 8 ; Sent as a reply to RequestUserGroupStatus()
Type BS_GSClientGroupStatus_t
Field SteamIDUserHigh%, SteamIDUserLow%
Field SteamIDGroupHigh%, SteamIDGroupLow%
Field bMember%, pad0%
Field bOfficer%, pad1%
End Type
Const BS_CALLBACK_GSReputation = BS_ECallback_SteamGameServerCallbacks + 9 ; Sent as a reply to GetServerReputation()
Type BS_GSReputation_t
Field eResult%, pad0% ; Result of the call
Field unReputationScore%, pad1% ; The reputation score for the game server
Field bBanned%, pad2% ; True if the server is banned from the Steam
; master servers
; The following members are only filled out if m_bBanned is true. They will all
; be set to zero otherwise. Master server bans are by IP so it is possible to be
; banned even when the score is good high if there is a bad server on another port.
; This information can be used to determine which server is bad.
Field unBannedIP%, pad3% ; The IP of the banned server
Field usBannedPort%, pad4% ; The port of the banned server
Field ulBannedGameIDHigh%, ulBannedGameIDLow% ; The game ID the banned server is serving
Field unBanExpires%, pad5% ; Time the ban expires, expressed in the Unix epoch (seconds since 1/1/1970)
End Type
Const BS_CALLBACK_AssociateWithClanResult = BS_ECallback_SteamGameServerCallbacks + 10; Sent as a reply to AssociateWithClan()
Type BS_AssociateWithClanResult_t
Field eResult% ; Result of the call
End Type
Const BS_CALLBACK_ComputeNewPlayerCompatibilityResult = BS_ECallback_SteamGameServerCallbacks + 11; Sent as a reply to ComputeNewPlayerCompatibility()
Type BS_ComputeNewPlayerCompatibilityResult_t
Field eResult%, pad0% ; Result of the call
Field cPlayersThatDontLikeCandidate%, pad1%
Field cPlayersThatCandidateDoesntLike%, pad2%
Field cClanPlayersThatDontLikeCandidate%, pad3%
End Type
; callback notification - packets can't get through to the specified user via the SendP2PPacket() API
; all packets queued packets unsent at this point will be dropped
; further attempts to send will retry making the connection (but will be dropped if we fail again)
Const BS_SteamNetworking_P2PSessionConnectFail = BS_ECallback_SteamNetworkingCallbacks + 3
Type BS_P2PSessionConnectFail_t
Field steamIDRemoteHigh%, steamIDRemoteLow% ; user we were sending packets to
Field eP2PSessionError ; EP2PSessionError indicating why we're having trouble
End Type
;[End Block]
;[Block] API: RemoteStorage
;------------------------------------------------------------------------------
;! RemoteStorage
;------------------------------------------------------------------------------
;[End Block]
;[Block] API: Screenshots
;------------------------------------------------------------------------------
;! Screenshots
;------------------------------------------------------------------------------
;[End Block]
;[Block] API: UGC
;------------------------------------------------------------------------------
;! UGC
;------------------------------------------------------------------------------
;[End Block]
;[Block] API: UnifiedMessages
;------------------------------------------------------------------------------
;! UnifiedMessages
;------------------------------------------------------------------------------
;[End Block]
;[Block] API: User
;------------------------------------------------------------------------------
@@ -1682,37 +1876,20 @@ Type BS_GlobalStatsReceived_t
Field eResult ; The result of the request
End Type
;[End Block]
;[Block] API: Utils
;------------------------------------------------------------------------------
;------------------------------------------------------------------------------
;! Utils
;------------------------------------------------------------------------------
Type BS_P2PSessionState_t
Field bConnectionActive%, pad0%
Field bConnecting%, pad1%
Field eP2PSessionError%, pad2%
Field bUsingRelay%, pad3%
Field nBytesQueuedForSend%, pad4%
Field nPacketsQueuedForSend%, pad5%
Field nRemoteIP%, pad6%
Field nRemotePort%, pad7%
;------------------------------------------------------------------------------
;[End Block]
; callback notification - a user wants to talk to us over the P2P channel via the SendP2PPacket() API
; in response, a call to AcceptP2PPacketsFromUser() needs to be made, if you want to talk with them
Const BS_CALLBACK_P2PSessionRequest = BS_ECallback_SteamNetworkingCallbacks + 2
Type BS_P2PSessionRequest_t
Field steamIDRemoteHigh%, steamIDRemoteLow% ; user who wants to talk to us
End Type
; callback notification - packets can't get through to the specified user via the SendP2PPacket() API
; all packets queued packets unsent at this point will be dropped
; further attempts to send will retry making the connection (but will be dropped if we fail again)
Const BS_CALLBACK_P2PSessionConnectFail = BS_ECallback_SteamNetworkingCallbacks + 3
Type BS_P2PSessionConnectFail_t
Field steamIDRemoteHigh%, steamIDRemoteLow% ; user we were sending packets to
Field eP2PSessionError ; EP2PSessionError indicating why we're having trouble
;[Block] API: Video
;------------------------------------------------------------------------------
;! Video
;------------------------------------------------------------------------------
;[End Block]
;~IDEal Editor Parameters:
;~F#13#26#31#49#60#71#7E#93#C8#E0#F5#101#110#121#14F#166#178#190#1A1#1E2
;~F#1EB#1F5#20C#216#220#229#232#240#24B#255#26B#27C#295#2A5#314#322#32C#33C#344#351
;~F#360#36E#378#389#39D#3A0#3B6#3EA#40A#429#525#543#553#560#653#6CC#6FF
+1 -1
View File
@@ -1,7 +1,7 @@
[IDEal Project file]
<Settings>
Version="1"
Expanded="True"
Expanded="False"
Icon=""
MainFile="SteamHTMLSurface_Example.bb"
Compiler="Blitz3D"
+3 -144
View File
@@ -15,147 +15,6 @@
; along with this program. If not, see <http:;www.gnu.org/licenses/>.
.lib "BlitzSteam.dll"
; Networking ------------------------------------------------------------------
BS_Networking%()
BS_GameServerNetworking%()
BS_Networking_SendP2PPacket%(pSteamNetworking%, pSteamIDRemote%, pubData*, cubData%, eP2PSendType%, nChannel%)
BS_Networking_SendP2PPacketEx%(pSteamNetworking%, pSteamIDRemote%, pubData%, cubData%, eP2PSendType%, nChannel%) : "BS_Networking_SendP2PPacket"
BS_Networking_IsP2PPacketAvailable%(pSteamNetworking%, pcubMsgSize*, nChannel%)
BS_Networking_IsP2PPacketAvailableEx%(pSteamNetworking%, pcubMsgSize*, nChannel%) : "BS_Networking_IsP2PPacketAvailable"
BS_Networking_ReadP2PPacket%(pSteamNetworking%, pubDest*, cubDest%, pcubMsgSize*, pSteamIDRemote%, nChannel%)
BS_Networking_ReadP2PPacketEx%(pSteamNetworking%, pubDest%, cubDest%, pcubMsgSize%, pSteamIDRemote%, nChannel%) : "BS_Networking_ReadP2PPacket"
BS_Networking_AcceptP2PSessionWithUser%(pSteamNetworking%, pSteamIDRemote%)
BS_Networking_CloseP2PSessionWithUser%(pSteamNetworking%, pSteamIDRemote%)
BS_Networking_CloseP2PChannelWithUser%(pSteamNetworking%, pSteamIDRemote%, nChannel%)
BS_Networking_GetP2PSessionState%(pSteamNetworking%, pSteamIDRemote%, pConnectionState*)
BS_Networking_AllowP2PPacketRelay%(pSteamNetworking%, bAllow%)
; User ------------------------------------------------------------------------
BS_User%()
BS_User_GetHSteamUser%(lpSteamUser%)
BS_User_IsLoggedOn%(lpSteamUser%)
BS_User_GetSteamID%(lpSteamUser%)
BS_User_InitiateGameConnection%(lpSteamUser%, pAuthBlob*, cbMaxAuthBlob%, SteamIDGameServer%, unIPServer%, usPortServer%, bSecure%)
BS_User_TerminateGameConnection(lpSteamUser%, unIPServer%, usPortServer%)
BS_User_TrackAppUsageEvent(lpSteamUser%, gameId%, eAppUsageEvent%, pchExtraInfo$)
BS_User_GetUserDataFolder%(lpSteamUser%, pchBuffer*, cubBuffer%)
BS_User_StartVoiceRecording(lpSteamUser%)
BS_User_StopVoiceRecording(lpSteamUser%)
BS_User_GetAvailableVoice%(lpSteamUser%, pcbCompressed*, pcbUncompressed*, nUncompressedVoiceDesiredSampleRate%)
BS_User_GetAvailableVoiceEx%(lpSteamUser%, pcbCompressed%, pcbUncompressed%, nUncompressedVoiceDesiredSampleRate%) : "BS_User_GetAvailableVoice"
BS_User_GetVoice%(lpSteamUser%, bWantCompressed%, pDestBuffer*, cbDestBufferSize%, nBytesWritten*, bWantUncompressed%, pUncompressedDestBuffer*, cbUncompressedDestBufferSize%, nUncompressBytesWritten*, nUncompressedVoiceDesiredSampleRate%)
BS_User_GetVoiceEx%(lpSteamUser%, bWantCompressed%, pDestBuffer*, cbDestBufferSize%, nBytesWritten%, bWantUncompressed%, pUncompressedDestBuffer*, cbUncompressedDestBufferSize%, nUncompressBytesWritten%, nUncompressedVoiceDesiredSampleRate%) : "BS_User_GetVoice"
BS_User_DecompressVoice(lpSteamUser%, pCompressed*, cbCompressed%, pDestBuffer*, cbDestBufferSize%, nBytesWritten*, nDesiredSampleRate%)
BS_User_DecompressVoiceEx(lpSteamUser%, pCompressed*, cbCompressed%, pDestBuffer*, cbDestBufferSize%, nBytesWritten%, nDesiredSampleRate%) : "BS_User_DecompressVoice"
BS_User_GetVoiceOptimalSampleRate%(lpSteamUser%)
BS_User_GetAuthSessionTicket%(lpSteamUser%, pTicket*, cbMaxTicket%, pcbTicket*)
BS_User_GetAuthSessionTicketEx%(lpSteamUser%, pTicket*, cbMaxTicket%, pcbTicket%) : "BS_User_GetAuthSessionTicket"
BS_User_BeginAuthSession%(lpSteamUser%, pAuthTicket*, cbAuthTicker%, steamID%)
BS_User_EndAuthSession(lpSteamUser%, steamID%)
BS_User_CancelAuthTicket(lpSteamUser%, hAuthTicket%)
BS_User_UserHasLicenseForApp%(lpSteamUser%, steamID%, appID%)
BS_User_IsBehindNAT%(lpSteamUser%)
BS_User_AdvertiseGame%(lpSteamUser%, steamIDGameServer%, unIPServer%, usPortServer%)
BS_User_RequestEncryptedAppTicket%(lpSteamUser%, pDataToInclude*, cbDataToInclude%)
BS_User_GetEncryptedAppTicket%(lpSteamUser%, pTicket*, cbMaxTicket%, pcbTicket*)
BS_User_GetEncryptedAppTicketEx%(lpSteamUser%, pTicket*, cbMaxTicket%, pcbTicket%) : "BS_User_GetEncryptedAppTicket"
BS_User_GetGameBadgeLevel%(lpSteamUser%, nSeries%, bFoil%)
BS_User_GetPlayerSteamLevel%(lpSteamUser%)
BS_User_RequestStoreAuthURL%(lpSteamUser%, pchRedirectUrl$)
; UserStats -------------------------------------------------------------------
BS_UserStats%()
BS_UserStats_RequestCurrentStats%(lpSteamUserStats%)
BS_UserStats_GetStat%(lpSteamUserStats%, pchName$, pData*)
BS_UserStats_GetStatEx%(lpSteamUserStats%, pchName$, pData%) : "BS_UserStats_GetStat"
BS_UserStats_GetStatF%(lpSteamUserStats%, pchName$, pData*)
BS_UserStats_GetStatFEx%(lpSteamUserStats%, pchName$, pData%) : "BS_UserStats_GetStatF"
BS_UserStats_SetStat%(lpSteamUserStats%, pchName$, pData%)
BS_UserStats_SetStatF%(lpSteamUserStats%, pchName$, pData#)
BS_UserStats_UpdateAvgRateStat%(lpSteamUserStats%, pchName$, flCountThisSession#, dSessionLength%)
BS_UserStats_GetAchievement%(lpSteamUserStats%, pchName$, pbAchieved*)
BS_UserStats_GetAchievementEx%(lpSteamUserStats%, pchName$, pbAchieved%) : "BS_UserStats_GetAchievement"
BS_UserStats_SetAchievement%(lpSteamUserStats%, pchName$)
BS_UserStats_ClearAchievement%(lpSteamUserStats%, pchName$)
BS_UserStats_GetAchievementAndUnlockTime%(lpSteamUserStats%, pchName$, pbAchieved*, punUnlockTime*)
BS_UserStats_GetAchievementAndUnlockTimeEx%(lpSteamUserStats%, pchName$, pbAchieved%, punUnlockTime%) : "BS_UserStats_GetAchievementAndUnlockTime"
BS_UserStats_StoreStats%(lpSteamUserStats%)
BS_UserStats_GetAchievementIcon%(lpSteamUserStats%, pchName$)
BS_UserStats_GetAchievementDisplayAttribute$(lpSteamUserStats%, pchName$, pchKey$)
BS_UserStats_IndicateAchievementProgress%(lpSteamUserStats%, pchName$, nCurProgress%, nMaxProgress%)
BS_UserStats_GetNumAchievements%(lpSteamUserStats%)
BS_UserStats_GetAchievementName$(lpSteamUserStats%, iAchievement%)
BS_UserStats_RequestUserStats%(lpSteamUserStats%, steamIDUser%)
BS_UserStats_GetUserStat%(lpSteamUserStats%, steamIDUser%, pchName$, pData*)
BS_UserStats_GetUserStatEx%(lpSteamUserStats%, steamIDUser%, pchName$, pData%) : "BS_UserStats_GetUserStat"
BS_UserStats_GetUserStatF%(lpSteamUserStats%, steamIDUser%, pchName$, pData*)
BS_UserStats_GetUserStatFEx%(lpSteamUserStats%, steamIDUser%, pchName$, pData%) : "BS_UserStats_GetUserStatF"
BS_UserStats_GetUserAchievement%(lpSteamUserStats%, steamIDUser%, pchName$, pbAchieved*)
BS_UserStats_GetUserAchievementEx%(lpSteamUserStats%, steamIDUser%, pchName$, pbAchieved%) : "BS_UserStats_GetUserAchievement"
BS_UserStats_GetUserAchievementAndUnlockTime%(lpSteamUserStats%, steamIDUser%, pchName$, pbAchieved*, punUnlockTime*)
BS_UserStats_GetUserAchievementAndUnlockTimeEx%(lpSteamUserStats%, steamIDUser%, pchName$, pbAchieved%, punUnlockTime%) : "BS_UserStats_GetUserAchievementAndUnlockTime"
BS_UserStats_ResetAllStats%(lpSteamUserStats%, bAchievementsToo%)
BS_UserStats_FindOrCreateLeaderboard%(lpSteamUserStats%, pchLeaderboardName$, eLeaderboardSortMethod%, eLeaderboardDisplayType%)
BS_UserStats_FindLeaderboard%(lpSteamUserStats%, pchLeaderboardName$)
BS_UserStats_GetLeaderboardName$(lpSteamUserStats%, hSteamLeaderboard%)
BS_UserStats_GetLeaderboardEntryCount%(lpSteamUserStats%, hSteamLeaderboard%)
BS_UserStats_GetLeaderboardSortMethod%(lpSteamUserStats%, hSteamLeaderboard%)
BS_UserStats_GetLeaderboardDisplayType%(lpSteamUserStats%, hSteamLeaderboard%)
BS_UserStats_DownloadLeaderboardEntries%(lpSteamUserStats%, hSteamLeaderboard%, eLeaderboardDataRequest%, nRangeStart%, nRangeEnd%)
BS_UserStats_DownloadLeaderboardEntriesForUsers%(lpSteamUserStats%, hSteamLeaderboard%, prgUsers*, cUsers%)
BS_UserStats_DownloadLeaderboardEntriesForUsersEx%(lpSteamUserStats%, hSteamLeaderboard%, prgUsers%, cUsers%) : "BS_UserStats_DownloadLeaderboardEntriesForUsers"
BS_UserStats_GetDownloadedLeaderboardEntry%(lpSteamUsers%, hSteamLeaderboardEntries%, index%, pLeaderboardEntry*, pDetails*, cDetailsMax%)
BS_UserStats_GetDownloadedLeaderboardEntryEx%(lpSteamUsers%, hSteamLeaderboardEntries%, index%, pLeaderboardEntry%, pDetails%, cDetailsMax%)
BS_UserStats_UploadLeaderboardScore%(lpSteamUserStats%, hSteamLeaderboard%, eLeaderboardUploadScoreMethod%, nScore%, pScoreDetails*, cScoreDetailsCount%)
BS_UserStats_UploadLeaderboardScoreEx%(lpSteamUserStats%, hSteamLeaderboard%, eLeaderboardUploadScoreMethod%, nScore%, pScoreDetails%, cScoreDetailsCount%) : "BS_UserStats_UploadLeaderboardScore"
BS_UserStats_AttachLeaderboardUGC%(lpSteamUserStats%, hSteamLeaderboard%, hUGB%)
BS_UserStats_GetNumberOfCurrentPlayers%(lpSteamUserstats%)
BS_UserStats_RequestGlobalAchievementPercentages%(lpSteamUserStats%)
BS_UserStats_GetMostAchievedAchievementInfo%(lpSteamUserStats%, pchName$, unNameBufLen%, pflPercent*, pbAchieved*)
BS_UserStats_GetMostAchievedAchievementInfoEx%(lpSteamUserStats%, pchName$, unNameBufLen%, pflPercent%, pbAchieved%) : "BS_UserStats_GetMostAchievedAchievementInfo"
BS_UserStats_GetNextMostAchievedAchievementInfo%(lpSteamUserStats%, iIteratorPrevious%, pchName$, unNameBufLen%, pflPercent*, pbAchieved*)
BS_UserStats_GetNextMostAchievedAchievementInfoEx%(lpSteamUserStats%, iIteratorPrevious%, pchName$, unNameBufLen%, pflPercent%, pbAchieved%) : "BS_UserStats_GetNextMostAchievedAchievementInfo"
BS_UserStats_GetAchievementAchievedPercent%(lpSteamUserStats%, pchName$, pflPercent*)
BS_UserStats_GetAchievementAchievedPercentEx%(lpSteamUserStats%, pchName$, pflPercent%) : "BS_UserStats_GetAchievementAchievedPercent"
BS_UserStats_RequestGlobalStats%(lpSteamUserStats%, nHistoryDays%)
BS_UserStats_GetGlobalStatLL%(lpSteamUserStats, pchStatName$, pData%)
BS_UserStats_GetGlobalStatD%(lpSteamUserStats, pchStatName$, pData%)
BS_UserStats_GetGlobalStatHistoryLL%(lpSteamUserStats, pchStatName$, pData*, cubData%)
BS_UserStats_GetGlobalStatHistoryLLEx%(lpSteamUserStats, pchStatName$, pData%, cubData%) : "BS_UserStats_GetGlobalStatHistoryLL"
BS_UserStats_GetGlobalStatHistoryD%(lpSteamUserStats, pchStatName$, pData*, cubData%)
BS_UserStats_GetGlobalStatHistoryDEx%(lpSteamUserStats, pchStatName$, pData%, cubData%) : "BS_UserStats_GetGlobalStatHistoryD"
; -- Interfaces
BS_HTTP%()
BS_GameServerHTTP%()
BS_Inventory%()
BS_GameServerInventory%()
BS_Matchmaking%()
BS_MatchmakingServers%()
BS_Music%()
BS_MusicRemote%()
BS_RemoteStorage%()
BS_Screenshots%()
BS_UGC%()
BS_GameServerUGC%()
BS_UnifiedMessages%()
BS_Utils%()
BS_GameServerUtils%()
BS_Video%()
; Helpers ---------------------------------------------------------------------
; -- Generic
BS_Helper_FormatUnixTime$(unixTime%, pchFormat$)
; -- Memory
BS_Memory_Alloc%(iSize%)
BS_Memory_ReAlloc%(pMemory%, iSize%)
BS_Memory_Free(pMemory%)
BS_Memory_PeekByte%(pMemory%, offset%)
BS_Memory_PeekShort%(pMemory%, offset%)
BS_Memory_PeekInt%(pMemory%, offset%)
BS_Memory_PeekFloat#(pMemory%, offset%)
BS_Memory_PokeByte(pMemory%, offset%, value%)
BS_Memory_PokeShort(pMemory%, offset%, value%)
BS_Memory_PokeInt(pMemory%, offset%, value%)
BS_Memory_PokeFloat(pMemory%, offset%, value#)
; Generic ---------------------------------------------------------------------
BS_Helper_FormatUnixTime$(unixTime%, pchFormat$) :"_BS_Helper_FormatUnixTime@8"
BS_Helper_CopyMemoryIntMangle(pSource%, pDest%, iMangling%, iSourceW%, iSourceH%, iDestW%, iDestH%, iAreaX%, iAreaY%, iAreaW%, iAreaH%):"_BS_Helper_CopyMemoryIntMangle@44"
@@ -0,0 +1,33 @@
; BlitzSteam - Steam wrapper for Blitz
; Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
;
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU Lesser General Public License as
; published by the Free Software Foundation, either version 3 of the
; License, or (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public License
; along with this program. If not, see <http:;www.gnu.org/licenses/>.
.lib "BlitzSteam.dll"
; BlitzCallback ---------------------------------------------------------------
BS_Callback_New%(pFunction%) :"_BS_Callback_New@4"
BS_Callback_Destroy(pThis%) :"_BS_Callback_Destroy@4"
BS_Callback_GetCallbackSizeBytes%(pThis%) :"_BS_Callback_GetCallbackSizeBytes@4"
BS_Callback_SetCallback(pThis%, iCallback%) :"_BS_Callback_SetCallback@8"
BS_Callback_GetCallback%(pThis%) :"_BS_Callback_GetCallback@4"
BS_Callback_SetFunction(pThis%, pFunction%) :"_BS_Callback_SetFunction@8"
BS_Callback_GetFunction%(pThis%) :"_BS_Callback_GetFunction@4"
BS_Callback_SetRegistered(pThis%, bIsRegistered%) :"_BS_Callback_SetRegistered@8"
BS_Callback_IsRegistered%(pThis%) :"_BS_Callback_IsRegistered@4"
BS_Callback_SetGameServer(pThis%, bIsGameServer%) :"_BS_Callback_SetGameServer@8"
BS_Callback_IsGameServer%(pThis%) :"_BS_Callback_IsGameServer@4"
BS_Callback_Register(pThis%, iCallback%) :"_BS_Callback_Register@8"
BS_Callback_Unregister(pThis%) :"_BS_Callback_Unregister@4"
BS_Callback_RegisterResult(pThis%, lSteamAPICall%, iCallback%) :"_BS_Callback_RegisterResult@12"
BS_Callback_UnregisterResult(pThis%) :"_BS_Callback_UnregisterResult@4"
+33
View File
@@ -0,0 +1,33 @@
; BlitzSteam - Steam wrapper for Blitz
; Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
;
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU Lesser General Public License as
; published by the Free Software Foundation, either version 3 of the
; License, or (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public License
; along with this program. If not, see <http:;www.gnu.org/licenses/>.
.lib "BlitzSteam.dll"
; Memory ----------------------------------------------------------------------
BS_Memory_Alloc%(iSize%) :"_BS_Memory_Alloc@4"
BS_Memory_ReAlloc%(pMemory%, iSize%) :"_BS_Memory_ReAlloc@8"
BS_Memory_Free(pMemory%) :"_BS_Memory_Free@4"
BS_Memory_PokeByte(pMemory%, iOffset%, bValue%) :"_BS_Memory_PokeByte@12"
BS_Memory_PeekByte%(pMemory%, iOffset%) :"_BS_Memory_PeekByte@8"
BS_Memory_PokeShort(pMemory%, iOffset%, sValue%) :"_BS_Memory_PokeShort@12"
BS_Memory_PeekShort%(pMemory%, iOffset%) :"_BS_Memory_PeekShort@8"
BS_Memory_PokeInt(pMemory%, iOffset%, iValue%) :"_BS_Memory_PokeInt@12"
BS_Memory_PeekInt%(pMemory%, iOffset%) :"_BS_Memory_PeekInt@8"
BS_Memory_PokeFloat(pMemory%, iOffset%, fValue#) :"_BS_Memory_PokeFloat@12"
BS_Memory_PeekFloat#(pMemory%, iOffset%) :"_BS_Memory_PeekFloat@8"
BS_Memory_PokeLong(pMemory%, iOffset%, lValue%) :"_BS_Memory_PokeLong@12"
BS_Memory_PeekLong%(pMemory%, iOffset%) :"_BS_Memory_PeekLong@8"
BS_Memory_PokeDouble(pMemory%, iOffset%, dValue%) :"_BS_Memory_PokeDouble@12"
BS_Memory_PeekDouble%(pMemory%, iOffset%) :"_BS_Memory_PeekDouble@8"
@@ -0,0 +1,54 @@
; BlitzSteam - Steam wrapper for Blitz
; Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
;
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU Lesser General Public License as
; published by the Free Software Foundation, either version 3 of the
; License, or (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public License
; along with this program. If not, see <http:;www.gnu.org/licenses/>.
.lib "BlitzSteam.dll"
; HTTP ------------------------------------------------------------------------
BS_SteamHTTP%() :"_BS_SteamHTTP@0"
BS_SteamGameServerHTTP%() :"_BS_SteamGameServerHTTP@0"
BS_ISteamHTTP_CreateHTTPRequest%(pThis%, EHTTPRequestMethod%, cAbsoluteUrl$) :"_BS_ISteamHTTP_CreateHTTPRequest@12"
BS_ISteamHTTP_SetHTTPRequestContextValue%(pThis%, iRequest%, lContextValue%) :"_BS_ISteamHTTP_SetHTTPRequestContextValue@12"
BS_ISteamHTTP_SetHTTPNetworkActivityTimeout%(pThis%, iRequest%, iSeconds%) :"_BS_ISteamHTTP_SetHTTPNetworkActivityTimeout@12"
BS_ISteamHTTP_SetHTTPRequestHeaderValue%(pThis%, iRequest%, cName$, cValue$) :"_BS_ISteamHTTP_SetHTTPRequestHeaderValue@16"
BS_ISteamHTTP_SetHTTPRequestGetOrPostParameter%(pThis%, iRequest%, cName$, cValue$):"_BS_ISteamHTTP_SetHTTPRequestGetOrPostParameter@16"
BS_ISteamHTTP_SendHTTPRequest%(pThis%, iRequest, lCallHandle%) :"_BS_ISteamHTTP_SendHTTPRequest@12"
BS_ISteamHTTP_SendHTTPRequestAndStreamResponse%(pThis%, iRequest%, lCallHandle%):"_BS_ISteamHTTP_SendHTTPRequestAndStreamResponse@12"
BS_ISteamHTTP_DeferHTTPRequest%(pThis%, iRequest%) :"_BS_ISteamHTTP_DeferHTTPRequest@8"
BS_ISteamHTTP_PrioritizeHTTPRequest%(pThis%, iRequest%) :"_BS_ISteamHTTP_PrioritizeHTTPRequest@8"
BS_ISteamHTTP_GetHTTPResponseHeaderSize%(pThis%, iRequest%, cName$, piSize*) :"_BS_ISteamHTTP_GetHTTPResponseHeaderSize@16"
BS_ISteamHTTP_GetHTTPResponseHeaderSizeEx%(pThis%, iRequest%, cName$, piSize%) :"_BS_ISteamHTTP_GetHTTPResponseHeaderSize@16"
BS_ISteamHTTP_GetHTTPResponseHeaderValue%(pThis%, iRequest%, cName$, pBuffer*, iSize%):"_BS_ISteamHTTP_GetHTTPResponseHeaderValue@20"
BS_ISteamHTTP_GetHTTPResponseHeaderValueEx%(pThis%, iRequest%, cName$, pBuffer%, iSize%):"_BS_ISteamHTTP_GetHTTPResponseHeaderValue@20"
BS_ISteamHTTP_GetHTTPResponseBodySize%(pThis%, iRequest%, piSize*) :"_BS_ISteamHTTP_GetHTTPResponseBodySize@12"
BS_ISteamHTTP_GetHTTPResponseBodySizeEx%(pThis%, iRequest%, piSize%) :"_BS_ISteamHTTP_GetHTTPResponseBodySize@12"
BS_ISteamHTTP_GetHTTPResponseBodyData%(pThis%, iRequest%, pBuffer*, nSize%) :"_BS_ISteamHTTP_GetHTTPResponseBodyData@16"
BS_ISteamHTTP_GetHTTPResponseBodyDataEx%(pThis%, iRequest%, pBuffer%, nSize%) :"_BS_ISteamHTTP_GetHTTPResponseBodyData@16"
BS_ISteamHTTP_GetHTTPStreamingResponseBodyData%(pThis%, iRequest%, iOffset%, pBuffer*, nSize%):"_BS_ISteamHTTP_GetHTTPStreamingResponseBodyData@20"
BS_ISteamHTTP_GetHTTPStreamingResponseBodyDataEx%(pThis%, iRequest%, iOffset%, pBuffer%, nSize%):"_BS_ISteamHTTP_GetHTTPStreamingResponseBodyData@20"
BS_ISteamHTTP_ReleaseHTTPRequest%(pThis%, iRequest%) :"_BS_ISteamHTTP_ReleaseHTTPRequest@8"
BS_ISteamHTTP_GetHTTPDownloadProgressPct%(pThis%, iRequest%, pfPercent*) :"_BS_ISteamHTTP_GetHTTPDownloadProgressPct@12"
BS_ISteamHTTP_GetHTTPDownloadProgressPctEx%(pThis%, iRequest%, pfPercent%) :"_BS_ISteamHTTP_GetHTTPDownloadProgressPct@12"
BS_ISteamHTTP_SetHTTPRequestRawPostBody%(pThis%, iRequest%, cType$, pBody*, nSize%):"_BS_ISteamHTTP_SetHTTPRequestRawPostBody@16"
BS_ISteamHTTP_SetHTTPRequestRawPostBodyEx%(pThis%, iRequest%, cType$, pBody*, nSize%):"_BS_ISteamHTTP_SetHTTPRequestRawPostBody@16"
BS_ISteamHTTP_CreateCookieContainer%(pThis%, bAllowResponsesToModify%) :"_BS_ISteamHTTP_CreateCookieContainer@8"
BS_ISteamHTTP_ReleaseCookieContainer%(pThis%, iCookieContainer%) :"_BS_ISteamHTTP_ReleaseCookieContainer@8"
BS_ISteamHTTP_SetCookie%(pthis%, iCookieContainer%, cHost$, cUrl$, cCookie$) :"_BS_ISteamHTTP_SetCookie@20"
BS_ISteamHTTP_SetHTTPRequestCookieContainer%(pThis%, iRequest%, iCookieContainer%):"_BS_ISteamHTTP_SetHTTPRequestCookieContainer@12"
BS_ISteamHTTP_SetHTTPRequestUserAgentInfo%(pThis%, iRequest%, cUserAgent$) :"_BS_ISteamHTTP_SetHTTPRequestUserAgentInfo@12"
BS_ISteamHTTP_SetHTTPRequestRequiresVerifiedCertificate%(pThis%, iRequest%, bRequire%):"_BS_ISteamHTTP_SetHTTPRequestRequiresVerifiedCertificate@12"
BS_ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS%(pThis%, iRequest%, iMilliseconds%):"_BS_ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS@12"
BS_ISteamHTTP_GetHTTPRequestWasTimedOut%(pThis%, iRequest%, pbWasTimedOut*) :"_BS_ISteamHTTP_GetHTTPRequestWasTimedOut@12"
BS_ISteamHTTP_GetHTTPRequestWasTimedOutEx%(pThis%, iRequest%, pbWasTimedOut%) :"_BS_ISteamHTTP_GetHTTPRequestWasTimedOut@12"
@@ -0,0 +1,59 @@
; BlitzSteam - Steam wrapper for Blitz
; Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
;
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU Lesser General Public License as
; published by the Free Software Foundation, either version 3 of the
; License, or (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public License
; along with this program. If not, see <http:;www.gnu.org/licenses/>.
.lib "BlitzSteam.dll"
; Inventory -------------------------------------------------------------------
BS_SteamInventory%() :"_BS_SteamInventory@0"
BS_SteamGameServerInventory%() :"_BS_SteamGameServerInventory@0"
BS_ISteamInventory_GetResultStatus%(pThis%, iResultHandle%) :"_BS_ISteamInventory_GetResultStatus@8"
BS_ISteamInventory_GetResultItems%(pThis%, iResultHandle%, pItemsArray*, piItemsArraySize*):"_BS_ISteamInventory_GetResultItems@16"
BS_ISteamInventory_GetResultItemsEx%(pThis%, iResultHandle%, pItemsArray%, piItemsArraySize%):"_BS_ISteamInventory_GetResultItems@16"
BS_ISteamInventory_GetResultTimestamp%(pThis%, iResultHandle%) :"_BS_ISteamInventory_GetResultTimestamp@8"
BS_ISteamInventory_CheckResultSteamID%(pThis%, iResultHandle%, lSteamIdExpected%):"_BS_ISteamInventory_GetResultTimestamp@12"
BS_ISteamInventory_DestroyResult(pThis%, iResultHandle%) :"_BS_ISteamInventory_DestroyResult@8"
BS_ISteamInventory_GetAllItems%(pThis%, piResultHandle*) :"_BS_ISteamInventory_GetAllItems@8"
BS_ISteamInventory_GetAllItemsEx%(pThis%, piResultHandle%) :"_BS_ISteamInventory_GetAllItems@8"
BS_ISteamInventory_GetItemsByID%(pThis%, piResultHandle*, plInstanceIds*, iInstanceIdCount%):"_BS_ISteamInventory_GetItemsByID@16"
BS_ISteamInventory_GetItemsByIDEx%(pThis%, piResultHandle%, plInstanceIds%, iInstanceIdCount%):"_BS_ISteamInventory_GetItemsByID@16"
BS_ISteamInventory_SerializeResult%(pThis%, iResultHandle%, pOutBuffer*, piOutBufferSize*):"_BS_ISteamInventory_SerializeResult@16"
BS_ISteamInventory_SerializeResultEx%(pThis%, iResultHandle%, pOutBuffer%, piOutBufferSize%):"_BS_ISteamInventory_SerializeResult@16"
BS_ISteamInventory_DeserializeResult%(pThis%, piResultHandle*, pBuffer*, iBufferSize%, bReservedMustBeFalse):"_BS_ISteamInventory_DeserializeResult@20"
BS_ISteamInventory_DeserializeResultEx%(pThis%, piResultHandle%, pBuffer%, iBufferSize%, bReservedMustBeFalse):"_BS_ISteamInventory_DeserializeResult@20"
BS_ISteamInventory_GenerateItems%(pThis%, piResultHandle*, piIdArray*, piQuantityArray*, iArrayLength%):"_BS_ISteamInventory_GenerateItems@20"
BS_ISteamInventory_GenerateItemsEx%(pThis%, piResultHandle%, piIdArray%, piQuantityArray%, iArrayLength%):"_BS_ISteamInventory_GenerateItems@20"
BS_ISteamInventory_GrantPromoItems%(pThis%, piResultHandle*) :"_BS_ISteamInventory_GrantPromoItems@8"
BS_ISteamInventory_GrantPromoItemsEx%(pThis%, piResultHandle%) :"_BS_ISteamInventory_GrantPromoItems@8"
BS_ISteamInventory_AddPromoItem%(pThis%, piResultHandle*, iId%) :"_BS_ISteamInventory_AddPromoItem@12"
BS_ISteamInventory_AddPromoItemEx%(pThis%, piResultHandle%, iId%) :"_BS_ISteamInventory_AddPromoItem@12"
BS_ISteamInventory_AddPromoItems%(pThis%, piResultHandle*, piIdsArray*, iArrayLength%):"_BS_ISteamInventory_AddPromoItems@16"
BS_ISteamInventory_AddPromoItemsEx%(pThis%, piResultHandle%, piIdsArray%, iArrayLength%):"_BS_ISteamInventory_AddPromoItems@16"
BS_ISteamInventory_ConsumeItem%(pThis%, piResultHandle*, iId%, iQuantity%) :"_BS_ISteamInventory_ConsumeItem@16"
BS_ISteamInventory_ConsumeItemEx%(pThis%, piResultHandle%, iId%, iQuantity%) :"_BS_ISteamInventory_ConsumeItem@16"
BS_ISteamInventory_ExchangeItems%(pThis%, piResultHandle*, piGenerateArray*, piGenerateQuantityArray*, iArrayGenerateLength%, piDestroyArray*, piDestroyQuantityArray*, iArrayDestroyLength%):"_BS_ISteamInventory_ExchangeItems@32"
BS_ISteamInventory_ExchangeItemsEx%(pThis%, piResultHandle%, piGenerateArray%, piGenerateQuantityArray%, iArrayGenerateLength%, piDestroyArray%, piDestroyQuantityArray%, iArrayDestroyLength%):"_BS_ISteamInventory_ExchangeItems@32"
BS_ISteamInventory_TransferItemQuantity%(pThis%, piResultHandle*, iSourceId%, iQuantity%, iDestId%):"_BS_ISteamInventory_TransferItemQuantity@20"
BS_ISteamInventory_TransferItemQuantityEx%(pThis%, piResultHandle%, iSourceId%, iQuantity%, iDestId%):"_BS_ISteamInventory_TransferItemQuantity@20"
BS_ISteamInventory_SendItemDropHeartbeat%(pThis%) :"_BS_ISteamInventory_SendItemDropHeartbeat@4"
BS_ISteamInventory_TriggerItemDrop%(pThis%, piResultHandle*, iDropListId%) :"_BS_ISteamInventory_TriggerItemDrop@12"
BS_ISteamInventory_TriggerItemDropEx%(pThis%, piResultHandle%, iDropListId%) :"_BS_ISteamInventory_TriggerItemDrop@12"
BS_ISteamInventory_TradeItems%(pThis%, piResultHandle*, lSteamIdPartner%, piArrayGive*, piArrayGiveQuantity*, iArrayGiveLength%, piArrayGet*, piArrayGetQuantity*, iArrayGetLength%):"_BS_ISteamInventory_TradeItems@36"
BS_ISteamInventory_TradeItemsEx%(pThis%, piResultHandle%, lSteamIdPartner%, piArrayGive%, piArrayGiveQuantity%, iArrayGiveLength%, piArrayGet%, piArrayGetQuantity%, iArrayGetLength%):"_BS_ISteamInventory_TradeItems@36"
BS_ISteamInventory_LoadItemDefinitions%(pThis%) :"_BS_ISteamInventory_LoadItemDefinitions@4"
BS_ISteamInventory_GetItemDefinitionIDs%(pThis%, piArrayId*, piArrayIdSize*) :"_BS_ISteamInventory_GetItemDefinitionIDs@12"
BS_ISteamInventory_GetItemDefinitionIDsEx%(pThis%, piArrayId%, piArrayIdSize%) :"_BS_ISteamInventory_GetItemDefinitionIDs@12"
BS_ISteamInventory_GetItemDefinitionProperty%(pThis%, iId%, cName$, pcValueBuffer*, piValueBufferSize*):"_BS_ISteamInventory_GetItemDefinitionProperty@20"
BS_ISteamInventory_GetItemDefinitionPropertyEx%(pThis%, iId%, cName$, pcValueBuffer%, piValueBufferSize%):"_BS_ISteamInventory_GetItemDefinitionProperty@20"
@@ -0,0 +1,21 @@
; BlitzSteam - Steam wrapper for Blitz
; Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
;
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU Lesser General Public License as
; published by the Free Software Foundation, either version 3 of the
; License, or (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public License
; along with this program. If not, see <http:;www.gnu.org/licenses/>.
.lib "BlitzSteam.dll"
; Matchmaking -----------------------------------------------------------------
BS_SteamMatchmaking%() :"_BS_SteamMatchmaking@0"
; Todo
@@ -0,0 +1,21 @@
; BlitzSteam - Steam wrapper for Blitz
; Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
;
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU Lesser General Public License as
; published by the Free Software Foundation, either version 3 of the
; License, or (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public License
; along with this program. If not, see <http:;www.gnu.org/licenses/>.
.lib "BlitzSteam.dll"
; MatchmakingServers ----------------------------------------------------------
BS_SteamMatchmakingServers%() :"_BS_SteamMatchmakingServers@0"
; Todo
@@ -0,0 +1,21 @@
; BlitzSteam - Steam wrapper for Blitz
; Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
;
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU Lesser General Public License as
; published by the Free Software Foundation, either version 3 of the
; License, or (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public License
; along with this program. If not, see <http:;www.gnu.org/licenses/>.
.lib "BlitzSteam.dll"
; Music -----------------------------------------------------------------------
BS_SteamMusic%() :"_BS_SteamMusic@0"
; Todo
@@ -0,0 +1,21 @@
; BlitzSteam - Steam wrapper for Blitz
; Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
;
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU Lesser General Public License as
; published by the Free Software Foundation, either version 3 of the
; License, or (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public License
; along with this program. If not, see <http:;www.gnu.org/licenses/>.
.lib "BlitzSteam.dll"
; MusicRemote -----------------------------------------------------------------
BS_SteamMusicRemote%() :"_BS_SteamMusicRemote@0"
; Todo
@@ -0,0 +1,32 @@
; BlitzSteam - Steam wrapper for Blitz
; Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
;
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU Lesser General Public License as
; published by the Free Software Foundation, either version 3 of the
; License, or (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public License
; along with this program. If not, see <http:;www.gnu.org/licenses/>.
.lib "BlitzSteam.dll"
; Networking ------------------------------------------------------------------
BS_SteamNetworking%() :"_BS_SteamNetworking@0"
BS_SteamGameServerNetworking%() :"_BS_SteamGameServerNetworking@0"
BS_ISteamNetworking_SendP2PPacket%(pThis%, lRemoteSteamId%, pData*, iDataSize%, EP2PSendType%, iChannel%):"_BS_ISteamNetworking_SendP2PPacket@24"
BS_ISteamNetworking_SendP2PPacketEx%(pThis%, lRemoteSteamId%, pData%, iDataSize%, EP2PSendType%, iChannel%):"_BS_ISteamNetworking_SendP2PPacket@24"
BS_ISteamNetworking_IsP2PPacketAvailable%(pThis%, piSize*, iChannel%) :"_BS_ISteamNetworking_IsP2PPacketAvailable@12"
BS_ISteamNetworking_IsP2PPacketAvailableEx%(pThis%, piSize%, iChannel%) :"_BS_ISteamNetworking_IsP2PPacketAvailableEx@12"
BS_ISteamNetworking_ReadP2PPacket%(pThis%, pBuffer*, iBufferSize%, piMessageSize*, lRemoteSteamId%, iChannel%):"_BS_ISteamNetworking_ReadP2PPacket@24"
BS_ISteamNetworking_ReadP2PPacketEx%(pThis%, pBuffer%, iBufferSize%, piMessageSize%, lRemoteSteamId%, iChannel%):"_BS_ISteamNetworking_ReadP2PPacket@24"
BS_ISteamNetworking_AcceptP2PSessionWithUser%(pThis%, lRemoteSteamId%) :"_BS_ISteamNetworking_AcceptP2PSessionWithUser@8"
BS_ISteamNetworking_CloseP2PSessionWithUser%(pThis%, lRemoteSteamId%) :"_BS_ISteamNetworking_CloseP2PSessionWithUser@8"
BS_ISteamNetworking_CloseP2PChannelWithUser%(pThis%, lRemoteSteamId%, iChannel%):"_BS_ISteamNetworking_CloseP2PChannelWithUser@12"
BS_ISteamNetworking_GetP2PSessionState%(pThis%, lRemoteSteamId%, pConnectionState*):"_BS_ISteamNetworking_GetP2PSessionState@12"
BS_ISteamNetworking_AllowP2PPacketRelay%(pThis%, bAllow%) :"_BS_ISteamNetworking_AllowP2PPacketRelay@8"
@@ -0,0 +1,21 @@
; BlitzSteam - Steam wrapper for Blitz
; Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
;
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU Lesser General Public License as
; published by the Free Software Foundation, either version 3 of the
; License, or (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public License
; along with this program. If not, see <http:;www.gnu.org/licenses/>.
.lib "BlitzSteam.dll"
; RemoteStorage ---------------------------------------------------------------
BS_SteamRemoteStorage%() :"_BS_SteamRemoteStorage@0"
; Todo
@@ -0,0 +1,21 @@
; BlitzSteam - Steam wrapper for Blitz
; Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
;
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU Lesser General Public License as
; published by the Free Software Foundation, either version 3 of the
; License, or (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public License
; along with this program. If not, see <http:;www.gnu.org/licenses/>.
.lib "BlitzSteam.dll"
; Screenshots -----------------------------------------------------------------
BS_SteamScreenshots%() :"_BS_SteamScreenshots@0"
; Todo
+22
View File
@@ -0,0 +1,22 @@
; BlitzSteam - Steam wrapper for Blitz
; Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
;
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU Lesser General Public License as
; published by the Free Software Foundation, either version 3 of the
; License, or (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public License
; along with this program. If not, see <http:;www.gnu.org/licenses/>.
.lib "BlitzSteam.dll"
; UGC -------------------------------------------------------------------------
BS_SteamUGC%() :"_BS_SteamUGC@0"
BS_SteamGameServerUGC%() :"_BS_SteamGameServerUGC@0"
; Todo
@@ -0,0 +1,20 @@
; BlitzSteam - Steam wrapper for Blitz
; Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
;
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU Lesser General Public License as
; published by the Free Software Foundation, either version 3 of the
; License, or (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public License
; along with this program. If not, see <http:;www.gnu.org/licenses/>.
.lib "BlitzSteam.dll"
; UnifiedMessages -------------------------------------------------------------
BS_SteamUnifiedMessages%() :"_BS_SteamUnifiedMessages@0"
@@ -0,0 +1,49 @@
; BlitzSteam - Steam wrapper for Blitz
; Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
;
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU Lesser General Public License as
; published by the Free Software Foundation, either version 3 of the
; License, or (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public License
; along with this program. If not, see <http:;www.gnu.org/licenses/>.
.lib "BlitzSteam.dll"
; User ------------------------------------------------------------------------
BS_SteamUser%() :"_BS_SteamUser@0"
BS_ISteamUser_GetHSteamUser%(pThis%) :"_BS_ISteamUser_GetHSteamUser@4"
BS_ISteamUser_IsLoggedOn%(pThis%) :"_BS_ISteamUser_IsLoggedOn@4"
BS_ISteamUser_GetSteamID%(pThis%) :"_BS_ISteamUser_GetSteamID@4"
BS_ISteamUser_InitiateGameConnection%(pThis%, pAuthBlob*, iAuthBlobSize%, lSteamId%, iIp%, sPort%, bSecure%):"_BS_ISteamUser_InitiateGameConnection@28"
BS_ISteamUser_InitiateGameConnectionEx%(pThis%, pAuthBlob%, iAuthBlobSize%, lSteamId%, iIp%, sPort%, bSecure%):"_BS_ISteamUser_InitiateGameConnection@28"
BS_ISteamUser_TerminateGameConnection(pThis%, iIp%, sPort%) :"_BS_ISteamUser_TerminateGameConnection@12"
BS_ISteamUser_TrackAppUsageEvent(pThis%, iAppId%, EAppUsageEvent%, cExtraInfo$) :"_BS_ISteamUser_TrackAppUsageEvent@16"
BS_ISteamUser_GetUserDataFolder%(pThis%, pBuffer*, iBufferSize%) :"_BS_ISteamUser_GetUserDataFolder@12"
BS_ISteamUser_StartVoiceRecording(pThis%) :"_BS_ISteamUser_StartVoiceRecording@4"
BS_ISteamUser_StopVoiceRecording(pThis%) :"_BS_ISteamUser_StopVoiceRecording@4"
BS_ISteamUser_GetAvailableVoice%(pThis%, pCompressed*, pUncompressed*, nDesiredSampleRate%):"_BS_ISteamUser_GetAvailableVoice@16"
BS_ISteamUser_GetAvailableVoiceEx%(pThis%, pCompressed%, pUncompressed%, nDesiredSampleRate%):"_BS_ISteamUser_GetAvailableVoice@16"
BS_ISteamUser_GetVoice%(pThis%, bCompressed%, pCompressed*, iCompressedSize%, piCompressedBytesWritten*, bUncompressed%, pUncompressed*, iUncompressedSize%, piUncompressedBytesWritten*, iSampleRate%):"_BS_ISteamUser_GetVoice@36"
BS_ISteamUser_GetVoiceEx%(pThisEx%, bCompressed%, pCompressed%, iCompressedSize%, piCompressedBytesWritten%, bUncompressed%, pUncompressed%, iUncompressedSize%, piUncompressedBytesWritten%, iSampleRate%):"_BS_ISteamUser_GetVoice@36"
BS_ISteamUser_DecompressVoice(pThis%, pCompressed*, iCompressedSize%, pUncompressed*, iUncompressedSize%, iUncompressedBytesWritten*, iSampleRate%):"_BS_ISteamUser_DecompressVoice@28"
BS_ISteamUser_DecompressVoiceEx(pThis%, pCompressed*, iCompressedSize%, pUncompressed%, iUncompressedSize%, iUncompressedBytesWritten%, iSampleRate%):"_BS_ISteamUser_DecompressVoice@28"
BS_ISteamUser_GetVoiceOptimalSampleRate%(pThis%) :"_BS_ISteamUser_GetVoiceOptimalSampleRate@4"
BS_ISteamUser_GetAuthSessionTicket%(pThis%, pTicket*, iTicketSize%, piTicketSize*):"_BS_ISteamUser_GetAuthSessionTicket@12"
BS_ISteamUser_BeginAuthSession%(pThis%, pAuthTicket*, iAuthTicketSize%, lSteamId%):"_BS_ISteamUser_BeginAuthSession@16"
BS_ISteamUser_EndAuthSession(pThis%, lSteamId%) :"_BS_ISteamUser_EndAuthSession@8"
BS_ISteamUser_CancelAuthTicket(pThis%, hAuthTicket%) :"_BS_ISteamUser_CancelAuthTicket@8"
BS_ISteamUser_UserHasLicenseForApp%(pThis%, lSteamId%, iAppId%) :"_BS_ISteamUser_UserHasLicenseForApp@12"
BS_ISteamUser_IsBehindNAT%(pThis%) :"_BS_ISteamUser_IsBehindNAT@4"
BS_ISteamUser_AdvertiseGame%(pThis%, lSteamId%, iIp%, sPort%) :"_BS_ISteamUser_AdvertiseGame@16"
BS_ISteamUser_RequestEncryptedAppTicket%(pThis%, pData*, iDataSize%) :"_BS_ISteamUser_RequestEncryptedAppTicket@12"
BS_ISteamUser_GetEncryptedAppTicket%(pThis%, pTicket*, iTicketSize%, piTicketSize*):"_BS_ISteamUser_GetEncryptedAppTicket@16"
BS_ISteamUser_GetGameBadgeLevel%(pThis%, iSeries%, bFoil%) :"_BS_ISteamUser_GetGameBadgeLevel@12"
BS_ISteamUser_GetPlayerSteamLevel%(pThis%) :"_BS_ISteamUser_GetPlayerSteamLevel@4"
BS_ISteamUser_RequestStoreAuthURL%(pThis%, cRedirectUrl$) :"_BS_ISteamUser_RequestStoreAuthURL@8"
@@ -0,0 +1,77 @@
; BlitzSteam - Steam wrapper for Blitz
; Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
;
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU Lesser General Public License as
; published by the Free Software Foundation, either version 3 of the
; License, or (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public License
; along with this program. If not, see <http:;www.gnu.org/licenses/>.
.lib "BlitzSteam.dll"
; UserStats -------------------------------------------------------------------
BS_UserStats%() :"_BS_UserStats@0"
BS_UserStats_RequestCurrentStats%(pThis%) :"_BS_UserStats_RequestCurrentStats@4"
BS_UserStats_GetStat%(pThis%, cName$, pData*) :"_BS_UserStats_GetStat@12"
BS_UserStats_GetStatEx%(pThis%, cName$, pData%) :"_BS_UserStats_GetStat@12"
BS_UserStats_GetStatF%(pThis%, cName$, pData*) :"_BS_UserStats_GetStatF@12"
BS_UserStats_GetStatFEx%(pThis%, cName$, pData%) :"_BS_UserStats_GetStatF@12"
BS_UserStats_SetStat%(pThis%, cName$, pData%) :"_BS_UserStats_SetStat@12"
BS_UserStats_SetStatF%(pThis%, cName$, pData#) :"_BS_UserStats_SetStatF@12"
BS_UserStats_UpdateAvgRateStat%(pThis%, cName$, fCountThisSession#, dSessionLength%):"_BS_UserStats_UpdateAvgRateStat@16"
BS_UserStats_GetAchievement%(pThis%, cName$, pbAchieved*) :"_BS_UserStats_GetAchievement@12"
BS_UserStats_GetAchievementEx%(pThis%, cName$, pbAchieved%) :"_BS_UserStats_GetAchievement@12"
BS_UserStats_SetAchievement%(pThis%, cName$) :"_BS_UserStats_SetAchievement@8"
BS_UserStats_ClearAchievement%(pThis%, cName$) :"_BS_UserStats_ClearAchievement@8"
BS_UserStats_GetAchievementAndUnlockTime%(pThis%, cName$, pbAchieved*, piUnlockTime*):"_BS_UserStats_GetAchievementAndUnlockTime@16"
BS_UserStats_GetAchievementAndUnlockTimeEx%(pThis%, cName$, pbAchieved%, piUnlockTime%):"_BS_UserStats_GetAchievementAndUnlockTime@16"
BS_UserStats_StoreStats%(pThis%) :"_BS_UserStats_StoreStats@4"
BS_UserStats_GetAchievementIcon%(pThis%, cName$) :"_BS_UserStats_GetAchievementIcon@8"
BS_UserStats_GetAchievementDisplayAttribute$(pThis%, cName$, cKey$) :"_BS_UserStats_GetAchievementDisplayAttribute@12"
BS_UserStats_IndicateAchievementProgress%(pThis%, cName$, iProgress%, iMaxProgress%):"_BS_UserStats_IndicateAchievementProgress@16"
BS_UserStats_GetNumAchievements%(pThis%) :"_BS_UserStats_GetNumAchievements@4"
BS_UserStats_GetAchievementName$(pThis%, iAchievement%) :"_BS_UserStats_GetAchievementName@8"
BS_UserStats_RequestUserStats%(pThis%, lSteamId%) :"_BS_UserStats_RequestUserStats@8"
BS_UserStats_GetUserStat%(pThis%, lSteamId%, cName$, pData*) :"_BS_UserStats_GetUserStat@16"
BS_UserStats_GetUserStatEx%(pThis%, lSteamId%, cName$, pData%) :"_BS_UserStats_GetUserStat@16"
BS_UserStats_GetUserStatF%(pThis%, lSteamId%, cName$, pData*) :"_BS_UserStats_GetUserStatF@16"
BS_UserStats_GetUserStatFEx%(pThis%, lSteamId%, cName$, pData%) :"_BS_UserStats_GetUserStatF@16"
BS_UserStats_GetUserAchievement%(pThis%, lSteamId%, cName$, pbAchieved*) :"_BS_UserStats_GetUserAchievement@16"
BS_UserStats_GetUserAchievementEx%(pThis%, lSteamId%, cName$, pbAchieved%) :"_BS_UserStats_GetUserAchievement@16"
BS_UserStats_GetUserAchievementAndUnlockTime%(pThis%, lSteamId%, cName$, pbAchieved*, piUnlockTime*):"_BS_UserStats_GetUserAchievementAndUnlockTime@20"
BS_UserStats_GetUserAchievementAndUnlockTimeEx%(pThis%, lSteamId%, cName$, pbAchieved%, piUnlockTime%):"_BS_UserStats_GetUserAchievementAndUnlockTime@20"
BS_UserStats_ResetAllStats%(pThis%, bAchievementsToo%) :"_BS_UserStats_ResetAllStats@8"
BS_UserStats_FindOrCreateLeaderboard%(pThis%, cLeaderboardName$, eLeaderboardSortMethod%, eLeaderboardDisplayType%):"_BS_UserStats_FindOrCreateLeaderboard@16"
BS_UserStats_FindLeaderboard%(pThis%, cLeaderboardName$) :"_BS_UserStats_FindLeaderboard@8"
BS_UserStats_GetLeaderboardName$(pThis%, hSteamLeaderboard%) :"_BS_UserStats_GetLeaderboardName@8"
BS_UserStats_GetLeaderboardEntryCount%(pThis%, hSteamLeaderboard%) :"_BS_UserStats_GetLeaderboardEntryCount@8"
BS_UserStats_GetLeaderboardSortMethod%(pThis%, hSteamLeaderboard%) :"_BS_UserStats_GetLeaderboardSortMethod@8"
BS_UserStats_GetLeaderboardDisplayType%(pThis%, hSteamLeaderboard%) :"_BS_UserStats_GetLeaderboardDisplayType@8"
BS_UserStats_DownloadLeaderboardEntries%(pThis%, hSteamLeaderboard%, eLeaderboardDataRequest%, iRangeStart%, iRangeEnd%):"_BS_UserStats_DownloadLeaderboardEntries@20"
BS_UserStats_DownloadLeaderboardEntriesForUsers%(pThis%, hSteamLeaderboard%, plUsers*, iUserCount%):"_BS_UserStats_DownloadLeaderboardEntriesForUsers@16"
BS_UserStats_DownloadLeaderboardEntriesForUsersEx%(pThis%, hSteamLeaderboard%, plUsers%, iUserCount%):"_BS_UserStats_DownloadLeaderboardEntriesForUsers@16"
BS_UserStats_GetDownloadedLeaderboardEntry%(lpSteamUsers%, hSteamLeaderboardEntries%, iIndex%, pLeaderboardEntry*, pDetails*, iDetailsMax%):"_BS_UserStats_GetDownloadedLeaderboardEntry@24"
BS_UserStats_GetDownloadedLeaderboardEntryEx%(lpSteamUsers%, hSteamLeaderboardEntries%, iIndex%, pLeaderboardEntry%, pDetails%, iDetailsMax%):"_BS_UserStats_GetDownloadedLeaderboardEntry@24"
BS_UserStats_UploadLeaderboardScore%(pThis%, hSteamLeaderboard%, eLeaderboardUploadScoreMethod%, iScore%, pScoreDetails*, iScoreDetailsCount%):"_BS_UserStats_UploadLeaderboardScore@24"
BS_UserStats_UploadLeaderboardScoreEx%(pThis%, hSteamLeaderboard%, eLeaderboardUploadScoreMethod%, iScore%, pScoreDetails%, iScoreDetailsCount%):"_BS_UserStats_UploadLeaderboardScore@24"
BS_UserStats_AttachLeaderboardUGC%(pThis%, hSteamLeaderboard%, hUGC%) :"_BS_UserStats_AttachLeaderboardUGC@12"
BS_UserStats_GetNumberOfCurrentPlayers%(pThis%) :"_BS_UserStats_GetNumberOfCurrentPlayers@4"
BS_UserStats_RequestGlobalAchievementPercentages%(pThis%) :"_BS_UserStats_RequestGlobalAchievementPercentages@4"
BS_UserStats_GetMostAchievedAchievementInfo%(pThis%, cName$, iNameLength%, pfPercent*, pbAchieved*):"_BS_UserStats_GetMostAchievedAchievementInfo@20"
BS_UserStats_GetMostAchievedAchievementInfoEx%(pThis%, cName$, iNameLength%, pfPercent%, pbAchieved%):"_BS_UserStats_GetMostAchievedAchievementInfo@20"
BS_UserStats_GetNextMostAchievedAchievementInfo%(pThis%, iIteratorPrevious%, cName$, iNameLength%, pfPercent*, pbAchieved*):"_BS_UserStats_GetNextMostAchievedAchievementInfo@24"
BS_UserStats_GetNextMostAchievedAchievementInfoEx%(pThis%, iIteratorPrevious%, cName$, iNameLength%, pfPercent%, pbAchieved%):"_BS_UserStats_GetNextMostAchievedAchievementInfo@24"
BS_UserStats_GetAchievementAchievedPercent%(pThis%, cName$, pfPercent*) :"_BS_UserStats_GetAchievementAchievedPercent@12"
BS_UserStats_GetAchievementAchievedPercentEx%(pThis%, cName$, pfPercent%) :"_BS_UserStats_GetAchievementAchievedPercent@12"
BS_UserStats_RequestGlobalStats%(pThis%, iHistoryDays%) :"_BS_UserStats_RequestGlobalStats@8"
BS_UserStats_GetGlobalStatL%(pThis, cStatName$, plData%) :"_BS_UserStats_GetGlobalStatL@12"
BS_UserStats_GetGlobalStatD%(pThis, cStatName$, pdData%) :"_BS_UserStats_GetGlobalStatD@12"
BS_UserStats_GetGlobalStatHistoryL%(pThis, cStatName$, plDataArray%, iDataSize%):"BS_UserStats_GetGlobalStatHistoryL@16"
BS_UserStats_GetGlobalStatHistoryD%(pThis, cStatName$, pdDataArray%, iDataSize%):"BS_UserStats_GetGlobalStatHistoryD@16"
@@ -0,0 +1,21 @@
; BlitzSteam - Steam wrapper for Blitz
; Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
;
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU Lesser General Public License as
; published by the Free Software Foundation, either version 3 of the
; License, or (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public License
; along with this program. If not, see <http:;www.gnu.org/licenses/>.
.lib "BlitzSteam.dll"
; Utils -----------------------------------------------------------------------
BS_SteamUtils%() :"_BS_SteamUtils@0"
BS_SteamGameServerUtils%() :"_BS_SteamGameServerUtils@0"
@@ -0,0 +1,20 @@
; BlitzSteam - Steam wrapper for Blitz
; Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
;
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU Lesser General Public License as
; published by the Free Software Foundation, either version 3 of the
; License, or (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public License
; along with this program. If not, see <http:;www.gnu.org/licenses/>.
.lib "BlitzSteam.dll"
; Utils -----------------------------------------------------------------------
BS_SteamVideo%() :"_BS_SteamVideo@0"
+3 -3
View File
@@ -17,7 +17,7 @@
Include "../BlitzSteam.bb"
; Initialize Steam before your next call to Graphics.
If BS_Steam_Init() = False Then
If BS_SteamAPI_Init() = False Then
RuntimeError "Steam: Failed to initialize!"
EndIf
@@ -28,7 +28,7 @@ Const FPS_MULT# = 1.0 / FPS
Graphics3D 1024, 768, 32, 2
SetBuffer BackBuffer()
Local tickTimer = CreateTimer(FPS)
Local demoTimer = CreateTimer(FPS)
Local demoRoot = CreatePivot()
@@ -60,7 +60,7 @@ Repeat
Until EndGame = True
; Shut down Steam as the last action of your program.
BS_Steam_Shutdown()
BS_SteamAPI_Shutdown()
End
;~IDEal Editor Parameters:
;~C#Blitz3D
+7 -7
View File
@@ -17,7 +17,7 @@
Include "../BlitzSteam.bb"
; Initialize Steam before your next call to Graphics.
If BS_Steam_Init() = False Then
If BS_SteamAPI_Init() = False Then
RuntimeError "Steam: Failed to initialize!"
EndIf
@@ -48,24 +48,24 @@ End Type
Global SteamAppList_Count%
Function SteamAppList_Fill()
SteamAppList_Count = BS_AppList_GetNumInstalledApps(BS_AppList())
SteamAppList_Count = BS_ISteamAppList_GetNumInstalledApps(BS_SteamAppList())
Local Buffer = CreateBank(4 * SteamAppList_Count)
Local AppNameBuffer = CreateBank(1024)
Local PathBuffer = CreateBank(260)
Local AppIdCount = BS_AppList_GetInstalledApps(BS_AppList(), Buffer, SteamAppList_Count)
Local AppIdCount = BS_ISteamAppList_GetInstalledApps(BS_SteamAppList(), Buffer, SteamAppList_Count)
Delete Each SteamAppList
For Index = 0 To AppIdCount - 1
Local AppId = PeekInt(Buffer, Index*4)
Local SAL.SteamAppList = New SteamAppList
SAL\AppId = AppId
Local AppNameLen = BS_AppList_GetAppName(BS_AppList(), AppId, AppNameBuffer, 1024)
Local AppNameLen = BS_ISteamAppList_GetAppName(BS_SteamAppList(), AppId, AppNameBuffer, 1024)
SAL\Name = PeekCString(AppNameBuffer, 0, AppNameLen)
Local PathLen = BS_AppList_GetAppInstallDir(BS_AppList(), AppId, PathBuffer, 260)
Local PathLen = BS_ISteamAppList_GetAppInstallDir(BS_SteamAppList(), AppId, PathBuffer, 260)
SAL\InstallDir = PeekCString(PathBuffer, 0, PathLen)
SAL\BuildId = BS_AppList_GetAppBuildId(BS_AppList(), AppId)
SAL\BuildId = BS_ISteamAppList_GetAppBuildId(BS_SteamAppList(), AppId)
Next
FreeBank AppNameBuffer
@@ -122,7 +122,7 @@ Repeat
Until EndGame = True
; Shut down Steam as the last action of your program.
BS_Steam_Shutdown()
BS_SteamAPI_Shutdown()
End
;~IDEal Editor Parameters:
;~C#Blitz3D
+25 -25
View File
@@ -17,7 +17,7 @@
Include "../BlitzSteam.bb"
; Initialize Steam before your next call to Graphics.
If BS_Steam_Init() = False Then
If BS_SteamAPI_Init() = False Then
RuntimeError "Steam: Failed to initialize!"
EndIf
@@ -48,10 +48,10 @@ Function SteamAppsDLC_Fill()
Local AvailableBuffer = CreateBank(4)
Local NameBuffer = CreateBank(1024)
SteamAppsDLC_Count = BS_Apps_GetDLCCount(BS_Apps())
SteamAppsDLC_Count = BS_ISteamApps_GetDLCCount(BS_SteamApps())
Delete Each SteamAppsDLC
For Index = 0 To SteamAppsDLC_Count - 1
If BS_Apps_GetDLCDataByIndex(BS_Apps(), Index, IdBuffer, AvailableBuffer, NameBuffer, 1024)
If BS_ISteamApps_GetDLCDataByIndex(BS_SteamApps(), Index, IdBuffer, AvailableBuffer, NameBuffer, 1024)
Local SAD.SteamAppsDLC = New SteamAppsDLC
SAD\Id = PeekInt(IdBuffer, 0)
SAD\Available = PeekInt(AvailableBuffer, 0)
@@ -94,16 +94,16 @@ Function PeekCString$(Bank, Offset=0, Length=-1)
End Function
Local BetaBuffer = CreateBank(1024)
BS_Apps_GetCurrentBetaName(BS_Apps(), BetaBuffer, 1024)
BS_ISteamApps_GetCurrentBetaName(BS_SteamApps(), BetaBuffer, 1024)
Local Beta$ = PeekCString(BetaBuffer, 0, 1024)
FreeBank BetaBuffer
Local AppInstallDir$, AppInstallDirBuffer = CreateBank(260)
BS_Apps_GetAppInstallDir(BS_Apps(), 480, AppInstallDirBuffer, 260)
BS_ISteamApps_GetAppInstallDir(BS_SteamApps(), 480, AppInstallDirBuffer, 260)
AppInstallDir = PeekCString(AppInstallDirBuffer, 0, 260)
FreeBank AppInstallDirBuffer
Local llOwner = BS_Apps_GetAppOwner(BS_Apps())
Local llOwner = BS_ISteamApps_GetAppOwner(BS_SteamApps())
Local OwnerId$ = "[U:" + BS_CSteamID_GetAccountInstance(llOwner) + ":" + BS_CSteamID_GetAccountID(llOwner) + "] STEAM_" + (BS_CSteamID_GetEAccountType(llOwner) - 1) + ":" + (BS_CSteamID_GetEUniverse(llOwner) - 1) + ":" + (BS_CSteamID_GetAccountID(llOwner) / 2)
BS_CSteamID_Destroy llOwner
@@ -124,32 +124,32 @@ Repeat
;! Render 2D
Text 0, 0, "Escape to Quit"
Text 0, 30, "Is Subscribed? " + BS_Apps_IsSubscribed(BS_Apps())
Text 0, 45, "Is Low Violence? " + BS_Apps_IsLowViolence(BS_Apps())
Text 0, 60, "Is Cybercafe? " + BS_Apps_IsCybercafe(BS_Apps())
Text 0, 75, "Is VAC Banned? " + BS_Apps_IsVACBanned(BS_Apps())
Text 0, 90, "Current Game Language: " + BS_Apps_GetCurrentGameLanguage(BS_Apps())
Text 0,105, "Available Game Languages: " + BS_Apps_GetAvailableGameLanguages(BS_Apps())
Text 0,120, "Is Subscribed App (480)? " + BS_Apps_IsSubscribedApp(BS_Apps(), 480)
Text 0,135, "Is DLC (323180) Installed? " + BS_Apps_IsDlcInstalled(BS_Apps(), 323180) ; Portal 2 Soundtrack DLC
Text 0,150, "Earliest Purchase Unix Time (480): " + BS_Apps_GetEarliestPurchaseUnixTime(BS_Apps(), 480)
Text 0,165, "Is Subscribed from Free Weekend? " + BS_Apps_IsSubscribedFromFreeWeekend(BS_Apps())
Text 0,180, "DLC Count: " + BS_Apps_GetDLCCount(BS_Apps())
Text 0, 30, "Is Subscribed? " + BS_ISteamApps_IsSubscribed(BS_SteamApps())
Text 0, 45, "Is Low Violence? " + BS_ISteamApps_IsLowViolence(BS_SteamApps())
Text 0, 60, "Is Cybercafe? " + BS_ISteamApps_IsCybercafe(BS_SteamApps())
Text 0, 75, "Is VAC Banned? " + BS_ISteamApps_IsVACBanned(BS_SteamApps())
Text 0, 90, "Current Game Language: " + BS_ISteamApps_GetCurrentGameLanguage(BS_SteamApps())
Text 0,105, "Available Game Languages: " + BS_ISteamApps_GetAvailableGameLanguages(BS_SteamApps())
Text 0,120, "Is Subscribed App (480)? " + BS_ISteamApps_IsSubscribedApp(BS_SteamApps(), 480)
Text 0,135, "Is DLC (323180) Installed? " + BS_ISteamApps_IsDlcInstalled(BS_SteamApps(), 323180) ; Portal 2 Soundtrack DLC
Text 0,150, "Earliest Purchase Unix Time (480): " + BS_ISteamApps_GetEarliestPurchaseUnixTime(BS_SteamApps(), 480)
Text 0,165, "Is Subscribed from Free Weekend? " + BS_ISteamApps_IsSubscribedFromFreeWeekend(BS_SteamApps())
Text 0,180, "DLC Count: " + BS_ISteamApps_GetDLCCount(BS_SteamApps())
Text 0,195, "Current Beta Name: " + Beta
Text 0,210, "App Install Dir: " + AppInstallDir$
Text 0,225, "Is App Installed (480): " + BS_Apps_IsAppInstalled(BS_Apps(), 480)
Text 0,225, "Is App Installed (480): " + BS_ISteamApps_IsAppInstalled(BS_SteamApps(), 480)
Text 0,240, "App Owner Id: " + OwnerId
Text 0,255, "App Built Id: " + BS_Apps_GetAppBuildId(BS_Apps())
Text 0,255, "App Built Id: " + BS_ISteamApps_GetAppBuildId(BS_SteamApps())
; BS_Apps_GetLanchQueryParam$(BS_Apps(), pchKey$)
; BS_ISteamApps_GetLanchQueryParam$(BS_SteamApps(), pchKey$)
; // Returns the associated launch param if the game is run via steam://run/<appid>//?param1=value1;param2=value2;param3=value3 etc.
; // 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,
; // but it is advised that you not param names beginning with an underscore for your own features.
; BS_Apps_MarkContentCorrupt signals steam that game files are corrupt or missing. Forces a validation after quit and before next start.
; BS_ISteamApps_MarkContentCorrupt signals steam that game files are corrupt or missing. Forces a validation after quit and before next start.
; How To Use: BS_Apps_RequestProofOfPurchaseKey(BS_Apps(), nAppId)
; How To Use: BS_ISteamApps_RequestProofOfPurchaseKey(BS_SteamApps(), nAppId)
; // Request cd-key for yourself or owned DLC. If you are interested in this
; // data then make sure you provide us with a list of valid keys to be distributed
; // to users when they purchase the game, before the game ships.
@@ -161,8 +161,8 @@ Repeat
Local Index = 0, SAD.SteamAppsDLC
For SAD = Each SteamAppsDLC
Text 512, 15 + Index * 15, SAD\Id + "(" + SAD\Available + "): " + SAD\Name
; You could install DLCs from the app itself, BS_Apps_InstallDLC, BS_Apps_UninstallDLC
; BS_Apps_GetDlcDownloadProgress allows you to check the progress, BlitzUtility's LongLong stuff is useful here.
; You could install DLCs from the app itself, BS_ISteamApps_InstallDLC, BS_ISteamApps_UninstallDLC
; BS_ISteamApps_GetDlcDownloadProgress allows you to check the progress, BlitzUtility's LongLong stuff is useful here.
Index = Index + 1
Next
@@ -173,7 +173,7 @@ Repeat
Until EndGame = True
; Shut down Steam as the last action of your program.
BS_Steam_Shutdown()
BS_SteamAPI_Shutdown()
End
;~IDEal Editor Parameters:
;~C#Blitz3D
@@ -19,7 +19,7 @@ Include "../BlitzSteam.bb"
;! Example is incomplete, I do not own a Steam Controller.
; Initialize Steam before your next call to Graphics.
If BS_Steam_Init() = False Then
If BS_SteamAPI_Init() = False Then
RuntimeError "Steam: Failed to initialize!"
EndIf
@@ -30,7 +30,7 @@ Const FPS_MULT# = 1.0 / FPS
Graphics3D 1024, 768, 32, 2
SetBuffer BackBuffer()
Local tickTimer = CreateTimer(FPS)
Local demoTimer = CreateTimer(FPS)
Local demoRoot = CreatePivot()
@@ -62,7 +62,7 @@ Repeat
Until EndGame = True
; Shut down Steam as the last action of your program.
BS_Steam_Shutdown()
BS_SteamAPI_Shutdown()
End
;~IDEal Editor Parameters:
;~C#Blitz3D
+262 -150
View File
@@ -1,5 +1,4 @@
Include "../BlitzSteam.bb"
Stop
;----------------------------------------------------------------
;! Steam Stuff
@@ -47,50 +46,181 @@ Function PeekMemoryStringC(Memory%, Length%=-1)
End Function
;----------------------------------------------------------------
;! Blitz Browser Wrapper (Image based)
;! SteamBrowser (Image & Texture Drawing)
;----------------------------------------------------------------
Type Browser
Field Id%
Global SteamBrowser_Callback_BrowserReady_p = 0, SteamBrowser_Callback_BrowserReady_c = 0
Global SteamBrowser_Callback_NeedsPaint_p = 0, SteamBrowser_Callback_NeedsPaint_c = 0
Global SteamBrowser_Callback_StartRequest_p = 0, SteamBrowser_Callback_StartRequest_c = 0
Type SteamBrowser
Field Id%, lSteamAPICall%
Field Size%[1] ;Width, Height
Field URL$
Field ImageHandle%, ImageSize[2]
; CEF Stuff
Field UpdateRegion[3] ;X,Y,W,H
Field Serial%, Scale#, ScrollX%, ScrollY%
; Internal Steam
Field z_llSteamAPICall%
; Image Based
Field hImage%
; Texture Based
Field hTexture%
End Type
Global Browser_HTMLSurface_BrowserReady_p = 0, Browser_HTMLSurface_BrowserReady_c = 0
Function Browser_HTMLSurface_BrowserReady(pvParam%, bIOFailure, llSteamAPICall)
If (Browser_HTMLSurface_BrowserReady_p = 0) Then
Browser_HTMLSurface_BrowserReady_p = BP_GetFunctionPointer()
Browser_HTMLSurface_BrowserReady_c = BS_Callback_Create(Browser_HTMLSurface_BrowserReady_p)
Return
EndIf
Function SteamBrowser_Create.SteamBrowser(Width%, Height%, URL$="http://google.com/", UserAgent$="SteamBrowser", UserCSS$="")
; Create our Object
Local SB.SteamBrowser = New SteamBrowser
SB\Id = 0 ; Initialize to 0 until the Browser is ready.
SB\Size[0] = Width
SB\Size[1] = Height
SB\URL = URL
SB\lSteamAPICall = BS_ISteamHTMLSurface_CreateBrowser(BS_SteamHTMLSurface(), UserAgent, UserCSS)
DebugLog "HTMLSurface_BrowserReady"
; We need to register our callbacks, or nothing will work.
BS_Callback_RegisterResult SteamBrowser_Callback_BrowserReady_c, SB\lSteamAPICall, BS_SteamHTMLSurface_BrowserReady ; Listen to the result of the last SteamAPICall.
BS_Callback_Register SteamBrowser_Callback_NeedsPaint_c, BS_SteamHTMLSurface_NeedsPaint
BS_Callback_Register SteamBrowser_Callback_StartRequest_c, BS_SteamHTMLSurface_StartRequest
Local Browser.Browser = Browser_FindBySteamAPICall(llSteamAPICall)
Browser\Id = PeekMemoryInt(pvParam)
Browser_LoadURL(Browser, "http://google.com/")
Browser_SetSize(Browser, Browser\ImageSize[0], Browser\ImageSize[1])
; Image Based
SB\hImage = CreateImage(SB\Size[0], SB\Size[1])
; Texture Based
SB\hTexture = CreateTexture(SB\Size[0], SB\Size[1], 1+2)
; Cleanup
BS_Long_Destroy Browser\z_llSteamAPICall : Browser\z_llSteamAPICall = 0
BS_Callback_UnregisterResult Browser_HTMLSurface_BrowserReady_c ; Caller does this too.
End Function:Browser_HTMLSurface_BrowserReady(0, 0, 0)
Return SB
End Function
Global Browser_HTMLSurface_NeedsPaint_p = 0, Browser_HTMLSurface_NeedsPaint_c = 0
Function Browser_HTMLSurface_NeedsPaint(pvParam%, p2, p3)
If (Browser_HTMLSurface_NeedsPaint_p = 0) Then
Browser_HTMLSurface_NeedsPaint_p = BP_GetFunctionPointer()
Browser_HTMLSurface_NeedsPaint_c = BS_Callback_Create(Browser_HTMLSurface_NeedsPaint_p)
Function SteamBrowser_Destroy(SB.SteamBrowser)
; Texture Based
FreeTexture SB\hTexture
; Image Based
FreeImage SB\hImage
BS_ISteamHTMLSurface_RemoveBrowser BS_SteamHTMLSurface(), SB\Id
Delete SB
End Function
Function SteamBrowser_Find.SteamBrowser(iId%, lSteamAPICall%)
Local SB.SteamBrowser = Null
; Find by Id
If iId <> 0
For SB.SteamBrowser = Each SteamBrowser
If (SB\Id = iId) Then
Return SB
EndIf
Next
EndIf
; Find by SteamAPICall
If lSteamAPICall <> 0
For SB.SteamBrowser = Each SteamBrowser
If (SB\lSteamAPICall <> 0) And (BS_Long_Compare(lSteamAPICall, SB\lSteamAPICall) = 0) Then
Return SB
EndIf
Next
EndIf
Return Null
End Function
Function SteamBrowser_SetSize(SB.SteamBrowser, Width%, Height%)
SB\Size[0] = Width
SB\Size[1] = Height
; Update Browser Size
BS_ISteamHTMLSurface_SetSize BS_SteamHTMLSurface(), SB\Id, Width, Height
; Image Based
FreeImage(SB\hImage)
SB\hImage = CreateImage(Width, Height)
; Texture Based
FreeTexture(SB\hTexture)
SB\hTexture = CreateTexture(Width, Height, 1+2)
End Function
Function SteamBrowser_LoadUrl(SB.SteamBrowser, URL$, PostData$="")
BS_ISteamHTMLSurface_LoadURL BS_SteamHTMLSurface(), SB\Id, URL, PostData
End Function
Function SteamBrowser_IsReady(SB.SteamBrowser)
Return (SB\Id <> 0)
End Function
Function SteamBrowser_GetImageHandle(SB.SteamBrowser)
Return SB\hImage
End Function
Function SteamBrowser_GetTextureHandle(SB.SteamBrowser)
Return SB\hTexture
End Function
Function SteamBrowser_Callback_BrowserReady(pvParam%, bIOFailure, lSteamAPICall)
If (SteamBrowser_Callback_BrowserReady_p = 0) Then
SteamBrowser_Callback_BrowserReady_p = BP_GetFunctionPointer()
SteamBrowser_Callback_BrowserReady_c = BS_Callback_New(SteamBrowser_Callback_BrowserReady_p)
Return
EndIf
DebugLog "HTMLSurface_NeedsPaint"
; Search for a valid SteamBrowser object.
Local SB.SteamBrowser = SteamBrowser_Find(0, lSteamAPICall)
SB\Id = BS_Memory_PeekInt(pvParam, 0)
SteamBrowser_SetSize(SB, SB\Size[0], SB\Size[1])
SteamBrowser_LoadUrl(SB, SB\URL)
Local Browser.Browser = Browser_FindById(PeekMemoryInt(pvParam))
; Destroy our SteamAPICall pointer and clear the value.
BS_Long_Destroy(SB\lSteamAPICall):SB\lSteamAPICall = 0
End Function:SteamBrowser_Callback_BrowserReady(0, 0, 0)
Function SteamBrowser_Callback_NeedsPaint(pvParam%, p2, p3)
If (SteamBrowser_Callback_NeedsPaint_p = 0) Then
SteamBrowser_Callback_NeedsPaint_p = BP_GetFunctionPointer()
SteamBrowser_Callback_NeedsPaint_c = BS_Callback_New(SteamBrowser_Callback_NeedsPaint_p)
Return
EndIf
; Paint logic
; Search for a valid SteamBrowser object.
Local SB.SteamBrowser = SteamBrowser_Find(BS_Memory_PeekInt(pvParam, 0), 0)
; Parse Data from pvParam
Local pBuffer, pW, pH, pUpdateX, pUpdateY, pUpdateW, pUpdateH, pScrollX, pScrollY, pScale#, pSerial
pBuffer = BS_Memory_PeekInt(pvParam, 4)
pW = BS_Memory_PeekInt(pvParam, 8)
pH = BS_Memory_PeekInt(pvParam, 12)
pUpdateX = BS_Memory_PeekInt(pvParam, 16)
pUpdateY = BS_Memory_PeekInt(pvParam, 20)
pUpdateW = BS_Memory_PeekInt(pvParam, 24)
pUpdateH = BS_Memory_PeekInt(pvParam, 28)
pScrollX = BS_Memory_PeekInt(pvParam, 32)
pScrollY = BS_Memory_PeekInt(pvParam, 36)
pScale = BS_Memory_PeekFloat(pvParam, 40)
pSerial = BS_Memory_PeekInt(pvParam, 44)
; Assign to Object
SB\UpdateRegion[0] = pUpdateX
SB\UpdateRegion[1] = pUpdateY
SB\UpdateRegion[2] = pUpdateW
SB\UpdateRegion[3] = pUpdateH
SB\Scale = pScale
SB\ScrollX = pScrollX
SB\ScrollY = pScrollY
SB\Serial = pSerial
; Fix up Buffer Size (Always next bigger 16*n, for whatever reason (SIBLY WHAT DID YOU DO!?))
Local nW = (16 * Ceil(pW / 16.0))
;DebugLog ImageWidth(SB\hImage) + ":" + ImageHeight(SB\hImage)
; Image Based
Local hImageBuffer = ImageBuffer(SB\hImage)
LockBuffer hImageBuffer
BS_Helper_CopyMemoryIntMangle pBuffer, BS_Memory_PeekInt(hImageBuffer, 72), 0, pW, pH, nW, SB\Size[1], pUpdateX, pUpdateY, pUpdateW, pUpdateH
UnlockBuffer hImageBuffer
; Texture Based (Identical)
Local hTextureBuffer = ImageBuffer(SB\hImage)
LockBuffer hTextureBuffer
BS_Helper_CopyMemoryIntMangle pBuffer, BS_Memory_PeekInt(hTextureBuffer, 72), 0, pW, pH, nW, SB\Size[1], pUpdateX, pUpdateY, pUpdateW, pUpdateH
UnlockBuffer hTextureBuffer
; pvParam Structure
;CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the browser that needs the paint
;CALLBACK_MEMBER(1, const char *, pBGRA ) // a pointer to the B8G8R8A8 data for this surface, valid until SteamAPI_RunCallbacks is next called
;CALLBACK_MEMBER(2, uint32, unWide) // the total width of the pBGRA texture
@@ -103,167 +233,149 @@ Function Browser_HTMLSurface_NeedsPaint(pvParam%, p2, p3)
;CALLBACK_MEMBER(9, uint32, unScrollY) // the page scroll the browser was at when this texture was rendered
;CALLBACK_MEMBER(10, float, flPageScale) // the page scale factor on this page when rendered
;CALLBACK_MEMBER(11, uint32, unPageSerial) // incremented on each new page load, you can use this to reject draws while navigating to new pages
End Function:Browser_HTMLSurface_NeedsPaint(0, 0, 0)
End Function:SteamBrowser_Callback_NeedsPaint(0, 0, 0)
Global Browser_HTMLSurface_StartRequest_p = 0, Browser_HTMLSurface_StartRequest_c = 0
Function Browser_HTMLSurface_StartRequest(pvParam%, p2, p3)
If (Browser_HTMLSurface_StartRequest_p = 0) Then
Browser_HTMLSurface_StartRequest_p = BP_GetFunctionPointer()
Browser_HTMLSurface_StartRequest_c = BS_Callback_Create(Browser_HTMLSurface_StartRequest_p)
Function SteamBrowser_Callback_StartRequest(pvParam%, p2, p3)
If (SteamBrowser_Callback_StartRequest_p = 0) Then
SteamBrowser_Callback_StartRequest_p = BP_GetFunctionPointer()
SteamBrowser_Callback_StartRequest_c = BS_Callback_New(SteamBrowser_Callback_StartRequest_p)
Return
EndIf
DebugLog "HTMLSurface_StartRequest"
; Search for a valid SteamBrowser object.
Local SB.SteamBrowser = SteamBrowser_Find(BS_Memory_PeekInt(pvParam, 0), 0)
; Default to allow all requests. (Why not? For an Example, this is good enough.)
BS_HTMLSurface_AllowStartRequest BS_HTMLSurface(), PeekMemoryInt(pvParam), True
End Function:Browser_HTMLSurface_StartRequest(0, 0, 0)
; Could implement a simple filter using a second type, but why don't you experiment a bit?
BS_ISteamHTMLSurface_AllowStartRequest BS_SteamHTMLSurface(), SB\Id, True
End Function:SteamBrowser_Callback_StartRequest(0, 0, 0)
Function Browser_Create.Browser(Width%, Height, UserAgent$="BlitzSteam", UserCSS$="")
DebugLog "[Browser::Create] Creating with UserAgent '"+UserAgent+"' and CSS '"+UserCSS+"'."
; Register Callbacks (Can do this in an Init function too)
;BS_Callback_Register Browser_HTMLSurface_BrowserReady_c, BS_HTMLSurface_BrowserReady
BS_Callback_Register Browser_HTMLSurface_NeedsPaint_c, BS_HTMLSurface_NeedsPaint
BS_Callback_Register Browser_HTMLSurface_StartRequest_c, BS_HTMLSurface_StartRequest
; Create Browser Object
Local Browser.Browser = New Browser
Browser\z_llSteamAPICall = BS_HTMLSurface_CreateBrowser(BS_HTMLSurface(), UserAgent, UserCSS)
Browser\ImageSize[0] = Width
Browser\ImageSize[1] = Height
DebugLog "llSteamAPICall: " + Hex(BS_Long_ToIH(Browser\z_llSteamAPICall)) + Hex(BS_Long_ToIL(Browser\z_llSteamAPICall))
; Register CallResult
BS_Callback_RegisterResult Browser_HTMLSurface_BrowserReady_c, Browser\z_llSteamAPICall, BS_HTMLSurface_BrowserReady
Return Browser
End Function
Function Browser_IsReady(Browser.Browser)
If Browser = Null Then Return False
DebugLog "[Browser::IsReady] Checking if '"+Browser\Id+"'/'"+Hex(BS_Long_ToIH(Browser\z_llSteamAPICall)) + Hex(BS_Long_ToIL(Browser\z_llSteamAPICall))+"' is ready."
Return (Browser\Id <> 0)
End Function
Function Browser_FindById.Browser(Id%)
If Id = 0 Then Return Null ; 0 is not a valid Browser Handle.
DebugLog "[Browser::FindById] Finding by Id '"+Id+"."
Local Browser.Browser
For Browser = Each Browser
If Browser\Id = Id Then Return Browser
Next
Return Null
End Function
Function Browser_FindBySteamAPICall.Browser(llSteamAPICall%)
If llSteamAPICall = 0 Then Return Null ; 0 is not a valid SteamAPICall.
DebugLog "[Browser::FindBySteamAPICall] Finding by SteamAPICall '"+llSteamAPICall+"."
Local Browser.Browser
For Browser = Each Browser
If BS_Long_Compare(Browser\z_llSteamAPICall,llSteamAPICall) = 0 Then Return Browser
Next
Return Null
End Function
Function Browser_Destroy.Browser(Browser.Browser)
If Browser = Null Then Return Null
DebugLog "[Browser::Destroy] Destroying '"+Browser\Id+"'."
BS_HTMLSurface_RemoveBrowser BS_HTMLSurface(), Browser\Id
Delete Browser:Return Null
End Function
Function Browser_SetSize(Browser.Browser, Width%, Height%)
If Browser = Null Then Return
DebugLog "[Browser::SetSize] Resizing '"+Browser\Id+"' to "+Width+"x"+Height+"."
; Free old Image
If (Browser\ImageHandle <> 0) Then
FreeImage(Browser\ImageHandle)
EndIf
; Create new Image
Browser\ImageHandle = CreateImage(Width%, Height%)
Browser\ImageSize[0] = Width
Browser\ImageSize[1] = Height
BS_HTMLSurface_SetSize BS_HTMLSurface(), Browser\Id, Width, Height
End Function
Function Browser_GetHandle(Browser.Browser)
Return Browser\ImageHandle
End Function
Function Browser_LoadURL(Browser.Browser, URL$, PostData$="")
If Browser = Null Then Return
DebugLog "[Browser::SetSize] Browser '"+Browser\Id+"' is loading URL '"+URL+"'."
BS_HTMLSurface_LoadURL BS_HTMLSurface(), Browser\Id, URL, PostData
End Function
;----------------------------------------------------------------
;! Example Code
;----------------------------------------------------------------
If BS_Steam_Init() = 0 Then RuntimeError "Steam failed to initialize."
If BS_SteamAPI_Init() = 0 Then RuntimeError "Steam failed to initialize."
; Steam: Hooks, Callbacks, CallResults
BS_Client_SetWarningMessageHook BS_Client(), Steam_WarningMessageHook_Callback
BS_ISteamClient_SetWarningMessageHook BS_SteamClient(), Steam_WarningMessageHook_Callback
; Steam: HTMLSurface API
If BS_HTMLSurface() = 0 Then RuntimeError "Steam: HTMLSurface API is not available."
If BS_HTMLSurface_Init(BS_HTMLSurface()) = 0 Then RuntimeError "Steam: HTMLSurface API did not want to be initialized?!"
BS_HTMLSurface_SetSize BS_HTMLSurface(), 0, GraphicsWidth(), GraphicsHeight()
If BS_SteamHTMLSurface() = 0 Then RuntimeError "Steam: HTMLSurface API is not available."
If BS_ISteamHTMLSurface_Init(BS_SteamHTMLSurface()) = 0 Then RuntimeError "Steam: HTMLSurface API did not want to be initialized?!"
;BS_ISteamHTMLSurface_SetSize BS_SteamHTMLSurface(), 0, GraphicsWidth(), GraphicsHeight()
; Scene Setup
Graphics3D 1024, 768, 32, 2:SetBuffer BackBuffer()
Const FPS = 60
Const FPS_MULT# = 1.0 / FPS
; Demo Scene
Graphics3D 1024, 768, 32, 2
SetBuffer BackBuffer()
Local demoTimer = CreateTimer(FPS)
Local demoRoot = CreatePivot()
Local demoCameraRoot = CreatePivot(demoRoot)
Local demoCamera = CreateCamera(demoCameraRoot)
MoveEntity demoCamera, 0, 0, -10
Local demoCube = CreateCube(demoRoot)
; Create a Browser
Local myBrowser.Browser = Browser_Create(512, 512)
Repeat
BS_Steam_RunCallbacks()
Delay 100
Until Browser_IsReady(myBrowser)
Local myBrowser.SteamBrowser = SteamBrowser_Create(GraphicsWidth(), GraphicsHeight(), "http://store.steampowered.com/app/368720/")
Local Mouse[3], MouseButton[3], Key[255]
While Not KeyHit(1)
Cls
; Only allow input when the browser is up to date.
;If (myBrowser\iLastDraw > myBrowser\iLastRequest) Then
If True
; Mouse Input
If Mouse[0] <> MouseX() Or Mouse[1] <> MouseY() Then
Mouse[0] = MouseX()
Mouse[1] = MouseY()
BS_ISteamHTMLSurface_MouseMove BS_SteamHTMLSurface(), myBrowser\Id, MouseX(), MouseY()
EndIf
If Mouse[2] <> MouseZ() Then
Mouse[2] = MouseZ()
BS_ISteamHTMLSurface_MouseWheel BS_SteamHTMLSurface(), myBrowser\Id, MouseZSpeed()*30
EndIf
Local Button
For Button = 1 To 3
Local ButtonDown = MouseDown(Button)
If MouseButton[Button] <> ButtonDown Then
MouseButton[Button] = MouseDown(Button)
If ButtonDown
BS_ISteamHTMLSurface_MouseDown BS_SteamHTMLSurface(), myBrowser\Id, Button - 1
Else
BS_ISteamHTMLSurface_MouseUp BS_SteamHTMLSurface(), myBrowser\Id, Button - 1
EndIf
EndIf
Next
; Keyboard
Local Modifier = BS_EHTMLKeyModifiers_None
If KeyDown(42) Or KeyDown(54) Then Modifier = Modifier Or BS_EHTMLKeyModifiers_ShiftDown
If KeyDown(29) Or KeyDown(157) Or KeyDown(184) Then Modifier = Modifier Or BS_EHTMLKeyModifiers_CtrlDown
If KeyDown(56) Or KeyDown(184) Then Modifier = Modifier Or BS_EHTMLKeyModifiers_AltDown
Local VK
For VK = 0 To 255
Local SC = InputEx_User32_MapVirtualKeyEx(VK, 0, 0)
Local KeyDownN = KeyDown(SC)
If Key[VK] <> KeyDownN Then
Key[VK] = KeyDownN
If KeyDownN = 1 Then
BS_ISteamHTMLSurface_KeyDown BS_SteamHTMLSurface(), myBrowser\Id, VK, Modifier
Else
BS_ISteamHTMLSurface_KeyUp BS_SteamHTMLSurface(), myBrowser\Id, VK, Modifier
EndIf
EndIf
Next
Local GetKeyC = GetKey()
If GetKeyC
BS_ISteamHTMLSurface_KeyChar BS_SteamHTMLSurface(), myBrowser\Id, GetKeyC, Modifier
EndIf
EndIf
; Steam: Run any Callbacks
; Q: Why before RenderWorld/Flip?
; A: If we did any changes, having them available before Rendering helps responsiveness.
; A one-frame Delay is noticeable, even to people claiming the eye only sees 30 fps.
; Please read a Biology book if you are one of those, it doesn't work like that.
BS_Steam_RunCallbacks()
BS_SteamAPI_RunCallbacks()
RenderWorld
DrawImage Browser_GetHandle(myBrowser), 0, 0, 0
;If (myBrowser\iLastDraw > myBrowser\iLastRequest) Then
If Not KeyDown(57)
DrawBlock SteamBrowser_GetImageHandle(myBrowser), 0, 0, 0
Color 255, 0, 0
Rect myBrowser\UpdateRegion[0],myBrowser\UpdateRegion[1],myBrowser\UpdateRegion[2],myBrowser\UpdateRegion[3], 0
Else
EntityTexture demoCube, SteamBrowser_GetTextureHandle(myBrowser)
EndIf
;EndIf
Flip
WaitTimer demoTimer
Wend
; Destroy existing Browser
myBrowser = Browser_Destroy(myBrowser)
SteamBrowser_Destroy(myBrowser):myBrowser = Null
; Steam: HTMLSurface API
BS_HTMLSurface_Shutdown(BS_HTMLSurface())
BS_ISteamHTMLSurface_Shutdown(BS_SteamHTMLSurface())
BS_SteamAPI_Shutdown()
EndGraphics
End
;~IDEal Editor Parameters:
;~F#8#19
;~C#Blitz3D
+266
View File
@@ -0,0 +1,266 @@
// BlitzSteam - Steam wrapper for Blitz
// Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "BlitzCallback.h"
void BlitzCallback::Initialize() {
#define BlitzCallback_DefineSize(T) BlitzCallback::Sizes.emplace(T::k_iCallback, sizeof(T));
// Do nothing if it was already done.
if (BlitzCallback::Sizes.size() > 0)
return;
// Default to the size of the class itself if no callback id is given.
BlitzCallback::Sizes.emplace(0, sizeof(BlitzCallback));
// SteamAPI
// SteamAppList
BlitzCallback_DefineSize(SteamAppInstalled_t);
BlitzCallback_DefineSize(SteamAppUninstalled_t);
// SteamApps
BlitzCallback_DefineSize(DlcInstalled_t);
BlitzCallback_DefineSize(RegisterActivationCodeResponse_t);
BlitzCallback_DefineSize(AppProofOfPurchaseKeyResponse_t);
BlitzCallback_DefineSize(NewLaunchQueryParameters_t);
// SteamController
// SteamFriends
BlitzCallback_DefineSize(PersonaStateChange_t);
BlitzCallback_DefineSize(GameOverlayActivated_t);
BlitzCallback_DefineSize(GameServerChangeRequested_t);
BlitzCallback_DefineSize(GameLobbyJoinRequested_t);
BlitzCallback_DefineSize(AvatarImageLoaded_t);
BlitzCallback_DefineSize(ClanOfficerListResponse_t);
BlitzCallback_DefineSize(FriendRichPresenceUpdate_t);
BlitzCallback_DefineSize(GameRichPresenceJoinRequested_t);
BlitzCallback_DefineSize(GameConnectedClanChatMsg_t);
BlitzCallback_DefineSize(GameConnectedChatJoin_t);
BlitzCallback_DefineSize(GameConnectedChatLeave_t);
BlitzCallback_DefineSize(DownloadClanActivityCountsResult_t);
BlitzCallback_DefineSize(JoinClanChatRoomCompletionResult_t);
BlitzCallback_DefineSize(GameConnectedFriendChatMsg_t);
BlitzCallback_DefineSize(FriendsGetFollowerCount_t);
BlitzCallback_DefineSize(FriendsIsFollowing_t);
BlitzCallback_DefineSize(FriendsEnumerateFollowingList_t);
BlitzCallback_DefineSize(SetPersonaNameResponse_t);
// SteamGameServer
BlitzCallback_DefineSize(GSClientApprove_t);
BlitzCallback_DefineSize(GSClientDeny_t);
BlitzCallback_DefineSize(GSClientKick_t);
BlitzCallback_DefineSize(GSClientAchievementStatus_t);
BlitzCallback_DefineSize(GSPolicyResponse_t);
BlitzCallback_DefineSize(GSGameplayStats_t);
BlitzCallback_DefineSize(GSClientGroupStatus_t);
BlitzCallback_DefineSize(GSReputation_t);
BlitzCallback_DefineSize(AssociateWithClanResult_t);
BlitzCallback_DefineSize(ComputeNewPlayerCompatibilityResult_t);
// SteamGameServerStats
BlitzCallback_DefineSize(GSStatsReceived_t);
BlitzCallback_DefineSize(GSStatsStored_t);
BlitzCallback_DefineSize(GSStatsUnloaded_t);
// SteamHTMLSurface
BlitzCallback_DefineSize(HTML_BrowserReady_t);
// SteamHTTP
BlitzCallback_DefineSize(HTTPRequestCompleted_t);
BlitzCallback_DefineSize(HTTPRequestHeadersReceived_t);
BlitzCallback_DefineSize(HTTPRequestDataReceived_t);
// SteamInventory
BlitzCallback_DefineSize(SteamInventoryResultReady_t);
BlitzCallback_DefineSize(SteamInventoryFullUpdate_t);
BlitzCallback_DefineSize(SteamInventoryDefinitionUpdate_t);
// SteamMatchmaking
// SteamMatchmakingServers
// SteamMusic
// SteamMusicRemote
// SteamNetworking
BlitzCallback_DefineSize(P2PSessionRequest_t);
BlitzCallback_DefineSize(P2PSessionConnectFail_t);
BlitzCallback_DefineSize(SocketStatusCallback_t);
}
std::map<int32_t, size_t> BlitzCallback::Sizes;
BlitzCallback::BlitzCallback(BP_BlitzFunction3_t pFunctionPointer) {
BlitzCallback::Initialize();
// Initialize all values to 0.
this->m_iCallback = 0;
this->m_nCallbackFlags = 0;
this->m_hSteamAPICall = 0;
// Set function pointer.
this->m_pFunctionPointer = pFunctionPointer;
}
BlitzCallback::~BlitzCallback() {
// Unregister if we are still registered.
this->UnregisterResult();
this->Unregister();
// Reset all variables to 0.
this->m_iCallback = 0;
this->m_nCallbackFlags = 0;
this->m_hSteamAPICall = 0;
this->m_pFunctionPointer = 0;
}
void BlitzCallback::Run(void *pvParam) {
if (m_hSteamAPICall != 0)
m_hSteamAPICall = 0; // Caller unregisters for us.
BP_CallFunction3(m_pFunctionPointer, reinterpret_cast<int32_t>(pvParam), 0, 0);
}
void BlitzCallback::Run(void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall) {
if (m_hSteamAPICall != 0)
m_hSteamAPICall = 0; // Caller unregisters for us.
BP_CallFunction3(m_pFunctionPointer, reinterpret_cast<int32_t>(pvParam), (bIOFailure ? 0 : 1), reinterpret_cast<int32_t>(&hSteamAPICall));
}
int BlitzCallback::GetCallbackSizeBytes() {
return (BlitzCallback::Sizes.find(this->m_iCallback)->second);
}
void BlitzCallback::SetCallback(int32_t iCallback) {
this->m_iCallback = iCallback;
}
int32_t BlitzCallback::GetCallback() {
return this->m_iCallback;
}
void BlitzCallback::SetFunction(BP_BlitzFunction3_t pFunction) {
this->m_pFunctionPointer = pFunction;
}
BP_BlitzFunction3_t BlitzCallback::GetFunction() {
return this->m_pFunctionPointer;
}
bool BlitzCallback::IsRegistered() {
return (this->m_nCallbackFlags & this->k_ECallbackFlagsRegistered) != 0;
}
void BlitzCallback::SetRegistered(bool bIsRegistered) {
this->m_nCallbackFlags &= ~k_ECallbackFlagsRegistered;
if (bIsRegistered)
this->m_nCallbackFlags |= k_ECallbackFlagsRegistered;
}
bool BlitzCallback::IsGameServer() {
return (this->m_nCallbackFlags & this->k_ECallbackFlagsGameServer) != 0;
}
void BlitzCallback::SetGameServer(bool bIsGameServer) {
this->m_nCallbackFlags &= ~k_ECallbackFlagsGameServer;
if (bIsGameServer)
this->m_nCallbackFlags |= k_ECallbackFlagsGameServer;
}
void BlitzCallback::Register(uint32_t iCallback) {
if (this->IsRegistered())
this->Unregister();
SteamAPI_RegisterCallback(this, iCallback);
this->m_iCallback = iCallback;
}
void BlitzCallback::Unregister() {
if (this->IsRegistered()) {
SteamAPI_UnregisterCallback(this);
this->m_iCallback = 0;
}
}
void BlitzCallback::RegisterResult(SteamAPICall_t hSteamAPICall, uint32_t iCallback) {
if (this->m_hSteamAPICall != 0)
this->UnregisterResult();
this->m_hSteamAPICall = hSteamAPICall;
this->m_iCallback = iCallback;
SteamAPI_RegisterCallResult(this, hSteamAPICall);
}
void BlitzCallback::UnregisterResult() {
if (this->m_hSteamAPICall != 0) {
SteamAPI_UnregisterCallResult(this, this->m_hSteamAPICall);
this->m_hSteamAPICall = 0;
this->m_iCallback = 0;
}
}
//-----------------------------------------------------------------------------
// C-Callables
//-----------------------------------------------------------------------------
DLL_FUNCTION(BlitzCallback*) BS_Callback_New(BP_BlitzFunction3_t pFunctionPointer) {
return new BlitzCallback(pFunctionPointer);
}
DLL_FUNCTION(void) BS_Callback_Destroy(BlitzCallback* pCallback) {
delete pCallback;
}
DLL_FUNCTION(int32_t) BS_Callback_GetCallbackSizeBytes(BlitzCallback* pCallback) {
return pCallback->GetCallbackSizeBytes();
}
DLL_FUNCTION(void) BS_Callback_SetCallback(BlitzCallback* pCallback, int32_t iCallback) {
pCallback->SetCallback(iCallback);
}
DLL_FUNCTION(int32_t) BS_Callback_GetCallback(BlitzCallback* pCallback) {
return pCallback->GetCallback();
}
DLL_FUNCTION(void) BS_Callback_SetFunction(BlitzCallback* pCallback, BP_BlitzFunction3_t pFunction) {
pCallback->SetFunction(pFunction);
}
DLL_FUNCTION(BP_BlitzFunction3_t) BS_Callback_GetFunction(BlitzCallback* pCallback) {
return pCallback->GetFunction();
}
DLL_FUNCTION(int32_t) BS_Callback_IsRegistered(BlitzCallback* pCallback) {
return pCallback->IsRegistered();
}
DLL_FUNCTION(void) BS_Callback_SetRegistered(BlitzCallback* pCallback, int32_t bIsRegistered) {
pCallback->SetRegistered(!!bIsRegistered);
}
DLL_FUNCTION(int32_t) BS_Callback_IsGameServer(BlitzCallback* pCallback) {
return pCallback->IsGameServer();
}
DLL_FUNCTION(void) BS_Callback_SetGameServer(BlitzCallback* pCallback, int32_t bIsGameServer) {
pCallback->SetGameServer(!!bIsGameServer);
}
DLL_FUNCTION(void) BS_Callback_Register(BlitzCallback* pCallback, uint32_t iCallback) {
pCallback->Register(iCallback);
}
DLL_FUNCTION(void) BS_Callback_Unregister(BlitzCallback* pCallback) {
pCallback->Unregister();
}
DLL_FUNCTION(void) BS_Callback_RegisterResult(BlitzCallback* pCallback, SteamAPICall_t* pSteamAPICall, uint32_t iCallback) {
pCallback->RegisterResult(*pSteamAPICall, iCallback);
}
DLL_FUNCTION(void) BS_Callback_UnregisterResult(BlitzCallback* pCallback) {
pCallback->UnregisterResult();
}
@@ -14,44 +14,81 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
BS_I#include "BlitzSteam.h"
#include "BlitzPointer.h"
#pragma once
#include "BlitzSteamInternal.h"
#include "../Helpers/BlitzPointer.h"
#include <list>
#include <vector>
#include <map>
class BlitzCallback : public CCallbackBase {
// Static Parts
public:
/// Initializes the CallbackSizes list for future use.
static void Initialize();
static std::map<int32_t, size_t> Sizes;
// Class Parts
public:
// Constructor
BlitzCallback(BP_BlitzFunction3_t pFunctionPointer);
// Destructor
~BlitzCallback();
// Run
virtual void Run(void *pvParam);
virtual void Run(void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall);
// Callback Size
virtual int GetCallbackSizeBytes();
// Accessors
void SetCallback(int32_t iCallback);
int32_t GetCallback();
void SetFunction(BP_BlitzFunction3_t pFunction);
BP_BlitzFunction3_t GetFunction();
bool IsRegistered();
void SetRegistered(bool bIsRegistered);
bool IsGameServer();
void SetGameServer(bool bIsGameServer);
// Registration in Steam
/// Register as Callback
void Register(uint32_t iCallback);
void Unregister();
/// Register as CallResult
void RegisterResult(SteamAPICall_t hSteamAPICall, uint32_t iCallback);
void UnregisterResult();
private:
/// Function to Call
BP_BlitzFunction3_t m_pFunctionPointer;
uint32_t m_iCallback;
/// Assigned SteamAPICall
SteamAPICall_t m_hSteamAPICall;
};
DLL_FUNCTION(BlitzCallback*) BS_Callback_Create(BP_BlitzFunction3_t pFunctionPointer);
//-----------------------------------------------------------------------------
// C-Callables
//-----------------------------------------------------------------------------
DLL_FUNCTION(BlitzCallback*) BS_Callback_New(BP_BlitzFunction3_t pFunctionPointer);
DLL_FUNCTION(void) BS_Callback_Destroy(BlitzCallback* pCallback);
DLL_FUNCTION(int32_t) BS_Callback_GetCallbackSizeBytes(BlitzCallback* pCallback);
DLL_FUNCTION(void) BS_Callback_SetCallback(BlitzCallback* pCallback, int32_t iCallback);
DLL_FUNCTION(int32_t) BS_Callback_GetCallback(BlitzCallback* pCallback);
DLL_FUNCTION(void) BS_Callback_SetFunction(BlitzCallback* pCallback, BP_BlitzFunction3_t pFunction);
DLL_FUNCTION(BP_BlitzFunction3_t) BS_Callback_GetFunction(BlitzCallback* pCallback);
DLL_FUNCTION(void) BS_Callback_SetRegistered(BlitzCallback* pCallback, int32_t bIsRegistered);
DLL_FUNCTION(int32_t) BS_Callback_IsRegistered(BlitzCallback* pCallback);
DLL_FUNCTION(void) BS_Callback_SetGameServer(BlitzCallback* pCallback, int32_t bIsGameServer);
DLL_FUNCTION(int32_t) BS_Callback_IsGameServer(BlitzCallback* pCallback);
DLL_FUNCTION(int32_t) BS_Callback_SetGameServerFlag(BlitzCallback* pCallback, int32_t isGameServer);
DLL_FUNCTION(void) BS_Callback_Register(BlitzCallback* pCallback, uint32_t iCallback);
DLL_FUNCTION(void) BS_Callback_Unregister(BlitzCallback* pCallback);
+2 -1
View File
@@ -14,7 +14,8 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
BS_I#include "BlitzSteam.h"
#pragma once
#include "BlitzSteamInternal.h"
//-----------------------------------------------------------------------------
// Purpose: Constructor
+2 -1
View File
@@ -14,7 +14,8 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
BS_I#include "BlitzSteam.h"
#pragma once
#include "BlitzSteamInternal.h"
#include <sstream>
DLL_FUNCTION(double_t*) BS_Double_New();
+2 -1
View File
@@ -14,7 +14,8 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
BS_I#include "BlitzSteam.h"
#pragma once
#include "BlitzSteamInternal.h"
#include <sstream>
DLL_FUNCTION(int64_t*) BS_Long_New();
+30 -14
View File
@@ -28,34 +28,50 @@ DLL_FUNCTION(void) BS_Memory_Free(void* pMemory) {
free(pMemory);
}
DLL_FUNCTION(uint8_t) BS_Memory_PeekByte(void* pMemory, uint32_t offset) {
DLL_FUNCTION(void) BS_Memory_PokeByte(void* pMemory, uint32_t offset, int8_t value) {
*((reinterpret_cast<uint8_t*>(pMemory) + offset)) = value;
}
DLL_FUNCTION(int32_t) BS_Memory_PeekByte(void* pMemory, uint32_t offset) {
return *(reinterpret_cast<uint8_t*>(pMemory) + offset);
}
DLL_FUNCTION(uint16_t) BS_Memory_PeekShort(void* pMemory, uint32_t offset) {
return *(uint16_t*)(reinterpret_cast<uint8_t*>(pMemory) + offset);
DLL_FUNCTION(void) BS_Memory_PokeShort(void* pMemory, uint32_t offset, int16_t value) {
*(reinterpret_cast<int16_t*>(reinterpret_cast<uint8_t*>(pMemory) + offset)) = value;
}
DLL_FUNCTION(uint32_t) BS_Memory_PeekInt(void* pMemory, uint32_t offset) {
return *(uint32_t*)(reinterpret_cast<uint8_t*>(pMemory) + offset);
DLL_FUNCTION(int32_t) BS_Memory_PeekShort(void* pMemory, uint32_t offset) {
return *(int16_t*)(reinterpret_cast<uint8_t*>(pMemory) + offset);
}
DLL_FUNCTION(void) BS_Memory_PokeInt(void* pMemory, uint32_t offset, int32_t value) {
*(reinterpret_cast<uint32_t*>(reinterpret_cast<uint8_t*>(pMemory) + offset)) = value;
}
DLL_FUNCTION(int32_t) BS_Memory_PeekInt(void* pMemory, uint32_t offset) {
return *(int32_t*)(reinterpret_cast<uint8_t*>(pMemory) + offset);
}
DLL_FUNCTION(void) BS_Memory_PokeFloat(void* pMemory, uint32_t offset, float_t value) {
*(reinterpret_cast<float_t*>(reinterpret_cast<uint8_t*>(pMemory) + offset)) = value;
}
DLL_FUNCTION(float_t) BS_Memory_PeekFloat(void* pMemory, uint32_t offset) {
return *(float_t*)(reinterpret_cast<uint8_t*>(pMemory) + offset);
}
DLL_FUNCTION(void) BS_Memory_PokeByte(void* pMemory, uint32_t offset, uint8_t value) {
*((reinterpret_cast<uint8_t*>(pMemory) + offset)) = value;
DLL_FUNCTION(void) BS_Memory_PokeLong(void* pMemory, uint32_t offset, int64_t* value) {
*(reinterpret_cast<int64_t*>(reinterpret_cast<uint8_t*>(pMemory) + offset)) = *value;
}
DLL_FUNCTION(void) BS_Memory_PokeShort(void* pMemory, uint32_t offset, uint16_t value) {
*(reinterpret_cast<uint16_t*>(reinterpret_cast<uint8_t*>(pMemory) + offset)) = value;
DLL_FUNCTION(int64_t*) BS_Memory_PeekLong(void* pMemory, uint32_t offset) {
return new int64_t(*(reinterpret_cast<int64_t*>(reinterpret_cast<uint8_t*>(pMemory) + offset)));
}
DLL_FUNCTION(void) BS_Memory_PokeInt(void* pMemory, uint32_t offset, uint32_t value) {
*(reinterpret_cast<uint32_t*>(reinterpret_cast<uint8_t*>(pMemory) + offset)) = value;
DLL_FUNCTION(void) BS_Memory_PokeDouble(void* pMemory, uint32_t offset, double_t* value) {
*(reinterpret_cast<double_t*>(reinterpret_cast<uint8_t*>(pMemory) + offset)) = *value;
}
DLL_FUNCTION(void) BS_Memory_PokeFloat(void* pMemory, uint32_t offset, float_t value) {
*(reinterpret_cast<float_t*>(reinterpret_cast<uint8_t*>(pMemory) + offset)) = value;
}
DLL_FUNCTION(double_t*) BS_Memory_PeekDouble(void* pMemory, uint32_t offset) {
return new double_t(*(reinterpret_cast<double_t*>(reinterpret_cast<uint8_t*>(pMemory) + offset)));
}
+21 -8
View File
@@ -14,16 +14,29 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
BS_I#include "BlitzSteam.h"
#pragma once
#include "BlitzSteamInternal.h"
#include <stdlib.h>
DLL_FUNCTION(void*) BS_Memory_Alloc(uint32_t iSize);
DLL_FUNCTION(void*) BS_Memory_ReAlloc(void* pMemory, uint32_t iNewSize);
DLL_FUNCTION(void) BS_Memory_Free(void* pMemory);
DLL_FUNCTION(uint8_t) BS_Memory_PeekByte(void* pMemory, uint32_t offset);
DLL_FUNCTION(uint16_t) BS_Memory_PeekShort(void* pMemory, uint32_t offset);
DLL_FUNCTION(uint32_t) BS_Memory_PeekInt(void* pMemory, uint32_t offset);
DLL_FUNCTION(float_t) BS_Memory_PeekFloat(void* pMemory, uint32_t offset);
DLL_FUNCTION(void) BS_Memory_PokeByte(void* pMemory, uint32_t offset, uint8_t value);
DLL_FUNCTION(void) BS_Memory_PokeShort(void* pMemory, uint32_t offset, uint16_t value);
DLL_FUNCTION(void) BS_Memory_PokeInt(void* pMemory, uint32_t offset, uint32_t value);
DLL_FUNCTION(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_FUNCTION(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_FUNCTION(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_FUNCTION(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_FUNCTION(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_FUNCTION(void) BS_Memory_PokeDouble(void* pMemory, uint32_t offset, double_t* value);
DLL_FUNCTION(double_t*) BS_Memory_PeekDouble(void* pMemory, uint32_t offset);
-1
View File
@@ -15,7 +15,6 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "BlitzSteam.h"
#include "Helpers\BlitzCallback.h"
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
// Steam API setup & shutdown
+35 -35
View File
@@ -22,11 +22,11 @@ DLL_FUNCTION(ISteamHTMLSurface*) BS_SteamHTMLSurface() {
}
// Must call init and shutdown when starting/ending use of the interface
DLL_FUNCTION(uint32_t) BS_SteamHTMLSurface_Init(ISteamHTMLSurface* pSteamHTMLSurface) {
DLL_FUNCTION(uint32_t) BS_ISteamHTMLSurface_Init(ISteamHTMLSurface* pSteamHTMLSurface) {
return pSteamHTMLSurface->Init();
}
DLL_FUNCTION(uint32_t) BS_SteamHTMLSurface_Shutdown(ISteamHTMLSurface* pSteamHTMLSurface) {
DLL_FUNCTION(uint32_t) BS_ISteamHTMLSurface_Shutdown(ISteamHTMLSurface* pSteamHTMLSurface) {
return pSteamHTMLSurface->Shutdown();
}
@@ -36,143 +36,143 @@ DLL_FUNCTION(uint32_t) BS_SteamHTMLSurface_Shutdown(ISteamHTMLSurface* pSteamHTM
// identify your client on web servers.
// The userCSS string lets you apply a CSS style sheet to every displayed page, leave null if
// you do not require this functionality.
DLL_FUNCTION(SteamAPICall_t*) BS_SteamHTMLSurface_CreateBrowser(ISteamHTMLSurface* pSteamHTMLSurface, const char* pchUserAgent, const char* pchUserCSS) {
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamHTMLSurface_CreateBrowser(ISteamHTMLSurface* pSteamHTMLSurface, const char* pchUserAgent, const char* 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
DLL_FUNCTION(void) BS_SteamHTMLSurface_RemoveBrowser(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_RemoveBrowser(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) {
pSteamHTMLSurface->RemoveBrowser(unBrowserHandle);
}
// Navigate to this URL, results in a HTML_StartRequest_t as the request commences
DLL_FUNCTION(void) BS_SteamHTMLSurface_LoadURL(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, const char* pchURL, const char* pchPostData) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_LoadURL(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, const char* pchURL, const char* pchPostData) {
pSteamHTMLSurface->LoadURL(unBrowserHandle, pchURL, pchPostData);
}
// Tells the surface the size in pixels to display the surface
DLL_FUNCTION(void) BS_SteamHTMLSurface_SetSize(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, uint32_t unWidth, uint32_t unHeight) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_SetSize(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, uint32_t unWidth, uint32_t unHeight) {
pSteamHTMLSurface->SetSize(unBrowserHandle, unWidth, unHeight);
}
// Stop the load of the current html page
DLL_FUNCTION(void) BS_SteamHTMLSurface_StopLoad(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_StopLoad(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) {
pSteamHTMLSurface->StopLoad(unBrowserHandle);
}
// Reload (most likely from local cache) the current page
DLL_FUNCTION(void) BS_SteamHTMLSurface_Reload(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_Reload(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) {
pSteamHTMLSurface->Reload(unBrowserHandle);
}
// navigate back in the page history
DLL_FUNCTION(void) BS_SteamHTMLSurface_GoBack(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_GoBack(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) {
pSteamHTMLSurface->GoBack(unBrowserHandle);
}
// navigate forward in the page history
DLL_FUNCTION(void) BS_SteamHTMLSurface_GoForward(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_GoForward(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) {
pSteamHTMLSurface->GoForward(unBrowserHandle);
}
// add this header to any url requests from this browser
DLL_FUNCTION(void) BS_SteamHTMLSurface_AddHeader(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, const char* pchKey, const char* pchValue) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_AddHeader(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, const char* pchKey, const char* pchValue) {
pSteamHTMLSurface->AddHeader(unBrowserHandle, pchKey, pchValue);
}
// run this javascript script in the currently loaded page
DLL_FUNCTION(void) BS_SteamHTMLSurface_ExecuteJavascript(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, const char* pchScript) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_ExecuteJavascript(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, const char* pchScript) {
pSteamHTMLSurface->ExecuteJavascript(unBrowserHandle, pchScript);
}
// Mouse click and mouse movement commands
DLL_FUNCTION(void) BS_SteamHTMLSurface_MouseUp(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, ISteamHTMLSurface::EHTMLMouseButton eMouseButton) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_MouseUp(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, ISteamHTMLSurface::EHTMLMouseButton eMouseButton) {
pSteamHTMLSurface->MouseUp(unBrowserHandle, eMouseButton);
}
DLL_FUNCTION(void) BS_SteamHTMLSurface_MouseDown(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, ISteamHTMLSurface::EHTMLMouseButton eMouseButton) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_MouseDown(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, ISteamHTMLSurface::EHTMLMouseButton eMouseButton) {
pSteamHTMLSurface->MouseDown(unBrowserHandle, eMouseButton);
}
DLL_FUNCTION(void) BS_SteamHTMLSurface_MouseDoubleClick(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, ISteamHTMLSurface::EHTMLMouseButton eMouseButton) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_MouseDoubleClick(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, ISteamHTMLSurface::EHTMLMouseButton eMouseButton) {
pSteamHTMLSurface->MouseDoubleClick(unBrowserHandle, eMouseButton);
}
// x and y are relative to the HTML bounds
DLL_FUNCTION(void) BS_SteamHTMLSurface_MouseMove(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, int32_t x, int32_t y) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_MouseMove(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, int32_t x, int32_t y) {
pSteamHTMLSurface->MouseMove(unBrowserHandle, x, y);
}
// nDelta is pixels of scroll
DLL_FUNCTION(void) BS_SteamHTMLSurface_MouseWheel(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, int32_t nDelta) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_MouseWheel(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, int32_t nDelta) {
pSteamHTMLSurface->MouseWheel(unBrowserHandle, nDelta);
}
// keyboard interactions, native keycode is the virtual key code value from your OS
DLL_FUNCTION(void) BS_SteamHTMLSurface_KeyDown(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, ISteamHTMLSurface::EHTMLKeyModifiers eHTMLKeyModifiers) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_KeyDown(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, ISteamHTMLSurface::EHTMLKeyModifiers eHTMLKeyModifiers) {
pSteamHTMLSurface->KeyDown(unBrowserHandle, nNativeKeyCode, eHTMLKeyModifiers);
}
DLL_FUNCTION(void) BS_SteamHTMLSurface_KeyUp(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, ISteamHTMLSurface::EHTMLKeyModifiers eHTMLKeyModifiers) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_KeyUp(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, ISteamHTMLSurface::EHTMLKeyModifiers eHTMLKeyModifiers) {
pSteamHTMLSurface->KeyUp(unBrowserHandle, nNativeKeyCode, eHTMLKeyModifiers);
}
// cUnicodeChar is the unicode character point for this keypress (and potentially multiple chars per press)
DLL_FUNCTION(void) BS_SteamHTMLSurface_KeyChar(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, uint32 cUnicodeChar, ISteamHTMLSurface::EHTMLKeyModifiers eHTMLKeyModifiers) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_KeyChar(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, uint32 cUnicodeChar, ISteamHTMLSurface::EHTMLKeyModifiers eHTMLKeyModifiers) {
pSteamHTMLSurface->KeyChar(unBrowserHandle, cUnicodeChar, eHTMLKeyModifiers);
}
// programmatically scroll this many pixels on the page
DLL_FUNCTION(void) BS_SteamHTMLSurface_SetHorizontalScroll(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_SetHorizontalScroll(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll) {
pSteamHTMLSurface->SetHorizontalScroll(unBrowserHandle, nAbsolutePixelScroll);
}
DLL_FUNCTION(void) BS_SteamHTMLSurface_SetVerticalScroll(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_SetVerticalScroll(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, uint32 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
DLL_FUNCTION(void) BS_SteamHTMLSurface_SetKeyFocus(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, bool bHasKeyFocus) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_SetKeyFocus(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, bool bHasKeyFocus) {
pSteamHTMLSurface->SetKeyFocus(unBrowserHandle, bHasKeyFocus);
}
// open the current pages html code in the local editor of choice, used for debugging
DLL_FUNCTION(void) BS_SteamHTMLSurface_ViewSource(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_ViewSource(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) {
pSteamHTMLSurface->ViewSource(unBrowserHandle);
}
// copy the currently selected text on the html page to the local clipboard
DLL_FUNCTION(void) BS_SteamHTMLSurface_CopyToClipboard(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_CopyToClipboard(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) {
pSteamHTMLSurface->CopyToClipboard(unBrowserHandle);
}
// paste from the local clipboard to the current html page
DLL_FUNCTION(void) BS_SteamHTMLSurface_PasteFromClipboard(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_PasteFromClipboard(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) {
pSteamHTMLSurface->PasteFromClipboard(unBrowserHandle);
}
// find this string in the browser, if bCurrentlyInFind is true then instead cycle to the next matching element
DLL_FUNCTION(void) BS_SteamHTMLSurface_Find(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, const char *pchSearchStr, bool bCurrentlyInFind, bool bReverse) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_Find(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, const char *pchSearchStr, bool bCurrentlyInFind, bool bReverse) {
pSteamHTMLSurface->Find(unBrowserHandle, pchSearchStr, bCurrentlyInFind, bReverse);
}
// cancel a currently running find
DLL_FUNCTION(void) BS_SteamHTMLSurface_StopFind(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_StopFind(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle) {
pSteamHTMLSurface->StopFind(unBrowserHandle);
}
// return details about the link at position x,y on the current page
DLL_FUNCTION(void) BS_SteamHTMLSurface_GetLinkAtPosition(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, int x, int y) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_GetLinkAtPosition(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, int x, int y) {
pSteamHTMLSurface->GetLinkAtPosition(unBrowserHandle, x, y);
}
// set a webcookie for the hostname in question
DLL_FUNCTION(void) BS_SteamHTMLSurface_SetCookie(ISteamHTMLSurface* pSteamHTMLSurface, const char *pchHostname, const char *pchKey, const char *pchValue, const char *pchPath, RTime32 nExpires, bool bSecure, bool bHTTPOnly) {
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) {
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)
DLL_FUNCTION(void) BS_SteamHTMLSurface_SetPageScaleFactor(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_SetPageScaleFactor(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY) {
pSteamHTMLSurface->SetPageScaleFactor(unBrowserHandle, flZoom, nPointX, nPointY);
}
@@ -180,7 +180,7 @@ DLL_FUNCTION(void) BS_SteamHTMLSurface_SetPageScaleFactor(ISteamHTMLSurface* pSt
// 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".
// When background mode is disabled, any video or audio objects with that property will resume with ".play()".
DLL_FUNCTION(void) BS_SteamHTMLSurface_SetBackgroundMode(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, bool bBackgroundMode) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_SetBackgroundMode(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, bool bBackgroundMode) {
pSteamHTMLSurface->SetBackgroundMode(unBrowserHandle, bBackgroundMode);
}
@@ -193,17 +193,17 @@ DLL_FUNCTION(void) BS_SteamHTMLSurface_SetBackgroundMode(ISteamHTMLSurface* pSte
// 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
// allowed in your HTML surface.
DLL_FUNCTION(void) BS_SteamHTMLSurface_AllowStartRequest(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, bool bAllowed) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_AllowStartRequest(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, bool bAllowed) {
pSteamHTMLSurface->AllowStartRequest(unBrowserHandle, bAllowed);
}
// 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
DLL_FUNCTION(void) BS_SteamHTMLSurface_JSDialogResponse(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, bool bResult) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_JSDialogResponse(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, bool bResult) {
pSteamHTMLSurface->JSDialogResponse(unBrowserHandle, bResult);
}
// You MUST call this in response to a HTML_FileOpenDialog_t callback
DLL_FUNCTION(void) BS_SteamHTMLSurface_FileLoadDialogResponse(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, const char **pchSelectedFiles) {
DLL_FUNCTION(void) BS_ISteamHTMLSurface_FileLoadDialogResponse(ISteamHTMLSurface* pSteamHTMLSurface, HHTMLBrowser unBrowserHandle, const char **pchSelectedFiles) {
pSteamHTMLSurface->FileLoadDialogResponse(unBrowserHandle, pchSelectedFiles);
}
+160
View File
@@ -16,6 +16,9 @@
#include "BlitzSteam.h"
//-----------------------------------------------------------------------------
// Purpose: interface to http client
//-----------------------------------------------------------------------------
DLL_FUNCTION(ISteamHTTP*) BS_HTTP() {
return SteamHTTP();
}
@@ -24,6 +27,163 @@ DLL_FUNCTION(ISteamHTTP*) BS_GameServerHTTP() {
return SteamGameServerHTTP();
}
// Initializes a new HTTP request, returning a handle to use in further operations on it. Requires
// 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/
// or such.
DLL_FUNCTION(HTTPRequestHandle) BS_ISteamHTTP_CreateHTTPRequest(ISteamHTTP* pThis, EHTTPMethod eHTTPRequestMethod, const char* cAbsoluteUrl) {
return pThis->CreateHTTPRequest(eHTTPRequestMethod, cAbsoluteUrl);
}
// 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.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_SetHTTPRequestContextValue(ISteamHTTP* pThis, HTTPRequestHandle hRequest, uint64_t* plContextValue) {
return pThis->SetHTTPRequestContextValue(hRequest, *plContextValue);
}
// 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
// has already been sent.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_SetHTTPNetworkActivityTimeout(ISteamHTTP* pThis, HTTPRequestHandle hRequest, uint32 unTimeoutSeconds) {
return pThis->SetHTTPRequestNetworkActivityTimeout(hRequest, unTimeoutSeconds);
}
// 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.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_SetHTTPRequestHeaderValue(ISteamHTTP* pThis, HTTPRequestHandle hRequest, const char *pchHeaderName, const char *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
// 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.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_SetHTTPRequestGetOrPostParameter(ISteamHTTP* pThis, HTTPRequestHandle hRequest, const char *pchParamName, const char *pchParamValue) {
return pThis->SetHTTPRequestGetOrPostParameter(hRequest, pchParamName, pchParamValue);
}
// Sends the HTTP request, will return false on a bad handle, otherwise use SteamCallHandle to wait on
// asynchronous response via callback.
//
// 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.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_SendHTTPRequest(ISteamHTTP* pThis, HTTPRequestHandle hRequest, SteamAPICall_t *pCallHandle) {
return pThis->SendHTTPRequest(hRequest, pCallHandle);
}
// 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
// HTTPRequestDataReceived_t callbacks while streaming.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_SendHTTPRequestAndStreamResponse(ISteamHTTP* pThis, HTTPRequestHandle hRequest, SteamAPICall_t *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
// 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) {
return pThis->DeferHTTPRequest(hRequest);
}
// 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.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_PrioritizeHTTPRequest(ISteamHTTP* pThis, HTTPRequestHandle hRequest) {
return pThis->PrioritizeHTTPRequest(hRequest);
}
// 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
// GetHTTPResponseHeaderValue.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_GetHTTPResponseHeaderSize(ISteamHTTP* pThis, HTTPRequestHandle hRequest, const char *pchHeaderName, uint32 *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
// 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.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_GetHTTPResponseHeaderValue(ISteamHTTP* pThis, HTTPRequestHandle hRequest, const char *pchHeaderName, uint8 *pHeaderValueBuffer, uint32 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
// handle is invalid.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_GetHTTPResponseBodySize(ISteamHTTP* pThis, HTTPRequestHandle hRequest, uint32 *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
// 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.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_GetHTTPResponseBodyData(ISteamHTTP* pThis, HTTPRequestHandle hRequest, uint8 *pBodyDataBuffer, uint32 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
// 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.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_GetHTTPStreamingResponseBodyData(ISteamHTTP* pThis, HTTPRequestHandle hRequest, uint32 cOffset, uint8 *pBodyDataBuffer, uint32 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
// callback and finishing using the response.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_ReleaseHTTPRequest(ISteamHTTP* pThis, HTTPRequestHandle 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
// 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.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_GetHTTPDownloadProgressPct(ISteamHTTP* pThis, HTTPRequestHandle hRequest, float *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
// 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.
DLL_FUNCTION(int32_t) BS_ISteamHTTP_SetHTTPRequestRawPostBody(ISteamHTTP* pThis, HTTPRequestHandle hRequest, const char *pchContentType, uint8 *pubBody, uint32 unBodyLen) {
return pThis->SetHTTPRequestRawPostBody(hRequest, pchContentType, pubBody, unBodyLen);
}
// Creates a cookie container handle which you must later free with ReleaseCookieContainer(). If bAllowResponsesToModify=true
// than any response to your requests using this cookie container may add new cookies which may be transmitted with
// 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
// repeat executions of your process.
DLL_FUNCTION(HTTPCookieContainerHandle) BS_ISteamHTTP_CreateCookieContainer(ISteamHTTP* pThis, bool bAllowResponsesToModify) {
return pThis->CreateCookieContainer(bAllowResponsesToModify);
}
// Release a cookie container you are finished using, freeing it's memory
DLL_FUNCTION(int32_t) BS_ISteamHTTP_ReleaseCookieContainer(ISteamHTTP* pThis, HTTPCookieContainerHandle hCookieContainer) {
return pThis->ReleaseCookieContainer(hCookieContainer);
}
// 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) {
return pThis->SetCookie(hCookieContainer, pchHost, pchUrl, pchCookie);
}
// Set the cookie container to use for a HTTP request
DLL_FUNCTION(int32_t) BS_ISteamHTTP_SetHTTPRequestCookieContainer(ISteamHTTP* pThis, HTTPRequestHandle hRequest, HTTPCookieContainerHandle 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
DLL_FUNCTION(int32_t) BS_ISteamHTTP_SetHTTPRequestUserAgentInfo(ISteamHTTP* pThis, HTTPRequestHandle hRequest, const char *pchUserAgentInfo) {
return pThis->SetHTTPRequestUserAgentInfo(hRequest, pchUserAgentInfo);
}
// 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) {
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
// which can bump everytime we get more data
DLL_FUNCTION(int32_t) BS_ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS(ISteamHTTP* pThis, HTTPRequestHandle hRequest, uint32 unMilliseconds) {
return pThis->SetHTTPRequestAbsoluteTimeoutMS(hRequest, unMilliseconds);
}
// 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) {
return pThis->GetHTTPRequestWasTimedOut(hRequest, pbWasTimedOut);
}
+276 -2
View File
@@ -16,11 +16,285 @@
#include "BlitzSteam.h"
DLL_FUNCTION(ISteamInventory*) BS_Inventory() {
//-----------------------------------------------------------------------------
// Purpose: Steam Inventory query and manipulation API
//-----------------------------------------------------------------------------
DLL_FUNCTION(ISteamInventory*) BS_SteamInventory() {
return SteamInventory();
}
DLL_FUNCTION(ISteamInventory*) BS_GameServerInventory() {
DLL_FUNCTION(ISteamInventory*) BS_SteamGameServerInventory() {
return SteamGameServerInventory();
}
// INVENTORY ASYNC RESULT MANAGEMENT
//
// Asynchronous inventory queries always output a result handle which can be used with
// GetResultStatus, GetResultItems, etc. A SteamInventoryResultReady_t callback will
// be triggered when the asynchronous result becomes ready (or fails).
//
// Find out the status of an asynchronous inventory result handle. Possible values:
// k_EResultPending - still in progress
// k_EResultOK - done, result ready
// k_EResultExpired - done, result ready, maybe out of date (see DeserializeResult)
// k_EResultInvalidParam - ERROR: invalid API call parameters
// k_EResultServiceUnavailable - ERROR: service temporarily down, you may retry later
// k_EResultLimitExceeded - ERROR: operation would exceed per-user inventory limits
// k_EResultFail - ERROR: unknown / generic error
DLL_FUNCTION(EResult) BS_ISteamInventory_GetResultStatus(ISteamInventory* pThis, SteamInventoryResult_t resultHandle) {
return pThis->GetResultStatus(resultHandle);
}
// 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.
DLL_FUNCTION(bool) BS_ISteamInventory_GetResultItems(ISteamInventory* pThis, SteamInventoryResult_t resultHandle,
OUT_ARRAY_COUNT(punOutItemsArraySize, Output array) SteamItemDetails_t *pOutItemsArray,
uint32 *punOutItemsArraySize) {
return pThis->GetResultItems(resultHandle, pOutItemsArray, punOutItemsArraySize);
}
// Returns the server time at which the result was generated. Compare against
// the value of IClientUtils::GetServerRealTime() to determine age.
DLL_FUNCTION(uint32) BS_ISteamInventory_GetResultTimestamp(ISteamInventory* pThis, SteamInventoryResult_t resultHandle) {
return pThis->GetResultTimestamp(resultHandle);
}
// 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
// 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) {
return pThis->CheckResultSteamID(resultHandle, *steamIDExpected);
}
// Destroys a result handle and frees all associated memory.
DLL_FUNCTION(void) BS_ISteamInventory_DestroyResult(ISteamInventory* pThis, SteamInventoryResult_t resultHandle) {
return pThis->DestroyResult(resultHandle);
}
// INVENTORY ASYNC QUERY
//
// Captures the entire state of the current user's Steam inventory.
// You must call DestroyResult on this handle when you are done with it.
// Returns false and sets *pResultHandle to zero if inventory is unavailable.
// Note: calls to this function are subject to rate limits and may return
// 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,
// or if you expect that the inventory may have changed.
DLL_FUNCTION(bool) BS_ISteamInventory_GetAllItems(ISteamInventory* pThis, SteamInventoryResult_t *pResultHandle) {
return pThis->GetAllItems(pResultHandle);
}
// Captures the state of a subset of the current user's Steam inventory,
// identified by an array of item instance IDs. The results from this call
// can be serialized and passed to other players to "prove" that the current
// user owns specific items, without exposing the user's entire inventory.
// For example, you could call GetItemsByID with the IDs of the user's
// currently equipped cosmetic items and serialize this to a buffer, and
// 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) {
return pThis->GetItemsByID(pResultHandle, pInstanceIDs, unCountInstanceIDs);
}
// RESULT SERIALIZATION AND AUTHENTICATION
//
// Serialized result sets contain a short signature which can't be forged
// or replayed across different game sessions. A result set can be serialized
// on the local client, transmitted to other players via your game networking,
// and deserialized by the remote players. This is a secure way of preventing
// hackers from lying about posessing rare/high-value items.
// Serializes a result set with signature bytes to an output buffer. Pass
// NULL as an output buffer to get the required size via punOutBufferSize.
// The size of a serialized result depends on the number items which are being
// serialized. When securely transmitting items to other players, it is
// recommended to use "GetItemsByID" first to create a minimal result set.
// Results have a built-in timestamp which will be considered "expired" after
// 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) {
return pThis->SerializeResult(resultHandle, pOutBuffer, punOutBufferSize);
}
// Deserializes a result set and verifies the signature bytes. Returns false
// if bRequireFullOnlineVerify is set but Steam is running in Offline mode.
// Otherwise returns true and then delivers error codes via GetResultStatus.
//
// The bRESERVED_MUST_BE_FALSE flag is reserved for future use and should not
// be set to true by your game at this time.
//
// DeserializeResult has a potential soft-failure mode where the handle status
// is set to k_EResultExpired. GetResultItems() still succeeds in this mode.
// The "expired" result could indicate that the data may be out of date - not
// just due to timed expiration (one hour), but also because one of the items
// in the result set may have been traded or consumed since the result set was
// generated. You could compare the timestamp from GetResultTimestamp() to
// ISteamUtils::GetServerRealTime() to determine how old the data is. You could
// 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.
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) {
return pThis->DeserializeResult(pOutResultHandle, pBuffer, unBufferSize, bRESERVED_MUST_BE_FALSE);
}
// INVENTORY ASYNC MODIFICATION
//
// GenerateItems() creates one or more items and then generates a SteamInventoryCallback_t
// notification with a matching nCallbackContext parameter. This API is insecure, and could
// be abused by hacked clients. It is, however, very useful as a development cheat or as
// a means of prototyping item-related features for your game. The use of GenerateItems can
// 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
// 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) {
return pThis->GenerateItems(pResultHandle, pArrayItemDefs, punArrayQuantity, unArrayLength);
}
// GrantPromoItems() checks the list of promotional items for which the user may be eligible
// 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
// promotions, this is still considered a success.
DLL_FUNCTION(bool) BS_ISteamInventory_GrantPromoItems(ISteamInventory* pThis, SteamInventoryResult_t *pResultHandle) {
return pThis->GrantPromoItems(pResultHandle);
}
// AddPromoItem() / AddPromoItems() are restricted versions of GrantPromoItems(). Instead of
// 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
// showing a specific promo item to the user.
DLL_FUNCTION(bool) BS_ISteamInventory_AddPromoItem(ISteamInventory* pThis, SteamInventoryResult_t *pResultHandle, SteamItemDef_t 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) {
return pThis->AddPromoItems(pResultHandle, pArrayItemDefs, unArrayLength);
}
// ConsumeItem() removes items from the inventory, permanently. They cannot be recovered.
// Not for the faint of heart - if your game implements item removal at all, a high-friction
// UI confirmation process is highly recommended. Similar to GenerateItems, punArrayQuantity
// can be NULL or else an array of the same length as pArrayItems which describe the quantity
// 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
// 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) {
return pThis->ConsumeItem(pResultHandle, itemConsume, unQuantity);
}
// ExchangeItems() is an atomic combination of GenerateItems and DestroyItems. It can be
// used to implement crafting recipes or transmutations, or items which unpack themselves
// into other items. Like GenerateItems, this is a flexible and dangerous API which is
// meant for rapid prototyping. You can configure restrictions on ExchangeItems via the
// Steamworks website, such as limiting it to a whitelist of input/output combinations
// corresponding to recipes.
// (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.)
DLL_FUNCTION(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(unArrayDestroyLength) const SteamItemInstanceID_t *pArrayDestroy, ARRAY_COUNT(unArrayDestroyLength) const uint32 *punArrayDestroyQuantity, uint32 unArrayDestroyLength) {
return pThis->ExchangeItems(pResultHandle, pArrayGenerate, punArrayGenerateQuantity, unArrayGenerateLength, pArrayDestroy, punArrayDestroyQuantity, unArrayDestroyLength);
}
// TransferItemQuantity() is intended for use with items which are "stackable" (can have
// 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
// 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) {
return pThis->TransferItemQuantity(pResultHandle, itemIdSource, unQuantity, itemIdDest);
}
// TIMED DROPS AND PLAYTIME CREDIT
//
// Applications which use timed-drop mechanics should call SendItemDropHeartbeat() when
// active gameplay begins, and at least once every two minutes afterwards. The backend
// performs its own time calculations, so the precise timing of the heartbeat is not
// critical as long as you send at least one heartbeat every two minutes. Calling the
// function more often than that is not harmful, it will simply have no effect. Note:
// players may be able to spoof this message by hacking their client, so you should not
// attempt to use this as a mechanism to restrict playtime credits. It is simply meant
// to distinguish between being in any kind of gameplay situation vs the main menu or
// a pre-game launcher window. (If you are stingy with handing out playtime credit, it
// will only encourage players to run bots or use mouse/kb event simulators.)
//
// Playtime credit accumulation can be capped on a daily or weekly basis through your
// Steamworks configuration.
//
DLL_FUNCTION(void) BS_ISteamInventory_SendItemDropHeartbeat(ISteamInventory* pThis) {
return pThis->SendItemDropHeartbeat();
}
// Playtime credit must be consumed and turned into item drops by your game. Only item
// definitions which are marked as "playtime item generators" can be spawned. The call
// will return an empty result set if there is not enough playtime credit for a drop.
// Your game should call TriggerItemDrop at an appropriate time for the user to receive
// new items, such as between rounds or while the player is dead. Note that players who
// 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,
// 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) {
return pThis->TriggerItemDrop(pResultHandle, dropListDefinition);
}
// IN-GAME TRADING
//
// TradeItems() implements limited in-game trading of items, if you prefer not to use
// the overlay or an in-game web browser to perform Steam Trading through the website.
// You should implement a UI where both players can see and agree to a trade, and then
// each client should call TradeItems simultaneously (+/- 5 seconds) with matching
// (but reversed) parameters. The result is the same as if both players performed a
// Steam Trading transaction through the web. Each player will get an inventory result
// confirming the removal or quantity changes of the items given away, and the new
// item instance id numbers and quantities of the received items.
// (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,
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) {
return pThis->TradeItems(pResultHandle, *steamIDTradePartner, pArrayGive, pArrayGiveQuantity, nArrayGiveLength, pArrayGet, pArrayGetQuantity, nArrayGetLength);
}
// ITEM DEFINITIONS
//
// Item definitions are a mapping of "definition IDs" (integers between 1 and 1000000)
// to a set of string properties. Some of these properties are required to display items
// on the Steam community web site. Other properties can be defined by applications.
// Use of these functions is optional; there is no reason to call LoadItemDefinitions
// if your game hardcodes the numeric definition IDs (eg, purple face mask = 20, blue
// weapon mod = 55) and does not allow for adding new item types without a client patch.
//
// LoadItemDefinitions triggers the automatic load and refresh of item definitions.
// 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
// callback will be fired.
DLL_FUNCTION(bool) BS_ISteamInventory_LoadItemDefinitions(ISteamInventory* pThis) {
return pThis->LoadItemDefinitions();
}
// GetItemDefinitionIDs returns the set of all defined item definition IDs (which are
// defined via Steamworks configuration, and not necessarily contiguous integers).
// 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
// return false if and only if there is not enough space in the output array.
DLL_FUNCTION(bool) BS_ISteamInventory_GetItemDefinitionIDs(ISteamInventory* pThis,
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) {
return pThis->GetItemDefinitionIDs(pItemDefIDs, punItemDefIDsArraySize);
}
// GetItemDefinitionProperty returns a string property from a given item definition.
// Note that some properties (for example, "name") may be localized and will depend
// on the current Steam language settings (see ISteamApps::GetCurrentGameLanguage).
// 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
// property names.
DLL_FUNCTION(bool) BS_ISteamInventory_GetItemDefinitionProperty(ISteamInventory* pThis, SteamItemDef_t iDefinition, const char *pchPropertyName,
OUT_STRING_COUNT(punValueBufferSize) char *pchValueBuffer, uint32 *punValueBufferSize) {
return pThis->GetItemDefinitionProperty(iDefinition, pchPropertyName, pchValueBuffer, punValueBufferSize);
}
+3 -2
View File
@@ -16,7 +16,8 @@
#include "BlitzSteam.h"
DLL_FUNCTION(ISteamMatchmaking*) BS_Matchmaking() {
DLL_FUNCTION(ISteamMatchmaking*) BS_SteamMatchmaking() {
return SteamMatchmaking();
}
BS_I
#pragma message("SteamMatchmaking is not ported yet. TODO!")
+2 -73
View File
@@ -16,79 +16,8 @@
#include "BlitzSteam.h"
DLL_FUNCTION(ISteamMatchmakingServers*) BS_MatchmakingServers() {
DLL_FUNCTION(ISteamMatchmakingServers*) BS_SteamMatchmakingServers() {
return SteamMatchmakingServers();
}
DLL_FUNCTION(HServerListRequest) BS_MathmakingServers_RequestInternetServerList(AppId_t iApp, MatchMakingKeyValuePair_t** ppkvFilter, uint32_t nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse) {
return SteamMatchmakingServers()->RequestInternetServerList(iApp, ppkvFilter, nFilters, pRequestServersResponse);
}
/*DLL_FUNCTION(HServerListRequest) BS_MathmakingServers_RequestLANServerList(AppId_t iApp, const char** ppchFilters, uint32_t nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse) {
//return SteamMatchmakingServers()->RequestLANServerList(iApp);
}
DLL_FUNCTION(HServerListRequest) BS_MathmakingServers_RequestFriendsServerList(AppId_t iApp, const char** ppchFilters, uint32_t nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse) {
}
DLL_FUNCTION(HServerListRequest) BS_MathmakingServers_RequestFavoritesServerList(AppId_t iApp, const char** ppchFilters, uint32_t nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse) {
}
DLL_FUNCTION(HServerListRequest) BS_MathmakingServers_RequestHistoryServerList(AppId_t iApp, const char** ppchFilters, uint32_t nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse) {
}
DLL_FUNCTION(HServerListRequest) BS_MathmakingServers_RequestSpectatorServerList(AppId_t iApp, const char** ppchFilters, uint32_t nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse) {
}*/
//
//
//// Releases the asynchronous request object and cancels any pending query on it if there's a pending query in progress.
//// RefreshComplete callback is not posted when request is released.
//virtual void ReleaseRequest( HServerListRequest hServerListRequest ) = 0;
//
//// Get details on a given server in the list, you can get the valid range of index
//// values by calling GetServerCount(). You will also receive index values in
//// ISteamMatchmakingServerListResponse::ServerResponded() callbacks
//virtual gameserveritem_t *GetServerDetails( HServerListRequest hRequest, int iServer ) = 0;
//
//// Cancel an request which is operation on the given list type. You should call this to cancel
//// any in-progress requests before destructing a callback object that may have been passed
//// to one of the above list request calls. Not doing so may result in a crash when a callback
//// occurs on the destructed object.
//// Canceling a query does not release the allocated request handle.
//// The request handle must be released using ReleaseRequest( hRequest )
//virtual void CancelQuery( HServerListRequest hRequest ) = 0;
//
//// Ping every server in your list again but don't update the list of servers
//// Query callback installed when the server list was requested will be used
//// again to post notifications and RefreshComplete, so the callback must remain
//// valid until another RefreshComplete is called on it or the request
//// is released with ReleaseRequest( hRequest )
//virtual void RefreshQuery( HServerListRequest hRequest ) = 0;
//
//// Returns true if the list is currently refreshing its server list
//virtual bool IsRefreshing( HServerListRequest hRequest ) = 0;
//
//// How many servers in the given list, GetServerDetails above takes 0... GetServerCount() - 1
//virtual int GetServerCount( HServerListRequest hRequest ) = 0;
//
//// Refresh a single server inside of a query (rather than all the servers )
//virtual void RefreshServer( HServerListRequest hRequest, int iServer ) = 0;
//
//
////-----------------------------------------------------------------------------
//// Queries to individual servers directly via IP/Port
////-----------------------------------------------------------------------------
//
//// Request updated ping time and other details from a single server
//virtual HServerQuery PingServer( uint32 unIP, uint16 usPort, ISteamMatchmakingPingResponse *pRequestServersResponse ) = 0;
//
//// Request the list of players currently playing on a server
//virtual HServerQuery PlayerDetails( uint32 unIP, uint16 usPort, ISteamMatchmakingPlayersResponse *pRequestServersResponse ) = 0;
//
//// Request the list of rules that the server is running (See ISteamGameServer::SetKeyValue() to set the rules server side)
//virtual HServerQuery ServerRules( uint32 unIP, uint16 usPort, ISteamMatchmakingRulesResponse *pRequestServersResponse ) = 0;
//
//// Cancel an outstanding Ping/Players/Rules query from above. You should call this to cancel
//// any in-progress requests before destructing a callback object that may have been passed
//// to one of the above calls to avoid crashing when callbacks occur.
//virtual void CancelServerQuery( HServerQuery hServerQuery ) = 0;
#pragma message("SteamMatchmakingServers is not ported yet. TODO!")
+3 -2
View File
@@ -16,7 +16,8 @@
#include "BlitzSteam.h"
DLL_FUNCTION(ISteamMusic*) BS_Music() {
DLL_FUNCTION(ISteamMusic*) BS_SteamMusic() {
return SteamMusic();
}
BS_I
#pragma message("SteamMusic is not ported yet. TODO!")
+3 -2
View File
@@ -16,7 +16,8 @@
#include "BlitzSteam.h"
DLL_FUNCTION(ISteamMusicRemote*) BS_MusicRemote() {
DLL_FUNCTION(ISteamMusicRemote*) BS_SteamMusicRemote() {
return SteamMusicRemote();
}
BS_I
#pragma message("SteamMusicRemote is not ported yet. TODO!")
+59 -18
View File
@@ -16,42 +16,83 @@
#include "BlitzSteam.h"
DLL_FUNCTION(ISteamNetworking*) BS_Networking() {
//-----------------------------------------------------------------------------
// Purpose: Functions for making connections and sending data between clients,
// traversing NAT's where possible
//-----------------------------------------------------------------------------
DLL_FUNCTION(ISteamNetworking*) BS_SteamNetworking() {
return SteamNetworking();
}
DLL_FUNCTION(ISteamNetworking*) BS_GameServerNetworking() {
DLL_FUNCTION(ISteamNetworking*) BS_SteamGameServerNetworking() {
return SteamGameServerNetworking();
}
DLL_FUNCTION(uint32_t) BS_Networking_SendP2PPacket(ISteamNetworking* pSteamNetworking, CSteamID* pSteamIDRemote, const void* pubData, uint32_t cubData, EP2PSend eP2PSendType, uint32_t nChannel) {
return pSteamNetworking->SendP2PPacket(*pSteamIDRemote, pubData, cubData, eP2PSendType, nChannel);
////////////////////////////////////////////////////////////////////////////////////////////
// Session-less connection functions
// automatically establishes NAT-traversing or Relay server connections
// Sends a P2P packet to the specified user
// UDP-like, unreliable and a max packet size of 1200 bytes
// the first packet send may be delayed as the NAT-traversal code runs
// if we can't get through to the user, an error will be posted via the callback P2PSessionConnectFail_t
// see EP2PSend enum above for the descriptions of the different ways of sending packets
//
// 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
// 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) {
return pThis->SendP2PPacket(*pSteamIDRemote, pubData, cubData, eP2PSendType, nChannel);
}
DLL_FUNCTION(uint32_t) BS_Networking_IsP2PPacketAvailable(ISteamNetworking* pSteamNetworking, uint32_t* pcubMsgSize, uint32_t nChannel) {
return pSteamNetworking->IsP2PPacketAvailable(pcubMsgSize, nChannel);
// 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) {
return pThis->IsP2PPacketAvailable(pcubMsgSize, nChannel);
}
DLL_FUNCTION(uint32_t) BS_Networking_ReadP2PPacket(ISteamNetworking* pSteamNetworking, void* pubDest, uint32_t cubDest, uint32_t* pcubMsgSize, CSteamID* pSteamIDRemote, uint32_t nChannel) {
return pSteamNetworking->ReadP2PPacket(pubDest, cubDest, pcubMsgSize, pSteamIDRemote, nChannel);
// reads in a packet that has been sent from another user via SendP2PPacket()
// 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
// 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) {
return pThis->ReadP2PPacket(pubDest, cubDest, pcubMsgSize, pSteamIDRemote, nChannel);
}
DLL_FUNCTION(uint32_t) BS_Networking_AcceptP2PSessionWithUser(ISteamNetworking* pSteamNetworking, CSteamID* pSteamIDRemote) {
return pSteamNetworking->AcceptP2PSessionWithUser(*pSteamIDRemote);
// AcceptP2PSessionWithUser() should only be called in response to a P2PSessionRequest_t callback
// P2PSessionRequest_t will be posted if another user tries to send you a packet that you haven't talked to yet
// if you don't want to talk to the user, just ignore the request
// 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
// (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) {
return pThis->AcceptP2PSessionWithUser(*pSteamIDRemote);
}
DLL_FUNCTION(uint32_t) BS_Networking_CloseP2PSessionWithUser(ISteamNetworking* pSteamNetworking, CSteamID* pSteamIDRemote) {
return pSteamNetworking->CloseP2PSessionWithUser(*pSteamIDRemote);
// 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
DLL_FUNCTION(uint32_t) BS_ISteamNetworking_CloseP2PSessionWithUser(ISteamNetworking* pThis, CSteamID* pSteamIDRemote) {
return pThis->CloseP2PSessionWithUser(*pSteamIDRemote);
}
DLL_FUNCTION(uint32_t) BS_Networking_CloseP2PChannelWithUser(ISteamNetworking* pSteamNetworking, CSteamID* pSteamIDRemote, uint32_t nChannel) {
return pSteamNetworking->CloseP2PChannelWithUser(*pSteamIDRemote, nChannel);
// 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
// user will trigger a P2PSessionRequest_t callback
DLL_FUNCTION(uint32_t) BS_ISteamNetworking_CloseP2PChannelWithUser(ISteamNetworking* pThis, CSteamID* pSteamIDRemote, uint32_t nChannel) {
return pThis->CloseP2PChannelWithUser(*pSteamIDRemote, nChannel);
}
DLL_FUNCTION(uint32_t) BS_Networking_GetP2PSessionState(ISteamNetworking* pSteamNetworking, CSteamID* pSteamIDRemote, P2PSessionState_t* pConnectionState) {
return pSteamNetworking->GetP2PSessionState(*pSteamIDRemote, pConnectionState);
// fills out P2PSessionState_t structure with details about the underlying connection to the user
// should only needed for debugging purposes
// returns false if no connection exists to the specified user
DLL_FUNCTION(uint32_t) BS_ISteamNetworking_GetP2PSessionState(ISteamNetworking* pThis, CSteamID* pSteamIDRemote, P2PSessionState_t* pConnectionState) {
return pThis->GetP2PSessionState(*pSteamIDRemote, pConnectionState);
}
DLL_FUNCTION(uint32_t) BS_Networking_AllowP2PPacketRelay(ISteamNetworking* pSteamNetworking, uint32_t bAllow) {
return pSteamNetworking->AllowP2PPacketRelay(!!bAllow);
// Allow P2P connections to fall back to being relayed through the Steam servers if a direct connection
// or NAT-traversal cannot be established. Only applies to connections created after setting this value,
// or to existing connections that need to automatically reconnect after this value is set.
//
// P2P packet relay is allowed by default
DLL_FUNCTION(uint32_t) BS_ISteamNetworking_AllowP2PPacketRelay(ISteamNetworking* pThis, uint32_t bAllow) {
return pThis->AllowP2PPacketRelay(!!bAllow);
}
+3 -2
View File
@@ -16,7 +16,8 @@
#include "BlitzSteam.h"
DLL_FUNCTION(ISteamRemoteStorage*) BS_RemoteStorage() {
DLL_FUNCTION(ISteamRemoteStorage*) BS_SteamRemoteStorage() {
return SteamRemoteStorage();
}
BS_I
#pragma message("SteamRemoteStorage is not ported yet. TODO!")
+3 -2
View File
@@ -16,7 +16,8 @@
#include "BlitzSteam.h"
DLL_FUNCTION(ISteamScreenshots*) BS_Screenshots() {
DLL_FUNCTION(ISteamScreenshots*) BS_SteamScreenshots() {
return SteamScreenshots();
}
BS_I
#pragma message("SteamScreenshots is not ported yet. TODO!")
+4 -2
View File
@@ -16,11 +16,13 @@
#include "BlitzSteam.h"
DLL_FUNCTION(ISteamUGC*) BS_UGC() {
DLL_FUNCTION(ISteamUGC*) BS_SteamUGC() {
return SteamUGC();
}
DLL_FUNCTION(ISteamUGC*) BS_GameServerUGC() {
DLL_FUNCTION(ISteamUGC*) BS_SteamGameServerUGC() {
return SteamGameServerUGC();
}
#pragma message("SteamUGC is not ported yet. TODO!")
+3 -2
View File
@@ -16,7 +16,8 @@
#include "BlitzSteam.h"
DLL_FUNCTION(ISteamUnifiedMessages*) BS_UnifiedMessages() {
DLL_FUNCTION(ISteamUnifiedMessages*) BS_SteamUnifiedMessages() {
return SteamUnifiedMessages();
}
BS_I
#pragma message("SteamUnifiedMessages is not ported yet. TODO!")
+144 -52
View File
@@ -16,107 +16,199 @@
#include "BlitzSteam.h"
DLL_FUNCTION(ISteamUser*) BS_User() {
//-----------------------------------------------------------------------------
// Purpose: Functions for accessing and manipulating a steam account
// associated with one client instance
//-----------------------------------------------------------------------------
DLL_FUNCTION(ISteamUser*) BS_SteamUser() {
return SteamUser();
}
BS_I
DLL_FUNCTION(HSteamUser) BS_User_GetHSteamUser( ISteamUser* lpSteamUser ) {
// returns the HSteamUser this interface represents
// 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 ) {
return lpSteamUser->GetHSteamUser( );
}
BS_I
DLL_FUNCTION(uint32_t) BS_User_IsLoggedOn( ISteamUser* lpSteamUser ) {
// 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.
// The Steam client will automatically be trying to recreate the connection as often as possible.
DLL_FUNCTION(uint32_t) BS_ISteamUser_IsLoggedOn( ISteamUser* lpSteamUser ) {
return lpSteamUser->BLoggedOn( );
}
BS_I
DLL_FUNCTION(CSteamID*) BS_User_GetSteamID( ISteamUser* lpSteamUser ) {
// 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
DLL_FUNCTION(CSteamID*) BS_ISteamUser_GetSteamID( ISteamUser* lpSteamUser ) {
return &(lpSteamUser->GetSteamID( ));
}
BS_I
DLL_FUNCTION(uint32_t) BS_User_InitiateGameConnection( ISteamUser* lpSteamUser, void* pAuthBlob, uint32_t cbMaxAuthBlob, CSteamID* SteamIDGameServer, uint32_t unIPServer, uint16_t usPortServer, uint32_t bSecure ) {
// Multiplayer Authentication functions
// InitiateGameConnection() starts the state machine for authenticating the game client with the game server
// It is the client portion of a three-way handshake between the client, the game server, and the steam servers
//
// Parameters:
// void *pAuthBlob - a pointer to empty memory that will be filled in with the authentication token.
// int cbMaxAuthBlob - the number of bytes of allocated memory in pBlob. Should be at least 2048 bytes.
// CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client
// CGameID gameID - the ID of the current game. For games without mods, this is just CGameID( <appID> )
// uint32 unIPServer, uint16 usPortServer - the IP address of the game server
// bool bSecure - whether or not the client thinks that the game server is reporting itself as secure (i.e. VAC is running)
//
// 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.
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 ) {
return lpSteamUser->InitiateGameConnection( pAuthBlob, cbMaxAuthBlob, *SteamIDGameServer, unIPServer, usPortServer, bSecure != 0 );
}
BS_I
DLL_FUNCTION(void) BS_User_TerminateGameConnection( ISteamUser* lpSteamUser, uint32_t unIPServer, uint16_t usPortServer ) {
// notify of disconnect
// 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 ) {
lpSteamUser->TerminateGameConnection( unIPServer, usPortServer );
}
BS_I
DLL_FUNCTION(void) BS_User_TrackAppUsageEvent( ISteamUser* lpSteamUser, CGameID* gameId, uint32_t eAppUsageEvent, const char* pchExtraInfo ) {
// Legacy functions
// 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 ) {
lpSteamUser->TrackAppUsageEvent( *gameId, eAppUsageEvent, pchExtraInfo );
}
BS_I
DLL_FUNCTION(uint32_t) BS_User_GetUserDataFolder( ISteamUser* lpSteamUser, char* pchBuffer, uint32_t cubBuffer ) {
// 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"
DLL_FUNCTION(uint32_t) BS_ISteamUser_GetUserDataFolder( ISteamUser* lpSteamUser, char* pchBuffer, uint32_t cubBuffer ) {
return lpSteamUser->GetUserDataFolder( pchBuffer, cubBuffer );
}
BS_I
DLL_FUNCTION(void) BS_User_StartVoiceRecording( ISteamUser* lpSteamUser ) {
// Starts voice recording. Once started, use GetVoice() to get the data
DLL_FUNCTION(void) BS_ISteamUser_StartVoiceRecording( ISteamUser* lpSteamUser ) {
lpSteamUser->StartVoiceRecording( );
}
BS_I
DLL_FUNCTION(void) BS_User_StopVoiceRecording( ISteamUser* lpSteamUser ) {
// 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
// k_eVoiceResultNotRecording
DLL_FUNCTION(void) BS_ISteamUser_StopVoiceRecording( ISteamUser* lpSteamUser ) {
lpSteamUser->StopVoiceRecording( );
}
BS_I
DLL_FUNCTION(EVoiceResult) BS_User_GetAvailableVoice( ISteamUser* lpSteamUser, uint32_t* pcbCompressed, uint32_t* pcbUncompressed, uint32_t nUncompressedVoiceDesiredSampleRate ) {
// Determine the amount of captured audio data that is available in bytes.
// This provides both the compressed and uncompressed data. Please note that the uncompressed
// data is not the raw feed from the microphone: data may only be available if audible
// 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)
// 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 ) {
return lpSteamUser->GetAvailableVoice( pcbCompressed, pcbUncompressed, nUncompressedVoiceDesiredSampleRate );
}
BS_I
DLL_FUNCTION(EVoiceResult) BS_User_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 ) {
// Gets the latest voice data from the microphone. Compressed data is an arbitrary format, and is meant to be handed back to
// DecompressVoice() for playback later as a binary blob. Uncompressed data is 16-bit, signed integer, 11025Hz PCM format.
// Please note that the uncompressed data is not the raw feed from the microphone: data may only be available if audible
// levels of speech are detected, and may have passed through denoising filters, etc.
// This function should be called as often as possible once recording has started; once per frame at least.
// nBytesWritten is set to the number of bytes written to pDestBuffer.
// nUncompressedBytesWritten is set to the number of bytes written to pUncompressedDestBuffer.
// You must grab both compressed and uncompressed here at the same time, if you want both.
// 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.
// 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 ) {
return lpSteamUser->GetVoice( bWantCompressed != 0, pDestBuffer, cbDestBufferSize, nBytesWritten, bWantUncompressed != 0, pUncompressedDestBuffer, cbUncompressedDestBufferSize, nUncompressBytesWritten, nUncompressedVoiceDesiredSampleRate );
}
BS_I
DLL_FUNCTION(EVoiceResult) BS_User_DecompressVoice( ISteamUser* lpSteamUser, const void *pCompressed, uint32_t cbCompressed, void *pDestBuffer, uint32_t cbDestBufferSize, uint32_t *nBytesWritten, uint32_t nDesiredSampleRate ) {
// Decompresses a chunk of compressed data produced by GetVoice().
// nBytesWritten is set to the number of bytes written to pDestBuffer unless the return value is k_EVoiceResultBufferTooSmall.
// In that case, nBytesWritten is set to the size of the buffer required to decompress the given
// 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.
// 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 ) {
return lpSteamUser->DecompressVoice( pCompressed, cbCompressed, pDestBuffer, cbDestBufferSize, nBytesWritten, nDesiredSampleRate );
}
BS_I
DLL_FUNCTION(uint32_t) BS_User_GetVoiceOptimalSampleRate( ISteamUser* lpSteamUser ) {
// 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 ) {
return lpSteamUser->GetVoiceOptimalSampleRate( );
}
BS_I
DLL_FUNCTION(HAuthTicket) BS_User_GetAuthSessionTicket( ISteamUser* lpSteamUser, void* pTicket, uint32_t cbMaxTicket, uint32_t* pcbTicket ) {
// Retrieve ticket to be sent to the entity who wishes to authenticate you.
// pcbTicket retrieves the length of the actual ticket.
DLL_FUNCTION(HAuthTicket) BS_ISteamUser_GetAuthSessionTicket( ISteamUser* lpSteamUser, void* pTicket, uint32_t cbMaxTicket, uint32_t* pcbTicket ) {
return lpSteamUser->GetAuthSessionTicket( pTicket, cbMaxTicket, pcbTicket );
}
BS_I
DLL_FUNCTION(EBeginAuthSessionResult) BS_User_BeginAuthSession( ISteamUser* lpSteamUser, const void *pAuthTicket, uint32_t cbAuthTicket, CSteamID* steamID ) {
// 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 )
DLL_FUNCTION(EBeginAuthSessionResult) BS_ISteamUser_BeginAuthSession( ISteamUser* lpSteamUser, const void *pAuthTicket, uint32_t cbAuthTicket, CSteamID* steamID ) {
return lpSteamUser->BeginAuthSession( pAuthTicket, cbAuthTicket, *steamID );
}
BS_I
DLL_FUNCTION(void) BS_User_EndAuthSession( ISteamUser* lpSteamUser, CSteamID* steamID ) {
// Stop tracking started by BeginAuthSession - called when no longer playing game with this entity
DLL_FUNCTION(void) BS_ISteamUser_EndAuthSession( ISteamUser* lpSteamUser, CSteamID* steamID ) {
lpSteamUser->EndAuthSession( *steamID );
}
BS_I
DLL_FUNCTION(void) BS_User_CancelAuthTicket( ISteamUser* lpSteamUser, HAuthTicket hAuthTicket ) {
// 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 ) {
lpSteamUser->CancelAuthTicket( hAuthTicket );
}
BS_I
DLL_FUNCTION(EUserHasLicenseForAppResult) BS_User_UserHasLicenseForApp( ISteamUser* lpSteamUser, CSteamID* steamID, AppId_t appID ) {
// 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.
DLL_FUNCTION(EUserHasLicenseForAppResult) BS_ISteamUser_UserHasLicenseForApp( ISteamUser* lpSteamUser, CSteamID* steamID, AppId_t appID ) {
return lpSteamUser->UserHasLicenseForApp( *steamID, appID );
}
BS_I
DLL_FUNCTION(uint32_t) BS_User_IsBehindNAT( ISteamUser* lpSteamUser ) {
// 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.
DLL_FUNCTION(uint32_t) BS_ISteamUser_IsBehindNAT( ISteamUser* lpSteamUser ) {
return lpSteamUser->BIsBehindNAT( );
}
BS_I
DLL_FUNCTION(void) BS_User_AdvertiseGame( ISteamUser* lpSteamUser, CSteamID* steamIDGameServer, uint32_t unIPServer, uint16_t usPortServer ) {
// 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
// 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 ) {
lpSteamUser->AdvertiseGame( *steamIDGameServer, unIPServer, usPortServer );
}
BS_I
DLL_FUNCTION(SteamAPICall_t*) BS_User_RequestEncryptedAppTicket( ISteamUser* lpSteamUser, void* pDataToInclude, uint32_t cbDataToInclude ) {
// Requests a ticket encrypted with an app specific shared key
// pDataToInclude, cbDataToInclude will be encrypted into the ticket
// ( This is asynchronous, you must wait for the ticket to be completed by the server )
//CALL_RESULT( EncryptedAppTicketResponse_t )
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamUser_RequestEncryptedAppTicket( ISteamUser* lpSteamUser, void* pDataToInclude, uint32_t cbDataToInclude ) {
return new uint64_t(lpSteamUser->RequestEncryptedAppTicket( pDataToInclude, cbDataToInclude ));
}
BS_I
DLL_FUNCTION(uint32_t) BS_User_GetEncryptedAppTicket( ISteamUser* lpSteamUser, void *pTicket, uint32_t cbMaxTicket, uint32_t* pcbTicket ) {
// retrieve a finished ticket
DLL_FUNCTION(uint32_t) BS_ISteamUser_GetEncryptedAppTicket( ISteamUser* lpSteamUser, void *pTicket, uint32_t cbMaxTicket, uint32_t* pcbTicket ) {
return lpSteamUser->GetEncryptedAppTicket( pTicket, cbMaxTicket, pcbTicket );
}
BS_I
DLL_FUNCTION(uint32_t) BS_User_GetGameBadgeLevel( ISteamUser* lpSteamUser, uint32_t nSeries, uint32_t bFoil ) {
// Trading Card badges data access
// 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)
DLL_FUNCTION(uint32_t) BS_ISteamUser_GetGameBadgeLevel( ISteamUser* lpSteamUser, uint32_t nSeries, uint32_t bFoil ) {
return lpSteamUser->GetGameBadgeLevel( nSeries, bFoil != 0 );
}
BS_I
DLL_FUNCTION(uint32_t) BS_User_GetPlayerSteamLevel( ISteamUser* lpSteamUser ) {
// gets the Steam Level of the user, as shown on their profile
DLL_FUNCTION(uint32_t) BS_ISteamUser_GetPlayerSteamLevel( ISteamUser* lpSteamUser ) {
return lpSteamUser->GetPlayerSteamLevel( );
}
BS_I
DLL_FUNCTION(SteamAPICall_t*) BS_User_RequestStoreAuthURL( ISteamUser* lpSteamUser, const char* pchRedirectURL ) {
// Requests a URL which authenticates an in-game browser for store check-out,
// and then redirects to the specified URL. As long as the in-game browser
// accepts and handles session cookies, Steam microtransaction checkout pages
// will automatically recognize the user instead of presenting a login page.
// The result of this API call will be a StoreAuthURLResponse_t callback.
// NOTE: The URL has a very short lifetime to prevent history-snooping attacks,
// so you should only call this API when you are about to launch the browser,
// 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,
// 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 ) {
return new uint64_t(lpSteamUser->RequestStoreAuthURL( pchRedirectURL ));
}
#pragma comment(linker, "/EXPORT:BS_User_RequestStoreAuthURL=_BS_User_RequestStoreAuthURL@8")
+203 -89
View File
@@ -16,179 +16,293 @@
#include "BlitzSteam.h"
DLL_FUNCTION(ISteamUserStats*) BS_UserStats() {
//-----------------------------------------------------------------------------
// Purpose: Functions for accessing stats, achievements, and leaderboard information
//-----------------------------------------------------------------------------
DLL_FUNCTION(ISteamUserStats*) BS_SteamUserStats() {
return SteamUserStats();
}
BS_I
DLL_FUNCTION(uint32_t) BS_UserStats_RequestCurrentStats( ISteamUserStats* lpSteamUserStats ) {
// Ask the server to send down this user's data and achievements for this game
//CALL_BACK(UserStatsReceived_t)
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_RequestCurrentStats( ISteamUserStats* lpSteamUserStats ) {
return lpSteamUserStats->RequestCurrentStats( );
}
BS_I
DLL_FUNCTION(uint32_t) BS_UserStats_GetStat( ISteamUserStats* lpSteamUserStats, const char* pchName, int32_t* pData ) {
// Data accessors
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetStat( ISteamUserStats* lpSteamUserStats, const char* pchName, int32_t* pData ) {
return lpSteamUserStats->GetStat( pchName, pData );
}
BS_I
DLL_FUNCTION(uint32_t) BS_UserStats_GetStatF( ISteamUserStats* lpSteamUserStats, const char* pchName, float_t* pData ) {
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetStatF( ISteamUserStats* lpSteamUserStats, const char* pchName, float_t* pData ) {
return lpSteamUserStats->GetStat( pchName, pData );
}
BS_I
DLL_FUNCTION(uint32_t) BS_UserStats_SetStat( ISteamUserStats* lpSteamUserStats, const char* pchName, int32_t pData ) {
// Set / update data
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_SetStat( ISteamUserStats* lpSteamUserStats, const char* pchName, int32_t pData ) {
return lpSteamUserStats->SetStat( pchName, pData );
}
BS_I
DLL_FUNCTION(uint32_t) BS_UserStats_SetStatF( ISteamUserStats* lpSteamUserStats, const char* pchName, float_t pData ) {
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_SetStatF( ISteamUserStats* lpSteamUserStats, const char* pchName, float_t pData ) {
return lpSteamUserStats->SetStat( pchName, pData );
}
BS_I
DLL_FUNCTION(uint32_t) BS_UserStats_UpdateAvgRateStat( ISteamUserStats* lpSteamUserStats, const char* pchName, float_t flCountThisSession, double_t* dSessionLength ) {
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_UpdateAvgRateStat( ISteamUserStats* lpSteamUserStats, const char* pchName, float_t flCountThisSession, double_t* dSessionLength ) {
return lpSteamUserStats->UpdateAvgRateStat( pchName, flCountThisSession, *dSessionLength );
}
BS_I
DLL_FUNCTION(uint32_t) BS_UserStats_GetAchievement( ISteamUserStats* lpSteamUserStats, const char* pchName, bool* pbAchieved ) {
// Achievement flag accessors
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetAchievement( ISteamUserStats* lpSteamUserStats, const char* pchName, bool* pbAchieved ) {
return lpSteamUserStats->GetAchievement( pchName, (bool*)pbAchieved );
}
BS_I
DLL_FUNCTION(uint32_t) BS_UserStats_SetAchievement( ISteamUserStats* lpSteamUserStats, const char* pchName ) {
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_SetAchievement( ISteamUserStats* lpSteamUserStats, const char* pchName ) {
return lpSteamUserStats->SetAchievement( pchName );
}
BS_I
DLL_FUNCTION(uint32_t) BS_UserStats_ClearAchievement( ISteamUserStats* lpSteamUserStats, const char* pchName ) {
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_ClearAchievement( ISteamUserStats* lpSteamUserStats, const char* pchName ) {
return lpSteamUserStats->ClearAchievement( pchName );
}
BS_I
DLL_FUNCTION(uint32_t) BS_UserStats_GetAchievementAndUnlockTime( ISteamUserStats* lpSteamUserStats, const char* pchName, bool* pbAchieved, uint32_t* punUnlockTime ) {
// 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
// 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 ) {
return lpSteamUserStats->GetAchievementAndUnlockTime( pchName, (bool*)pbAchieved, punUnlockTime );
}
BS_I
DLL_FUNCTION(uint32_t) BS_UserStats_StoreStats( ISteamUserStats* lpSteamUserStats ) {
// Store the current data on the server, will get a callback when set
// And one callback for every new achievement
//
// If the callback has a result of k_EResultInvalidParam, one or more stats
// uploaded has been rejected, either because they broke constraints
// or were out of date. In this case the server sends back updated values.
// The stats should be re-iterated to keep in sync.
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_StoreStats( ISteamUserStats* lpSteamUserStats ) {
return lpSteamUserStats->StoreStats( );
}
BS_I
DLL_FUNCTION(uint32_t) BS_UserStats_GetAchievementIcon( ISteamUserStats* lpSteamUserStats, const char* pchName ) {
// Achievement / GroupAchievement metadata
// Gets the icon of the achievement, which is a handle to be used in ISteamUtils::GetImageRGBA(), or 0 if none set.
// 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
// specified achievement.
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetAchievementIcon( ISteamUserStats* lpSteamUserStats, const char* pchName ) {
return lpSteamUserStats->GetAchievementIcon( pchName );
}
BS_I
DLL_FUNCTION(const char*) BS_UserStats_GetAchievementDisplayAttribute( ISteamUserStats* lpSteamUserStats, const char* pchName, const char* pchKey ) {
// Get general attributes for an achievement. Accepts the following keys:
// - "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)
DLL_FUNCTION(const char*) BS_ISteamUserStats_GetAchievementDisplayAttribute( ISteamUserStats* lpSteamUserStats, const char* pchName, const char* pchKey ) {
return lpSteamUserStats->GetAchievementDisplayAttribute( pchName, pchKey );
}
BS_I
DLL_FUNCTION(uint32_t) BS_UserStats_IndicateAchievementProgress( ISteamUserStats* lpSteamUserStats, const char* pchName, uint32_t nCurProgress, uint32_t nMaxProgress ) {
// 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.
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_IndicateAchievementProgress( ISteamUserStats* lpSteamUserStats, const char* pchName, uint32_t nCurProgress, uint32_t nMaxProgress ) {
return lpSteamUserStats->IndicateAchievementProgress( pchName, nCurProgress, nMaxProgress );
}
BS_I
DLL_FUNCTION(uint32_t) BS_UserStats_GetNumAchievements( ISteamUserStats* lpSteamUserStats ) {
// Used for iterating achievements. In general games should not need these functions because they should have a
// list of existing achievements compiled into them
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetNumAchievements( ISteamUserStats* lpSteamUserStats ) {
return lpSteamUserStats->GetNumAchievements( );
}
BS_I
DLL_FUNCTION(const char*) BS_UserStats_GetAchievementName( ISteamUserStats* lpSteamUserStats, uint32_t iAchievement ) {
// Get achievement name iAchievement in [0,GetNumAchievements)
DLL_FUNCTION(const char*) BS_ISteamUserStats_GetAchievementName( ISteamUserStats* lpSteamUserStats, uint32_t iAchievement ) {
return lpSteamUserStats->GetAchievementName( iAchievement );
}
BS_I
DLL_FUNCTION(SteamAPICall_t*) BS_UserStats_RequestUserStats( ISteamUserStats* lpSteamUserStats, CSteamID* steamIDUser ) {
// Friends stats & achievements
// downloads stats for the user
// returns a UserStatsReceived_t received when completed
// 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
//CALL_RESULT(UserStatsReceived_t)
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamUserStats_RequestUserStats( ISteamUserStats* lpSteamUserStats, CSteamID* steamIDUser ) {
return new uint64_t( lpSteamUserStats->RequestUserStats( *steamIDUser ) );
}
BS_I
DLL_FUNCTION(uint32_t) BS_UserStats_GetUserStat( ISteamUserStats* lpSteamUserStats, CSteamID* steamIDUser, const char* pchName, uint32_t* pData ) {
// 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 ) {
return lpSteamUserStats->GetUserStat( *steamIDUser, pchName, (int32_t*)pData );
}
BS_I
DLL_FUNCTION(uint32_t) BS_UserStats_GetUserStatF( ISteamUserStats* lpSteamUserStats, CSteamID* steamIDUser, const char* pchName, float_t* pData ) {
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetUserStatF( ISteamUserStats* lpSteamUserStats, CSteamID* steamIDUser, const char* pchName, float_t* pData ) {
return lpSteamUserStats->GetUserStat( *steamIDUser, pchName, pData );
}
BS_I
DLL_FUNCTION(uint32_t) BS_UserStats_GetUserAchievement( ISteamUserStats* lpSteamUserStats, CSteamID* steamIDUser, const char* pchName, bool* pbAchieved ) {
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetUserAchievement( ISteamUserStats* lpSteamUserStats, CSteamID* steamIDUser, const char* pchName, bool* pbAchieved ) {
return lpSteamUserStats->GetUserAchievement( *steamIDUser, pchName, (bool*)pbAchieved );
}
BS_I
DLL_FUNCTION(uint32_t) BS_UserStats_GetUserAchievementAndUnlockTime( ISteamUserStats* lpSteamUserStats, CSteamID* steamIDUser, const char* pchName, bool* pbAchieved, uint32_t* punUnlockTime ) {
// See notes for GetAchievementAndUnlockTime above
DLL_FUNCTION(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 );
}
BS_I
DLL_FUNCTION(uint32_t) BS_UserStats_ResetAllStats( ISteamUserStats* lpSteamUserStats, uint32_t bAchievementsToo ) {
// Reset stats
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_ResetAllStats( ISteamUserStats* lpSteamUserStats, uint32_t bAchievementsToo ) {
return lpSteamUserStats->ResetAllStats( bAchievementsToo != 0 );
}
BS_I
DLL_FUNCTION(SteamAPICall_t*) BS_UserStats_FindOrCreateLeaderboard( ISteamUserStats* lpSteamUserStats, const char* pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType ) {
// Leaderboard functions
// 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
//CALL_RESULT(LeaderboardFindResult_t)
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamUserStats_FindOrCreateLeaderboard( ISteamUserStats* lpSteamUserStats, const char* pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType ) {
return new uint64_t( lpSteamUserStats->FindOrCreateLeaderboard( pchLeaderboardName, eLeaderboardSortMethod, eLeaderboardDisplayType ) );
}
BS_I
DLL_FUNCTION(SteamAPICall_t*) BS_UserStats_FindLeaderboard( ISteamUserStats* lpSteamUserStats, const char *pchLeaderboardName ) {
// as above, but won't create the leaderboard if it's not found
// This call is asynchronous, with the result returned in LeaderboardFindResult_t
//CALL_RESULT(LeaderboardFindResult_t)
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamUserStats_FindLeaderboard( ISteamUserStats* lpSteamUserStats, const char *pchLeaderboardName ) {
return new uint64_t( lpSteamUserStats->FindLeaderboard( pchLeaderboardName ) );
}
BS_I
DLL_FUNCTION(const char*) BS_UserStats_GetLeaderboardName( ISteamUserStats* lpSteamUserStats, SteamLeaderboard_t* hSteamLeaderboard ) {
// returns the name of a leaderboard
DLL_FUNCTION(const char*) BS_ISteamUserStats_GetLeaderboardName( ISteamUserStats* lpSteamUserStats, SteamLeaderboard_t* hSteamLeaderboard ) {
return lpSteamUserStats->GetLeaderboardName( *hSteamLeaderboard );
}
BS_I
DLL_FUNCTION(int) BS_UserStats_GetLeaderboardEntryCount( ISteamUserStats* lpSteamUserStats, SteamLeaderboard_t* hSteamLeaderboard ) {
// 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 ) {
return lpSteamUserStats->GetLeaderboardEntryCount( *hSteamLeaderboard );
}
BS_I
DLL_FUNCTION(ELeaderboardSortMethod) BS_UserStats_GetLeaderboardSortMethod( ISteamUserStats* lpSteamUserStats, SteamLeaderboard_t* hSteamLeaderboard ) {
// returns the sort method of the leaderboard
DLL_FUNCTION(ELeaderboardSortMethod) BS_ISteamUserStats_GetLeaderboardSortMethod( ISteamUserStats* lpSteamUserStats, SteamLeaderboard_t* hSteamLeaderboard ) {
return lpSteamUserStats->GetLeaderboardSortMethod( *hSteamLeaderboard );
}
BS_I
DLL_FUNCTION(ELeaderboardDisplayType) BS_UserStats_GetLeaderboardDisplayType( ISteamUserStats* lpSteamUserStats, SteamLeaderboard_t* hSteamLeaderboard ) {
// returns the display type of the leaderboard
DLL_FUNCTION(ELeaderboardDisplayType) BS_ISteamUserStats_GetLeaderboardDisplayType( ISteamUserStats* lpSteamUserStats, SteamLeaderboard_t* hSteamLeaderboard ) {
return lpSteamUserStats->GetLeaderboardDisplayType( *hSteamLeaderboard );
}
BS_I
DLL_FUNCTION(SteamAPICall_t*) BS_UserStats_DownloadLeaderboardEntries( ISteamUserStats* lpSteamUserStats, SteamLeaderboard_t* hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd ) {
// Asks the Steam back-end for a set of rows in the leaderboard.
// This call is asynchronous, with the result returned in LeaderboardScoresDownloaded_t
// LeaderboardScoresDownloaded_t will contain a handle to pull the results from GetDownloadedLeaderboardEntries() (below)
// You can ask for more entries than exist, and it will return as many as do exist.
// k_ELeaderboardDataRequestGlobal requests rows in the leaderboard from the full table, with nRangeStart & nRangeEnd in the range [1, TotalEntries]
// k_ELeaderboardDataRequestGlobalAroundUser requests rows around the current user, nRangeStart being negate
// 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
//CALL_RESULT(LeaderboardScoresDownloaded_t)
DLL_FUNCTION(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 ) );
}
BS_I
DLL_FUNCTION(SteamAPICall_t*) BS_UserStats_DownloadLeaderboardEntriesForUsers( ISteamUserStats* lpSteamUserStats, SteamLeaderboard_t* hSteamLeaderboard, CSteamID* prgUsers, int cUsers ) {
///#####
// as above, but downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is k_ELeaderboardDataRequestUsers
// 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
//CALL_RESULT(LeaderboardScoresDownloaded_t)
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamUserStats_DownloadLeaderboardEntriesForUsers( ISteamUserStats* lpSteamUserStats, SteamLeaderboard_t* hSteamLeaderboard, CSteamID* prgUsers, int cUsers ) {
return new uint64_t( lpSteamUserStats->DownloadLeaderboardEntriesForUsers( *hSteamLeaderboard, prgUsers, cUsers ) );
}
BS_I
DLL_FUNCTION(uint32_t) BS_UserStats_GetDownloadedLeaderboardEntry( ISteamUserStats* lpSteamUserStats, SteamLeaderboardEntries_t* hSteamLeaderboardEntries, int index, LeaderboardEntry_t *pLeaderboardEntry, int32 *pDetails, int cDetailsMax ) {
// Returns data about a single leaderboard entry
// use a for loop from 0 to LeaderboardScoresDownloaded_t::m_cEntryCount to get all the downloaded entries
// e.g.
// void OnLeaderboardScoresDownloaded( LeaderboardScoresDownloaded_t *pLeaderboardScoresDownloaded )
// {
// for ( int index = 0; index < pLeaderboardScoresDownloaded->m_cEntryCount; index++ )
// {
// LeaderboardEntry_t leaderboardEntry;
// int32 details[3]; // we know this is how many we've stored previously
// GetDownloadedLeaderboardEntry( pLeaderboardScoresDownloaded->m_hSteamLeaderboardEntries, index, &leaderboardEntry, details, 3 );
// assert( leaderboardEntry.m_cDetails == 3 );
// ...
// }
// 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 ) {
return lpSteamUserStats->GetDownloadedLeaderboardEntry( *hSteamLeaderboardEntries, index, pLeaderboardEntry, pDetails, cDetailsMax );
}
BS_I
DLL_FUNCTION(SteamAPICall_t*) BS_UserStats_UploadLeaderboardScore( ISteamUserStats* lpSteamUserStats, SteamLeaderboard_t* hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int32 nScore, const int32_t* pScoreDetails, int cScoreDetailsCount ) {
// Uploads a user score to the Steam back-end.
// This call is asynchronous, with the result returned in LeaderboardScoreUploaded_t
// 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
//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 ) {
return new uint64_t(lpSteamUserStats->UploadLeaderboardScore( *hSteamLeaderboard, eLeaderboardUploadScoreMethod, nScore, pScoreDetails, cScoreDetailsCount ));
}
BS_I
DLL_FUNCTION(SteamAPICall_t*) BS_UserStats_AttachLeaderboardUGC( ISteamUserStats* lpSteamUserStats, SteamLeaderboard_t* hSteamLeaderboard, UGCHandle_t* hUGC ) {
// Attaches a piece of user generated content the user's entry on a leaderboard.
// 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.
//CALL_RESULT(LeaderboardUGCSet_t)
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamUserStats_AttachLeaderboardUGC( ISteamUserStats* lpSteamUserStats, SteamLeaderboard_t* hSteamLeaderboard, UGCHandle_t* hUGC ) {
return new uint64_t( lpSteamUserStats->AttachLeaderboardUGC( *hSteamLeaderboard, *hUGC ) );
}
BS_I
DLL_FUNCTION(SteamAPICall_t*) BS_UserStats_GetNumberOfCurrentPlayers( ISteamUserStats* lpSteamUserStats ) {
// Retrieves the number of players currently playing your game (online + offline)
// This call is asynchronous, with the result returned in NumberOfCurrentPlayers_t
//CALL_RESULT(NumberOfCurrentPlayers_t)
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamUserStats_GetNumberOfCurrentPlayers( ISteamUserStats* lpSteamUserStats ) {
return new uint64_t( lpSteamUserStats->GetNumberOfCurrentPlayers( ) );
}
BS_I
DLL_FUNCTION(SteamAPICall_t*) BS_UserStats_RequestGlobalAchievementPercentages( ISteamUserStats* lpSteamUserStats ) {
// Requests that Steam fetch data on the percentage of players who have received each achievement
// for the game globally.
// This call is asynchronous, with the result returned in GlobalAchievementPercentagesReady_t.
//CALL_RESULT(GlobalAchievementPercentagesReady_t)
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamUserStats_RequestGlobalAchievementPercentages( ISteamUserStats* lpSteamUserStats ) {
return new uint64_t( lpSteamUserStats->RequestGlobalAchievementPercentages( ) );
}
BS_I
DLL_FUNCTION(uint32_t) BS_UserStats_GetMostAchievedAchievementInfo( ISteamUserStats* lpSteamUserStats, char *pchName, uint32_t unNameBufLen, float *pflPercent, bool* pbAchieved ) {
// 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
// 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 ) {
return lpSteamUserStats->GetMostAchievedAchievementInfo( pchName, unNameBufLen, pflPercent, pbAchieved );
}
BS_I
DLL_FUNCTION(uint32_t) BS_UserStats_GetNextMostAchievedAchievementInfo( ISteamUserStats* lpSteamUserStats, int iIteratorPrevious, char *pchName, uint32_t unNameBufLen, float *pflPercent, bool *pbAchieved ) {
// 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
// achievement has been iterated.
DLL_FUNCTION(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 );
}
BS_I
DLL_FUNCTION(uint32_t) BS_UserStats_GetAchievementAchievedPercent( ISteamUserStats* lpSteamUserStats, const char *pchName, float *pflPercent ) {
// 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 ) {
return lpSteamUserStats->GetAchievementAchievedPercent( pchName, pflPercent );
}
BS_I
DLL_FUNCTION(SteamAPICall_t*) BS_UserStats_RequestGlobalStats( ISteamUserStats* lpSteamUserStats, int nHistoryDays ) {
// Requests global stats data, which is available for stats marked as "aggregated".
// This call is asynchronous, with the results returned in GlobalStatsReceived_t.
// nHistoryDays specifies how many days of day-by-day history to retrieve in addition
// to the overall totals. The limit is 60.
//CALL_RESULT(GlobalStatsReceived_t)
DLL_FUNCTION(SteamAPICall_t*) BS_ISteamUserStats_RequestGlobalStats( ISteamUserStats* lpSteamUserStats, int nHistoryDays ) {
return new uint64_t( lpSteamUserStats->RequestGlobalStats( nHistoryDays ) );
}
BS_I
DLL_FUNCTION(uint32_t) BS_UserStats_GetGlobalStatLL( ISteamUserStats* lpSteamUserStats, const char *pchStatName, int64* pData ) {
// Gets the lifetime totals for an aggregated stat
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetGlobalStatL( ISteamUserStats* lpSteamUserStats, const char *pchStatName, int64* pData ) {
return lpSteamUserStats->GetGlobalStat( pchStatName, pData );
}
BS_I
DLL_FUNCTION(uint32_t) BS_UserStats_GetGlobalStatD( ISteamUserStats* lpSteamUserStats, const char *pchStatName, double* pData ) {
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetGlobalStatD( ISteamUserStats* lpSteamUserStats, const char *pchStatName, double* pData ) {
return lpSteamUserStats->GetGlobalStat( pchStatName, pData );
}
BS_I
DLL_FUNCTION(uint32_t) BS_UserStats_GetGlobalStatHistoryLL( ISteamUserStats* lpSteamUserStats, const char *pchStatName, int64 *pData, uint32_t cubData ) {
// Gets history for an aggregated stat. pData will be filled with daily values, starting with today.
// 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
// elements actually set.
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetGlobalStatHistoryL( ISteamUserStats* lpSteamUserStats, const char *pchStatName, int64 *pData, uint32_t cubData ) {
return lpSteamUserStats->GetGlobalStatHistory( pchStatName, pData, cubData );
}
BS_I
DLL_FUNCTION(uint32_t) BS_UserStats_GetGlobalStatHistoryD( ISteamUserStats* lpSteamUserStats, const char *pchStatName, double *pData, uint32_t cubData ) {
DLL_FUNCTION(uint32_t) BS_ISteamUserStats_GetGlobalStatHistoryD( ISteamUserStats* lpSteamUserStats, const char *pchStatName, double *pData, uint32_t cubData ) {
return lpSteamUserStats->GetGlobalStatHistory( pchStatName, pData, cubData );
}
#pragma comment(linker, "/EXPORT:BS_UserStats_GetGlobalStatHistoryD=_BS_UserStats_GetGlobalStatHistoryD@16")
}
+7 -2
View File
@@ -16,7 +16,12 @@
#include "BlitzSteam.h"
DLL_FUNCTION(ISteamUtils*) BS_Utils() {
DLL_FUNCTION(ISteamUtils*) BS_SteamUtils() {
return SteamUtils();
}
BS_I
DLL_FUNCTION(ISteamUtils*) BS_SteamGameServerUtils() {
return SteamGameServerUtils();
}
#pragma message("SteamUtils is not ported yet. TODO!")
+3 -2
View File
@@ -16,7 +16,8 @@
#include "BlitzSteam.h"
DLL_FUNCTION(ISteamVideo*) BS_Video() {
DLL_FUNCTION(ISteamVideo*) BS_SteamVideo() {
return SteamVideo();
}
BS_I
#pragma message("SteamVideo is not ported yet. TODO!")