Closed FlayaN closed 2 days ago
Change detours to use thunk syntax
detour_thunk
write_thunk_call
*(uintptr_t*)&ptr_Main_RenderWorld = Detours::X64::DetourFunction(REL::RelocationID(100424, 107142).address(), (uintptr_t)&hk_Main_RenderWorld);
stl::detour_thunk<Main_RenderWorld>(REL::RelocationID(100424, 107142));
detour_thunk_ignore_func
std::ignore = Detours::X64::DetourFunction(REL::RelocationID(101633, 108700).address(), (uintptr_t)&hk_BSLightingShader_GetPixelTechnique);
stl::detour_thunk_ignore_func<BSLightingShader_GetPixelTechnique>(REL::RelocationID(101633, 108700));
detour_vfunc
(uintptr_t*)&ptr_IDXGISwapChain_Present = Detours::X64::DetourClassVTable(*(uintptr_t*)swapchain, &hk_IDXGISwapChain_Present, 8);
stl::detour_vfunc<8, IDXGISwapChain_Present>(swapchain);
The initial reason for this change was to maybe change to use microsoft detour instead, and this refactor will make it possible to update to that with only changing one cpp file
Change detours to use thunk syntax
detour_thunk
write_thunk_call
does*(uintptr_t*)&ptr_Main_RenderWorld = Detours::X64::DetourFunction(REL::RelocationID(100424, 107142).address(), (uintptr_t)&hk_Main_RenderWorld);
stl::detour_thunk<Main_RenderWorld>(REL::RelocationID(100424, 107142));
detour_thunk_ignore_func
std::ignore = Detours::X64::DetourFunction(REL::RelocationID(101633, 108700).address(), (uintptr_t)&hk_BSLightingShader_GetPixelTechnique);
stl::detour_thunk_ignore_func<BSLightingShader_GetPixelTechnique>(REL::RelocationID(101633, 108700));
detour_vfunc
(uintptr_t*)&ptr_IDXGISwapChain_Present = Detours::X64::DetourClassVTable(*(uintptr_t*)swapchain, &hk_IDXGISwapChain_Present, 8);
stl::detour_vfunc<8, IDXGISwapChain_Present>(swapchain);
The initial reason for this change was to maybe change to use microsoft detour instead, and this refactor will make it possible to update to that with only changing one cpp file