Refactored hook calls

This commit is contained in:
acidicoala
2023-01-06 09:54:51 +03:00
parent 011f3fac5d
commit eaca0bec34
22 changed files with 158 additions and 161 deletions

View File

@@ -1,37 +1,8 @@
#pragma once
#include <koalabox/koalabox.hpp>
#include <koalabox/hook.hpp> // For macros
#include <nlohmann/json.hpp>
#define GET_ORIGINAL_FUNCTION(FUNC) \
static const auto FUNC##_o = hook::get_original_function( \
smoke_api::is_hook_mode, \
smoke_api::original_library, \
#FUNC, \
FUNC \
);
#define GET_ORIGINAL_VIRTUAL_FUNCTION(FUNC) \
const auto FUNC##_o = hook::get_original_function( \
true, \
smoke_api::original_library, \
#FUNC, \
FUNC \
);
namespace smoke_api {
using namespace koalabox;
extern HMODULE self_module;
extern HMODULE original_library;
extern bool is_hook_mode;
void init(HMODULE module_handle);
void shutdown();
}