aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/plugins/plugins.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDLL/plugins/plugins.cpp')
-rw-r--r--NorthstarDLL/plugins/plugins.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/NorthstarDLL/plugins/plugins.cpp b/NorthstarDLL/plugins/plugins.cpp
index 18610e2e..121512e5 100644
--- a/NorthstarDLL/plugins/plugins.cpp
+++ b/NorthstarDLL/plugins/plugins.cpp
@@ -174,10 +174,10 @@ std::optional<Plugin> PluginManager::LoadPlugin(fs::path path, PluginInitFuncs*
plugin.inform_sqvm_created = (PLUGIN_INFORM_SQVM_CREATED_TYPE)GetProcAddress(pluginLib, "PLUGIN_INFORM_SQVM_CREATED");
plugin.inform_sqvm_destroyed = (PLUGIN_INFORM_SQVM_DESTROYED_TYPE)GetProcAddress(pluginLib, "PLUGIN_INFORM_SQVM_DESTROYED");
- plugin.push_presence = (PLUGIN_PUSH_PRESENCE_TYPE)GetProcAddress(pluginLib, "PLUGIN_RECEIVE_PRESENCE");
-
plugin.inform_dll_load = (PLUGIN_INFORM_DLL_LOAD_TYPE)GetProcAddress(pluginLib, "PLUGIN_INFORM_DLL_LOAD");
+ plugin.run_frame = (PLUGIN_RUNFRAME)GetProcAddress(pluginLib, "PLUGIN_RUNFRAME");
+
plugin.handle = m_vLoadedPlugins.size();
plugin.logger = std::make_shared<ColoredLogger>(plugin.displayName.c_str(), NS::Colors::PLUGIN);
RegisterLogger(plugin.logger);
@@ -298,24 +298,24 @@ void PluginManager::InformSQVMDestroyed(ScriptContext context)
}
}
-void PluginManager::PushPresence(PluginGameStatePresence* data)
+void PluginManager::InformDLLLoad(const char* dll, void* data, void* dllPtr)
{
for (auto plugin : m_vLoadedPlugins)
{
- if (plugin.push_presence != NULL)
+ if (plugin.inform_dll_load != NULL)
{
- plugin.push_presence(data);
+ plugin.inform_dll_load(dll, (PluginEngineData*)data, dllPtr);
}
}
}
-void PluginManager::InformDLLLoad(PluginLoadDLL dll, void* data)
+void PluginManager::RunFrame()
{
for (auto plugin : m_vLoadedPlugins)
{
- if (plugin.inform_dll_load != NULL)
+ if (plugin.run_frame != NULL)
{
- plugin.inform_dll_load(dll, data);
+ plugin.run_frame();
}
}
}