|
|
@ -1,16 +1,16 @@
|
|
|
|
#include <smoke_api/smoke_api.hpp>
|
|
|
|
#include <core/macros.hpp>
|
|
|
|
#include <steam_impl/steam_apps.hpp>
|
|
|
|
#include <steam_impl/steam_apps.hpp>
|
|
|
|
#include <steam_impl/steam_client.hpp>
|
|
|
|
#include <steam_impl/steam_client.hpp>
|
|
|
|
#include <steam_impl/steam_inventory.hpp>
|
|
|
|
#include <steam_impl/steam_inventory.hpp>
|
|
|
|
#include <steam_impl/steam_user.hpp>
|
|
|
|
#include <steam_impl/steam_user.hpp>
|
|
|
|
|
|
|
|
|
|
|
|
using namespace smoke_api;
|
|
|
|
using namespace koalabox;
|
|
|
|
|
|
|
|
|
|
|
|
// ISteamApps
|
|
|
|
// ISteamApps
|
|
|
|
|
|
|
|
|
|
|
|
DLL_EXPORT(bool) SteamAPI_ISteamApps_BIsSubscribedApp(ISteamApps* self, AppId_t appID) {
|
|
|
|
DLL_EXPORT(bool) SteamAPI_ISteamApps_BIsSubscribedApp(ISteamApps* self, AppId_t appID) {
|
|
|
|
return steam_apps::IsDlcUnlocked(__func__, 0, appID, [&]() {
|
|
|
|
return steam_apps::IsDlcUnlocked(__func__, 0, appID, [&]() {
|
|
|
|
GET_ORIGINAL_FUNCTION(SteamAPI_ISteamApps_BIsSubscribedApp)
|
|
|
|
GET_ORIGINAL_FUNCTION_STEAMAPI(SteamAPI_ISteamApps_BIsSubscribedApp)
|
|
|
|
|
|
|
|
|
|
|
|
return SteamAPI_ISteamApps_BIsSubscribedApp_o(self, appID);
|
|
|
|
return SteamAPI_ISteamApps_BIsSubscribedApp_o(self, appID);
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -18,7 +18,7 @@ DLL_EXPORT(bool) SteamAPI_ISteamApps_BIsSubscribedApp(ISteamApps* self, AppId_t
|
|
|
|
|
|
|
|
|
|
|
|
DLL_EXPORT(bool) SteamAPI_ISteamApps_BIsDlcInstalled(ISteamApps* self, AppId_t appID) {
|
|
|
|
DLL_EXPORT(bool) SteamAPI_ISteamApps_BIsDlcInstalled(ISteamApps* self, AppId_t appID) {
|
|
|
|
return steam_apps::IsDlcUnlocked(__func__, 0, appID, [&]() {
|
|
|
|
return steam_apps::IsDlcUnlocked(__func__, 0, appID, [&]() {
|
|
|
|
GET_ORIGINAL_FUNCTION(SteamAPI_ISteamApps_BIsDlcInstalled)
|
|
|
|
GET_ORIGINAL_FUNCTION_STEAMAPI(SteamAPI_ISteamApps_BIsDlcInstalled)
|
|
|
|
|
|
|
|
|
|
|
|
return SteamAPI_ISteamApps_BIsDlcInstalled_o(self, appID);
|
|
|
|
return SteamAPI_ISteamApps_BIsDlcInstalled_o(self, appID);
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -26,7 +26,7 @@ DLL_EXPORT(bool) SteamAPI_ISteamApps_BIsDlcInstalled(ISteamApps* self, AppId_t a
|
|
|
|
|
|
|
|
|
|
|
|
DLL_EXPORT(int) SteamAPI_ISteamApps_GetDLCCount(ISteamApps* self) {
|
|
|
|
DLL_EXPORT(int) SteamAPI_ISteamApps_GetDLCCount(ISteamApps* self) {
|
|
|
|
return steam_apps::GetDLCCount(__func__, 0, [&]() {
|
|
|
|
return steam_apps::GetDLCCount(__func__, 0, [&]() {
|
|
|
|
GET_ORIGINAL_FUNCTION(SteamAPI_ISteamApps_GetDLCCount)
|
|
|
|
GET_ORIGINAL_FUNCTION_STEAMAPI(SteamAPI_ISteamApps_GetDLCCount)
|
|
|
|
|
|
|
|
|
|
|
|
return SteamAPI_ISteamApps_GetDLCCount_o(self);
|
|
|
|
return SteamAPI_ISteamApps_GetDLCCount_o(self);
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -41,7 +41,7 @@ DLL_EXPORT(bool) SteamAPI_ISteamApps_BGetDLCDataByIndex(
|
|
|
|
int cchNameBufferSize
|
|
|
|
int cchNameBufferSize
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
return steam_apps::GetDLCDataByIndex(__func__, 0, iDLC, pAppID, pbAvailable, pchName, cchNameBufferSize, [&]() {
|
|
|
|
return steam_apps::GetDLCDataByIndex(__func__, 0, iDLC, pAppID, pbAvailable, pchName, cchNameBufferSize, [&]() {
|
|
|
|
GET_ORIGINAL_FUNCTION(SteamAPI_ISteamApps_BGetDLCDataByIndex)
|
|
|
|
GET_ORIGINAL_FUNCTION_STEAMAPI(SteamAPI_ISteamApps_BGetDLCDataByIndex)
|
|
|
|
|
|
|
|
|
|
|
|
return SteamAPI_ISteamApps_BGetDLCDataByIndex_o(
|
|
|
|
return SteamAPI_ISteamApps_BGetDLCDataByIndex_o(
|
|
|
|
self, iDLC, pAppID, pbAvailable, pchName, cchNameBufferSize
|
|
|
|
self, iDLC, pAppID, pbAvailable, pchName, cchNameBufferSize
|
|
|
@ -57,7 +57,7 @@ DLL_EXPORT(EUserHasLicenseForAppResult) SteamAPI_ISteamUser_UserHasLicenseForApp
|
|
|
|
AppId_t appID
|
|
|
|
AppId_t appID
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
return steam_user::UserHasLicenseForApp(__func__, appID, [&]() {
|
|
|
|
return steam_user::UserHasLicenseForApp(__func__, appID, [&]() {
|
|
|
|
GET_ORIGINAL_FUNCTION(SteamAPI_ISteamUser_UserHasLicenseForApp)
|
|
|
|
GET_ORIGINAL_FUNCTION_STEAMAPI(SteamAPI_ISteamUser_UserHasLicenseForApp)
|
|
|
|
|
|
|
|
|
|
|
|
return SteamAPI_ISteamUser_UserHasLicenseForApp_o(self, steamID, appID);
|
|
|
|
return SteamAPI_ISteamUser_UserHasLicenseForApp_o(self, steamID, appID);
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -72,7 +72,7 @@ DLL_EXPORT(void*) SteamAPI_ISteamClient_GetISteamGenericInterface(
|
|
|
|
const char* pchVersion
|
|
|
|
const char* pchVersion
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
return steam_client::GetGenericInterface(__func__, pchVersion, [&]() {
|
|
|
|
return steam_client::GetGenericInterface(__func__, pchVersion, [&]() {
|
|
|
|
GET_ORIGINAL_FUNCTION(SteamAPI_ISteamClient_GetISteamGenericInterface)
|
|
|
|
GET_ORIGINAL_FUNCTION_STEAMAPI(SteamAPI_ISteamClient_GetISteamGenericInterface)
|
|
|
|
|
|
|
|
|
|
|
|
return SteamAPI_ISteamClient_GetISteamGenericInterface_o(self, hSteamUser, hSteamPipe, pchVersion);
|
|
|
|
return SteamAPI_ISteamClient_GetISteamGenericInterface_o(self, hSteamUser, hSteamPipe, pchVersion);
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -85,7 +85,7 @@ DLL_EXPORT(EResult) SteamAPI_ISteamInventory_GetResultStatus(
|
|
|
|
SteamInventoryResult_t resultHandle
|
|
|
|
SteamInventoryResult_t resultHandle
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
return steam_inventory::GetResultStatus(__func__, resultHandle, [&]() {
|
|
|
|
return steam_inventory::GetResultStatus(__func__, resultHandle, [&]() {
|
|
|
|
GET_ORIGINAL_FUNCTION(SteamAPI_ISteamInventory_GetResultStatus)
|
|
|
|
GET_ORIGINAL_FUNCTION_STEAMAPI(SteamAPI_ISteamInventory_GetResultStatus)
|
|
|
|
|
|
|
|
|
|
|
|
return SteamAPI_ISteamInventory_GetResultStatus_o(self, resultHandle);
|
|
|
|
return SteamAPI_ISteamInventory_GetResultStatus_o(self, resultHandle);
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -100,12 +100,12 @@ DLL_EXPORT(bool) SteamAPI_ISteamInventory_GetResultItems(
|
|
|
|
return steam_inventory::GetResultItems(
|
|
|
|
return steam_inventory::GetResultItems(
|
|
|
|
__func__, resultHandle, pOutItemsArray, punOutItemsArraySize,
|
|
|
|
__func__, resultHandle, pOutItemsArray, punOutItemsArraySize,
|
|
|
|
[&]() {
|
|
|
|
[&]() {
|
|
|
|
GET_ORIGINAL_FUNCTION(SteamAPI_ISteamInventory_GetResultItems)
|
|
|
|
GET_ORIGINAL_FUNCTION_STEAMAPI(SteamAPI_ISteamInventory_GetResultItems)
|
|
|
|
|
|
|
|
|
|
|
|
return SteamAPI_ISteamInventory_GetResultItems_o(self, resultHandle, pOutItemsArray, punOutItemsArraySize);
|
|
|
|
return SteamAPI_ISteamInventory_GetResultItems_o(self, resultHandle, pOutItemsArray, punOutItemsArraySize);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
[&](SteamItemDef_t* pItemDefIDs, uint32_t* punItemDefIDsArraySize) {
|
|
|
|
[&](SteamItemDef_t* pItemDefIDs, uint32_t* punItemDefIDsArraySize) {
|
|
|
|
GET_ORIGINAL_FUNCTION(SteamAPI_ISteamInventory_GetItemDefinitionIDs)
|
|
|
|
GET_ORIGINAL_FUNCTION_STEAMAPI(SteamAPI_ISteamInventory_GetItemDefinitionIDs)
|
|
|
|
|
|
|
|
|
|
|
|
return SteamAPI_ISteamInventory_GetItemDefinitionIDs_o(self, pItemDefIDs, punItemDefIDsArraySize);
|
|
|
|
return SteamAPI_ISteamInventory_GetItemDefinitionIDs_o(self, pItemDefIDs, punItemDefIDsArraySize);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -122,7 +122,7 @@ DLL_EXPORT(bool) SteamAPI_ISteamInventory_GetResultItemProperty(
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
return steam_inventory::GetResultItemProperty(
|
|
|
|
return steam_inventory::GetResultItemProperty(
|
|
|
|
__func__, resultHandle, unItemIndex, pchPropertyName, pchValueBuffer, punValueBufferSizeOut, [&]() {
|
|
|
|
__func__, resultHandle, unItemIndex, pchPropertyName, pchValueBuffer, punValueBufferSizeOut, [&]() {
|
|
|
|
GET_ORIGINAL_FUNCTION(SteamAPI_ISteamInventory_GetResultItemProperty)
|
|
|
|
GET_ORIGINAL_FUNCTION_STEAMAPI(SteamAPI_ISteamInventory_GetResultItemProperty)
|
|
|
|
|
|
|
|
|
|
|
|
return SteamAPI_ISteamInventory_GetResultItemProperty_o(
|
|
|
|
return SteamAPI_ISteamInventory_GetResultItemProperty_o(
|
|
|
|
self, resultHandle, unItemIndex, pchPropertyName, pchValueBuffer, punValueBufferSizeOut
|
|
|
|
self, resultHandle, unItemIndex, pchPropertyName, pchValueBuffer, punValueBufferSizeOut
|
|
|
@ -137,7 +137,7 @@ DLL_EXPORT(bool) SteamAPI_ISteamInventory_CheckResultSteamID(
|
|
|
|
CSteamID steamIDExpected
|
|
|
|
CSteamID steamIDExpected
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
return steam_inventory::CheckResultSteamID(__func__, resultHandle, steamIDExpected, [&]() {
|
|
|
|
return steam_inventory::CheckResultSteamID(__func__, resultHandle, steamIDExpected, [&]() {
|
|
|
|
GET_ORIGINAL_FUNCTION(SteamAPI_ISteamInventory_CheckResultSteamID)
|
|
|
|
GET_ORIGINAL_FUNCTION_STEAMAPI(SteamAPI_ISteamInventory_CheckResultSteamID)
|
|
|
|
|
|
|
|
|
|
|
|
return SteamAPI_ISteamInventory_CheckResultSteamID_o(self, resultHandle, steamIDExpected);
|
|
|
|
return SteamAPI_ISteamInventory_CheckResultSteamID_o(self, resultHandle, steamIDExpected);
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -148,7 +148,7 @@ DLL_EXPORT(bool) SteamAPI_ISteamInventory_GetAllItems(
|
|
|
|
SteamInventoryResult_t* pResultHandle
|
|
|
|
SteamInventoryResult_t* pResultHandle
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
return steam_inventory::GetAllItems(__func__, pResultHandle, [&]() {
|
|
|
|
return steam_inventory::GetAllItems(__func__, pResultHandle, [&]() {
|
|
|
|
GET_ORIGINAL_FUNCTION(SteamAPI_ISteamInventory_GetAllItems)
|
|
|
|
GET_ORIGINAL_FUNCTION_STEAMAPI(SteamAPI_ISteamInventory_GetAllItems)
|
|
|
|
|
|
|
|
|
|
|
|
return SteamAPI_ISteamInventory_GetAllItems_o(self, pResultHandle);
|
|
|
|
return SteamAPI_ISteamInventory_GetAllItems_o(self, pResultHandle);
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -161,7 +161,7 @@ DLL_EXPORT(bool) SteamAPI_ISteamInventory_GetItemsByID(
|
|
|
|
uint32_t unCountInstanceIDs
|
|
|
|
uint32_t unCountInstanceIDs
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
return steam_inventory::GetItemsByID(__func__, pResultHandle, pInstanceIDs, unCountInstanceIDs, [&]() {
|
|
|
|
return steam_inventory::GetItemsByID(__func__, pResultHandle, pInstanceIDs, unCountInstanceIDs, [&]() {
|
|
|
|
GET_ORIGINAL_FUNCTION(SteamAPI_ISteamInventory_GetItemsByID)
|
|
|
|
GET_ORIGINAL_FUNCTION_STEAMAPI(SteamAPI_ISteamInventory_GetItemsByID)
|
|
|
|
|
|
|
|
|
|
|
|
return SteamAPI_ISteamInventory_GetItemsByID_o(self, pResultHandle, pInstanceIDs, unCountInstanceIDs);
|
|
|
|
return SteamAPI_ISteamInventory_GetItemsByID_o(self, pResultHandle, pInstanceIDs, unCountInstanceIDs);
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -174,7 +174,7 @@ DLL_EXPORT(bool) SteamAPI_ISteamInventory_SerializeResult(
|
|
|
|
uint32_t* punOutBufferSize
|
|
|
|
uint32_t* punOutBufferSize
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
return steam_inventory::SerializeResult(__func__, resultHandle, pOutBuffer, punOutBufferSize, [&]() {
|
|
|
|
return steam_inventory::SerializeResult(__func__, resultHandle, pOutBuffer, punOutBufferSize, [&]() {
|
|
|
|
GET_ORIGINAL_FUNCTION(SteamAPI_ISteamInventory_SerializeResult)
|
|
|
|
GET_ORIGINAL_FUNCTION_STEAMAPI(SteamAPI_ISteamInventory_SerializeResult)
|
|
|
|
|
|
|
|
|
|
|
|
return SteamAPI_ISteamInventory_SerializeResult_o(self, resultHandle, pOutBuffer, punOutBufferSize);
|
|
|
|
return SteamAPI_ISteamInventory_SerializeResult_o(self, resultHandle, pOutBuffer, punOutBufferSize);
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -186,7 +186,7 @@ DLL_EXPORT(bool) SteamAPI_ISteamInventory_GetItemDefinitionIDs(
|
|
|
|
uint32_t* punItemDefIDsArraySize
|
|
|
|
uint32_t* punItemDefIDsArraySize
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
return steam_inventory::GetItemDefinitionIDs(__func__, pItemDefIDs, punItemDefIDsArraySize, [&]() {
|
|
|
|
return steam_inventory::GetItemDefinitionIDs(__func__, pItemDefIDs, punItemDefIDsArraySize, [&]() {
|
|
|
|
GET_ORIGINAL_FUNCTION(SteamAPI_ISteamInventory_GetItemDefinitionIDs)
|
|
|
|
GET_ORIGINAL_FUNCTION_STEAMAPI(SteamAPI_ISteamInventory_GetItemDefinitionIDs)
|
|
|
|
|
|
|
|
|
|
|
|
return SteamAPI_ISteamInventory_GetItemDefinitionIDs_o(self, pItemDefIDs, punItemDefIDsArraySize);
|
|
|
|
return SteamAPI_ISteamInventory_GetItemDefinitionIDs_o(self, pItemDefIDs, punItemDefIDsArraySize);
|
|
|
|
});
|
|
|
|
});
|
|
|
|