diff options
Diffstat (limited to 'primedev/core')
-rw-r--r-- | primedev/core/convar/concommand.cpp | 6 | ||||
-rw-r--r-- | primedev/core/convar/convar.cpp | 9 | ||||
-rw-r--r-- | primedev/core/hooks.cpp | 6 | ||||
-rw-r--r-- | primedev/core/sourceinterface.h | 7 |
4 files changed, 10 insertions, 18 deletions
diff --git a/primedev/core/convar/concommand.cpp b/primedev/core/convar/concommand.cpp index 6e09ef91..02c11ada 100644 --- a/primedev/core/convar/concommand.cpp +++ b/primedev/core/convar/concommand.cpp @@ -2,9 +2,6 @@ #include "shared/misccommands.h" #include "engine/r2engine.h" -#include "plugins/pluginbackend.h" -#include "plugins/plugin_abi.h" - #include <iostream> //----------------------------------------------------------------------------- @@ -152,7 +149,4 @@ ON_DLL_LOAD("engine.dll", ConCommand, (CModule module)) { ConCommandConstructor = module.Offset(0x415F60).RCast<ConCommandConstructorType>(); AddMiscConCommands(); - - g_pPluginCommunicationhandler->m_sEngineData.ConCommandConstructor = - reinterpret_cast<PluginConCommandConstructorType>(ConCommandConstructor); } diff --git a/primedev/core/convar/convar.cpp b/primedev/core/convar/convar.cpp index 94e41fee..767961ed 100644 --- a/primedev/core/convar/convar.cpp +++ b/primedev/core/convar/convar.cpp @@ -3,9 +3,6 @@ #include "convar.h" #include "core/sourceinterface.h" -#include "plugins/pluginbackend.h" -#include "plugins/plugin_abi.h" - #include <float.h> typedef void (*ConVarRegisterType)( @@ -40,12 +37,6 @@ ON_DLL_LOAD("engine.dll", ConVar, (CModule module)) g_pCVarInterface = new SourceInterface<CCvar>("vstdlib.dll", "VEngineCvar007"); g_pCVar = *g_pCVarInterface; - - g_pPluginCommunicationhandler->m_sEngineData.conVarMalloc = reinterpret_cast<PluginConVarMallocType>(conVarMalloc); - g_pPluginCommunicationhandler->m_sEngineData.conVarRegister = reinterpret_cast<PluginConVarRegisterType>(conVarRegister); - g_pPluginCommunicationhandler->m_sEngineData.ConVar_Vtable = reinterpret_cast<void*>(g_pConVar_Vtable); - g_pPluginCommunicationhandler->m_sEngineData.IConVar_Vtable = reinterpret_cast<void*>(g_pIConVar_Vtable); - g_pPluginCommunicationhandler->m_sEngineData.g_pCVar = reinterpret_cast<void*>(g_pCVar); } //----------------------------------------------------------------------------- diff --git a/primedev/core/hooks.cpp b/primedev/core/hooks.cpp index 7ea435fe..20f0cbef 100644 --- a/primedev/core/hooks.cpp +++ b/primedev/core/hooks.cpp @@ -1,5 +1,5 @@ #include "dedicated/dedicated.h" -#include "plugins/pluginbackend.h" +#include "plugins/pluginmanager.h" #include <iostream> #include <wchar.h> @@ -417,7 +417,7 @@ HMODULE, WINAPI, (LPCSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)) if (moduleAddress) { CallLoadLibraryACallbacks(lpLibFileName, moduleAddress); - InformPluginsDLLLoad(fs::path(lpLibFileName), moduleAddress); + g_pPluginManager->InformDllLoad(moduleAddress, fs::path(lpLibFileName)); } return moduleAddress; @@ -459,7 +459,7 @@ HMODULE, WINAPI, (LPCWSTR lpLibFileName)) if (moduleAddress) { CallLoadLibraryWCallbacks(lpLibFileName, moduleAddress); - InformPluginsDLLLoad(fs::path(lpLibFileName), moduleAddress); + g_pPluginManager->InformDllLoad(moduleAddress, fs::path(lpLibFileName)); } return moduleAddress; diff --git a/primedev/core/sourceinterface.h b/primedev/core/sourceinterface.h index 7b5e81f3..bbbbd3bc 100644 --- a/primedev/core/sourceinterface.h +++ b/primedev/core/sourceinterface.h @@ -1,6 +1,13 @@ #pragma once #include <string> +// interface return status +enum class InterfaceStatus : int +{ + IFACE_OK = 0, + IFACE_FAILED, +}; + // literally just copied from ttf2sdk definition typedef void* (*CreateInterfaceFn)(const char* pName, int* pReturnCode); |