From 12fa82de899fc1728252f8f03df13d1f717a85f9 Mon Sep 17 00:00:00 2001 From: Emerson Pinter Date: Thu, 8 Aug 2024 19:07:01 -0300 Subject: [PATCH] Add offset for VR Not in use yet. --- src/Hooks.cpp | 2 +- src/Hooks.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Hooks.cpp b/src/Hooks.cpp index 93cba5a..71464df 100644 --- a/src/Hooks.cpp +++ b/src/Hooks.cpp @@ -26,7 +26,7 @@ namespace wmh { } void Hooks::installMovieHook() { - REL::RelocationID hookFuncAddr = REL::RelocationID(ADDR_LOADMOVIE_SE, ADDR_LOADMOVIE_AE); + REL::RelocationID hookFuncAddr = REL::RelocationID(ADDR_LOADMOVIE_SE, ADDR_LOADMOVIE_AE, ADDR_LOADMOVIE_VR); int hookFuncOffset = REL::Relocate(OFFSET_LOADMOVIE_SE, OFFSET_LOADMOVIE_AE, OFFSET_LOADMOVIE_VR); std::uintptr_t hook = hookFuncAddr.address() + hookFuncOffset; if (REL::make_pattern().match(hook)) { diff --git a/src/Hooks.h b/src/Hooks.h index 7040742..8045458 100644 --- a/src/Hooks.h +++ b/src/Hooks.h @@ -3,8 +3,10 @@ namespace wmh { class Hooks { private: + //RE::Offset::BSScaleformManager::LoadMovie static constexpr int ADDR_LOADMOVIE_SE = 80302; static constexpr int ADDR_LOADMOVIE_AE = 82325; + static constexpr int ADDR_LOADMOVIE_VR = 82325; static constexpr int OFFSET_LOADMOVIE_AE = 0x1DD; static constexpr int OFFSET_LOADMOVIE_SE = 0x1D9; static constexpr int OFFSET_LOADMOVIE_VR = 0x1D9;