From a29cca838cbba93dfbea64380ea9854a817b0958 Mon Sep 17 00:00:00 2001 From: Quentin Date: Wed, 28 Feb 2024 23:47:33 +0100 Subject: [PATCH] lua natives: try to handle Any* parameters properly (#2785) --- scripts/natives_gen.py | 19 +- src/lua/natives/lua_native_binding_AUDIO.cpp | 9 +- .../natives/lua_native_binding_DATAFILE.cpp | 293 ++---- src/lua/natives/lua_native_binding_ENTITY.cpp | 10 +- src/lua/natives/lua_native_binding_FILES.cpp | 112 +-- .../natives/lua_native_binding_GRAPHICS.cpp | 18 +- src/lua/natives/lua_native_binding_HUD.cpp | 67 +- src/lua/natives/lua_native_binding_MISC.cpp | 89 +- src/lua/natives/lua_native_binding_MONEY.cpp | 92 +- .../lua_native_binding_NETSHOPPING.cpp | 18 +- .../natives/lua_native_binding_NETWORK.cpp | 943 ++++++------------ .../natives/lua_native_binding_PATHFIND.cpp | 10 +- src/lua/natives/lua_native_binding_PED.cpp | 56 +- .../natives/lua_native_binding_PHYSICS.cpp | 18 +- .../lua_native_binding_SAVEMIGRATION.cpp | 9 +- src/lua/natives/lua_native_binding_SCRIPT.cpp | 19 +- .../natives/lua_native_binding_SECURITY.cpp | 10 +- .../natives/lua_native_binding_SOCIALCLUB.cpp | 65 +- src/lua/natives/lua_native_binding_STATS.cpp | 307 ++---- src/lua/natives/lua_native_binding_SYSTEM.cpp | 18 +- .../natives/lua_native_binding_VEHICLE.cpp | 9 +- src/lua/natives/lua_native_binding_WEAPON.cpp | 18 +- 22 files changed, 764 insertions(+), 1445 deletions(-) diff --git a/scripts/natives_gen.py b/scripts/natives_gen.py index 39121603..760d56ec 100644 --- a/scripts/natives_gen.py +++ b/scripts/natives_gen.py @@ -24,13 +24,17 @@ def print_hpp(text): class Arg: def __init__(self, name, type_): self.name = name - self.type_ = type_.replace("BOOL", "bool") + self.type_ = type_.replace("BOOL", "bool").replace("Any*", "uintptr_t") + if self.type_ == "uintptr_t": + self.is_any_ptr = True + else: + self.is_any_ptr = False if self.type_ == "const char*": self.type_ = self.type_.replace("const char*", "sol::stack_object") self.is_string = True else: self.is_string = False - self.is_pointer_arg = "*" in type_ and "const char" not in type_ + self.is_pointer_arg = "*" in self.type_ and "const char" not in self.type_ self.type_no_star = self.type_.replace("*", "") def __str__(self) -> str: @@ -43,7 +47,7 @@ class NativeFunc: self.lua_name = lua_name self.cpp_name = cpp_name self.args = args - self.return_type = return_type.replace("BOOL", "bool") + self.return_type = return_type.replace("BOOL", "bool").replace("Any*", "uintptr_t") self.out_params = [] if self.return_type != "void": @@ -126,10 +130,14 @@ class NativeFunc: if len(self.args) > 0: for arg in self.args: + if arg.is_any_ptr: + call_native += "(Any*)" + if arg.is_pointer_arg: if arg.type_ == "bool*": call_native += "(BOOL*)" call_native += "&" + if arg.is_string: call_native += f'{arg.name}.is() ? {arg.name}.as() : nullptr, ' @@ -167,7 +175,10 @@ class NativeFunc: if returning_multiple_values: return_statement = "return return_values;" elif self.return_type != "void": - return_statement = "return retval;" + if self.return_type == "uintptr_t": + return_statement = "return (uintptr_t)retval;" + else: + return_statement = "return retval;" else: for arg in self.args: if arg.is_pointer_arg: diff --git a/src/lua/natives/lua_native_binding_AUDIO.cpp b/src/lua/natives/lua_native_binding_AUDIO.cpp index 9b2a27a1..eda9307e 100644 --- a/src/lua/natives/lua_native_binding_AUDIO.cpp +++ b/src/lua/natives/lua_native_binding_AUDIO.cpp @@ -157,13 +157,10 @@ namespace lua::native AUDIO::INTERRUPT_CONVERSATION_AND_PAUSE(ped, p1.is() ? p1.as() : nullptr, speaker.is() ? speaker.as() : nullptr); } - static std::tuple LUA_NATIVE_AUDIO_GET_VARIATION_CHOSEN_FOR_SCRIPTED_LINE(Any p0) + static int LUA_NATIVE_AUDIO_GET_VARIATION_CHOSEN_FOR_SCRIPTED_LINE(uintptr_t p0) { - std::tuple return_values; - std::get<0>(return_values) = AUDIO::GET_VARIATION_CHOSEN_FOR_SCRIPTED_LINE(&p0); - std::get<1>(return_values) = p0; - - return return_values; + auto retval = AUDIO::GET_VARIATION_CHOSEN_FOR_SCRIPTED_LINE((Any*)p0); + return retval; } static void LUA_NATIVE_AUDIO_SET_NO_DUCKING_FOR_CONVERSATION(bool p0) diff --git a/src/lua/natives/lua_native_binding_DATAFILE.cpp b/src/lua/natives/lua_native_binding_DATAFILE.cpp index cb2cc3d9..58b627b3 100644 --- a/src/lua/natives/lua_native_binding_DATAFILE.cpp +++ b/src/lua/natives/lua_native_binding_DATAFILE.cpp @@ -43,13 +43,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_DATAFILE_UGC_CREATE_CONTENT(Any data, int dataCount, sol::stack_object contentName, sol::stack_object description, sol::stack_object tagsCsv, sol::stack_object contentTypeName, bool publish, Any p7) + static bool LUA_NATIVE_DATAFILE_UGC_CREATE_CONTENT(uintptr_t data, int dataCount, sol::stack_object contentName, sol::stack_object description, sol::stack_object tagsCsv, sol::stack_object contentTypeName, bool publish, Any p7) { - std::tuple return_values; - std::get<0>(return_values) = (bool)DATAFILE::UGC_CREATE_CONTENT(&data, dataCount, contentName.is() ? contentName.as() : nullptr, description.is() ? description.as() : nullptr, tagsCsv.is() ? tagsCsv.as() : nullptr, contentTypeName.is() ? contentTypeName.as() : nullptr, publish, p7); - std::get<1>(return_values) = data; - - return return_values; + auto retval = (bool)DATAFILE::UGC_CREATE_CONTENT((Any*)data, dataCount, contentName.is() ? contentName.as() : nullptr, description.is() ? description.as() : nullptr, tagsCsv.is() ? tagsCsv.as() : nullptr, contentTypeName.is() ? contentTypeName.as() : nullptr, publish, p7); + return retval; } static bool LUA_NATIVE_DATAFILE_UGC_CREATE_MISSION(sol::stack_object contentName, sol::stack_object description, sol::stack_object tagsCsv, sol::stack_object contentTypeName, bool publish, Any p5) @@ -58,13 +55,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_DATAFILE_UGC_UPDATE_CONTENT(sol::stack_object contentId, Any data, int dataCount, sol::stack_object contentName, sol::stack_object description, sol::stack_object tagsCsv, sol::stack_object contentTypeName, Any p7) + static bool LUA_NATIVE_DATAFILE_UGC_UPDATE_CONTENT(sol::stack_object contentId, uintptr_t data, int dataCount, sol::stack_object contentName, sol::stack_object description, sol::stack_object tagsCsv, sol::stack_object contentTypeName, Any p7) { - std::tuple return_values; - std::get<0>(return_values) = (bool)DATAFILE::UGC_UPDATE_CONTENT(contentId.is() ? contentId.as() : nullptr, &data, dataCount, contentName.is() ? contentName.as() : nullptr, description.is() ? description.as() : nullptr, tagsCsv.is() ? tagsCsv.as() : nullptr, contentTypeName.is() ? contentTypeName.as() : nullptr, p7); - std::get<1>(return_values) = data; - - return return_values; + auto retval = (bool)DATAFILE::UGC_UPDATE_CONTENT(contentId.is() ? contentId.as() : nullptr, (Any*)data, dataCount, contentName.is() ? contentName.as() : nullptr, description.is() ? description.as() : nullptr, tagsCsv.is() ? tagsCsv.as() : nullptr, contentTypeName.is() ? contentTypeName.as() : nullptr, p7); + return retval; } static bool LUA_NATIVE_DATAFILE_UGC_UPDATE_MISSION(sol::stack_object contentId, sol::stack_object contentName, sol::stack_object description, sol::stack_object tagsCsv, sol::stack_object contentTypeName, Any p5) @@ -129,10 +123,10 @@ namespace lua::native DATAFILE::DATAFILE_FLUSH_MISSION_HEADER(); } - static Any* LUA_NATIVE_DATAFILE_DATAFILE_GET_FILE_DICT(int p0) + static uintptr_t LUA_NATIVE_DATAFILE_DATAFILE_GET_FILE_DICT(int p0) { auto retval = DATAFILE::DATAFILE_GET_FILE_DICT(p0); - return retval; + return (uintptr_t)retval; } static bool LUA_NATIVE_DATAFILE_DATAFILE_START_SAVE_TO_CLOUD(sol::stack_object filename, Any p1) @@ -167,241 +161,174 @@ namespace lua::native DATAFILE::DATAFILE_DELETE_FOR_ADDITIONAL_DATA_FILE(p0); } - static Any* LUA_NATIVE_DATAFILE_DATAFILE_GET_FILE_DICT_FOR_ADDITIONAL_DATA_FILE(Any p0) + static uintptr_t LUA_NATIVE_DATAFILE_DATAFILE_GET_FILE_DICT_FOR_ADDITIONAL_DATA_FILE(Any p0) { auto retval = DATAFILE::DATAFILE_GET_FILE_DICT_FOR_ADDITIONAL_DATA_FILE(p0); + return (uintptr_t)retval; + } + + static void LUA_NATIVE_DATAFILE_DATADICT_SET_BOOL(uintptr_t objectData, sol::stack_object key, bool value) + { + DATAFILE::DATADICT_SET_BOOL((Any*)objectData, key.is() ? key.as() : nullptr, value); + } + + static void LUA_NATIVE_DATAFILE_DATADICT_SET_INT(uintptr_t objectData, sol::stack_object key, int value) + { + DATAFILE::DATADICT_SET_INT((Any*)objectData, key.is() ? key.as() : nullptr, value); + } + + static void LUA_NATIVE_DATAFILE_DATADICT_SET_FLOAT(uintptr_t objectData, sol::stack_object key, float value) + { + DATAFILE::DATADICT_SET_FLOAT((Any*)objectData, key.is() ? key.as() : nullptr, value); + } + + static void LUA_NATIVE_DATAFILE_DATADICT_SET_STRING(uintptr_t objectData, sol::stack_object key, sol::stack_object value) + { + DATAFILE::DATADICT_SET_STRING((Any*)objectData, key.is() ? key.as() : nullptr, value.is() ? value.as() : nullptr); + } + + static void LUA_NATIVE_DATAFILE_DATADICT_SET_VECTOR(uintptr_t objectData, sol::stack_object key, float valueX, float valueY, float valueZ) + { + DATAFILE::DATADICT_SET_VECTOR((Any*)objectData, key.is() ? key.as() : nullptr, valueX, valueY, valueZ); + } + + static uintptr_t LUA_NATIVE_DATAFILE_DATADICT_CREATE_DICT(uintptr_t objectData, sol::stack_object key) + { + auto retval = DATAFILE::DATADICT_CREATE_DICT((Any*)objectData, key.is() ? key.as() : nullptr); + return (uintptr_t)retval; + } + + static uintptr_t LUA_NATIVE_DATAFILE_DATADICT_CREATE_ARRAY(uintptr_t objectData, sol::stack_object key) + { + auto retval = DATAFILE::DATADICT_CREATE_ARRAY((Any*)objectData, key.is() ? key.as() : nullptr); + return (uintptr_t)retval; + } + + static bool LUA_NATIVE_DATAFILE_DATADICT_GET_BOOL(uintptr_t objectData, sol::stack_object key) + { + auto retval = (bool)DATAFILE::DATADICT_GET_BOOL((Any*)objectData, key.is() ? key.as() : nullptr); return retval; } - static Any LUA_NATIVE_DATAFILE_DATADICT_SET_BOOL(Any objectData, sol::stack_object key, bool value) + static int LUA_NATIVE_DATAFILE_DATADICT_GET_INT(uintptr_t objectData, sol::stack_object key) { - DATAFILE::DATADICT_SET_BOOL(&objectData, key.is() ? key.as() : nullptr, value); - return objectData; + auto retval = DATAFILE::DATADICT_GET_INT((Any*)objectData, key.is() ? key.as() : nullptr); + return retval; } - static Any LUA_NATIVE_DATAFILE_DATADICT_SET_INT(Any objectData, sol::stack_object key, int value) + static float LUA_NATIVE_DATAFILE_DATADICT_GET_FLOAT(uintptr_t objectData, sol::stack_object key) { - DATAFILE::DATADICT_SET_INT(&objectData, key.is() ? key.as() : nullptr, value); - return objectData; + auto retval = DATAFILE::DATADICT_GET_FLOAT((Any*)objectData, key.is() ? key.as() : nullptr); + return retval; } - static Any LUA_NATIVE_DATAFILE_DATADICT_SET_FLOAT(Any objectData, sol::stack_object key, float value) + static const char* LUA_NATIVE_DATAFILE_DATADICT_GET_STRING(uintptr_t objectData, sol::stack_object key) { - DATAFILE::DATADICT_SET_FLOAT(&objectData, key.is() ? key.as() : nullptr, value); - return objectData; + auto retval = DATAFILE::DATADICT_GET_STRING((Any*)objectData, key.is() ? key.as() : nullptr); + return retval; } - static Any LUA_NATIVE_DATAFILE_DATADICT_SET_STRING(Any objectData, sol::stack_object key, sol::stack_object value) + static Vector3 LUA_NATIVE_DATAFILE_DATADICT_GET_VECTOR(uintptr_t objectData, sol::stack_object key) { - DATAFILE::DATADICT_SET_STRING(&objectData, key.is() ? key.as() : nullptr, value.is() ? value.as() : nullptr); - return objectData; + auto retval = DATAFILE::DATADICT_GET_VECTOR((Any*)objectData, key.is() ? key.as() : nullptr); + return retval; } - static Any LUA_NATIVE_DATAFILE_DATADICT_SET_VECTOR(Any objectData, sol::stack_object key, float valueX, float valueY, float valueZ) + static uintptr_t LUA_NATIVE_DATAFILE_DATADICT_GET_DICT(uintptr_t objectData, sol::stack_object key) { - DATAFILE::DATADICT_SET_VECTOR(&objectData, key.is() ? key.as() : nullptr, valueX, valueY, valueZ); - return objectData; + auto retval = DATAFILE::DATADICT_GET_DICT((Any*)objectData, key.is() ? key.as() : nullptr); + return (uintptr_t)retval; } - static std::tuple LUA_NATIVE_DATAFILE_DATADICT_CREATE_DICT(Any objectData, sol::stack_object key) + static uintptr_t LUA_NATIVE_DATAFILE_DATADICT_GET_ARRAY(uintptr_t objectData, sol::stack_object key) { - std::tuple return_values; - std::get<0>(return_values) = DATAFILE::DATADICT_CREATE_DICT(&objectData, key.is() ? key.as() : nullptr); - std::get<1>(return_values) = objectData; - - return return_values; + auto retval = DATAFILE::DATADICT_GET_ARRAY((Any*)objectData, key.is() ? key.as() : nullptr); + return (uintptr_t)retval; } - static std::tuple LUA_NATIVE_DATAFILE_DATADICT_CREATE_ARRAY(Any objectData, sol::stack_object key) + static int LUA_NATIVE_DATAFILE_DATADICT_GET_TYPE(uintptr_t objectData, sol::stack_object key) { - std::tuple return_values; - std::get<0>(return_values) = DATAFILE::DATADICT_CREATE_ARRAY(&objectData, key.is() ? key.as() : nullptr); - std::get<1>(return_values) = objectData; - - return return_values; + auto retval = DATAFILE::DATADICT_GET_TYPE((Any*)objectData, key.is() ? key.as() : nullptr); + return retval; } - static std::tuple LUA_NATIVE_DATAFILE_DATADICT_GET_BOOL(Any objectData, sol::stack_object key) + static void LUA_NATIVE_DATAFILE_DATAARRAY_ADD_BOOL(uintptr_t arrayData, bool value) { - std::tuple return_values; - std::get<0>(return_values) = (bool)DATAFILE::DATADICT_GET_BOOL(&objectData, key.is() ? key.as() : nullptr); - std::get<1>(return_values) = objectData; - - return return_values; + DATAFILE::DATAARRAY_ADD_BOOL((Any*)arrayData, value); } - static std::tuple LUA_NATIVE_DATAFILE_DATADICT_GET_INT(Any objectData, sol::stack_object key) + static void LUA_NATIVE_DATAFILE_DATAARRAY_ADD_INT(uintptr_t arrayData, int value) { - std::tuple return_values; - std::get<0>(return_values) = DATAFILE::DATADICT_GET_INT(&objectData, key.is() ? key.as() : nullptr); - std::get<1>(return_values) = objectData; - - return return_values; + DATAFILE::DATAARRAY_ADD_INT((Any*)arrayData, value); } - static std::tuple LUA_NATIVE_DATAFILE_DATADICT_GET_FLOAT(Any objectData, sol::stack_object key) + static void LUA_NATIVE_DATAFILE_DATAARRAY_ADD_FLOAT(uintptr_t arrayData, float value) { - std::tuple return_values; - std::get<0>(return_values) = DATAFILE::DATADICT_GET_FLOAT(&objectData, key.is() ? key.as() : nullptr); - std::get<1>(return_values) = objectData; - - return return_values; + DATAFILE::DATAARRAY_ADD_FLOAT((Any*)arrayData, value); } - static std::tuple LUA_NATIVE_DATAFILE_DATADICT_GET_STRING(Any objectData, sol::stack_object key) + static void LUA_NATIVE_DATAFILE_DATAARRAY_ADD_STRING(uintptr_t arrayData, sol::stack_object value) { - std::tuple return_values; - std::get<0>(return_values) = DATAFILE::DATADICT_GET_STRING(&objectData, key.is() ? key.as() : nullptr); - std::get<1>(return_values) = objectData; - - return return_values; + DATAFILE::DATAARRAY_ADD_STRING((Any*)arrayData, value.is() ? value.as() : nullptr); } - static std::tuple LUA_NATIVE_DATAFILE_DATADICT_GET_VECTOR(Any objectData, sol::stack_object key) + static void LUA_NATIVE_DATAFILE_DATAARRAY_ADD_VECTOR(uintptr_t arrayData, float valueX, float valueY, float valueZ) { - std::tuple return_values; - std::get<0>(return_values) = DATAFILE::DATADICT_GET_VECTOR(&objectData, key.is() ? key.as() : nullptr); - std::get<1>(return_values) = objectData; - - return return_values; + DATAFILE::DATAARRAY_ADD_VECTOR((Any*)arrayData, valueX, valueY, valueZ); } - static std::tuple LUA_NATIVE_DATAFILE_DATADICT_GET_DICT(Any objectData, sol::stack_object key) + static uintptr_t LUA_NATIVE_DATAFILE_DATAARRAY_ADD_DICT(uintptr_t arrayData) { - std::tuple return_values; - std::get<0>(return_values) = DATAFILE::DATADICT_GET_DICT(&objectData, key.is() ? key.as() : nullptr); - std::get<1>(return_values) = objectData; - - return return_values; + auto retval = DATAFILE::DATAARRAY_ADD_DICT((Any*)arrayData); + return (uintptr_t)retval; } - static std::tuple LUA_NATIVE_DATAFILE_DATADICT_GET_ARRAY(Any objectData, sol::stack_object key) + static bool LUA_NATIVE_DATAFILE_DATAARRAY_GET_BOOL(uintptr_t arrayData, int arrayIndex) { - std::tuple return_values; - std::get<0>(return_values) = DATAFILE::DATADICT_GET_ARRAY(&objectData, key.is() ? key.as() : nullptr); - std::get<1>(return_values) = objectData; - - return return_values; + auto retval = (bool)DATAFILE::DATAARRAY_GET_BOOL((Any*)arrayData, arrayIndex); + return retval; } - static std::tuple LUA_NATIVE_DATAFILE_DATADICT_GET_TYPE(Any objectData, sol::stack_object key) + static int LUA_NATIVE_DATAFILE_DATAARRAY_GET_INT(uintptr_t arrayData, int arrayIndex) { - std::tuple return_values; - std::get<0>(return_values) = DATAFILE::DATADICT_GET_TYPE(&objectData, key.is() ? key.as() : nullptr); - std::get<1>(return_values) = objectData; - - return return_values; + auto retval = DATAFILE::DATAARRAY_GET_INT((Any*)arrayData, arrayIndex); + return retval; } - static Any LUA_NATIVE_DATAFILE_DATAARRAY_ADD_BOOL(Any arrayData, bool value) + static float LUA_NATIVE_DATAFILE_DATAARRAY_GET_FLOAT(uintptr_t arrayData, int arrayIndex) { - DATAFILE::DATAARRAY_ADD_BOOL(&arrayData, value); - return arrayData; + auto retval = DATAFILE::DATAARRAY_GET_FLOAT((Any*)arrayData, arrayIndex); + return retval; } - static Any LUA_NATIVE_DATAFILE_DATAARRAY_ADD_INT(Any arrayData, int value) + static const char* LUA_NATIVE_DATAFILE_DATAARRAY_GET_STRING(uintptr_t arrayData, int arrayIndex) { - DATAFILE::DATAARRAY_ADD_INT(&arrayData, value); - return arrayData; + auto retval = DATAFILE::DATAARRAY_GET_STRING((Any*)arrayData, arrayIndex); + return retval; } - static Any LUA_NATIVE_DATAFILE_DATAARRAY_ADD_FLOAT(Any arrayData, float value) + static Vector3 LUA_NATIVE_DATAFILE_DATAARRAY_GET_VECTOR(uintptr_t arrayData, int arrayIndex) { - DATAFILE::DATAARRAY_ADD_FLOAT(&arrayData, value); - return arrayData; + auto retval = DATAFILE::DATAARRAY_GET_VECTOR((Any*)arrayData, arrayIndex); + return retval; } - static Any LUA_NATIVE_DATAFILE_DATAARRAY_ADD_STRING(Any arrayData, sol::stack_object value) + static uintptr_t LUA_NATIVE_DATAFILE_DATAARRAY_GET_DICT(uintptr_t arrayData, int arrayIndex) { - DATAFILE::DATAARRAY_ADD_STRING(&arrayData, value.is() ? value.as() : nullptr); - return arrayData; + auto retval = DATAFILE::DATAARRAY_GET_DICT((Any*)arrayData, arrayIndex); + return (uintptr_t)retval; } - static Any LUA_NATIVE_DATAFILE_DATAARRAY_ADD_VECTOR(Any arrayData, float valueX, float valueY, float valueZ) + static int LUA_NATIVE_DATAFILE_DATAARRAY_GET_COUNT(uintptr_t arrayData) { - DATAFILE::DATAARRAY_ADD_VECTOR(&arrayData, valueX, valueY, valueZ); - return arrayData; + auto retval = DATAFILE::DATAARRAY_GET_COUNT((Any*)arrayData); + return retval; } - static std::tuple LUA_NATIVE_DATAFILE_DATAARRAY_ADD_DICT(Any arrayData) + static int LUA_NATIVE_DATAFILE_DATAARRAY_GET_TYPE(uintptr_t arrayData, int arrayIndex) { - std::tuple return_values; - std::get<0>(return_values) = DATAFILE::DATAARRAY_ADD_DICT(&arrayData); - std::get<1>(return_values) = arrayData; - - return return_values; - } - - static std::tuple LUA_NATIVE_DATAFILE_DATAARRAY_GET_BOOL(Any arrayData, int arrayIndex) - { - std::tuple return_values; - std::get<0>(return_values) = (bool)DATAFILE::DATAARRAY_GET_BOOL(&arrayData, arrayIndex); - std::get<1>(return_values) = arrayData; - - return return_values; - } - - static std::tuple LUA_NATIVE_DATAFILE_DATAARRAY_GET_INT(Any arrayData, int arrayIndex) - { - std::tuple return_values; - std::get<0>(return_values) = DATAFILE::DATAARRAY_GET_INT(&arrayData, arrayIndex); - std::get<1>(return_values) = arrayData; - - return return_values; - } - - static std::tuple LUA_NATIVE_DATAFILE_DATAARRAY_GET_FLOAT(Any arrayData, int arrayIndex) - { - std::tuple return_values; - std::get<0>(return_values) = DATAFILE::DATAARRAY_GET_FLOAT(&arrayData, arrayIndex); - std::get<1>(return_values) = arrayData; - - return return_values; - } - - static std::tuple LUA_NATIVE_DATAFILE_DATAARRAY_GET_STRING(Any arrayData, int arrayIndex) - { - std::tuple return_values; - std::get<0>(return_values) = DATAFILE::DATAARRAY_GET_STRING(&arrayData, arrayIndex); - std::get<1>(return_values) = arrayData; - - return return_values; - } - - static std::tuple LUA_NATIVE_DATAFILE_DATAARRAY_GET_VECTOR(Any arrayData, int arrayIndex) - { - std::tuple return_values; - std::get<0>(return_values) = DATAFILE::DATAARRAY_GET_VECTOR(&arrayData, arrayIndex); - std::get<1>(return_values) = arrayData; - - return return_values; - } - - static std::tuple LUA_NATIVE_DATAFILE_DATAARRAY_GET_DICT(Any arrayData, int arrayIndex) - { - std::tuple return_values; - std::get<0>(return_values) = DATAFILE::DATAARRAY_GET_DICT(&arrayData, arrayIndex); - std::get<1>(return_values) = arrayData; - - return return_values; - } - - static std::tuple LUA_NATIVE_DATAFILE_DATAARRAY_GET_COUNT(Any arrayData) - { - std::tuple return_values; - std::get<0>(return_values) = DATAFILE::DATAARRAY_GET_COUNT(&arrayData); - std::get<1>(return_values) = arrayData; - - return return_values; - } - - static std::tuple LUA_NATIVE_DATAFILE_DATAARRAY_GET_TYPE(Any arrayData, int arrayIndex) - { - std::tuple return_values; - std::get<0>(return_values) = DATAFILE::DATAARRAY_GET_TYPE(&arrayData, arrayIndex); - std::get<1>(return_values) = arrayData; - - return return_values; + auto retval = DATAFILE::DATAARRAY_GET_TYPE((Any*)arrayData, arrayIndex); + return retval; } void init_native_binding_DATAFILE(sol::state& L) diff --git a/src/lua/natives/lua_native_binding_ENTITY.cpp b/src/lua/natives/lua_native_binding_ENTITY.cpp index d259419d..26e4f199 100644 --- a/src/lua/natives/lua_native_binding_ENTITY.cpp +++ b/src/lua/natives/lua_native_binding_ENTITY.cpp @@ -663,14 +663,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_ENTITY_FIND_ANIM_EVENT_PHASE(sol::stack_object animDictionary, sol::stack_object animName, sol::stack_object p2, Any p3, Any p4) + static bool LUA_NATIVE_ENTITY_FIND_ANIM_EVENT_PHASE(sol::stack_object animDictionary, sol::stack_object animName, sol::stack_object p2, uintptr_t p3, uintptr_t p4) { - std::tuple return_values; - std::get<0>(return_values) = (bool)ENTITY::FIND_ANIM_EVENT_PHASE(animDictionary.is() ? animDictionary.as() : nullptr, animName.is() ? animName.as() : nullptr, p2.is() ? p2.as() : nullptr, &p3, &p4); - std::get<1>(return_values) = p3; - std::get<2>(return_values) = p4; - - return return_values; + auto retval = (bool)ENTITY::FIND_ANIM_EVENT_PHASE(animDictionary.is() ? animDictionary.as() : nullptr, animName.is() ? animName.as() : nullptr, p2.is() ? p2.as() : nullptr, (Any*)p3, (Any*)p4); + return retval; } static void LUA_NATIVE_ENTITY_SET_ENTITY_ANIM_CURRENT_TIME(Entity entity, sol::stack_object animDictionary, sol::stack_object animName, float time) diff --git a/src/lua/natives/lua_native_binding_FILES.cpp b/src/lua/natives/lua_native_binding_FILES.cpp index a51cd1a2..116dfeec 100644 --- a/src/lua/natives/lua_native_binding_FILES.cpp +++ b/src/lua/natives/lua_native_binding_FILES.cpp @@ -9,13 +9,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_FILES_GET_TATTOO_SHOP_DLC_ITEM_DATA(int characterType, int decorationIndex, Any outComponent) + static bool LUA_NATIVE_FILES_GET_TATTOO_SHOP_DLC_ITEM_DATA(int characterType, int decorationIndex, uintptr_t outComponent) { - std::tuple return_values; - std::get<0>(return_values) = (bool)FILES::GET_TATTOO_SHOP_DLC_ITEM_DATA(characterType, decorationIndex, &outComponent); - std::get<1>(return_values) = outComponent; - - return return_values; + auto retval = (bool)FILES::GET_TATTOO_SHOP_DLC_ITEM_DATA(characterType, decorationIndex, (Any*)outComponent); + return retval; } static int LUA_NATIVE_FILES_GET_TATTOO_SHOP_DLC_ITEM_INDEX(Hash overlayHash, Any p1, int character) @@ -24,16 +21,14 @@ namespace lua::native return retval; } - static Any LUA_NATIVE_FILES_INIT_SHOP_PED_COMPONENT(Any outComponent) + static void LUA_NATIVE_FILES_INIT_SHOP_PED_COMPONENT(uintptr_t outComponent) { - FILES::INIT_SHOP_PED_COMPONENT(&outComponent); - return outComponent; + FILES::INIT_SHOP_PED_COMPONENT((Any*)outComponent); } - static Any LUA_NATIVE_FILES_INIT_SHOP_PED_PROP(Any outProp) + static void LUA_NATIVE_FILES_INIT_SHOP_PED_PROP(uintptr_t outProp) { - FILES::INIT_SHOP_PED_PROP(&outProp); - return outProp; + FILES::INIT_SHOP_PED_PROP((Any*)outProp); } static int LUA_NATIVE_FILES_SETUP_SHOP_PED_APPAREL_QUERY(int p0, int p1, int p2, int p3) @@ -48,10 +43,9 @@ namespace lua::native return retval; } - static Any LUA_NATIVE_FILES_GET_SHOP_PED_QUERY_COMPONENT(int componentId, Any outComponent) + static void LUA_NATIVE_FILES_GET_SHOP_PED_QUERY_COMPONENT(int componentId, uintptr_t outComponent) { - FILES::GET_SHOP_PED_QUERY_COMPONENT(componentId, &outComponent); - return outComponent; + FILES::GET_SHOP_PED_QUERY_COMPONENT(componentId, (Any*)outComponent); } static int LUA_NATIVE_FILES_GET_SHOP_PED_QUERY_COMPONENT_INDEX(Hash componentHash) @@ -60,16 +54,14 @@ namespace lua::native return retval; } - static Any LUA_NATIVE_FILES_GET_SHOP_PED_COMPONENT(Hash componentHash, Any outComponent) + static void LUA_NATIVE_FILES_GET_SHOP_PED_COMPONENT(Hash componentHash, uintptr_t outComponent) { - FILES::GET_SHOP_PED_COMPONENT(componentHash, &outComponent); - return outComponent; + FILES::GET_SHOP_PED_COMPONENT(componentHash, (Any*)outComponent); } - static Any LUA_NATIVE_FILES_GET_SHOP_PED_QUERY_PROP(int componentId, Any outProp) + static void LUA_NATIVE_FILES_GET_SHOP_PED_QUERY_PROP(int componentId, uintptr_t outProp) { - FILES::GET_SHOP_PED_QUERY_PROP(componentId, &outProp); - return outProp; + FILES::GET_SHOP_PED_QUERY_PROP(componentId, (Any*)outProp); } static int LUA_NATIVE_FILES_GET_SHOP_PED_QUERY_PROP_INDEX(Hash componentHash) @@ -78,10 +70,9 @@ namespace lua::native return retval; } - static Any LUA_NATIVE_FILES_GET_SHOP_PED_PROP(Hash componentHash, Any outProp) + static void LUA_NATIVE_FILES_GET_SHOP_PED_PROP(Hash componentHash, uintptr_t outProp) { - FILES::GET_SHOP_PED_PROP(componentHash, &outProp); - return outProp; + FILES::GET_SHOP_PED_PROP(componentHash, (Any*)outProp); } static Hash LUA_NATIVE_FILES_GET_HASH_NAME_FOR_COMPONENT(Entity entity, int componentId, int drawableVariant, int textureVariant) @@ -188,16 +179,14 @@ namespace lua::native return retval; } - static Any LUA_NATIVE_FILES_GET_SHOP_PED_QUERY_OUTFIT(int outfitIndex, Any outfit) + static void LUA_NATIVE_FILES_GET_SHOP_PED_QUERY_OUTFIT(int outfitIndex, uintptr_t outfit) { - FILES::GET_SHOP_PED_QUERY_OUTFIT(outfitIndex, &outfit); - return outfit; + FILES::GET_SHOP_PED_QUERY_OUTFIT(outfitIndex, (Any*)outfit); } - static Any LUA_NATIVE_FILES_GET_SHOP_PED_OUTFIT(Any p0, Any p1) + static void LUA_NATIVE_FILES_GET_SHOP_PED_OUTFIT(Any p0, uintptr_t p1) { - FILES::GET_SHOP_PED_OUTFIT(p0, &p1); - return p1; + FILES::GET_SHOP_PED_OUTFIT(p0, (Any*)p1); } static int LUA_NATIVE_FILES_GET_SHOP_PED_OUTFIT_LOCATE(Any p0) @@ -206,22 +195,16 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_FILES_GET_SHOP_PED_OUTFIT_PROP_VARIANT(Hash outfitHash, int variantIndex, Any outPropVariant) + static bool LUA_NATIVE_FILES_GET_SHOP_PED_OUTFIT_PROP_VARIANT(Hash outfitHash, int variantIndex, uintptr_t outPropVariant) { - std::tuple return_values; - std::get<0>(return_values) = (bool)FILES::GET_SHOP_PED_OUTFIT_PROP_VARIANT(outfitHash, variantIndex, &outPropVariant); - std::get<1>(return_values) = outPropVariant; - - return return_values; + auto retval = (bool)FILES::GET_SHOP_PED_OUTFIT_PROP_VARIANT(outfitHash, variantIndex, (Any*)outPropVariant); + return retval; } - static std::tuple LUA_NATIVE_FILES_GET_SHOP_PED_OUTFIT_COMPONENT_VARIANT(Hash outfitHash, int variantIndex, Any outComponentVariant) + static bool LUA_NATIVE_FILES_GET_SHOP_PED_OUTFIT_COMPONENT_VARIANT(Hash outfitHash, int variantIndex, uintptr_t outComponentVariant) { - std::tuple return_values; - std::get<0>(return_values) = (bool)FILES::GET_SHOP_PED_OUTFIT_COMPONENT_VARIANT(outfitHash, variantIndex, &outComponentVariant); - std::get<1>(return_values) = outComponentVariant; - - return return_values; + auto retval = (bool)FILES::GET_SHOP_PED_OUTFIT_COMPONENT_VARIANT(outfitHash, variantIndex, (Any*)outComponentVariant); + return retval; } static int LUA_NATIVE_FILES_GET_NUM_DLC_VEHICLES() @@ -236,13 +219,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_FILES_GET_DLC_VEHICLE_DATA(int dlcVehicleIndex, Any outData) + static bool LUA_NATIVE_FILES_GET_DLC_VEHICLE_DATA(int dlcVehicleIndex, uintptr_t outData) { - std::tuple return_values; - std::get<0>(return_values) = (bool)FILES::GET_DLC_VEHICLE_DATA(dlcVehicleIndex, &outData); - std::get<1>(return_values) = outData; - - return return_values; + auto retval = (bool)FILES::GET_DLC_VEHICLE_DATA(dlcVehicleIndex, (Any*)outData); + return retval; } static int LUA_NATIVE_FILES_GET_DLC_VEHICLE_FLAGS(int dlcVehicleIndex) @@ -263,22 +243,16 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_FILES_GET_DLC_WEAPON_DATA(int dlcWeaponIndex, Any outData) + static bool LUA_NATIVE_FILES_GET_DLC_WEAPON_DATA(int dlcWeaponIndex, uintptr_t outData) { - std::tuple return_values; - std::get<0>(return_values) = (bool)FILES::GET_DLC_WEAPON_DATA(dlcWeaponIndex, &outData); - std::get<1>(return_values) = outData; - - return return_values; + auto retval = (bool)FILES::GET_DLC_WEAPON_DATA(dlcWeaponIndex, (Any*)outData); + return retval; } - static std::tuple LUA_NATIVE_FILES_GET_DLC_WEAPON_DATA_SP(int dlcWeaponIndex, Any outData) + static bool LUA_NATIVE_FILES_GET_DLC_WEAPON_DATA_SP(int dlcWeaponIndex, uintptr_t outData) { - std::tuple return_values; - std::get<0>(return_values) = (bool)FILES::GET_DLC_WEAPON_DATA_SP(dlcWeaponIndex, &outData); - std::get<1>(return_values) = outData; - - return return_values; + auto retval = (bool)FILES::GET_DLC_WEAPON_DATA_SP(dlcWeaponIndex, (Any*)outData); + return retval; } static int LUA_NATIVE_FILES_GET_NUM_DLC_WEAPON_COMPONENTS(int dlcWeaponIndex) @@ -293,22 +267,16 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_FILES_GET_DLC_WEAPON_COMPONENT_DATA(int dlcWeaponIndex, int dlcWeapCompIndex, Any ComponentDataPtr) + static bool LUA_NATIVE_FILES_GET_DLC_WEAPON_COMPONENT_DATA(int dlcWeaponIndex, int dlcWeapCompIndex, uintptr_t ComponentDataPtr) { - std::tuple return_values; - std::get<0>(return_values) = (bool)FILES::GET_DLC_WEAPON_COMPONENT_DATA(dlcWeaponIndex, dlcWeapCompIndex, &ComponentDataPtr); - std::get<1>(return_values) = ComponentDataPtr; - - return return_values; + auto retval = (bool)FILES::GET_DLC_WEAPON_COMPONENT_DATA(dlcWeaponIndex, dlcWeapCompIndex, (Any*)ComponentDataPtr); + return retval; } - static std::tuple LUA_NATIVE_FILES_GET_DLC_WEAPON_COMPONENT_DATA_SP(int dlcWeaponIndex, int dlcWeapCompIndex, Any ComponentDataPtr) + static bool LUA_NATIVE_FILES_GET_DLC_WEAPON_COMPONENT_DATA_SP(int dlcWeaponIndex, int dlcWeapCompIndex, uintptr_t ComponentDataPtr) { - std::tuple return_values; - std::get<0>(return_values) = (bool)FILES::GET_DLC_WEAPON_COMPONENT_DATA_SP(dlcWeaponIndex, dlcWeapCompIndex, &ComponentDataPtr); - std::get<1>(return_values) = ComponentDataPtr; - - return return_values; + auto retval = (bool)FILES::GET_DLC_WEAPON_COMPONENT_DATA_SP(dlcWeaponIndex, dlcWeapCompIndex, (Any*)ComponentDataPtr); + return retval; } static bool LUA_NATIVE_FILES_IS_CONTENT_ITEM_LOCKED(Hash itemHash) diff --git a/src/lua/natives/lua_native_binding_GRAPHICS.cpp b/src/lua/natives/lua_native_binding_GRAPHICS.cpp index 9a56e0e6..d91dd76e 100644 --- a/src/lua/natives/lua_native_binding_GRAPHICS.cpp +++ b/src/lua/natives/lua_native_binding_GRAPHICS.cpp @@ -90,22 +90,16 @@ namespace lua::native GRAPHICS::FREE_MEMORY_FOR_MISSION_CREATOR_PHOTO(); } - static std::tuple LUA_NATIVE_GRAPHICS_LOAD_MISSION_CREATOR_PHOTO(Any p0, Any p1, Any p2, Any p3) + static bool LUA_NATIVE_GRAPHICS_LOAD_MISSION_CREATOR_PHOTO(uintptr_t p0, Any p1, Any p2, Any p3) { - std::tuple return_values; - std::get<0>(return_values) = (bool)GRAPHICS::LOAD_MISSION_CREATOR_PHOTO(&p0, p1, p2, p3); - std::get<1>(return_values) = p0; - - return return_values; + auto retval = (bool)GRAPHICS::LOAD_MISSION_CREATOR_PHOTO((Any*)p0, p1, p2, p3); + return retval; } - static std::tuple LUA_NATIVE_GRAPHICS_GET_STATUS_OF_LOAD_MISSION_CREATOR_PHOTO(Any p0) + static int LUA_NATIVE_GRAPHICS_GET_STATUS_OF_LOAD_MISSION_CREATOR_PHOTO(uintptr_t p0) { - std::tuple return_values; - std::get<0>(return_values) = GRAPHICS::GET_STATUS_OF_LOAD_MISSION_CREATOR_PHOTO(&p0); - std::get<1>(return_values) = p0; - - return return_values; + auto retval = GRAPHICS::GET_STATUS_OF_LOAD_MISSION_CREATOR_PHOTO((Any*)p0); + return retval; } static bool LUA_NATIVE_GRAPHICS_BEGIN_CREATE_MISSION_CREATOR_PHOTO_PREVIEW() diff --git a/src/lua/natives/lua_native_binding_HUD.cpp b/src/lua/natives/lua_native_binding_HUD.cpp index 24fd69ec..55d5e677 100644 --- a/src/lua/natives/lua_native_binding_HUD.cpp +++ b/src/lua/natives/lua_native_binding_HUD.cpp @@ -61,15 +61,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_HUD_GET_MOUSE_EVENT(int scaleformHandle, Any p1, Any p2, Any p3) + static bool LUA_NATIVE_HUD_GET_MOUSE_EVENT(int scaleformHandle, uintptr_t p1, uintptr_t p2, uintptr_t p3) { - std::tuple return_values; - std::get<0>(return_values) = (bool)HUD::GET_MOUSE_EVENT(scaleformHandle, &p1, &p2, &p3); - std::get<1>(return_values) = p1; - std::get<2>(return_values) = p2; - std::get<3>(return_values) = p3; - - return return_values; + auto retval = (bool)HUD::GET_MOUSE_EVENT(scaleformHandle, (Any*)p1, (Any*)p2, (Any*)p3); + return retval; } static void LUA_NATIVE_HUD_THEFEED_ONLY_SHOW_TOOLTIPS(bool toggle) @@ -2206,14 +2201,9 @@ namespace lua::native HUD::SET_WARNING_MESSAGE(titleMsg.is() ? titleMsg.as() : nullptr, flags, promptMsg.is() ? promptMsg.as() : nullptr, p3, p4, p5.is() ? p5.as() : nullptr, p6.is() ? p6.as() : nullptr, showBackground, errorCode); } - static std::tuple LUA_NATIVE_HUD_SET_WARNING_MESSAGE_WITH_HEADER(sol::stack_object entryHeader, sol::stack_object entryLine1, int instructionalKey, sol::stack_object entryLine2, bool p4, Any p5, Any showBackground, Any p7, bool p8, Any p9) + static void LUA_NATIVE_HUD_SET_WARNING_MESSAGE_WITH_HEADER(sol::stack_object entryHeader, sol::stack_object entryLine1, int instructionalKey, sol::stack_object entryLine2, bool p4, Any p5, uintptr_t showBackground, uintptr_t p7, bool p8, Any p9) { - std::tuple return_values; - HUD::SET_WARNING_MESSAGE_WITH_HEADER(entryHeader.is() ? entryHeader.as() : nullptr, entryLine1.is() ? entryLine1.as() : nullptr, instructionalKey, entryLine2.is() ? entryLine2.as() : nullptr, p4, p5, &showBackground, &p7, p8, p9); - std::get<0>(return_values) = showBackground; - std::get<1>(return_values) = p7; - - return return_values; + HUD::SET_WARNING_MESSAGE_WITH_HEADER(entryHeader.is() ? entryHeader.as() : nullptr, entryLine1.is() ? entryLine1.as() : nullptr, instructionalKey, entryLine2.is() ? entryLine2.as() : nullptr, p4, p5, (Any*)showBackground, (Any*)p7, p8, p9); } static void LUA_NATIVE_HUD_SET_WARNING_MESSAGE_WITH_HEADER_AND_SUBSTRING_FLAGS(sol::stack_object entryHeader, sol::stack_object entryLine1, int instructionalKey, sol::stack_object entryLine2, bool p4, Any p5, Any additionalIntInfo, sol::stack_object additionalTextInfoLine1, sol::stack_object additionalTextInfoLine2, bool showBackground, int errorCode) @@ -2221,14 +2211,9 @@ namespace lua::native HUD::SET_WARNING_MESSAGE_WITH_HEADER_AND_SUBSTRING_FLAGS(entryHeader.is() ? entryHeader.as() : nullptr, entryLine1.is() ? entryLine1.as() : nullptr, instructionalKey, entryLine2.is() ? entryLine2.as() : nullptr, p4, p5, additionalIntInfo, additionalTextInfoLine1.is() ? additionalTextInfoLine1.as() : nullptr, additionalTextInfoLine2.is() ? additionalTextInfoLine2.as() : nullptr, showBackground, errorCode); } - static std::tuple LUA_NATIVE_HUD_SET_WARNING_MESSAGE_WITH_HEADER_EXTENDED(sol::stack_object entryHeader, sol::stack_object entryLine1, int flags, sol::stack_object entryLine2, bool p4, Any p5, Any p6, Any p7, bool showBg, Any p9, Any p10) + static void LUA_NATIVE_HUD_SET_WARNING_MESSAGE_WITH_HEADER_EXTENDED(sol::stack_object entryHeader, sol::stack_object entryLine1, int flags, sol::stack_object entryLine2, bool p4, Any p5, uintptr_t p6, uintptr_t p7, bool showBg, Any p9, Any p10) { - std::tuple return_values; - HUD::SET_WARNING_MESSAGE_WITH_HEADER_EXTENDED(entryHeader.is() ? entryHeader.as() : nullptr, entryLine1.is() ? entryLine1.as() : nullptr, flags, entryLine2.is() ? entryLine2.as() : nullptr, p4, p5, &p6, &p7, showBg, p9, p10); - std::get<0>(return_values) = p6; - std::get<1>(return_values) = p7; - - return return_values; + HUD::SET_WARNING_MESSAGE_WITH_HEADER_EXTENDED(entryHeader.is() ? entryHeader.as() : nullptr, entryLine1.is() ? entryLine1.as() : nullptr, flags, entryLine2.is() ? entryLine2.as() : nullptr, p4, p5, (Any*)p6, (Any*)p7, showBg, p9, p10); } static void LUA_NATIVE_HUD_SET_WARNING_MESSAGE_WITH_HEADER_AND_SUBSTRING_FLAGS_EXTENDED(sol::stack_object labelTitle, sol::stack_object labelMessage, int p2, int p3, sol::stack_object labelMessage2, bool p5, int p6, int p7, sol::stack_object p8, sol::stack_object p9, bool background, int errorCode) @@ -2449,15 +2434,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_HUD_PAUSE_MENU_GET_MOUSE_CLICK_EVENT(Any p0, Any p1, Any p2) + static bool LUA_NATIVE_HUD_PAUSE_MENU_GET_MOUSE_CLICK_EVENT(uintptr_t p0, uintptr_t p1, uintptr_t p2) { - std::tuple return_values; - std::get<0>(return_values) = (bool)HUD::PAUSE_MENU_GET_MOUSE_CLICK_EVENT(&p0, &p1, &p2); - std::get<1>(return_values) = p0; - std::get<2>(return_values) = p1; - std::get<3>(return_values) = p2; - - return return_values; + auto retval = (bool)HUD::PAUSE_MENU_GET_MOUSE_CLICK_EVENT((Any*)p0, (Any*)p1, (Any*)p2); + return retval; } static void LUA_NATIVE_HUD_PAUSE_MENU_REDRAW_INSTRUCTIONAL_BUTTONS(int p0) @@ -2558,22 +2538,16 @@ namespace lua::native return return_values; } - static std::tuple LUA_NATIVE_HUD_GET_MENU_PED_INT_STAT(Any p0, Any p1) + static bool LUA_NATIVE_HUD_GET_MENU_PED_INT_STAT(Any p0, uintptr_t p1) { - std::tuple return_values; - std::get<0>(return_values) = (bool)HUD::GET_MENU_PED_INT_STAT(p0, &p1); - std::get<1>(return_values) = p1; - - return return_values; + auto retval = (bool)HUD::GET_MENU_PED_INT_STAT(p0, (Any*)p1); + return retval; } - static std::tuple LUA_NATIVE_HUD_GET_CHARACTER_MENU_PED_INT_STAT(Any p0, Any p1, Any p2) + static bool LUA_NATIVE_HUD_GET_CHARACTER_MENU_PED_INT_STAT(Any p0, uintptr_t p1, Any p2) { - std::tuple return_values; - std::get<0>(return_values) = (bool)HUD::GET_CHARACTER_MENU_PED_INT_STAT(p0, &p1, p2); - std::get<1>(return_values) = p1; - - return return_values; + auto retval = (bool)HUD::GET_CHARACTER_MENU_PED_INT_STAT(p0, (Any*)p1, p2); + return retval; } static std::tuple LUA_NATIVE_HUD_GET_MENU_PED_MASKED_INT_STAT(Hash statHash, int outValue, int mask, bool p3) @@ -2585,13 +2559,10 @@ namespace lua::native return return_values; } - static std::tuple LUA_NATIVE_HUD_GET_CHARACTER_MENU_PED_MASKED_INT_STAT(Hash statHash, Any outValue, int p2, int mask, bool p4) + static bool LUA_NATIVE_HUD_GET_CHARACTER_MENU_PED_MASKED_INT_STAT(Hash statHash, uintptr_t outValue, int p2, int mask, bool p4) { - std::tuple return_values; - std::get<0>(return_values) = (bool)HUD::GET_CHARACTER_MENU_PED_MASKED_INT_STAT(statHash, &outValue, p2, mask, p4); - std::get<1>(return_values) = outValue; - - return return_values; + auto retval = (bool)HUD::GET_CHARACTER_MENU_PED_MASKED_INT_STAT(statHash, (Any*)outValue, p2, mask, p4); + return retval; } static std::tuple LUA_NATIVE_HUD_GET_MENU_PED_FLOAT_STAT(Hash statHash, float outValue) diff --git a/src/lua/natives/lua_native_binding_MISC.cpp b/src/lua/natives/lua_native_binding_MISC.cpp index c3c5e927..d654aa64 100644 --- a/src/lua/natives/lua_native_binding_MISC.cpp +++ b/src/lua/natives/lua_native_binding_MISC.cpp @@ -119,14 +119,10 @@ namespace lua::native MISC::INFORM_CODE_OF_CONTENT_ID_OF_CURRENT_UGC_MISSION(p0.is() ? p0.as() : nullptr); } - static std::tuple LUA_NATIVE_MISC_GET_BASE_ELEMENT_LOCATION_FROM_METADATA_BLOCK(Any p0, Any p1, Any p2, bool p3) + static bool LUA_NATIVE_MISC_GET_BASE_ELEMENT_LOCATION_FROM_METADATA_BLOCK(uintptr_t p0, uintptr_t p1, Any p2, bool p3) { - std::tuple return_values; - std::get<0>(return_values) = (bool)MISC::GET_BASE_ELEMENT_LOCATION_FROM_METADATA_BLOCK(&p0, &p1, p2, p3); - std::get<1>(return_values) = p0; - std::get<2>(return_values) = p1; - - return return_values; + auto retval = (bool)MISC::GET_BASE_ELEMENT_LOCATION_FROM_METADATA_BLOCK((Any*)p0, (Any*)p1, p2, p3); + return retval; } static Hash LUA_NATIVE_MISC_GET_PREV_WEATHER_TYPE_HASH_NAME() @@ -1302,10 +1298,9 @@ namespace lua::native MISC::SET_GRAVITY_LEVEL(level); } - static Any LUA_NATIVE_MISC_START_SAVE_DATA(Any p0, Any p1, bool p2) + static void LUA_NATIVE_MISC_START_SAVE_DATA(uintptr_t p0, Any p1, bool p2) { - MISC::START_SAVE_DATA(&p0, p1, p2); - return p0; + MISC::START_SAVE_DATA((Any*)p0, p1, p2); } static void LUA_NATIVE_MISC_STOP_SAVE_DATA() @@ -1319,70 +1314,59 @@ namespace lua::native return retval; } - static Any LUA_NATIVE_MISC_REGISTER_INT_TO_SAVE(Any p0, sol::stack_object name) + static void LUA_NATIVE_MISC_REGISTER_INT_TO_SAVE(uintptr_t p0, sol::stack_object name) { - MISC::REGISTER_INT_TO_SAVE(&p0, name.is() ? name.as() : nullptr); - return p0; + MISC::REGISTER_INT_TO_SAVE((Any*)p0, name.is() ? name.as() : nullptr); } - static Any LUA_NATIVE_MISC_REGISTER_INT64_TO_SAVE(Any p0, sol::stack_object name) + static void LUA_NATIVE_MISC_REGISTER_INT64_TO_SAVE(uintptr_t p0, sol::stack_object name) { - MISC::REGISTER_INT64_TO_SAVE(&p0, name.is() ? name.as() : nullptr); - return p0; + MISC::REGISTER_INT64_TO_SAVE((Any*)p0, name.is() ? name.as() : nullptr); } - static Any LUA_NATIVE_MISC_REGISTER_ENUM_TO_SAVE(Any p0, sol::stack_object name) + static void LUA_NATIVE_MISC_REGISTER_ENUM_TO_SAVE(uintptr_t p0, sol::stack_object name) { - MISC::REGISTER_ENUM_TO_SAVE(&p0, name.is() ? name.as() : nullptr); - return p0; + MISC::REGISTER_ENUM_TO_SAVE((Any*)p0, name.is() ? name.as() : nullptr); } - static Any LUA_NATIVE_MISC_REGISTER_FLOAT_TO_SAVE(Any p0, sol::stack_object name) + static void LUA_NATIVE_MISC_REGISTER_FLOAT_TO_SAVE(uintptr_t p0, sol::stack_object name) { - MISC::REGISTER_FLOAT_TO_SAVE(&p0, name.is() ? name.as() : nullptr); - return p0; + MISC::REGISTER_FLOAT_TO_SAVE((Any*)p0, name.is() ? name.as() : nullptr); } - static Any LUA_NATIVE_MISC_REGISTER_BOOL_TO_SAVE(Any p0, sol::stack_object name) + static void LUA_NATIVE_MISC_REGISTER_BOOL_TO_SAVE(uintptr_t p0, sol::stack_object name) { - MISC::REGISTER_BOOL_TO_SAVE(&p0, name.is() ? name.as() : nullptr); - return p0; + MISC::REGISTER_BOOL_TO_SAVE((Any*)p0, name.is() ? name.as() : nullptr); } - static Any LUA_NATIVE_MISC_REGISTER_TEXT_LABEL_TO_SAVE(Any p0, sol::stack_object name) + static void LUA_NATIVE_MISC_REGISTER_TEXT_LABEL_TO_SAVE(uintptr_t p0, sol::stack_object name) { - MISC::REGISTER_TEXT_LABEL_TO_SAVE(&p0, name.is() ? name.as() : nullptr); - return p0; + MISC::REGISTER_TEXT_LABEL_TO_SAVE((Any*)p0, name.is() ? name.as() : nullptr); } - static Any LUA_NATIVE_MISC_REGISTER_TEXT_LABEL_15_TO_SAVE(Any p0, sol::stack_object name) + static void LUA_NATIVE_MISC_REGISTER_TEXT_LABEL_15_TO_SAVE(uintptr_t p0, sol::stack_object name) { - MISC::REGISTER_TEXT_LABEL_15_TO_SAVE(&p0, name.is() ? name.as() : nullptr); - return p0; + MISC::REGISTER_TEXT_LABEL_15_TO_SAVE((Any*)p0, name.is() ? name.as() : nullptr); } - static Any LUA_NATIVE_MISC_REGISTER_TEXT_LABEL_23_TO_SAVE(Any p0, sol::stack_object name) + static void LUA_NATIVE_MISC_REGISTER_TEXT_LABEL_23_TO_SAVE(uintptr_t p0, sol::stack_object name) { - MISC::REGISTER_TEXT_LABEL_23_TO_SAVE(&p0, name.is() ? name.as() : nullptr); - return p0; + MISC::REGISTER_TEXT_LABEL_23_TO_SAVE((Any*)p0, name.is() ? name.as() : nullptr); } - static Any LUA_NATIVE_MISC_REGISTER_TEXT_LABEL_31_TO_SAVE(Any p0, sol::stack_object name) + static void LUA_NATIVE_MISC_REGISTER_TEXT_LABEL_31_TO_SAVE(uintptr_t p0, sol::stack_object name) { - MISC::REGISTER_TEXT_LABEL_31_TO_SAVE(&p0, name.is() ? name.as() : nullptr); - return p0; + MISC::REGISTER_TEXT_LABEL_31_TO_SAVE((Any*)p0, name.is() ? name.as() : nullptr); } - static Any LUA_NATIVE_MISC_REGISTER_TEXT_LABEL_63_TO_SAVE(Any p0, sol::stack_object name) + static void LUA_NATIVE_MISC_REGISTER_TEXT_LABEL_63_TO_SAVE(uintptr_t p0, sol::stack_object name) { - MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(&p0, name.is() ? name.as() : nullptr); - return p0; + MISC::REGISTER_TEXT_LABEL_63_TO_SAVE((Any*)p0, name.is() ? name.as() : nullptr); } - static Any LUA_NATIVE_MISC_START_SAVE_STRUCT_WITH_SIZE(Any p0, int size, sol::stack_object structName) + static void LUA_NATIVE_MISC_START_SAVE_STRUCT_WITH_SIZE(uintptr_t p0, int size, sol::stack_object structName) { - MISC::START_SAVE_STRUCT_WITH_SIZE(&p0, size, structName.is() ? structName.as() : nullptr); - return p0; + MISC::START_SAVE_STRUCT_WITH_SIZE((Any*)p0, size, structName.is() ? structName.as() : nullptr); } static void LUA_NATIVE_MISC_STOP_SAVE_STRUCT() @@ -1390,10 +1374,9 @@ namespace lua::native MISC::STOP_SAVE_STRUCT(); } - static Any LUA_NATIVE_MISC_START_SAVE_ARRAY_WITH_SIZE(Any p0, int size, sol::stack_object arrayName) + static void LUA_NATIVE_MISC_START_SAVE_ARRAY_WITH_SIZE(uintptr_t p0, int size, sol::stack_object arrayName) { - MISC::START_SAVE_ARRAY_WITH_SIZE(&p0, size, arrayName.is() ? arrayName.as() : nullptr); - return p0; + MISC::START_SAVE_ARRAY_WITH_SIZE((Any*)p0, size, arrayName.is() ? arrayName.as() : nullptr); } static void LUA_NATIVE_MISC_STOP_SAVE_ARRAY() @@ -1401,14 +1384,9 @@ namespace lua::native MISC::STOP_SAVE_ARRAY(); } - static std::tuple LUA_NATIVE_MISC_COPY_SCRIPT_STRUCT(Any dst, Any src, int size) + static void LUA_NATIVE_MISC_COPY_SCRIPT_STRUCT(uintptr_t dst, uintptr_t src, int size) { - std::tuple return_values; - MISC::COPY_SCRIPT_STRUCT(&dst, &src, size); - std::get<0>(return_values) = dst; - std::get<1>(return_values) = src; - - return return_values; + MISC::COPY_SCRIPT_STRUCT((Any*)dst, (Any*)src, size); } static void LUA_NATIVE_MISC_ENABLE_DISPATCH_SERVICE(int dispatchService, bool toggle) @@ -1641,10 +1619,9 @@ namespace lua::native MISC::SET_RIOT_MODE_ENABLED(toggle); } - static Any LUA_NATIVE_MISC_DISPLAY_ONSCREEN_KEYBOARD_WITH_LONGER_INITIAL_STRING(int p0, sol::stack_object windowTitle, Any p2, sol::stack_object defaultText, sol::stack_object defaultConcat1, sol::stack_object defaultConcat2, sol::stack_object defaultConcat3, sol::stack_object defaultConcat4, sol::stack_object defaultConcat5, sol::stack_object defaultConcat6, sol::stack_object defaultConcat7, int maxInputLength) + static void LUA_NATIVE_MISC_DISPLAY_ONSCREEN_KEYBOARD_WITH_LONGER_INITIAL_STRING(int p0, sol::stack_object windowTitle, uintptr_t p2, sol::stack_object defaultText, sol::stack_object defaultConcat1, sol::stack_object defaultConcat2, sol::stack_object defaultConcat3, sol::stack_object defaultConcat4, sol::stack_object defaultConcat5, sol::stack_object defaultConcat6, sol::stack_object defaultConcat7, int maxInputLength) { - MISC::DISPLAY_ONSCREEN_KEYBOARD_WITH_LONGER_INITIAL_STRING(p0, windowTitle.is() ? windowTitle.as() : nullptr, &p2, defaultText.is() ? defaultText.as() : nullptr, defaultConcat1.is() ? defaultConcat1.as() : nullptr, defaultConcat2.is() ? defaultConcat2.as() : nullptr, defaultConcat3.is() ? defaultConcat3.as() : nullptr, defaultConcat4.is() ? defaultConcat4.as() : nullptr, defaultConcat5.is() ? defaultConcat5.as() : nullptr, defaultConcat6.is() ? defaultConcat6.as() : nullptr, defaultConcat7.is() ? defaultConcat7.as() : nullptr, maxInputLength); - return p2; + MISC::DISPLAY_ONSCREEN_KEYBOARD_WITH_LONGER_INITIAL_STRING(p0, windowTitle.is() ? windowTitle.as() : nullptr, (Any*)p2, defaultText.is() ? defaultText.as() : nullptr, defaultConcat1.is() ? defaultConcat1.as() : nullptr, defaultConcat2.is() ? defaultConcat2.as() : nullptr, defaultConcat3.is() ? defaultConcat3.as() : nullptr, defaultConcat4.is() ? defaultConcat4.as() : nullptr, defaultConcat5.is() ? defaultConcat5.as() : nullptr, defaultConcat6.is() ? defaultConcat6.as() : nullptr, defaultConcat7.is() ? defaultConcat7.as() : nullptr, maxInputLength); } static void LUA_NATIVE_MISC_DISPLAY_ONSCREEN_KEYBOARD(int p0, sol::stack_object windowTitle, sol::stack_object p2, sol::stack_object defaultText, sol::stack_object defaultConcat1, sol::stack_object defaultConcat2, sol::stack_object defaultConcat3, int maxInputLength) diff --git a/src/lua/natives/lua_native_binding_MONEY.cpp b/src/lua/natives/lua_native_binding_MONEY.cpp index 50657299..03db045a 100644 --- a/src/lua/natives/lua_native_binding_MONEY.cpp +++ b/src/lua/natives/lua_native_binding_MONEY.cpp @@ -29,16 +29,14 @@ namespace lua::native MONEY::NETWORK_CLEAR_CHARACTER_WALLET(characterSlot); } - static Any LUA_NATIVE_MONEY_NETWORK_GIVE_PLAYER_JOBSHARE_CASH(int amount, Any gamerHandle) + static void LUA_NATIVE_MONEY_NETWORK_GIVE_PLAYER_JOBSHARE_CASH(int amount, uintptr_t gamerHandle) { - MONEY::NETWORK_GIVE_PLAYER_JOBSHARE_CASH(amount, &gamerHandle); - return gamerHandle; + MONEY::NETWORK_GIVE_PLAYER_JOBSHARE_CASH(amount, (Any*)gamerHandle); } - static Any LUA_NATIVE_MONEY_NETWORK_RECEIVE_PLAYER_JOBSHARE_CASH(int value, Any gamerHandle) + static void LUA_NATIVE_MONEY_NETWORK_RECEIVE_PLAYER_JOBSHARE_CASH(int value, uintptr_t gamerHandle) { - MONEY::NETWORK_RECEIVE_PLAYER_JOBSHARE_CASH(value, &gamerHandle); - return gamerHandle; + MONEY::NETWORK_RECEIVE_PLAYER_JOBSHARE_CASH(value, (Any*)gamerHandle); } static bool LUA_NATIVE_MONEY_NETWORK_CAN_SHARE_JOB_CASH() @@ -174,20 +172,14 @@ namespace lua::native MONEY::NETWORK_EARN_FROM_BEND_JOB(amount, heistHash.is() ? heistHash.as() : nullptr); } - static Any LUA_NATIVE_MONEY_NETWORK_EARN_FROM_CHALLENGE_WIN(Any p0, Any p1, bool p2) + static void LUA_NATIVE_MONEY_NETWORK_EARN_FROM_CHALLENGE_WIN(Any p0, uintptr_t p1, bool p2) { - MONEY::NETWORK_EARN_FROM_CHALLENGE_WIN(p0, &p1, p2); - return p1; + MONEY::NETWORK_EARN_FROM_CHALLENGE_WIN(p0, (Any*)p1, p2); } - static std::tuple LUA_NATIVE_MONEY_NETWORK_EARN_FROM_BOUNTY(int amount, Any gamerHandle, Any p2, Any p3) + static void LUA_NATIVE_MONEY_NETWORK_EARN_FROM_BOUNTY(int amount, uintptr_t gamerHandle, uintptr_t p2, Any p3) { - std::tuple return_values; - MONEY::NETWORK_EARN_FROM_BOUNTY(amount, &gamerHandle, &p2, p3); - std::get<0>(return_values) = gamerHandle; - std::get<1>(return_values) = p2; - - return return_values; + MONEY::NETWORK_EARN_FROM_BOUNTY(amount, (Any*)gamerHandle, (Any*)p2, p3); } static void LUA_NATIVE_MONEY_NETWORK_EARN_FROM_IMPORT_EXPORT(int amount, Hash modelHash) @@ -230,20 +222,14 @@ namespace lua::native MONEY::NETWORK_EARN_FROM_DAILY_OBJECTIVES(amount, type.is() ? type.as() : nullptr, characterSlot); } - static Any LUA_NATIVE_MONEY_NETWORK_EARN_FROM_AMBIENT_JOB(int p0, sol::stack_object p1, Any p2) + static void LUA_NATIVE_MONEY_NETWORK_EARN_FROM_AMBIENT_JOB(int p0, sol::stack_object p1, uintptr_t p2) { - MONEY::NETWORK_EARN_FROM_AMBIENT_JOB(p0, p1.is() ? p1.as() : nullptr, &p2); - return p2; + MONEY::NETWORK_EARN_FROM_AMBIENT_JOB(p0, p1.is() ? p1.as() : nullptr, (Any*)p2); } - static std::tuple LUA_NATIVE_MONEY_NETWORK_EARN_FROM_JOB_BONUS(Any p0, Any p1, Any p2) + static void LUA_NATIVE_MONEY_NETWORK_EARN_FROM_JOB_BONUS(Any p0, uintptr_t p1, uintptr_t p2) { - std::tuple return_values; - MONEY::NETWORK_EARN_FROM_JOB_BONUS(p0, &p1, &p2); - std::get<0>(return_values) = p1; - std::get<1>(return_values) = p2; - - return return_values; + MONEY::NETWORK_EARN_FROM_JOB_BONUS(p0, (Any*)p1, (Any*)p2); } static void LUA_NATIVE_MONEY_NETWORK_EARN_FROM_CRIMINAL_MASTERMIND(Any p0, Any p1, Any p2) @@ -362,13 +348,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_MONEY_NETWORK_CAN_SPEND_MONEY2(Any p0, bool p1, bool p2, bool p3, Any p4, Any p5, Any p6) + static bool LUA_NATIVE_MONEY_NETWORK_CAN_SPEND_MONEY2(Any p0, bool p1, bool p2, bool p3, uintptr_t p4, Any p5, Any p6) { - std::tuple return_values; - std::get<0>(return_values) = (bool)MONEY::NETWORK_CAN_SPEND_MONEY2(p0, p1, p2, p3, &p4, p5, p6); - std::get<1>(return_values) = p4; - - return return_values; + auto retval = (bool)MONEY::NETWORK_CAN_SPEND_MONEY2(p0, p1, p2, p3, (Any*)p4, p5, p6); + return retval; } static void LUA_NATIVE_MONEY_NETWORK_BUY_ITEM(int amount, Hash item, Any p2, Any p3, bool p4, sol::stack_object item_name, Any p6, Any p7, Any p8, bool p9) @@ -481,10 +464,9 @@ namespace lua::native MONEY::NETWORK_SPENT_HIRE_MERCENARY(p0, p1, p2, p3); } - static Any LUA_NATIVE_MONEY_NETWORK_SPENT_BUY_WANTEDLEVEL(Any p0, Any p1, bool p2, bool p3, Any p4) + static void LUA_NATIVE_MONEY_NETWORK_SPENT_BUY_WANTEDLEVEL(Any p0, uintptr_t p1, bool p2, bool p3, Any p4) { - MONEY::NETWORK_SPENT_BUY_WANTEDLEVEL(p0, &p1, p2, p3, p4); - return p1; + MONEY::NETWORK_SPENT_BUY_WANTEDLEVEL(p0, (Any*)p1, p2, p3, p4); } static void LUA_NATIVE_MONEY_NETWORK_SPENT_BUY_OFFTHERADAR(Any p0, bool p1, bool p2, Any p3) @@ -537,16 +519,14 @@ namespace lua::native MONEY::NETWORK_SPENT_ARREST_BAIL(p0, p1, p2); } - static Any LUA_NATIVE_MONEY_NETWORK_SPENT_PAY_VEHICLE_INSURANCE_PREMIUM(int amount, Hash vehicleModel, Any gamerHandle, bool notBankrupt, bool hasTheMoney) + static void LUA_NATIVE_MONEY_NETWORK_SPENT_PAY_VEHICLE_INSURANCE_PREMIUM(int amount, Hash vehicleModel, uintptr_t gamerHandle, bool notBankrupt, bool hasTheMoney) { - MONEY::NETWORK_SPENT_PAY_VEHICLE_INSURANCE_PREMIUM(amount, vehicleModel, &gamerHandle, notBankrupt, hasTheMoney); - return gamerHandle; + MONEY::NETWORK_SPENT_PAY_VEHICLE_INSURANCE_PREMIUM(amount, vehicleModel, (Any*)gamerHandle, notBankrupt, hasTheMoney); } - static Any LUA_NATIVE_MONEY_NETWORK_SPENT_CALL_PLAYER(Any p0, Any p1, bool p2, bool p3) + static void LUA_NATIVE_MONEY_NETWORK_SPENT_CALL_PLAYER(Any p0, uintptr_t p1, bool p2, bool p3) { - MONEY::NETWORK_SPENT_CALL_PLAYER(p0, &p1, p2, p3); - return p1; + MONEY::NETWORK_SPENT_CALL_PLAYER(p0, (Any*)p1, p2, p3); } static void LUA_NATIVE_MONEY_NETWORK_SPENT_BOUNTY(Any p0, bool p1, bool p2) @@ -702,10 +682,9 @@ namespace lua::native MONEY::NETWORK_SPENT_UPGRADE_WAREHOUSE_PROPERTY(p0, p1, p2, p3); } - static Any LUA_NATIVE_MONEY_NETWORK_SPENT_PURCHASE_IMPEXP_WAREHOUSE_PROPERTY(int amount, Any data, bool p2, bool p3) + static void LUA_NATIVE_MONEY_NETWORK_SPENT_PURCHASE_IMPEXP_WAREHOUSE_PROPERTY(int amount, uintptr_t data, bool p2, bool p3) { - MONEY::NETWORK_SPENT_PURCHASE_IMPEXP_WAREHOUSE_PROPERTY(amount, &data, p2, p3); - return data; + MONEY::NETWORK_SPENT_PURCHASE_IMPEXP_WAREHOUSE_PROPERTY(amount, (Any*)data, p2, p3); } static void LUA_NATIVE_MONEY_NETWORK_SPENT_UPGRADE_IMPEXP_WAREHOUSE_PROPERTY(Any p0, Any p1, Any p2, Any p3) @@ -1128,16 +1107,14 @@ namespace lua::native MONEY::NETWORK_SPEND_CASINO_MEMBERSHIP(amount, p1, p2, p3); } - static Any LUA_NATIVE_MONEY_NETWORK_SPEND_BUY_CASINO(int amount, bool p1, bool p2, Any data) + static void LUA_NATIVE_MONEY_NETWORK_SPEND_BUY_CASINO(int amount, bool p1, bool p2, uintptr_t data) { - MONEY::NETWORK_SPEND_BUY_CASINO(amount, p1, p2, &data); - return data; + MONEY::NETWORK_SPEND_BUY_CASINO(amount, p1, p2, (Any*)data); } - static Any LUA_NATIVE_MONEY_NETWORK_SPEND_UPGRADE_CASINO(int amount, bool p1, bool p2, Any data) + static void LUA_NATIVE_MONEY_NETWORK_SPEND_UPGRADE_CASINO(int amount, bool p1, bool p2, uintptr_t data) { - MONEY::NETWORK_SPEND_UPGRADE_CASINO(amount, p1, p2, &data); - return data; + MONEY::NETWORK_SPEND_UPGRADE_CASINO(amount, p1, p2, (Any*)data); } static void LUA_NATIVE_MONEY_NETWORK_SPEND_CASINO_GENERIC(int amount, Any p1, Any p2, Any p3, Any p4) @@ -1510,10 +1487,9 @@ namespace lua::native MONEY::NETWORK_EARN_UPGRADE_AGENCY(p0, p1); } - static Any LUA_NATIVE_MONEY_NETWORK_SPEND_APARTMENT_UTILITIES(int amount, bool p1, bool p2, Any data) + static void LUA_NATIVE_MONEY_NETWORK_SPEND_APARTMENT_UTILITIES(int amount, bool p1, bool p2, uintptr_t data) { - MONEY::NETWORK_SPEND_APARTMENT_UTILITIES(amount, p1, p2, &data); - return data; + MONEY::NETWORK_SPEND_APARTMENT_UTILITIES(amount, p1, p2, (Any*)data); } static void LUA_NATIVE_MONEY_NETWORK_SPEND_BUSINESS_PROPERTY_FEES(Any p0, Any p1, Any p2, Any p3) @@ -1721,16 +1697,14 @@ namespace lua::native MONEY::_NETWORK_SPENT_MISSILE_JAMMER(amount, fromBank, fromBankAndWallet, p3); } - static Any LUA_NATIVE_MONEY_NETWORK_SPENT_GENERIC_(int price, bool p1, bool p2, Hash stat, Hash spent, sol::stack_object p5, sol::stack_object p6, Any data) + static void LUA_NATIVE_MONEY_NETWORK_SPENT_GENERIC_(int price, bool p1, bool p2, Hash stat, Hash spent, sol::stack_object p5, sol::stack_object p6, uintptr_t data) { - MONEY::_NETWORK_SPENT_GENERIC(price, p1, p2, stat, spent, p5.is() ? p5.as() : nullptr, p6.is() ? p6.as() : nullptr, &data); - return data; + MONEY::_NETWORK_SPENT_GENERIC(price, p1, p2, stat, spent, p5.is() ? p5.as() : nullptr, p6.is() ? p6.as() : nullptr, (Any*)data); } - static Any LUA_NATIVE_MONEY_NETWORK_EARN_GENERIC_(int amount, Hash earn, sol::stack_object p2, sol::stack_object p3, Any data) + static void LUA_NATIVE_MONEY_NETWORK_EARN_GENERIC_(int amount, Hash earn, sol::stack_object p2, sol::stack_object p3, uintptr_t data) { - MONEY::_NETWORK_EARN_GENERIC(amount, earn, p2.is() ? p2.as() : nullptr, p3.is() ? p3.as() : nullptr, &data); - return data; + MONEY::_NETWORK_EARN_GENERIC(amount, earn, p2.is() ? p2.as() : nullptr, p3.is() ? p3.as() : nullptr, (Any*)data); } static void LUA_NATIVE_MONEY_NETWORK_CLEAR_TRANSACTION_TELEMETRY_NONCE_() diff --git a/src/lua/natives/lua_native_binding_NETSHOPPING.cpp b/src/lua/natives/lua_native_binding_NETSHOPPING.cpp index 54444df4..8c74ed55 100644 --- a/src/lua/natives/lua_native_binding_NETSHOPPING.cpp +++ b/src/lua/natives/lua_native_binding_NETSHOPPING.cpp @@ -172,13 +172,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETSHOPPING_NET_GAMESERVER_BASKET_ADD_ITEM(Any itemData, int quantity) + static bool LUA_NATIVE_NETSHOPPING_NET_GAMESERVER_BASKET_ADD_ITEM(uintptr_t itemData, int quantity) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETSHOPPING::NET_GAMESERVER_BASKET_ADD_ITEM(&itemData, quantity); - std::get<1>(return_values) = itemData; - - return return_values; + auto retval = (bool)NETSHOPPING::NET_GAMESERVER_BASKET_ADD_ITEM((Any*)itemData, quantity); + return retval; } static bool LUA_NATIVE_NETSHOPPING_NET_GAMESERVER_BASKET_IS_FULL() @@ -187,13 +184,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETSHOPPING_NET_GAMESERVER_BASKET_APPLY_SERVER_DATA(Any p0, Any p1) + static bool LUA_NATIVE_NETSHOPPING_NET_GAMESERVER_BASKET_APPLY_SERVER_DATA(Any p0, uintptr_t p1) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETSHOPPING::NET_GAMESERVER_BASKET_APPLY_SERVER_DATA(p0, &p1); - std::get<1>(return_values) = p1; - - return return_values; + auto retval = (bool)NETSHOPPING::NET_GAMESERVER_BASKET_APPLY_SERVER_DATA(p0, (Any*)p1); + return retval; } static bool LUA_NATIVE_NETSHOPPING_NET_GAMESERVER_CHECKOUT_START(int transactionId) diff --git a/src/lua/natives/lua_native_binding_NETWORK.cpp b/src/lua/natives/lua_native_binding_NETWORK.cpp index a4288770..1054039b 100644 --- a/src/lua/natives/lua_native_binding_NETWORK.cpp +++ b/src/lua/natives/lua_native_binding_NETWORK.cpp @@ -532,13 +532,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_GET_FOUND_GAMER(Any p0, Any p1) + static bool LUA_NATIVE_NETWORK_NETWORK_GET_FOUND_GAMER(uintptr_t p0, Any p1) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_GET_FOUND_GAMER(&p0, p1); - std::get<1>(return_values) = p0; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_GET_FOUND_GAMER((Any*)p0, p1); + return retval; } static void LUA_NATIVE_NETWORK_NETWORK_CLEAR_FOUND_GAMERS() @@ -546,13 +543,10 @@ namespace lua::native NETWORK::NETWORK_CLEAR_FOUND_GAMERS(); } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_QUEUE_GAMER_FOR_STATUS(Any p0) + static bool LUA_NATIVE_NETWORK_NETWORK_QUEUE_GAMER_FOR_STATUS(uintptr_t p0) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_QUEUE_GAMER_FOR_STATUS(&p0); - std::get<1>(return_values) = p0; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_QUEUE_GAMER_FOR_STATUS((Any*)p0); + return retval; } static bool LUA_NATIVE_NETWORK_NETWORK_GET_GAMER_STATUS_FROM_QUEUE() @@ -573,13 +567,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_GET_GAMER_STATUS_RESULT(Any p0, Any p1) + static bool LUA_NATIVE_NETWORK_NETWORK_GET_GAMER_STATUS_RESULT(uintptr_t p0, Any p1) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_GET_GAMER_STATUS_RESULT(&p0, p1); - std::get<1>(return_values) = p0; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_GET_GAMER_STATUS_RESULT((Any*)p0, p1); + return retval; } static void LUA_NATIVE_NETWORK_NETWORK_CLEAR_GET_GAMER_STATUS() @@ -626,10 +617,9 @@ namespace lua::native return retval; } - static Any LUA_NATIVE_NETWORK_NETWORK_SESSION_GET_INVITER(Any gamerHandle) + static void LUA_NATIVE_NETWORK_NETWORK_SESSION_GET_INVITER(uintptr_t gamerHandle) { - NETWORK::NETWORK_SESSION_GET_INVITER(&gamerHandle); - return gamerHandle; + NETWORK::NETWORK_SESSION_GET_INVITER((Any*)gamerHandle); } static bool LUA_NATIVE_NETWORK_NETWORK_SESSION_IS_AWAITING_INVITE_RESPONSE() @@ -787,10 +777,9 @@ namespace lua::native return retval; } - static Any LUA_NATIVE_NETWORK_NETWORK_SESSION_VOICE_CONNECT_TO_PLAYER(Any gamerHandle) + static void LUA_NATIVE_NETWORK_NETWORK_SESSION_VOICE_CONNECT_TO_PLAYER(uintptr_t gamerHandle) { - NETWORK::NETWORK_SESSION_VOICE_CONNECT_TO_PLAYER(&gamerHandle); - return gamerHandle; + NETWORK::NETWORK_SESSION_VOICE_CONNECT_TO_PLAYER((Any*)gamerHandle); } static void LUA_NATIVE_NETWORK_NETWORK_SESSION_VOICE_RESPOND_TO_REQUEST(bool p0, int p1) @@ -821,13 +810,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_SEND_TEXT_MESSAGE(sol::stack_object message, Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_SEND_TEXT_MESSAGE(sol::stack_object message, uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_SEND_TEXT_MESSAGE(message.is() ? message.as() : nullptr, &gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_SEND_TEXT_MESSAGE(message.is() ? message.as() : nullptr, (Any*)gamerHandle); + return retval; } static void LUA_NATIVE_NETWORK_NETWORK_SET_ACTIVITY_SPECTATOR(bool toggle) @@ -857,13 +843,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_IS_ACTIVITY_SPECTATOR_FROM_HANDLE(Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_IS_ACTIVITY_SPECTATOR_FROM_HANDLE(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_IS_ACTIVITY_SPECTATOR_FROM_HANDLE(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_IS_ACTIVITY_SPECTATOR_FROM_HANDLE((Any*)gamerHandle); + return retval; } static bool LUA_NATIVE_NETWORK_NETWORK_HOST_TRANSITION(int p0, int p1, int p2, int p3, Any p4, bool p5, bool p6, int p7, Any p8, int p9) @@ -884,13 +867,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_DO_TRANSITION_QUICKMATCH_WITH_GROUP(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6, Any p7) + static bool LUA_NATIVE_NETWORK_NETWORK_DO_TRANSITION_QUICKMATCH_WITH_GROUP(Any p0, Any p1, Any p2, Any p3, uintptr_t p4, Any p5, Any p6, Any p7) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_DO_TRANSITION_QUICKMATCH_WITH_GROUP(p0, p1, p2, p3, &p4, p5, p6, p7); - std::get<1>(return_values) = p4; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_DO_TRANSITION_QUICKMATCH_WITH_GROUP(p0, p1, p2, p3, (Any*)p4, p5, p6, p7); + return retval; } static bool LUA_NATIVE_NETWORK_NETWORK_JOIN_GROUP_ACTIVITY() @@ -954,10 +934,9 @@ namespace lua::native NETWORK::NETWORK_SET_IN_PROGRESS_FINISH_TIME(p0); } - static Any LUA_NATIVE_NETWORK_NETWORK_SET_TRANSITION_CREATOR_HANDLE(Any p0) + static void LUA_NATIVE_NETWORK_NETWORK_SET_TRANSITION_CREATOR_HANDLE(uintptr_t p0) { - NETWORK::NETWORK_SET_TRANSITION_CREATOR_HANDLE(&p0); - return p0; + NETWORK::NETWORK_SET_TRANSITION_CREATOR_HANDLE((Any*)p0); } static void LUA_NATIVE_NETWORK_NETWORK_CLEAR_TRANSITION_CREATOR_HANDLE() @@ -965,19 +944,15 @@ namespace lua::native NETWORK::NETWORK_CLEAR_TRANSITION_CREATOR_HANDLE(); } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_INVITE_GAMERS_TO_TRANSITION(Any p0, Any p1) + static bool LUA_NATIVE_NETWORK_NETWORK_INVITE_GAMERS_TO_TRANSITION(uintptr_t p0, Any p1) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_INVITE_GAMERS_TO_TRANSITION(&p0, p1); - std::get<1>(return_values) = p0; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_INVITE_GAMERS_TO_TRANSITION((Any*)p0, p1); + return retval; } - static Any LUA_NATIVE_NETWORK_NETWORK_SET_GAMER_INVITED_TO_TRANSITION(Any gamerHandle) + static void LUA_NATIVE_NETWORK_NETWORK_SET_GAMER_INVITED_TO_TRANSITION(uintptr_t gamerHandle) { - NETWORK::NETWORK_SET_GAMER_INVITED_TO_TRANSITION(&gamerHandle); - return gamerHandle; + NETWORK::NETWORK_SET_GAMER_INVITED_TO_TRANSITION((Any*)gamerHandle); } static bool LUA_NATIVE_NETWORK_NETWORK_LEAVE_TRANSITION() @@ -1019,22 +994,16 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_DO_TRANSITION_TO_FREEMODE(Any p0, Any p1, bool p2, int players, bool p4) + static bool LUA_NATIVE_NETWORK_NETWORK_DO_TRANSITION_TO_FREEMODE(uintptr_t p0, Any p1, bool p2, int players, bool p4) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_DO_TRANSITION_TO_FREEMODE(&p0, p1, p2, players, p4); - std::get<1>(return_values) = p0; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_DO_TRANSITION_TO_FREEMODE((Any*)p0, p1, p2, players, p4); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_DO_TRANSITION_TO_NEW_FREEMODE(Any p0, Any p1, int players, bool p3, bool p4, bool p5) + static bool LUA_NATIVE_NETWORK_NETWORK_DO_TRANSITION_TO_NEW_FREEMODE(uintptr_t p0, Any p1, int players, bool p3, bool p4, bool p5) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_DO_TRANSITION_TO_NEW_FREEMODE(&p0, p1, players, p3, p4, p5); - std::get<1>(return_values) = p0; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_DO_TRANSITION_TO_NEW_FREEMODE((Any*)p0, p1, players, p3, p4, p5); + return retval; } static bool LUA_NATIVE_NETWORK_NETWORK_IS_TRANSITION_TO_GAME() @@ -1043,13 +1012,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_GET_TRANSITION_MEMBERS(Any data, int dataCount) + static int LUA_NATIVE_NETWORK_NETWORK_GET_TRANSITION_MEMBERS(uintptr_t data, int dataCount) { - std::tuple return_values; - std::get<0>(return_values) = NETWORK::NETWORK_GET_TRANSITION_MEMBERS(&data, dataCount); - std::get<1>(return_values) = data; - - return return_values; + auto retval = NETWORK::NETWORK_GET_TRANSITION_MEMBERS((Any*)data, dataCount); + return retval; } static void LUA_NATIVE_NETWORK_NETWORK_APPLY_TRANSITION_PARAMETER(int p0, int p1) @@ -1062,22 +1028,16 @@ namespace lua::native NETWORK::NETWORK_APPLY_TRANSITION_PARAMETER_STRING(p0, string.is() ? string.as() : nullptr, p2); } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_SEND_TRANSITION_GAMER_INSTRUCTION(Any gamerHandle, sol::stack_object p1, int p2, int p3, bool p4) + static bool LUA_NATIVE_NETWORK_NETWORK_SEND_TRANSITION_GAMER_INSTRUCTION(uintptr_t gamerHandle, sol::stack_object p1, int p2, int p3, bool p4) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_SEND_TRANSITION_GAMER_INSTRUCTION(&gamerHandle, p1.is() ? p1.as() : nullptr, p2, p3, p4); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_SEND_TRANSITION_GAMER_INSTRUCTION((Any*)gamerHandle, p1.is() ? p1.as() : nullptr, p2, p3, p4); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_MARK_TRANSITION_GAMER_AS_FULLY_JOINED(Any p0) + static bool LUA_NATIVE_NETWORK_NETWORK_MARK_TRANSITION_GAMER_AS_FULLY_JOINED(uintptr_t p0) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_MARK_TRANSITION_GAMER_AS_FULLY_JOINED(&p0); - std::get<1>(return_values) = p0; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_MARK_TRANSITION_GAMER_AS_FULLY_JOINED((Any*)p0); + return retval; } static bool LUA_NATIVE_NETWORK_NETWORK_IS_TRANSITION_HOST() @@ -1086,22 +1046,16 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_IS_TRANSITION_HOST_FROM_HANDLE(Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_IS_TRANSITION_HOST_FROM_HANDLE(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_IS_TRANSITION_HOST_FROM_HANDLE(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_IS_TRANSITION_HOST_FROM_HANDLE((Any*)gamerHandle); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_GET_TRANSITION_HOST(Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_GET_TRANSITION_HOST(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_GET_TRANSITION_HOST(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_GET_TRANSITION_HOST((Any*)gamerHandle); + return retval; } static bool LUA_NATIVE_NETWORK_NETWORK_IS_IN_TRANSITION() @@ -1209,22 +1163,16 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_HAS_INVITED_GAMER_TO_TRANSITION(Any p0) + static bool LUA_NATIVE_NETWORK_NETWORK_HAS_INVITED_GAMER_TO_TRANSITION(uintptr_t p0) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_HAS_INVITED_GAMER_TO_TRANSITION(&p0); - std::get<1>(return_values) = p0; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_HAS_INVITED_GAMER_TO_TRANSITION((Any*)p0); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_HAS_TRANSITION_INVITE_BEEN_ACKED(Any p0) + static bool LUA_NATIVE_NETWORK_NETWORK_HAS_TRANSITION_INVITE_BEEN_ACKED(uintptr_t p0) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_HAS_TRANSITION_INVITE_BEEN_ACKED(&p0); - std::get<1>(return_values) = p0; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_HAS_TRANSITION_INVITE_BEEN_ACKED((Any*)p0); + return retval; } static bool LUA_NATIVE_NETWORK_NETWORK_IS_ACTIVITY_SESSION() @@ -1243,31 +1191,22 @@ namespace lua::native NETWORK::NETWORK_SET_PRESENCE_SESSION_INVITES_BLOCKED(toggle); } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_SEND_INVITE_VIA_PRESENCE(Any gamerHandle, sol::stack_object p1, int dataCount, int p3) + static bool LUA_NATIVE_NETWORK_NETWORK_SEND_INVITE_VIA_PRESENCE(uintptr_t gamerHandle, sol::stack_object p1, int dataCount, int p3) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_SEND_INVITE_VIA_PRESENCE(&gamerHandle, p1.is() ? p1.as() : nullptr, dataCount, p3); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_SEND_INVITE_VIA_PRESENCE((Any*)gamerHandle, p1.is() ? p1.as() : nullptr, dataCount, p3); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_SEND_TRANSITION_INVITE_VIA_PRESENCE(Any gamerHandle, sol::stack_object p1, int dataCount, int p3) + static bool LUA_NATIVE_NETWORK_NETWORK_SEND_TRANSITION_INVITE_VIA_PRESENCE(uintptr_t gamerHandle, sol::stack_object p1, int dataCount, int p3) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_SEND_TRANSITION_INVITE_VIA_PRESENCE(&gamerHandle, p1.is() ? p1.as() : nullptr, dataCount, p3); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_SEND_TRANSITION_INVITE_VIA_PRESENCE((Any*)gamerHandle, p1.is() ? p1.as() : nullptr, dataCount, p3); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_SEND_IMPORTANT_TRANSITION_INVITE_VIA_PRESENCE(Any gamerHandle, sol::stack_object p1, int dataCount, int p3) + static bool LUA_NATIVE_NETWORK_NETWORK_SEND_IMPORTANT_TRANSITION_INVITE_VIA_PRESENCE(uintptr_t gamerHandle, sol::stack_object p1, int dataCount, int p3) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_SEND_IMPORTANT_TRANSITION_INVITE_VIA_PRESENCE(&gamerHandle, p1.is() ? p1.as() : nullptr, dataCount, p3); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_SEND_IMPORTANT_TRANSITION_INVITE_VIA_PRESENCE((Any*)gamerHandle, p1.is() ? p1.as() : nullptr, dataCount, p3); + return retval; } static int LUA_NATIVE_NETWORK_NETWORK_GET_PRESENCE_INVITE_INDEX_BY_ID(int p0) @@ -1306,13 +1245,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_GET_PRESENCE_INVITE_HANDLE(Any p0, Any p1) + static bool LUA_NATIVE_NETWORK_NETWORK_GET_PRESENCE_INVITE_HANDLE(Any p0, uintptr_t p1) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_GET_PRESENCE_INVITE_HANDLE(p0, &p1); - std::get<1>(return_values) = p1; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_GET_PRESENCE_INVITE_HANDLE(p0, (Any*)p1); + return retval; } static int LUA_NATIVE_NETWORK_NETWORK_GET_PRESENCE_INVITE_SESSION_ID(Any p0) @@ -1374,10 +1310,9 @@ namespace lua::native NETWORK::NETWORK_REMOVE_AND_CANCEL_ALL_INVITES(); } - static Any LUA_NATIVE_NETWORK_NETWORK_REMOVE_TRANSITION_INVITE(Any p0) + static void LUA_NATIVE_NETWORK_NETWORK_REMOVE_TRANSITION_INVITE(uintptr_t p0) { - NETWORK::NETWORK_REMOVE_TRANSITION_INVITE(&p0); - return p0; + NETWORK::NETWORK_REMOVE_TRANSITION_INVITE((Any*)p0); } static void LUA_NATIVE_NETWORK_NETWORK_REMOVE_ALL_TRANSITION_INVITE() @@ -1390,32 +1325,22 @@ namespace lua::native NETWORK::NETWORK_REMOVE_AND_CANCEL_ALL_TRANSITION_INVITES(); } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_INVITE_GAMERS(Any p0, Any p1, Any p2, Any p3) + static bool LUA_NATIVE_NETWORK_NETWORK_INVITE_GAMERS(uintptr_t p0, Any p1, uintptr_t p2, Any p3) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_INVITE_GAMERS(&p0, p1, &p2, p3); - std::get<1>(return_values) = p0; - std::get<2>(return_values) = p2; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_INVITE_GAMERS((Any*)p0, p1, (Any*)p2, p3); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_HAS_INVITED_GAMER(Any p0) + static bool LUA_NATIVE_NETWORK_NETWORK_HAS_INVITED_GAMER(uintptr_t p0) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_HAS_INVITED_GAMER(&p0); - std::get<1>(return_values) = p0; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_HAS_INVITED_GAMER((Any*)p0); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_HAS_MADE_INVITE_DECISION(Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_HAS_MADE_INVITE_DECISION(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_HAS_MADE_INVITE_DECISION(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_HAS_MADE_INVITE_DECISION((Any*)gamerHandle); + return retval; } static int LUA_NATIVE_NETWORK_NETWORK_GET_INVITE_REPLY_STATUS(Any p0) @@ -1424,75 +1349,50 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_GET_CURRENTLY_SELECTED_GAMER_HANDLE_FROM_INVITE_MENU(Any p0) + static bool LUA_NATIVE_NETWORK_NETWORK_GET_CURRENTLY_SELECTED_GAMER_HANDLE_FROM_INVITE_MENU(uintptr_t p0) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_GET_CURRENTLY_SELECTED_GAMER_HANDLE_FROM_INVITE_MENU(&p0); - std::get<1>(return_values) = p0; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_GET_CURRENTLY_SELECTED_GAMER_HANDLE_FROM_INVITE_MENU((Any*)p0); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_SET_CURRENTLY_SELECTED_GAMER_HANDLE_FROM_INVITE_MENU(Any p0) + static bool LUA_NATIVE_NETWORK_NETWORK_SET_CURRENTLY_SELECTED_GAMER_HANDLE_FROM_INVITE_MENU(uintptr_t p0) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_SET_CURRENTLY_SELECTED_GAMER_HANDLE_FROM_INVITE_MENU(&p0); - std::get<1>(return_values) = p0; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_SET_CURRENTLY_SELECTED_GAMER_HANDLE_FROM_INVITE_MENU((Any*)p0); + return retval; } - static Any LUA_NATIVE_NETWORK_NETWORK_SET_INVITE_ON_CALL_FOR_INVITE_MENU(Any p0) + static void LUA_NATIVE_NETWORK_NETWORK_SET_INVITE_ON_CALL_FOR_INVITE_MENU(uintptr_t p0) { - NETWORK::NETWORK_SET_INVITE_ON_CALL_FOR_INVITE_MENU(&p0); - return p0; + NETWORK::NETWORK_SET_INVITE_ON_CALL_FOR_INVITE_MENU((Any*)p0); } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_CHECK_DATA_MANAGER_SUCCEEDED_FOR_HANDLE(int p0, Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_CHECK_DATA_MANAGER_SUCCEEDED_FOR_HANDLE(int p0, uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_CHECK_DATA_MANAGER_SUCCEEDED_FOR_HANDLE(p0, &gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_CHECK_DATA_MANAGER_SUCCEEDED_FOR_HANDLE(p0, (Any*)gamerHandle); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_CHECK_DATA_MANAGER_FOR_HANDLE(Any p0, Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_CHECK_DATA_MANAGER_FOR_HANDLE(Any p0, uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_CHECK_DATA_MANAGER_FOR_HANDLE(p0, &gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_CHECK_DATA_MANAGER_FOR_HANDLE(p0, (Any*)gamerHandle); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_SET_INVITE_FAILED_MESSAGE_FOR_INVITE_MENU(Any p0, Any p1) + static void LUA_NATIVE_NETWORK_NETWORK_SET_INVITE_FAILED_MESSAGE_FOR_INVITE_MENU(uintptr_t p0, uintptr_t p1) { - std::tuple return_values; - NETWORK::NETWORK_SET_INVITE_FAILED_MESSAGE_FOR_INVITE_MENU(&p0, &p1); - std::get<0>(return_values) = p0; - std::get<1>(return_values) = p1; - - return return_values; + NETWORK::NETWORK_SET_INVITE_FAILED_MESSAGE_FOR_INVITE_MENU((Any*)p0, (Any*)p1); } - static std::tuple LUA_NATIVE_NETWORK_FILLOUT_PM_PLAYER_LIST(Any gamerHandle, Any p1, Any p2) + static bool LUA_NATIVE_NETWORK_FILLOUT_PM_PLAYER_LIST(uintptr_t gamerHandle, Any p1, Any p2) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::FILLOUT_PM_PLAYER_LIST(&gamerHandle, p1, p2); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::FILLOUT_PM_PLAYER_LIST((Any*)gamerHandle, p1, p2); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_FILLOUT_PM_PLAYER_LIST_WITH_NAMES(Any p0, Any p1, Any p2, Any p3) + static bool LUA_NATIVE_NETWORK_FILLOUT_PM_PLAYER_LIST_WITH_NAMES(uintptr_t p0, uintptr_t p1, Any p2, Any p3) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::FILLOUT_PM_PLAYER_LIST_WITH_NAMES(&p0, &p1, p2, p3); - std::get<1>(return_values) = p0; - std::get<2>(return_values) = p1; - - return return_values; + auto retval = (bool)NETWORK::FILLOUT_PM_PLAYER_LIST_WITH_NAMES((Any*)p0, (Any*)p1, p2, p3); + return retval; } static bool LUA_NATIVE_NETWORK_REFRESH_PLAYER_LIST_STATS(int p0) @@ -1501,13 +1401,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_SET_CURRENT_DATA_MANAGER_HANDLE(Any p0) + static bool LUA_NATIVE_NETWORK_NETWORK_SET_CURRENT_DATA_MANAGER_HANDLE(uintptr_t p0) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_SET_CURRENT_DATA_MANAGER_HANDLE(&p0); - std::get<1>(return_values) = p0; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_SET_CURRENT_DATA_MANAGER_HANDLE((Any*)p0); + return retval; } static bool LUA_NATIVE_NETWORK_NETWORK_IS_IN_PLATFORM_PARTY() @@ -1522,13 +1419,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_GET_PLATFORM_PARTY_MEMBERS(Any data, int dataSize) + static int LUA_NATIVE_NETWORK_NETWORK_GET_PLATFORM_PARTY_MEMBERS(uintptr_t data, int dataSize) { - std::tuple return_values; - std::get<0>(return_values) = NETWORK::NETWORK_GET_PLATFORM_PARTY_MEMBERS(&data, dataSize); - std::get<1>(return_values) = data; - - return return_values; + auto retval = NETWORK::NETWORK_GET_PLATFORM_PARTY_MEMBERS((Any*)data, dataSize); + return retval; } static bool LUA_NATIVE_NETWORK_NETWORK_IS_IN_PLATFORM_PARTY_CHAT() @@ -1537,13 +1431,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_IS_CHATTING_IN_PLATFORM_PARTY(Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_IS_CHATTING_IN_PLATFORM_PARTY(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_IS_CHATTING_IN_PLATFORM_PARTY(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_IS_CHATTING_IN_PLATFORM_PARTY((Any*)gamerHandle); + return retval; } static bool LUA_NATIVE_NETWORK_NETWORK_CAN_QUEUE_FOR_PREVIOUS_SESSION_JOIN() @@ -1620,13 +1511,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_BAD_SPORT_PLAYER_LEFT_DETECTED(Any gamerHandle, int event, int amountReceived) + static bool LUA_NATIVE_NETWORK_BAD_SPORT_PLAYER_LEFT_DETECTED(uintptr_t gamerHandle, int event, int amountReceived) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::BAD_SPORT_PLAYER_LEFT_DETECTED(&gamerHandle, event, amountReceived); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::BAD_SPORT_PLAYER_LEFT_DETECTED((Any*)gamerHandle, event, amountReceived); + return retval; } static void LUA_NATIVE_NETWORK_NETWORK_ADD_INVALID_OBJECT_MODEL(Hash modelHash) @@ -2116,28 +2004,24 @@ namespace lua::native return retval; } - static Any LUA_NATIVE_NETWORK_NETWORK_GET_LOCAL_HANDLE(Any gamerHandle, int gamerHandleSize) + static void LUA_NATIVE_NETWORK_NETWORK_GET_LOCAL_HANDLE(uintptr_t gamerHandle, int gamerHandleSize) { - NETWORK::NETWORK_GET_LOCAL_HANDLE(&gamerHandle, gamerHandleSize); - return gamerHandle; + NETWORK::NETWORK_GET_LOCAL_HANDLE((Any*)gamerHandle, gamerHandleSize); } - static Any LUA_NATIVE_NETWORK_NETWORK_HANDLE_FROM_USER_ID(sol::stack_object userId, Any gamerHandle, int gamerHandleSize) + static void LUA_NATIVE_NETWORK_NETWORK_HANDLE_FROM_USER_ID(sol::stack_object userId, uintptr_t gamerHandle, int gamerHandleSize) { - NETWORK::NETWORK_HANDLE_FROM_USER_ID(userId.is() ? userId.as() : nullptr, &gamerHandle, gamerHandleSize); - return gamerHandle; + NETWORK::NETWORK_HANDLE_FROM_USER_ID(userId.is() ? userId.as() : nullptr, (Any*)gamerHandle, gamerHandleSize); } - static Any LUA_NATIVE_NETWORK_NETWORK_HANDLE_FROM_MEMBER_ID(sol::stack_object memberId, Any gamerHandle, int gamerHandleSize) + static void LUA_NATIVE_NETWORK_NETWORK_HANDLE_FROM_MEMBER_ID(sol::stack_object memberId, uintptr_t gamerHandle, int gamerHandleSize) { - NETWORK::NETWORK_HANDLE_FROM_MEMBER_ID(memberId.is() ? memberId.as() : nullptr, &gamerHandle, gamerHandleSize); - return gamerHandle; + NETWORK::NETWORK_HANDLE_FROM_MEMBER_ID(memberId.is() ? memberId.as() : nullptr, (Any*)gamerHandle, gamerHandleSize); } - static Any LUA_NATIVE_NETWORK_NETWORK_HANDLE_FROM_PLAYER(Player player, Any gamerHandle, int gamerHandleSize) + static void LUA_NATIVE_NETWORK_NETWORK_HANDLE_FROM_PLAYER(Player player, uintptr_t gamerHandle, int gamerHandleSize) { - NETWORK::NETWORK_HANDLE_FROM_PLAYER(player, &gamerHandle, gamerHandleSize); - return gamerHandle; + NETWORK::NETWORK_HANDLE_FROM_PLAYER(player, (Any*)gamerHandle, gamerHandleSize); } static Hash LUA_NATIVE_NETWORK_NETWORK_HASH_FROM_PLAYER_HANDLE(Player player) @@ -2146,28 +2030,21 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_HASH_FROM_GAMER_HANDLE(Any gamerHandle) + static Hash LUA_NATIVE_NETWORK_NETWORK_HASH_FROM_GAMER_HANDLE(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = NETWORK::NETWORK_HASH_FROM_GAMER_HANDLE(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = NETWORK::NETWORK_HASH_FROM_GAMER_HANDLE((Any*)gamerHandle); + return retval; } - static Any LUA_NATIVE_NETWORK_NETWORK_HANDLE_FROM_FRIEND(int friendIndex, Any gamerHandle, int gamerHandleSize) + static void LUA_NATIVE_NETWORK_NETWORK_HANDLE_FROM_FRIEND(int friendIndex, uintptr_t gamerHandle, int gamerHandleSize) { - NETWORK::NETWORK_HANDLE_FROM_FRIEND(friendIndex, &gamerHandle, gamerHandleSize); - return gamerHandle; + NETWORK::NETWORK_HANDLE_FROM_FRIEND(friendIndex, (Any*)gamerHandle, gamerHandleSize); } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_GAMERTAG_FROM_HANDLE_START(Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_GAMERTAG_FROM_HANDLE_START(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_GAMERTAG_FROM_HANDLE_START(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_GAMERTAG_FROM_HANDLE_START((Any*)gamerHandle); + return retval; } static bool LUA_NATIVE_NETWORK_NETWORK_GAMERTAG_FROM_HANDLE_PENDING() @@ -2182,22 +2059,16 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_GET_GAMERTAG_FROM_HANDLE(Any gamerHandle) + static const char* LUA_NATIVE_NETWORK_NETWORK_GET_GAMERTAG_FROM_HANDLE(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = NETWORK::NETWORK_GET_GAMERTAG_FROM_HANDLE(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = NETWORK::NETWORK_GET_GAMERTAG_FROM_HANDLE((Any*)gamerHandle); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_DISPLAYNAMES_FROM_HANDLES_START(Any p0, Any p1) + static int LUA_NATIVE_NETWORK_NETWORK_DISPLAYNAMES_FROM_HANDLES_START(uintptr_t p0, Any p1) { - std::tuple return_values; - std::get<0>(return_values) = NETWORK::NETWORK_DISPLAYNAMES_FROM_HANDLES_START(&p0, p1); - std::get<1>(return_values) = p0; - - return return_values; + auto retval = NETWORK::NETWORK_DISPLAYNAMES_FROM_HANDLES_START((Any*)p0, p1); + return retval; } static int LUA_NATIVE_NETWORK_NETWORK_GET_DISPLAYNAMES_FROM_HANDLES(Any p0, Any p1, Any p2) @@ -2206,56 +2077,39 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_ARE_HANDLES_THE_SAME(Any gamerHandle1, Any gamerHandle2) + static bool LUA_NATIVE_NETWORK_NETWORK_ARE_HANDLES_THE_SAME(uintptr_t gamerHandle1, uintptr_t gamerHandle2) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_ARE_HANDLES_THE_SAME(&gamerHandle1, &gamerHandle2); - std::get<1>(return_values) = gamerHandle1; - std::get<2>(return_values) = gamerHandle2; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_ARE_HANDLES_THE_SAME((Any*)gamerHandle1, (Any*)gamerHandle2); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_IS_HANDLE_VALID(Any gamerHandle, int gamerHandleSize) + static bool LUA_NATIVE_NETWORK_NETWORK_IS_HANDLE_VALID(uintptr_t gamerHandle, int gamerHandleSize) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_IS_HANDLE_VALID(&gamerHandle, gamerHandleSize); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_IS_HANDLE_VALID((Any*)gamerHandle, gamerHandleSize); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_GET_PLAYER_FROM_GAMER_HANDLE(Any gamerHandle) + static Player LUA_NATIVE_NETWORK_NETWORK_GET_PLAYER_FROM_GAMER_HANDLE(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = NETWORK::NETWORK_GET_PLAYER_FROM_GAMER_HANDLE(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = NETWORK::NETWORK_GET_PLAYER_FROM_GAMER_HANDLE((Any*)gamerHandle); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_MEMBER_ID_FROM_GAMER_HANDLE(Any gamerHandle) + static const char* LUA_NATIVE_NETWORK_NETWORK_MEMBER_ID_FROM_GAMER_HANDLE(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = NETWORK::NETWORK_MEMBER_ID_FROM_GAMER_HANDLE(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = NETWORK::NETWORK_MEMBER_ID_FROM_GAMER_HANDLE((Any*)gamerHandle); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_IS_GAMER_IN_MY_SESSION(Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_IS_GAMER_IN_MY_SESSION(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_IS_GAMER_IN_MY_SESSION(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_IS_GAMER_IN_MY_SESSION((Any*)gamerHandle); + return retval; } - static Any LUA_NATIVE_NETWORK_NETWORK_SHOW_PROFILE_UI(Any gamerHandle) + static void LUA_NATIVE_NETWORK_NETWORK_SHOW_PROFILE_UI(uintptr_t gamerHandle) { - NETWORK::NETWORK_SHOW_PROFILE_UI(&gamerHandle); - return gamerHandle; + NETWORK::NETWORK_SHOW_PROFILE_UI((Any*)gamerHandle); } static const char* LUA_NATIVE_NETWORK_NETWORK_PLAYER_GET_NAME(Player player) @@ -2297,13 +2151,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_IS_INACTIVE_PROFILE(Any p0) + static bool LUA_NATIVE_NETWORK_NETWORK_IS_INACTIVE_PROFILE(uintptr_t p0) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_IS_INACTIVE_PROFILE(&p0); - std::get<1>(return_values) = p0; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_IS_INACTIVE_PROFILE((Any*)p0); + return retval; } static int LUA_NATIVE_NETWORK_NETWORK_GET_MAX_FRIENDS() @@ -2336,13 +2187,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_IS_FRIEND_HANDLE_ONLINE(Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_IS_FRIEND_HANDLE_ONLINE(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_IS_FRIEND_HANDLE_ONLINE(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_IS_FRIEND_HANDLE_ONLINE((Any*)gamerHandle); + return retval; } static bool LUA_NATIVE_NETWORK_NETWORK_IS_FRIEND_IN_SAME_TITLE(sol::stack_object friendName) @@ -2357,13 +2205,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_IS_FRIEND(Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_IS_FRIEND(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_IS_FRIEND(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_IS_FRIEND((Any*)gamerHandle); + return retval; } static bool LUA_NATIVE_NETWORK_NETWORK_IS_PENDING_FRIEND(Any p0) @@ -2378,13 +2223,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_ADD_FRIEND(Any gamerHandle, sol::stack_object message) + static bool LUA_NATIVE_NETWORK_NETWORK_ADD_FRIEND(uintptr_t gamerHandle, sol::stack_object message) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_ADD_FRIEND(&gamerHandle, message.is() ? message.as() : nullptr); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_ADD_FRIEND((Any*)gamerHandle, message.is() ? message.as() : nullptr); + return retval; } static bool LUA_NATIVE_NETWORK_NETWORK_IS_FRIEND_INDEX_ONLINE(int friendIndex) @@ -2432,13 +2274,10 @@ namespace lua::native NETWORK::_NETWORK_SET_COMMUNICATION_GROUP_FLAGS(communicationType, communicationGroupFlag); } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_IS_PLAYER_ON_BLOCKLIST(Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_IS_PLAYER_ON_BLOCKLIST(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_IS_PLAYER_ON_BLOCKLIST(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_IS_PLAYER_ON_BLOCKLIST((Any*)gamerHandle); + return retval; } static bool LUA_NATIVE_NETWORK_NETWORK_SET_SCRIPT_AUTOMUTED(Any p0) @@ -2470,139 +2309,94 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_GAMER_HAS_HEADSET(Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_GAMER_HAS_HEADSET(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_GAMER_HAS_HEADSET(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_GAMER_HAS_HEADSET((Any*)gamerHandle); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_IS_GAMER_TALKING(Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_IS_GAMER_TALKING(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_IS_GAMER_TALKING(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_IS_GAMER_TALKING((Any*)gamerHandle); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_PERMISSIONS_HAS_GAMER_RECORD(Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_PERMISSIONS_HAS_GAMER_RECORD(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_PERMISSIONS_HAS_GAMER_RECORD(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_PERMISSIONS_HAS_GAMER_RECORD((Any*)gamerHandle); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_CAN_COMMUNICATE_WITH_GAMER(Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_CAN_COMMUNICATE_WITH_GAMER(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_CAN_COMMUNICATE_WITH_GAMER(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_CAN_COMMUNICATE_WITH_GAMER((Any*)gamerHandle); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_CAN_TEXT_CHAT_WITH_GAMER(Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_CAN_TEXT_CHAT_WITH_GAMER(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_CAN_TEXT_CHAT_WITH_GAMER(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_CAN_TEXT_CHAT_WITH_GAMER((Any*)gamerHandle); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_IS_GAMER_MUTED_BY_ME(Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_IS_GAMER_MUTED_BY_ME(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_IS_GAMER_MUTED_BY_ME(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_IS_GAMER_MUTED_BY_ME((Any*)gamerHandle); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_AM_I_MUTED_BY_GAMER(Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_AM_I_MUTED_BY_GAMER(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_AM_I_MUTED_BY_GAMER(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_AM_I_MUTED_BY_GAMER((Any*)gamerHandle); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_IS_GAMER_BLOCKED_BY_ME(Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_IS_GAMER_BLOCKED_BY_ME(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_IS_GAMER_BLOCKED_BY_ME(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_IS_GAMER_BLOCKED_BY_ME((Any*)gamerHandle); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_AM_I_BLOCKED_BY_GAMER(Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_AM_I_BLOCKED_BY_GAMER(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_AM_I_BLOCKED_BY_GAMER(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_AM_I_BLOCKED_BY_GAMER((Any*)gamerHandle); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_CAN_VIEW_GAMER_USER_CONTENT(Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_CAN_VIEW_GAMER_USER_CONTENT(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_CAN_VIEW_GAMER_USER_CONTENT(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_CAN_VIEW_GAMER_USER_CONTENT((Any*)gamerHandle); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_HAS_VIEW_GAMER_USER_CONTENT_RESULT(Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_HAS_VIEW_GAMER_USER_CONTENT_RESULT(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_HAS_VIEW_GAMER_USER_CONTENT_RESULT(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_HAS_VIEW_GAMER_USER_CONTENT_RESULT((Any*)gamerHandle); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_CAN_PLAY_MULTIPLAYER_WITH_GAMER(Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_CAN_PLAY_MULTIPLAYER_WITH_GAMER(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_CAN_PLAY_MULTIPLAYER_WITH_GAMER(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_CAN_PLAY_MULTIPLAYER_WITH_GAMER((Any*)gamerHandle); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_CAN_GAMER_PLAY_MULTIPLAYER_WITH_ME(Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_CAN_GAMER_PLAY_MULTIPLAYER_WITH_ME(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_CAN_GAMER_PLAY_MULTIPLAYER_WITH_ME(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_CAN_GAMER_PLAY_MULTIPLAYER_WITH_ME((Any*)gamerHandle); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_CAN_SEND_LOCAL_INVITE(Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_CAN_SEND_LOCAL_INVITE(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_CAN_SEND_LOCAL_INVITE(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_CAN_SEND_LOCAL_INVITE((Any*)gamerHandle); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_CAN_RECEIVE_LOCAL_INVITE(Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_CAN_RECEIVE_LOCAL_INVITE(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_CAN_RECEIVE_LOCAL_INVITE(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_CAN_RECEIVE_LOCAL_INVITE((Any*)gamerHandle); + return retval; } static bool LUA_NATIVE_NETWORK_NETWORK_IS_PLAYER_TALKING(Player player) @@ -2859,42 +2653,28 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_CLAN_PLAYER_IS_ACTIVE(Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_CLAN_PLAYER_IS_ACTIVE(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_CLAN_PLAYER_IS_ACTIVE(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_CLAN_PLAYER_IS_ACTIVE((Any*)gamerHandle); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_CLAN_PLAYER_GET_DESC(Any clanDesc, int bufferSize, Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_CLAN_PLAYER_GET_DESC(uintptr_t clanDesc, int bufferSize, uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_CLAN_PLAYER_GET_DESC(&clanDesc, bufferSize, &gamerHandle); - std::get<1>(return_values) = clanDesc; - std::get<2>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_CLAN_PLAYER_GET_DESC((Any*)clanDesc, bufferSize, (Any*)gamerHandle); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_CLAN_IS_ROCKSTAR_CLAN(Any clanDesc, int bufferSize) + static bool LUA_NATIVE_NETWORK_NETWORK_CLAN_IS_ROCKSTAR_CLAN(uintptr_t clanDesc, int bufferSize) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_CLAN_IS_ROCKSTAR_CLAN(&clanDesc, bufferSize); - std::get<1>(return_values) = clanDesc; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_CLAN_IS_ROCKSTAR_CLAN((Any*)clanDesc, bufferSize); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_CLAN_GET_UI_FORMATTED_TAG(Any clanDesc, int bufferSize, char formattedTag) + static char LUA_NATIVE_NETWORK_NETWORK_CLAN_GET_UI_FORMATTED_TAG(uintptr_t clanDesc, int bufferSize, char formattedTag) { - std::tuple return_values; - NETWORK::NETWORK_CLAN_GET_UI_FORMATTED_TAG(&clanDesc, bufferSize, &formattedTag); - std::get<0>(return_values) = clanDesc; - std::get<1>(return_values) = formattedTag; - - return return_values; + NETWORK::NETWORK_CLAN_GET_UI_FORMATTED_TAG((Any*)clanDesc, bufferSize, &formattedTag); + return formattedTag; } static int LUA_NATIVE_NETWORK_NETWORK_CLAN_GET_LOCAL_MEMBERSHIPS_COUNT() @@ -2903,31 +2683,22 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_CLAN_GET_MEMBERSHIP_DESC(Any memberDesc, int p1) + static bool LUA_NATIVE_NETWORK_NETWORK_CLAN_GET_MEMBERSHIP_DESC(uintptr_t memberDesc, int p1) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_CLAN_GET_MEMBERSHIP_DESC(&memberDesc, p1); - std::get<1>(return_values) = memberDesc; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_CLAN_GET_MEMBERSHIP_DESC((Any*)memberDesc, p1); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_CLAN_DOWNLOAD_MEMBERSHIP(Any gamerHandle) + static bool LUA_NATIVE_NETWORK_NETWORK_CLAN_DOWNLOAD_MEMBERSHIP(uintptr_t gamerHandle) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_CLAN_DOWNLOAD_MEMBERSHIP(&gamerHandle); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_CLAN_DOWNLOAD_MEMBERSHIP((Any*)gamerHandle); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_CLAN_DOWNLOAD_MEMBERSHIP_PENDING(Any p0) + static bool LUA_NATIVE_NETWORK_NETWORK_CLAN_DOWNLOAD_MEMBERSHIP_PENDING(uintptr_t p0) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_CLAN_DOWNLOAD_MEMBERSHIP_PENDING(&p0); - std::get<1>(return_values) = p0; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_CLAN_DOWNLOAD_MEMBERSHIP_PENDING((Any*)p0); + return retval; } static bool LUA_NATIVE_NETWORK_NETWORK_CLAN_ANY_DOWNLOAD_MEMBERSHIP_PENDING() @@ -2963,12 +2734,11 @@ namespace lua::native return return_values; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_CLAN_GET_MEMBERSHIP(int p0, Any clanMembership, int p2) + static std::tuple LUA_NATIVE_NETWORK_NETWORK_CLAN_GET_MEMBERSHIP(int p0, uintptr_t clanMembership, int p2) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_CLAN_GET_MEMBERSHIP(&p0, &clanMembership, p2); + std::tuple return_values; + std::get<0>(return_values) = (bool)NETWORK::NETWORK_CLAN_GET_MEMBERSHIP(&p0, (Any*)clanMembership, p2); std::get<1>(return_values) = p0; - std::get<2>(return_values) = clanMembership; return return_values; } @@ -2997,12 +2767,11 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_CLAN_GET_EMBLEM_TXD_NAME(Any netHandle, char txdName) + static std::tuple LUA_NATIVE_NETWORK_NETWORK_CLAN_GET_EMBLEM_TXD_NAME(uintptr_t netHandle, char txdName) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_CLAN_GET_EMBLEM_TXD_NAME(&netHandle, &txdName); - std::get<1>(return_values) = netHandle; - std::get<2>(return_values) = txdName; + std::tuple return_values; + std::get<0>(return_values) = (bool)NETWORK::NETWORK_CLAN_GET_EMBLEM_TXD_NAME((Any*)netHandle, &txdName); + std::get<1>(return_values) = txdName; return return_values; } @@ -3013,13 +2782,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_CLAN_IS_EMBLEM_READY(Any p0, Any p1) + static bool LUA_NATIVE_NETWORK_NETWORK_CLAN_IS_EMBLEM_READY(Any p0, uintptr_t p1) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_CLAN_IS_EMBLEM_READY(p0, &p1); - std::get<1>(return_values) = p1; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_CLAN_IS_EMBLEM_READY(p0, (Any*)p1); + return retval; } static void LUA_NATIVE_NETWORK_NETWORK_CLAN_RELEASE_EMBLEM(Any p0) @@ -3038,13 +2804,10 @@ namespace lua::native NETWORK::NETWORK_GET_PRIMARY_CLAN_DATA_CANCEL(); } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_GET_PRIMARY_CLAN_DATA_START(Any p0, Any p1) + static bool LUA_NATIVE_NETWORK_NETWORK_GET_PRIMARY_CLAN_DATA_START(uintptr_t p0, Any p1) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_GET_PRIMARY_CLAN_DATA_START(&p0, p1); - std::get<1>(return_values) = p0; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_GET_PRIMARY_CLAN_DATA_START((Any*)p0, p1); + return retval; } static bool LUA_NATIVE_NETWORK_NETWORK_GET_PRIMARY_CLAN_DATA_PENDING() @@ -3059,14 +2822,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_GET_PRIMARY_CLAN_DATA_NEW(Any p0, Any p1) + static bool LUA_NATIVE_NETWORK_NETWORK_GET_PRIMARY_CLAN_DATA_NEW(uintptr_t p0, uintptr_t p1) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_GET_PRIMARY_CLAN_DATA_NEW(&p0, &p1); - std::get<1>(return_values) = p0; - std::get<2>(return_values) = p1; - - return return_values; + auto retval = (bool)NETWORK::NETWORK_GET_PRIMARY_CLAN_DATA_NEW((Any*)p0, (Any*)p1); + return retval; } static void LUA_NATIVE_NETWORK_SET_NETWORK_ID_CAN_MIGRATE(int netId, bool toggle) @@ -3355,15 +3114,9 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_GET_RESERVED_MISSION_ENTITIES_IN_AREA(float x, float y, float z, Any p3, Any out1, Any out2, Any out3) + static void LUA_NATIVE_NETWORK_GET_RESERVED_MISSION_ENTITIES_IN_AREA(float x, float y, float z, Any p3, uintptr_t out1, uintptr_t out2, uintptr_t out3) { - std::tuple return_values; - NETWORK::GET_RESERVED_MISSION_ENTITIES_IN_AREA(x, y, z, p3, &out1, &out2, &out3); - std::get<0>(return_values) = out1; - std::get<1>(return_values) = out2; - std::get<2>(return_values) = out3; - - return return_values; + NETWORK::GET_RESERVED_MISSION_ENTITIES_IN_AREA(x, y, z, p3, (Any*)out1, (Any*)out2, (Any*)out3); } static int LUA_NATIVE_NETWORK_GET_MAX_NUM_NETWORK_OBJECTS() @@ -3471,10 +3224,9 @@ namespace lua::native return retval; } - static Any LUA_NATIVE_NETWORK_CONVERT_POSIX_TIME(int posixTime, Any timeStructure) + static void LUA_NATIVE_NETWORK_CONVERT_POSIX_TIME(int posixTime, uintptr_t timeStructure) { - NETWORK::CONVERT_POSIX_TIME(posixTime, &timeStructure); - return timeStructure; + NETWORK::CONVERT_POSIX_TIME(posixTime, (Any*)timeStructure); } static void LUA_NATIVE_NETWORK_NETWORK_SET_IN_SPECTATOR_MODE(bool toggle, Ped playerPed) @@ -3683,13 +3435,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_QUERY_RESPAWN_RESULTS(Any p0) + static int LUA_NATIVE_NETWORK_NETWORK_QUERY_RESPAWN_RESULTS(uintptr_t p0) { - std::tuple return_values; - std::get<0>(return_values) = NETWORK::NETWORK_QUERY_RESPAWN_RESULTS(&p0); - std::get<1>(return_values) = p0; - - return return_values; + auto retval = NETWORK::NETWORK_QUERY_RESPAWN_RESULTS((Any*)p0); + return retval; } static void LUA_NATIVE_NETWORK_NETWORK_CANCEL_RESPAWN_SEARCH() @@ -4298,14 +4047,10 @@ namespace lua::native NETWORK::CLEAR_SERVICE_EVENT_ARGUMENTS(); } - static std::tuple LUA_NATIVE_NETWORK_UGC_COPY_CONTENT(Any p0, Any p1) + static bool LUA_NATIVE_NETWORK_UGC_COPY_CONTENT(uintptr_t p0, uintptr_t p1) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::UGC_COPY_CONTENT(&p0, &p1); - std::get<1>(return_values) = p0; - std::get<2>(return_values) = p1; - - return return_values; + auto retval = (bool)NETWORK::UGC_COPY_CONTENT((Any*)p0, (Any*)p1); + return retval; } static bool LUA_NATIVE_NETWORK_UGC_IS_CREATING() @@ -4343,13 +4088,10 @@ namespace lua::native NETWORK::UGC_CLEAR_CREATE_RESULT(); } - static std::tuple LUA_NATIVE_NETWORK_UGC_QUERY_MY_CONTENT(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5) + static bool LUA_NATIVE_NETWORK_UGC_QUERY_MY_CONTENT(Any p0, Any p1, uintptr_t p2, Any p3, Any p4, Any p5) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::UGC_QUERY_MY_CONTENT(p0, p1, &p2, p3, p4, p5); - std::get<1>(return_values) = p2; - - return return_values; + auto retval = (bool)NETWORK::UGC_QUERY_MY_CONTENT(p0, p1, (Any*)p2, p3, p4, p5); + return retval; } static bool LUA_NATIVE_NETWORK_UGC_QUERY_BY_CATEGORY(Any p0, Any p1, Any p2, sol::stack_object p3, Any p4, bool p5) @@ -4364,13 +4106,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_UGC_QUERY_BY_CONTENT_IDS(Any data, int count, bool latestVersion, sol::stack_object contentTypeName) + static bool LUA_NATIVE_NETWORK_UGC_QUERY_BY_CONTENT_IDS(uintptr_t data, int count, bool latestVersion, sol::stack_object contentTypeName) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::UGC_QUERY_BY_CONTENT_IDS(&data, count, latestVersion, contentTypeName.is() ? contentTypeName.as() : nullptr); - std::get<1>(return_values) = data; - - return return_values; + auto retval = (bool)NETWORK::UGC_QUERY_BY_CONTENT_IDS((Any*)data, count, latestVersion, contentTypeName.is() ? contentTypeName.as() : nullptr); + return retval; } static bool LUA_NATIVE_NETWORK_UGC_QUERY_MOST_RECENTLY_CREATED_CONTENT(int offset, int count, sol::stack_object contentTypeName, int p3) @@ -4379,49 +4118,34 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_UGC_GET_BOOKMARKED_CONTENT(Any p0, Any p1, sol::stack_object p2, Any p3) + static bool LUA_NATIVE_NETWORK_UGC_GET_BOOKMARKED_CONTENT(Any p0, Any p1, sol::stack_object p2, uintptr_t p3) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::UGC_GET_BOOKMARKED_CONTENT(p0, p1, p2.is() ? p2.as() : nullptr, &p3); - std::get<1>(return_values) = p3; - - return return_values; + auto retval = (bool)NETWORK::UGC_GET_BOOKMARKED_CONTENT(p0, p1, p2.is() ? p2.as() : nullptr, (Any*)p3); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_UGC_GET_MY_CONTENT(Any p0, Any p1, sol::stack_object p2, Any p3) + static bool LUA_NATIVE_NETWORK_UGC_GET_MY_CONTENT(Any p0, Any p1, sol::stack_object p2, uintptr_t p3) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::UGC_GET_MY_CONTENT(p0, p1, p2.is() ? p2.as() : nullptr, &p3); - std::get<1>(return_values) = p3; - - return return_values; + auto retval = (bool)NETWORK::UGC_GET_MY_CONTENT(p0, p1, p2.is() ? p2.as() : nullptr, (Any*)p3); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_UGC_GET_FRIEND_CONTENT(Any p0, Any p1, sol::stack_object p2, Any p3) + static bool LUA_NATIVE_NETWORK_UGC_GET_FRIEND_CONTENT(Any p0, Any p1, sol::stack_object p2, uintptr_t p3) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::UGC_GET_FRIEND_CONTENT(p0, p1, p2.is() ? p2.as() : nullptr, &p3); - std::get<1>(return_values) = p3; - - return return_values; + auto retval = (bool)NETWORK::UGC_GET_FRIEND_CONTENT(p0, p1, p2.is() ? p2.as() : nullptr, (Any*)p3); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_UGC_GET_CREW_CONTENT(Any p0, Any p1, Any p2, sol::stack_object p3, Any p4) + static bool LUA_NATIVE_NETWORK_UGC_GET_CREW_CONTENT(Any p0, Any p1, Any p2, sol::stack_object p3, uintptr_t p4) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::UGC_GET_CREW_CONTENT(p0, p1, p2, p3.is() ? p3.as() : nullptr, &p4); - std::get<1>(return_values) = p4; - - return return_values; + auto retval = (bool)NETWORK::UGC_GET_CREW_CONTENT(p0, p1, p2, p3.is() ? p3.as() : nullptr, (Any*)p4); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_UGC_GET_GET_BY_CATEGORY(Any p0, Any p1, Any p2, sol::stack_object p3, Any p4) + static bool LUA_NATIVE_NETWORK_UGC_GET_GET_BY_CATEGORY(Any p0, Any p1, Any p2, sol::stack_object p3, uintptr_t p4) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::UGC_GET_GET_BY_CATEGORY(p0, p1, p2, p3.is() ? p3.as() : nullptr, &p4); - std::get<1>(return_values) = p4; - - return return_values; + auto retval = (bool)NETWORK::UGC_GET_GET_BY_CATEGORY(p0, p1, p2, p3.is() ? p3.as() : nullptr, (Any*)p4); + return retval; } static bool LUA_NATIVE_NETWORK_UGC_GET_GET_BY_CONTENT_ID(sol::stack_object contentId, sol::stack_object contentTypeName) @@ -4430,43 +4154,28 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_UGC_GET_GET_BY_CONTENT_IDS(Any data, int dataCount, sol::stack_object contentTypeName) + static bool LUA_NATIVE_NETWORK_UGC_GET_GET_BY_CONTENT_IDS(uintptr_t data, int dataCount, sol::stack_object contentTypeName) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::UGC_GET_GET_BY_CONTENT_IDS(&data, dataCount, contentTypeName.is() ? contentTypeName.as() : nullptr); - std::get<1>(return_values) = data; - - return return_values; + auto retval = (bool)NETWORK::UGC_GET_GET_BY_CONTENT_IDS((Any*)data, dataCount, contentTypeName.is() ? contentTypeName.as() : nullptr); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_UGC_GET_MOST_RECENTLY_CREATED_CONTENT(Any p0, Any p1, Any p2, Any p3) + static bool LUA_NATIVE_NETWORK_UGC_GET_MOST_RECENTLY_CREATED_CONTENT(Any p0, Any p1, uintptr_t p2, uintptr_t p3) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::UGC_GET_MOST_RECENTLY_CREATED_CONTENT(p0, p1, &p2, &p3); - std::get<1>(return_values) = p2; - std::get<2>(return_values) = p3; - - return return_values; + auto retval = (bool)NETWORK::UGC_GET_MOST_RECENTLY_CREATED_CONTENT(p0, p1, (Any*)p2, (Any*)p3); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_UGC_GET_MOST_RECENTLY_PLAYED_CONTENT(Any p0, Any p1, Any p2, Any p3) + static bool LUA_NATIVE_NETWORK_UGC_GET_MOST_RECENTLY_PLAYED_CONTENT(Any p0, Any p1, uintptr_t p2, uintptr_t p3) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::UGC_GET_MOST_RECENTLY_PLAYED_CONTENT(p0, p1, &p2, &p3); - std::get<1>(return_values) = p2; - std::get<2>(return_values) = p3; - - return return_values; + auto retval = (bool)NETWORK::UGC_GET_MOST_RECENTLY_PLAYED_CONTENT(p0, p1, (Any*)p2, (Any*)p3); + return retval; } - static std::tuple LUA_NATIVE_NETWORK_UGC_GET_TOP_RATED_CONTENT(Any p0, Any p1, Any p2, Any p3) + static bool LUA_NATIVE_NETWORK_UGC_GET_TOP_RATED_CONTENT(Any p0, Any p1, uintptr_t p2, uintptr_t p3) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::UGC_GET_TOP_RATED_CONTENT(p0, p1, &p2, &p3); - std::get<1>(return_values) = p2; - std::get<2>(return_values) = p3; - - return return_values; + auto retval = (bool)NETWORK::UGC_GET_TOP_RATED_CONTENT(p0, p1, (Any*)p2, (Any*)p3); + return retval; } static void LUA_NATIVE_NETWORK_UGC_CANCEL_QUERY() @@ -4533,13 +4242,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_UGC_GET_CONTENT_CREATOR_GAMER_HANDLE(int p0, Any p1) + static bool LUA_NATIVE_NETWORK_UGC_GET_CONTENT_CREATOR_GAMER_HANDLE(int p0, uintptr_t p1) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::UGC_GET_CONTENT_CREATOR_GAMER_HANDLE(p0, &p1); - std::get<1>(return_values) = p1; - - return return_values; + auto retval = (bool)NETWORK::UGC_GET_CONTENT_CREATOR_GAMER_HANDLE(p0, (Any*)p1); + return retval; } static bool LUA_NATIVE_NETWORK_UGC_GET_CONTENT_CREATED_BY_LOCAL_PLAYER(Any p0) @@ -4596,10 +4302,9 @@ namespace lua::native return retval; } - static Any LUA_NATIVE_NETWORK_UGC_GET_CONTENT_UPDATED_DATE(Any p0, Any p1) + static void LUA_NATIVE_NETWORK_UGC_GET_CONTENT_UPDATED_DATE(Any p0, uintptr_t p1) { - NETWORK::UGC_GET_CONTENT_UPDATED_DATE(p0, &p1); - return p1; + NETWORK::UGC_GET_CONTENT_UPDATED_DATE(p0, (Any*)p1); } static int LUA_NATIVE_NETWORK_UGC_GET_CONTENT_FILE_VERSION(Any p0, Any p1) @@ -4745,13 +4450,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_UGC_SET_DELETED(Any p0, bool p1, sol::stack_object p2) + static bool LUA_NATIVE_NETWORK_UGC_SET_DELETED(uintptr_t p0, bool p1, sol::stack_object p2) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::UGC_SET_DELETED(&p0, p1, p2.is() ? p2.as() : nullptr); - std::get<1>(return_values) = p0; - - return return_values; + auto retval = (bool)NETWORK::UGC_SET_DELETED((Any*)p0, p1, p2.is() ? p2.as() : nullptr); + return retval; } static bool LUA_NATIVE_NETWORK_UGC_IS_MODIFYING() @@ -4783,14 +4485,10 @@ namespace lua::native NETWORK::UGC_CLEAR_MODIFY_RESULT(); } - static std::tuple LUA_NATIVE_NETWORK_UGC_GET_CREATORS_BY_USER_ID(Any p0, Any p1) + static bool LUA_NATIVE_NETWORK_UGC_GET_CREATORS_BY_USER_ID(uintptr_t p0, uintptr_t p1) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::UGC_GET_CREATORS_BY_USER_ID(&p0, &p1); - std::get<1>(return_values) = p0; - std::get<2>(return_values) = p1; - - return return_values; + auto retval = (bool)NETWORK::UGC_GET_CREATORS_BY_USER_ID((Any*)p0, (Any*)p1); + return retval; } static bool LUA_NATIVE_NETWORK_UGC_HAS_QUERY_CREATORS_FINISHED() @@ -4874,13 +4572,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_TEXTURE_DOWNLOAD_REQUEST(Any gamerHandle, sol::stack_object filePath, sol::stack_object name, bool p3) + static int LUA_NATIVE_NETWORK_TEXTURE_DOWNLOAD_REQUEST(uintptr_t gamerHandle, sol::stack_object filePath, sol::stack_object name, bool p3) { - std::tuple return_values; - std::get<0>(return_values) = NETWORK::TEXTURE_DOWNLOAD_REQUEST(&gamerHandle, filePath.is() ? filePath.as() : nullptr, name.is() ? name.as() : nullptr, p3); - std::get<1>(return_values) = gamerHandle; - - return return_values; + auto retval = NETWORK::TEXTURE_DOWNLOAD_REQUEST((Any*)gamerHandle, filePath.is() ? filePath.as() : nullptr, name.is() ? name.as() : nullptr, p3); + return retval; } static int LUA_NATIVE_NETWORK_TITLE_TEXTURE_DOWNLOAD_REQUEST(sol::stack_object filePath, sol::stack_object name, bool p2) @@ -4978,12 +4673,11 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_HAS_ROS_PRIVILEGE_END_DATE(int privilege, int banType, Any timeData) + static std::tuple LUA_NATIVE_NETWORK_NETWORK_HAS_ROS_PRIVILEGE_END_DATE(int privilege, int banType, uintptr_t timeData) { - std::tuple return_values; - std::get<0>(return_values) = (bool)NETWORK::NETWORK_HAS_ROS_PRIVILEGE_END_DATE(privilege, &banType, &timeData); + std::tuple return_values; + std::get<0>(return_values) = (bool)NETWORK::NETWORK_HAS_ROS_PRIVILEGE_END_DATE(privilege, &banType, (Any*)timeData); std::get<1>(return_values) = banType; - std::get<2>(return_values) = timeData; return return_values; } @@ -5018,13 +4712,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_NETWORK_NETWORK_START_USER_CONTENT_PERMISSIONS_CHECK(Any netHandle) + static int LUA_NATIVE_NETWORK_NETWORK_START_USER_CONTENT_PERMISSIONS_CHECK(uintptr_t netHandle) { - std::tuple return_values; - std::get<0>(return_values) = NETWORK::NETWORK_START_USER_CONTENT_PERMISSIONS_CHECK(&netHandle); - std::get<1>(return_values) = netHandle; - - return return_values; + auto retval = NETWORK::NETWORK_START_USER_CONTENT_PERMISSIONS_CHECK((Any*)netHandle); + return retval; } static void LUA_NATIVE_NETWORK_NETWORK_SKIP_RADIO_RESET_NEXT_CLOSE() @@ -5155,16 +4846,14 @@ namespace lua::native NETWORK::NETWORK_DUMP_NET_IF_CONFIG(); } - static Any LUA_NATIVE_NETWORK_NETWORK_GET_SIGNALLING_INFO(Any p0) + static void LUA_NATIVE_NETWORK_NETWORK_GET_SIGNALLING_INFO(uintptr_t p0) { - NETWORK::NETWORK_GET_SIGNALLING_INFO(&p0); - return p0; + NETWORK::NETWORK_GET_SIGNALLING_INFO((Any*)p0); } - static Any LUA_NATIVE_NETWORK_NETWORK_GET_NET_STATISTICS_INFO(Any p0) + static void LUA_NATIVE_NETWORK_NETWORK_GET_NET_STATISTICS_INFO(uintptr_t p0) { - NETWORK::NETWORK_GET_NET_STATISTICS_INFO(&p0); - return p0; + NETWORK::NETWORK_GET_NET_STATISTICS_INFO((Any*)p0); } static int LUA_NATIVE_NETWORK_NETWORK_GET_PLAYER_ACCOUNT_ID(Player player) diff --git a/src/lua/natives/lua_native_binding_PATHFIND.cpp b/src/lua/natives/lua_native_binding_PATHFIND.cpp index b71d447d..1a4270cd 100644 --- a/src/lua/natives/lua_native_binding_PATHFIND.cpp +++ b/src/lua/natives/lua_native_binding_PATHFIND.cpp @@ -135,15 +135,13 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_PATHFIND_GET_CLOSEST_ROAD(float x, float y, float z, float p3, int p4, Vector3 p5, Vector3 p6, Any p7, Any p8, float p9, bool p10) + static std::tuple LUA_NATIVE_PATHFIND_GET_CLOSEST_ROAD(float x, float y, float z, float p3, int p4, Vector3 p5, Vector3 p6, uintptr_t p7, uintptr_t p8, float p9, bool p10) { - std::tuple return_values; - std::get<0>(return_values) = (bool)PATHFIND::GET_CLOSEST_ROAD(x, y, z, p3, p4, &p5, &p6, &p7, &p8, &p9, p10); + std::tuple return_values; + std::get<0>(return_values) = (bool)PATHFIND::GET_CLOSEST_ROAD(x, y, z, p3, p4, &p5, &p6, (Any*)p7, (Any*)p8, &p9, p10); std::get<1>(return_values) = p5; std::get<2>(return_values) = p6; - std::get<3>(return_values) = p7; - std::get<4>(return_values) = p8; - std::get<5>(return_values) = p9; + std::get<3>(return_values) = p9; return return_values; } diff --git a/src/lua/natives/lua_native_binding_PED.cpp b/src/lua/natives/lua_native_binding_PED.cpp index 66e1bb88..f2a34ebf 100644 --- a/src/lua/natives/lua_native_binding_PED.cpp +++ b/src/lua/natives/lua_native_binding_PED.cpp @@ -1030,13 +1030,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_PED_GET_POS_FROM_FIRED_EVENT(Ped ped, int eventType, Any outData) + static bool LUA_NATIVE_PED_GET_POS_FROM_FIRED_EVENT(Ped ped, int eventType, uintptr_t outData) { - std::tuple return_values; - std::get<0>(return_values) = (bool)PED::GET_POS_FROM_FIRED_EVENT(ped, eventType, &outData); - std::get<1>(return_values) = outData; - - return return_values; + auto retval = (bool)PED::GET_POS_FROM_FIRED_EVENT(ped, eventType, (Any*)outData); + return retval; } static void LUA_NATIVE_PED_SET_PED_FIRING_PATTERN(Ped ped, Hash patternHash) @@ -1060,14 +1057,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_PED_GET_GROUP_SIZE(int groupID, Any p1, int sizeInMembers) + static int LUA_NATIVE_PED_GET_GROUP_SIZE(int groupID, uintptr_t p1, int sizeInMembers) { - std::tuple return_values; - PED::GET_GROUP_SIZE(groupID, &p1, &sizeInMembers); - std::get<0>(return_values) = p1; - std::get<1>(return_values) = sizeInMembers; - - return return_values; + PED::GET_GROUP_SIZE(groupID, (Any*)p1, &sizeInMembers); + return sizeInMembers; } static bool LUA_NATIVE_PED_DOES_GROUP_EXIST(int groupId) @@ -1504,14 +1497,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_PED_GET_MP_OUTFIT_DATA_FROM_METADATA(Any p0, Any p1) + static bool LUA_NATIVE_PED_GET_MP_OUTFIT_DATA_FROM_METADATA(uintptr_t p0, uintptr_t p1) { - std::tuple return_values; - std::get<0>(return_values) = (bool)PED::GET_MP_OUTFIT_DATA_FROM_METADATA(&p0, &p1); - std::get<1>(return_values) = p0; - std::get<2>(return_values) = p1; - - return return_values; + auto retval = (bool)PED::GET_MP_OUTFIT_DATA_FROM_METADATA((Any*)p0, (Any*)p1); + return retval; } static int LUA_NATIVE_PED_GET_FM_MALE_SHOP_PED_APPAREL_ITEM_INDEX(int p0) @@ -1562,13 +1551,10 @@ namespace lua::native PED::SET_PED_HEAD_BLEND_DATA(ped, shapeFirstID, shapeSecondID, shapeThirdID, skinFirstID, skinSecondID, skinThirdID, shapeMix, skinMix, thirdMix, isParent); } - static std::tuple LUA_NATIVE_PED_GET_PED_HEAD_BLEND_DATA(Ped ped, Any headBlendData) + static bool LUA_NATIVE_PED_GET_PED_HEAD_BLEND_DATA(Ped ped, uintptr_t headBlendData) { - std::tuple return_values; - std::get<0>(return_values) = (bool)PED::GET_PED_HEAD_BLEND_DATA(ped, &headBlendData); - std::get<1>(return_values) = headBlendData; - - return return_values; + auto retval = (bool)PED::GET_PED_HEAD_BLEND_DATA(ped, (Any*)headBlendData); + return retval; } static void LUA_NATIVE_PED_UPDATE_PED_HEAD_BLEND_DATA(Ped ped, float shapeMix, float skinMix, float thirdMix) @@ -3067,22 +3053,16 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_PED_GET_PED_NEARBY_VEHICLES(Ped ped, Any sizeAndVehs) + static int LUA_NATIVE_PED_GET_PED_NEARBY_VEHICLES(Ped ped, uintptr_t sizeAndVehs) { - std::tuple return_values; - std::get<0>(return_values) = PED::GET_PED_NEARBY_VEHICLES(ped, &sizeAndVehs); - std::get<1>(return_values) = sizeAndVehs; - - return return_values; + auto retval = PED::GET_PED_NEARBY_VEHICLES(ped, (Any*)sizeAndVehs); + return retval; } - static std::tuple LUA_NATIVE_PED_GET_PED_NEARBY_PEDS(Ped ped, Any sizeAndPeds, int ignore) + static int LUA_NATIVE_PED_GET_PED_NEARBY_PEDS(Ped ped, uintptr_t sizeAndPeds, int ignore) { - std::tuple return_values; - std::get<0>(return_values) = PED::GET_PED_NEARBY_PEDS(ped, &sizeAndPeds, ignore); - std::get<1>(return_values) = sizeAndPeds; - - return return_values; + auto retval = PED::GET_PED_NEARBY_PEDS(ped, (Any*)sizeAndPeds, ignore); + return retval; } static bool LUA_NATIVE_PED_HAVE_ALL_STREAMING_REQUESTS_COMPLETED(Ped ped) diff --git a/src/lua/natives/lua_native_binding_PHYSICS.cpp b/src/lua/natives/lua_native_binding_PHYSICS.cpp index 446999ea..e0564244 100644 --- a/src/lua/natives/lua_native_binding_PHYSICS.cpp +++ b/src/lua/natives/lua_native_binding_PHYSICS.cpp @@ -3,13 +3,10 @@ namespace lua::native { - static std::tuple LUA_NATIVE_PHYSICS_ADD_ROPE(float x, float y, float z, float rotX, float rotY, float rotZ, float length, int ropeType, float maxLength, float minLength, float windingSpeed, bool p11, bool p12, bool rigid, float p14, bool breakWhenShot, Any unkPtr) + static int LUA_NATIVE_PHYSICS_ADD_ROPE(float x, float y, float z, float rotX, float rotY, float rotZ, float length, int ropeType, float maxLength, float minLength, float windingSpeed, bool p11, bool p12, bool rigid, float p14, bool breakWhenShot, uintptr_t unkPtr) { - std::tuple return_values; - std::get<0>(return_values) = PHYSICS::ADD_ROPE(x, y, z, rotX, rotY, rotZ, length, ropeType, maxLength, minLength, windingSpeed, p11, p12, rigid, p14, breakWhenShot, &unkPtr); - std::get<1>(return_values) = unkPtr; - - return return_values; + auto retval = PHYSICS::ADD_ROPE(x, y, z, rotX, rotY, rotZ, length, ropeType, maxLength, minLength, windingSpeed, p11, p12, rigid, p14, breakWhenShot, (Any*)unkPtr); + return retval; } static int LUA_NATIVE_PHYSICS_DELETE_ROPE(int ropeId) @@ -65,14 +62,9 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_PHYSICS_ATTACH_ENTITIES_TO_ROPE(int ropeId, Entity ent1, Entity ent2, float ent1_x, float ent1_y, float ent1_z, float ent2_x, float ent2_y, float ent2_z, float length, bool p10, bool p11, Any p12, Any p13) + static void LUA_NATIVE_PHYSICS_ATTACH_ENTITIES_TO_ROPE(int ropeId, Entity ent1, Entity ent2, float ent1_x, float ent1_y, float ent1_z, float ent2_x, float ent2_y, float ent2_z, float length, bool p10, bool p11, uintptr_t p12, uintptr_t p13) { - std::tuple return_values; - PHYSICS::ATTACH_ENTITIES_TO_ROPE(ropeId, ent1, ent2, ent1_x, ent1_y, ent1_z, ent2_x, ent2_y, ent2_z, length, p10, p11, &p12, &p13); - std::get<0>(return_values) = p12; - std::get<1>(return_values) = p13; - - return return_values; + PHYSICS::ATTACH_ENTITIES_TO_ROPE(ropeId, ent1, ent2, ent1_x, ent1_y, ent1_z, ent2_x, ent2_y, ent2_z, length, p10, p11, (Any*)p12, (Any*)p13); } static void LUA_NATIVE_PHYSICS_ATTACH_ROPE_TO_ENTITY(int ropeId, Entity entity, float x, float y, float z, bool p5) diff --git a/src/lua/natives/lua_native_binding_SAVEMIGRATION.cpp b/src/lua/natives/lua_native_binding_SAVEMIGRATION.cpp index 715ed9de..7edbf3ec 100644 --- a/src/lua/natives/lua_native_binding_SAVEMIGRATION.cpp +++ b/src/lua/natives/lua_native_binding_SAVEMIGRATION.cpp @@ -27,13 +27,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_SAVEMIGRATION_SAVEMIGRATION_MP_GET_ACCOUNT(int p0, Any p1) + static bool LUA_NATIVE_SAVEMIGRATION_SAVEMIGRATION_MP_GET_ACCOUNT(int p0, uintptr_t p1) { - std::tuple return_values; - std::get<0>(return_values) = (bool)SAVEMIGRATION::SAVEMIGRATION_MP_GET_ACCOUNT(p0, &p1); - std::get<1>(return_values) = p1; - - return return_values; + auto retval = (bool)SAVEMIGRATION::SAVEMIGRATION_MP_GET_ACCOUNT(p0, (Any*)p1); + return retval; } static bool LUA_NATIVE_SAVEMIGRATION_SAVEMIGRATION_MP_REQUEST_STATUS() diff --git a/src/lua/natives/lua_native_binding_SCRIPT.cpp b/src/lua/natives/lua_native_binding_SCRIPT.cpp index 7fe1152b..3c67521a 100644 --- a/src/lua/natives/lua_native_binding_SCRIPT.cpp +++ b/src/lua/natives/lua_native_binding_SCRIPT.cpp @@ -122,19 +122,15 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_SCRIPT_GET_EVENT_DATA(int eventGroup, int eventIndex, Any eventData, int eventDataSize) + static bool LUA_NATIVE_SCRIPT_GET_EVENT_DATA(int eventGroup, int eventIndex, uintptr_t eventData, int eventDataSize) { - std::tuple return_values; - std::get<0>(return_values) = (bool)SCRIPT::GET_EVENT_DATA(eventGroup, eventIndex, &eventData, eventDataSize); - std::get<1>(return_values) = eventData; - - return return_values; + auto retval = (bool)SCRIPT::GET_EVENT_DATA(eventGroup, eventIndex, (Any*)eventData, eventDataSize); + return retval; } - static Any LUA_NATIVE_SCRIPT_TRIGGER_SCRIPT_EVENT(int eventGroup, Any eventData, int eventDataSize, int playerBits) + static void LUA_NATIVE_SCRIPT_TRIGGER_SCRIPT_EVENT(int eventGroup, uintptr_t eventData, int eventDataSize, int playerBits) { - SCRIPT::TRIGGER_SCRIPT_EVENT(eventGroup, &eventData, eventDataSize, playerBits); - return eventData; + SCRIPT::TRIGGER_SCRIPT_EVENT(eventGroup, (Any*)eventData, eventDataSize, playerBits); } static void LUA_NATIVE_SCRIPT_SHUTDOWN_LOADING_SCREEN() @@ -207,10 +203,9 @@ namespace lua::native return retval; } - static Any LUA_NATIVE_SCRIPT_SEND_TU_SCRIPT_EVENT_NEW_(int eventGroup, Any eventData, int eventDataSize, int playerBits, Hash eventType) + static void LUA_NATIVE_SCRIPT_SEND_TU_SCRIPT_EVENT_NEW_(int eventGroup, uintptr_t eventData, int eventDataSize, int playerBits, Hash eventType) { - SCRIPT::_SEND_TU_SCRIPT_EVENT_NEW(eventGroup, &eventData, eventDataSize, playerBits, eventType); - return eventData; + SCRIPT::_SEND_TU_SCRIPT_EVENT_NEW(eventGroup, (Any*)eventData, eventDataSize, playerBits, eventType); } void init_native_binding_SCRIPT(sol::state& L) diff --git a/src/lua/natives/lua_native_binding_SECURITY.cpp b/src/lua/natives/lua_native_binding_SECURITY.cpp index 3886ca06..74a03eca 100644 --- a/src/lua/natives/lua_native_binding_SECURITY.cpp +++ b/src/lua/natives/lua_native_binding_SECURITY.cpp @@ -3,16 +3,14 @@ namespace lua::native { - static Any LUA_NATIVE_SECURITY_REGISTER_SCRIPT_VARIABLE(Any variable) + static void LUA_NATIVE_SECURITY_REGISTER_SCRIPT_VARIABLE(uintptr_t variable) { - SECURITY::REGISTER_SCRIPT_VARIABLE(&variable); - return variable; + SECURITY::REGISTER_SCRIPT_VARIABLE((Any*)variable); } - static Any LUA_NATIVE_SECURITY_UNREGISTER_SCRIPT_VARIABLE(Any variable) + static void LUA_NATIVE_SECURITY_UNREGISTER_SCRIPT_VARIABLE(uintptr_t variable) { - SECURITY::UNREGISTER_SCRIPT_VARIABLE(&variable); - return variable; + SECURITY::UNREGISTER_SCRIPT_VARIABLE((Any*)variable); } static void LUA_NATIVE_SECURITY_FORCE_CHECK_SCRIPT_VARIABLES() diff --git a/src/lua/natives/lua_native_binding_SOCIALCLUB.cpp b/src/lua/natives/lua_native_binding_SOCIALCLUB.cpp index 1f88daa9..80daf0db 100644 --- a/src/lua/natives/lua_native_binding_SOCIALCLUB.cpp +++ b/src/lua/natives/lua_native_binding_SOCIALCLUB.cpp @@ -63,34 +63,26 @@ namespace lua::native return retval; } - static Any LUA_NATIVE_SOCIALCLUB_SC_INBOX_MESSAGE_PUSH_GAMER_T0_RECIP_LIST(Any gamerHandle) + static void LUA_NATIVE_SOCIALCLUB_SC_INBOX_MESSAGE_PUSH_GAMER_T0_RECIP_LIST(uintptr_t gamerHandle) { - SOCIALCLUB::SC_INBOX_MESSAGE_PUSH_GAMER_T0_RECIP_LIST(&gamerHandle); - return gamerHandle; + SOCIALCLUB::SC_INBOX_MESSAGE_PUSH_GAMER_T0_RECIP_LIST((Any*)gamerHandle); } - static Any LUA_NATIVE_SOCIALCLUB_SC_INBOX_SEND_UGCSTATUPDATE_TO_RECIP_LIST(Any data) + static void LUA_NATIVE_SOCIALCLUB_SC_INBOX_SEND_UGCSTATUPDATE_TO_RECIP_LIST(uintptr_t data) { - SOCIALCLUB::SC_INBOX_SEND_UGCSTATUPDATE_TO_RECIP_LIST(&data); - return data; + SOCIALCLUB::SC_INBOX_SEND_UGCSTATUPDATE_TO_RECIP_LIST((Any*)data); } - static std::tuple LUA_NATIVE_SOCIALCLUB_SC_INBOX_MESSAGE_GET_UGCDATA(int p0, Any p1) + static bool LUA_NATIVE_SOCIALCLUB_SC_INBOX_MESSAGE_GET_UGCDATA(int p0, uintptr_t p1) { - std::tuple return_values; - std::get<0>(return_values) = (bool)SOCIALCLUB::SC_INBOX_MESSAGE_GET_UGCDATA(p0, &p1); - std::get<1>(return_values) = p1; - - return return_values; + auto retval = (bool)SOCIALCLUB::SC_INBOX_MESSAGE_GET_UGCDATA(p0, (Any*)p1); + return retval; } - static std::tuple LUA_NATIVE_SOCIALCLUB_SC_INBOX_GET_BOUNTY_DATA_AT_INDEX(int index, Any outData) + static bool LUA_NATIVE_SOCIALCLUB_SC_INBOX_GET_BOUNTY_DATA_AT_INDEX(int index, uintptr_t outData) { - std::tuple return_values; - std::get<0>(return_values) = (bool)SOCIALCLUB::SC_INBOX_GET_BOUNTY_DATA_AT_INDEX(index, &outData); - std::get<1>(return_values) = outData; - - return return_values; + auto retval = (bool)SOCIALCLUB::SC_INBOX_GET_BOUNTY_DATA_AT_INDEX(index, (Any*)outData); + return retval; } static void LUA_NATIVE_SOCIALCLUB_SC_EMAIL_RETRIEVE_EMAILS(int offset, int limit) @@ -110,25 +102,20 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_SOCIALCLUB_SC_EMAIL_GET_EMAIL_AT_INDEX(int p0, Any p1) + static bool LUA_NATIVE_SOCIALCLUB_SC_EMAIL_GET_EMAIL_AT_INDEX(int p0, uintptr_t p1) { - std::tuple return_values; - std::get<0>(return_values) = (bool)SOCIALCLUB::SC_EMAIL_GET_EMAIL_AT_INDEX(p0, &p1); - std::get<1>(return_values) = p1; - - return return_values; + auto retval = (bool)SOCIALCLUB::SC_EMAIL_GET_EMAIL_AT_INDEX(p0, (Any*)p1); + return retval; } - static Any LUA_NATIVE_SOCIALCLUB_SC_EMAIL_DELETE_EMAILS(Any p0, Any p1) + static void LUA_NATIVE_SOCIALCLUB_SC_EMAIL_DELETE_EMAILS(uintptr_t p0, Any p1) { - SOCIALCLUB::SC_EMAIL_DELETE_EMAILS(&p0, p1); - return p0; + SOCIALCLUB::SC_EMAIL_DELETE_EMAILS((Any*)p0, p1); } - static Any LUA_NATIVE_SOCIALCLUB_SC_EMAIL_MESSAGE_PUSH_GAMER_TO_RECIP_LIST(Any gamerHandle) + static void LUA_NATIVE_SOCIALCLUB_SC_EMAIL_MESSAGE_PUSH_GAMER_TO_RECIP_LIST(uintptr_t gamerHandle) { - SOCIALCLUB::SC_EMAIL_MESSAGE_PUSH_GAMER_TO_RECIP_LIST(&gamerHandle); - return gamerHandle; + SOCIALCLUB::SC_EMAIL_MESSAGE_PUSH_GAMER_TO_RECIP_LIST((Any*)gamerHandle); } static void LUA_NATIVE_SOCIALCLUB_SC_EMAIL_MESSAGE_CLEAR_RECIP_LIST() @@ -311,21 +298,17 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_SOCIALCLUB_SC_LICENSEPLATE_SET_PLATE_DATA(sol::stack_object oldPlateText, sol::stack_object newPlateText, Any plateData) + static bool LUA_NATIVE_SOCIALCLUB_SC_LICENSEPLATE_SET_PLATE_DATA(sol::stack_object oldPlateText, sol::stack_object newPlateText, uintptr_t plateData) { - std::tuple return_values; - std::get<0>(return_values) = (bool)SOCIALCLUB::SC_LICENSEPLATE_SET_PLATE_DATA(oldPlateText.is() ? oldPlateText.as() : nullptr, newPlateText.is() ? newPlateText.as() : nullptr, &plateData); - std::get<1>(return_values) = plateData; - - return return_values; + auto retval = (bool)SOCIALCLUB::SC_LICENSEPLATE_SET_PLATE_DATA(oldPlateText.is() ? oldPlateText.as() : nullptr, newPlateText.is() ? newPlateText.as() : nullptr, (Any*)plateData); + return retval; } - static std::tuple LUA_NATIVE_SOCIALCLUB_SC_LICENSEPLATE_ADD(sol::stack_object plateText, Any plateData, int token) + static std::tuple LUA_NATIVE_SOCIALCLUB_SC_LICENSEPLATE_ADD(sol::stack_object plateText, uintptr_t plateData, int token) { - std::tuple return_values; - std::get<0>(return_values) = (bool)SOCIALCLUB::SC_LICENSEPLATE_ADD(plateText.is() ? plateText.as() : nullptr, &plateData, &token); - std::get<1>(return_values) = plateData; - std::get<2>(return_values) = token; + std::tuple return_values; + std::get<0>(return_values) = (bool)SOCIALCLUB::SC_LICENSEPLATE_ADD(plateText.is() ? plateText.as() : nullptr, (Any*)plateData, &token); + std::get<1>(return_values) = token; return return_values; } diff --git a/src/lua/natives/lua_native_binding_STATS.cpp b/src/lua/natives/lua_native_binding_STATS.cpp index 736f3e10..640cf865 100644 --- a/src/lua/natives/lua_native_binding_STATS.cpp +++ b/src/lua/natives/lua_native_binding_STATS.cpp @@ -137,13 +137,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_STATS_STAT_SET_DATE(Hash statName, Any value, int numFields, bool save) + static bool LUA_NATIVE_STATS_STAT_SET_DATE(Hash statName, uintptr_t value, int numFields, bool save) { - std::tuple return_values; - std::get<0>(return_values) = (bool)STATS::STAT_SET_DATE(statName, &value, numFields, save); - std::get<1>(return_values) = value; - - return return_values; + auto retval = (bool)STATS::STAT_SET_DATE(statName, (Any*)value, numFields, save); + return retval; } static bool LUA_NATIVE_STATS_STAT_SET_STRING(Hash statName, sol::stack_object value, bool save) @@ -203,13 +200,10 @@ namespace lua::native return return_values; } - static std::tuple LUA_NATIVE_STATS_STAT_GET_DATE(Hash statHash, Any outValue, int numFields, Any p3) + static bool LUA_NATIVE_STATS_STAT_GET_DATE(Hash statHash, uintptr_t outValue, int numFields, Any p3) { - std::tuple return_values; - std::get<0>(return_values) = (bool)STATS::STAT_GET_DATE(statHash, &outValue, numFields, p3); - std::get<1>(return_values) = outValue; - - return return_values; + auto retval = (bool)STATS::STAT_GET_DATE(statHash, (Any*)outValue, numFields, p3); + return retval; } static const char* LUA_NATIVE_STATS_STAT_GET_STRING(Hash statHash, int p1) @@ -532,52 +526,24 @@ namespace lua::native STATS::PLAYSTATS_CHEAT_APPLIED(cheat.is() ? cheat.as() : nullptr); } - static std::tuple LUA_NATIVE_STATS_PLAYSTATS_JOB_ACTIVITY_END(Any p0, Any p1, Any p2, Any p3) + static void LUA_NATIVE_STATS_PLAYSTATS_JOB_ACTIVITY_END(uintptr_t p0, uintptr_t p1, uintptr_t p2, uintptr_t p3) { - std::tuple return_values; - STATS::PLAYSTATS_JOB_ACTIVITY_END(&p0, &p1, &p2, &p3); - std::get<0>(return_values) = p0; - std::get<1>(return_values) = p1; - std::get<2>(return_values) = p2; - std::get<3>(return_values) = p3; - - return return_values; + STATS::PLAYSTATS_JOB_ACTIVITY_END((Any*)p0, (Any*)p1, (Any*)p2, (Any*)p3); } - static std::tuple LUA_NATIVE_STATS_PLAYSTATS_JOB_BEND(Any p0, Any p1, Any p2, Any p3) + static void LUA_NATIVE_STATS_PLAYSTATS_JOB_BEND(uintptr_t p0, uintptr_t p1, uintptr_t p2, uintptr_t p3) { - std::tuple return_values; - STATS::PLAYSTATS_JOB_BEND(&p0, &p1, &p2, &p3); - std::get<0>(return_values) = p0; - std::get<1>(return_values) = p1; - std::get<2>(return_values) = p2; - std::get<3>(return_values) = p3; - - return return_values; + STATS::PLAYSTATS_JOB_BEND((Any*)p0, (Any*)p1, (Any*)p2, (Any*)p3); } - static std::tuple LUA_NATIVE_STATS_PLAYSTATS_JOB_LTS_END(Any p0, Any p1, Any p2, Any p3) + static void LUA_NATIVE_STATS_PLAYSTATS_JOB_LTS_END(uintptr_t p0, uintptr_t p1, uintptr_t p2, uintptr_t p3) { - std::tuple return_values; - STATS::PLAYSTATS_JOB_LTS_END(&p0, &p1, &p2, &p3); - std::get<0>(return_values) = p0; - std::get<1>(return_values) = p1; - std::get<2>(return_values) = p2; - std::get<3>(return_values) = p3; - - return return_values; + STATS::PLAYSTATS_JOB_LTS_END((Any*)p0, (Any*)p1, (Any*)p2, (Any*)p3); } - static std::tuple LUA_NATIVE_STATS_PLAYSTATS_JOB_LTS_ROUND_END(Any p0, Any p1, Any p2, Any p3) + static void LUA_NATIVE_STATS_PLAYSTATS_JOB_LTS_ROUND_END(uintptr_t p0, uintptr_t p1, uintptr_t p2, uintptr_t p3) { - std::tuple return_values; - STATS::PLAYSTATS_JOB_LTS_ROUND_END(&p0, &p1, &p2, &p3); - std::get<0>(return_values) = p0; - std::get<1>(return_values) = p1; - std::get<2>(return_values) = p2; - std::get<3>(return_values) = p3; - - return return_values; + STATS::PLAYSTATS_JOB_LTS_ROUND_END((Any*)p0, (Any*)p1, (Any*)p2, (Any*)p3); } static void LUA_NATIVE_STATS_PLAYSTATS_QUICKFIX_TOOL(int element, sol::stack_object item) @@ -600,10 +566,9 @@ namespace lua::native STATS::PLAYSTATS_HEIST_SAVE_CHEAT(hash, p1); } - static Any LUA_NATIVE_STATS_PLAYSTATS_APPEND_DIRECTOR_METRIC(Any p0) + static void LUA_NATIVE_STATS_PLAYSTATS_APPEND_DIRECTOR_METRIC(uintptr_t p0) { - STATS::PLAYSTATS_APPEND_DIRECTOR_METRIC(&p0); - return p0; + STATS::PLAYSTATS_APPEND_DIRECTOR_METRIC((Any*)p0); } static void LUA_NATIVE_STATS_PLAYSTATS_AWARD_BAD_SPORT(int id) @@ -686,10 +651,9 @@ namespace lua::native STATS::PLAYSTATS_FM_EVENT_HUNTBEAST(p0); } - static Any LUA_NATIVE_STATS_PLAYSTATS_PIMENU_HIDE_OPTIONS(Any data) + static void LUA_NATIVE_STATS_PLAYSTATS_PIMENU_HIDE_OPTIONS(uintptr_t data) { - STATS::PLAYSTATS_PIMENU_HIDE_OPTIONS(&data); - return data; + STATS::PLAYSTATS_PIMENU_HIDE_OPTIONS((Any*)data); } static int LUA_NATIVE_STATS_LEADERBOARDS_GET_NUMBER_OF_COLUMNS(int p0, Any p1) @@ -740,90 +704,58 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_STATS_LEADERBOARDS2_READ_FRIENDS_BY_ROW(Any p0, Any p1, Any p2, bool p3, Any p4, Any p5) + static bool LUA_NATIVE_STATS_LEADERBOARDS2_READ_FRIENDS_BY_ROW(uintptr_t p0, uintptr_t p1, Any p2, bool p3, Any p4, Any p5) { - std::tuple return_values; - std::get<0>(return_values) = (bool)STATS::LEADERBOARDS2_READ_FRIENDS_BY_ROW(&p0, &p1, p2, p3, p4, p5); - std::get<1>(return_values) = p0; - std::get<2>(return_values) = p1; - - return return_values; + auto retval = (bool)STATS::LEADERBOARDS2_READ_FRIENDS_BY_ROW((Any*)p0, (Any*)p1, p2, p3, p4, p5); + return retval; } - static std::tuple LUA_NATIVE_STATS_LEADERBOARDS2_READ_BY_HANDLE(Any p0, Any p1) + static bool LUA_NATIVE_STATS_LEADERBOARDS2_READ_BY_HANDLE(uintptr_t p0, uintptr_t p1) { - std::tuple return_values; - std::get<0>(return_values) = (bool)STATS::LEADERBOARDS2_READ_BY_HANDLE(&p0, &p1); - std::get<1>(return_values) = p0; - std::get<2>(return_values) = p1; - - return return_values; + auto retval = (bool)STATS::LEADERBOARDS2_READ_BY_HANDLE((Any*)p0, (Any*)p1); + return retval; } - static std::tuple LUA_NATIVE_STATS_LEADERBOARDS2_READ_BY_RANK(Any p0, Any p1, Any p2) + static bool LUA_NATIVE_STATS_LEADERBOARDS2_READ_BY_RANK(uintptr_t p0, Any p1, Any p2) { - std::tuple return_values; - std::get<0>(return_values) = (bool)STATS::LEADERBOARDS2_READ_BY_RANK(&p0, p1, p2); - std::get<1>(return_values) = p0; - - return return_values; + auto retval = (bool)STATS::LEADERBOARDS2_READ_BY_RANK((Any*)p0, p1, p2); + return retval; } - static std::tuple LUA_NATIVE_STATS_LEADERBOARDS2_READ_BY_RADIUS(Any p0, Any p1, Any p2) + static bool LUA_NATIVE_STATS_LEADERBOARDS2_READ_BY_RADIUS(uintptr_t p0, Any p1, uintptr_t p2) { - std::tuple return_values; - std::get<0>(return_values) = (bool)STATS::LEADERBOARDS2_READ_BY_RADIUS(&p0, p1, &p2); - std::get<1>(return_values) = p0; - std::get<2>(return_values) = p2; - - return return_values; + auto retval = (bool)STATS::LEADERBOARDS2_READ_BY_RADIUS((Any*)p0, p1, (Any*)p2); + return retval; } - static std::tuple LUA_NATIVE_STATS_LEADERBOARDS2_READ_BY_SCORE_INT(Any p0, Any p1, Any p2) + static bool LUA_NATIVE_STATS_LEADERBOARDS2_READ_BY_SCORE_INT(uintptr_t p0, Any p1, Any p2) { - std::tuple return_values; - std::get<0>(return_values) = (bool)STATS::LEADERBOARDS2_READ_BY_SCORE_INT(&p0, p1, p2); - std::get<1>(return_values) = p0; - - return return_values; + auto retval = (bool)STATS::LEADERBOARDS2_READ_BY_SCORE_INT((Any*)p0, p1, p2); + return retval; } - static std::tuple LUA_NATIVE_STATS_LEADERBOARDS2_READ_BY_SCORE_FLOAT(Any p0, float p1, Any p2) + static bool LUA_NATIVE_STATS_LEADERBOARDS2_READ_BY_SCORE_FLOAT(uintptr_t p0, float p1, Any p2) { - std::tuple return_values; - std::get<0>(return_values) = (bool)STATS::LEADERBOARDS2_READ_BY_SCORE_FLOAT(&p0, p1, p2); - std::get<1>(return_values) = p0; - - return return_values; + auto retval = (bool)STATS::LEADERBOARDS2_READ_BY_SCORE_FLOAT((Any*)p0, p1, p2); + return retval; } - static std::tuple LUA_NATIVE_STATS_LEADERBOARDS2_READ_RANK_PREDICTION(Any p0, Any p1, Any p2) + static bool LUA_NATIVE_STATS_LEADERBOARDS2_READ_RANK_PREDICTION(uintptr_t p0, uintptr_t p1, uintptr_t p2) { - std::tuple return_values; - std::get<0>(return_values) = (bool)STATS::LEADERBOARDS2_READ_RANK_PREDICTION(&p0, &p1, &p2); - std::get<1>(return_values) = p0; - std::get<2>(return_values) = p1; - std::get<3>(return_values) = p2; - - return return_values; + auto retval = (bool)STATS::LEADERBOARDS2_READ_RANK_PREDICTION((Any*)p0, (Any*)p1, (Any*)p2); + return retval; } - static std::tuple LUA_NATIVE_STATS_LEADERBOARDS2_READ_BY_PLAFORM(Any p0, sol::stack_object gamerHandleCsv, sol::stack_object platformName) + static bool LUA_NATIVE_STATS_LEADERBOARDS2_READ_BY_PLAFORM(uintptr_t p0, sol::stack_object gamerHandleCsv, sol::stack_object platformName) { - std::tuple return_values; - std::get<0>(return_values) = (bool)STATS::LEADERBOARDS2_READ_BY_PLAFORM(&p0, gamerHandleCsv.is() ? gamerHandleCsv.as() : nullptr, platformName.is() ? platformName.as() : nullptr); - std::get<1>(return_values) = p0; - - return return_values; + auto retval = (bool)STATS::LEADERBOARDS2_READ_BY_PLAFORM((Any*)p0, gamerHandleCsv.is() ? gamerHandleCsv.as() : nullptr, platformName.is() ? platformName.as() : nullptr); + return retval; } - static std::tuple LUA_NATIVE_STATS_LEADERBOARDS2_READ_GET_ROW_DATA_START(Any p0) + static bool LUA_NATIVE_STATS_LEADERBOARDS2_READ_GET_ROW_DATA_START(uintptr_t p0) { - std::tuple return_values; - std::get<0>(return_values) = (bool)STATS::LEADERBOARDS2_READ_GET_ROW_DATA_START(&p0); - std::get<1>(return_values) = p0; - - return return_values; + auto retval = (bool)STATS::LEADERBOARDS2_READ_GET_ROW_DATA_START((Any*)p0); + return retval; } static void LUA_NATIVE_STATS_LEADERBOARDS2_READ_GET_ROW_DATA_END() @@ -831,13 +763,10 @@ namespace lua::native STATS::LEADERBOARDS2_READ_GET_ROW_DATA_END(); } - static std::tuple LUA_NATIVE_STATS_LEADERBOARDS2_READ_GET_ROW_DATA_INFO(Any p0, Any p1) + static bool LUA_NATIVE_STATS_LEADERBOARDS2_READ_GET_ROW_DATA_INFO(Any p0, uintptr_t p1) { - std::tuple return_values; - std::get<0>(return_values) = (bool)STATS::LEADERBOARDS2_READ_GET_ROW_DATA_INFO(p0, &p1); - std::get<1>(return_values) = p1; - - return return_values; + auto retval = (bool)STATS::LEADERBOARDS2_READ_GET_ROW_DATA_INFO(p0, (Any*)p1); + return retval; } static int LUA_NATIVE_STATS_LEADERBOARDS2_READ_GET_ROW_DATA_INT(Any p0, Any p1) @@ -852,13 +781,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_STATS_LEADERBOARDS2_WRITE_DATA(Any p0) + static bool LUA_NATIVE_STATS_LEADERBOARDS2_WRITE_DATA(uintptr_t p0) { - std::tuple return_values; - std::get<0>(return_values) = (bool)STATS::LEADERBOARDS2_WRITE_DATA(&p0); - std::get<1>(return_values) = p0; - - return return_values; + auto retval = (bool)STATS::LEADERBOARDS2_WRITE_DATA((Any*)p0); + return retval; } static void LUA_NATIVE_STATS_LEADERBOARDS_WRITE_ADD_COLUMN(Any p0, Any p1, float p2) @@ -871,13 +797,10 @@ namespace lua::native STATS::LEADERBOARDS_WRITE_ADD_COLUMN_LONG(p0, p1, p2); } - static std::tuple LUA_NATIVE_STATS_LEADERBOARDS_CACHE_DATA_ROW(Any p0) + static bool LUA_NATIVE_STATS_LEADERBOARDS_CACHE_DATA_ROW(uintptr_t p0) { - std::tuple return_values; - std::get<0>(return_values) = (bool)STATS::LEADERBOARDS_CACHE_DATA_ROW(&p0); - std::get<1>(return_values) = p0; - - return return_values; + auto retval = (bool)STATS::LEADERBOARDS_CACHE_DATA_ROW((Any*)p0); + return retval; } static void LUA_NATIVE_STATS_LEADERBOARDS_CLEAR_CACHE_DATA() @@ -908,13 +831,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_STATS_LEADERBOARDS_GET_CACHE_DATA_ROW(Any p0, Any p1, Any p2) + static bool LUA_NATIVE_STATS_LEADERBOARDS_GET_CACHE_DATA_ROW(Any p0, Any p1, uintptr_t p2) { - std::tuple return_values; - std::get<0>(return_values) = (bool)STATS::LEADERBOARDS_GET_CACHE_DATA_ROW(p0, p1, &p2); - std::get<1>(return_values) = p2; - - return return_values; + auto retval = (bool)STATS::LEADERBOARDS_GET_CACHE_DATA_ROW(p0, p1, (Any*)p2); + return retval; } static void LUA_NATIVE_STATS_PRESENCE_EVENT_UPDATESTAT_INT(Hash statHash, int value, int p2) @@ -993,14 +913,10 @@ namespace lua::native STATS::STAT_SET_CHEAT_IS_ACTIVE(); } - static std::tuple LUA_NATIVE_STATS_LEADERBOARDS2_WRITE_DATA_FOR_EVENT_TYPE(Any p0, Any p1) + static bool LUA_NATIVE_STATS_LEADERBOARDS2_WRITE_DATA_FOR_EVENT_TYPE(uintptr_t p0, uintptr_t p1) { - std::tuple return_values; - std::get<0>(return_values) = (bool)STATS::LEADERBOARDS2_WRITE_DATA_FOR_EVENT_TYPE(&p0, &p1); - std::get<1>(return_values) = p0; - std::get<2>(return_values) = p1; - - return return_values; + auto retval = (bool)STATS::LEADERBOARDS2_WRITE_DATA_FOR_EVENT_TYPE((Any*)p0, (Any*)p1); + return retval; } static void LUA_NATIVE_STATS_FORCE_CLOUD_MP_STATS_DOWNLOAD_AND_OVERWRITE_LOCAL_SAVE() @@ -1043,22 +959,16 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_STATS_STAT_MIGRATE_CHECK_GET_PLATFORM_STATUS(int p0, Any p1) + static int LUA_NATIVE_STATS_STAT_MIGRATE_CHECK_GET_PLATFORM_STATUS(int p0, uintptr_t p1) { - std::tuple return_values; - std::get<0>(return_values) = STATS::STAT_MIGRATE_CHECK_GET_PLATFORM_STATUS(p0, &p1); - std::get<1>(return_values) = p1; - - return return_values; + auto retval = STATS::STAT_MIGRATE_CHECK_GET_PLATFORM_STATUS(p0, (Any*)p1); + return retval; } - static std::tuple LUA_NATIVE_STATS_STAT_GET_SAVE_MIGRATION_STATUS(Any data) + static int LUA_NATIVE_STATS_STAT_GET_SAVE_MIGRATION_STATUS(uintptr_t data) { - std::tuple return_values; - std::get<0>(return_values) = STATS::STAT_GET_SAVE_MIGRATION_STATUS(&data); - std::get<1>(return_values) = data; - - return return_values; + auto retval = STATS::STAT_GET_SAVE_MIGRATION_STATUS((Any*)data); + return retval; } static bool LUA_NATIVE_STATS_STAT_SAVE_MIGRATION_CANCEL_PENDING_OPERATION() @@ -1317,28 +1227,24 @@ namespace lua::native STATS::PLAYSTATS_SPENT_PI_CUSTOM_LOADOUT(amount); } - static Any LUA_NATIVE_STATS_PLAYSTATS_BUY_CONTRABAND_MISSION(Any data) + static void LUA_NATIVE_STATS_PLAYSTATS_BUY_CONTRABAND_MISSION(uintptr_t data) { - STATS::PLAYSTATS_BUY_CONTRABAND_MISSION(&data); - return data; + STATS::PLAYSTATS_BUY_CONTRABAND_MISSION((Any*)data); } - static Any LUA_NATIVE_STATS_PLAYSTATS_SELL_CONTRABAND_MISSION(Any data) + static void LUA_NATIVE_STATS_PLAYSTATS_SELL_CONTRABAND_MISSION(uintptr_t data) { - STATS::PLAYSTATS_SELL_CONTRABAND_MISSION(&data); - return data; + STATS::PLAYSTATS_SELL_CONTRABAND_MISSION((Any*)data); } - static Any LUA_NATIVE_STATS_PLAYSTATS_DEFEND_CONTRABAND_MISSION(Any data) + static void LUA_NATIVE_STATS_PLAYSTATS_DEFEND_CONTRABAND_MISSION(uintptr_t data) { - STATS::PLAYSTATS_DEFEND_CONTRABAND_MISSION(&data); - return data; + STATS::PLAYSTATS_DEFEND_CONTRABAND_MISSION((Any*)data); } - static Any LUA_NATIVE_STATS_PLAYSTATS_RECOVER_CONTRABAND_MISSION(Any data) + static void LUA_NATIVE_STATS_PLAYSTATS_RECOVER_CONTRABAND_MISSION(uintptr_t data) { - STATS::PLAYSTATS_RECOVER_CONTRABAND_MISSION(&data); - return data; + STATS::PLAYSTATS_RECOVER_CONTRABAND_MISSION((Any*)data); } static void LUA_NATIVE_STATS_PLAYSTATS_HIT_CONTRABAND_DESTROY_LIMIT(Any p0) @@ -1476,10 +1382,9 @@ namespace lua::native STATS::PLAYSTATS_COPY_RANK_INTO_NEW_SLOT(p0, p1, p2, p3, p4, p5, p6); } - static Any LUA_NATIVE_STATS_PLAYSTATS_DUPE_DETECTED(Any data) + static void LUA_NATIVE_STATS_PLAYSTATS_DUPE_DETECTED(uintptr_t data) { - STATS::PLAYSTATS_DUPE_DETECTED(&data); - return data; + STATS::PLAYSTATS_DUPE_DETECTED((Any*)data); } static void LUA_NATIVE_STATS_PLAYSTATS_BAN_ALERT(int p0) @@ -1487,10 +1392,9 @@ namespace lua::native STATS::PLAYSTATS_BAN_ALERT(p0); } - static Any LUA_NATIVE_STATS_PLAYSTATS_GUNRUNNING_MISSION_ENDED(Any data) + static void LUA_NATIVE_STATS_PLAYSTATS_GUNRUNNING_MISSION_ENDED(uintptr_t data) { - STATS::PLAYSTATS_GUNRUNNING_MISSION_ENDED(&data); - return data; + STATS::PLAYSTATS_GUNRUNNING_MISSION_ENDED((Any*)data); } static void LUA_NATIVE_STATS_PLAYSTATS_GUNRUNNING_RND(Any p0) @@ -1523,40 +1427,34 @@ namespace lua::native STATS::PLAYSTATS_MINIGAME_USAGE(p0, p1, p2); } - static Any LUA_NATIVE_STATS_PLAYSTATS_STONE_HATCHET_ENDED(Any data) + static void LUA_NATIVE_STATS_PLAYSTATS_STONE_HATCHET_ENDED(uintptr_t data) { - STATS::PLAYSTATS_STONE_HATCHET_ENDED(&data); - return data; + STATS::PLAYSTATS_STONE_HATCHET_ENDED((Any*)data); } - static Any LUA_NATIVE_STATS_PLAYSTATS_SMUGGLER_MISSION_ENDED(Any data) + static void LUA_NATIVE_STATS_PLAYSTATS_SMUGGLER_MISSION_ENDED(uintptr_t data) { - STATS::PLAYSTATS_SMUGGLER_MISSION_ENDED(&data); - return data; + STATS::PLAYSTATS_SMUGGLER_MISSION_ENDED((Any*)data); } - static Any LUA_NATIVE_STATS_PLAYSTATS_FM_HEIST_PREP_ENDED(Any data) + static void LUA_NATIVE_STATS_PLAYSTATS_FM_HEIST_PREP_ENDED(uintptr_t data) { - STATS::PLAYSTATS_FM_HEIST_PREP_ENDED(&data); - return data; + STATS::PLAYSTATS_FM_HEIST_PREP_ENDED((Any*)data); } - static Any LUA_NATIVE_STATS_PLAYSTATS_INSTANCED_HEIST_ENDED(Any data, Any p1, Any p2, Any p3) + static void LUA_NATIVE_STATS_PLAYSTATS_INSTANCED_HEIST_ENDED(uintptr_t data, Any p1, Any p2, Any p3) { - STATS::PLAYSTATS_INSTANCED_HEIST_ENDED(&data, p1, p2, p3); - return data; + STATS::PLAYSTATS_INSTANCED_HEIST_ENDED((Any*)data, p1, p2, p3); } - static Any LUA_NATIVE_STATS_PLAYSTATS_DAR_CHECKPOINT(Any data) + static void LUA_NATIVE_STATS_PLAYSTATS_DAR_CHECKPOINT(uintptr_t data) { - STATS::PLAYSTATS_DAR_CHECKPOINT(&data); - return data; + STATS::PLAYSTATS_DAR_CHECKPOINT((Any*)data); } - static Any LUA_NATIVE_STATS_PLAYSTATS_ENTER_SESSION_PACK(Any data) + static void LUA_NATIVE_STATS_PLAYSTATS_ENTER_SESSION_PACK(uintptr_t data) { - STATS::PLAYSTATS_ENTER_SESSION_PACK(&data); - return data; + STATS::PLAYSTATS_ENTER_SESSION_PACK((Any*)data); } static void LUA_NATIVE_STATS_PLAYSTATS_DRONE_USAGE(int p0, int p1, int p2) @@ -1574,10 +1472,9 @@ namespace lua::native STATS::PLAYSTATS_ARENA_WARS_SPECTATOR(p0, p1, p2, p3, p4); } - static Any LUA_NATIVE_STATS_PLAYSTATS_ARENA_WARS_ENDED(Any data) + static void LUA_NATIVE_STATS_PLAYSTATS_ARENA_WARS_ENDED(uintptr_t data) { - STATS::PLAYSTATS_ARENA_WARS_ENDED(&data); - return data; + STATS::PLAYSTATS_ARENA_WARS_ENDED((Any*)data); } static void LUA_NATIVE_STATS_PLAYSTATS_SWITCH_PASSIVE_MODE(bool p0, int p1, int p2, int p3) @@ -1665,10 +1562,9 @@ namespace lua::native STATS::PLAYSTATS_ARCADE_LOVE_MATCH(p0, p1); } - static Any LUA_NATIVE_STATS_PLAYSTATS_FREEMODE_CASINO_MISSION_ENDED(Any data) + static void LUA_NATIVE_STATS_PLAYSTATS_FREEMODE_CASINO_MISSION_ENDED(uintptr_t data) { - STATS::PLAYSTATS_FREEMODE_CASINO_MISSION_ENDED(&data); - return data; + STATS::PLAYSTATS_FREEMODE_CASINO_MISSION_ENDED((Any*)data); } static void LUA_NATIVE_STATS_PLAYSTATS_HEIST3_DRONE(Any p0) @@ -1681,10 +1577,9 @@ namespace lua::native STATS::PLAYSTATS_HEIST3_HACK(p0, p1, p2, p3, p4, p5); } - static Any LUA_NATIVE_STATS_PLAYSTATS_NPC_PHONE(Any p0) + static void LUA_NATIVE_STATS_PLAYSTATS_NPC_PHONE(uintptr_t p0) { - STATS::PLAYSTATS_NPC_PHONE(&p0); - return p0; + STATS::PLAYSTATS_NPC_PHONE((Any*)p0); } static void LUA_NATIVE_STATS_PLAYSTATS_ARCADE_CABINET(Any p0) @@ -1847,10 +1742,9 @@ namespace lua::native STATS::_PLAYSTATS_RANDOM_EVENT(p0); } - static Any LUA_NATIVE_STATS_PLAYSTATS_ALERT_(Any data) + static void LUA_NATIVE_STATS_PLAYSTATS_ALERT_(uintptr_t data) { - STATS::_PLAYSTATS_ALERT(&data); - return data; + STATS::_PLAYSTATS_ALERT((Any*)data); } static void LUA_NATIVE_STATS_PLAYSTATS_ATTRITION_STAGE_END_(Any p0) @@ -1863,10 +1757,9 @@ namespace lua::native STATS::_PLAYSTATS_SHOWROOM_NAV(p0, p1, entity); } - static Any LUA_NATIVE_STATS_PLAYSTATS_SHOWROOM_OVERVIEW_(Any data) + static void LUA_NATIVE_STATS_PLAYSTATS_SHOWROOM_OVERVIEW_(uintptr_t data) { - STATS::_PLAYSTATS_SHOWROOM_OVERVIEW(&data); - return data; + STATS::_PLAYSTATS_SHOWROOM_OVERVIEW((Any*)data); } void init_native_binding_STATS(sol::state& L) diff --git a/src/lua/natives/lua_native_binding_SYSTEM.cpp b/src/lua/natives/lua_native_binding_SYSTEM.cpp index fe085de5..0cde4455 100644 --- a/src/lua/natives/lua_native_binding_SYSTEM.cpp +++ b/src/lua/natives/lua_native_binding_SYSTEM.cpp @@ -14,13 +14,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_SYSTEM_START_NEW_SCRIPT_WITH_ARGS(sol::stack_object scriptName, Any args, int argCount, int stackSize) + static int LUA_NATIVE_SYSTEM_START_NEW_SCRIPT_WITH_ARGS(sol::stack_object scriptName, uintptr_t args, int argCount, int stackSize) { - std::tuple return_values; - std::get<0>(return_values) = SYSTEM::START_NEW_SCRIPT_WITH_ARGS(scriptName.is() ? scriptName.as() : nullptr, &args, argCount, stackSize); - std::get<1>(return_values) = args; - - return return_values; + auto retval = SYSTEM::START_NEW_SCRIPT_WITH_ARGS(scriptName.is() ? scriptName.as() : nullptr, (Any*)args, argCount, stackSize); + return retval; } static int LUA_NATIVE_SYSTEM_START_NEW_SCRIPT_WITH_NAME_HASH(Hash scriptHash, int stackSize) @@ -29,13 +26,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_SYSTEM_START_NEW_SCRIPT_WITH_NAME_HASH_AND_ARGS(Hash scriptHash, Any args, int argCount, int stackSize) + static int LUA_NATIVE_SYSTEM_START_NEW_SCRIPT_WITH_NAME_HASH_AND_ARGS(Hash scriptHash, uintptr_t args, int argCount, int stackSize) { - std::tuple return_values; - std::get<0>(return_values) = SYSTEM::START_NEW_SCRIPT_WITH_NAME_HASH_AND_ARGS(scriptHash, &args, argCount, stackSize); - std::get<1>(return_values) = args; - - return return_values; + auto retval = SYSTEM::START_NEW_SCRIPT_WITH_NAME_HASH_AND_ARGS(scriptHash, (Any*)args, argCount, stackSize); + return retval; } static int LUA_NATIVE_SYSTEM_TIMERA() diff --git a/src/lua/natives/lua_native_binding_VEHICLE.cpp b/src/lua/natives/lua_native_binding_VEHICLE.cpp index 5b525e08..8aaa59d5 100644 --- a/src/lua/natives/lua_native_binding_VEHICLE.cpp +++ b/src/lua/natives/lua_native_binding_VEHICLE.cpp @@ -3766,13 +3766,10 @@ namespace lua::native return retval; } - static std::tuple LUA_NATIVE_VEHICLE_GET_ALL_VEHICLES(Any vehsStruct) + static int LUA_NATIVE_VEHICLE_GET_ALL_VEHICLES(uintptr_t vehsStruct) { - std::tuple return_values; - std::get<0>(return_values) = VEHICLE::GET_ALL_VEHICLES(&vehsStruct); - std::get<1>(return_values) = vehsStruct; - - return return_values; + auto retval = VEHICLE::GET_ALL_VEHICLES((Any*)vehsStruct); + return retval; } static void LUA_NATIVE_VEHICLE_SET_CARGOBOB_EXTA_PICKUP_RANGE(Any p0, Any p1) diff --git a/src/lua/natives/lua_native_binding_WEAPON.cpp b/src/lua/natives/lua_native_binding_WEAPON.cpp index 10fa00db..dd505ba2 100644 --- a/src/lua/natives/lua_native_binding_WEAPON.cpp +++ b/src/lua/natives/lua_native_binding_WEAPON.cpp @@ -504,22 +504,16 @@ namespace lua::native WEAPON::SET_WEAPON_OBJECT_CAMO_INDEX(weaponObject, p1); } - static std::tuple LUA_NATIVE_WEAPON_GET_WEAPON_HUD_STATS(Hash weaponHash, Any outData) + static bool LUA_NATIVE_WEAPON_GET_WEAPON_HUD_STATS(Hash weaponHash, uintptr_t outData) { - std::tuple return_values; - std::get<0>(return_values) = (bool)WEAPON::GET_WEAPON_HUD_STATS(weaponHash, &outData); - std::get<1>(return_values) = outData; - - return return_values; + auto retval = (bool)WEAPON::GET_WEAPON_HUD_STATS(weaponHash, (Any*)outData); + return retval; } - static std::tuple LUA_NATIVE_WEAPON_GET_WEAPON_COMPONENT_HUD_STATS(Hash componentHash, Any outData) + static bool LUA_NATIVE_WEAPON_GET_WEAPON_COMPONENT_HUD_STATS(Hash componentHash, uintptr_t outData) { - std::tuple return_values; - std::get<0>(return_values) = (bool)WEAPON::GET_WEAPON_COMPONENT_HUD_STATS(componentHash, &outData); - std::get<1>(return_values) = outData; - - return return_values; + auto retval = (bool)WEAPON::GET_WEAPON_COMPONENT_HUD_STATS(componentHash, (Any*)outData); + return retval; } static float LUA_NATIVE_WEAPON_GET_WEAPON_DAMAGE(Hash weaponHash, Hash componentHash)