From c349359e71170c2fa78ac0fa22df07932ab47210 Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Tue, 5 Dec 2023 13:07:57 -0500 Subject: minor refactor for plugins --- src/plugins.hpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/plugins.hpp (limited to 'src/plugins.hpp') diff --git a/src/plugins.hpp b/src/plugins.hpp new file mode 100644 index 0000000..2f34c12 --- /dev/null +++ b/src/plugins.hpp @@ -0,0 +1,16 @@ +#ifndef PKE_PLUGINS_HPP +#define PKE_PLUGINS_HPP + +struct PKEPluginInterface { + void (*OnInit)() = nullptr; + void (*OnTick)(double delta) = nullptr; + void (*OnTeardown)() = nullptr; + void (*OnImGuiRender)() = nullptr; +}; + +extern PKEPluginInterface pkePlugin; + +void Pke_LoadPlugin(const char *path); +void Pke_UnloadPlugin(); + +#endif /* PKE_PLUGINS_HPP */ -- cgit v1.2.3