mirror of
https://github.com/acidicoala/SmokeAPI.git
synced 2026-01-24 21:42:53 -05:00
Fixed Windows build
This commit is contained in:
@@ -4,12 +4,12 @@
|
||||
|
||||
#include <koalabox/hook.hpp>
|
||||
#include <koalabox/logger.hpp>
|
||||
#include "koalabox/lib.hpp"
|
||||
|
||||
#include "smoke_api/steamclient/steamclient.hpp"
|
||||
|
||||
#include "steam_api/steam_interfaces.hpp"
|
||||
|
||||
#include "koalabox/lib.hpp"
|
||||
#include "smoke_api/smoke_api.hpp"
|
||||
#include "smoke_api/steamclient/steamclient.hpp"
|
||||
#include "virtuals/steam_api_virtuals.hpp"
|
||||
|
||||
namespace {
|
||||
@@ -104,6 +104,15 @@ namespace {
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
STEAM_UTILS,
|
||||
interface_data_t{
|
||||
.fallback_version = "SteamUtils009",
|
||||
.entry_map = {
|
||||
ENTRY(ISteamUtils, GetAppID),
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -210,7 +219,9 @@ namespace steam_interfaces {
|
||||
const auto prefixes = std::views::keys(virtual_hook_map) | std::ranges::to<std::set>();
|
||||
|
||||
const auto CreateInterface$ = KB_MOD_GET_FUNC(steamclient_handle, CreateInterface);
|
||||
const auto* const THIS = CreateInterface$(steam_client_interface_version.c_str(), nullptr);
|
||||
|
||||
DECLARE_ARGS();
|
||||
THIS = CreateInterface$(steam_client_interface_version.c_str(), nullptr);
|
||||
hook_virtuals(THIS, steam_client_interface_version);
|
||||
|
||||
const auto interface_lookup = read_interface_lookup();
|
||||
@@ -234,7 +245,6 @@ namespace steam_interfaces {
|
||||
continue;
|
||||
}
|
||||
|
||||
DECLARE_EDX();
|
||||
const auto* const interface_ptr = ISteamClient_GetISteamGenericInterface(
|
||||
ARGS(steam_user, steam_pipe, interface_version.c_str())
|
||||
);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "smoke_api/types.hpp"
|
||||
#include <string>
|
||||
|
||||
namespace steam_interfaces {
|
||||
void hook_virtuals(const void* interface_ptr, const std::string& version_string);
|
||||
|
||||
9
src/steam_api/virtuals/isteamutils.cpp
Normal file
9
src/steam_api/virtuals/isteamutils.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
#include <koalabox/logger.hpp>
|
||||
|
||||
#include "smoke_api/smoke_api.hpp"
|
||||
#include "smoke_api/interfaces/steam_user.hpp"
|
||||
#include "steam_api/virtuals/steam_api_virtuals.hpp"
|
||||
|
||||
VIRTUAL(AppId_t) ISteamUtils_GetAppID(PARAMS()) noexcept {
|
||||
SWAPPED_CALL(THIS, ISteamUtils_GetAppID, ARGS());
|
||||
}
|
||||
@@ -11,21 +11,11 @@ VIRTUAL(bool) ISteamApps_BGetDLCDataByIndex(PARAMS(int, AppId_t*, bool*, char*,
|
||||
// ISteamClient
|
||||
VIRTUAL(void*) ISteamClient_GetISteamApps(PARAMS(HSteamUser, HSteamPipe, const char*)) noexcept;
|
||||
VIRTUAL(void*) ISteamClient_GetISteamUser(PARAMS(HSteamUser, HSteamPipe, const char*)) noexcept;
|
||||
VIRTUAL(void*) ISteamClient_GetISteamGenericInterface(
|
||||
PARAMS(HSteamUser, HSteamPipe, const char*)
|
||||
|
||||
|
||||
) noexcept;
|
||||
VIRTUAL(void*) ISteamClient_GetISteamInventory(
|
||||
PARAMS(HSteamUser, HSteamPipe, const char*)
|
||||
|
||||
|
||||
) noexcept;
|
||||
VIRTUAL(void*) ISteamClient_GetISteamGenericInterface(PARAMS(HSteamUser, HSteamPipe, const char*)) noexcept;
|
||||
VIRTUAL(void*) ISteamClient_GetISteamInventory(PARAMS(HSteamUser, HSteamPipe, const char*)) noexcept;
|
||||
|
||||
// ISteamHTTP
|
||||
VIRTUAL(bool) ISteamHTTP_GetHTTPResponseBodyData(
|
||||
PARAMS(HTTPRequestHandle, const uint8_t*, uint32_t)
|
||||
) noexcept;
|
||||
VIRTUAL(bool) ISteamHTTP_GetHTTPResponseBodyData(PARAMS(HTTPRequestHandle, const uint8_t*, uint32_t)) noexcept;
|
||||
VIRTUAL(bool) ISteamHTTP_GetHTTPStreamingResponseBodyData(
|
||||
PARAMS(HTTPRequestHandle, uint32_t, const uint8_t*, uint32_t)
|
||||
) noexcept;
|
||||
@@ -38,7 +28,6 @@ VIRTUAL(EResult) ISteamInventory_GetResultStatus(PARAMS(SteamInventoryResult_t))
|
||||
VIRTUAL(bool) ISteamInventory_GetResultItems(
|
||||
PARAMS(SteamInventoryResult_t, SteamItemDetails_t*, uint32_t*) // @formatter:off
|
||||
) noexcept; // @formatter:on
|
||||
|
||||
VIRTUAL(bool) ISteamInventory_GetResultItemProperty(
|
||||
PARAMS(SteamInventoryResult_t, uint32_t, const char*, char*, uint32_t*) // @formatter:off
|
||||
) noexcept; // @formatter:on
|
||||
@@ -46,20 +35,15 @@ VIRTUAL(bool) ISteamInventory_GetAllItems(PARAMS(SteamInventoryResult_t*)) noexc
|
||||
VIRTUAL(bool) ISteamInventory_GetItemsByID(
|
||||
PARAMS(SteamInventoryResult_t*, const SteamItemInstanceID_t*, uint32_t)
|
||||
) noexcept;
|
||||
VIRTUAL(bool) ISteamInventory_SerializeResult(
|
||||
PARAMS(SteamInventoryResult_t, void*, uint32_t*)
|
||||
|
||||
|
||||
) noexcept;
|
||||
VIRTUAL(bool) ISteamInventory_SerializeResult(PARAMS(SteamInventoryResult_t, void*, uint32_t*)) noexcept;
|
||||
VIRTUAL(bool) ISteamInventory_GetItemDefinitionIDs(PARAMS(SteamItemDef_t*, uint32_t*)) noexcept;
|
||||
VIRTUAL(bool) ISteamInventory_CheckResultSteamID(PARAMS(SteamInventoryResult_t, CSteamID)) noexcept;
|
||||
|
||||
// ISteamUser
|
||||
VIRTUAL(EUserHasLicenseForAppResult) ISteamUser_UserHasLicenseForApp(
|
||||
PARAMS(CSteamID, AppId_t)
|
||||
) noexcept;
|
||||
VIRTUAL(EUserHasLicenseForAppResult) ISteamUser_UserHasLicenseForApp(PARAMS(CSteamID, AppId_t)) noexcept;
|
||||
|
||||
// ISteamUtils
|
||||
VIRTUAL(AppId_t) ISteamUtils_GetAppID(PARAMS()) noexcept;
|
||||
|
||||
// ISteamGameServer
|
||||
VIRTUAL(EUserHasLicenseForAppResult) ISteamGameServer_UserHasLicenseForApp(
|
||||
PARAMS(CSteamID, AppId_t)
|
||||
) noexcept;
|
||||
VIRTUAL(EUserHasLicenseForAppResult) ISteamGameServer_UserHasLicenseForApp(PARAMS(CSteamID, AppId_t)) noexcept;
|
||||
|
||||
Reference in New Issue
Block a user