aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/squirrel/squirrel.h
diff options
context:
space:
mode:
authorJan <sentrycraft123@gmail.com>2023-06-29 04:22:33 +0100
committerGitHub <noreply@github.com>2023-06-28 23:22:33 -0400
commitefd907105cf7906c78253631f75bf4fd83f769db (patch)
tree0516853204106852adb06ee1d69a74e8994309a0 /NorthstarDLL/squirrel/squirrel.h
parentb5c4e4e7ed81394070b05296ed087b6043d27667 (diff)
downloadNorthstarLauncher-efd907105cf7906c78253631f75bf4fd83f769db.tar.gz
NorthstarLauncher-efd907105cf7906c78253631f75bf4fd83f769db.zip
* turn implicit type casts into standard compliant explicit type casts * correct includes and library names * correct implicit use of std-namespaced functions * turn incomplete virtual implementations into pure virtuals (this also follows what the Source SDK tier0 header does) * define SqRecurseArgs ahead of implementation to fix templating problems * switch out removed getentity with getthisentity * fix calls to curl_easy_escape with wrong types * replace winapi-specific function with std starts_with function * format squirrel header
Diffstat (limited to 'NorthstarDLL/squirrel/squirrel.h')
-rw-r--r--NorthstarDLL/squirrel/squirrel.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/NorthstarDLL/squirrel/squirrel.h b/NorthstarDLL/squirrel/squirrel.h
index 3d18d6c1..427eb03c 100644
--- a/NorthstarDLL/squirrel/squirrel.h
+++ b/NorthstarDLL/squirrel/squirrel.h
@@ -6,6 +6,19 @@
#include "plugins/plugin_abi.h"
#include "mods/modmanager.h"
+/*
+ definitions from hell
+ required to function
+*/
+
+template <ScriptContext context, typename T> inline void SqRecurseArgs(FunctionVector& v, T& arg);
+
+template <ScriptContext context, typename T, typename... Args> inline void SqRecurseArgs(FunctionVector& v, T& arg, Args... args);
+
+/*
+ sanity below
+*/
+
// stolen from ttf2sdk: sqvm types
typedef float SQFloat;
typedef long SQInteger;
@@ -280,7 +293,7 @@ class SquirrelManagerBase
template <typename T> inline SQBool getthisentity(HSquirrelVM* sqvm, T* ppEntity)
{
- return __sq_getentity(sqvm, (void**)ppEntity);
+ return __sq_getthisentity(sqvm, (void**)ppEntity);
}
template <typename T> inline T* getentity(HSquirrelVM* sqvm, SQInteger iStackPos)