From f5ab6fb5e8be7b73e6003d4145081d5e0c0ce287 Mon Sep 17 00:00:00 2001 From: Jack <66967891+ASpoonPlaysGames@users.noreply.github.com> Date: Wed, 27 Dec 2023 00:32:01 +0000 Subject: Folder restructuring from primedev (#624) Copies of over the primedev folder structure for easier cherry-picking of further changes Co-authored-by: F1F7Y --- NorthstarDLL/plugins/plugins.h | 59 ------------------------------------------ 1 file changed, 59 deletions(-) delete mode 100644 NorthstarDLL/plugins/plugins.h (limited to 'NorthstarDLL/plugins/plugins.h') diff --git a/NorthstarDLL/plugins/plugins.h b/NorthstarDLL/plugins/plugins.h deleted file mode 100644 index 4e841f27..00000000 --- a/NorthstarDLL/plugins/plugins.h +++ /dev/null @@ -1,59 +0,0 @@ -#pragma once -#include "plugin_abi.h" - -const int IDR_RCDATA1 = 101; - -class Plugin -{ -public: - std::string name; - std::string displayName; - std::string dependencyName; - std::string description; - - std::string api_version; - std::string version; - - // For now this is just implemented as the index into the plugins array - // Maybe a bit shit but it works - int handle; - - std::shared_ptr logger; - - bool run_on_client = false; - bool run_on_server = false; - -public: - PLUGIN_INIT_TYPE init; - PLUGIN_INIT_SQVM_TYPE init_sqvm_client; - PLUGIN_INIT_SQVM_TYPE init_sqvm_server; - PLUGIN_INFORM_SQVM_CREATED_TYPE inform_sqvm_created; - PLUGIN_INFORM_SQVM_DESTROYED_TYPE inform_sqvm_destroyed; - - PLUGIN_INFORM_DLL_LOAD_TYPE inform_dll_load; - - PLUGIN_RUNFRAME run_frame; -}; - -class PluginManager -{ -public: - std::vector m_vLoadedPlugins; - -public: - bool LoadPlugins(); - std::optional LoadPlugin(fs::path path, PluginInitFuncs* funcs, PluginNorthstarData* data); - - void InformSQVMLoad(ScriptContext context, SquirrelFunctions* s); - void InformSQVMCreated(ScriptContext context, CSquirrelVM* sqvm); - void InformSQVMDestroyed(ScriptContext context); - - void InformDLLLoad(const char* dll, void* data, void* dllPtr); - - void RunFrame(); - -private: - std::string pluginPath; -}; - -extern PluginManager* g_pPluginManager; -- cgit v1.2.3