summaryrefslogtreecommitdiff
path: root/src/plugin-types.hpp
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2024-01-18 22:37:02 -0500
committerJonathan Bradley <jcb@pikum.xyz>2024-01-18 22:37:02 -0500
commit1b48d1382d2d57a822201f34743a51813798b348 (patch)
tree612672a4be654b38f3b44580f85e4f0637952512 /src/plugin-types.hpp
parent2e680ebd77236f7b62b9ded1b083c86f9e13b1c8 (diff)
camera checkpoint - large refactor for attempting to let physics own camera position
Diffstat (limited to 'src/plugin-types.hpp')
-rw-r--r--src/plugin-types.hpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/plugin-types.hpp b/src/plugin-types.hpp
new file mode 100644
index 0000000..22f9707
--- /dev/null
+++ b/src/plugin-types.hpp
@@ -0,0 +1,25 @@
+#ifndef PKE_PLUGIN_TYPES_HPP
+#define PKE_PLUGIN_TYPES_HPP
+
+#include <cstdint>
+
+struct PKEPluginInterface {
+ // for internal use only
+ void *pluginHandle = nullptr;
+ void (*OnInit)() = nullptr;
+ void (*OnTick)(double delta) = nullptr;
+ void (*OnTeardown)() = nullptr;
+ void (*OnImGuiRender)() = nullptr;
+};
+
+constexpr int64_t CallbackSignatureLength = 16;
+using CallbackSignature = char[CallbackSignatureLength];
+
+struct PkeCallback {
+ // the 16 char signature(name) of a function
+ CallbackSignature name = {'\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0'};
+ // the address of the function to call - populated on startup
+ void *func = nullptr;
+};
+
+#endif /* PKE_PLUGIN_TYPES_HPP */