diff options
author | Jan200101 <sentrycraft123@gmail.com> | 2023-09-10 21:17:03 +0200 |
---|---|---|
committer | Jan200101 <sentrycraft123@gmail.com> | 2023-09-10 21:17:03 +0200 |
commit | ac01bde6b9673b80dd225be3edebbe2255d9ebd2 (patch) | |
tree | b458d57204d4c7377917a316f36db29165b9b2ae /src/ns_plugin.h | |
parent | 94841a78b8126f0ed02db3e7066f4680031011a6 (diff) | |
download | SouthRPC-ac01bde6b9673b80dd225be3edebbe2255d9ebd2.tar.gz SouthRPC-ac01bde6b9673b80dd225be3edebbe2255d9ebd2.zip |
implement plugin as class, create server class
Diffstat (limited to 'src/ns_plugin.h')
-rw-r--r-- | src/ns_plugin.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/ns_plugin.h b/src/ns_plugin.h new file mode 100644 index 0000000..f1567a4 --- /dev/null +++ b/src/ns_plugin.h @@ -0,0 +1,25 @@ +#ifndef NS_PLUGIN_H +#define NS_PLUGIN_H + +// Needed to bootstrap plugin abi +#include <windef.h> +#include <mutex> +#include <optional> +#include <map> +#include <unordered_map> +#include <spdlog/spdlog.h> + +#include "plugin_abi.h" +// ConCommand/ConVar types +#include "core/macros.h" +#include "core/convar/convar.h" +#include "core/convar/concommand.h" + +// This is a mess +// hope Plugins V3 includes these in the ABI +// pls cat :womp: +typedef void (*ConCommandConstructorType)(ConCommand* newCommand, const char* name, FnCommandCallback_t callback, const char* helpString, int flags, void* parent); +typedef void (*ConVarMallocType)(void* pConVarMaloc, int a2, int a3); +typedef void (*ConVarRegisterType)(ConVar* pConVar, const char* pszName, const char* pszDefaultValue, int nFlags, const char* pszHelpString, bool bMin, float fMin, bool bMax, float fMax, void* pCallback); + +#endif |