aboutsummaryrefslogtreecommitdiff
path: root/primedev/squirrel/squirrel.h
diff options
context:
space:
mode:
authoruniboi <64006268+uniboi@users.noreply.github.com>2024-02-04 02:14:46 +0100
committerGitHub <noreply@github.com>2024-02-04 02:14:46 +0100
commitedf013952ca2d110f190dc8cd16e5529846656e4 (patch)
treeca219c17665810d94f2cb23b27f58fa9c82f3a62 /primedev/squirrel/squirrel.h
parent6ad955ae0aab8b79910cb4a12777419a78a42a90 (diff)
downloadNorthstarLauncher-edf013952ca2d110f190dc8cd16e5529846656e4.tar.gz
NorthstarLauncher-edf013952ca2d110f190dc8cd16e5529846656e4.zip
Replaces the current plugin api with source interfaces. - backwards compatible - no more json in binaries (wtf) - does not rely on structs from third party libraries (wtf) - actually initializes variables - no more basically unused classes The launcher exposes almost everything required by plugins in interfaces that allow for backwards compatibility. The only thing that's passed to a plugin directly is the northstar dll HWND and a struct of data that's different for each plugin.
Diffstat (limited to 'primedev/squirrel/squirrel.h')
-rw-r--r--primedev/squirrel/squirrel.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/primedev/squirrel/squirrel.h b/primedev/squirrel/squirrel.h
index 17f4186d..0c1f24d3 100644
--- a/primedev/squirrel/squirrel.h
+++ b/primedev/squirrel/squirrel.h
@@ -3,7 +3,6 @@
#include "squirrelclasstypes.h"
#include "squirrelautobind.h"
#include "core/math/vector.h"
-#include "plugins/plugin_abi.h"
#include "mods/modmanager.h"
/*
@@ -51,8 +50,6 @@ const char* GetContextName_Short(ScriptContext context);
eSQReturnType SQReturnTypeFromString(const char* pReturnType);
const char* SQTypeNameFromID(const int iTypeId);
-void AsyncCall_External(ScriptContext context, const char* func_name, SquirrelMessage_External_Pop function, void* userdata);
-
ScriptContext ScriptContextFromString(std::string string);
namespace NS::log
@@ -417,7 +414,6 @@ public:
SQRESULT setupfunc(const SQChar* funcname);
void AddFuncOverride(std::string name, SQFunction func);
void ProcessMessageBuffer();
- void GenerateSquirrelFunctionsStruct(SquirrelFunctions* s);
};
template <ScriptContext context> SquirrelManager<context>* g_pSquirrel;
@@ -483,7 +479,7 @@ requires is_iterable<T>
inline VoidFunction SQMessageBufferPushArg(T& arg) {
FunctionVector localv = {};
localv.push_back([]{g_pSquirrel<context>->newarray(g_pSquirrel<context>->m_pSQVM->sqvm, 0);});
-
+
for (const auto& item : arg) {
localv.push_back(SQMessageBufferPushArg<context>(item));
localv.push_back([]{g_pSquirrel<context>->arrayappend(g_pSquirrel<context>->m_pSQVM->sqvm, -2);});
@@ -497,7 +493,7 @@ requires is_map<T>
inline VoidFunction SQMessageBufferPushArg(T& map) {
FunctionVector localv = {};
localv.push_back([]{g_pSquirrel<context>->newtable(g_pSquirrel<context>->m_pSQVM->sqvm);});
-
+
for (const auto& item : map) {
localv.push_back(SQMessageBufferPushArg<context>(item.first));
localv.push_back(SQMessageBufferPushArg<context>(item.second));