summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/dds/texture_loader_dds.cpp2
-rw-r--r--modules/enet/SCsub2
-rw-r--r--modules/etc/config.py4
-rw-r--r--modules/freetype/SCsub4
-rw-r--r--modules/gdnative/SCsub2
-rw-r--r--modules/gdnative/gd_native_library_editor.cpp94
-rw-r--r--modules/gdnative/gd_native_library_editor.h39
-rw-r--r--modules/gdnative/gdnative.cpp20
-rw-r--r--modules/gdnative/gdnative.h3
-rw-r--r--modules/gdnative/gdnative/variant.cpp5
-rw-r--r--modules/gdnative/include/gdnative/gdnative.h10
-rw-r--r--modules/gdnative/include/gdnative/variant.h2
-rw-r--r--modules/gdnative/include/gdnative_api_struct.h723
-rw-r--r--modules/gdnative/include/nativescript/godot_nativescript.h4
-rw-r--r--modules/gdnative/nativescript/SCsub3
-rw-r--r--modules/gdnative/register_types.cpp4
-rw-r--r--modules/gdscript/gd_compiler.cpp4
-rw-r--r--modules/gdscript/gd_editor.cpp5
-rw-r--r--modules/gdscript/gd_function.cpp421
-rw-r--r--modules/gdscript/gd_parser.cpp2
-rw-r--r--modules/ogg/SCsub2
-rw-r--r--modules/openssl/SCsub2
-rw-r--r--modules/openssl/stream_peer_openssl.cpp60
-rw-r--r--modules/openssl/stream_peer_openssl.h5
-rw-r--r--modules/opus/SCsub4
-rw-r--r--modules/opus/audio_stream_opus.cpp10
-rw-r--r--modules/opus/audio_stream_opus.h4
-rw-r--r--modules/pvr/texture_loader_pvr.cpp2
-rw-r--r--modules/recast/SCsub6
-rw-r--r--modules/recast/config.py2
-rw-r--r--modules/regex/SCsub2
-rw-r--r--modules/regex/regex.h4
-rw-r--r--modules/squish/SCsub2
-rw-r--r--modules/squish/config.py4
-rw-r--r--modules/stb_vorbis/audio_stream_ogg_vorbis.cpp8
-rw-r--r--modules/stb_vorbis/audio_stream_ogg_vorbis.h4
-rw-r--r--modules/svg/image_loader_svg.cpp10
-rw-r--r--modules/svg/image_loader_svg.h2
-rw-r--r--modules/tga/image_loader_tga.cpp4
-rw-r--r--modules/theora/SCsub6
-rw-r--r--modules/theora/video_stream_theora.cpp4
-rw-r--r--modules/theora/video_stream_theora.h4
-rw-r--r--modules/tinyexr/config.py4
-rw-r--r--modules/visual_script/visual_script.cpp10
-rw-r--r--modules/visual_script/visual_script.h4
-rw-r--r--modules/visual_script/visual_script_editor.cpp60
-rw-r--r--modules/visual_script/visual_script_expression.cpp4
-rw-r--r--modules/visual_script/visual_script_func_nodes.cpp6
-rw-r--r--modules/visual_script/visual_script_nodes.cpp2
-rw-r--r--modules/vorbis/SCsub4
-rw-r--r--modules/vorbis/audio_stream_ogg_vorbis.cpp10
-rw-r--r--modules/vorbis/audio_stream_ogg_vorbis.h4
-rw-r--r--modules/webm/SCsub8
-rw-r--r--modules/webm/libvpx/SCsub2
-rw-r--r--modules/webm/video_stream_webm.cpp6
-rw-r--r--modules/webm/video_stream_webm.h4
-rw-r--r--modules/webp/SCsub2
57 files changed, 1285 insertions, 349 deletions
diff --git a/modules/dds/texture_loader_dds.cpp b/modules/dds/texture_loader_dds.cpp
index 95d93e6af6..ae9daa802f 100644
--- a/modules/dds/texture_loader_dds.cpp
+++ b/modules/dds/texture_loader_dds.cpp
@@ -152,7 +152,7 @@ RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path,
*/
//must avoid this later
- while (f->get_pos() < 128)
+ while (f->get_position() < 128)
f->get_8();
DDSFormat dds_format;
diff --git a/modules/enet/SCsub b/modules/enet/SCsub
index 42a933a66d..4790c5099f 100644
--- a/modules/enet/SCsub
+++ b/modules/enet/SCsub
@@ -7,7 +7,7 @@ Import('env_modules')
env_enet = env_modules.Clone()
-if (env['builtin_enet'] != 'no'):
+if env['builtin_enet']:
thirdparty_dir = "#thirdparty/enet/"
thirdparty_sources = [
"godot.cpp",
diff --git a/modules/etc/config.py b/modules/etc/config.py
index 4b0b01b78e..7dc2cb59c1 100644
--- a/modules/etc/config.py
+++ b/modules/etc/config.py
@@ -6,6 +6,6 @@ def can_build(platform):
def configure(env):
# Tools only, disabled for non-tools
# TODO: Find a cleaner way to achieve that
- if (env["tools"] == "no"):
- env["module_etc_enabled"] = "no"
+ if not env['tools']:
+ env['module_etc_enabled'] = False
env.disabled_modules.append("etc")
diff --git a/modules/freetype/SCsub b/modules/freetype/SCsub
index f22df4407c..19e384af73 100644
--- a/modules/freetype/SCsub
+++ b/modules/freetype/SCsub
@@ -6,7 +6,7 @@ from compat import isbasestring
# Not building in a separate env as scene needs it
# Thirdparty source files
-if (env['builtin_freetype'] != 'no'):
+if env['builtin_freetype']:
thirdparty_dir = "#thirdparty/freetype/"
thirdparty_sources = [
"src/autofit/autofit.c",
@@ -65,7 +65,7 @@ if (env['builtin_freetype'] != 'no'):
env.Append(CPPPATH=[thirdparty_dir, thirdparty_dir + "/include"])
# also requires libpng headers
- if (env['builtin_libpng'] != 'no'):
+ if env['builtin_libpng']:
env.Append(CPPPATH=["#thirdparty/libpng"])
lib = env.Library("freetype_builtin", thirdparty_sources)
diff --git a/modules/gdnative/SCsub b/modules/gdnative/SCsub
index f386f2b542..39f5ec5378 100644
--- a/modules/gdnative/SCsub
+++ b/modules/gdnative/SCsub
@@ -11,7 +11,7 @@ gdn_env.add_source_files(env.modules_sources, "nativescript/*.cpp")
gdn_env.Append(CPPFLAGS=['-DGDAPI_BUILT_IN'])
gdn_env.Append(CPPPATH=['#modules/gdnative/include/'])
-if "platform" in env and env["platform"] == "x11": # there has to be a better solution?
+if "platform" in env and env["platform"] in ["x11", "iphone"]:
env.Append(LINKFLAGS=["-rdynamic"])
env.use_ptrcall = True
diff --git a/modules/gdnative/gd_native_library_editor.cpp b/modules/gdnative/gd_native_library_editor.cpp
index 8aa931d6c9..cc2c2b69a6 100644
--- a/modules/gdnative/gd_native_library_editor.cpp
+++ b/modules/gdnative/gd_native_library_editor.cpp
@@ -1,9 +1,39 @@
+/*************************************************************************/
+/* gd_native_library_editor.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+#ifdef TOOLS_ENABLED
#include "gd_native_library_editor.h"
+
#include "gdnative.h"
void GDNativeLibraryEditor::_find_gdnative_singletons(EditorFileSystemDirectory *p_dir, const Set<String> &enabled_list) {
-
// check children
for (int i = 0; i < p_dir->get_file_count(); i++) {
@@ -17,48 +47,45 @@ void GDNativeLibraryEditor::_find_gdnative_singletons(EditorFileSystemDirectory
if (lib.is_valid() && lib->is_singleton_gdnative()) {
String path = p_dir->get_file_path(i);
TreeItem *ti = libraries->create_item(libraries->get_root());
- ti->set_text(0,path.get_file());
- ti->set_tooltip(0,path);
- ti->set_metadata(0,path);
- ti->set_cell_mode(1,TreeItem::CELL_MODE_RANGE);
- ti->set_text(1,"Disabled,Enabled");
- bool enabled = enabled_list.has(path)?true:false;
-
- ti->set_range(1,enabled?1:0);
- ti->set_custom_color(1,enabled?Color(0,1,0):Color(1,0,0));
+ ti->set_text(0, path.get_file());
+ ti->set_tooltip(0, path);
+ ti->set_metadata(0, path);
+ ti->set_cell_mode(1, TreeItem::CELL_MODE_RANGE);
+ ti->set_text(1, "Disabled,Enabled");
+ bool enabled = enabled_list.has(path) ? true : false;
+
+ ti->set_range(1, enabled ? 1 : 0);
+ ti->set_custom_color(1, enabled ? Color(0, 1, 0) : Color(1, 0, 0));
}
}
// check subdirectories
for (int i = 0; i < p_dir->get_subdir_count(); i++) {
- _find_gdnative_singletons(p_dir->get_subdir(i),enabled_list);
+ _find_gdnative_singletons(p_dir->get_subdir(i), enabled_list);
}
-
-
}
void GDNativeLibraryEditor::_update_libraries() {
- updating=true;
+ updating = true;
libraries->clear();
libraries->create_item(); //rppt
Vector<String> enabled_paths;
if (ProjectSettings::get_singleton()->has("gdnative/singletons")) {
- enabled_paths=ProjectSettings::get_singleton()->get("gdnative/singletons");
+ enabled_paths = ProjectSettings::get_singleton()->get("gdnative/singletons");
}
Set<String> enabled_list;
- for(int i=0;i<enabled_paths.size();i++) {
+ for (int i = 0; i < enabled_paths.size(); i++) {
enabled_list.insert(enabled_paths[i]);
}
EditorFileSystemDirectory *fs = EditorFileSystem::get_singleton()->get_filesystem();
if (fs) {
- _find_gdnative_singletons(fs,enabled_list);
+ _find_gdnative_singletons(fs, enabled_list);
}
- updating=false;
-
+ updating = false;
}
void GDNativeLibraryEditor::_item_edited() {
@@ -74,11 +101,11 @@ void GDNativeLibraryEditor::_item_edited() {
Vector<String> enabled_paths;
if (ProjectSettings::get_singleton()->has("gdnative/singletons")) {
- enabled_paths=ProjectSettings::get_singleton()->get("gdnative/singletons");
+ enabled_paths = ProjectSettings::get_singleton()->get("gdnative/singletons");
}
if (enabled) {
- if (enabled_paths.find(path)==-1) {
+ if (enabled_paths.find(path) == -1) {
enabled_paths.push_back(path);
}
} else {
@@ -86,15 +113,15 @@ void GDNativeLibraryEditor::_item_edited() {
}
if (enabled_paths.size()) {
- ProjectSettings::get_singleton()->set("gdnative/singletons",enabled_paths);
+ ProjectSettings::get_singleton()->set("gdnative/singletons", enabled_paths);
} else {
- ProjectSettings::get_singleton()->set("gdnative/singletons",Variant());
+ ProjectSettings::get_singleton()->set("gdnative/singletons", Variant());
}
}
void GDNativeLibraryEditor::_notification(int p_what) {
- if (p_what==NOTIFICATION_VISIBILITY_CHANGED) {
+ if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
if (is_visible_in_tree()) {
_update_libraries();
}
@@ -103,18 +130,19 @@ void GDNativeLibraryEditor::_notification(int p_what) {
void GDNativeLibraryEditor::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_item_edited"),&GDNativeLibraryEditor::_item_edited);
+ ClassDB::bind_method(D_METHOD("_item_edited"), &GDNativeLibraryEditor::_item_edited);
}
-GDNativeLibraryEditor::GDNativeLibraryEditor()
-{
- libraries = memnew( Tree );
+GDNativeLibraryEditor::GDNativeLibraryEditor() {
+ libraries = memnew(Tree);
libraries->set_columns(2);
libraries->set_column_titles_visible(true);
- libraries->set_column_title(0,TTR("Library"));
- libraries->set_column_title(1,TTR("Status"));
+ libraries->set_column_title(0, TTR("Library"));
+ libraries->set_column_title(1, TTR("Status"));
libraries->set_hide_root(true);
- add_margin_child(TTR("Libraries: "),libraries,true);
- updating=false;
- libraries->connect("item_edited",this,"_item_edited");
+ add_margin_child(TTR("Libraries: "), libraries, true);
+ updating = false;
+ libraries->connect("item_edited", this, "_item_edited");
}
+
+#endif // TOOLS_ENABLED
diff --git a/modules/gdnative/gd_native_library_editor.h b/modules/gdnative/gd_native_library_editor.h
index a6c8f31790..a11c4620dd 100644
--- a/modules/gdnative/gd_native_library_editor.h
+++ b/modules/gdnative/gd_native_library_editor.h
@@ -1,23 +1,52 @@
+/*************************************************************************/
+/* gd_native_library_editor.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
#ifndef GD_NATIVE_LIBRARY_EDITOR_H
#define GD_NATIVE_LIBRARY_EDITOR_H
#ifdef TOOLS_ENABLED
-#include "editor/project_settings_editor.h"
#include "editor/editor_file_system.h"
+#include "editor/project_settings_editor.h"
-class GDNativeLibraryEditor : public VBoxContainer
-{
+class GDNativeLibraryEditor : public VBoxContainer {
Tree *libraries;
bool updating;
void _update_libraries();
- void _find_gdnative_singletons(EditorFileSystemDirectory *p_dir,const Set<String>& enabled_list);
+ void _find_gdnative_singletons(EditorFileSystemDirectory *p_dir, const Set<String> &enabled_list);
void _item_edited();
-protected:
+protected:
void _notification(int p_what);
static void _bind_methods();
+
public:
GDNativeLibraryEditor();
};
diff --git a/modules/gdnative/gdnative.cpp b/modules/gdnative/gdnative.cpp
index 6da538844a..f0c09a3370 100644
--- a/modules/gdnative/gdnative.cpp
+++ b/modules/gdnative/gdnative.cpp
@@ -40,6 +40,16 @@
const String init_symbol = "godot_gdnative_init";
const String terminate_symbol = "godot_gdnative_terminate";
+#define GDAPI_FUNC(name, ret_type, ...) name,
+#define GDAPI_FUNC_VOID(name, ...) name,
+
+const godot_gdnative_api_struct api_struct = {
+ GODOT_GDNATIVE_API_FUNCTIONS
+};
+
+#undef GDAPI_FUNC
+#undef GDAPI_FUNC_VOID
+
String GDNativeLibrary::platform_names[NUM_PLATFORMS + 1] = {
"X11_32bit",
"X11_64bit",
@@ -91,7 +101,7 @@ GDNativeLibrary::Platform GDNativeLibrary::current_platform =
#endif
GDNativeLibrary::GDNativeLibrary()
- : library_paths() {
+ : library_paths(), singleton_gdnative(false) {
}
GDNativeLibrary::~GDNativeLibrary() {
@@ -100,6 +110,7 @@ GDNativeLibrary::~GDNativeLibrary() {
void GDNativeLibrary::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_library_path", "platform", "path"), &GDNativeLibrary::set_library_path);
ClassDB::bind_method(D_METHOD("get_library_path", "platform"), &GDNativeLibrary::get_library_path);
+ ClassDB::bind_method(D_METHOD("get_active_library_path"), &GDNativeLibrary::get_active_library_path);
ClassDB::bind_method(D_METHOD("is_singleton_gdnative"), &GDNativeLibrary::is_singleton_gdnative);
ClassDB::bind_method(D_METHOD("set_singleton_gdnative", "singleton"), &GDNativeLibrary::set_singleton_gdnative);
@@ -224,8 +235,11 @@ bool GDNative::initialize() {
ERR_PRINT("No library set for this platform");
return false;
}
-
+#ifdef IPHONE_ENABLED
+ String path = lib_path.replace("res://", "dylibs/");
+#else
String path = ProjectSettings::get_singleton()->globalize_path(lib_path);
+#endif
Error err = OS::get_singleton()->open_dynamic_library(path, native_handle);
if (err != OK) {
return false;
@@ -249,11 +263,13 @@ bool GDNative::initialize() {
godot_gdnative_init_options options;
+ options.api_struct = &api_struct;
options.in_editor = Engine::get_singleton()->is_editor_hint();
options.core_api_hash = ClassDB::get_api_hash(ClassDB::API_CORE);
options.editor_api_hash = ClassDB::get_api_hash(ClassDB::API_EDITOR);
options.no_api_hash = ClassDB::get_api_hash(ClassDB::API_NONE);
options.gd_native_library = (godot_object *)(get_library().ptr());
+ options.active_library_path = (godot_string *)&path;
library_init_fpointer(&options);
diff --git a/modules/gdnative/gdnative.h b/modules/gdnative/gdnative.h
index 4753c7efe5..29c6201641 100644
--- a/modules/gdnative/gdnative.h
+++ b/modules/gdnative/gdnative.h
@@ -36,6 +36,7 @@
#include "resource.h"
#include "gdnative/gdnative.h"
+#include "gdnative_api_struct.h"
class GDNativeLibrary : public Resource {
GDCLASS(GDNativeLibrary, Resource)
@@ -77,7 +78,7 @@ class GDNativeLibrary : public Resource {
String library_paths[NUM_PLATFORMS];
- bool singleton_gdnative = false;
+ bool singleton_gdnative;
protected:
bool _set(const StringName &p_name, const Variant &p_value);
diff --git a/modules/gdnative/gdnative/variant.cpp b/modules/gdnative/gdnative/variant.cpp
index 1b2aae607f..9ba4166c1d 100644
--- a/modules/gdnative/gdnative/variant.cpp
+++ b/modules/gdnative/gdnative/variant.cpp
@@ -480,10 +480,9 @@ godot_bool GDAPI godot_variant_hash_compare(const godot_variant *p_self, const g
return self->hash_compare(*other);
}
-godot_bool GDAPI godot_variant_booleanize(const godot_variant *p_self, godot_bool *r_valid) {
+godot_bool GDAPI godot_variant_booleanize(const godot_variant *p_self) {
const Variant *self = (const Variant *)p_self;
- bool &valid = *r_valid;
- return self->booleanize(valid);
+ return self->booleanize();
}
void GDAPI godot_variant_destroy(godot_variant *p_self) {
diff --git a/modules/gdnative/include/gdnative/gdnative.h b/modules/gdnative/include/gdnative/gdnative.h
index c574c56d5a..9134f1c581 100644
--- a/modules/gdnative/include/gdnative/gdnative.h
+++ b/modules/gdnative/include/gdnative/gdnative.h
@@ -49,8 +49,8 @@ extern "C" {
#elif defined(__APPLE__)
#include "TargetConditionals.h"
#if TARGET_OS_IPHONE
-#define GDCALLINGCONV
-#define GDAPI
+#define GDCALLINGCONV __attribute__((visibility("default")))
+#define GDAPI GDCALLINGCONV
#elif TARGET_OS_MAC
#define GDCALLINGCONV __attribute__((sysv_abi))
#define GDAPI GDCALLINGCONV
@@ -103,7 +103,7 @@ typedef enum {
GODOT_ERR_CANT_CONNECT, // (25)
GODOT_ERR_CANT_RESOLVE,
GODOT_ERR_CONNECTION_ERROR,
- GODOT_ERR_CANT_AQUIRE_RESOURCE,
+ GODOT_ERR_CANT_ACQUIRE_RESOURCE,
GODOT_ERR_CANT_FORK,
GODOT_ERR_INVALID_DATA, ///< Data passed is invalid (30)
GODOT_ERR_INVALID_PARAMETER, ///< Parameter passed is invalid
@@ -234,12 +234,16 @@ void GDAPI godot_method_bind_ptrcall(godot_method_bind *p_method_bind, godot_obj
godot_variant GDAPI godot_method_bind_call(godot_method_bind *p_method_bind, godot_object *p_instance, const godot_variant **p_args, const int p_arg_count, godot_variant_call_error *p_call_error);
////// Script API
+struct godot_gdnative_api_struct; // Forward declaration
+
typedef struct {
godot_bool in_editor;
uint64_t core_api_hash;
uint64_t editor_api_hash;
uint64_t no_api_hash;
godot_object *gd_native_library; // pointer to GDNativeLibrary that is being initialized
+ const struct godot_gdnative_api_struct *api_struct;
+ const godot_string *active_library_path;
} godot_gdnative_init_options;
typedef struct {
diff --git a/modules/gdnative/include/gdnative/variant.h b/modules/gdnative/include/gdnative/variant.h
index 969506585d..7b804c1eaf 100644
--- a/modules/gdnative/include/gdnative/variant.h
+++ b/modules/gdnative/include/gdnative/variant.h
@@ -190,7 +190,7 @@ godot_bool GDAPI godot_variant_operator_less(const godot_variant *p_self, const
godot_bool GDAPI godot_variant_hash_compare(const godot_variant *p_self, const godot_variant *p_other);
-godot_bool GDAPI godot_variant_booleanize(const godot_variant *p_self, godot_bool *r_valid);
+godot_bool GDAPI godot_variant_booleanize(const godot_variant *p_self);
void GDAPI godot_variant_destroy(godot_variant *p_self);
diff --git a/modules/gdnative/include/gdnative_api_struct.h b/modules/gdnative/include/gdnative_api_struct.h
new file mode 100644
index 0000000000..c345e27227
--- /dev/null
+++ b/modules/gdnative/include/gdnative_api_struct.h
@@ -0,0 +1,723 @@
+/*************************************************************************/
+/* gdnative_api_struct.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+#ifndef GODOT_GDNATIVE_API_STRUCT_H
+#define GODOT_GDNATIVE_API_STRUCT_H
+
+#include <gdnative/gdnative.h>
+#include <nativescript/godot_nativescript.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// Using X_MACRO to keep api function signatures in a single list
+#define GODOT_GDNATIVE_API_FUNCTIONS \
+ GDAPI_FUNC_VOID(godot_color_new_rgba, godot_color *r_dest, const godot_real p_r, const godot_real p_g, const godot_real p_b, const godot_real p_a) \
+ GDAPI_FUNC_VOID(godot_color_new_rgb, godot_color *r_dest, const godot_real p_r, const godot_real p_g, const godot_real p_b) \
+ GDAPI_FUNC(godot_color_get_r, godot_real, const godot_color *p_self) \
+ GDAPI_FUNC_VOID(godot_color_set_r, godot_color *p_self, const godot_real r) \
+ GDAPI_FUNC(godot_color_get_g, godot_real, const godot_color *p_self) \
+ GDAPI_FUNC_VOID(godot_color_set_g, godot_color *p_self, const godot_real g) \
+ GDAPI_FUNC(godot_color_get_b, godot_real, const godot_color *p_self) \
+ GDAPI_FUNC_VOID(godot_color_set_b, godot_color *p_self, const godot_real b) \
+ GDAPI_FUNC(godot_color_get_a, godot_real, const godot_color *p_self) \
+ GDAPI_FUNC_VOID(godot_color_set_a, godot_color *p_self, const godot_real a) \
+ GDAPI_FUNC(godot_color_get_h, godot_real, const godot_color *p_self) \
+ GDAPI_FUNC(godot_color_get_s, godot_real, const godot_color *p_self) \
+ GDAPI_FUNC(godot_color_get_v, godot_real, const godot_color *p_self) \
+ GDAPI_FUNC(godot_color_as_string, godot_string, const godot_color *p_self) \
+ GDAPI_FUNC(godot_color_to_rgba32, godot_int, const godot_color *p_self) \
+ GDAPI_FUNC(godot_color_to_argb32, godot_int, const godot_color *p_self) \
+ GDAPI_FUNC(godot_color_gray, godot_real, const godot_color *p_self) \
+ GDAPI_FUNC(godot_color_inverted, godot_color, const godot_color *p_self) \
+ GDAPI_FUNC(godot_color_contrasted, godot_color, const godot_color *p_self) \
+ GDAPI_FUNC(godot_color_linear_interpolate, godot_color, const godot_color *p_self, const godot_color *p_b, const godot_real p_t) \
+ GDAPI_FUNC(godot_color_blend, godot_color, const godot_color *p_self, const godot_color *p_over) \
+ GDAPI_FUNC(godot_color_to_html, godot_string, const godot_color *p_self, const godot_bool p_with_alpha) \
+ GDAPI_FUNC(godot_color_operator_equal, godot_bool, const godot_color *p_self, const godot_color *p_b) \
+ GDAPI_FUNC(godot_color_operator_less, godot_bool, const godot_color *p_self, const godot_color *p_b) \
+ GDAPI_FUNC_VOID(godot_vector2_new, godot_vector2 *r_dest, const godot_real p_x, const godot_real p_y) \
+ GDAPI_FUNC(godot_vector2_as_string, godot_string, const godot_vector2 *p_self) \
+ GDAPI_FUNC(godot_vector2_normalized, godot_vector2, const godot_vector2 *p_self) \
+ GDAPI_FUNC(godot_vector2_length, godot_real, const godot_vector2 *p_self) \
+ GDAPI_FUNC(godot_vector2_angle, godot_real, const godot_vector2 *p_self) \
+ GDAPI_FUNC(godot_vector2_length_squared, godot_real, const godot_vector2 *p_self) \
+ GDAPI_FUNC(godot_vector2_is_normalized, godot_bool, const godot_vector2 *p_self) \
+ GDAPI_FUNC(godot_vector2_distance_to, godot_real, const godot_vector2 *p_self, const godot_vector2 *p_to) \
+ GDAPI_FUNC(godot_vector2_distance_squared_to, godot_real, const godot_vector2 *p_self, const godot_vector2 *p_to) \
+ GDAPI_FUNC(godot_vector2_angle_to, godot_real, const godot_vector2 *p_self, const godot_vector2 *p_to) \
+ GDAPI_FUNC(godot_vector2_angle_to_point, godot_real, const godot_vector2 *p_self, const godot_vector2 *p_to) \
+ GDAPI_FUNC(godot_vector2_linear_interpolate, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_b, const godot_real p_t) \
+ GDAPI_FUNC(godot_vector2_cubic_interpolate, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_b, const godot_vector2 *p_pre_a, const godot_vector2 *p_post_b, const godot_real p_t) \
+ GDAPI_FUNC(godot_vector2_rotated, godot_vector2, const godot_vector2 *p_self, const godot_real p_phi) \
+ GDAPI_FUNC(godot_vector2_tangent, godot_vector2, const godot_vector2 *p_self) \
+ GDAPI_FUNC(godot_vector2_floor, godot_vector2, const godot_vector2 *p_self) \
+ GDAPI_FUNC(godot_vector2_snapped, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_by) \
+ GDAPI_FUNC(godot_vector2_aspect, godot_real, const godot_vector2 *p_self) \
+ GDAPI_FUNC(godot_vector2_dot, godot_real, const godot_vector2 *p_self, const godot_vector2 *p_with) \
+ GDAPI_FUNC(godot_vector2_slide, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_n) \
+ GDAPI_FUNC(godot_vector2_bounce, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_n) \
+ GDAPI_FUNC(godot_vector2_reflect, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_n) \
+ GDAPI_FUNC(godot_vector2_abs, godot_vector2, const godot_vector2 *p_self) \
+ GDAPI_FUNC(godot_vector2_clamped, godot_vector2, const godot_vector2 *p_self, const godot_real p_length) \
+ GDAPI_FUNC(godot_vector2_operator_add, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_b) \
+ GDAPI_FUNC(godot_vector2_operator_substract, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_b) \
+ GDAPI_FUNC(godot_vector2_operator_multiply_vector, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_b) \
+ GDAPI_FUNC(godot_vector2_operator_multiply_scalar, godot_vector2, const godot_vector2 *p_self, const godot_real p_b) \
+ GDAPI_FUNC(godot_vector2_operator_divide_vector, godot_vector2, const godot_vector2 *p_self, const godot_vector2 *p_b) \
+ GDAPI_FUNC(godot_vector2_operator_divide_scalar, godot_vector2, const godot_vector2 *p_self, const godot_real p_b) \
+ GDAPI_FUNC(godot_vector2_operator_equal, godot_bool, const godot_vector2 *p_self, const godot_vector2 *p_b) \
+ GDAPI_FUNC(godot_vector2_operator_less, godot_bool, const godot_vector2 *p_self, const godot_vector2 *p_b) \
+ GDAPI_FUNC(godot_vector2_operator_neg, godot_vector2, const godot_vector2 *p_self) \
+ GDAPI_FUNC_VOID(godot_vector2_set_x, godot_vector2 *p_self, const godot_real p_x) \
+ GDAPI_FUNC_VOID(godot_vector2_set_y, godot_vector2 *p_self, const godot_real p_y) \
+ GDAPI_FUNC(godot_vector2_get_x, godot_real, const godot_vector2 *p_self) \
+ GDAPI_FUNC(godot_vector2_get_y, godot_real, const godot_vector2 *p_self) \
+ GDAPI_FUNC_VOID(godot_quat_new, godot_quat *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_z, const godot_real p_w) \
+ GDAPI_FUNC_VOID(godot_quat_new_with_axis_angle, godot_quat *r_dest, const godot_vector3 *p_axis, const godot_real p_angle) \
+ GDAPI_FUNC(godot_quat_get_x, godot_real, const godot_quat *p_self) \
+ GDAPI_FUNC_VOID(godot_quat_set_x, godot_quat *p_self, const godot_real val) \
+ GDAPI_FUNC(godot_quat_get_y, godot_real, const godot_quat *p_self) \
+ GDAPI_FUNC_VOID(godot_quat_set_y, godot_quat *p_self, const godot_real val) \
+ GDAPI_FUNC(godot_quat_get_z, godot_real, const godot_quat *p_self) \
+ GDAPI_FUNC_VOID(godot_quat_set_z, godot_quat *p_self, const godot_real val) \
+ GDAPI_FUNC(godot_quat_get_w, godot_real, const godot_quat *p_self) \
+ GDAPI_FUNC_VOID(godot_quat_set_w, godot_quat *p_self, const godot_real val) \
+ GDAPI_FUNC(godot_quat_as_string, godot_string, const godot_quat *p_self) \
+ GDAPI_FUNC(godot_quat_length, godot_real, const godot_quat *p_self) \
+ GDAPI_FUNC(godot_quat_length_squared, godot_real, const godot_quat *p_self) \
+ GDAPI_FUNC(godot_quat_normalized, godot_quat, const godot_quat *p_self) \
+ GDAPI_FUNC(godot_quat_is_normalized, godot_bool, const godot_quat *p_self) \
+ GDAPI_FUNC(godot_quat_inverse, godot_quat, const godot_quat *p_self) \
+ GDAPI_FUNC(godot_quat_dot, godot_real, const godot_quat *p_self, const godot_quat *p_b) \
+ GDAPI_FUNC(godot_quat_xform, godot_vector3, const godot_quat *p_self, const godot_vector3 *p_v) \
+ GDAPI_FUNC(godot_quat_slerp, godot_quat, const godot_quat *p_self, const godot_quat *p_b, const godot_real p_t) \
+ GDAPI_FUNC(godot_quat_slerpni, godot_quat, const godot_quat *p_self, const godot_quat *p_b, const godot_real p_t) \
+ GDAPI_FUNC(godot_quat_cubic_slerp, godot_quat, const godot_quat *p_self, const godot_quat *p_b, const godot_quat *p_pre_a, const godot_quat *p_post_b, const godot_real p_t) \
+ GDAPI_FUNC(godot_quat_operator_multiply, godot_quat, const godot_quat *p_self, const godot_real p_b) \
+ GDAPI_FUNC(godot_quat_operator_add, godot_quat, const godot_quat *p_self, const godot_quat *p_b) \
+ GDAPI_FUNC(godot_quat_operator_substract, godot_quat, const godot_quat *p_self, const godot_quat *p_b) \
+ GDAPI_FUNC(godot_quat_operator_divide, godot_quat, const godot_quat *p_self, const godot_real p_b) \
+ GDAPI_FUNC(godot_quat_operator_equal, godot_bool, const godot_quat *p_self, const godot_quat *p_b) \
+ GDAPI_FUNC(godot_quat_operator_neg, godot_quat, const godot_quat *p_self) \
+ GDAPI_FUNC_VOID(godot_basis_new_with_rows, godot_basis *r_dest, const godot_vector3 *p_x_axis, const godot_vector3 *p_y_axis, const godot_vector3 *p_z_axis) \
+ GDAPI_FUNC_VOID(godot_basis_new_with_axis_and_angle, godot_basis *r_dest, const godot_vector3 *p_axis, const godot_real p_phi) \
+ GDAPI_FUNC_VOID(godot_basis_new_with_euler, godot_basis *r_dest, const godot_vector3 *p_euler) \
+ GDAPI_FUNC(godot_basis_as_string, godot_string, const godot_basis *p_self) \
+ GDAPI_FUNC(godot_basis_inverse, godot_basis, const godot_basis *p_self) \
+ GDAPI_FUNC(godot_basis_transposed, godot_basis, const godot_basis *p_self) \
+ GDAPI_FUNC(godot_basis_orthonormalized, godot_basis, const godot_basis *p_self) \
+ GDAPI_FUNC(godot_basis_determinant, godot_real, const godot_basis *p_self) \
+ GDAPI_FUNC(godot_basis_rotated, godot_basis, const godot_basis *p_self, const godot_vector3 *p_axis, const godot_real p_phi) \
+ GDAPI_FUNC(godot_basis_scaled, godot_basis, const godot_basis *p_self, const godot_vector3 *p_scale) \
+ GDAPI_FUNC(godot_basis_get_scale, godot_vector3, const godot_basis *p_self) \
+ GDAPI_FUNC(godot_basis_get_euler, godot_vector3, const godot_basis *p_self) \
+ GDAPI_FUNC(godot_basis_tdotx, godot_real, const godot_basis *p_self, const godot_vector3 *p_with) \
+ GDAPI_FUNC(godot_basis_tdoty, godot_real, const godot_basis *p_self, const godot_vector3 *p_with) \
+ GDAPI_FUNC(godot_basis_tdotz, godot_real, const godot_basis *p_self, const godot_vector3 *p_with) \
+ GDAPI_FUNC(godot_basis_xform, godot_vector3, const godot_basis *p_self, const godot_vector3 *p_v) \
+ GDAPI_FUNC(godot_basis_xform_inv, godot_vector3, const godot_basis *p_self, const godot_vector3 *p_v) \
+ GDAPI_FUNC(godot_basis_get_orthogonal_index, godot_int, const godot_basis *p_self) \
+ GDAPI_FUNC_VOID(godot_basis_new, godot_basis *r_dest) \
+ GDAPI_FUNC_VOID(godot_basis_new_with_euler_quat, godot_basis *r_dest, const godot_quat *p_euler) \
+ GDAPI_FUNC_VOID(godot_basis_get_elements, godot_basis *p_self, godot_vector3 *p_elements) \
+ GDAPI_FUNC(godot_basis_get_axis, godot_vector3, const godot_basis *p_self, const godot_int p_axis) \
+ GDAPI_FUNC_VOID(godot_basis_set_axis, godot_basis *p_self, const godot_int p_axis, const godot_vector3 *p_value) \
+ GDAPI_FUNC(godot_basis_get_row, godot_vector3, const godot_basis *p_self, const godot_int p_row) \
+ GDAPI_FUNC_VOID(godot_basis_set_row, godot_basis *p_self, const godot_int p_row, const godot_vector3 *p_value) \
+ GDAPI_FUNC(godot_basis_operator_equal, godot_bool, const godot_basis *p_self, const godot_basis *p_b) \
+ GDAPI_FUNC(godot_basis_operator_add, godot_basis, const godot_basis *p_self, const godot_basis *p_b) \
+ GDAPI_FUNC(godot_basis_operator_substract, godot_basis, const godot_basis *p_self, const godot_basis *p_b) \
+ GDAPI_FUNC(godot_basis_operator_multiply_vector, godot_basis, const godot_basis *p_self, const godot_basis *p_b) \
+ GDAPI_FUNC(godot_basis_operator_multiply_scalar, godot_basis, const godot_basis *p_self, const godot_real p_b) \
+ GDAPI_FUNC_VOID(godot_vector3_new, godot_vector3 *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_z) \
+ GDAPI_FUNC(godot_vector3_as_string, godot_string, const godot_vector3 *p_self) \
+ GDAPI_FUNC(godot_vector3_min_axis, godot_int, const godot_vector3 *p_self) \
+ GDAPI_FUNC(godot_vector3_max_axis, godot_int, const godot_vector3 *p_self) \
+ GDAPI_FUNC(godot_vector3_length, godot_real, const godot_vector3 *p_self) \
+ GDAPI_FUNC(godot_vector3_length_squared, godot_real, const godot_vector3 *p_self) \
+ GDAPI_FUNC(godot_vector3_is_normalized, godot_bool, const godot_vector3 *p_self) \
+ GDAPI_FUNC(godot_vector3_normalized, godot_vector3, const godot_vector3 *p_self) \
+ GDAPI_FUNC(godot_vector3_inverse, godot_vector3, const godot_vector3 *p_self) \
+ GDAPI_FUNC(godot_vector3_snapped, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_by) \
+ GDAPI_FUNC(godot_vector3_rotated, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_axis, const godot_real p_phi) \
+ GDAPI_FUNC(godot_vector3_linear_interpolate, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_b, const godot_real p_t) \
+ GDAPI_FUNC(godot_vector3_cubic_interpolate, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_b, const godot_vector3 *p_pre_a, const godot_vector3 *p_post_b, const godot_real p_t) \
+ GDAPI_FUNC(godot_vector3_dot, godot_real, const godot_vector3 *p_self, const godot_vector3 *p_b) \
+ GDAPI_FUNC(godot_vector3_cross, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_b) \
+ GDAPI_FUNC(godot_vector3_outer, godot_basis, const godot_vector3 *p_self, const godot_vector3 *p_b) \
+ GDAPI_FUNC(godot_vector3_to_diagonal_matrix, godot_basis, const godot_vector3 *p_self) \
+ GDAPI_FUNC(godot_vector3_abs, godot_vector3, const godot_vector3 *p_self) \
+ GDAPI_FUNC(godot_vector3_floor, godot_vector3, const godot_vector3 *p_self) \
+ GDAPI_FUNC(godot_vector3_ceil, godot_vector3, const godot_vector3 *p_self) \
+ GDAPI_FUNC(godot_vector3_distance_to, godot_real, const godot_vector3 *p_self, const godot_vector3 *p_b) \
+ GDAPI_FUNC(godot_vector3_distance_squared_to, godot_real, const godot_vector3 *p_self, const godot_vector3 *p_b) \
+ GDAPI_FUNC(godot_vector3_angle_to, godot_real, const godot_vector3 *p_self, const godot_vector3 *p_to) \
+ GDAPI_FUNC(godot_vector3_slide, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_n) \
+ GDAPI_FUNC(godot_vector3_bounce, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_n) \
+ GDAPI_FUNC(godot_vector3_reflect, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_n) \
+ GDAPI_FUNC(godot_vector3_operator_add, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_b) \
+ GDAPI_FUNC(godot_vector3_operator_substract, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_b) \
+ GDAPI_FUNC(godot_vector3_operator_multiply_vector, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_b) \
+ GDAPI_FUNC(godot_vector3_operator_multiply_scalar, godot_vector3, const godot_vector3 *p_self, const godot_real p_b) \
+ GDAPI_FUNC(godot_vector3_operator_divide_vector, godot_vector3, const godot_vector3 *p_self, const godot_vector3 *p_b) \
+ GDAPI_FUNC(godot_vector3_operator_divide_scalar, godot_vector3, const godot_vector3 *p_self, const godot_real p_b) \
+ GDAPI_FUNC(godot_vector3_operator_equal, godot_bool, const godot_vector3 *p_self, const godot_vector3 *p_b) \
+ GDAPI_FUNC(godot_vector3_operator_less, godot_bool, const godot_vector3 *p_self, const godot_vector3 *p_b) \
+ GDAPI_FUNC(godot_vector3_operator_neg, godot_vector3, const godot_vector3 *p_self) \
+ GDAPI_FUNC_VOID(godot_vector3_set_axis, godot_vector3 *p_self, const godot_vector3_axis p_axis, const godot_real p_val) \
+ GDAPI_FUNC(godot_vector3_get_axis, godot_real, const godot_vector3 *p_self, const godot_vector3_axis p_axis) \
+ GDAPI_FUNC_VOID(godot_pool_byte_array_new, godot_pool_byte_array *r_dest) \
+ GDAPI_FUNC_VOID(godot_pool_byte_array_new_copy, godot_pool_byte_array *r_dest, const godot_pool_byte_array *p_src) \
+ GDAPI_FUNC_VOID(godot_pool_byte_array_new_with_array, godot_pool_byte_array *r_dest, const godot_array *p_a) \
+ GDAPI_FUNC_VOID(godot_pool_byte_array_append, godot_pool_byte_array *p_self, const uint8_t p_data) \
+ GDAPI_FUNC_VOID(godot_pool_byte_array_append_array, godot_pool_byte_array *p_self, const godot_pool_byte_array *p_array) \
+ GDAPI_FUNC(godot_pool_byte_array_insert, godot_error, godot_pool_byte_array *p_self, const godot_int p_idx, const uint8_t p_data) \
+ GDAPI_FUNC_VOID(godot_pool_byte_array_invert, godot_pool_byte_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_byte_array_push_back, godot_pool_byte_array *p_self, const uint8_t p_data) \
+ GDAPI_FUNC_VOID(godot_pool_byte_array_remove, godot_pool_byte_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC_VOID(godot_pool_byte_array_resize, godot_pool_byte_array *p_self, const godot_int p_size) \
+ GDAPI_FUNC_VOID(godot_pool_byte_array_set, godot_pool_byte_array *p_self, const godot_int p_idx, const uint8_t p_data) \
+ GDAPI_FUNC(godot_pool_byte_array_get, uint8_t, const godot_pool_byte_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC(godot_pool_byte_array_size, godot_int, const godot_pool_byte_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_byte_array_destroy, godot_pool_byte_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_int_array_new, godot_pool_int_array *r_dest) \
+ GDAPI_FUNC_VOID(godot_pool_int_array_new_copy, godot_pool_int_array *r_dest, const godot_pool_int_array *p_src) \
+ GDAPI_FUNC_VOID(godot_pool_int_array_new_with_array, godot_pool_int_array *r_dest, const godot_array *p_a) \
+ GDAPI_FUNC_VOID(godot_pool_int_array_append, godot_pool_int_array *p_self, const godot_int p_data) \
+ GDAPI_FUNC_VOID(godot_pool_int_array_append_array, godot_pool_int_array *p_self, const godot_pool_int_array *p_array) \
+ GDAPI_FUNC(godot_pool_int_array_insert, godot_error, godot_pool_int_array *p_self, const godot_int p_idx, const godot_int p_data) \
+ GDAPI_FUNC_VOID(godot_pool_int_array_invert, godot_pool_int_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_int_array_push_back, godot_pool_int_array *p_self, const godot_int p_data) \
+ GDAPI_FUNC_VOID(godot_pool_int_array_remove, godot_pool_int_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC_VOID(godot_pool_int_array_resize, godot_pool_int_array *p_self, const godot_int p_size) \
+ GDAPI_FUNC_VOID(godot_pool_int_array_set, godot_pool_int_array *p_self, const godot_int p_idx, const godot_int p_data) \
+ GDAPI_FUNC(godot_pool_int_array_get, godot_int, const godot_pool_int_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC(godot_pool_int_array_size, godot_int, const godot_pool_int_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_int_array_destroy, godot_pool_int_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_real_array_new, godot_pool_real_array *r_dest) \
+ GDAPI_FUNC_VOID(godot_pool_real_array_new_copy, godot_pool_real_array *r_dest, const godot_pool_real_array *p_src) \
+ GDAPI_FUNC_VOID(godot_pool_real_array_new_with_array, godot_pool_real_array *r_dest, const godot_array *p_a) \
+ GDAPI_FUNC_VOID(godot_pool_real_array_append, godot_pool_real_array *p_self, const godot_real p_data) \
+ GDAPI_FUNC_VOID(godot_pool_real_array_append_array, godot_pool_real_array *p_self, const godot_pool_real_array *p_array) \
+ GDAPI_FUNC(godot_pool_real_array_insert, godot_error, godot_pool_real_array *p_self, const godot_int p_idx, const godot_real p_data) \
+ GDAPI_FUNC_VOID(godot_pool_real_array_invert, godot_pool_real_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_real_array_push_back, godot_pool_real_array *p_self, const godot_real p_data) \
+ GDAPI_FUNC_VOID(godot_pool_real_array_remove, godot_pool_real_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC_VOID(godot_pool_real_array_resize, godot_pool_real_array *p_self, const godot_int p_size) \
+ GDAPI_FUNC_VOID(godot_pool_real_array_set, godot_pool_real_array *p_self, const godot_int p_idx, const godot_real p_data) \
+ GDAPI_FUNC(godot_pool_real_array_get, godot_real, const godot_pool_real_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC(godot_pool_real_array_size, godot_int, const godot_pool_real_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_real_array_destroy, godot_pool_real_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_string_array_new, godot_pool_string_array *r_dest) \
+ GDAPI_FUNC_VOID(godot_pool_string_array_new_copy, godot_pool_string_array *r_dest, const godot_pool_string_array *p_src) \
+ GDAPI_FUNC_VOID(godot_pool_string_array_new_with_array, godot_pool_string_array *r_dest, const godot_array *p_a) \
+ GDAPI_FUNC_VOID(godot_pool_string_array_append, godot_pool_string_array *p_self, const godot_string *p_data) \
+ GDAPI_FUNC_VOID(godot_pool_string_array_append_array, godot_pool_string_array *p_self, const godot_pool_string_array *p_array) \
+ GDAPI_FUNC(godot_pool_string_array_insert, godot_error, godot_pool_string_array *p_self, const godot_int p_idx, const godot_string *p_data) \
+ GDAPI_FUNC_VOID(godot_pool_string_array_invert, godot_pool_string_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_string_array_push_back, godot_pool_string_array *p_self, const godot_string *p_data) \
+ GDAPI_FUNC_VOID(godot_pool_string_array_remove, godot_pool_string_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC_VOID(godot_pool_string_array_resize, godot_pool_string_array *p_self, const godot_int p_size) \
+ GDAPI_FUNC_VOID(godot_pool_string_array_set, godot_pool_string_array *p_self, const godot_int p_idx, const godot_string *p_data) \
+ GDAPI_FUNC(godot_pool_string_array_get, godot_string, const godot_pool_string_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC(godot_pool_string_array_size, godot_int, const godot_pool_string_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_string_array_destroy, godot_pool_string_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_vector2_array_new, godot_pool_vector2_array *r_dest) \
+ GDAPI_FUNC_VOID(godot_pool_vector2_array_new_copy, godot_pool_vector2_array *r_dest, const godot_pool_vector2_array *p_src) \
+ GDAPI_FUNC_VOID(godot_pool_vector2_array_new_with_array, godot_pool_vector2_array *r_dest, const godot_array *p_a) \
+ GDAPI_FUNC_VOID(godot_pool_vector2_array_append, godot_pool_vector2_array *p_self, const godot_vector2 *p_data) \
+ GDAPI_FUNC_VOID(godot_pool_vector2_array_append_array, godot_pool_vector2_array *p_self, const godot_pool_vector2_array *p_array) \
+ GDAPI_FUNC(godot_pool_vector2_array_insert, godot_error, godot_pool_vector2_array *p_self, const godot_int p_idx, const godot_vector2 *p_data) \
+ GDAPI_FUNC_VOID(godot_pool_vector2_array_invert, godot_pool_vector2_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_vector2_array_push_back, godot_pool_vector2_array *p_self, const godot_vector2 *p_data) \
+ GDAPI_FUNC_VOID(godot_pool_vector2_array_remove, godot_pool_vector2_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC_VOID(godot_pool_vector2_array_resize, godot_pool_vector2_array *p_self, const godot_int p_size) \
+ GDAPI_FUNC_VOID(godot_pool_vector2_array_set, godot_pool_vector2_array *p_self, const godot_int p_idx, const godot_vector2 *p_data) \
+ GDAPI_FUNC(godot_pool_vector2_array_get, godot_vector2, const godot_pool_vector2_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC(godot_pool_vector2_array_size, godot_int, const godot_pool_vector2_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_vector2_array_destroy, godot_pool_vector2_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_vector3_array_new, godot_pool_vector3_array *r_dest) \
+ GDAPI_FUNC_VOID(godot_pool_vector3_array_new_copy, godot_pool_vector3_array *r_dest, const godot_pool_vector3_array *p_src) \
+ GDAPI_FUNC_VOID(godot_pool_vector3_array_new_with_array, godot_pool_vector3_array *r_dest, const godot_array *p_a) \
+ GDAPI_FUNC_VOID(godot_pool_vector3_array_append, godot_pool_vector3_array *p_self, const godot_vector3 *p_data) \
+ GDAPI_FUNC_VOID(godot_pool_vector3_array_append_array, godot_pool_vector3_array *p_self, const godot_pool_vector3_array *p_array) \
+ GDAPI_FUNC(godot_pool_vector3_array_insert, godot_error, godot_pool_vector3_array *p_self, const godot_int p_idx, const godot_vector3 *p_data) \
+ GDAPI_FUNC_VOID(godot_pool_vector3_array_invert, godot_pool_vector3_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_vector3_array_push_back, godot_pool_vector3_array *p_self, const godot_vector3 *p_data) \
+ GDAPI_FUNC_VOID(godot_pool_vector3_array_remove, godot_pool_vector3_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC_VOID(godot_pool_vector3_array_resize, godot_pool_vector3_array *p_self, const godot_int p_size) \
+ GDAPI_FUNC_VOID(godot_pool_vector3_array_set, godot_pool_vector3_array *p_self, const godot_int p_idx, const godot_vector3 *p_data) \
+ GDAPI_FUNC(godot_pool_vector3_array_get, godot_vector3, const godot_pool_vector3_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC(godot_pool_vector3_array_size, godot_int, const godot_pool_vector3_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_vector3_array_destroy, godot_pool_vector3_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_color_array_new, godot_pool_color_array *r_dest) \
+ GDAPI_FUNC_VOID(godot_pool_color_array_new_copy, godot_pool_color_array *r_dest, const godot_pool_color_array *p_src) \
+ GDAPI_FUNC_VOID(godot_pool_color_array_new_with_array, godot_pool_color_array *r_dest, const godot_array *p_a) \
+ GDAPI_FUNC_VOID(godot_pool_color_array_append, godot_pool_color_array *p_self, const godot_color *p_data) \
+ GDAPI_FUNC_VOID(godot_pool_color_array_append_array, godot_pool_color_array *p_self, const godot_pool_color_array *p_array) \
+ GDAPI_FUNC(godot_pool_color_array_insert, godot_error, godot_pool_color_array *p_self, const godot_int p_idx, const godot_color *p_data) \
+ GDAPI_FUNC_VOID(godot_pool_color_array_invert, godot_pool_color_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_color_array_push_back, godot_pool_color_array *p_self, const godot_color *p_data) \
+ GDAPI_FUNC_VOID(godot_pool_color_array_remove, godot_pool_color_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC_VOID(godot_pool_color_array_resize, godot_pool_color_array *p_self, const godot_int p_size) \
+ GDAPI_FUNC_VOID(godot_pool_color_array_set, godot_pool_color_array *p_self, const godot_int p_idx, const godot_color *p_data) \
+ GDAPI_FUNC(godot_pool_color_array_get, godot_color, const godot_pool_color_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC(godot_pool_color_array_size, godot_int, const godot_pool_color_array *p_self) \
+ GDAPI_FUNC_VOID(godot_pool_color_array_destroy, godot_pool_color_array *p_self) \
+ GDAPI_FUNC_VOID(godot_array_new, godot_array *r_dest) \
+ GDAPI_FUNC_VOID(godot_array_new_copy, godot_array *r_dest, const godot_array *p_src) \
+ GDAPI_FUNC_VOID(godot_array_new_pool_color_array, godot_array *r_dest, const godot_pool_color_array *p_pca) \
+ GDAPI_FUNC_VOID(godot_array_new_pool_vector3_array, godot_array *r_dest, const godot_pool_vector3_array *p_pv3a) \
+ GDAPI_FUNC_VOID(godot_array_new_pool_vector2_array, godot_array *r_dest, const godot_pool_vector2_array *p_pv2a) \
+ GDAPI_FUNC_VOID(godot_array_new_pool_string_array, godot_array *r_dest, const godot_pool_string_array *p_psa) \
+ GDAPI_FUNC_VOID(godot_array_new_pool_real_array, godot_array *r_dest, const godot_pool_real_array *p_pra) \
+ GDAPI_FUNC_VOID(godot_array_new_pool_int_array, godot_array *r_dest, const godot_pool_int_array *p_pia) \
+ GDAPI_FUNC_VOID(godot_array_new_pool_byte_array, godot_array *r_dest, const godot_pool_byte_array *p_pba) \
+ GDAPI_FUNC_VOID(godot_array_set, godot_array *p_self, const godot_int p_idx, const godot_variant *p_value) \
+ GDAPI_FUNC(godot_array_get, godot_variant, const godot_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC(godot_array_operator_index, godot_variant *, godot_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC_VOID(godot_array_append, godot_array *p_self, const godot_variant *p_value) \
+ GDAPI_FUNC_VOID(godot_array_clear, godot_array *p_self) \
+ GDAPI_FUNC(godot_array_count, godot_int, const godot_array *p_self, const godot_variant *p_value) \
+ GDAPI_FUNC(godot_array_empty, godot_bool, const godot_array *p_self) \
+ GDAPI_FUNC_VOID(godot_array_erase, godot_array *p_self, const godot_variant *p_value) \
+ GDAPI_FUNC(godot_array_front, godot_variant, const godot_array *p_self) \
+ GDAPI_FUNC(godot_array_back, godot_variant, const godot_array *p_self) \
+ GDAPI_FUNC(godot_array_find, godot_int, const godot_array *p_self, const godot_variant *p_what, const godot_int p_from) \
+ GDAPI_FUNC(godot_array_find_last, godot_int, const godot_array *p_self, const godot_variant *p_what) \
+ GDAPI_FUNC(godot_array_has, godot_bool, const godot_array *p_self, const godot_variant *p_value) \
+ GDAPI_FUNC(godot_array_hash, godot_int, const godot_array *p_self) \
+ GDAPI_FUNC_VOID(godot_array_insert, godot_array *p_self, const godot_int p_pos, const godot_variant *p_value) \
+ GDAPI_FUNC_VOID(godot_array_invert, godot_array *p_self) \
+ GDAPI_FUNC(godot_array_pop_back, godot_variant, godot_array *p_self) \
+ GDAPI_FUNC(godot_array_pop_front, godot_variant, godot_array *p_self) \
+ GDAPI_FUNC_VOID(godot_array_push_back, godot_array *p_self, const godot_variant *p_value) \
+ GDAPI_FUNC_VOID(godot_array_push_front, godot_array *p_self, const godot_variant *p_value) \
+ GDAPI_FUNC_VOID(godot_array_remove, godot_array *p_self, const godot_int p_idx) \
+ GDAPI_FUNC_VOID(godot_array_resize, godot_array *p_self, const godot_int p_size) \
+ GDAPI_FUNC(godot_array_rfind, godot_int, const godot_array *p_self, const godot_variant *p_what, const godot_int p_from) \
+ GDAPI_FUNC(godot_array_size, godot_int, const godot_array *p_self) \
+ GDAPI_FUNC_VOID(godot_array_sort, godot_array *p_self) \
+ GDAPI_FUNC_VOID(godot_array_sort_custom, godot_array *p_self, godot_object *p_obj, const godot_string *p_func) \
+ GDAPI_FUNC_VOID(godot_array_destroy, godot_array *p_self) \
+ GDAPI_FUNC_VOID(godot_dictionary_new, godot_dictionary *r_dest) \
+ GDAPI_FUNC_VOID(godot_dictionary_new_copy, godot_dictionary *r_dest, const godot_dictionary *p_src) \
+ GDAPI_FUNC_VOID(godot_dictionary_destroy, godot_dictionary *p_self) \
+ GDAPI_FUNC(godot_dictionary_size, godot_int, const godot_dictionary *p_self) \
+ GDAPI_FUNC(godot_dictionary_empty, godot_bool, const godot_dictionary *p_self) \
+ GDAPI_FUNC_VOID(godot_dictionary_clear, godot_dictionary *p_self) \
+ GDAPI_FUNC(godot_dictionary_has, godot_bool, const godot_dictionary *p_self, const godot_variant *p_key) \
+ GDAPI_FUNC(godot_dictionary_has_all, godot_bool, const godot_dictionary *p_self, const godot_array *p_keys) \
+ GDAPI_FUNC_VOID(godot_dictionary_erase, godot_dictionary *p_self, const godot_variant *p_key) \
+ GDAPI_FUNC(godot_dictionary_hash, godot_int, const godot_dictionary *p_self) \
+ GDAPI_FUNC(godot_dictionary_keys, godot_array, const godot_dictionary *p_self) \
+ GDAPI_FUNC(godot_dictionary_values, godot_array, const godot_dictionary *p_self) \
+ GDAPI_FUNC(godot_dictionary_get, godot_variant, const godot_dictionary *p_self, const godot_variant *p_key) \
+ GDAPI_FUNC_VOID(godot_dictionary_set, godot_dictionary *p_self, const godot_variant *p_key, const godot_variant *p_value) \
+ GDAPI_FUNC(godot_dictionary_operator_index, godot_variant *, godot_dictionary *p_self, const godot_variant *p_key) \
+ GDAPI_FUNC(godot_dictionary_next, godot_variant *, const godot_dictionary *p_self, const godot_variant *p_key) \
+ GDAPI_FUNC(godot_dictionary_operator_equal, godot_bool, const godot_dictionary *p_self, const godot_dictionary *p_b) \
+ GDAPI_FUNC(godot_dictionary_to_json, godot_string, const godot_dictionary *p_self) \
+ GDAPI_FUNC_VOID(godot_node_path_new, godot_node_path *r_dest, const godot_string *p_from) \
+ GDAPI_FUNC_VOID(godot_node_path_new_copy, godot_node_path *r_dest, const godot_node_path *p_src) \
+ GDAPI_FUNC_VOID(godot_node_path_destroy, godot_node_path *p_self) \
+ GDAPI_FUNC(godot_node_path_as_string, godot_string, const godot_node_path *p_self) \
+ GDAPI_FUNC(godot_node_path_is_absolute, godot_bool, const godot_node_path *p_self) \
+ GDAPI_FUNC(godot_node_path_get_name_count, godot_int, const godot_node_path *p_self) \
+ GDAPI_FUNC(godot_node_path_get_name, godot_string, const godot_node_path *p_self, const godot_int p_idx) \
+ GDAPI_FUNC(godot_node_path_get_subname_count, godot_int, const godot_node_path *p_self) \
+ GDAPI_FUNC(godot_node_path_get_subname, godot_string, const godot_node_path *p_self, const godot_int p_idx) \
+ GDAPI_FUNC(godot_node_path_get_property, godot_string, const godot_node_path *p_self) \
+ GDAPI_FUNC(godot_node_path_is_empty, godot_bool, const godot_node_path *p_self) \
+ GDAPI_FUNC(godot_node_path_operator_equal, godot_bool, const godot_node_path *p_self, const godot_node_path *p_b) \
+ GDAPI_FUNC_VOID(godot_plane_new_with_reals, godot_plane *r_dest, const godot_real p_a, const godot_real p_b, const godot_real p_c, const godot_real p_d) \
+ GDAPI_FUNC_VOID(godot_plane_new_with_vectors, godot_plane *r_dest, const godot_vector3 *p_v1, const godot_vector3 *p_v2, const godot_vector3 *p_v3) \
+ GDAPI_FUNC_VOID(godot_plane_new_with_normal, godot_plane *r_dest, const godot_vector3 *p_normal, const godot_real p_d) \
+ GDAPI_FUNC(godot_plane_as_string, godot_string, const godot_plane *p_self) \
+ GDAPI_FUNC(godot_plane_normalized, godot_plane, const godot_plane *p_self) \
+ GDAPI_FUNC(godot_plane_center, godot_vector3, const godot_plane *p_self) \
+ GDAPI_FUNC(godot_plane_get_any_point, godot_vector3, const godot_plane *p_self) \
+ GDAPI_FUNC(godot_plane_is_point_over, godot_bool, const godot_plane *p_self, const godot_vector3 *p_point) \
+ GDAPI_FUNC(godot_plane_distance_to, godot_real, const godot_plane *p_self, const godot_vector3 *p_point) \
+ GDAPI_FUNC(godot_plane_has_point, godot_bool, const godot_plane *p_self, const godot_vector3 *p_point, const godot_real p_epsilon) \
+ GDAPI_FUNC(godot_plane_project, godot_vector3, const godot_plane *p_self, const godot_vector3 *p_point) \
+ GDAPI_FUNC(godot_plane_intersect_3, godot_bool, const godot_plane *p_self, godot_vector3 *r_dest, const godot_plane *p_b, const godot_plane *p_c) \
+ GDAPI_FUNC(godot_plane_intersects_ray, godot_bool, const godot_plane *p_self, godot_vector3 *r_dest, const godot_vector3 *p_from, const godot_vector3 *p_dir) \
+ GDAPI_FUNC(godot_plane_intersects_segment, godot_bool, const godot_plane *p_self, godot_vector3 *r_dest, const godot_vector3 *p_begin, const godot_vector3 *p_end) \
+ GDAPI_FUNC(godot_plane_operator_neg, godot_plane, const godot_plane *p_self) \
+ GDAPI_FUNC(godot_plane_operator_equal, godot_bool, const godot_plane *p_self, const godot_plane *p_b) \
+ GDAPI_FUNC_VOID(godot_plane_set_normal, godot_plane *p_self, const godot_vector3 *p_normal) \
+ GDAPI_FUNC(godot_plane_get_normal, godot_vector3, const godot_plane *p_self) \
+ GDAPI_FUNC(godot_plane_get_d, godot_real, const godot_plane *p_self) \
+ GDAPI_FUNC_VOID(godot_plane_set_d, godot_plane *p_self, const godot_real p_d) \
+ GDAPI_FUNC_VOID(godot_rect2_new_with_position_and_size, godot_rect2 *r_dest, const godot_vector2 *p_pos, const godot_vector2 *p_size) \
+ GDAPI_FUNC_VOID(godot_rect2_new, godot_rect2 *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_width, const godot_real p_height) \
+ GDAPI_FUNC(godot_rect2_as_string, godot_string, const godot_rect2 *p_self) \
+ GDAPI_FUNC(godot_rect2_get_area, godot_real, const godot_rect2 *p_self) \
+ GDAPI_FUNC(godot_rect2_intersects, godot_bool, const godot_rect2 *p_self, const godot_rect2 *p_b) \
+ GDAPI_FUNC(godot_rect2_encloses, godot_bool, const godot_rect2 *p_self, const godot_rect2 *p_b) \
+ GDAPI_FUNC(godot_rect2_has_no_area, godot_bool, const godot_rect2 *p_self) \
+ GDAPI_FUNC(godot_rect2_clip, godot_rect2, const godot_rect2 *p_self, const godot_rect2 *p_b) \
+ GDAPI_FUNC(godot_rect2_merge, godot_rect2, const godot_rect2 *p_self, const godot_rect2 *p_b) \
+ GDAPI_FUNC(godot_rect2_has_point, godot_bool, const godot_rect2 *p_self, const godot_vector2 *p_point) \
+ GDAPI_FUNC(godot_rect2_grow, godot_rect2, const godot_rect2 *p_self, const godot_real p_by) \
+ GDAPI_FUNC(godot_rect2_expand, godot_rect2, const godot_rect2 *p_self, const godot_vector2 *p_to) \
+ GDAPI_FUNC(godot_rect2_operator_equal, godot_bool, const godot_rect2 *p_self, const godot_rect2 *p_b) \
+ GDAPI_FUNC(godot_rect2_get_position, godot_vector2, const godot_rect2 *p_self) \
+ GDAPI_FUNC(godot_rect2_get_size, godot_vector2, const godot_rect2 *p_self) \
+ GDAPI_FUNC_VOID(godot_rect2_set_position, godot_rect2 *p_self, const godot_vector2 *p_pos) \
+ GDAPI_FUNC_VOID(godot_rect2_set_size, godot_rect2 *p_self, const godot_vector2 *p_size) \
+ GDAPI_FUNC_VOID(godot_rect3_new, godot_rect3 *r_dest, const godot_vector3 *p_pos, const godot_vector3 *p_size) \
+ GDAPI_FUNC(godot_rect3_get_position, godot_vector3, const godot_rect3 *p_self) \
+ GDAPI_FUNC_VOID(godot_rect3_set_position, const godot_rect3 *p_self, const godot_vector3 *p_v) \
+ GDAPI_FUNC(godot_rect3_get_size, godot_vector3, const godot_rect3 *p_self) \
+ GDAPI_FUNC_VOID(godot_rect3_set_size, const godot_rect3 *p_self, const godot_vector3 *p_v) \
+ GDAPI_FUNC(godot_rect3_as_string, godot_string, const godot_rect3 *p_self) \
+ GDAPI_FUNC(godot_rect3_get_area, godot_real, const godot_rect3 *p_self) \
+ GDAPI_FUNC(godot_rect3_has_no_area, godot_bool, const godot_rect3 *p_self) \
+ GDAPI_FUNC(godot_rect3_has_no_surface, godot_bool, const godot_rect3 *p_self) \
+ GDAPI_FUNC(godot_rect3_intersects, godot_bool, const godot_rect3 *p_self, const godot_rect3 *p_with) \
+ GDAPI_FUNC(godot_rect3_encloses, godot_bool, const godot_rect3 *p_self, const godot_rect3 *p_with) \
+ GDAPI_FUNC(godot_rect3_merge, godot_rect3, const godot_rect3 *p_self, const godot_rect3 *p_with) \
+ GDAPI_FUNC(godot_rect3_intersection, godot_rect3, const godot_rect3 *p_self, const godot_rect3 *p_with) \
+ GDAPI_FUNC(godot_rect3_intersects_plane, godot_bool, const godot_rect3 *p_self, const godot_plane *p_plane) \
+ GDAPI_FUNC(godot_rect3_intersects_segment, godot_bool, const godot_rect3 *p_self, const godot_vector3 *p_from, const godot_vector3 *p_to) \
+ GDAPI_FUNC(godot_rect3_has_point, godot_bool, const godot_rect3 *p_self, const godot_vector3 *p_point) \
+ GDAPI_FUNC(godot_rect3_get_support, godot_vector3, const godot_rect3 *p_self, const godot_vector3 *p_dir) \
+ GDAPI_FUNC(godot_rect3_get_longest_axis, godot_vector3, const godot_rect3 *p_self) \
+ GDAPI_FUNC(godot_rect3_get_longest_axis_index, godot_int, const godot_rect3 *p_self) \
+ GDAPI_FUNC(godot_rect3_get_longest_axis_size, godot_real, const godot_rect3 *p_self) \
+ GDAPI_FUNC(godot_rect3_get_shortest_axis, godot_vector3, const godot_rect3 *p_self) \
+ GDAPI_FUNC(godot_rect3_get_shortest_axis_index, godot_int, const godot_rect3 *p_self) \
+ GDAPI_FUNC(godot_rect3_get_shortest_axis_size, godot_real, const godot_rect3 *p_self) \
+ GDAPI_FUNC(godot_rect3_expand, godot_rect3, const godot_rect3 *p_self, const godot_vector3 *p_to_point) \
+ GDAPI_FUNC(godot_rect3_grow, godot_rect3, const godot_rect3 *p_self, const godot_real p_by) \
+ GDAPI_FUNC(godot_rect3_get_endpoint, godot_vector3, const godot_rect3 *p_self, const godot_int p_idx) \
+ GDAPI_FUNC(godot_rect3_operator_equal, godot_bool, const godot_rect3 *p_self, const godot_rect3 *p_b) \
+ GDAPI_FUNC_VOID(godot_rid_new, godot_rid *r_dest) \
+ GDAPI_FUNC(godot_rid_get_id, godot_int, const godot_rid *p_self) \
+ GDAPI_FUNC_VOID(godot_rid_new_with_resource, godot_rid *r_dest, const godot_object *p_from) \
+ GDAPI_FUNC(godot_rid_operator_equal, godot_bool, const godot_rid *p_self, const godot_rid *p_b) \
+ GDAPI_FUNC(godot_rid_operator_less, godot_bool, const godot_rid *p_self, const godot_rid *p_b) \
+ GDAPI_FUNC_VOID(godot_transform_new_with_axis_origin, godot_transform *r_dest, const godot_vector3 *p_x_axis, const godot_vector3 *p_y_axis, const godot_vector3 *p_z_axis, const godot_vector3 *p_origin) \
+ GDAPI_FUNC_VOID(godot_transform_new, godot_transform *r_dest, const godot_basis *p_basis, const godot_vector3 *p_origin) \
+ GDAPI_FUNC(godot_transform_get_basis, godot_basis, const godot_transform *p_self) \
+ GDAPI_FUNC_VOID(godot_transform_set_basis, godot_transform *p_self, godot_basis *p_v) \
+ GDAPI_FUNC(godot_transform_get_origin, godot_vector3, const godot_transform *p_self) \
+ GDAPI_FUNC_VOID(godot_transform_set_origin, godot_transform *p_self, godot_vector3 *p_v) \
+ GDAPI_FUNC(godot_transform_as_string, godot_string, const godot_transform *p_self) \
+ GDAPI_FUNC(godot_transform_inverse, godot_transform, const godot_transform *p_self) \
+ GDAPI_FUNC(godot_transform_affine_inverse, godot_transform, const godot_transform *p_self) \
+ GDAPI_FUNC(godot_transform_orthonormalized, godot_transform, const godot_transform *p_self) \
+ GDAPI_FUNC(godot_transform_rotated, godot_transform, const godot_transform *p_self, const godot_vector3 *p_axis, const godot_real p_phi) \
+ GDAPI_FUNC(godot_transform_scaled, godot_transform, const godot_transform *p_self, const godot_vector3 *p_scale) \
+ GDAPI_FUNC(godot_transform_translated, godot_transform, const godot_transform *p_self, const godot_vector3 *p_ofs) \
+ GDAPI_FUNC(godot_transform_looking_at, godot_transform, const godot_transform *p_self, const godot_vector3 *p_target, const godot_vector3 *p_up) \
+ GDAPI_FUNC(godot_transform_xform_plane, godot_plane, const godot_transform *p_self, const godot_plane *p_v) \
+ GDAPI_FUNC(godot_transform_xform_inv_plane, godot_plane, const godot_transform *p_self, const godot_plane *p_v) \
+ GDAPI_FUNC_VOID(godot_transform_new_identity, godot_transform *r_dest) \
+ GDAPI_FUNC(godot_transform_operator_equal, godot_bool, const godot_transform *p_self, const godot_transform *p_b) \
+ GDAPI_FUNC(godot_transform_operator_multiply, godot_transform, const godot_transform *p_self, const godot_transform *p_b) \
+ GDAPI_FUNC(godot_transform_xform_vector3, godot_vector3, const godot_transform *p_self, const godot_vector3 *p_v) \
+ GDAPI_FUNC(godot_transform_xform_inv_vector3, godot_vector3, const godot_transform *p_self, const godot_vector3 *p_v) \
+ GDAPI_FUNC(godot_transform_xform_rect3, godot_rect3, const godot_transform *p_self, const godot_rect3 *p_v) \
+ GDAPI_FUNC(godot_transform_xform_inv_rect3, godot_rect3, const godot_transform *p_self, const godot_rect3 *p_v) \
+ GDAPI_FUNC_VOID(godot_transform2d_new, godot_transform2d *r_dest, const godot_real p_rot, const godot_vector2 *p_pos) \
+ GDAPI_FUNC_VOID(godot_transform2d_new_axis_origin, godot_transform2d *r_dest, const godot_vector2 *p_x_axis, const godot_vector2 *p_y_axis, const godot_vector2 *p_origin) \
+ GDAPI_FUNC(godot_transform2d_as_string, godot_string, const godot_transform2d *p_self) \
+ GDAPI_FUNC(godot_transform2d_inverse, godot_transform2d, const godot_transform2d *p_self) \
+ GDAPI_FUNC(godot_transform2d_affine_inverse, godot_transform2d, const godot_transform2d *p_self) \
+ GDAPI_FUNC(godot_transform2d_get_rotation, godot_real, const godot_transform2d *p_self) \
+ GDAPI_FUNC(godot_transform2d_get_origin, godot_vector2, const godot_transform2d *p_self) \
+ GDAPI_FUNC(godot_transform2d_get_scale, godot_vector2, const godot_transform2d *p_self) \
+ GDAPI_FUNC(godot_transform2d_orthonormalized, godot_transform2d, const godot_transform2d *p_self) \
+ GDAPI_FUNC(godot_transform2d_rotated, godot_transform2d, const godot_transform2d *p_self, const godot_real p_phi) \
+ GDAPI_FUNC(godot_transform2d_scaled, godot_transform2d, const godot_transform2d *p_self, const godot_vector2 *p_scale) \
+ GDAPI_FUNC(godot_transform2d_translated, godot_transform2d, const godot_transform2d *p_self, const godot_vector2 *p_offset) \
+ GDAPI_FUNC(godot_transform2d_xform_vector2, godot_vector2, const godot_transform2d *p_self, const godot_vector2 *p_v) \
+ GDAPI_FUNC(godot_transform2d_xform_inv_vector2, godot_vector2, const godot_transform2d *p_self, const godot_vector2 *p_v) \
+ GDAPI_FUNC(godot_transform2d_basis_xform_vector2, godot_vector2, const godot_transform2d *p_self, const godot_vector2 *p_v) \
+ GDAPI_FUNC(godot_transform2d_basis_xform_inv_vector2, godot_vector2, const godot_transform2d *p_self, const godot_vector2 *p_v) \
+ GDAPI_FUNC(godot_transform2d_interpolate_with, godot_transform2d, const godot_transform2d *p_self, const godot_transform2d *p_m, const godot_real p_c) \
+ GDAPI_FUNC(godot_transform2d_operator_equal, godot_bool, const godot_transform2d *p_self, const godot_transform2d *p_b) \
+ GDAPI_FUNC(godot_transform2d_operator_multiply, godot_transform2d, const godot_transform2d *p_self, const godot_transform2d *p_b) \
+ GDAPI_FUNC_VOID(godot_transform2d_new_identity, godot_transform2d *r_dest) \
+ GDAPI_FUNC(godot_transform2d_xform_rect2, godot_rect2, const godot_transform2d *p_self, const godot_rect2 *p_v) \
+ GDAPI_FUNC(godot_transform2d_xform_inv_rect2, godot_rect2, const godot_transform2d *p_self, const godot_rect2 *p_v) \
+ GDAPI_FUNC(godot_variant_get_type, godot_variant_type, const godot_variant *p_v) \
+ GDAPI_FUNC_VOID(godot_variant_new_copy, godot_variant *r_dest, const godot_variant *p_src) \
+ GDAPI_FUNC_VOID(godot_variant_new_nil, godot_variant *r_dest) \
+ GDAPI_FUNC_VOID(godot_variant_new_bool, godot_variant *p_v, const godot_bool p_b) \
+ GDAPI_FUNC_VOID(godot_variant_new_uint, godot_variant *r_dest, const uint64_t p_i) \
+ GDAPI_FUNC_VOID(godot_variant_new_int, godot_variant *r_dest, const int64_t p_i) \
+ GDAPI_FUNC_VOID(godot_variant_new_real, godot_variant *r_dest, const double p_r) \
+ GDAPI_FUNC_VOID(godot_variant_new_string, godot_variant *r_dest, const godot_string *p_s) \
+ GDAPI_FUNC_VOID(godot_variant_new_vector2, godot_variant *r_dest, const godot_vector2 *p_v2) \
+ GDAPI_FUNC_VOID(godot_variant_new_rect2, godot_variant *r_dest, const godot_rect2 *p_rect2) \
+ GDAPI_FUNC_VOID(godot_variant_new_vector3, godot_variant *r_dest, const godot_vector3 *p_v3) \
+ GDAPI_FUNC_VOID(godot_variant_new_transform2d, godot_variant *r_dest, const godot_transform2d *p_t2d) \
+ GDAPI_FUNC_VOID(godot_variant_new_plane, godot_variant *r_dest, const godot_plane *p_plane) \
+ GDAPI_FUNC_VOID(godot_variant_new_quat, godot_variant *r_dest, const godot_quat *p_quat) \
+ GDAPI_FUNC_VOID(godot_variant_new_rect3, godot_variant *r_dest, const godot_rect3 *p_rect3) \
+ GDAPI_FUNC_VOID(godot_variant_new_basis, godot_variant *r_dest, const godot_basis *p_basis) \
+ GDAPI_FUNC_VOID(godot_variant_new_transform, godot_variant *r_dest, const godot_transform *p_trans) \
+ GDAPI_FUNC_VOID(godot_variant_new_color, godot_variant *r_dest, const godot_color *p_color) \
+ GDAPI_FUNC_VOID(godot_variant_new_node_path, godot_variant *r_dest, const godot_node_path *p_np) \
+ GDAPI_FUNC_VOID(godot_variant_new_rid, godot_variant *r_dest, const godot_rid *p_rid) \
+ GDAPI_FUNC_VOID(godot_variant_new_object, godot_variant *r_dest, const godot_object *p_obj) \
+ GDAPI_FUNC_VOID(godot_variant_new_dictionary, godot_variant *r_dest, const godot_dictionary *p_dict) \
+ GDAPI_FUNC_VOID(godot_variant_new_array, godot_variant *r_dest, const godot_array *p_arr) \
+ GDAPI_FUNC_VOID(godot_variant_new_pool_byte_array, godot_variant *r_dest, const godot_pool_byte_array *p_pba) \
+ GDAPI_FUNC_VOID(godot_variant_new_pool_int_array, godot_variant *r_dest, const godot_pool_int_array *p_pia) \
+ GDAPI_FUNC_VOID(godot_variant_new_pool_real_array, godot_variant *r_dest, const godot_pool_real_array *p_pra) \
+ GDAPI_FUNC_VOID(godot_variant_new_pool_string_array, godot_variant *r_dest, const godot_pool_string_array *p_psa) \
+ GDAPI_FUNC_VOID(godot_variant_new_pool_vector2_array, godot_variant *r_dest, const godot_pool_vector2_array *p_pv2a) \
+ GDAPI_FUNC_VOID(godot_variant_new_pool_vector3_array, godot_variant *r_dest, const godot_pool_vector3_array *p_pv3a) \
+ GDAPI_FUNC_VOID(godot_variant_new_pool_color_array, godot_variant *r_dest, const godot_pool_color_array *p_pca) \
+ GDAPI_FUNC(godot_variant_as_bool, godot_bool, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_uint, uint64_t, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_int, int64_t, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_real, double, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_string, godot_string, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_vector2, godot_vector2, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_rect2, godot_rect2, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_vector3, godot_vector3, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_transform2d, godot_transform2d, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_plane, godot_plane, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_quat, godot_quat, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_rect3, godot_rect3, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_basis, godot_basis, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_transform, godot_transform, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_color, godot_color, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_node_path, godot_node_path, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_rid, godot_rid, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_object, godot_object *, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_dictionary, godot_dictionary, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_array, godot_array, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_pool_byte_array, godot_pool_byte_array, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_pool_int_array, godot_pool_int_array, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_pool_real_array, godot_pool_real_array, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_pool_string_array, godot_pool_string_array, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_pool_vector2_array, godot_pool_vector2_array, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_pool_vector3_array, godot_pool_vector3_array, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_as_pool_color_array, godot_pool_color_array, const godot_variant *p_self) \
+ GDAPI_FUNC(godot_variant_call, godot_variant, godot_variant *p_self, const godot_string *p_method, const godot_variant **p_args, const godot_int p_argcount, godot_variant_call_error *r_error) \
+ GDAPI_FUNC(godot_variant_has_method, godot_bool, const godot_variant *p_self, const godot_string *p_method) \
+ GDAPI_FUNC(godot_variant_operator_equal, godot_bool, const godot_variant *p_self, const godot_variant *p_other) \
+ GDAPI_FUNC(godot_variant_operator_less, godot_bool, const godot_variant *p_self, const godot_variant *p_other) \
+ GDAPI_FUNC(godot_variant_hash_compare, godot_bool, const godot_variant *p_self, const godot_variant *p_other) \
+ GDAPI_FUNC(godot_variant_booleanize, godot_bool, const godot_variant *p_self) \
+ GDAPI_FUNC_VOID(godot_variant_destroy, godot_variant *p_self) \
+ GDAPI_FUNC_VOID(godot_string_new, godot_string *r_dest) \
+ GDAPI_FUNC_VOID(godot_string_new_copy, godot_string *r_dest, const godot_string *p_src) \
+ GDAPI_FUNC_VOID(godot_string_new_data, godot_string *r_dest, const char *p_contents, const int p_size) \
+ GDAPI_FUNC_VOID(godot_string_new_unicode_data, godot_string *r_dest, const wchar_t *p_contents, const int p_size) \
+ GDAPI_FUNC_VOID(godot_string_get_data, const godot_string *p_self, char *p_dest, int *p_size) \
+ GDAPI_FUNC(godot_string_operator_index, wchar_t *, godot_string *p_self, const godot_int p_idx) \
+ GDAPI_FUNC(godot_string_c_str, const char *, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_unicode_str, const wchar_t *, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_operator_equal, godot_bool, const godot_string *p_self, const godot_string *p_b) \
+ GDAPI_FUNC(godot_string_operator_less, godot_bool, const godot_string *p_self, const godot_string *p_b) \
+ GDAPI_FUNC(godot_string_operator_plus, godot_string, const godot_string *p_self, const godot_string *p_b) \
+ GDAPI_FUNC(godot_string_length, godot_int, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_begins_with, godot_bool, const godot_string *p_self, const godot_string *p_string) \
+ GDAPI_FUNC(godot_string_begins_with_char_array, godot_bool, const godot_string *p_self, const char *p_char_array) \
+ GDAPI_FUNC(godot_string_bigrams, godot_array, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_chr, godot_string, wchar_t p_character) \
+ GDAPI_FUNC(godot_string_ends_with, godot_bool, const godot_string *p_self, const godot_string *p_string) \
+ GDAPI_FUNC(godot_string_find, godot_int, const godot_string *p_self, godot_string p_what) \
+ GDAPI_FUNC(godot_string_find_from, godot_int, const godot_string *p_self, godot_string p_what, godot_int p_from) \
+ GDAPI_FUNC(godot_string_findmk, godot_int, const godot_string *p_self, const godot_array *p_keys) \
+ GDAPI_FUNC(godot_string_findmk_from, godot_int, const godot_string *p_self, const godot_array *p_keys, godot_int p_from) \
+ GDAPI_FUNC(godot_string_findmk_from_in_place, godot_int, const godot_string *p_self, const godot_array *p_keys, godot_int p_from, godot_int *r_key) \
+ GDAPI_FUNC(godot_string_findn, godot_int, const godot_string *p_self, godot_string p_what) \
+ GDAPI_FUNC(godot_string_findn_from, godot_int, const godot_string *p_self, godot_string p_what, godot_int p_from) \
+ GDAPI_FUNC(godot_string_find_last, godot_int, const godot_string *p_self, godot_string p_what) \
+ GDAPI_FUNC(godot_string_format, godot_string, const godot_string *p_self, const godot_variant *p_values) \
+ GDAPI_FUNC(godot_string_format_with_custom_placeholder, godot_string, const godot_string *p_self, const godot_variant *p_values, const char *p_placeholder) \
+ GDAPI_FUNC(godot_string_hex_encode_buffer, godot_string, const uint8_t *p_buffer, godot_int p_len) \
+ GDAPI_FUNC(godot_string_hex_to_int, godot_int, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_hex_to_int_without_prefix, godot_int, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_insert, godot_string, const godot_string *p_self, godot_int p_at_pos, godot_string p_string) \
+ GDAPI_FUNC(godot_string_is_numeric, godot_bool, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_is_subsequence_of, godot_bool, const godot_string *p_self, const godot_string *p_string) \
+ GDAPI_FUNC(godot_string_is_subsequence_ofi, godot_bool, const godot_string *p_self, const godot_string *p_string) \
+ GDAPI_FUNC(godot_string_lpad, godot_string, const godot_string *p_self, godot_int p_min_length) \
+ GDAPI_FUNC(godot_string_lpad_with_custom_character, godot_string, const godot_string *p_self, godot_int p_min_length, const godot_string *p_character) \
+ GDAPI_FUNC(godot_string_match, godot_bool, const godot_string *p_self, const godot_string *p_wildcard) \
+ GDAPI_FUNC(godot_string_matchn, godot_bool, const godot_string *p_self, const godot_string *p_wildcard) \
+ GDAPI_FUNC(godot_string_md5, godot_string, const uint8_t *p_md5) \
+ GDAPI_FUNC(godot_string_num, godot_string, double p_num) \
+ GDAPI_FUNC(godot_string_num_int64, godot_string, int64_t p_num, godot_int p_base) \
+ GDAPI_FUNC(godot_string_num_int64_capitalized, godot_string, int64_t p_num, godot_int p_base, godot_bool p_capitalize_hex) \
+ GDAPI_FUNC(godot_string_num_real, godot_string, double p_num) \
+ GDAPI_FUNC(godot_string_num_scientific, godot_string, double p_num) \
+ GDAPI_FUNC(godot_string_num_with_decimals, godot_string, double p_num, godot_int p_decimals) \
+ GDAPI_FUNC(godot_string_pad_decimals, godot_string, const godot_string *p_self, godot_int p_digits) \
+ GDAPI_FUNC(godot_string_pad_zeros, godot_string, const godot_string *p_self, godot_int p_digits) \
+ GDAPI_FUNC(godot_string_replace_first, godot_string, const godot_string *p_self, godot_string p_key, godot_string p_with) \
+ GDAPI_FUNC(godot_string_replace, godot_string, const godot_string *p_self, godot_string p_key, godot_string p_with) \
+ GDAPI_FUNC(godot_string_replacen, godot_string, const godot_string *p_self, godot_string p_key, godot_string p_with) \
+ GDAPI_FUNC(godot_string_rfind, godot_int, const godot_string *p_self, godot_string p_what) \
+ GDAPI_FUNC(godot_string_rfindn, godot_int, const godot_string *p_self, godot_string p_what) \
+ GDAPI_FUNC(godot_string_rfind_from, godot_int, const godot_string *p_self, godot_string p_what, godot_int p_from) \
+ GDAPI_FUNC(godot_string_rfindn_from, godot_int, const godot_string *p_self, godot_string p_what, godot_int p_from) \
+ GDAPI_FUNC(godot_string_rpad, godot_string, const godot_string *p_self, godot_int p_min_length) \
+ GDAPI_FUNC(godot_string_rpad_with_custom_character, godot_string, const godot_string *p_self, godot_int p_min_length, const godot_string *p_character) \
+ GDAPI_FUNC(godot_string_similarity, godot_real, const godot_string *p_self, const godot_string *p_string) \
+ GDAPI_FUNC(godot_string_sprintf, godot_string, const godot_string *p_self, const godot_array *p_values, godot_bool *p_error) \
+ GDAPI_FUNC(godot_string_substr, godot_string, const godot_string *p_self, godot_int p_from, godot_int p_chars) \
+ GDAPI_FUNC(godot_string_to_double, double, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_to_float, godot_real, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_to_int, godot_int, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_camelcase_to_underscore, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_camelcase_to_underscore_lowercased, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_capitalize, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_char_to_double, double, const char *p_what) \
+ GDAPI_FUNC(godot_string_char_to_int, godot_int, const char *p_what) \
+ GDAPI_FUNC(godot_string_wchar_to_int, int64_t, const wchar_t *p_str) \
+ GDAPI_FUNC(godot_string_char_to_int_with_len, godot_int, const char *p_what, godot_int p_len) \
+ GDAPI_FUNC(godot_string_char_to_int64_with_len, int64_t, const wchar_t *p_str, int p_len) \
+ GDAPI_FUNC(godot_string_hex_to_int64, int64_t, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_hex_to_int64_with_prefix, int64_t, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_to_int64, int64_t, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_unicode_char_to_double, double, const wchar_t *p_str, const wchar_t **r_end) \
+ GDAPI_FUNC(godot_string_get_slice_count, godot_int, const godot_string *p_self, godot_string p_splitter) \
+ GDAPI_FUNC(godot_string_get_slice, godot_string, const godot_string *p_self, godot_string p_splitter, godot_int p_slice) \
+ GDAPI_FUNC(godot_string_get_slicec, godot_string, const godot_string *p_self, wchar_t p_splitter, godot_int p_slice) \
+ GDAPI_FUNC(godot_string_split, godot_array, const godot_string *p_self, const godot_string *p_splitter) \
+ GDAPI_FUNC(godot_string_split_allow_empty, godot_array, const godot_string *p_self, const godot_string *p_splitter) \
+ GDAPI_FUNC(godot_string_split_floats, godot_array, const godot_string *p_self, const godot_string *p_splitter) \
+ GDAPI_FUNC(godot_string_split_floats_allows_empty, godot_array, const godot_string *p_self, const godot_string *p_splitter) \
+ GDAPI_FUNC(godot_string_split_floats_mk, godot_array, const godot_string *p_self, const godot_array *p_splitters) \
+ GDAPI_FUNC(godot_string_split_floats_mk_allows_empty, godot_array, const godot_string *p_self, const godot_array *p_splitters) \
+ GDAPI_FUNC(godot_string_split_ints, godot_array, const godot_string *p_self, const godot_string *p_splitter) \
+ GDAPI_FUNC(godot_string_split_ints_allows_empty, godot_array, const godot_string *p_self, const godot_string *p_splitter) \
+ GDAPI_FUNC(godot_string_split_ints_mk, godot_array, const godot_string *p_self, const godot_array *p_splitters) \
+ GDAPI_FUNC(godot_string_split_ints_mk_allows_empty, godot_array, const godot_string *p_self, const godot_array *p_splitters) \
+ GDAPI_FUNC(godot_string_split_spaces, godot_array, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_char_lowercase, wchar_t, wchar_t p_char) \
+ GDAPI_FUNC(godot_string_char_uppercase, wchar_t, wchar_t p_char) \
+ GDAPI_FUNC(godot_string_to_lower, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_to_upper, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_get_basename, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_get_extension, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_left, godot_string, const godot_string *p_self, godot_int p_pos) \
+ GDAPI_FUNC(godot_string_ord_at, wchar_t, const godot_string *p_self, godot_int p_idx) \
+ GDAPI_FUNC(godot_string_plus_file, godot_string, const godot_string *p_self, const godot_string *p_file) \
+ GDAPI_FUNC(godot_string_right, godot_string, const godot_string *p_self, godot_int p_pos) \
+ GDAPI_FUNC(godot_string_strip_edges, godot_string, const godot_string *p_self, godot_bool p_left, godot_bool p_right) \
+ GDAPI_FUNC(godot_string_strip_escapes, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC_VOID(godot_string_erase, godot_string *p_self, godot_int p_pos, godot_int p_chars) \
+ GDAPI_FUNC_VOID(godot_string_ascii, godot_string *p_self, char *result) \
+ GDAPI_FUNC_VOID(godot_string_ascii_extended, godot_string *p_self, char *result) \
+ GDAPI_FUNC_VOID(godot_string_utf8, godot_string *p_self, char *result) \
+ GDAPI_FUNC(godot_string_parse_utf8, godot_bool, godot_string *p_self, const char *p_utf8) \
+ GDAPI_FUNC(godot_string_parse_utf8_with_len, godot_bool, godot_string *p_self, const char *p_utf8, godot_int p_len) \
+ GDAPI_FUNC(godot_string_chars_to_utf8, godot_string, const char *p_utf8) \
+ GDAPI_FUNC(godot_string_chars_to_utf8_with_len, godot_string, const char *p_utf8, godot_int p_len) \
+ GDAPI_FUNC(godot_string_hash, uint32_t, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_hash64, uint64_t, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_hash_chars, uint32_t, const char *p_cstr) \
+ GDAPI_FUNC(godot_string_hash_chars_with_len, uint32_t, const char *p_cstr, godot_int p_len) \
+ GDAPI_FUNC(godot_string_hash_utf8_chars, uint32_t, const wchar_t *p_str) \
+ GDAPI_FUNC(godot_string_hash_utf8_chars_with_len, uint32_t, const wchar_t *p_str, godot_int p_len) \
+ GDAPI_FUNC(godot_string_md5_buffer, godot_pool_byte_array, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_md5_text, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_sha256_buffer, godot_pool_byte_array, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_sha256_text, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_empty, godot_bool, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_get_base_dir, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_get_file, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_humanize_size, godot_string, size_t p_size) \
+ GDAPI_FUNC(godot_string_is_abs_path, godot_bool, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_is_rel_path, godot_bool, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_is_resource_file, godot_bool, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_path_to, godot_string, const godot_string *p_self, const godot_string *p_path) \
+ GDAPI_FUNC(godot_string_path_to_file, godot_string, const godot_string *p_self, const godot_string *p_path) \
+ GDAPI_FUNC(godot_string_simplify_path, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_c_escape, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_c_escape_multiline, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_c_unescape, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_http_escape, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_http_unescape, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_json_escape, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_word_wrap, godot_string, const godot_string *p_self, godot_int p_chars_per_line) \
+ GDAPI_FUNC(godot_string_xml_escape, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_xml_escape_with_quotes, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_xml_unescape, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_percent_decode, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_percent_encode, godot_string, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_is_valid_float, godot_bool, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_is_valid_hex_number, godot_bool, const godot_string *p_self, godot_bool p_with_prefix) \
+ GDAPI_FUNC(godot_string_is_valid_html_color, godot_bool, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_is_valid_identifier, godot_bool, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_is_valid_integer, godot_bool, const godot_string *p_self) \
+ GDAPI_FUNC(godot_string_is_valid_ip_address, godot_bool, const godot_string *p_self) \
+ GDAPI_FUNC_VOID(godot_string_destroy, godot_string *p_self) \
+ GDAPI_FUNC_VOID(godot_object_destroy, godot_object *p_o) \
+ GDAPI_FUNC(godot_global_get_singleton, godot_object *, char *p_name) \
+ GDAPI_FUNC(godot_get_stack_bottom, void *) \
+ GDAPI_FUNC(godot_method_bind_get_method, godot_method_bind *, const char *p_classname, const char *p_methodname) \
+ GDAPI_FUNC_VOID(godot_method_bind_ptrcall, godot_method_bind *p_method_bind, godot_object *p_instance, const void **p_args, void *p_ret) \
+ GDAPI_FUNC(godot_method_bind_call, godot_variant, godot_method_bind *p_method_bind, godot_object *p_instance, const godot_variant **p_args, const int p_arg_count, godot_variant_call_error *p_call_error) \
+ GDAPI_FUNC(godot_get_class_constructor, godot_class_constructor, const char *p_classname) \
+ GDAPI_FUNC(godot_get_global_constants, godot_dictionary) \
+ GDAPI_FUNC(godot_alloc, void *, int p_bytes) \
+ GDAPI_FUNC(godot_realloc, void *, void *p_ptr, int p_bytes) \
+ GDAPI_FUNC_VOID(godot_free, void *p_ptr) \
+ GDAPI_FUNC_VOID(godot_print_error, const char *p_description, const char *p_function, const char *p_file, int p_line) \
+ GDAPI_FUNC_VOID(godot_print_warning, const char *p_description, const char *p_function, const char *p_file, int p_line) \
+ GDAPI_FUNC_VOID(godot_print, const godot_string *p_message) \
+ GDAPI_FUNC_VOID(godot_nativescript_register_class, void *p_gdnative_handle, const char *p_name, const char *p_base, godot_instance_create_func p_create_func, godot_instance_destroy_func p_destroy_func) \
+ GDAPI_FUNC_VOID(godot_nativescript_register_tool_class, void *p_gdnative_handle, const char *p_name, const char *p_base, godot_instance_create_func p_create_func, godot_instance_destroy_func p_destroy_func) \
+ GDAPI_FUNC_VOID(godot_nativescript_register_method, void *p_gdnative_handle, const char *p_name, const char *p_function_name, godot_method_attributes p_attr, godot_instance_method p_method) \
+ GDAPI_FUNC_VOID(godot_nativescript_register_property, void *p_gdnative_handle, const char *p_name, const char *p_path, godot_property_attributes *p_attr, godot_property_set_func p_set_func, godot_property_get_func p_get_func) \
+ GDAPI_FUNC_VOID(godot_nativescript_register_signal, void *p_gdnative_handle, const char *p_name, const godot_signal *p_signal) \
+ GDAPI_FUNC(godot_nativescript_get_userdata, void *, godot_object *p_instance)
+
+#define GDAPI_FUNC(name, ret_type, ...) \
+ ret_type (*name)(__VA_ARGS__);
+#define GDAPI_FUNC_VOID(name, ...) \
+ void (*name)(__VA_ARGS__);
+
+typedef struct godot_gdnative_api_struct {
+ GODOT_GDNATIVE_API_FUNCTIONS
+} godot_gdnative_api_struct;
+
+#undef GDAPI_FUNC
+#undef GDAPI_FUNC_VOID
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // GODOT_GDNATIVE_API_STRUCT_H
diff --git a/modules/gdnative/include/nativescript/godot_nativescript.h b/modules/gdnative/include/nativescript/godot_nativescript.h
index 96f213ead7..5095b7a83e 100644
--- a/modules/gdnative/include/nativescript/godot_nativescript.h
+++ b/modules/gdnative/include/nativescript/godot_nativescript.h
@@ -51,8 +51,8 @@ extern "C" {
#elif defined(__APPLE__)
#include "TargetConditionals.h"
#if TARGET_OS_IPHONE
-#define GDCALLINGCONV
-#define GDAPI
+#define GDCALLINGCONV __attribute__((visibility("default")))
+#define GDAPI GDCALLINGCONV
#elif TARGET_OS_MAC
#define GDCALLINGCONV __attribute__((sysv_abi))
#define GDAPI GDCALLINGCONV
diff --git a/modules/gdnative/nativescript/SCsub b/modules/gdnative/nativescript/SCsub
index e980e40e8e..178afec64a 100644
--- a/modules/gdnative/nativescript/SCsub
+++ b/modules/gdnative/nativescript/SCsub
@@ -7,4 +7,7 @@ mod_env.add_source_files(env.modules_sources, "*.cpp")
mod_env.Append(CPPPATH='#modules/gdnative')
mod_env.Append(CPPFLAGS=['-DGDAPI_BUILT_IN'])
+if "platform" in env and env["platform"] in ["x11", "iphone"]:
+ env.Append(LINKFLAGS=["-rdynamic"])
+
Export('mod_env')
diff --git a/modules/gdnative/register_types.cpp b/modules/gdnative/register_types.cpp
index dc0da5021d..997c342045 100644
--- a/modules/gdnative/register_types.cpp
+++ b/modules/gdnative/register_types.cpp
@@ -99,7 +99,6 @@ Set<String> get_gdnative_singletons(EditorFileSystemDirectory *p_dir) {
void actual_discoverer_handler() {
EditorFileSystemDirectory *dir = EditorFileSystem::get_singleton()->get_filesystem();
-
Set<String> file_paths = get_gdnative_singletons(dir);
Array files;
@@ -118,11 +117,10 @@ GDNativeSingletonDiscover *discoverer = NULL;
static void editor_init_callback() {
- GDNativeLibraryEditor *library_editor = memnew( GDNativeLibraryEditor );
+ GDNativeLibraryEditor *library_editor = memnew(GDNativeLibraryEditor);
library_editor->set_name(TTR("GDNative"));
ProjectSettingsEditor::get_singleton()->get_tabs()->add_child(library_editor);
-
discoverer = memnew(GDNativeSingletonDiscover);
EditorFileSystem::get_singleton()->connect("filesystem_changed", discoverer, "get_class");
}
diff --git a/modules/gdscript/gd_compiler.cpp b/modules/gdscript/gd_compiler.cpp
index 4803781c67..7036a708e5 100644
--- a/modules/gdscript/gd_compiler.cpp
+++ b/modules/gdscript/gd_compiler.cpp
@@ -131,7 +131,7 @@ int GDCompiler::_parse_assign_right_expression(CodeGen &codegen, const GDParser:
switch (p_expression->op) {
case GDParser::OperatorNode::OP_ASSIGN_ADD: var_op = Variant::OP_ADD; break;
- case GDParser::OperatorNode::OP_ASSIGN_SUB: var_op = Variant::OP_SUBSTRACT; break;
+ case GDParser::OperatorNode::OP_ASSIGN_SUB: var_op = Variant::OP_SUBTRACT; break;
case GDParser::OperatorNode::OP_ASSIGN_MUL: var_op = Variant::OP_MULTIPLY; break;
case GDParser::OperatorNode::OP_ASSIGN_DIV: var_op = Variant::OP_DIVIDE; break;
case GDParser::OperatorNode::OP_ASSIGN_MOD: var_op = Variant::OP_MODULE; break;
@@ -759,7 +759,7 @@ int GDCompiler::_parse_expression(CodeGen &codegen, const GDParser::Node *p_expr
if (!_create_binary_operator(codegen, on, Variant::OP_ADD, p_stack_level)) return -1;
} break;
case GDParser::OperatorNode::OP_SUB: {
- if (!_create_binary_operator(codegen, on, Variant::OP_SUBSTRACT, p_stack_level)) return -1;
+ if (!_create_binary_operator(codegen, on, Variant::OP_SUBTRACT, p_stack_level)) return -1;
} break;
case GDParser::OperatorNode::OP_MUL: {
if (!_create_binary_operator(codegen, on, Variant::OP_MULTIPLY, p_stack_level)) return -1;
diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp
index bc51b84047..b0408917a4 100644
--- a/modules/gdscript/gd_editor.cpp
+++ b/modules/gdscript/gd_editor.cpp
@@ -908,7 +908,7 @@ static bool _guess_expression_type(GDCompletionContext &context, const GDParser:
Variant::Operator vop = Variant::OP_MAX;
switch (op->op) {
case GDParser::OperatorNode::OP_ADD: vop = Variant::OP_ADD; break;
- case GDParser::OperatorNode::OP_SUB: vop = Variant::OP_SUBSTRACT; break;
+ case GDParser::OperatorNode::OP_SUB: vop = Variant::OP_SUBTRACT; break;
case GDParser::OperatorNode::OP_MUL: vop = Variant::OP_MULTIPLY; break;
case GDParser::OperatorNode::OP_DIV: vop = Variant::OP_DIVIDE; break;
case GDParser::OperatorNode::OP_MOD: vop = Variant::OP_MODULE; break;
@@ -1952,7 +1952,6 @@ static void _find_call_arguments(GDCompletionContext &context, const GDParser::N
//make sure identifier exists...
const GDParser::IdentifierNode *id = static_cast<const GDParser::IdentifierNode *>(op->arguments[1]);
-
if (op->arguments[0]->type == GDParser::Node::TYPE_SELF) {
//self, look up
@@ -2021,7 +2020,7 @@ static void _find_call_arguments(GDCompletionContext &context, const GDParser::N
base = script->get_native();
} else if (nc.is_valid()) {
- if (context.function && !context.function->_static) {
+ if (!(context.function && context.function->_static)) {
GDCompletionIdentifier ci;
ci.type = Variant::OBJECT;
diff --git a/modules/gdscript/gd_function.cpp b/modules/gdscript/gd_function.cpp
index ddee7b2521..9df2823c35 100644
--- a/modules/gdscript/gd_function.cpp
+++ b/modules/gdscript/gd_function.cpp
@@ -41,11 +41,12 @@ Variant *GDFunction::_get_variant(int p_address, GDInstance *p_instance, GDScrip
switch ((p_address & ADDR_TYPE_MASK) >> ADDR_BITS) {
case ADDR_TYPE_SELF: {
-
- if (!p_instance) {
+#ifdef DEBUG_ENABLED
+ if (unlikely(!p_instance)) {
r_error = "Cannot access self without instance.";
return NULL;
}
+#endif
return &self;
} break;
case ADDR_TYPE_CLASS: {
@@ -53,18 +54,22 @@ Variant *GDFunction::_get_variant(int p_address, GDInstance *p_instance, GDScrip
return &p_script->_static_ref;
} break;
case ADDR_TYPE_MEMBER: {
- //member indexing is O(1)
- if (!p_instance) {
+#ifdef DEBUG_ENABLED
+ if (unlikely(!p_instance)) {
r_error = "Cannot access member without instance.";
return NULL;
}
+#endif
+ //member indexing is O(1)
return &p_instance->members[address];
} break;
case ADDR_TYPE_CLASS_CONSTANT: {
//todo change to index!
GDScript *o = p_script;
+#ifdef DEBUG_ENABLED
ERR_FAIL_INDEX_V(address, _global_names_count, NULL);
+#endif
const StringName *sn = &_global_names_ptr[address];
while (o) {
@@ -84,18 +89,22 @@ Variant *GDFunction::_get_variant(int p_address, GDInstance *p_instance, GDScrip
ERR_FAIL_V(NULL);
} break;
case ADDR_TYPE_LOCAL_CONSTANT: {
+#ifdef DEBUG_ENABLED
ERR_FAIL_INDEX_V(address, _constant_count, NULL);
+#endif
return &_constants_ptr[address];
} break;
case ADDR_TYPE_STACK:
case ADDR_TYPE_STACK_VARIABLE: {
+#ifdef DEBUG_ENABLED
ERR_FAIL_INDEX_V(address, _stack_size, NULL);
+#endif
return &p_stack[address];
} break;
case ADDR_TYPE_GLOBAL: {
-
+#ifdef DEBUG_ENABLED
ERR_FAIL_INDEX_V(address, GDScriptLanguage::get_singleton()->get_global_array_size(), NULL);
-
+#endif
return &GDScriptLanguage::get_singleton()->get_global_array()[address];
} break;
case ADDR_TYPE_NIL: {
@@ -161,8 +170,71 @@ static String _get_var_type(const Variant *p_type) {
return basestr;
}
+#if defined(__GNUC__) && !defined(__clang__)
+#define OPCODES_TABLE \
+ static const void *switch_table_ops[] = { \
+ &&OPCODE_OPERATOR, \
+ &&OPCODE_EXTENDS_TEST, \
+ &&OPCODE_SET, \
+ &&OPCODE_GET, \
+ &&OPCODE_SET_NAMED, \
+ &&OPCODE_GET_NAMED, \
+ &&OPCODE_SET_MEMBER, \
+ &&OPCODE_GET_MEMBER, \
+ &&OPCODE_ASSIGN, \
+ &&OPCODE_ASSIGN_TRUE, \
+ &&OPCODE_ASSIGN_FALSE, \
+ &&OPCODE_CONSTRUCT, \
+ &&OPCODE_CONSTRUCT_ARRAY, \
+ &&OPCODE_CONSTRUCT_DICTIONARY, \
+ &&OPCODE_CALL, \
+ &&OPCODE_CALL_RETURN, \
+ &&OPCODE_CALL_BUILT_IN, \
+ &&OPCODE_CALL_SELF, \
+ &&OPCODE_CALL_SELF_BASE, \
+ &&OPCODE_YIELD, \
+ &&OPCODE_YIELD_SIGNAL, \
+ &&OPCODE_YIELD_RESUME, \
+ &&OPCODE_JUMP, \
+ &&OPCODE_JUMP_IF, \
+ &&OPCODE_JUMP_IF_NOT, \
+ &&OPCODE_JUMP_TO_DEF_ARGUMENT, \
+ &&OPCODE_RETURN, \
+ &&OPCODE_ITERATE_BEGIN, \
+ &&OPCODE_ITERATE, \
+ &&OPCODE_ASSERT, \
+ &&OPCODE_BREAKPOINT, \
+ &&OPCODE_LINE, \
+ &&OPCODE_END \
+ };
+
+#define OPCODE(m_op) \
+ m_op:
+#define OPCODE_WHILE(m_test)
+#define OPCODES_END \
+ OPSEXIT:
+#define OPCODES_OUT \
+ OPSOUT:
+#define DISPATCH_OPCODE goto *switch_table_ops[_code_ptr[ip]]
+#define OPCODE_SWITCH(m_test) DISPATCH_OPCODE;
+#define OPCODE_BREAK goto OPSEXIT
+#define OPCODE_OUT goto OPSOUT
+#else
+#define OPCODES_TABLE
+#define OPCODE(m_op) case m_op:
+#define OPCODE_WHILE(m_test) while (m_test)
+#define OPCODES_END
+#define OPCODES_OUT
+#define DISPATCH_OPCODE continue
+#define OPCODE_SWITCH(m_test) switch (m_test)
+#define OPCODE_BREAK break
+#define OPCODE_OUT break
+#endif
+
Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_argcount, Variant::CallError &r_err, CallState *p_state) {
+ OPCODES_TABLE;
+
if (!_code_ptr) {
return Variant();
@@ -271,16 +343,26 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
if (ScriptDebugger::get_singleton())
GDScriptLanguage::get_singleton()->enter_function(p_instance, this, stack, &ip, &line);
+#define GD_ERR_BREAK(m_cond) \
+ { \
+ if (unlikely(m_cond)) { \
+ _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Condition ' " _STR(m_cond) " ' is true. Breaking..:"); \
+ OPCODE_BREAK; \
+ } else \
+ _err_error_exists = false; \
+ }
+
#define CHECK_SPACE(m_space) \
- ERR_BREAK((ip + m_space) > _code_size)
+ GD_ERR_BREAK((ip + m_space) > _code_size)
#define GET_VARIANT_PTR(m_v, m_code_ofs) \
Variant *m_v; \
m_v = _get_variant(_code_ptr[ip + m_code_ofs], p_instance, _class, self, stack, err_text); \
- if (!m_v) \
- break;
+ if (unlikely(!m_v)) \
+ OPCODE_BREAK;
#else
+#define GD_ERR_BREAK(m_cond)
#define CHECK_SPACE(m_space)
#define GET_VARIANT_PTR(m_v, m_code_ofs) \
Variant *m_v; \
@@ -302,32 +384,36 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
#endif
bool exit_ok = false;
- while (ip < _code_size) {
-
+#ifdef DEBUG_ENABLED
+ OPCODE_WHILE(ip < _code_size) {
int last_opcode = _code_ptr[ip];
- switch (_code_ptr[ip]) {
+#else
+ OPCODE_WHILE(true) {
+#endif
- case OPCODE_OPERATOR: {
+ OPCODE_SWITCH(_code_ptr[ip]) {
+
+ OPCODE(OPCODE_OPERATOR) {
CHECK_SPACE(5);
bool valid;
Variant::Operator op = (Variant::Operator)_code_ptr[ip + 1];
- ERR_BREAK(op >= Variant::OP_MAX);
+ GD_ERR_BREAK(op >= Variant::OP_MAX);
GET_VARIANT_PTR(a, 2);
GET_VARIANT_PTR(b, 3);
GET_VARIANT_PTR(dst, 4);
#ifdef DEBUG_ENABLED
+
Variant ret;
Variant::evaluate(op, *a, *b, ret, valid);
#else
Variant::evaluate(op, *a, *b, *dst, valid);
#endif
-
- if (!valid) {
#ifdef DEBUG_ENABLED
+ if (!valid) {
if (ret.get_type() == Variant::STRING) {
//return a string when invalid with the error
@@ -336,17 +422,14 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
} else {
err_text = "Invalid operands '" + Variant::get_type_name(a->get_type()) + "' and '" + Variant::get_type_name(b->get_type()) + "' in operator '" + Variant::get_operator_name(op) + "'.";
}
-#endif
- break;
+ OPCODE_BREAK;
}
-#ifdef DEBUG_ENABLED
*dst = ret;
#endif
-
ip += 5;
- continue;
+ DISPATCH_OPCODE;
}
- case OPCODE_EXTENDS_TEST: {
+ OPCODE(OPCODE_EXTENDS_TEST) {
CHECK_SPACE(4);
@@ -355,19 +438,17 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
GET_VARIANT_PTR(dst, 3);
#ifdef DEBUG_ENABLED
-
if (a->get_type() != Variant::OBJECT || a->operator Object *() == NULL) {
err_text = "Left operand of 'is' is not an instance of anything.";
- break;
+ OPCODE_BREAK;
}
if (b->get_type() != Variant::OBJECT || b->operator Object *() == NULL) {
err_text = "Right operand of 'is' is not a class.";
- break;
+ OPCODE_BREAK;
}
#endif
-
Object *obj_A = *a;
Object *obj_B = *b;
@@ -399,20 +480,21 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
GDNativeClass *nc = Object::cast_to<GDNativeClass>(obj_B);
+#ifdef DEBUG_ENABLED
if (!nc) {
err_text = "Right operand of 'is' is not a class (type: '" + obj_B->get_class() + "').";
- break;
+ OPCODE_BREAK;
}
-
+#endif
extends_ok = ClassDB::is_parent_class(obj_A->get_class_name(), nc->get_name());
}
*dst = extends_ok;
ip += 4;
- continue;
+ DISPATCH_OPCODE;
}
- case OPCODE_SET: {
+ OPCODE(OPCODE_SET) {
CHECK_SPACE(3);
@@ -423,6 +505,7 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
bool valid;
dst->set(*index, *value, &valid);
+#ifdef DEBUG_ENABLED
if (!valid) {
String v = index->operator String();
if (v != "") {
@@ -431,13 +514,13 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
v = "of type '" + _get_var_type(index) + "'";
}
err_text = "Invalid set index " + v + " (on base: '" + _get_var_type(dst) + "').";
- break;
+ OPCODE_BREAK;
}
-
+#endif
ip += 4;
- continue;
+ DISPATCH_OPCODE;
}
- case OPCODE_GET: {
+ OPCODE(OPCODE_GET) {
CHECK_SPACE(3);
@@ -453,6 +536,7 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
*dst = src->get(*index, &valid);
#endif
+#ifdef DEBUG_ENABLED
if (!valid) {
String v = index->operator String();
if (v != "") {
@@ -461,15 +545,14 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
v = "of type '" + _get_var_type(index) + "'";
}
err_text = "Invalid get index " + v + " (on base: '" + _get_var_type(src) + "').";
- break;
+ OPCODE_BREAK;
}
-#ifdef DEBUG_ENABLED
*dst = ret;
#endif
ip += 4;
- continue;
+ DISPATCH_OPCODE;
}
- case OPCODE_SET_NAMED: {
+ OPCODE(OPCODE_SET_NAMED) {
CHECK_SPACE(3);
@@ -478,22 +561,23 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
int indexname = _code_ptr[ip + 2];
- ERR_BREAK(indexname < 0 || indexname >= _global_names_count);
+ GD_ERR_BREAK(indexname < 0 || indexname >= _global_names_count);
const StringName *index = &_global_names_ptr[indexname];
bool valid;
dst->set_named(*index, *value, &valid);
+#ifdef DEBUG_ENABLED
if (!valid) {
String err_type;
err_text = "Invalid set index '" + String(*index) + "' (on base: '" + _get_var_type(dst) + "').";
- break;
+ OPCODE_BREAK;
}
-
+#endif
ip += 4;
- continue;
+ DISPATCH_OPCODE;
}
- case OPCODE_GET_NAMED: {
+ OPCODE(OPCODE_GET_NAMED) {
CHECK_SPACE(4);
@@ -502,7 +586,7 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
int indexname = _code_ptr[ip + 2];
- ERR_BREAK(indexname < 0 || indexname >= _global_names_count);
+ GD_ERR_BREAK(indexname < 0 || indexname >= _global_names_count);
const StringName *index = &_global_names_ptr[indexname];
bool valid;
@@ -513,26 +597,25 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
#else
*dst = src->get_named(*index, &valid);
#endif
-
+#ifdef DEBUG_ENABLED
if (!valid) {
if (src->has_method(*index)) {
err_text = "Invalid get index '" + index->operator String() + "' (on base: '" + _get_var_type(src) + "'). Did you mean '." + index->operator String() + "()' ?";
} else {
err_text = "Invalid get index '" + index->operator String() + "' (on base: '" + _get_var_type(src) + "').";
}
- break;
+ OPCODE_BREAK;
}
-#ifdef DEBUG_ENABLED
*dst = ret;
#endif
ip += 4;
- continue;
+ DISPATCH_OPCODE;
}
- case OPCODE_SET_MEMBER: {
+ OPCODE(OPCODE_SET_MEMBER) {
CHECK_SPACE(3);
int indexname = _code_ptr[ip + 1];
- ERR_BREAK(indexname < 0 || indexname >= _global_names_count);
+ GD_ERR_BREAK(indexname < 0 || indexname >= _global_names_count);
const StringName *index = &_global_names_ptr[indexname];
GET_VARIANT_PTR(src, 2);
@@ -541,20 +624,20 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
#ifdef DEBUG_ENABLED
if (!ok) {
err_text = "Internal error setting property: " + String(*index);
- break;
+ OPCODE_BREAK;
} else if (!valid) {
err_text = "Error setting property '" + String(*index) + "' with value of type " + Variant::get_type_name(src->get_type()) + ".";
- break;
+ OPCODE_BREAK;
}
#endif
ip += 3;
- continue;
+ DISPATCH_OPCODE;
}
- case OPCODE_GET_MEMBER: {
+ OPCODE(OPCODE_GET_MEMBER) {
CHECK_SPACE(3);
int indexname = _code_ptr[ip + 1];
- ERR_BREAK(indexname < 0 || indexname >= _global_names_count);
+ GD_ERR_BREAK(indexname < 0 || indexname >= _global_names_count);
const StringName *index = &_global_names_ptr[indexname];
GET_VARIANT_PTR(dst, 2);
bool ok = ClassDB::get_property(p_instance->owner, *index, *dst);
@@ -562,13 +645,13 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
#ifdef DEBUG_ENABLED
if (!ok) {
err_text = "Internal error getting property: " + String(*index);
- break;
+ OPCODE_BREAK;
}
#endif
ip += 3;
- continue;
+ DISPATCH_OPCODE;
}
- case OPCODE_ASSIGN: {
+ OPCODE(OPCODE_ASSIGN) {
CHECK_SPACE(3);
GET_VARIANT_PTR(dst, 1);
@@ -577,9 +660,9 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
*dst = *src;
ip += 3;
- continue;
+ DISPATCH_OPCODE;
}
- case OPCODE_ASSIGN_TRUE: {
+ OPCODE(OPCODE_ASSIGN_TRUE) {
CHECK_SPACE(2);
GET_VARIANT_PTR(dst, 1);
@@ -587,9 +670,9 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
*dst = true;
ip += 2;
- continue;
+ DISPATCH_OPCODE;
}
- case OPCODE_ASSIGN_FALSE: {
+ OPCODE(OPCODE_ASSIGN_FALSE) {
CHECK_SPACE(2);
GET_VARIANT_PTR(dst, 1);
@@ -597,9 +680,9 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
*dst = false;
ip += 2;
- continue;
+ DISPATCH_OPCODE;
}
- case OPCODE_CONSTRUCT: {
+ OPCODE(OPCODE_CONSTRUCT) {
CHECK_SPACE(2);
Variant::Type t = Variant::Type(_code_ptr[ip + 1]);
@@ -615,17 +698,19 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
Variant::CallError err;
*dst = Variant::construct(t, (const Variant **)argptrs, argc, err);
+#ifdef DEBUG_ENABLED
if (err.error != Variant::CallError::CALL_OK) {
err_text = _get_call_error(err, "'" + Variant::get_type_name(t) + "' constructor", (const Variant **)argptrs);
- break;
+ OPCODE_BREAK;
}
+#endif
ip += 4 + argc;
//construct a basic type
- continue;
+ DISPATCH_OPCODE;
}
- case OPCODE_CONSTRUCT_ARRAY: {
+ OPCODE(OPCODE_CONSTRUCT_ARRAY) {
CHECK_SPACE(1);
int argc = _code_ptr[ip + 1];
@@ -643,9 +728,9 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
*dst = array;
ip += 3 + argc;
- continue;
+ DISPATCH_OPCODE;
}
- case OPCODE_CONSTRUCT_DICTIONARY: {
+ OPCODE(OPCODE_CONSTRUCT_DICTIONARY) {
CHECK_SPACE(1);
int argc = _code_ptr[ip + 1];
@@ -665,10 +750,10 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
*dst = dict;
ip += 3 + argc * 2;
- continue;
+ DISPATCH_OPCODE;
}
- case OPCODE_CALL_RETURN:
- case OPCODE_CALL: {
+ OPCODE(OPCODE_CALL_RETURN)
+ OPCODE(OPCODE_CALL) {
CHECK_SPACE(4);
bool call_ret = _code_ptr[ip] == OPCODE_CALL_RETURN;
@@ -677,10 +762,10 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
GET_VARIANT_PTR(base, 2);
int nameg = _code_ptr[ip + 3];
- ERR_BREAK(nameg < 0 || nameg >= _global_names_count);
+ GD_ERR_BREAK(nameg < 0 || nameg >= _global_names_count);
const StringName *methodname = &_global_names_ptr[nameg];
- ERR_BREAK(argc < 0);
+ GD_ERR_BREAK(argc < 0);
ip += 4;
CHECK_SPACE(argc + 1);
Variant **argptrs = call_args;
@@ -711,7 +796,6 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
if (GDScriptLanguage::get_singleton()->profiling) {
function_call_time += OS::get_singleton()->get_ticks_usec() - call_time;
}
-#endif
if (err.error != Variant::CallError::CALL_OK) {
@@ -731,29 +815,30 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
if (base->is_ref()) {
err_text = "Attempted to free a reference.";
- break;
+ OPCODE_BREAK;
} else if (base->get_type() == Variant::OBJECT) {
err_text = "Attempted to free a locked object (calling or emitting).";
- break;
+ OPCODE_BREAK;
}
}
}
err_text = _get_call_error(err, "function '" + methodstr + "' in base '" + basestr + "'", (const Variant **)argptrs);
- break;
+ OPCODE_BREAK;
}
+#endif
//_call_func(NULL,base,*methodname,ip,argc,p_instance,stack);
ip += argc + 1;
- continue;
+ DISPATCH_OPCODE;
}
- case OPCODE_CALL_BUILT_IN: {
+ OPCODE(OPCODE_CALL_BUILT_IN) {
CHECK_SPACE(4);
GDFunctions::Function func = GDFunctions::Function(_code_ptr[ip + 1]);
int argc = _code_ptr[ip + 2];
- ERR_BREAK(argc < 0);
+ GD_ERR_BREAK(argc < 0);
ip += 3;
CHECK_SPACE(argc + 1);
@@ -770,6 +855,7 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
GDFunctions::call(func, (const Variant **)argptrs, argc, *dst, err);
+#ifdef DEBUG_ENABLED
if (err.error != Variant::CallError::CALL_OK) {
String methodstr = GDFunctions::get_func_name(func);
@@ -779,25 +865,26 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
} else {
err_text = _get_call_error(err, "built-in function '" + methodstr + "'", (const Variant **)argptrs);
}
- break;
+ OPCODE_BREAK;
}
+#endif
ip += argc + 1;
- continue;
+ DISPATCH_OPCODE;
}
- case OPCODE_CALL_SELF: {
+ OPCODE(OPCODE_CALL_SELF) {
- break;
+ OPCODE_BREAK;
}
- case OPCODE_CALL_SELF_BASE: {
+ OPCODE(OPCODE_CALL_SELF_BASE) {
CHECK_SPACE(2);
int self_fun = _code_ptr[ip + 1];
-#ifdef DEBUG_ENABLED
+#ifdef DEBUG_ENABLED
if (self_fun < 0 || self_fun >= _global_names_count) {
err_text = "compiler bug, function name not found";
- break;
+ OPCODE_BREAK;
}
#endif
const StringName *methodname = &_global_names_ptr[self_fun];
@@ -857,14 +944,14 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
String methodstr = *methodname;
err_text = _get_call_error(err, "function '" + methodstr + "'", (const Variant **)argptrs);
- break;
+ OPCODE_BREAK;
}
ip += 4 + argc;
- continue;
+ DISPATCH_OPCODE;
}
- case OPCODE_YIELD:
- case OPCODE_YIELD_SIGNAL: {
+ OPCODE(OPCODE_YIELD)
+ OPCODE(OPCODE_YIELD_SIGNAL) {
int ipofs = 1;
if (_code_ptr[ip] == OPCODE_YIELD_SIGNAL) {
@@ -898,133 +985,125 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
retvalue = gdfs;
if (_code_ptr[ip] == OPCODE_YIELD_SIGNAL) {
+ //do the oneshot connect
GET_VARIANT_PTR(argobj, 1);
GET_VARIANT_PTR(argname, 2);
- //do the oneshot connect
+#ifdef DEBUG_ENABLED
if (argobj->get_type() != Variant::OBJECT) {
err_text = "First argument of yield() not of type object.";
- break;
+ OPCODE_BREAK;
}
if (argname->get_type() != Variant::STRING) {
err_text = "Second argument of yield() not a string (for signal name).";
- break;
+ OPCODE_BREAK;
}
+#endif
Object *obj = argobj->operator Object *();
String signal = argname->operator String();
#ifdef DEBUG_ENABLED
if (!obj) {
err_text = "First argument of yield() is null.";
- break;
+ OPCODE_BREAK;
}
if (ScriptDebugger::get_singleton()) {
if (!ObjectDB::instance_validate(obj)) {
err_text = "First argument of yield() is a previously freed instance.";
- break;
+ OPCODE_BREAK;
}
}
if (signal.length() == 0) {
err_text = "Second argument of yield() is an empty string (for signal name).";
- break;
+ OPCODE_BREAK;
}
#endif
Error err = obj->connect(signal, gdfs.ptr(), "_signal_callback", varray(gdfs), Object::CONNECT_ONESHOT);
+#ifdef DEBUG_ENABLED
if (err != OK) {
err_text = "Error connecting to signal: " + signal + " during yield().";
- break;
+ OPCODE_BREAK;
}
+#endif
}
exit_ok = true;
- break;
+ OPCODE_BREAK;
}
- case OPCODE_YIELD_RESUME: {
+ OPCODE(OPCODE_YIELD_RESUME) {
CHECK_SPACE(2);
+#ifdef DEBUG_ENABLED
if (!p_state) {
err_text = ("Invalid Resume (bug?)");
- break;
+ OPCODE_BREAK;
}
+#endif
GET_VARIANT_PTR(result, 1);
*result = p_state->result;
ip += 2;
- continue;
+ DISPATCH_OPCODE;
}
- case OPCODE_JUMP: {
+ OPCODE(OPCODE_JUMP) {
CHECK_SPACE(2);
int to = _code_ptr[ip + 1];
- ERR_BREAK(to < 0 || to > _code_size);
+ GD_ERR_BREAK(to < 0 || to > _code_size);
ip = to;
- continue;
+ DISPATCH_OPCODE;
}
- case OPCODE_JUMP_IF: {
+ OPCODE(OPCODE_JUMP_IF) {
CHECK_SPACE(3);
GET_VARIANT_PTR(test, 1);
- bool valid;
- bool result = test->booleanize(valid);
-#ifdef DEBUG_ENABLED
- if (!valid) {
+ bool result = test->booleanize();
- err_text = "cannot evaluate conditional expression of type: " + Variant::get_type_name(test->get_type());
- break;
- }
-#endif
if (result) {
int to = _code_ptr[ip + 2];
- ERR_BREAK(to < 0 || to > _code_size);
+ GD_ERR_BREAK(to < 0 || to > _code_size);
ip = to;
- continue;
+ DISPATCH_OPCODE;
}
ip += 3;
- continue;
+ DISPATCH_OPCODE;
}
- case OPCODE_JUMP_IF_NOT: {
+ OPCODE(OPCODE_JUMP_IF_NOT) {
CHECK_SPACE(3);
GET_VARIANT_PTR(test, 1);
- bool valid;
- bool result = test->booleanize(valid);
-#ifdef DEBUG_ENABLED
- if (!valid) {
+ bool result = test->booleanize();
- err_text = "cannot evaluate conditional expression of type: " + Variant::get_type_name(test->get_type());
- break;
- }
-#endif
if (!result) {
int to = _code_ptr[ip + 2];
- ERR_BREAK(to < 0 || to > _code_size);
+ GD_ERR_BREAK(to < 0 || to > _code_size);
ip = to;
- continue;
+ DISPATCH_OPCODE;
}
ip += 3;
- continue;
+ DISPATCH_OPCODE;
}
- case OPCODE_JUMP_TO_DEF_ARGUMENT: {
+ OPCODE(OPCODE_JUMP_TO_DEF_ARGUMENT) {
CHECK_SPACE(2);
ip = _default_arg_ptr[defarg];
- continue;
+ DISPATCH_OPCODE;
}
- case OPCODE_RETURN: {
+ OPCODE(OPCODE_RETURN) {
CHECK_SPACE(2);
GET_VARIANT_PTR(r, 1);
retvalue = *r;
exit_ok = true;
- break;
+ OPCODE_BREAK;
}
- case OPCODE_ITERATE_BEGIN: {
+ OPCODE(OPCODE_ITERATE_BEGIN) {
CHECK_SPACE(8); //space for this a regular iterate
@@ -1033,27 +1112,30 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
bool valid;
if (!container->iter_init(*counter, valid)) {
+#ifdef DEBUG_ENABLED
if (!valid) {
err_text = "Unable to iterate on object of type " + Variant::get_type_name(container->get_type()) + "'.";
- break;
+ OPCODE_BREAK;
}
+#endif
int jumpto = _code_ptr[ip + 3];
- ERR_BREAK(jumpto < 0 || jumpto > _code_size);
+ GD_ERR_BREAK(jumpto < 0 || jumpto > _code_size);
ip = jumpto;
- continue;
+ DISPATCH_OPCODE;
}
GET_VARIANT_PTR(iterator, 4);
*iterator = container->iter_get(*counter, valid);
+#ifdef DEBUG_ENABLED
if (!valid) {
err_text = "Unable to obtain iterator object of type " + Variant::get_type_name(container->get_type()) + "'.";
- break;
+ OPCODE_BREAK;
}
-
+#endif
ip += 5; //skip regular iterate which is always next
- continue;
+ DISPATCH_OPCODE;
}
- case OPCODE_ITERATE: {
+ OPCODE(OPCODE_ITERATE) {
CHECK_SPACE(4);
@@ -1062,61 +1144,56 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
bool valid;
if (!container->iter_next(*counter, valid)) {
+#ifdef DEBUG_ENABLED
if (!valid) {
err_text = "Unable to iterate on object of type " + Variant::get_type_name(container->get_type()) + "' (type changed since first iteration?).";
- break;
+ OPCODE_BREAK;
}
+#endif
int jumpto = _code_ptr[ip + 3];
- ERR_BREAK(jumpto < 0 || jumpto > _code_size);
+ GD_ERR_BREAK(jumpto < 0 || jumpto > _code_size);
ip = jumpto;
- continue;
+ DISPATCH_OPCODE;
}
GET_VARIANT_PTR(iterator, 4);
*iterator = container->iter_get(*counter, valid);
+#ifdef DEBUG_ENABLED
if (!valid) {
err_text = "Unable to obtain iterator object of type " + Variant::get_type_name(container->get_type()) + "' (but was obtained on first iteration?).";
- break;
+ OPCODE_BREAK;
}
-
+#endif
ip += 5; //loop again
- continue;
+ DISPATCH_OPCODE;
}
- case OPCODE_ASSERT: {
+ OPCODE(OPCODE_ASSERT) {
CHECK_SPACE(2);
GET_VARIANT_PTR(test, 1);
#ifdef DEBUG_ENABLED
- bool valid;
- bool result = test->booleanize(valid);
-
- if (!valid) {
-
- err_text = "cannot evaluate conditional expression of type: " + Variant::get_type_name(test->get_type());
- break;
- }
+ bool result = test->booleanize();
if (!result) {
err_text = "Assertion failed.";
- break;
+ OPCODE_BREAK;
}
#endif
-
ip += 2;
- continue;
+ DISPATCH_OPCODE;
}
- case OPCODE_BREAKPOINT: {
+ OPCODE(OPCODE_BREAKPOINT) {
#ifdef DEBUG_ENABLED
if (ScriptDebugger::get_singleton()) {
GDScriptLanguage::get_singleton()->debug_break("Breakpoint Statement", true);
}
#endif
ip += 1;
- continue;
+ DISPATCH_OPCODE;
}
- case OPCODE_LINE: {
+ OPCODE(OPCODE_LINE) {
CHECK_SPACE(2);
line = _code_ptr[ip + 1];
@@ -1143,22 +1220,26 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
ScriptDebugger::get_singleton()->line_poll();
}
- continue;
+ DISPATCH_OPCODE;
}
- case OPCODE_END: {
+ OPCODE(OPCODE_END) {
exit_ok = true;
- break;
+ OPCODE_BREAK;
}
+#if 0
default: {
err_text = "Illegal opcode " + itos(_code_ptr[ip]) + " at address " + itos(ip);
- break;
+ OPCODE_BREAK;
}
+#endif
}
+ OPCODES_END
+#ifdef DEBUG_ENABLED
if (exit_ok)
- break;
+ OPCODE_OUT;
//error
// function, file, line, error, explanation
String err_file;
@@ -1182,9 +1263,11 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
_err_print_error(err_func.utf8().get_data(), err_file.utf8().get_data(), err_line, err_text.utf8().get_data(), ERR_HANDLER_SCRIPT);
}
- break;
+#endif
+ OPCODE_OUT;
}
+ OPCODES_OUT
#ifdef DEBUG_ENABLED
if (GDScriptLanguage::get_singleton()->profiling) {
uint64_t time_taken = OS::get_singleton()->get_ticks_usec() - function_start_time;
diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp
index 72c3f9612a..36aaa1f807 100644
--- a/modules/gdscript/gd_parser.cpp
+++ b/modules/gdscript/gd_parser.cpp
@@ -1699,7 +1699,7 @@ GDParser::Node *GDParser::_reduce_expression(Node *p_node, bool p_to_const) {
_REDUCE_BINARY(Variant::OP_ADD);
} break;
case OperatorNode::OP_SUB: {
- _REDUCE_BINARY(Variant::OP_SUBSTRACT);
+ _REDUCE_BINARY(Variant::OP_SUBTRACT);
} break;
case OperatorNode::OP_MUL: {
_REDUCE_BINARY(Variant::OP_MULTIPLY);
diff --git a/modules/ogg/SCsub b/modules/ogg/SCsub
index 5eabaf6f2b..5e559bd4db 100644
--- a/modules/ogg/SCsub
+++ b/modules/ogg/SCsub
@@ -6,7 +6,7 @@ Import('env_modules')
env_ogg = env_modules.Clone()
# Thirdparty source files
-if (env['builtin_libogg'] != 'no'):
+if env['builtin_libogg']:
thirdparty_dir = "#thirdparty/libogg/"
thirdparty_sources = [
"bitwise.c",
diff --git a/modules/openssl/SCsub b/modules/openssl/SCsub
index eb3c0e64d8..84c5e68439 100644
--- a/modules/openssl/SCsub
+++ b/modules/openssl/SCsub
@@ -6,7 +6,7 @@ Import('env_modules')
env_openssl = env_modules.Clone()
# Thirdparty source files
-if (env['builtin_openssl'] != 'no'):
+if env['builtin_openssl']:
thirdparty_dir = "#thirdparty/openssl/"
thirdparty_sources = [
diff --git a/modules/openssl/stream_peer_openssl.cpp b/modules/openssl/stream_peer_openssl.cpp
index d40bf73883..c19bdc4214 100644
--- a/modules/openssl/stream_peer_openssl.cpp
+++ b/modules/openssl/stream_peer_openssl.cpp
@@ -29,6 +29,17 @@
/*************************************************************************/
#include "stream_peer_openssl.h"
+// Compatibility with OpenSSL 1.1.0.
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#define BIO_set_num(b, n)
+#else
+#define BIO_set_num(b, n) ((b)->num = (n))
+
+#define BIO_set_init(b, i) ((b)->init = (i))
+#define BIO_set_data(b, p) ((b)->ptr = (p))
+#define BIO_get_data(b) ((b)->ptr)
+#endif
+
//hostname matching code from curl
bool StreamPeerOpenSSL::_match_host_name(const char *name, const char *hostname) {
@@ -157,10 +168,10 @@ int StreamPeerOpenSSL::_cert_verify_callback(X509_STORE_CTX *x509_ctx, void *arg
}
int StreamPeerOpenSSL::_bio_create(BIO *b) {
- b->init = 1;
- b->num = 0;
- b->ptr = NULL;
- b->flags = 0;
+ BIO_set_init(b, 1);
+ BIO_set_num(b, 0);
+ BIO_set_data(b, NULL);
+ BIO_clear_flags(b, ~0);
return 1;
}
@@ -168,9 +179,9 @@ int StreamPeerOpenSSL::_bio_destroy(BIO *b) {
if (b == NULL)
return 0;
- b->ptr = NULL; /* sb_tls_remove() will free it */
- b->init = 0;
- b->flags = 0;
+ BIO_set_data(b, NULL); /* sb_tls_remove() will free it */
+ BIO_set_init(b, 0);
+ BIO_clear_flags(b, ~0);
return 1;
}
@@ -178,7 +189,7 @@ int StreamPeerOpenSSL::_bio_read(BIO *b, char *buf, int len) {
if (buf == NULL || len <= 0) return 0;
- StreamPeerOpenSSL *sp = (StreamPeerOpenSSL *)b->ptr;
+ StreamPeerOpenSSL *sp = (StreamPeerOpenSSL *)BIO_get_data(b);
ERR_FAIL_COND_V(sp == NULL, 0);
@@ -212,7 +223,7 @@ int StreamPeerOpenSSL::_bio_write(BIO *b, const char *buf, int len) {
if (buf == NULL || len <= 0) return 0;
- StreamPeerOpenSSL *sp = (StreamPeerOpenSSL *)b->ptr;
+ StreamPeerOpenSSL *sp = (StreamPeerOpenSSL *)BIO_get_data(b);
ERR_FAIL_COND_V(sp == NULL, 0);
@@ -258,6 +269,26 @@ int StreamPeerOpenSSL::_bio_puts(BIO *b, const char *str) {
return _bio_write(b, str, strlen(str));
}
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+BIO_METHOD *StreamPeerOpenSSL::_bio_method = NULL;
+
+BIO_METHOD *StreamPeerOpenSSL::_get_bio_method() {
+ if (_bio_method) // already initialized.
+ return _bio_method;
+
+ /* it's a source/sink BIO */
+ _bio_method = BIO_meth_new(100 | 0x400, "streampeer glue");
+ BIO_meth_set_write(_bio_method, _bio_write);
+ BIO_meth_set_read(_bio_method, _bio_read);
+ BIO_meth_set_puts(_bio_method, _bio_puts);
+ BIO_meth_set_gets(_bio_method, _bio_gets);
+ BIO_meth_set_ctrl(_bio_method, _bio_ctrl);
+ BIO_meth_set_create(_bio_method, _bio_create);
+ BIO_meth_set_destroy(_bio_method, _bio_destroy);
+
+ return _bio_method;
+}
+#else
BIO_METHOD StreamPeerOpenSSL::_bio_method = {
/* it's a source/sink BIO */
(100 | 0x400),
@@ -271,6 +302,11 @@ BIO_METHOD StreamPeerOpenSSL::_bio_method = {
_bio_destroy
};
+BIO_METHOD *StreamPeerOpenSSL::_get_bio_method() {
+ return &_bio_method;
+}
+#endif
+
Error StreamPeerOpenSSL::connect_to_stream(Ref<StreamPeer> p_base, bool p_validate_certs, const String &p_for_hostname) {
if (connected)
@@ -330,8 +366,8 @@ Error StreamPeerOpenSSL::connect_to_stream(Ref<StreamPeer> p_base, bool p_valida
}
ssl = SSL_new(ctx);
- bio = BIO_new(&_bio_method);
- bio->ptr = this;
+ bio = BIO_new(_get_bio_method());
+ BIO_set_data(bio, this);
SSL_set_bio(ssl, bio, bio);
if (p_for_hostname != String()) {
@@ -532,7 +568,9 @@ void StreamPeerOpenSSL::initialize_ssl() {
load_certs_func = _load_certs;
_create = _create_func;
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
CRYPTO_malloc_init(); // Initialize malloc, free, etc for OpenSSL's use
+#endif
SSL_library_init(); // Initialize OpenSSL's SSL libraries
SSL_load_error_strings(); // Load SSL error strings
ERR_load_BIO_strings(); // Load BIO error strings
diff --git a/modules/openssl/stream_peer_openssl.h b/modules/openssl/stream_peer_openssl.h
index 1e445ef681..535114058d 100644
--- a/modules/openssl/stream_peer_openssl.h
+++ b/modules/openssl/stream_peer_openssl.h
@@ -53,7 +53,12 @@ private:
static int _bio_gets(BIO *b, char *buf, int len);
static int _bio_puts(BIO *b, const char *str);
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+ static BIO_METHOD *_bio_method;
+#else
static BIO_METHOD _bio_method;
+#endif
+ static BIO_METHOD *_get_bio_method();
static bool _match_host_name(const char *name, const char *hostname);
static Error _match_common_name(const char *hostname, const X509 *server_cert);
diff --git a/modules/opus/SCsub b/modules/opus/SCsub
index 4d3053c7ec..fee06bd267 100644
--- a/modules/opus/SCsub
+++ b/modules/opus/SCsub
@@ -6,7 +6,7 @@ Import('env_modules')
env_opus = env_modules.Clone()
# Thirdparty source files
-if (env['builtin_opus'] != 'no'):
+if env['builtin_opus']:
thirdparty_dir = "#thirdparty/opus/"
thirdparty_sources = [
@@ -209,7 +209,7 @@ if (env['builtin_opus'] != 'no'):
env_opus.Append(CPPPATH=[thirdparty_dir + "/" + dir for dir in thirdparty_include_paths])
# also requires libogg
- if (env['builtin_libogg'] != 'no'):
+ if env['builtin_libogg']:
env_opus.Append(CPPPATH=["#thirdparty/libogg"])
# Module files
diff --git a/modules/opus/audio_stream_opus.cpp b/modules/opus/audio_stream_opus.cpp
index 1dac890eb8..c7748b9b21 100644
--- a/modules/opus/audio_stream_opus.cpp
+++ b/modules/opus/audio_stream_opus.cpp
@@ -56,7 +56,7 @@ int AudioStreamPlaybackOpus::_op_seek_func(void *_stream, opus_int64 _offset, in
fa->seek(_offset);
} break;
case SEEK_CUR: {
- fa->seek(fa->get_pos() + _offset);
+ fa->seek(fa->get_position() + _offset);
} break;
case SEEK_END: {
fa->seek_end(_offset);
@@ -83,7 +83,7 @@ int AudioStreamPlaybackOpus::_op_close_func(void *_stream) {
opus_int64 AudioStreamPlaybackOpus::_op_tell_func(void *_stream) {
FileAccess *_fa = (FileAccess *)_stream;
- return (opus_int64)_fa->get_pos();
+ return (opus_int64)_fa->get_position();
}
void AudioStreamPlaybackOpus::_clear_stream() {
@@ -247,7 +247,7 @@ void AudioStreamPlaybackOpus::play(float p_from) {
frames_mixed = pre_skip;
playing = true;
if (p_from > 0) {
- seek_pos(p_from);
+ seek(p_from);
}
}
@@ -256,7 +256,7 @@ void AudioStreamPlaybackOpus::stop() {
playing = false;
}
-void AudioStreamPlaybackOpus::seek_pos(float p_time) {
+void AudioStreamPlaybackOpus::seek(float p_time) {
if (!playing) return;
ogg_int64_t pcm_offset = (ogg_int64_t)(p_time * osrate);
bool ok = op_pcm_seek(opus_file, pcm_offset) == 0;
@@ -340,7 +340,7 @@ float AudioStreamPlaybackOpus::get_length() const {
return length;
}
-float AudioStreamPlaybackOpus::get_pos() const {
+float AudioStreamPlaybackOpus::get_playback_position() const {
int32_t frames = int32_t(frames_mixed);
if (frames < 0)
diff --git a/modules/opus/audio_stream_opus.h b/modules/opus/audio_stream_opus.h
index ccfe04e84e..7b7740a804 100644
--- a/modules/opus/audio_stream_opus.h
+++ b/modules/opus/audio_stream_opus.h
@@ -99,8 +99,8 @@ public:
virtual int get_loop_count() const { return repeats; }
- virtual float get_pos() const;
- virtual void seek_pos(float p_time);
+ virtual float get_playback_position() const;
+ virtual void seek(float p_time);
virtual int get_channels() const { return stream_channels; }
virtual int get_mix_rate() const { return osrate; }
diff --git a/modules/pvr/texture_loader_pvr.cpp b/modules/pvr/texture_loader_pvr.cpp
index 90ee164b6f..03592047ad 100644
--- a/modules/pvr/texture_loader_pvr.cpp
+++ b/modules/pvr/texture_loader_pvr.cpp
@@ -74,7 +74,7 @@ RES ResourceFormatPVR::load(const String &p_path, const String &p_original_path,
uint32_t mipmaps = f->get_32();
uint32_t flags = f->get_32();
uint32_t surfsize = f->get_32();
- f->seek(f->get_pos() + 20); // bpp, rmask, gmask, bmask, amask
+ f->seek(f->get_position() + 20); // bpp, rmask, gmask, bmask, amask
uint8_t pvrid[5] = { 0, 0, 0, 0, 0 };
f->get_buffer(pvrid, 4);
ERR_FAIL_COND_V(String((char *)pvrid) != "PVR!", RES());
diff --git a/modules/recast/SCsub b/modules/recast/SCsub
index 349bd22efb..500c0ec055 100644
--- a/modules/recast/SCsub
+++ b/modules/recast/SCsub
@@ -5,7 +5,7 @@ Import('env')
# Not building in a separate env as core needs it
# Thirdparty source files
-if (env['builtin_recast'] != 'no'):
+if env['builtin_recast']:
thirdparty_dir = "#thirdparty/recastnavigation/Recast/"
thirdparty_sources = [
"Source/Recast.cpp",
@@ -24,10 +24,6 @@ if (env['builtin_recast'] != 'no'):
env.Append(CPPPATH=[thirdparty_dir, thirdparty_dir + "/Include"])
- # also requires recast headers
- if (env['builtin_recast'] != 'no'):
- env.Append(CPPPATH=["#thirdparty/recastnavigation/Recast"])
-
lib = env.Library("recast_builtin", thirdparty_sources)
env.Append(LIBS=[lib])
diff --git a/modules/recast/config.py b/modules/recast/config.py
index fb920482f5..d42f07b2a9 100644
--- a/modules/recast/config.py
+++ b/modules/recast/config.py
@@ -1,6 +1,6 @@
def can_build(platform):
- return True
+ return platform != "android"
def configure(env):
diff --git a/modules/regex/SCsub b/modules/regex/SCsub
index 2dfc2739e9..2bab144a28 100644
--- a/modules/regex/SCsub
+++ b/modules/regex/SCsub
@@ -7,7 +7,7 @@ env_regex = env_modules.Clone()
env_regex.Append(CPPFLAGS=["-DPCRE2_CODE_UNIT_WIDTH=0"])
env_regex.add_source_files(env.modules_sources, "*.cpp")
-if (env['builtin_pcre2'] != 'no'):
+if env['builtin_pcre2']:
jit_blacklist = ['javascript']
thirdparty_dir = '#thirdparty/pcre2/src/'
thirdparty_flags = ['-DPCRE2_STATIC', '-DHAVE_CONFIG_H']
diff --git a/modules/regex/regex.h b/modules/regex/regex.h
index 0d97bcce54..bfa9c84042 100644
--- a/modules/regex/regex.h
+++ b/modules/regex/regex.h
@@ -87,8 +87,8 @@ public:
Error compile(const String &p_pattern);
void _init(const String &p_pattern = "");
- Ref<RegExMatch> search(const String &p_subject, int offset = 0, int end = -1) const;
- String sub(const String &p_subject, const String &p_replacement, bool p_all = false, int p_start = 0, int p_end = -1) const;
+ Ref<RegExMatch> search(const String &p_subject, int p_offset = 0, int p_end = -1) const;
+ String sub(const String &p_subject, const String &p_replacement, bool p_all = false, int p_offset = 0, int p_end = -1) const;
bool is_valid() const;
String get_pattern() const;
diff --git a/modules/squish/SCsub b/modules/squish/SCsub
index cca7c038f1..127f22d798 100644
--- a/modules/squish/SCsub
+++ b/modules/squish/SCsub
@@ -6,7 +6,7 @@ Import('env_modules')
env_squish = env_modules.Clone()
# Thirdparty source files
-if (env['builtin_squish'] != 'no'):
+if env['builtin_squish']:
thirdparty_dir = "#thirdparty/squish/"
thirdparty_sources = [
"alpha.cpp",
diff --git a/modules/squish/config.py b/modules/squish/config.py
index cc8f098010..9b7729bda4 100644
--- a/modules/squish/config.py
+++ b/modules/squish/config.py
@@ -6,6 +6,6 @@ def can_build(platform):
def configure(env):
# Tools only, disabled for non-tools
# TODO: Find a cleaner way to achieve that
- if (env["tools"] == "no"):
- env["module_squish_enabled"] = "no"
+ if not env['tools']:
+ env['module_squish_enabled'] = False
env.disabled_modules.append("squish")
diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
index 9457fbfaf6..27ea310780 100644
--- a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
+++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
@@ -58,7 +58,7 @@ void AudioStreamPlaybackOGGVorbis::_mix_internal(AudioFrame *p_buffer, int p_fra
//end of file!
if (vorbis_stream->loop) {
//loop
- seek_pos(vorbis_stream->loop_offset);
+ seek(vorbis_stream->loop_offset);
loops++;
} else {
for (int i = mixed; i < p_frames; i++) {
@@ -78,7 +78,7 @@ float AudioStreamPlaybackOGGVorbis::get_stream_sampling_rate() {
void AudioStreamPlaybackOGGVorbis::start(float p_from_pos) {
active = true;
- seek_pos(p_from_pos);
+ seek(p_from_pos);
loops = 0;
_begin_resample();
}
@@ -97,11 +97,11 @@ int AudioStreamPlaybackOGGVorbis::get_loop_count() const {
return loops;
}
-float AudioStreamPlaybackOGGVorbis::get_pos() const {
+float AudioStreamPlaybackOGGVorbis::get_playback_position() const {
return float(frames_mixed) / vorbis_stream->sample_rate;
}
-void AudioStreamPlaybackOGGVorbis::seek_pos(float p_time) {
+void AudioStreamPlaybackOGGVorbis::seek(float p_time) {
if (!active)
return;
diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.h b/modules/stb_vorbis/audio_stream_ogg_vorbis.h
index bcd829a56a..f4d381897b 100644
--- a/modules/stb_vorbis/audio_stream_ogg_vorbis.h
+++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.h
@@ -67,8 +67,8 @@ public:
virtual int get_loop_count() const; //times it looped
- virtual float get_pos() const;
- virtual void seek_pos(float p_time);
+ virtual float get_playback_position() const;
+ virtual void seek(float p_time);
virtual float get_length() const; //if supported, otherwise return 0
diff --git a/modules/svg/image_loader_svg.cpp b/modules/svg/image_loader_svg.cpp
index c575edbba3..9c198ea98e 100644
--- a/modules/svg/image_loader_svg.cpp
+++ b/modules/svg/image_loader_svg.cpp
@@ -51,7 +51,7 @@ inline void change_nsvg_paint_color(NSVGpaint *p_paint, const uint32_t p_old, co
if (p_paint->type == NSVG_PAINT_COLOR) {
if (p_paint->color << 8 == p_old << 8) {
- p_paint->color = p_new;
+ p_paint->color = (p_paint->color & 0xFF000000) | (p_new & 0x00FFFFFF);
}
}
@@ -128,13 +128,13 @@ Error ImageLoaderSVG::_create_image(Ref<Image> p_image, const PoolVector<uint8_t
return OK;
}
-Error ImageLoaderSVG::create_image_from_string(Ref<Image> p_image, const char *svg_str, float p_scale, bool upsample, bool convert_colors) {
+Error ImageLoaderSVG::create_image_from_string(Ref<Image> p_image, const char *p_svg_str, float p_scale, bool upsample, bool convert_colors) {
- size_t str_len = strlen(svg_str);
+ size_t str_len = strlen(p_svg_str);
PoolVector<uint8_t> src_data;
src_data.resize(str_len + 1);
PoolVector<uint8_t>::Write src_w = src_data.write();
- memcpy(src_w.ptr(), svg_str, str_len + 1);
+ memcpy(src_w.ptr(), p_svg_str, str_len + 1);
return _create_image(p_image, &src_data, p_scale, upsample, convert_colors);
}
@@ -160,4 +160,4 @@ void ImageLoaderSVG::get_recognized_extensions(List<String> *p_extensions) const
ImageLoaderSVG::ImageLoaderSVG() {
}
-ImageLoaderSVG::ReplaceColors ImageLoaderSVG::replace_colors; \ No newline at end of file
+ImageLoaderSVG::ReplaceColors ImageLoaderSVG::replace_colors;
diff --git a/modules/svg/image_loader_svg.h b/modules/svg/image_loader_svg.h
index 332ac214a5..cf44cd8c50 100644
--- a/modules/svg/image_loader_svg.h
+++ b/modules/svg/image_loader_svg.h
@@ -57,7 +57,7 @@ class ImageLoaderSVG : public ImageFormatLoader {
List<uint32_t> new_colors;
} replace_colors;
static SVGRasterizer rasterizer;
- static void _convert_colors(NSVGimage *p_svg_imge);
+ static void _convert_colors(NSVGimage *p_svg_image);
static Error _create_image(Ref<Image> p_image, const PoolVector<uint8_t> *p_data, float p_scale, bool upsample, bool convert_colors = false);
public:
diff --git a/modules/tga/image_loader_tga.cpp b/modules/tga/image_loader_tga.cpp
index 7c7cf5bcbe..d7a1ce7308 100644
--- a/modules/tga/image_loader_tga.cpp
+++ b/modules/tga/image_loader_tga.cpp
@@ -253,7 +253,7 @@ Error ImageLoaderTGA::load_image(Ref<Image> p_image, FileAccess *f, bool p_force
err = FAILED;
if (err == OK) {
- f->seek(f->get_pos() + tga_header.id_length);
+ f->seek(f->get_position() + tga_header.id_length);
PoolVector<uint8_t> palette;
@@ -269,7 +269,7 @@ Error ImageLoaderTGA::load_image(Ref<Image> p_image, FileAccess *f, bool p_force
}
PoolVector<uint8_t>::Write src_image_w = src_image.write();
- f->get_buffer(&src_image_w[0], src_image_len - f->get_pos());
+ f->get_buffer(&src_image_w[0], src_image_len - f->get_position());
PoolVector<uint8_t>::Read src_image_r = src_image.read();
diff --git a/modules/theora/SCsub b/modules/theora/SCsub
index 2de4d29640..9015c2c354 100644
--- a/modules/theora/SCsub
+++ b/modules/theora/SCsub
@@ -6,7 +6,7 @@ Import('env_modules')
env_theora = env_modules.Clone()
# Thirdparty source files
-if (env['builtin_libtheora'] != 'no'):
+if env['builtin_libtheora']:
thirdparty_dir = "#thirdparty/libtheora/"
thirdparty_sources = [
#"analyze.c",
@@ -74,9 +74,9 @@ if (env['builtin_libtheora'] != 'no'):
env_theora.Append(CPPPATH=[thirdparty_dir])
# also requires libogg and libvorbis
- if (env['builtin_libogg'] != 'no'):
+ if env['builtin_libogg']:
env_theora.Append(CPPPATH=["#thirdparty/libogg"])
- if (env['builtin_libvorbis'] != 'no'):
+ if env['builtin_libvorbis']:
env_theora.Append(CPPPATH=["#thirdparty/libvorbis"])
# Godot source files
diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp
index 02b994f8db..c75bec31df 100644
--- a/modules/theora/video_stream_theora.cpp
+++ b/modules/theora/video_stream_theora.cpp
@@ -634,12 +634,12 @@ int VideoStreamPlaybackTheora::get_loop_count() const {
return 0;
};
-float VideoStreamPlaybackTheora::get_pos() const {
+float VideoStreamPlaybackTheora::get_playback_position() const {
return get_time();
};
-void VideoStreamPlaybackTheora::seek_pos(float p_time){
+void VideoStreamPlaybackTheora::seek(float p_time){
// no
};
diff --git a/modules/theora/video_stream_theora.h b/modules/theora/video_stream_theora.h
index f04e49c662..484a1a7fb9 100644
--- a/modules/theora/video_stream_theora.h
+++ b/modules/theora/video_stream_theora.h
@@ -140,8 +140,8 @@ public:
virtual int get_loop_count() const;
- virtual float get_pos() const;
- virtual void seek_pos(float p_time);
+ virtual float get_playback_position() const;
+ virtual void seek(float p_time);
void set_file(const String &p_file);
diff --git a/modules/tinyexr/config.py b/modules/tinyexr/config.py
index 2e4b96a6b0..3e16fd725e 100644
--- a/modules/tinyexr/config.py
+++ b/modules/tinyexr/config.py
@@ -6,6 +6,6 @@ def can_build(platform):
def configure(env):
# Tools only, disabled for non-tools
# TODO: Find a cleaner way to achieve that
- if (env["tools"] == "no"):
- env["module_tinyexr_enabled"] = "no"
+ if not env['tools']:
+ env['module_tinyexr_enabled'] = False
env.disabled_modules.append("tinyexr")
diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp
index 88012d2031..c665fa12cf 100644
--- a/modules/visual_script/visual_script.cpp
+++ b/modules/visual_script/visual_script.cpp
@@ -423,7 +423,7 @@ Ref<VisualScriptNode> VisualScript::get_node(const StringName &p_func, int p_id)
return func.nodes[p_id].node;
}
-void VisualScript::set_node_pos(const StringName &p_func, int p_id, const Point2 &p_pos) {
+void VisualScript::set_node_position(const StringName &p_func, int p_id, const Point2 &p_pos) {
ERR_FAIL_COND(instances.size());
ERR_FAIL_COND(!functions.has(p_func));
@@ -433,7 +433,7 @@ void VisualScript::set_node_pos(const StringName &p_func, int p_id, const Point2
func.nodes[p_id].pos = p_pos;
}
-Point2 VisualScript::get_node_pos(const StringName &p_func, int p_id) const {
+Point2 VisualScript::get_node_position(const StringName &p_func, int p_id) const {
ERR_FAIL_COND_V(!functions.has(p_func), Point2());
const Function &func = functions[p_func];
@@ -1273,14 +1273,14 @@ void VisualScript::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_function_scroll", "name", "ofs"), &VisualScript::set_function_scroll);
ClassDB::bind_method(D_METHOD("get_function_scroll", "name"), &VisualScript::get_function_scroll);
- ClassDB::bind_method(D_METHOD("add_node", "func", "id", "node", "pos"), &VisualScript::add_node, DEFVAL(Point2()));
+ ClassDB::bind_method(D_METHOD("add_node", "func", "id", "node", "position"), &VisualScript::add_node, DEFVAL(Point2()));
ClassDB::bind_method(D_METHOD("remove_node", "func", "id"), &VisualScript::remove_node);
ClassDB::bind_method(D_METHOD("get_function_node_id", "name"), &VisualScript::get_function_node_id);
ClassDB::bind_method(D_METHOD("get_node", "func", "id"), &VisualScript::get_node);
ClassDB::bind_method(D_METHOD("has_node", "func", "id"), &VisualScript::has_node);
- ClassDB::bind_method(D_METHOD("set_node_pos", "func", "id", "pos"), &VisualScript::set_node_pos);
- ClassDB::bind_method(D_METHOD("get_node_pos", "func", "id"), &VisualScript::get_node_pos);
+ ClassDB::bind_method(D_METHOD("set_node_position", "func", "id", "position"), &VisualScript::set_node_position);
+ ClassDB::bind_method(D_METHOD("get_node_position", "func", "id"), &VisualScript::get_node_position);
ClassDB::bind_method(D_METHOD("sequence_connect", "func", "from_node", "from_output", "to_node"), &VisualScript::sequence_connect);
ClassDB::bind_method(D_METHOD("sequence_disconnect", "func", "from_node", "from_output", "to_node"), &VisualScript::sequence_disconnect);
diff --git a/modules/visual_script/visual_script.h b/modules/visual_script/visual_script.h
index 297e9e510f..4ae50ee829 100644
--- a/modules/visual_script/visual_script.h
+++ b/modules/visual_script/visual_script.h
@@ -278,8 +278,8 @@ public:
void remove_node(const StringName &p_func, int p_id);
bool has_node(const StringName &p_func, int p_id) const;
Ref<VisualScriptNode> get_node(const StringName &p_func, int p_id) const;
- void set_node_pos(const StringName &p_func, int p_id, const Point2 &p_pos);
- Point2 get_node_pos(const StringName &p_func, int p_id) const;
+ void set_node_position(const StringName &p_func, int p_id, const Point2 &p_pos);
+ Point2 get_node_position(const StringName &p_func, int p_id) const;
void get_node_list(const StringName &p_func, List<int> *r_nodes) const;
void sequence_connect(const StringName &p_func, int p_from_node, int p_from_output, int p_to_node);
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp
index 671a507377..985f8a8d0e 100644
--- a/modules/visual_script/visual_script_editor.cpp
+++ b/modules/visual_script/visual_script_editor.cpp
@@ -481,7 +481,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
continue;
Ref<VisualScriptNode> node = script->get_node(edited_func, E->get());
- Vector2 pos = script->get_node_pos(edited_func, E->get());
+ Vector2 pos = script->get_node_position(edited_func, E->get());
GraphNode *gnode = memnew(GraphNode);
gnode->set_title(node->get_caption());
@@ -491,10 +491,6 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
gnode->set_overlay(GraphNode::OVERLAY_BREAKPOINT);
}
- if (node_styles.has(node->get_category())) {
- gnode->add_style_override("frame", node_styles[node->get_category()]);
- }
-
gnode->set_meta("__vnode", node);
gnode->set_name(itos(E->get()));
gnode->connect("dragged", this, "_node_moved", varray(E->get()));
@@ -527,6 +523,25 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
gnode->connect("resize_request", this, "_comment_node_resized", varray(E->get()));
}
+ if (node_styles.has(node->get_category())) {
+ Ref<StyleBoxFlat> sbf = node_styles[node->get_category()];
+ if (gnode->is_comment())
+ sbf = EditorNode::get_singleton()->get_theme_base()->get_theme()->get_stylebox("comment", "GraphNode");
+
+ Color c = sbf->get_border_color(MARGIN_TOP);
+ c.a = 1;
+ if (EditorSettings::get_singleton()->get("interface/theme/use_graph_node_headers")) {
+ Color mono_color = ((c.r + c.g + c.b) / 3) < 0.5 ? Color(1.0, 1.0, 1.0) : Color(0, 0, 0);
+ mono_color.a = 0.85;
+ c = mono_color;
+ }
+
+ gnode->add_color_override("title_color", c);
+ c.a = 0.7;
+ gnode->add_color_override("close_color", c);
+ gnode->add_style_override("frame", sbf);
+ }
+
int slot_idx = 0;
bool single_seq_output = node->get_output_sequence_port_count() == 1 && node->get_output_sequence_port_text(0) == String();
@@ -1050,7 +1065,7 @@ void VisualScriptEditor::_available_node_doubleclicked() {
List<int> existing;
script->get_node_list(edited_func, &existing);
for (List<int>::Element *E = existing.front(); E; E = E->next()) {
- Point2 pos = script->get_node_pos(edited_func, E->get());
+ Point2 pos = script->get_node_position(edited_func, E->get());
if (pos.distance_to(ofs) < 15) {
ofs += Vector2(graph->get_snap(), graph->get_snap());
exists = true;
@@ -1171,7 +1186,7 @@ void VisualScriptEditor::_on_nodes_delete() {
for (List<int>::Element *F = to_erase.front(); F; F = F->next()) {
undo_redo->add_do_method(script.ptr(), "remove_node", edited_func, F->get());
- undo_redo->add_undo_method(script.ptr(), "add_node", edited_func, F->get(), script->get_node(edited_func, F->get()), script->get_node_pos(edited_func, F->get()));
+ undo_redo->add_undo_method(script.ptr(), "add_node", edited_func, F->get(), script->get_node(edited_func, F->get()), script->get_node_position(edited_func, F->get()));
List<VisualScript::SequenceConnection> sequence_conns;
script->get_sequence_connection_list(edited_func, &sequence_conns);
@@ -1228,7 +1243,7 @@ void VisualScriptEditor::_on_nodes_duplicate() {
int new_id = idc++;
to_select.insert(new_id);
- undo_redo->add_do_method(script.ptr(), "add_node", edited_func, new_id, dupe, script->get_node_pos(edited_func, F->get()) + Vector2(20, 20));
+ undo_redo->add_do_method(script.ptr(), "add_node", edited_func, new_id, dupe, script->get_node_position(edited_func, F->get()) + Vector2(20, 20));
undo_redo->add_undo_method(script.ptr(), "remove_node", edited_func, new_id);
}
undo_redo->add_do_method(this, "_update_graph");
@@ -1262,7 +1277,7 @@ Variant VisualScriptEditor::get_drag_data_fw(const Point2 &p_point, Control *p_f
if (p_from == nodes) {
- TreeItem *it = nodes->get_item_at_pos(p_point);
+ TreeItem *it = nodes->get_item_at_position(p_point);
if (!it)
return Variant();
String type = it->get_metadata(0);
@@ -1281,7 +1296,7 @@ Variant VisualScriptEditor::get_drag_data_fw(const Point2 &p_point, Control *p_f
if (p_from == members) {
- TreeItem *it = members->get_item_at_pos(p_point);
+ TreeItem *it = members->get_item_at_position(p_point);
if (!it)
return Variant();
@@ -2182,7 +2197,7 @@ void VisualScriptEditor::_move_node(String func, int p_id, const Vector2 &p_to)
if (Object::cast_to<GraphNode>(node))
Object::cast_to<GraphNode>(node)->set_offset(p_to);
}
- script->set_node_pos(edited_func, p_id, p_to / EDSCALE);
+ script->set_node_position(edited_func, p_id, p_to / EDSCALE);
}
void VisualScriptEditor::_node_moved(Vector2 p_from, Vector2 p_to, int p_id) {
@@ -2196,7 +2211,7 @@ void VisualScriptEditor::_remove_node(int p_id) {
undo_redo->create_action(TTR("Remove VisualScript Node"));
undo_redo->add_do_method(script.ptr(), "remove_node", edited_func, p_id);
- undo_redo->add_undo_method(script.ptr(), "add_node", edited_func, p_id, script->get_node(edited_func, p_id), script->get_node_pos(edited_func, p_id));
+ undo_redo->add_undo_method(script.ptr(), "add_node", edited_func, p_id, script->get_node(edited_func, p_id), script->get_node_position(edited_func, p_id));
List<VisualScript::SequenceConnection> sequence_conns;
script->get_sequence_connection_list(edited_func, &sequence_conns);
@@ -2753,12 +2768,12 @@ void VisualScriptEditor::_notification(int p_what) {
signal_editor->connect("changed", this, "_update_members");
List<Pair<String, Color> > colors;
- colors.push_back(Pair<String, Color>("functions", Color(1, 0.9, 0.9)));
- colors.push_back(Pair<String, Color>("data", Color(0.9, 1.0, 0.9)));
- colors.push_back(Pair<String, Color>("operators", Color(0.9, 0.9, 1.0)));
- colors.push_back(Pair<String, Color>("flow_control", Color(1.0, 1.0, 1.0)));
- colors.push_back(Pair<String, Color>("custom", Color(0.8, 1.0, 1.0)));
- colors.push_back(Pair<String, Color>("constants", Color(1.0, 0.8, 1.0)));
+ colors.push_back(Pair<String, Color>("flow_control", Color::html("#f4f4f4")));
+ colors.push_back(Pair<String, Color>("functions", Color::html("#f58581")));
+ colors.push_back(Pair<String, Color>("data", Color::html("#80f6cf")));
+ colors.push_back(Pair<String, Color>("operators", Color::html("#ab97df")));
+ colors.push_back(Pair<String, Color>("custom", Color::html("#80bbf6")));
+ colors.push_back(Pair<String, Color>("constants", Color::html("#f680b0")));
for (List<Pair<String, Color> >::Element *E = colors.front(); E; E = E->next()) {
print_line(E->get().first);
@@ -2880,7 +2895,7 @@ void VisualScriptEditor::_menu_option(int p_what) {
}
if (node.is_valid()) {
clipboard->nodes[id] = node->duplicate();
- clipboard->nodes_positions[id] = script->get_node_pos(edited_func, id);
+ clipboard->nodes_positions[id] = script->get_node_position(edited_func, id);
}
}
}
@@ -2940,7 +2955,7 @@ void VisualScriptEditor::_menu_option(int p_what) {
List<int> nodes;
script->get_node_list(edited_func, &nodes);
for (List<int>::Element *E = nodes.front(); E; E = E->next()) {
- Vector2 pos = script->get_node_pos(edited_func, E->get()).snapped(Vector2(2, 2));
+ Vector2 pos = script->get_node_position(edited_func, E->get()).snapped(Vector2(2, 2));
existing_positions.insert(pos);
}
}
@@ -3054,7 +3069,7 @@ void VisualScriptEditor::_member_option(int p_option) {
List<int> nodes;
script->get_node_list(name, &nodes);
for (List<int>::Element *E = nodes.front(); E; E = E->next()) {
- undo_redo->add_undo_method(script.ptr(), "add_node", name, E->get(), script->get_node(name, E->get()), script->get_node_pos(name, E->get()));
+ undo_redo->add_undo_method(script.ptr(), "add_node", name, E->get(), script->get_node(name, E->get()), script->get_node_position(name, E->get()));
}
List<VisualScript::SequenceConnection> seq_connections;
@@ -3252,8 +3267,7 @@ VisualScriptEditor::VisualScriptEditor() {
graph = memnew(GraphEdit);
add_child(graph);
- graph->set_area_as_parent_rect();
- graph->set_h_size_flags(SIZE_EXPAND_FILL);
+ graph->set_anchors_and_margins_preset(Control::PRESET_WIDE);
graph->connect("node_selected", this, "_node_selected");
graph->connect("_begin_node_move", this, "_begin_node_move");
graph->connect("_end_node_move", this, "_end_node_move");
diff --git a/modules/visual_script/visual_script_expression.cpp b/modules/visual_script/visual_script_expression.cpp
index eae866d167..897e910f20 100644
--- a/modules/visual_script/visual_script_expression.cpp
+++ b/modules/visual_script/visual_script_expression.cpp
@@ -1023,7 +1023,7 @@ VisualScriptExpression::ENode *VisualScriptExpression::_parse_expression() {
case TK_OP_OR: op = Variant::OP_OR; break;
case TK_OP_NOT: op = Variant::OP_NOT; break;
case TK_OP_ADD: op = Variant::OP_ADD; break;
- case TK_OP_SUB: op = Variant::OP_SUBSTRACT; break;
+ case TK_OP_SUB: op = Variant::OP_SUBTRACT; break;
case TK_OP_MUL: op = Variant::OP_MULTIPLY; break;
case TK_OP_DIV: op = Variant::OP_DIVIDE; break;
case TK_OP_MOD: op = Variant::OP_MODULE; break;
@@ -1085,7 +1085,7 @@ VisualScriptExpression::ENode *VisualScriptExpression::_parse_expression() {
case Variant::OP_MODULE: priority = 2; break;
case Variant::OP_ADD: priority = 3; break;
- case Variant::OP_SUBSTRACT: priority = 3; break;
+ case Variant::OP_SUBTRACT: priority = 3; break;
case Variant::OP_SHIFT_LEFT: priority = 4; break;
case Variant::OP_SHIFT_RIGHT: priority = 4; break;
diff --git a/modules/visual_script/visual_script_func_nodes.cpp b/modules/visual_script/visual_script_func_nodes.cpp
index 267946750f..c17265d275 100644
--- a/modules/visual_script/visual_script_func_nodes.cpp
+++ b/modules/visual_script/visual_script_func_nodes.cpp
@@ -42,7 +42,7 @@
int VisualScriptFunctionCall::get_output_sequence_port_count() const {
- if (method_cache.flags & METHOD_FLAG_CONST || call_mode == CALL_MODE_BASIC_TYPE)
+ if (method_cache.flags & METHOD_FLAG_CONST || (call_mode == CALL_MODE_BASIC_TYPE && Variant::is_method_const(basic_type, function)))
return 0;
else
return 1;
@@ -50,7 +50,7 @@ int VisualScriptFunctionCall::get_output_sequence_port_count() const {
bool VisualScriptFunctionCall::has_input_sequence_port() const {
- if (method_cache.flags & METHOD_FLAG_CONST || call_mode == CALL_MODE_BASIC_TYPE)
+ if (method_cache.flags & METHOD_FLAG_CONST || (call_mode == CALL_MODE_BASIC_TYPE && Variant::is_method_const(basic_type, function)))
return false;
else
return true;
@@ -1546,7 +1546,7 @@ public:
value = Variant::evaluate(Variant::OP_ADD, value, p_argument);
} break;
case VisualScriptPropertySet::ASSIGN_OP_SUB: {
- value = Variant::evaluate(Variant::OP_SUBSTRACT, value, p_argument);
+ value = Variant::evaluate(Variant::OP_SUBTRACT, value, p_argument);
} break;
case VisualScriptPropertySet::ASSIGN_OP_MUL: {
value = Variant::evaluate(Variant::OP_MULTIPLY, value, p_argument);
diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp
index b617c11bab..16aec76e57 100644
--- a/modules/visual_script/visual_script_nodes.cpp
+++ b/modules/visual_script/visual_script_nodes.cpp
@@ -3762,7 +3762,7 @@ void register_visual_script_nodes() {
VisualScriptLanguage::singleton->add_register_func("operators/compare/greater_equal", create_op_node<Variant::OP_GREATER_EQUAL>);
//mathematic
VisualScriptLanguage::singleton->add_register_func("operators/math/add", create_op_node<Variant::OP_ADD>);
- VisualScriptLanguage::singleton->add_register_func("operators/math/subtract", create_op_node<Variant::OP_SUBSTRACT>);
+ VisualScriptLanguage::singleton->add_register_func("operators/math/subtract", create_op_node<Variant::OP_SUBTRACT>);
VisualScriptLanguage::singleton->add_register_func("operators/math/multiply", create_op_node<Variant::OP_MULTIPLY>);
VisualScriptLanguage::singleton->add_register_func("operators/math/divide", create_op_node<Variant::OP_DIVIDE>);
VisualScriptLanguage::singleton->add_register_func("operators/math/negate", create_op_node<Variant::OP_NEGATE>);
diff --git a/modules/vorbis/SCsub b/modules/vorbis/SCsub
index d3e4f7e15a..9d2d0feb92 100644
--- a/modules/vorbis/SCsub
+++ b/modules/vorbis/SCsub
@@ -6,7 +6,7 @@ Import('env_modules')
env_vorbis = env_modules.Clone()
# Thirdparty source files
-if (env['builtin_libvorbis'] != 'no'):
+if env['builtin_libvorbis']:
thirdparty_dir = "#thirdparty/libvorbis/"
thirdparty_sources = [
#"analysis.c",
@@ -42,7 +42,7 @@ if (env['builtin_libvorbis'] != 'no'):
env_vorbis.Append(CPPPATH=[thirdparty_dir])
# also requires libogg
- if (env['builtin_libogg'] != 'no'):
+ if env['builtin_libogg']:
env_vorbis.Append(CPPPATH=["#thirdparty/libogg"])
# Godot source files
diff --git a/modules/vorbis/audio_stream_ogg_vorbis.cpp b/modules/vorbis/audio_stream_ogg_vorbis.cpp
index 6389c286c2..0afb889199 100644
--- a/modules/vorbis/audio_stream_ogg_vorbis.cpp
+++ b/modules/vorbis/audio_stream_ogg_vorbis.cpp
@@ -58,7 +58,7 @@ int AudioStreamPlaybackOGGVorbis::_ov_seek_func(void *_f, ogg_int64_t offs, int
fa->seek(offs);
} else if (whence == SEEK_CUR) {
- fa->seek(fa->get_pos() + offs);
+ fa->seek(fa->get_position() + offs);
} else if (whence == SEEK_END) {
fa->seek_end(offs);
@@ -89,7 +89,7 @@ long AudioStreamPlaybackOGGVorbis::_ov_tell_func(void *_f) {
//printf("close %p\n",_f);
FileAccess *fa = (FileAccess *)_f;
- return fa->get_pos();
+ return fa->get_position();
}
int AudioStreamPlaybackOGGVorbis::mix(int16_t *p_bufer, int p_frames) {
@@ -180,7 +180,7 @@ void AudioStreamPlaybackOGGVorbis::play(float p_from) {
frames_mixed = 0;
playing = true;
if (p_from > 0) {
- seek_pos(p_from);
+ seek(p_from);
}
}
@@ -203,7 +203,7 @@ void AudioStreamPlaybackOGGVorbis::stop() {
//_clear();
}
-float AudioStreamPlaybackOGGVorbis::get_pos() const {
+float AudioStreamPlaybackOGGVorbis::get_playback_position() const {
int32_t frames = int32_t(frames_mixed);
if (frames < 0)
@@ -211,7 +211,7 @@ float AudioStreamPlaybackOGGVorbis::get_pos() const {
return double(frames) / stream_srate;
}
-void AudioStreamPlaybackOGGVorbis::seek_pos(float p_time) {
+void AudioStreamPlaybackOGGVorbis::seek(float p_time) {
if (!playing)
return;
diff --git a/modules/vorbis/audio_stream_ogg_vorbis.h b/modules/vorbis/audio_stream_ogg_vorbis.h
index 03b3726b52..929b2651e9 100644
--- a/modules/vorbis/audio_stream_ogg_vorbis.h
+++ b/modules/vorbis/audio_stream_ogg_vorbis.h
@@ -96,8 +96,8 @@ public:
virtual int get_loop_count() const;
- virtual float get_pos() const;
- virtual void seek_pos(float p_time);
+ virtual float get_playback_position() const;
+ virtual void seek(float p_time);
virtual int get_channels() const { return stream_channels; }
virtual int get_mix_rate() const { return stream_srate; }
diff --git a/modules/webm/SCsub b/modules/webm/SCsub
index 889f5e83aa..2f1a28a54c 100644
--- a/modules/webm/SCsub
+++ b/modules/webm/SCsub
@@ -19,14 +19,14 @@ env_webm.add_source_files(env.modules_sources, thirdparty_libsimplewebm_sources)
env_webm.Append(CPPPATH=[thirdparty_libsimplewebm_dir, thirdparty_libsimplewebm_dir + "libwebm/"])
# also requires libogg, libvorbis and libopus
-if (env['builtin_libogg'] != 'no'):
+if env['builtin_libogg']:
env_webm.Append(CPPPATH=["#thirdparty/libogg"])
-if (env['builtin_libvorbis'] != 'no'):
+if env['builtin_libvorbis']:
env_webm.Append(CPPPATH=["#thirdparty/libvorbis"])
-if (env['builtin_opus'] != 'no'):
+if env['builtin_opus']:
env_webm.Append(CPPPATH=["#thirdparty/opus"])
-if (env['builtin_libvpx'] != 'no'):
+if env['builtin_libvpx']:
Export('env_webm')
SConscript("libvpx/SCsub")
diff --git a/modules/webm/libvpx/SCsub b/modules/webm/libvpx/SCsub
index 0ee2ed45b8..fd8d762a5e 100644
--- a/modules/webm/libvpx/SCsub
+++ b/modules/webm/libvpx/SCsub
@@ -265,7 +265,7 @@ if env["platform"] == 'uwp':
else:
import platform
is_x11_or_server_arm = ((env["platform"] == 'x11' or env["platform"] == 'server') and platform.machine().startswith('arm'))
- is_ios_x86 = (env["platform"] == 'iphone' and env["ios_sim"] == "yes")
+ is_ios_x86 = (env["platform"] == 'iphone' and env["ios_sim"])
is_android_x86 = (env["platform"] == 'android' and env["android_arch"] == 'x86')
if is_android_x86:
cpu_bits = '32'
diff --git a/modules/webm/video_stream_webm.cpp b/modules/webm/video_stream_webm.cpp
index 0178ebab84..2ec6b27471 100644
--- a/modules/webm/video_stream_webm.cpp
+++ b/modules/webm/video_stream_webm.cpp
@@ -59,7 +59,7 @@ public:
if (file) {
- if (file->get_pos() != (size_t)pos)
+ if (file->get_position() != (size_t)pos)
file->seek(pos);
if (file->get_buffer(buf, len) == len)
return 0;
@@ -204,11 +204,11 @@ float VideoStreamPlaybackWebm::get_length() const {
return 0.0f;
}
-float VideoStreamPlaybackWebm::get_pos() const {
+float VideoStreamPlaybackWebm::get_playback_position() const {
return video_pos;
}
-void VideoStreamPlaybackWebm::seek_pos(float p_time) {
+void VideoStreamPlaybackWebm::seek(float p_time) {
//Not implemented
}
diff --git a/modules/webm/video_stream_webm.h b/modules/webm/video_stream_webm.h
index 9a331849be..fc0720967a 100644
--- a/modules/webm/video_stream_webm.h
+++ b/modules/webm/video_stream_webm.h
@@ -81,8 +81,8 @@ public:
virtual float get_length() const;
- virtual float get_pos() const;
- virtual void seek_pos(float p_time);
+ virtual float get_playback_position() const;
+ virtual void seek(float p_time);
virtual void set_audio_track(int p_idx);
diff --git a/modules/webp/SCsub b/modules/webp/SCsub
index aa3486a2c5..f9295fed47 100644
--- a/modules/webp/SCsub
+++ b/modules/webp/SCsub
@@ -6,7 +6,7 @@ Import('env_modules')
env_webp = env_modules.Clone()
# Thirdparty source files
-if (env['builtin_libwebp'] != 'no'):
+if env['builtin_libwebp']:
thirdparty_dir = "#thirdparty/libwebp/"
thirdparty_sources = [
"dec/alpha_dec.c",