diff options
-rw-r--r-- | SConstruct | 4 | ||||
-rw-r--r-- | core/bind/core_bind.cpp | 2 | ||||
-rw-r--r-- | core/object.cpp | 2 | ||||
-rw-r--r-- | core/variant.cpp | 2 | ||||
-rw-r--r-- | doc/base/classes.xml | 8 | ||||
-rw-r--r-- | drivers/gles3/rasterizer_storage_gles3.cpp | 3 | ||||
-rw-r--r-- | methods.py | 5 | ||||
-rw-r--r-- | modules/gdscript/gd_editor.cpp | 2 | ||||
-rw-r--r-- | platform/android/SCsub | 15 | ||||
-rw-r--r-- | platform/android/build.gradle.template | 3 | ||||
-rw-r--r-- | platform/javascript/detect.py | 5 | ||||
-rw-r--r-- | scene/gui/control.cpp | 6 | ||||
-rwxr-xr-x[-rw-r--r--] | scene/main/node.cpp | 15 | ||||
-rw-r--r-- | scene/scene_string_names.cpp | 2 | ||||
-rw-r--r-- | scene/scene_string_names.h | 2 | ||||
-rw-r--r-- | servers/audio_server.cpp | 30 | ||||
-rw-r--r-- | servers/audio_server.h | 2 |
17 files changed, 72 insertions, 36 deletions
diff --git a/SConstruct b/SConstruct index 2e7683d17a..e9a6bc44b6 100644 --- a/SConstruct +++ b/SConstruct @@ -73,6 +73,8 @@ env_base.AppendENVPath('PKG_CONFIG_PATH', os.getenv('PKG_CONFIG_PATH')) env_base.global_defaults = global_defaults env_base.android_maven_repos = [] env_base.android_dependencies = [] +env_base.android_gradle_plugins = [] +env_base.android_gradle_classpath = [] env_base.android_java_dirs = [] env_base.android_res_dirs = [] env_base.android_aidl_dirs = [] @@ -96,6 +98,8 @@ env_base.__class__.android_add_default_config = methods.android_add_default_conf env_base.__class__.android_add_to_manifest = methods.android_add_to_manifest env_base.__class__.android_add_to_permissions = methods.android_add_to_permissions env_base.__class__.android_add_to_attributes = methods.android_add_to_attributes +env_base.__class__.android_add_gradle_plugin = methods.android_add_gradle_plugin +env_base.__class__.android_add_gradle_classpath = methods.android_add_gradle_classpath env_base.__class__.disable_module = methods.disable_module env_base.__class__.add_source_files = methods.add_source_files diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index ce3d65b448..c9c74094d3 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -2078,7 +2078,7 @@ void _Marshalls::_bind_methods() { ClassDB::bind_method(D_METHOD("base64_to_variant:Variant", "base64_str"), &_Marshalls::base64_to_variant); ClassDB::bind_method(D_METHOD("raw_to_base64:String", "array"), &_Marshalls::raw_to_base64); - ClassDB::bind_method(D_METHOD("base64_to_raw:RawArray", "base64_str"), &_Marshalls::base64_to_raw); + ClassDB::bind_method(D_METHOD("base64_to_raw:PoolByteArray", "base64_str"), &_Marshalls::base64_to_raw); ClassDB::bind_method(D_METHOD("utf8_to_base64:String", "utf8_str"), &_Marshalls::utf8_to_base64); ClassDB::bind_method(D_METHOD("base64_to_utf8:String", "base64_str"), &_Marshalls::base64_to_utf8); diff --git a/core/object.cpp b/core/object.cpp index e9b332fafa..fe6f120c17 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -1587,7 +1587,7 @@ void Object::_bind_methods() { ClassDB::bind_method(D_METHOD("get_class"), &Object::get_class); ClassDB::bind_method(D_METHOD("is_class", "type"), &Object::is_class); ClassDB::bind_method(D_METHOD("set", "property", "value"), &Object::_set_bind); - ClassDB::bind_method(D_METHOD("get", "property"), &Object::_get_bind); + ClassDB::bind_method(D_METHOD("get:Variant", "property"), &Object::_get_bind); ClassDB::bind_method(D_METHOD("get_property_list"), &Object::_get_property_list_bind); ClassDB::bind_method(D_METHOD("get_method_list"), &Object::_get_method_list_bind); ClassDB::bind_method(D_METHOD("notification", "what", "reversed"), &Object::notification, DEFVAL(false)); diff --git a/core/variant.cpp b/core/variant.cpp index 771d97a4eb..6d98ba7306 100644 --- a/core/variant.cpp +++ b/core/variant.cpp @@ -166,7 +166,7 @@ String Variant::get_type_name(Variant::Type p_type) { } break; case POOL_REAL_ARRAY: { - return "PoolFloatArray"; + return "PoolRealArray"; } break; case POOL_STRING_ARRAY: { diff --git a/doc/base/classes.xml b/doc/base/classes.xml index 71594887fc..0b6e2d99ea 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -9810,6 +9810,14 @@ <description> </description> </method> + <method name="has_point" qualifiers="virtual"> + <return type="bool"> + </return> + <argument index="0" name="point" type="Vector2"> + </argument> + <description> + </description> + </method> <method name="has_stylebox" qualifiers="const"> <return type="bool"> </return> diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp index 526b4ab9ce..52eb8299d9 100644 --- a/drivers/gles3/rasterizer_storage_gles3.cpp +++ b/drivers/gles3/rasterizer_storage_gles3.cpp @@ -6280,7 +6280,10 @@ void RasterizerStorageGLES3::initialize() { shaders.cubemap_filter.init(); shaders.particles.init(); +#ifndef GLES_OVER_GL + glEnable(_EXT_TEXTURE_CUBE_MAP_SEAMLESS); +#endif frame.count = 0; frame.prev_tick = 0; diff --git a/methods.py b/methods.py index 7177dcb804..a86fa1937d 100644 --- a/methods.py +++ b/methods.py @@ -1381,6 +1381,11 @@ def android_add_jni_dir(self, subpath): base_path = self.Dir(".").abspath + "/modules/" + self.current_module + "/" + subpath self.android_jni_dirs.append(base_path) +def android_add_gradle_plugin(self, plugin): + self.android_gradle_plugins.append(plugin) + +def android_add_gradle_classpath(self, classpath): + self.android_gradle_classpath.append(classpath) def android_add_default_config(self, config): self.android_default_config.append(config) diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp index bd428941e0..702876ecdc 100644 --- a/modules/gdscript/gd_editor.cpp +++ b/modules/gdscript/gd_editor.cpp @@ -405,7 +405,7 @@ static Ref<Reference> _get_parent_class(GDCompletionContext &context) { if (script.is_null()) { return REF(); } - if (script->is_valid()) { + if (!script->is_valid()) { return REF(); } diff --git a/platform/android/SCsub b/platform/android/SCsub index 86f8c40f83..e8536953a3 100644 --- a/platform/android/SCsub +++ b/platform/android/SCsub @@ -49,10 +49,11 @@ gradle_text = gradle_basein.read() gradle_maven_repos_text = "" if len(env.android_maven_repos) > 0: - gradle_maven_repos_text += "maven {\n" + gradle_maven_repos_text += "" for x in env.android_maven_repos: + gradle_maven_repos_text += "\tmaven {\n" gradle_maven_repos_text += "\t\t" + x + "\n" - gradle_maven_repos_text += "\t}\n" + gradle_maven_repos_text += "\t}\n" gradle_maven_dependencies_text = "" @@ -64,7 +65,14 @@ gradle_java_dirs_text = "" for x in env.android_java_dirs: gradle_java_dirs_text += ",'" + x.replace("\\", "/") + "'" +gradle_plugins = "" +for x in env.android_gradle_plugins: + gradle_plugins += "apply plugin: \"" + x + "\"\n" +gradle_classpath = "" +for x in env.android_gradle_classpath: + gradle_classpath += "\t\tclasspath \"" + x + "\"\n" + gradle_res_dirs_text = "" for x in env.android_res_dirs: @@ -95,7 +103,8 @@ gradle_text = gradle_text.replace("$$GRADLE_ASSET_DIRS$$", gradle_asset_dirs_tex gradle_text = gradle_text.replace("$$GRADLE_AIDL_DIRS$$", gradle_aidl_dirs_text) gradle_text = gradle_text.replace("$$GRADLE_JNI_DIRS$$", gradle_jni_dirs_text) gradle_text = gradle_text.replace("$$GRADLE_DEFAULT_CONFIG$$", gradle_default_config_text) - +gradle_text = gradle_text.replace("$$GRADLE_PLUGINS$$", gradle_plugins) +gradle_text = gradle_text.replace("$$GRADLE_CLASSPATH$$", gradle_classpath) gradle_baseout.write(gradle_text) gradle_baseout.close() diff --git a/platform/android/build.gradle.template b/platform/android/build.gradle.template index c46a15bd12..24aab8e01f 100644 --- a/platform/android/build.gradle.template +++ b/platform/android/build.gradle.template @@ -4,6 +4,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:2.1.0' + $$GRADLE_CLASSPATH$$ } } @@ -83,3 +84,5 @@ android { variant.outputs.get(0).setOutputFile(new File("${projectDir}/../../../bin", "android_${variant.name}.apk")) } } + +$$GRADLE_PLUGINS$$ diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index c828045179..d4d54b1ce8 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -74,9 +74,10 @@ def configure(env): elif (env["target"] == "release_debug"): env.Append(CCFLAGS=['-O2', '-DDEBUG_ENABLED']) elif (env["target"] == "debug"): - env.Append(CCFLAGS=['-D_DEBUG', '-Wall', '-O2', '-DDEBUG_ENABLED']) - #env.Append(CCFLAGS=['-D_DEBUG', '-Wall', '-g4', '-DDEBUG_ENABLED']) + #env.Append(CCFLAGS=['-D_DEBUG', '-Wall', '-O2', '-DDEBUG_ENABLED']) + env.Append(CCFLAGS=['-D_DEBUG', '-Wall', '-g3', '-DDEBUG_ENABLED']) env.Append(CPPFLAGS=['-DDEBUG_MEMORY_ALLOC']) + env.Append(LINKFLAGS=['--profiling-funcs']) # TODO: Move that to opus module's config if("module_opus_enabled" in env and env["module_opus_enabled"] != "no"): diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 7779391bae..a8e364a4cd 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -692,7 +692,7 @@ Size2 Control::get_minimum_size() const { if (si) { Variant::CallError ce; - Variant s = si->call(SceneStringNames::get_singleton()->get_minimum_size, NULL, 0, ce); + Variant s = si->call(SceneStringNames::get_singleton()->_get_minimum_size, NULL, 0, ce); if (ce.error == Variant::CallError::CALL_OK) return s; } @@ -2419,7 +2419,7 @@ void Control::_bind_methods() { ClassDB::bind_method(D_METHOD("_font_changed"), &Control::_font_changed); BIND_VMETHOD(MethodInfo("_gui_input", PropertyInfo(Variant::INPUT_EVENT, "event"))); - BIND_VMETHOD(MethodInfo(Variant::VECTOR2, "get_minimum_size")); + BIND_VMETHOD(MethodInfo(Variant::VECTOR2, "_get_minimum_size")); BIND_VMETHOD(MethodInfo(Variant::OBJECT, "get_drag_data", PropertyInfo(Variant::VECTOR2, "pos"))); BIND_VMETHOD(MethodInfo(Variant::BOOL, "can_drop_data", PropertyInfo(Variant::VECTOR2, "pos"), PropertyInfo(Variant::NIL, "data"))); BIND_VMETHOD(MethodInfo("drop_data", PropertyInfo(Variant::VECTOR2, "pos"), PropertyInfo(Variant::NIL, "data"))); @@ -2514,6 +2514,8 @@ void Control::_bind_methods() { ADD_SIGNAL(MethodInfo("size_flags_changed")); ADD_SIGNAL(MethodInfo("minimum_size_changed")); ADD_SIGNAL(MethodInfo("modal_closed")); + + BIND_VMETHOD(MethodInfo("has_point", PropertyInfo(Variant::VECTOR2, "point"))); } Control::Control() { diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 0245944154..600dc8737d 100644..100755 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -2020,12 +2020,13 @@ void Node::remove_and_skip() { bool clear = true; for (int i = 0; i < data.children.size(); i++) { - if (!data.children[i]->get_owner()) + Node *c_node = data.children[i]; + if (!c_node->get_owner()) continue; - remove_child(data.children[i]); - data.children[i]->_propagate_replace_owner(this, NULL); - children.push_back(data.children[i]); + remove_child(c_node); + c_node->_propagate_replace_owner(this, NULL); + children.push_back(c_node); clear = false; break; } @@ -2036,9 +2037,9 @@ void Node::remove_and_skip() { while (!children.empty()) { - Node *c = children.front()->get(); - data.parent->add_child(c); - c->_propagate_replace_owner(NULL, new_owner); + Node *c_node = children.front()->get(); + data.parent->add_child(c_node); + c_node->_propagate_replace_owner(NULL, new_owner); children.pop_front(); } diff --git a/scene/scene_string_names.cpp b/scene/scene_string_names.cpp index ae939ead5f..f0a33e0d3b 100644 --- a/scene/scene_string_names.cpp +++ b/scene/scene_string_names.cpp @@ -145,7 +145,7 @@ SceneStringNames::SceneStringNames() { _update_remote = StaticCString::create("_update_remote"); _update_pairs = StaticCString::create("_update_pairs"); - get_minimum_size = StaticCString::create("get_minimum_size"); + _get_minimum_size = StaticCString::create("_get_minimum_size"); area_entered = StaticCString::create("area_entered"); area_exited = StaticCString::create("area_exited"); diff --git a/scene/scene_string_names.h b/scene/scene_string_names.h index e16e1e04e6..8900bbe1d9 100644 --- a/scene/scene_string_names.h +++ b/scene/scene_string_names.h @@ -167,7 +167,7 @@ public: StringName area_entered; StringName area_exited; - StringName get_minimum_size; + StringName _get_minimum_size; StringName play_play; diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp index 5419c5cfe7..8f45d0966f 100644 --- a/servers/audio_server.cpp +++ b/servers/audio_server.cpp @@ -864,39 +864,39 @@ void AudioServer::remove_callback(AudioCallback p_callback, void *p_userdata) { unlock(); } -void AudioServer::set_bus_layout(const Ref<AudioBusLayout> &p_state) { +void AudioServer::set_bus_layout(const Ref<AudioBusLayout> &p_bus_layout) { - ERR_FAIL_COND(p_state.is_null() || p_state->buses.size() == 0); + ERR_FAIL_COND(p_bus_layout.is_null() || p_bus_layout->buses.size() == 0); lock(); for (int i = 0; i < buses.size(); i++) { memdelete(buses[i]); } - buses.resize(p_state->buses.size()); + buses.resize(p_bus_layout->buses.size()); bus_map.clear(); - for (int i = 0; i < p_state->buses.size(); i++) { + for (int i = 0; i < p_bus_layout->buses.size(); i++) { Bus *bus = memnew(Bus); if (i == 0) { bus->name = "Master"; } else { - bus->name = p_state->buses[i].name; - bus->send = p_state->buses[i].send; + bus->name = p_bus_layout->buses[i].name; + bus->send = p_bus_layout->buses[i].send; } - bus->solo = p_state->buses[i].solo; - bus->mute = p_state->buses[i].mute; - bus->bypass = p_state->buses[i].bypass; - bus->volume_db = p_state->buses[i].volume_db; + bus->solo = p_bus_layout->buses[i].solo; + bus->mute = p_bus_layout->buses[i].mute; + bus->bypass = p_bus_layout->buses[i].bypass; + bus->volume_db = p_bus_layout->buses[i].volume_db; - for (int j = 0; j < p_state->buses[i].effects.size(); j++) { + for (int j = 0; j < p_bus_layout->buses[i].effects.size(); j++) { - Ref<AudioEffect> fx = p_state->buses[i].effects[j].effect; + Ref<AudioEffect> fx = p_bus_layout->buses[i].effects[j].effect; if (fx.is_valid()) { Bus::Effect bfx; bfx.effect = fx; - bfx.enabled = p_state->buses[i].effects[j].enabled; + bfx.enabled = p_bus_layout->buses[i].effects[j].enabled; bus->effects.push_back(bfx); } } @@ -988,8 +988,8 @@ void AudioServer::_bind_methods() { ClassDB::bind_method(D_METHOD("get_speaker_mode"), &AudioServer::get_speaker_mode); ClassDB::bind_method(D_METHOD("get_mix_rate"), &AudioServer::get_mix_rate); - ClassDB::bind_method(D_METHOD("set_state", "state:AudioServerState"), &AudioServer::set_bus_layout); - ClassDB::bind_method(D_METHOD("generate_state:AudioServerState"), &AudioServer::generate_bus_layout); + ClassDB::bind_method(D_METHOD("set_bus_layout", "bus_layout:AudioBusLayout"), &AudioServer::set_bus_layout); + ClassDB::bind_method(D_METHOD("generate_bus_layout:AudioBusLayout"), &AudioServer::generate_bus_layout); ADD_SIGNAL(MethodInfo("bus_layout_changed")); } diff --git a/servers/audio_server.h b/servers/audio_server.h index 46f845f2d4..eed0a5e4c6 100644 --- a/servers/audio_server.h +++ b/servers/audio_server.h @@ -275,7 +275,7 @@ public: void add_callback(AudioCallback p_callback, void *p_userdata); void remove_callback(AudioCallback p_callback, void *p_userdata); - void set_bus_layout(const Ref<AudioBusLayout> &p_state); + void set_bus_layout(const Ref<AudioBusLayout> &p_bus_layout); Ref<AudioBusLayout> generate_bus_layout() const; AudioServer(); |