Skip to content

Commit

Permalink
Add offset for VR
Browse files Browse the repository at this point in the history
Not in use yet.
  • Loading branch information
epinter committed Aug 8, 2024
1 parent 94f365a commit 12fa82d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<PATTERN_CHECK_LOADMOVIE>().match(hook)) {
Expand Down
2 changes: 2 additions & 0 deletions src/Hooks.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 12fa82d

Please # to comment.