diff options
author | Maya <malte.hoermeyer@web.de> | 2022-08-23 03:54:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-23 02:54:54 +0100 |
commit | 4f6f182d26094b7b7512d656b5085f80e8af3dc9 (patch) | |
tree | 0a30acbb9c3f47f67887834620e5c182b7b46e09 /NorthstarDLL/scriptjson.cpp | |
parent | 86ea43ef2c32104f92e12c80231ff9271ebeb6e2 (diff) | |
download | NorthstarLauncher-4f6f182d26094b7b7512d656b5085f80e8af3dc9.tar.gz NorthstarLauncher-4f6f182d26094b7b7512d656b5085f80e8af3dc9.zip |
Add ability to load Datatables from files (#238)
* first version of kinda working custom datatables
* Fix copy error
* Finish custom datatables
* Fix Merge
* Fix line endings
* Add fallback to rpak when ns_prefere_datatable_from_disk is true
* fix typo
* Bug fixess
* Fix Function Registration hook
* Set convar value
* Fix Client and Ui VM
* enable server auth with ms agian
* Add Filters
* FIx unused import
* Merge remote-tracking branch 'upsteam/bobs-big-refactor-pr' into datatables
Co-authored-by: RoyalBlue1 <realEmail@veryRealURL.com>
Diffstat (limited to 'NorthstarDLL/scriptjson.cpp')
-rw-r--r-- | NorthstarDLL/scriptjson.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/NorthstarDLL/scriptjson.cpp b/NorthstarDLL/scriptjson.cpp index ff6d5284..9a77d3a2 100644 --- a/NorthstarDLL/scriptjson.cpp +++ b/NorthstarDLL/scriptjson.cpp @@ -10,8 +10,8 @@ #undef GetObject // fuck microsoft developers
#endif
-template <ScriptContext context>
-void DecodeJsonArray(void* sqvm, rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<SourceAllocator>>* arr)
+template <ScriptContext context> void
+DecodeJsonArray(HSquirrelVM* sqvm, rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<SourceAllocator>>* arr)
{
g_pSquirrel<context>->newarray(sqvm, 0);
@@ -47,8 +47,8 @@ void DecodeJsonArray(void* sqvm, rapidjson::GenericValue<rapidjson::UTF8<char>, }
}
-template <ScriptContext context>
-void DecodeJsonTable(void* sqvm, rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<SourceAllocator>>* obj)
+template <ScriptContext context> void
+DecodeJsonTable(HSquirrelVM* sqvm, rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<SourceAllocator>>* obj)
{
g_pSquirrel<context>->newtable(sqvm);
@@ -208,7 +208,7 @@ template <ScriptContext context> void EncodeJSONArray( // table function DecodeJSON( string json, bool fatalParseErrors = false )
-template <ScriptContext context> SQRESULT SQ_DecodeJSON(void* sqvm)
+template <ScriptContext context> SQRESULT SQ_DecodeJSON(HSquirrelVM* sqvm)
{
const char* pJson = g_pSquirrel<context>->getstring(sqvm, 1);
const bool bFatalParseErrors = g_pSquirrel<context>->getbool(sqvm, 2);
@@ -237,7 +237,7 @@ template <ScriptContext context> SQRESULT SQ_DecodeJSON(void* sqvm) // string function EncodeJSON( table data )
-template <ScriptContext context> SQRESULT SQ_EncodeJSON(void* sqvm)
+template <ScriptContext context> SQRESULT SQ_EncodeJSON(HSquirrelVM* sqvm)
{
rapidjson_document doc;
doc.SetObject();
|