From 1b48d1382d2d57a822201f34743a51813798b348 Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Thu, 18 Jan 2024 22:37:02 -0500 Subject: camera checkpoint - large refactor for attempting to let physics own camera position --- src/plugin-types.hpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/plugin-types.hpp (limited to 'src/plugin-types.hpp') 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 + +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 */ -- cgit v1.2.3