32 lines
741 B
C++

#pragma once
#include <RE/Skyrim.h>
#include <SKSE/SKSE.h>
#include <REL/Relocation.h>
#include <ShlObj_core.h>
#undef cdecl // Workaround for Clang 14 CMake configure error.
#include <spdlog/sinks/basic_file_sink.h>
#include <spdlog/sinks/msvc_sink.h>
#include <xbyak/xbyak.h>
// Compatible declarations with other sample projects.
#define DLLEXPORT __declspec(dllexport)
using namespace std::literals;
using namespace REL::literals;
namespace logger = SKSE::log;
namespace SKSE::stl
{
void asm_replace(std::uintptr_t a_from, std::size_t a_size, std::uintptr_t a_to);
template <class T>
void asm_replace(std::uintptr_t a_from, std::size_t a_size)
{
asm_replace(a_from, a_size, reinterpret_cast<std::uintptr_t>(T::func));
}
}