summaryrefslogtreecommitdiff
path: root/src/plugins.hpp
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2023-12-05 13:07:57 -0500
committerJonathan Bradley <jcb@pikum.xyz>2023-12-05 13:07:57 -0500
commitc349359e71170c2fa78ac0fa22df07932ab47210 (patch)
tree74795fee5b64fe94683c6078d3b50ec5112a4707 /src/plugins.hpp
parent6e498a3781f5ccbbaa6cf5e407cf67722624760f (diff)
minor refactor for plugins
Diffstat (limited to 'src/plugins.hpp')
-rw-r--r--src/plugins.hpp16
1 files changed, 16 insertions, 0 deletions
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 */