aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/clientvideooverrides.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-08-20 19:19:43 +0100
committerGitHub <noreply@github.com>2022-08-20 19:19:43 +0100
commite518c0213e5a77cf3b5544c1aa0671317a5c794d (patch)
treea002b06832736080c342aca9fd51a34dd7fbe713 /NorthstarDedicatedTest/clientvideooverrides.cpp
parent1346e7ee3762cb3a1da9e53700904a49beff9c36 (diff)
downloadNorthstarLauncher-e518c0213e5a77cf3b5544c1aa0671317a5c794d.tar.gz
NorthstarLauncher-e518c0213e5a77cf3b5544c1aa0671317a5c794d.zip
allow mods to load biks that aren't already present in r2/media (#137)
Co-authored-by: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>
Diffstat (limited to 'NorthstarDedicatedTest/clientvideooverrides.cpp')
-rw-r--r--NorthstarDedicatedTest/clientvideooverrides.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/NorthstarDedicatedTest/clientvideooverrides.cpp b/NorthstarDedicatedTest/clientvideooverrides.cpp
index c5989968..659bf23c 100644
--- a/NorthstarDedicatedTest/clientvideooverrides.cpp
+++ b/NorthstarDedicatedTest/clientvideooverrides.cpp
@@ -1,6 +1,7 @@
#include "pch.h"
#include "clientvideooverrides.h"
#include "modmanager.h"
+#include "nsmem.h"
typedef void* (*BinkOpenType)(const char* path, uint32_t flags);
BinkOpenType BinkOpen;
@@ -31,8 +32,12 @@ void* BinkOpenHook(const char* path, uint32_t flags)
return BinkOpen(path, flags);
}
-void InitialiseClientVideoOverrides(HMODULE baseAddress)
+void InitialiseEngineClientVideoOverrides(HMODULE baseAddress)
{
+ // remove engine check for whether the bik we're trying to load exists in r2/media, as this will fail for biks in mods
+ // note: the check in engine is actually unnecessary, so it's just useless in practice and we lose nothing by removing it
+ NSMem::NOP((uintptr_t)baseAddress + 0x459AD, 6);
+
HookEnabler hook;
ENABLER_CREATEHOOK(
hook,