diff --git a/source/globals.cpp b/source/globals.cpp new file mode 100644 index 0000000..937b000 --- /dev/null +++ b/source/globals.cpp @@ -0,0 +1,6 @@ +#include "globals.h" + +MEMHeapHandle pluginDataHeap __attribute__((section(".data"))) = 0; +plugin_information_t *gPluginInformation __attribute__((section(".data"))) = NULL; + +plugin_information_on_reload_t gLinkOnReload __attribute__((section(".data"))); \ No newline at end of file diff --git a/source/globals.h b/source/globals.h new file mode 100644 index 0000000..c956869 --- /dev/null +++ b/source/globals.h @@ -0,0 +1,8 @@ +#pragma once + +#include +#include + +extern plugin_information_t *gPluginInformation; +extern MEMHeapHandle pluginDataHeap; +extern plugin_information_on_reload_t gLinkOnReload; \ No newline at end of file diff --git a/source/main.cpp b/source/main.cpp index 5531d58..61f38a4 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -23,10 +23,9 @@ #include "common/module_defines.h" #include "hooks.h" #include "PluginManagement.h" +#include "globals.h" #include -MEMHeapHandle pluginDataHeap __attribute__((section(".data"))) = 0; -plugin_information_t *gPluginInformation __attribute__((section(".data"))) = NULL; int test(); diff --git a/source/patcher/hooks_patcher_static.cpp b/source/patcher/hooks_patcher_static.cpp index 04e3500..cb5b057 100644 --- a/source/patcher/hooks_patcher_static.cpp +++ b/source/patcher/hooks_patcher_static.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include "hooks.h" extern plugin_information_t *gPluginInformation;