diff options
148 files changed, 1932 insertions, 1006 deletions
diff --git a/COPYRIGHT.txt b/COPYRIGHT.txt index 2a1fe20477..738fe3ff5a 100644 --- a/COPYRIGHT.txt +++ b/COPYRIGHT.txt @@ -55,31 +55,16 @@ Comment: Godot Engine logo Copyright: 2017, Andrea Calabró License: CC-BY-3.0 -Files: ./platform/android/android_native_app_glue.c - ./platform/android/android_native_app_glue.h - ./platform/android/java/aidl/com/android/vending/billing/IInAppBillingService.aidl +Files: ./platform/android/java/aidl/com/android/vending/billing/IInAppBillingService.aidl ./platform/android/java/res/layout/status_bar_ongoing_event_progress_bar.xml - ./platform/android/java/src/com/android/vending/licensing/* ./platform/android/java/src/com/google/android/vending/expansion/downloader/* + ./platform/android/java/src/com/google/android/vending/licensing/* ./platform/android/java/src/org/godotengine/godot/input/InputManagerCompat.java ./platform/android/java/src/org/godotengine/godot/input/InputManagerV16.java - ./platform/android/java/src/org/godotengine/godot/input/InputManagerV9.java Comment: The Android Open Source Project Copyright: 2008-2013, The Android Open Source Project License: Apache-2.0 -Files: ./platform/android/cpu-features.c - ./platform/android/cpu-features.h -Comment: The Android Open Source Project -Copyright: 2010, The Android Open Source Project -License: BSD-2-clause - -Files: ./platform/android/ifaddrs_android.cpp - ./platform/android/ifaddrs_android.h -Comment: The Android Open Source Project -Copyright: 2012-2013, Google Inc. -License: BSD-3-clause - Files: ./platform/android/java/src/com/android/vending/licensing/util/Base64.java ./platform/android/java/src/com/android/vending/licensing/util/Base64DecoderException.java Comment: The Android Open Source Project @@ -225,6 +210,12 @@ Comment: The WebM Project Copyright: 2010, The WebM Project authors. License: BSD-3-clause +Files: ./thirdparty/libvpx/third_party/android/cpu-features.c + ./thirdparty/libvpx/third_party/android/cpu-features.h +Comment: The Android Open Source Project +Copyright: 2010, The Android Open Source Project +License: BSD-2-clause + Files: ./thirdparty/libwebp/ Comment: WebP codec Copyright: 2010, Google Inc. @@ -295,6 +286,12 @@ Comment: hq2x implementation Copyright: 2016, Bruno Ribeiro License: Apache-2.0 +Files: ./thirdparty/misc/ifaddrs-android.cc + ./thirdparty/misc/ifaddrs-android.h +Comment: libjingle +Copyright: 2012-2013, Google Inc. +License: BSD-3-clause + Files: ./thirdparty/misc/md5.cpp ./thirdparty/misc/md5.h Comment: MD5 Message Digest Algorithm diff --git a/SConstruct b/SConstruct index 8b7b95a600..f5d9358530 100644 --- a/SConstruct +++ b/SConstruct @@ -21,7 +21,6 @@ active_platforms = [] active_platform_ids = [] platform_exporters = [] platform_apis = [] -global_defaults = [] for x in sorted(glob.glob("platform/*")): if (not os.path.isdir(x) or not os.path.exists(x + "/detect.py")): @@ -35,8 +34,6 @@ for x in sorted(glob.glob("platform/*")): platform_exporters.append(x[9:]) if (os.path.exists(x + "/api/api.cpp")): platform_apis.append(x[9:]) - if (os.path.exists(x + "/globals/global_defaults.cpp")): - global_defaults.append(x[9:]) if (detect.is_active()): active_platforms.append(detect.get_name()) active_platform_ids.append(x) @@ -68,7 +65,6 @@ if 'TERM' in os.environ: env_base['ENV']['TERM'] = os.environ['TERM'] env_base.AppendENVPath('PATH', os.getenv('PATH')) 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_flat_dirs = [] env_base.android_dependencies = [] diff --git a/core/SCsub b/core/SCsub index c6d0b7e5b1..fe379d6936 100644 --- a/core/SCsub +++ b/core/SCsub @@ -8,22 +8,6 @@ from platform_methods import run_in_subprocess env.core_sources = [] -# Generate global defaults -gd_call = "" -gd_inc = "" - -for x in env.global_defaults: - env.core_sources.append("#platform/" + x + "/globals/global_defaults.cpp") - gd_inc += '#include "platform/' + x + '/globals/global_defaults.h"\n' - gd_call += "\tregister_" + x + "_global_defaults();\n" - -gd_cpp = '#include "core/project_settings.h"\n' -gd_cpp += gd_inc -gd_cpp += "void ProjectSettings::register_global_defaults() {\n" + gd_call + "\n}\n" - -with open("global_defaults.gen.cpp", "w") as f: - f.write(gd_cpp) - # Generate AES256 script encryption key import os diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 8641af84d9..6f4561d8e6 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -827,6 +827,10 @@ uint64_t _OS::get_system_time_secs() const { return OS::get_singleton()->get_system_time_secs(); } +uint64_t _OS::get_system_time_msecs() const { + return OS::get_singleton()->get_system_time_msecs(); +} + void _OS::delay_usec(uint32_t p_usec) const { OS::get_singleton()->delay_usec(p_usec); @@ -1182,6 +1186,7 @@ void _OS::_bind_methods() { ClassDB::bind_method(D_METHOD("get_datetime_from_unix_time", "unix_time_val"), &_OS::get_datetime_from_unix_time); ClassDB::bind_method(D_METHOD("get_unix_time_from_datetime", "datetime"), &_OS::get_unix_time_from_datetime); ClassDB::bind_method(D_METHOD("get_system_time_secs"), &_OS::get_system_time_secs); + ClassDB::bind_method(D_METHOD("get_system_time_msecs"), &_OS::get_system_time_msecs); ClassDB::bind_method(D_METHOD("set_icon", "icon"), &_OS::set_icon); diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index 4cdf09d522..39704286b6 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -281,6 +281,7 @@ public: Dictionary get_time_zone_info() const; uint64_t get_unix_time() const; uint64_t get_system_time_secs() const; + uint64_t get_system_time_msecs() const; int get_static_memory_usage() const; int get_static_memory_peak_usage() const; diff --git a/core/os/os.cpp b/core/os/os.cpp index 7547b6a042..ea60a03373 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -61,6 +61,9 @@ uint64_t OS::get_unix_time() const { uint64_t OS::get_system_time_secs() const { return 0; } +uint64_t OS::get_system_time_msecs() const { + return 0; +} void OS::debug_break(){ // something diff --git a/core/os/os.h b/core/os/os.h index 05ec3ac424..046686ff51 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -328,6 +328,7 @@ public: virtual TimeZoneInfo get_time_zone_info() const = 0; virtual uint64_t get_unix_time() const; virtual uint64_t get_system_time_secs() const; + virtual uint64_t get_system_time_msecs() const; virtual void delay_usec(uint32_t p_usec) const = 0; virtual uint64_t get_ticks_usec() const = 0; diff --git a/core/project_settings.h b/core/project_settings.h index f150e4499b..c790669048 100644 --- a/core/project_settings.h +++ b/core/project_settings.h @@ -152,8 +152,6 @@ public: void set_disable_feature_overrides(bool p_disable); - void register_global_defaults(); - bool is_using_datapack() const; void set_registering_order(bool p_enable); diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml index 7e871d68cb..fc27bdbb81 100644 --- a/doc/classes/AcceptDialog.xml +++ b/doc/classes/AcceptDialog.xml @@ -60,7 +60,7 @@ </methods> <members> <member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok"> - If [code]true[/code] the dialog is hidden when the OK button is pressed. You can set it to [code]false[/code] if you want to do e.g. input validation when receiving the [signal confirmed] signal, and handle hiding the dialog in your own logic. Default value: [code]true[/code]. + If [code]true[/code], the dialog is hidden when the OK button is pressed. You can set it to [code]false[/code] if you want to do e.g. input validation when receiving the [signal confirmed] signal, and handle hiding the dialog in your own logic. Default value: [code]true[/code]. Note: Some nodes derived from this class can have a different default value, and potentially their own built-in logic overriding this setting. For example [FileDialog] defaults to [code]false[/code], and has its own input validation code that is called when you press OK, which eventually hides the dialog if the input is valid. As such this property can't be used in [FileDialog] to disable hiding the dialog when pressing OK. </member> <member name="dialog_text" type="String" setter="set_text" getter="get_text"> diff --git a/doc/classes/AnimatedSprite.xml b/doc/classes/AnimatedSprite.xml index a41ed0e689..7f9167c49a 100644 --- a/doc/classes/AnimatedSprite.xml +++ b/doc/classes/AnimatedSprite.xml @@ -40,13 +40,13 @@ The current animation from the [code]frames[/code] resource. If this value changes, the [code]frame[/code] counter is reset. </member> <member name="centered" type="bool" setter="set_centered" getter="is_centered"> - If [code]true[/code] texture will be centered. Default value: [code]true[/code]. + If [code]true[/code], texture will be centered. Default value: [code]true[/code]. </member> <member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h"> - If [code]true[/code] texture is flipped horizontally. Default value: [code]false[/code]. + If [code]true[/code], texture is flipped horizontally. Default value: [code]false[/code]. </member> <member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v"> - If [code]true[/code] texture is flipped vertically. Default value: [code]false[/code]. + If [code]true[/code], texture is flipped vertically. Default value: [code]false[/code]. </member> <member name="frame" type="int" setter="set_frame" getter="get_frame"> The displayed animation frame's index. @@ -58,7 +58,7 @@ The texture's drawing offset. </member> <member name="playing" type="bool" setter="_set_playing" getter="_is_playing"> - If [code]true[/code] the [member animation] is currently playing. + If [code]true[/code], the [member animation] is currently playing. </member> <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale"> </member> diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml index 733d565676..dcc44e2df4 100644 --- a/doc/classes/AnimatedSprite3D.xml +++ b/doc/classes/AnimatedSprite3D.xml @@ -46,7 +46,7 @@ The [SpriteFrames] resource containing the animation(s). </member> <member name="playing" type="bool" setter="_set_playing" getter="_is_playing"> - If [code]true[/code] the [member animation] is currently playing. + If [code]true[/code], the [member animation] is currently playing. </member> </members> <signals> diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index 169fbcd5a8..a7cae709a4 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -513,7 +513,7 @@ <argument index="1" name="interpolation" type="bool"> </argument> <description> - If [code]true[/code] the track at [code]idx[/code] wraps the interpolation loop. + If [code]true[/code], the track at [code]idx[/code] wraps the interpolation loop. </description> </method> <method name="track_set_interpolation_type"> diff --git a/doc/classes/AnimationTreePlayer.xml b/doc/classes/AnimationTreePlayer.xml index a081c64f6d..b0b58fc7bd 100644 --- a/doc/classes/AnimationTreePlayer.xml +++ b/doc/classes/AnimationTreePlayer.xml @@ -607,7 +607,7 @@ </methods> <members> <member name="active" type="bool" setter="set_active" getter="is_active"> - If [code]true[/code] the [code]AnimationTreePlayer[/code] is able to play animations. Default value: [code]false[/code]. + If [code]true[/code], the [code]AnimationTreePlayer[/code] is able to play animations. Default value: [code]false[/code]. </member> <member name="base_path" type="NodePath" setter="set_base_path" getter="get_base_path"> The node from which to relatively access other nodes. Default value: [code]".."[/code]. diff --git a/doc/classes/Area.xml b/doc/classes/Area.xml index 970d09a2ac..04edb97871 100644 --- a/doc/classes/Area.xml +++ b/doc/classes/Area.xml @@ -49,7 +49,7 @@ <argument index="0" name="area" type="Node"> </argument> <description> - If [code]true[/code] the given area overlaps the Area. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. + If [code]true[/code], the given area overlaps the Area. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. </description> </method> <method name="overlaps_body" qualifiers="const"> @@ -58,7 +58,7 @@ <argument index="0" name="body" type="Node"> </argument> <description> - If [code]true[/code] the given body overlaps the Area. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. + If [code]true[/code], the given body overlaps the Area. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. </description> </method> <method name="set_collision_layer_bit"> @@ -92,7 +92,7 @@ The name of the area's audio bus. </member> <member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus"> - If [code]true[/code] the area's audio bus overrides the default audio bus. Default value: [code]false[/code]. + If [code]true[/code], the area's audio bus overrides the default audio bus. Default value: [code]false[/code]. </member> <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer"> The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [code]collision_mask[/code]. @@ -107,7 +107,7 @@ The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance. </member> <member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point"> - If [code]true[/code] gravity is calculated from a point (set via [code]gravity_vec[/code]). Also see [code]space_override[/code]. Default value: [code]false[/code]. + If [code]true[/code], gravity is calculated from a point (set via [code]gravity_vec[/code]). Also see [code]space_override[/code]. Default value: [code]false[/code]. </member> <member name="gravity_vec" type="Vector3" setter="set_gravity_vector" getter="get_gravity_vector"> The area's gravity vector (not normalized). If gravity is a point (see [method is_gravity_a_point]), this will be the point of attraction. @@ -116,10 +116,10 @@ The rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping). </member> <member name="monitorable" type="bool" setter="set_monitorable" getter="is_monitorable"> - If [code]true[/code] other monitoring areas can detect this area. Default value: [code]true[/code]. + If [code]true[/code], other monitoring areas can detect this area. Default value: [code]true[/code]. </member> <member name="monitoring" type="bool" setter="set_monitoring" getter="is_monitoring"> - If [code]true[/code] the area detects bodies or areas entering and exiting it. Default value: [code]true[/code]. + If [code]true[/code], the area detects bodies or areas entering and exiting it. Default value: [code]true[/code]. </member> <member name="priority" type="float" setter="set_priority" getter="get_priority"> The area's priority. Higher priority areas are processed first. Default value: 0. @@ -128,7 +128,7 @@ The degree to which this area applies reverb to its associated audio. Ranges from [code]0[/code] to [code]1[/code] with [code]0.1[/code] precision. </member> <member name="reverb_bus_enable" type="bool" setter="set_use_reverb_bus" getter="is_using_reverb_bus"> - If [code]true[/code] the area applies reverb to its associated audio. + If [code]true[/code], the area applies reverb to its associated audio. </member> <member name="reverb_bus_name" type="String" setter="set_reverb_bus" getter="get_reverb_bus"> The reverb bus name to use for this area's associated audio. diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml index b77a931201..dd0af14b33 100644 --- a/doc/classes/Area2D.xml +++ b/doc/classes/Area2D.xml @@ -49,7 +49,7 @@ <argument index="0" name="area" type="Node"> </argument> <description> - If [code]true[/code] the given area overlaps the Area2D. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. + If [code]true[/code], the given area overlaps the Area2D. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. </description> </method> <method name="overlaps_body" qualifiers="const"> @@ -58,7 +58,7 @@ <argument index="0" name="body" type="Node"> </argument> <description> - If [code]true[/code] the given body overlaps the Area2D. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. + If [code]true[/code], the given body overlaps the Area2D. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. </description> </method> <method name="set_collision_layer_bit"> @@ -92,7 +92,7 @@ The name of the area's audio bus. </member> <member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus"> - If [code]true[/code] the area's audio bus overrides the default audio bus. Default value: [code]false[/code]. + If [code]true[/code], the area's audio bus overrides the default audio bus. Default value: [code]false[/code]. </member> <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer"> The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [code]collision_mask[/code]. @@ -107,7 +107,7 @@ The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance. </member> <member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point"> - If [code]true[/code] gravity is calculated from a point (set via [code]gravity_vec[/code]). Also see [code]space_override[/code]. Default value: [code]false[/code]. + If [code]true[/code], gravity is calculated from a point (set via [code]gravity_vec[/code]). Also see [code]space_override[/code]. Default value: [code]false[/code]. </member> <member name="gravity_vec" type="Vector2" setter="set_gravity_vector" getter="get_gravity_vector"> The area's gravity vector (not normalized). If gravity is a point (see [method is_gravity_a_point]), this will be the point of attraction. @@ -116,10 +116,10 @@ The rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping). </member> <member name="monitorable" type="bool" setter="set_monitorable" getter="is_monitorable"> - If [code]true[/code] other monitoring areas can detect this area. Default value: [code]true[/code]. + If [code]true[/code], other monitoring areas can detect this area. Default value: [code]true[/code]. </member> <member name="monitoring" type="bool" setter="set_monitoring" getter="is_monitoring"> - If [code]true[/code] the area detects bodies or areas entering and exiting it. Default value: [code]true[/code]. + If [code]true[/code], the area detects bodies or areas entering and exiting it. Default value: [code]true[/code]. </member> <member name="priority" type="float" setter="set_priority" getter="get_priority"> The area's priority. Higher priority areas are processed first. Default value: 0. diff --git a/doc/classes/AtlasTexture.xml b/doc/classes/AtlasTexture.xml index 409c40e809..3f5eb892af 100644 --- a/doc/classes/AtlasTexture.xml +++ b/doc/classes/AtlasTexture.xml @@ -18,7 +18,7 @@ The texture that contains the atlas. Can be any [Texture] subtype. </member> <member name="filter_clip" type="bool" setter="set_filter_clip" getter="has_filter_clip"> - If [code]true[/code] clips the area outside of the region to avoid bleeding of the surrounding texture pixels. + If [code]true[/code], clips the area outside of the region to avoid bleeding of the surrounding texture pixels. </member> <member name="margin" type="Rect2" setter="set_margin" getter="get_margin"> The margin around the region. The [Rect2]'s 'size' parameter ('w' and 'h' in the editor) resizes the texture so it fits within the margin. diff --git a/doc/classes/AudioEffectDelay.xml b/doc/classes/AudioEffectDelay.xml index 7c9d11111c..872b94a0cd 100644 --- a/doc/classes/AudioEffectDelay.xml +++ b/doc/classes/AudioEffectDelay.xml @@ -18,7 +18,7 @@ Output percent of original sound. At 0, only delayed sounds are output. Value can range from 0 to 1. Default value: [code]1[/code]. </member> <member name="feedback/active" type="bool" setter="set_feedback_active" getter="is_feedback_active"> - If [code]true[/code] feedback is enabled. Default value: [code]false[/code]. + If [code]true[/code], feedback is enabled. Default value: [code]false[/code]. </member> <member name="feedback/delay_ms" type="float" setter="set_feedback_delay_ms" getter="get_feedback_delay_ms"> Feedback delay time in milliseconds. Default value: [code]340[/code]. diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml index e1939e679d..96f02137cf 100644 --- a/doc/classes/AudioServer.xml +++ b/doc/classes/AudioServer.xml @@ -187,7 +187,7 @@ <argument index="0" name="bus_idx" type="int"> </argument> <description> - If [code]true[/code] the bus at index [code]bus_idx[/code] is bypassing effects. + If [code]true[/code], the bus at index [code]bus_idx[/code] is bypassing effects. </description> </method> <method name="is_bus_effect_enabled" qualifiers="const"> @@ -198,7 +198,7 @@ <argument index="1" name="effect_idx" type="int"> </argument> <description> - If [code]true[/code] the effect at index [code]effect_idx[/code] on the bus at index [code]bus_idx[/code] is enabled. + If [code]true[/code], the effect at index [code]effect_idx[/code] on the bus at index [code]bus_idx[/code] is enabled. </description> </method> <method name="is_bus_mute" qualifiers="const"> @@ -207,7 +207,7 @@ <argument index="0" name="bus_idx" type="int"> </argument> <description> - If [code]true[/code] the bus at index [code]bus_idx[/code] is muted. + If [code]true[/code], the bus at index [code]bus_idx[/code] is muted. </description> </method> <method name="is_bus_solo" qualifiers="const"> @@ -216,7 +216,7 @@ <argument index="0" name="bus_idx" type="int"> </argument> <description> - If [code]true[/code] the bus at index [code]bus_idx[/code] is in solo mode. + If [code]true[/code], the bus at index [code]bus_idx[/code] is in solo mode. </description> </method> <method name="lock"> @@ -265,7 +265,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> - If [code]true[/code] the bus at index [code]bus_idx[/code] is bypassing effects. + If [code]true[/code], the bus at index [code]bus_idx[/code] is bypassing effects. </description> </method> <method name="set_bus_count"> @@ -287,7 +287,7 @@ <argument index="2" name="enabled" type="bool"> </argument> <description> - If [code]true[/code] the effect at index [code]effect_idx[/code] on the bus at index [code]bus_idx[/code] is enabled. + If [code]true[/code], the effect at index [code]effect_idx[/code] on the bus at index [code]bus_idx[/code] is enabled. </description> </method> <method name="set_bus_layout"> @@ -307,7 +307,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> - If [code]true[/code] the bus at index [code]bus_idx[/code] is muted. + If [code]true[/code], the bus at index [code]bus_idx[/code] is muted. </description> </method> <method name="set_bus_name"> @@ -340,7 +340,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> - If [code]true[/code] the bus at index [code]bus_idx[/code] is in solo mode. + If [code]true[/code], the bus at index [code]bus_idx[/code] is in solo mode. </description> </method> <method name="set_bus_volume_db"> diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml index be4e4f137a..e04a808f34 100644 --- a/doc/classes/AudioStreamPlayer.xml +++ b/doc/classes/AudioStreamPlayer.xml @@ -48,7 +48,7 @@ </methods> <members> <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled"> - If [code]true[/code] audio plays when added to scene tree. Default value: [code]false[/code]. + If [code]true[/code], audio plays when added to scene tree. Default value: [code]false[/code]. </member> <member name="bus" type="String" setter="set_bus" getter="get_bus"> Bus on which this audio is playing. @@ -60,7 +60,7 @@ Changes the pitch and the tempo of the audio. </member> <member name="playing" type="bool" setter="_set_playing" getter="is_playing"> - If [code]true[/code] audio is playing. + If [code]true[/code], audio is playing. </member> <member name="stream" type="AudioStream" setter="set_stream" getter="get_stream"> The [AudioStream] object to be played. diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml index 3b81894c14..2051675488 100644 --- a/doc/classes/AudioStreamPlayer2D.xml +++ b/doc/classes/AudioStreamPlayer2D.xml @@ -54,7 +54,7 @@ Dampens audio over distance with this as an exponent. </member> <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled"> - If [code]true[/code] audio plays when added to scene tree. Default value: [code]false[/code]. + If [code]true[/code], audio plays when added to scene tree. Default value: [code]false[/code]. </member> <member name="bus" type="String" setter="set_bus" getter="get_bus"> Bus on which this audio is playing. @@ -66,7 +66,7 @@ Changes the pitch and the tempo of the audio. </member> <member name="playing" type="bool" setter="_set_playing" getter="is_playing"> - If [code]true[/code] audio is playing. + If [code]true[/code], audio is playing. </member> <member name="stream" type="AudioStream" setter="set_stream" getter="get_stream"> The [AudioStream] object to be played. diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml index 5841f1f6dc..c7c9f4df9b 100644 --- a/doc/classes/AudioStreamPlayer3D.xml +++ b/doc/classes/AudioStreamPlayer3D.xml @@ -60,7 +60,7 @@ Decides if audio should get quieter with distance linearly, quadratically or logarithmically. </member> <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled"> - If [code]true[/code] audio plays when added to scene tree. Default value: [code]false[/code]. + If [code]true[/code], audio plays when added to scene tree. Default value: [code]false[/code]. </member> <member name="bus" type="String" setter="set_bus" getter="get_bus"> Bus on which this audio is playing. @@ -72,7 +72,7 @@ The angle in which the audio reaches cameras undampened. </member> <member name="emission_angle_enabled" type="bool" setter="set_emission_angle_enabled" getter="is_emission_angle_enabled"> - If [code]true[/code] the audio should be dampened according to the direction of the sound. + If [code]true[/code], the audio should be dampened according to the direction of the sound. </member> <member name="emission_angle_filter_attenuation_db" type="float" setter="set_emission_angle_filter_attenuation_db" getter="get_emission_angle_filter_attenuation_db"> dampens audio if camera is outside of 'emission_angle_degrees' and 'emission_angle_enabled' is set by this factor, in dB. diff --git a/doc/classes/BakedLightmap.xml b/doc/classes/BakedLightmap.xml index 8e27dc8d5d..d376bf667f 100644 --- a/doc/classes/BakedLightmap.xml +++ b/doc/classes/BakedLightmap.xml @@ -39,7 +39,7 @@ Size of affected area. </member> <member name="bake_hdr" type="bool" setter="set_hdr" getter="is_hdr"> - If [code]true[/code] lightmap can capture light values greater than [code]1.0[/code]. Turning this off will result in a smaller lightmap. Default value:[code]false[/code]. + If [code]true[/code], lightmap can capture light values greater than [code]1.0[/code]. Turning this off will result in a smaller lightmap. Default value:[code]false[/code]. </member> <member name="bake_mode" type="int" setter="set_bake_mode" getter="get_bake_mode" enum="BakedLightmap.BakeMode"> Lightmapping mode. See [enum BakeMode]. diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml index 9c0459511c..8798ca5274 100644 --- a/doc/classes/BaseButton.xml +++ b/doc/classes/BaseButton.xml @@ -51,7 +51,7 @@ To allow both left-click and right-click, set this to 3, because it's BUTTON_MASK_LEFT | BUTTON_MASK_RIGHT. </member> <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled"> - If [code]true[/code] the button is in disabled state and can't be clicked or toggled. + If [code]true[/code], the button is in disabled state and can't be clicked or toggled. </member> <member name="enabled_focus_mode" type="int" setter="set_enabled_focus_mode" getter="get_enabled_focus_mode" enum="Control.FocusMode"> Focus access mode to use when switching between enabled/disabled (see [method Control.set_focus_mode] and [member disabled]). @@ -60,16 +60,16 @@ [ButtonGroup] associated to the button. </member> <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed"> - If [code]true[/code] the button's state is pressed. Means the button is pressed down or toggled (if toggle_mode is active). + If [code]true[/code], the button's state is pressed. Means the button is pressed down or toggled (if toggle_mode is active). </member> <member name="shortcut" type="ShortCut" setter="set_shortcut" getter="get_shortcut"> [Shortcut] associated to the button. </member> <member name="shortcut_in_tooltip" type="bool" setter="set_shortcut_in_tooltip" getter="is_shortcut_in_tooltip_enabled"> - If [code]true[/code] the button will add information about its shortcut in the tooltip. + If [code]true[/code], the button will add information about its shortcut in the tooltip. </member> <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode"> - If [code]true[/code] the button is in toggle mode. Makes the button flip state between pressed and unpressed each time its area is clicked. + If [code]true[/code], the button is in toggle mode. Makes the button flip state between pressed and unpressed each time its area is clicked. </member> </members> <signals> diff --git a/doc/classes/BitmapFont.xml b/doc/classes/BitmapFont.xml index c943caf636..8ed563be5b 100644 --- a/doc/classes/BitmapFont.xml +++ b/doc/classes/BitmapFont.xml @@ -110,7 +110,7 @@ Ascent (number of pixels above the baseline). </member> <member name="distance_field" type="bool" setter="set_distance_field_hint" getter="is_distance_field_hint"> - If [code]true[/code] distance field hint is enabled. + If [code]true[/code], distance field hint is enabled. </member> <member name="fallback" type="BitmapFont" setter="set_fallback" getter="get_fallback"> The fallback font. diff --git a/doc/classes/Camera.xml b/doc/classes/Camera.xml index c7eb365891..f4b1bc1519 100644 --- a/doc/classes/Camera.xml +++ b/doc/classes/Camera.xml @@ -138,7 +138,7 @@ The culling mask that describes which 3D render layers are rendered by this camera. </member> <member name="current" type="bool" setter="set_current" getter="is_current"> - If [code]true[/code] the ancestor [Viewport] is currently using this Camera. Default value: [code]false[/code]. + If [code]true[/code], the ancestor [Viewport] is currently using this Camera. Default value: [code]false[/code]. </member> <member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="Camera.DopplerTracking"> If not [code]DOPPLER_TRACKING_DISABLED[/code] this Camera will simulate the Doppler effect for objects changed in particular [code]_process[/code] methods. Default value: [code]DOPPLER_TRACKING_DISABLED[/code]. diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml index 39cc1b84b3..4e9efaea2d 100644 --- a/doc/classes/Camera2D.xml +++ b/doc/classes/Camera2D.xml @@ -68,7 +68,7 @@ The Camera2D's anchor point. See [code]ANCHOR_MODE_*[/code] constants. </member> <member name="current" type="bool" setter="_set_current" getter="is_current"> - If [code]true[/code] the camera is the active camera for the current scene. Only one camera can be current, so setting a different camera [code]current[/code] will disable this one. + If [code]true[/code], the camera is the active camera for the current scene. Only one camera can be current, so setting a different camera [code]current[/code] will disable this one. </member> <member name="custom_viewport" type="Node" setter="set_custom_viewport" getter="get_custom_viewport"> The custom [Viewport] node attached to the [code]Camera2D[/code]. If null or not a [Viewport], uses the default viewport instead. @@ -77,7 +77,7 @@ Bottom margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen. </member> <member name="drag_margin_h_enabled" type="bool" setter="set_h_drag_enabled" getter="is_h_drag_enabled"> - If [code]true[/code] the camera only moves when reaching the horizontal drag margins. If [code]false[/code] the camera moves horizontally regardless of margins. Default value: [code]true[/code]. + If [code]true[/code], the camera only moves when reaching the horizontal drag margins. If [code]false[/code], the camera moves horizontally regardless of margins. Default value: [code]true[/code]. </member> <member name="drag_margin_left" type="float" setter="set_drag_margin" getter="get_drag_margin"> Left margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen. @@ -89,16 +89,16 @@ Top margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen. </member> <member name="drag_margin_v_enabled" type="bool" setter="set_v_drag_enabled" getter="is_v_drag_enabled"> - If [code]true[/code] the camera only moves when reaching the vertical drag margins. If [code]false[/code] the camera moves vertically regardless of margins. Default value: [code]true[/code]. + If [code]true[/code], the camera only moves when reaching the vertical drag margins. If [code]false[/code], the camera moves vertically regardless of margins. Default value: [code]true[/code]. </member> <member name="editor_draw_drag_margin" type="bool" setter="set_margin_drawing_enabled" getter="is_margin_drawing_enabled"> - If [code]true[/code] draws the camera's drag margin rectangle in the editor. Default value: [code]false[/code] + If [code]true[/code], draws the camera's drag margin rectangle in the editor. Default value: [code]false[/code] </member> <member name="editor_draw_limits" type="bool" setter="set_limit_drawing_enabled" getter="is_limit_drawing_enabled"> - If [code]true[/code] draws the camera's limits rectangle in the editor. Default value: [code]true[/code] + If [code]true[/code], draws the camera's limits rectangle in the editor. Default value: [code]true[/code] </member> <member name="editor_draw_screen" type="bool" setter="set_screen_drawing_enabled" getter="is_screen_drawing_enabled"> - If [code]true[/code] draws the camera's screen rectangle in the editor. Default value: [code]false[/code] + If [code]true[/code], draws the camera's screen rectangle in the editor. Default value: [code]false[/code] </member> <member name="limit_bottom" type="int" setter="set_limit" getter="get_limit"> Bottom scroll limit in pixels. The camera stops moving when reaching this value. @@ -110,7 +110,7 @@ Right scroll limit in pixels. The camera stops moving when reaching this value. </member> <member name="limit_smoothed" type="bool" setter="set_limit_smoothing_enabled" getter="is_limit_smoothing_enabled"> - If [code]true[/code] the camera smoothly stops when reaches its limits. Default value: [code]false[/code] + If [code]true[/code], the camera smoothly stops when reaches its limits. Default value: [code]false[/code] </member> <member name="limit_top" type="int" setter="set_limit" getter="get_limit"> Top scroll limit in pixels. The camera stops moving when reaching this value. @@ -125,10 +125,10 @@ The vertical offset of the camera, relative to the drag margins. Default value: [code]0[/code] </member> <member name="rotating" type="bool" setter="set_rotating" getter="is_rotating"> - If [code]true[/code] the camera rotates with the target. Default value: [code]false[/code] + If [code]true[/code], the camera rotates with the target. Default value: [code]false[/code] </member> <member name="smoothing_enabled" type="bool" setter="set_enable_follow_smoothing" getter="is_follow_smoothing_enabled"> - If [code]true[/code] the camera smoothly moves towards the target at [member smoothing_speed]. Default value: [code]false[/code] + If [code]true[/code], the camera smoothly moves towards the target at [member smoothing_speed]. Default value: [code]false[/code] </member> <member name="smoothing_speed" type="float" setter="set_follow_smoothing" getter="get_follow_smoothing"> Speed in pixels per second of the camera's smoothing effect when [member smoothing_enabled] is [code]true[/code] diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 898fce78c4..0ec28f93a7 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -522,16 +522,16 @@ The color applied to textures on this [code]CanvasItem[/code]. This is not inherited by children [code]CanvasItem[/code]s. Default value: [code]Color(1, 1, 1, 1)[/code] (opaque "white").. </member> <member name="show_behind_parent" type="bool" setter="set_draw_behind_parent" getter="is_draw_behind_parent_enabled"> - If [code]true[/code] the object draws behind its parent. Default value: [code]false[/code]. + If [code]true[/code], the object draws behind its parent. Default value: [code]false[/code]. </member> <member name="show_on_top" type="bool" setter="_set_on_top" getter="_is_on_top"> - If [code]true[/code] the object draws on top of its parent. Default value: [code]true[/code]. + If [code]true[/code], the object draws on top of its parent. Default value: [code]true[/code]. </member> <member name="use_parent_material" type="bool" setter="set_use_parent_material" getter="get_use_parent_material"> - If [code]true[/code] the parent [code]CanvasItem[/code]'s [member material] property is used as this one's material. Default value: [code]false[/code]. + If [code]true[/code], the parent [code]CanvasItem[/code]'s [member material] property is used as this one's material. Default value: [code]false[/code]. </member> <member name="visible" type="bool" setter="set_visible" getter="is_visible"> - If [code]true[/code] this [code]CanvasItem[/code] is drawn. Default value: [code]true[/code]. For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple popup*() functions instead. + If [code]true[/code], this [code]CanvasItem[/code] is drawn. Default value: [code]true[/code]. For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple popup*() functions instead. </member> </members> <signals> diff --git a/doc/classes/CenterContainer.xml b/doc/classes/CenterContainer.xml index 41c8cf7100..93c4208765 100644 --- a/doc/classes/CenterContainer.xml +++ b/doc/classes/CenterContainer.xml @@ -14,7 +14,7 @@ </methods> <members> <member name="use_top_left" type="bool" setter="set_use_top_left" getter="is_using_top_left"> - If [code]true[/code] centers children relative to the [code]CenterContainer[/code]'s top left corner. Default value: [code]false[/code]. + If [code]true[/code], centers children relative to the [code]CenterContainer[/code]'s top left corner. Default value: [code]false[/code]. </member> </members> <constants> diff --git a/doc/classes/CollisionObject.xml b/doc/classes/CollisionObject.xml index 5e4e740498..f702fbadbb 100644 --- a/doc/classes/CollisionObject.xml +++ b/doc/classes/CollisionObject.xml @@ -57,7 +57,7 @@ <argument index="0" name="owner_id" type="int"> </argument> <description> - If [code]true[/code] the shape owner and its shapes are disabled. + If [code]true[/code], the shape owner and its shapes are disabled. </description> </method> <method name="remove_shape_owner"> @@ -166,7 +166,7 @@ <argument index="1" name="disabled" type="bool"> </argument> <description> - If [code]true[/code] disables the given shape owner. + If [code]true[/code], disables the given shape owner. </description> </method> <method name="shape_owner_set_transform"> @@ -183,10 +183,10 @@ </methods> <members> <member name="input_capture_on_drag" type="bool" setter="set_capture_input_on_drag" getter="get_capture_input_on_drag"> - If [code]true[/code] the [code]CollisionObject[/code] will continue to receive input events as the mouse is dragged across its shapes. Default value: [code]false[/code]. + If [code]true[/code], the [code]CollisionObject[/code] will continue to receive input events as the mouse is dragged across its shapes. Default value: [code]false[/code]. </member> <member name="input_ray_pickable" type="bool" setter="set_ray_pickable" getter="is_ray_pickable"> - If [code]true[/code] the [CollisionObject]'s shapes will respond to [RayCast]s. Default value: [code]true[/code]. + If [code]true[/code], the [CollisionObject]'s shapes will respond to [RayCast]s. Default value: [code]true[/code]. </member> </members> <signals> diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml index b507204f0d..48a198b248 100644 --- a/doc/classes/CollisionObject2D.xml +++ b/doc/classes/CollisionObject2D.xml @@ -53,7 +53,7 @@ <argument index="0" name="owner_id" type="int"> </argument> <description> - If [code]true[/code] the shape owner and its shapes are disabled. + If [code]true[/code], the shape owner and its shapes are disabled. </description> </method> <method name="is_shape_owner_one_way_collision_enabled" qualifiers="const"> @@ -171,7 +171,7 @@ <argument index="1" name="disabled" type="bool"> </argument> <description> - If [code]true[/code] disables the given shape owner. + If [code]true[/code], disables the given shape owner. </description> </method> <method name="shape_owner_set_one_way_collision"> @@ -199,7 +199,7 @@ </methods> <members> <member name="input_pickable" type="bool" setter="set_pickable" getter="is_pickable"> - If [code]true[/code] this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. + If [code]true[/code], this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. </member> </members> <signals> diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml index 5b940e7ff1..f63adbf71a 100644 --- a/doc/classes/CollisionPolygon2D.xml +++ b/doc/classes/CollisionPolygon2D.xml @@ -17,10 +17,10 @@ Collision build mode. Use one of the [code]BUILD_*[/code] constants. Default value: [code]BUILD_SOLIDS[/code]. </member> <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled"> - If [code]true[/code] no collisions will be detected. + If [code]true[/code], no collisions will be detected. </member> <member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled"> - If [code]true[/code] only edges that face up, relative to CollisionPolygon2D's rotation, will collide with other objects. + If [code]true[/code], only edges that face up, relative to CollisionPolygon2D's rotation, will collide with other objects. </member> <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon"> The polygon's list of vertices. The final point will be connected to the first. diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml index b3a0164704..dfe0492d0b 100644 --- a/doc/classes/ColorPicker.xml +++ b/doc/classes/ColorPicker.xml @@ -42,13 +42,13 @@ The currently selected color. </member> <member name="deferred_mode" type="bool" setter="set_deferred_mode" getter="is_deferred_mode"> - If [code]true[/code] the color will apply only after the user releases the mouse button, otherwise it will apply immediately even in mouse motion event (which can cause performance issues). + If [code]true[/code], the color will apply only after the user releases the mouse button, otherwise it will apply immediately even in mouse motion event (which can cause performance issues). </member> <member name="edit_alpha" type="bool" setter="set_edit_alpha" getter="is_editing_alpha"> - If [code]true[/code] shows an alpha channel slider (transparency). + If [code]true[/code], shows an alpha channel slider (transparency). </member> <member name="raw_mode" type="bool" setter="set_raw_mode" getter="is_raw_mode"> - If [code]true[/code] allows the color R, G, B component values to go beyond 1.0, which can be used for certain special operations that require it (like tinting without darkening or rendering sprites in HDR). + If [code]true[/code], allows the color R, G, B component values to go beyond 1.0, which can be used for certain special operations that require it (like tinting without darkening or rendering sprites in HDR). </member> </members> <signals> diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml index 8bc6d05bd4..e1a6290161 100644 --- a/doc/classes/ColorPickerButton.xml +++ b/doc/classes/ColorPickerButton.xml @@ -31,7 +31,7 @@ The currently selected color. </member> <member name="edit_alpha" type="bool" setter="set_edit_alpha" getter="is_editing_alpha"> - If [code]true[/code] the alpha channel in the displayed [ColorPicker] will be visible. Default value: [code]true[/code]. + If [code]true[/code], the alpha channel in the displayed [ColorPicker] will be visible. Default value: [code]true[/code]. </member> </members> <signals> diff --git a/doc/classes/DirectionalLight.xml b/doc/classes/DirectionalLight.xml index 86c8f2f03a..63d686fe24 100644 --- a/doc/classes/DirectionalLight.xml +++ b/doc/classes/DirectionalLight.xml @@ -18,7 +18,7 @@ Amount of extra bias for shadow splits that are far away. If self shadowing occurs only on the splits far away, this value can fix them. </member> <member name="directional_shadow_blend_splits" type="bool" setter="set_blend_splits" getter="is_blend_splits_enabled"> - If [code]true[/code] shadow detail is sacrificed in exchange for smoother transitions between splits. Default value:[code]false[/code]. + If [code]true[/code], shadow detail is sacrificed in exchange for smoother transitions between splits. Default value:[code]false[/code]. </member> <member name="directional_shadow_depth_range" type="int" setter="set_shadow_depth_range" getter="get_shadow_depth_range" enum="DirectionalLight.ShadowDepthRange"> Optimizes shadow rendering for detail versus movement. See [enum ShadowDepthRange]. diff --git a/doc/classes/DynamicFont.xml b/doc/classes/DynamicFont.xml index 2e2904c16c..249d0955f2 100644 --- a/doc/classes/DynamicFont.xml +++ b/doc/classes/DynamicFont.xml @@ -81,10 +81,10 @@ The font size. </member> <member name="use_filter" type="bool" setter="set_use_filter" getter="get_use_filter"> - If [code]true[/code] filtering is used. + If [code]true[/code], filtering is used. </member> <member name="use_mipmaps" type="bool" setter="set_use_mipmaps" getter="get_use_mipmaps"> - If [code]true[/code] mipmapping is used. + If [code]true[/code], mipmapping is used. </member> </members> <constants> diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml index fed9e264db..fc5a26fc33 100644 --- a/doc/classes/EditorFileDialog.xml +++ b/doc/classes/EditorFileDialog.xml @@ -55,7 +55,7 @@ The file system path in the address bar. </member> <member name="disable_overwrite_warning" type="bool" setter="set_disable_overwrite_warning" getter="is_overwrite_warning_disabled"> - If [code]true[/code] the [code]EditorFileDialog[/code] will not warn the user before overwriting files. + If [code]true[/code], the [code]EditorFileDialog[/code] will not warn the user before overwriting files. </member> <member name="display_mode" type="int" setter="set_display_mode" getter="get_display_mode" enum="EditorFileDialog.DisplayMode"> The view format in which the [code]EditorFileDialog[/code] displays resources to the user. @@ -64,7 +64,7 @@ The purpose of the [code]EditorFileDialog[/code]. Changes allowed behaviors. </member> <member name="show_hidden_files" type="bool" setter="set_show_hidden_files" getter="is_showing_hidden_files"> - If [code]true[/code] hidden files and directories will be visible in the [code]EditorFileDialog[/code]. + If [code]true[/code], hidden files and directories will be visible in the [code]EditorFileDialog[/code]. </member> </members> <signals> diff --git a/doc/classes/File.xml b/doc/classes/File.xml index 058bb09090..1967349546 100644 --- a/doc/classes/File.xml +++ b/doc/classes/File.xml @@ -404,7 +404,7 @@ </methods> <members> <member name="endian_swap" type="bool" setter="set_endian_swap" getter="get_endian_swap"> - If [code]true[/code] the file's endianness is swapped. Use this if you're dealing with files written in big endian machines. + If [code]true[/code], the file's endianness is swapped. Use this if you're dealing with files written in big endian machines. Note that this is about the file format, not CPU type. This is always reset to [code]false[/code] whenever you open the file. </member> </members> diff --git a/doc/classes/Generic6DOFJoint.xml b/doc/classes/Generic6DOFJoint.xml index b6ac69e257..95f9a76662 100644 --- a/doc/classes/Generic6DOFJoint.xml +++ b/doc/classes/Generic6DOFJoint.xml @@ -18,7 +18,7 @@ The lower, the longer an impulse from one side takes to travel to the other side. </member> <member name="angular_limit_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x"> - If [code]true[/code] rotation across the x-axis is limited. + If [code]true[/code], rotation across the x-axis is limited. </member> <member name="angular_limit_x/erp" type="float" setter="set_param_x" getter="get_param_x"> When rotating across x-axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. @@ -42,7 +42,7 @@ The amount of rotational damping across the y-axis. The lower, the more dampening occurs. </member> <member name="angular_limit_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y"> - If [code]true[/code] rotation across the y-axis is limited. + If [code]true[/code], rotation across the y-axis is limited. </member> <member name="angular_limit_y/erp" type="float" setter="set_param_y" getter="get_param_y"> When rotating across y-axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. @@ -66,7 +66,7 @@ The amount of rotational damping across the z-axis. The lower, the more dampening occurs. </member> <member name="angular_limit_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z"> - If [code]true[/code] rotation across the z-axis is limited. + If [code]true[/code], rotation across the z-axis is limited. </member> <member name="angular_limit_z/erp" type="float" setter="set_param_z" getter="get_param_z"> When rotating across z-axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. @@ -87,7 +87,7 @@ The minimum rotation in positive direction to break loose and rotate around the z-axis. </member> <member name="angular_motor_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x"> - If [code]true[/code] a rotating motor at the x-axis is enabled. + If [code]true[/code], a rotating motor at the x-axis is enabled. </member> <member name="angular_motor_x/force_limit" type="float" setter="set_param_x" getter="get_param_x"> Maximum acceleration for the motor at the x-axis. @@ -96,7 +96,7 @@ Target speed for the motor at the x-axis. </member> <member name="angular_motor_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y"> - If [code]true[/code] a rotating motor at the y-axis is enabled. + If [code]true[/code], a rotating motor at the y-axis is enabled. </member> <member name="angular_motor_y/force_limit" type="float" setter="set_param_y" getter="get_param_y"> Maximum acceleration for the motor at the y-axis. @@ -105,7 +105,7 @@ Target speed for the motor at the y-axis. </member> <member name="angular_motor_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z"> - If [code]true[/code] a rotating motor at the z-axis is enabled. + If [code]true[/code], a rotating motor at the z-axis is enabled. </member> <member name="angular_motor_z/force_limit" type="float" setter="set_param_z" getter="get_param_z"> Maximum acceleration for the motor at the z-axis. @@ -141,7 +141,7 @@ The amount of damping that happens at the x-motion. </member> <member name="linear_limit_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x"> - If [code]true[/code] the linear motion across the x-axis is limited. + If [code]true[/code], the linear motion across the x-axis is limited. </member> <member name="linear_limit_x/lower_distance" type="float" setter="set_param_x" getter="get_param_x"> The minimum difference between the pivot points' x-axis. @@ -159,7 +159,7 @@ The amount of damping that happens at the y-motion. </member> <member name="linear_limit_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y"> - If [code]true[/code] the linear motion across the y-axis is limited. + If [code]true[/code], the linear motion across the y-axis is limited. </member> <member name="linear_limit_y/lower_distance" type="float" setter="set_param_y" getter="get_param_y"> The minimum difference between the pivot points' y-axis. @@ -177,7 +177,7 @@ The amount of damping that happens at the z-motion. </member> <member name="linear_limit_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z"> - If [code]true[/code] the linear motion across the z-axis is limited. + If [code]true[/code], the linear motion across the z-axis is limited. </member> <member name="linear_limit_z/lower_distance" type="float" setter="set_param_z" getter="get_param_z"> The minimum difference between the pivot points' z-axis. @@ -192,7 +192,7 @@ The maximum difference between the pivot points' z-axis. </member> <member name="linear_motor_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x"> - If [code]true[/code] then there is a linear motor on the x-axis. It will attempt to reach the target velocity while staying within the force limits. + If [code]true[/code], then there is a linear motor on the x-axis. It will attempt to reach the target velocity while staying within the force limits. </member> <member name="linear_motor_x/force_limit" type="float" setter="set_param_x" getter="get_param_x"> The maximum force the linear motor can apply on the x-axis while trying to reach the target velocity. @@ -201,7 +201,7 @@ The speed that the linear motor will attempt to reach on the x-axis. </member> <member name="linear_motor_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y"> - If [code]true[/code] then there is a linear motor on the y-axis. It will attempt to reach the target velocity while staying within the force limits. + If [code]true[/code], then there is a linear motor on the y-axis. It will attempt to reach the target velocity while staying within the force limits. </member> <member name="linear_motor_y/force_limit" type="float" setter="set_param_y" getter="get_param_y"> The maximum force the linear motor can apply on the y-axis while trying to reach the target velocity. @@ -210,7 +210,7 @@ The speed that the linear motor will attempt to reach on the y-axis. </member> <member name="linear_motor_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z"> - If [code]true[/code] then there is a linear motor on the z-axis. It will attempt to reach the target velocity while staying within the force limits. + If [code]true[/code], then there is a linear motor on the z-axis. It will attempt to reach the target velocity while staying within the force limits. </member> <member name="linear_motor_z/force_limit" type="float" setter="set_param_z" getter="get_param_z"> The maximum force the linear motor can apply on the z-axis while trying to reach the target velocity. diff --git a/doc/classes/GeometryInstance.xml b/doc/classes/GeometryInstance.xml index 8831805dde..d6267044f7 100644 --- a/doc/classes/GeometryInstance.xml +++ b/doc/classes/GeometryInstance.xml @@ -36,7 +36,7 @@ If there is a material in material_override, it will be used instead of any material set in any material slot of the mesh. </member> <member name="use_in_baked_light" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code] this GeometryInstance will be used when baking lights using a [GIProbe] and/or any other form of baked lighting. + If [code]true[/code], this GeometryInstance will be used when baking lights using a [GIProbe] and/or any other form of baked lighting. </member> </members> <constants> diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml index 3172a5d6c0..5436e2b1eb 100644 --- a/doc/classes/HTTPClient.xml +++ b/doc/classes/HTTPClient.xml @@ -82,14 +82,14 @@ <return type="bool"> </return> <description> - If [code]true[/code] this [code]HTTPClient[/code] has a response available. + If [code]true[/code], this [code]HTTPClient[/code] has a response available. </description> </method> <method name="is_response_chunked" qualifiers="const"> <return type="bool"> </return> <description> - If [code]true[/code] this [code]HTTPClient[/code] has a response that is chunked. + If [code]true[/code], this [code]HTTPClient[/code] has a response that is chunked. </description> </method> <method name="poll"> diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml index 3916eb2b5b..b7244826de 100644 --- a/doc/classes/HTTPRequest.xml +++ b/doc/classes/HTTPRequest.xml @@ -71,7 +71,7 @@ Maximum number of allowed redirects. </member> <member name="use_threads" type="bool" setter="set_use_threads" getter="is_using_threads"> - If [code]true[/code] multithreading is used to improve performance. + If [code]true[/code], multithreading is used to improve performance. </member> </members> <signals> diff --git a/doc/classes/HingeJoint.xml b/doc/classes/HingeJoint.xml index 3c5719056b..41d3b2311d 100644 --- a/doc/classes/HingeJoint.xml +++ b/doc/classes/HingeJoint.xml @@ -17,7 +17,7 @@ The speed with which the rotation across the axis perpendicular to the hinge gets corrected. </member> <member name="angular_limit/enable" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code] the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects. + If [code]true[/code], the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects. </member> <member name="angular_limit/lower" type="float" setter="_set_lower_limit" getter="_get_lower_limit"> The minimum rotation. only active if [member angular_limit/enable] is [code]true[/code]. @@ -71,7 +71,7 @@ End flag of PARAM_* constants, used internally. </constant> <constant name="FLAG_USE_LIMIT" value="0" enum="Flag"> - If [code]true[/code] the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects. + If [code]true[/code], the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects. </constant> <constant name="FLAG_ENABLE_MOTOR" value="1" enum="Flag"> When activated, a motor turns the hinge. diff --git a/doc/classes/InputEventAction.xml b/doc/classes/InputEventAction.xml index 8a10dc6ab9..bd0d774180 100644 --- a/doc/classes/InputEventAction.xml +++ b/doc/classes/InputEventAction.xml @@ -18,7 +18,7 @@ The action's name. Actions are accessed via this [String]. </member> <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed"> - If [code]true[/code] the action's state is pressed. If [code]false[/code] the action's state is released. + If [code]true[/code], the action's state is pressed. If [code]false[/code], the action's state is released. </member> </members> <constants> diff --git a/doc/classes/InputEventJoypadButton.xml b/doc/classes/InputEventJoypadButton.xml index 18e33c2131..1875ea508a 100644 --- a/doc/classes/InputEventJoypadButton.xml +++ b/doc/classes/InputEventJoypadButton.xml @@ -18,7 +18,7 @@ Button identifier. One of the [code]JOY_BUTTON_*[/code] constants from [@GlobalScope]. </member> <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed"> - If [code]true[/code] the button's state is pressed. If [code]false[/code] the button's state is released. + If [code]true[/code], the button's state is pressed. If [code]false[/code], the button's state is released. </member> <member name="pressure" type="float" setter="set_pressure" getter="get_pressure"> Represents the pressure the user puts on the button with his finger, if the controller supports it. Ranges from [code]0[/code] to [code]1[/code]. diff --git a/doc/classes/InputEventKey.xml b/doc/classes/InputEventKey.xml index 0118fda2df..4d8a2f6242 100644 --- a/doc/classes/InputEventKey.xml +++ b/doc/classes/InputEventKey.xml @@ -22,10 +22,10 @@ </methods> <members> <member name="echo" type="bool" setter="set_echo" getter="is_echo"> - If [code]true[/code] the key was already pressed before this event. It means the user is holding the key down. + If [code]true[/code], the key was already pressed before this event. It means the user is holding the key down. </member> <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed"> - If [code]true[/code] the key's state is pressed. If [code]false[/code] the key's state is released. + If [code]true[/code], the key's state is pressed. If [code]false[/code], the key's state is released. </member> <member name="scancode" type="int" setter="set_scancode" getter="get_scancode"> Key scancode, one of the [code]KEY_*[/code] constants in [@GlobalScope]. diff --git a/doc/classes/InputEventMouseButton.xml b/doc/classes/InputEventMouseButton.xml index 1342c7bf7e..8603a4f673 100644 --- a/doc/classes/InputEventMouseButton.xml +++ b/doc/classes/InputEventMouseButton.xml @@ -18,13 +18,13 @@ Mouse button identifier, one of the BUTTON_* or BUTTON_WHEEL_* constants in [@GlobalScope]. </member> <member name="doubleclick" type="bool" setter="set_doubleclick" getter="is_doubleclick"> - If [code]true[/code] the mouse button's state is a double-click. + If [code]true[/code], the mouse button's state is a double-click. </member> <member name="factor" type="float" setter="set_factor" getter="get_factor"> Magnitude. Amount (or delta) of the event. Used for scroll events, indicates scroll amount (vertically or horizontally). Only supported on some platforms, sensitivity varies by platform. May be 0 if not supported. </member> <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed"> - If [code]true[/code] the mouse button's state is pressed. If [code]false[/code] the mouse button's state is released. + If [code]true[/code], the mouse button's state is pressed. If [code]false[/code], the mouse button's state is released. </member> </members> <constants> diff --git a/doc/classes/InputEventScreenTouch.xml b/doc/classes/InputEventScreenTouch.xml index 55f04cdd94..8b1b9cae9f 100644 --- a/doc/classes/InputEventScreenTouch.xml +++ b/doc/classes/InputEventScreenTouch.xml @@ -22,7 +22,7 @@ Touch position. </member> <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed"> - If [code]true[/code] the touch's state is pressed. If [code]false[/code] the touch's state is released. + If [code]true[/code], the touch's state is pressed. If [code]false[/code], the touch's state is released. </member> </members> <constants> diff --git a/doc/classes/InterpolatedCamera.xml b/doc/classes/InterpolatedCamera.xml index 1ac7b5107e..fdb4361091 100644 --- a/doc/classes/InterpolatedCamera.xml +++ b/doc/classes/InterpolatedCamera.xml @@ -24,7 +24,7 @@ </methods> <members> <member name="enabled" type="bool" setter="set_interpolation_enabled" getter="is_interpolation_enabled"> - If [code]true[/code] and a target is set, the camera will move automatically. + If [code]true[/code], and a target is set, the camera will move automatically. </member> <member name="speed" type="float" setter="set_speed" getter="get_speed"> How quickly the camera moves toward its target. Higher values will result in tighter camera motion. diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index 0b8ede92d5..4df8a14804 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -388,10 +388,10 @@ </methods> <members> <member name="allow_reselect" type="bool" setter="set_allow_reselect" getter="get_allow_reselect"> - If [code]true[/code] the currently selected item may be selected again. + If [code]true[/code], the currently selected item may be selected again. </member> <member name="allow_rmb_select" type="bool" setter="set_allow_rmb_select" getter="get_allow_rmb_select"> - If [code]true[/code] a right mouse button click can select items. + If [code]true[/code], a right mouse button click can select items. </member> <member name="auto_height" type="bool" setter="set_auto_height" getter="has_auto_height"> </member> diff --git a/doc/classes/Joint.xml b/doc/classes/Joint.xml index 8cafdbdbf3..6c93b1d1d2 100644 --- a/doc/classes/Joint.xml +++ b/doc/classes/Joint.xml @@ -14,7 +14,7 @@ </methods> <members> <member name="collision/exclude_nodes" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision"> - If [code]true[/code] the two bodies of the nodes are not able to collide with each other. + If [code]true[/code], the two bodies of the nodes are not able to collide with each other. </member> <member name="nodes/node_a" type="NodePath" setter="set_node_a" getter="get_node_a"> The [Node], the first side of the Joint attaches to. diff --git a/doc/classes/Joint2D.xml b/doc/classes/Joint2D.xml index 8247997927..641765e671 100644 --- a/doc/classes/Joint2D.xml +++ b/doc/classes/Joint2D.xml @@ -17,7 +17,7 @@ When [member node_a] and [member node_b] move in different directions the [code]bias[/code] controls how fast the joint pulls them back to their original position. The lower the [code]bias[/code] the more the two bodies can pull on the joint. Default value: [code]0[/code] </member> <member name="disable_collision" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision"> - If [code]true[/code] [member node_a] and [member node_b] can collide. Default value: [code]false[/code]. + If [code]true[/code], [member node_a] and [member node_b] can collide. Default value: [code]false[/code]. </member> <member name="node_a" type="NodePath" setter="set_node_a" getter="get_node_a"> The first body attached to the joint. Must derive from [PhysicsBody2D]. diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml index df8fb251ba..3c3a58cb9a 100644 --- a/doc/classes/KinematicBody.xml +++ b/doc/classes/KinematicBody.xml @@ -89,7 +89,7 @@ </argument> <description> Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [code]KinematicBody[/code] or [RigidBody], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes. - [code]linear_velocity[/code] is a value in pixels per second. Unlike in for example [method move_and_collide], you should [i]not[/i] multiply it with [code]delta[/code] — this is done by the method. + [code]linear_velocity[/code] is a value in pixels per second. Unlike in for example [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — this is done by the method. [code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector3(0, 0, 0)[/code], everything is considered a wall. This is useful for topdown games. [i]TODO: Update for new stop_on_slode argument.[/i] If the body is standing on a slope and the horizontal speed (relative to the floor's speed) goes below [code]slope_stop_min_velocity[/code], the body will stop completely. This prevents the body from sliding down slopes when you include gravity in [code]linear_velocity[/code]. When set to lower values, the body will not be able to stand still on steep slopes. If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops. diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml index 8a644447ca..12d2bcec77 100644 --- a/doc/classes/KinematicBody2D.xml +++ b/doc/classes/KinematicBody2D.xml @@ -89,7 +89,7 @@ </argument> <description> Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [code]KinematicBody2D[/code] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes. - [code]linear_velocity[/code] is a value in pixels per second. Unlike in for example [method move_and_collide], you should [i]not[/i] multiply it with [code]delta[/code] — this is done by the method. + [code]linear_velocity[/code] is a value in pixels per second. Unlike in for example [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — this is done by the method. [code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games. [i]TODO: Update for stop_on_slope argument.[/i] If the body is standing on a slope and the horizontal speed (relative to the floor's speed) goes below [code]slope_stop_min_velocity[/code], the body will stop completely. This prevents the body from sliding down slopes when you include gravity in [code]linear_velocity[/code]. When set to lower values, the body will not be able to stand still on steep slopes. If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops. @@ -138,7 +138,7 @@ If the body is at least this close to another body, this body will consider them to be colliding. </member> <member name="motion/sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled"> - If [code]true[/code] the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. + If [code]true[/code], the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. </member> </members> <constants> diff --git a/doc/classes/Light.xml b/doc/classes/Light.xml index cf873e5b28..a7b0d86a7a 100644 --- a/doc/classes/Light.xml +++ b/doc/classes/Light.xml @@ -15,7 +15,7 @@ </methods> <members> <member name="editor_only" type="bool" setter="set_editor_only" getter="is_editor_only"> - If [code]true[/code] the light only appears in the editor and will not be visible at runtime. Default value:[code]false[/code]. + If [code]true[/code], the light only appears in the editor and will not be visible at runtime. Default value:[code]false[/code]. </member> <member name="light_bake_mode" type="int" setter="set_bake_mode" getter="get_bake_mode" enum="Light.BakeMode"> The light's bake mode. See [enum BakeMode]. @@ -33,7 +33,7 @@ Secondary multiplier used with indirect light (light bounces). This works in baked light or GIProbe. </member> <member name="light_negative" type="bool" setter="set_negative" getter="is_negative"> - If [code]true[/code] the light's effect is reversed, darkening areas and casting bright shadows. Default value: [code]false[/code]. + If [code]true[/code], the light's effect is reversed, darkening areas and casting bright shadows. Default value: [code]false[/code]. </member> <member name="light_specular" type="float" setter="set_param" getter="get_param"> The intensity of the specular blob in objects affected by the light. At [code]0[/code] the light becomes a pure diffuse light. @@ -48,7 +48,7 @@ Attempts to reduce [member shadow_bias] gap. </member> <member name="shadow_enabled" type="bool" setter="set_shadow" getter="has_shadow"> - If [code]true[/code] the light will cast shadows. Default value: [code]false[/code]. + If [code]true[/code], the light will cast shadows. Default value: [code]false[/code]. </member> <member name="shadow_reverse_cull_face" type="bool" setter="set_shadow_reverse_cull_face" getter="get_shadow_reverse_cull_face"> </member> diff --git a/doc/classes/Light2D.xml b/doc/classes/Light2D.xml index f3903ffeae..476156846d 100644 --- a/doc/classes/Light2D.xml +++ b/doc/classes/Light2D.xml @@ -17,10 +17,10 @@ The Light2D's [Color]. </member> <member name="editor_only" type="bool" setter="set_editor_only" getter="is_editor_only"> - If [code]true[/code] Light2D will only appear when editing the scene. Default value: [code]false[/code]. + If [code]true[/code], Light2D will only appear when editing the scene. Default value: [code]false[/code]. </member> <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled"> - If [code]true[/code] Light2D will emit light. Default value: [code]true[/code]. + If [code]true[/code], Light2D will emit light. Default value: [code]true[/code]. </member> <member name="energy" type="float" setter="set_energy" getter="get_energy"> The Light2D's energy value. The larger the value, the stronger the light. @@ -56,7 +56,7 @@ [Color] of shadows cast by the Light2D. </member> <member name="shadow_enabled" type="bool" setter="set_shadow_enabled" getter="is_shadow_enabled"> - If [code]true[/code] the Light2D will cast shadows. Default value: [code]false[/code]. + If [code]true[/code], the Light2D will cast shadows. Default value: [code]false[/code]. </member> <member name="shadow_filter" type="int" setter="set_shadow_filter" getter="get_shadow_filter" enum="Light2D.ShadowFilter"> Shadow filter type. Use SHADOW_FILTER_* constants to set [code]shadow_filter[/code]. Default value: [code]None[/code]. diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index f842dd8311..930680c2ad 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -80,7 +80,7 @@ Text alignment as defined in the ALIGN_* enum. </member> <member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled"> - If [code]true[/code] the caret (visual cursor) blinks. + If [code]true[/code], the caret (visual cursor) blinks. </member> <member name="caret_blink_speed" type="float" setter="cursor_set_blink_speed" getter="cursor_get_blink_speed"> Duration (in seconds) of a caret's blinking cycle. @@ -89,16 +89,16 @@ The cursor's position inside the [code]LineEdit[/code]. When set, the text may scroll to accommodate it. </member> <member name="clear_button_enabled" type="bool" setter="set_clear_button_enabled" getter="is_clear_button_enabled"> - If [code]true[/code] the [code]LineEdit[/code] will show a clear button if [code]text[/code] is not empty. + If [code]true[/code], the [code]LineEdit[/code] will show a clear button if [code]text[/code] is not empty. </member> <member name="context_menu_enabled" type="bool" setter="set_context_menu_enabled" getter="is_context_menu_enabled"> - If [code]true[/code] the context menu will appear when right clicked. + If [code]true[/code], the context menu will appear when right clicked. </member> <member name="editable" type="bool" setter="set_editable" getter="is_editable"> - If [code]false[/code] existing text cannot be modified and new text cannot be added. + If [code]false[/code], existing text cannot be modified and new text cannot be added. </member> <member name="expand_to_text_length" type="bool" setter="set_expand_to_text_length" getter="get_expand_to_text_length"> - If [code]true[/code] the [LineEdit] width will increase to stay longer than the [member text]. It will [b]not[/b] compress if the [member text] is shortened. + If [code]true[/code], the [LineEdit] width will increase to stay longer than the [member text]. It will [b]not[/b] compress if the [member text] is shortened. </member> <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" enum="Control.FocusMode"> Defines how the [LineEdit] can grab focus (Keyboard and mouse, only keyboard, or none). See [code]enum FocusMode[/code] in [Control] for details. diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml index d8d7d9acfc..f3e26a3bcb 100644 --- a/doc/classes/MultiplayerAPI.xml +++ b/doc/classes/MultiplayerAPI.xml @@ -93,7 +93,7 @@ The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [method is_network_server]) and will set root node's network mode to master (see NETWORK_MODE_* constants in [Node]), or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals. </member> <member name="refuse_new_network_connections" type="bool" setter="set_refuse_new_network_connections" getter="is_refusing_new_network_connections"> - If [code]true[/code] the MultiplayerAPI's [member network_peer] refuses new incoming connections. + If [code]true[/code], the MultiplayerAPI's [member network_peer] refuses new incoming connections. </member> </members> <signals> diff --git a/doc/classes/NetworkedMultiplayerPeer.xml b/doc/classes/NetworkedMultiplayerPeer.xml index 990f928b25..42f08b36af 100644 --- a/doc/classes/NetworkedMultiplayerPeer.xml +++ b/doc/classes/NetworkedMultiplayerPeer.xml @@ -53,7 +53,7 @@ </methods> <members> <member name="refuse_new_connections" type="bool" setter="set_refuse_new_connections" getter="is_refusing_new_connections"> - If [code]true[/code] this [code]NetworkedMultiplayerPeer[/code] refuses new connections. Default value: [code]false[/code]. + If [code]true[/code], this [code]NetworkedMultiplayerPeer[/code] refuses new connections. Default value: [code]false[/code]. </member> <member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" enum="NetworkedMultiplayerPeer.TransferMode"> The manner in which to send packets to the [code]target_peer[/code]. See [enum TransferMode]. diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml index e955f6bb7d..80f9329402 100644 --- a/doc/classes/Node2D.xml +++ b/doc/classes/Node2D.xml @@ -148,7 +148,7 @@ Local [Transform2D]. </member> <member name="z_as_relative" type="bool" setter="set_z_as_relative" getter="is_z_relative"> - If [code]true[/code] the node's Z-index is relative to its parent's Z-index. If this node's Z-index is 2 and its parent's effective Z-index is 3, then this node's effective Z-index will be 2 + 3 = 5. + If [code]true[/code], the node's Z-index is relative to its parent's Z-index. If this node's Z-index is 2 and its parent's effective Z-index is 3, then this node's effective Z-index will be 2 + 3 = 5. </member> <member name="z_index" type="int" setter="set_z_index" getter="get_z_index"> Z-index. Controls the order in which the nodes render. A node with a higher Z-index will display in front of others. diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index ac865de3cd..579bac4a19 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -381,6 +381,13 @@ Returns the epoch time of the operating system in seconds. </description> </method> + <method name="get_system_time_msecs" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the epoch time of the operating system in milliseconds. + </description> + </method> <method name="get_ticks_msec" qualifiers="const"> <return type="int"> </return> @@ -763,28 +770,28 @@ The exit code passed to the OS when the main loop exits. </member> <member name="keep_screen_on" type="bool" setter="set_keep_screen_on" getter="is_keep_screen_on"> - If [code]true[/code] the engine tries to keep the screen on while the game is running. Useful on mobile. + If [code]true[/code], the engine tries to keep the screen on while the game is running. Useful on mobile. </member> <member name="low_processor_usage_mode" type="bool" setter="set_low_processor_usage_mode" getter="is_in_low_processor_usage_mode"> - If [code]true[/code] the engine optimizes for low processor usage by only refreshing the screen if needed. Can improve battery consumption on mobile. + If [code]true[/code], the engine optimizes for low processor usage by only refreshing the screen if needed. Can improve battery consumption on mobile. </member> <member name="screen_orientation" type="int" setter="set_screen_orientation" getter="get_screen_orientation" enum="_OS.ScreenOrientation"> The current screen orientation. </member> <member name="vsync_enabled" type="bool" setter="set_use_vsync" getter="is_vsync_enabled"> - If [code]true[/code] vertical synchronization (Vsync) is enabled. + If [code]true[/code], vertical synchronization (Vsync) is enabled. </member> <member name="window_borderless" type="bool" setter="set_borderless_window" getter="get_borderless_window"> - If [code]true[/code] removes the window frame. + If [code]true[/code], removes the window frame. </member> <member name="window_fullscreen" type="bool" setter="set_window_fullscreen" getter="is_window_fullscreen"> - If [code]true[/code] the window is fullscreen. + If [code]true[/code], the window is fullscreen. </member> <member name="window_maximized" type="bool" setter="set_window_maximized" getter="is_window_maximized"> - If [code]true[/code] the window is maximized. + If [code]true[/code], the window is maximized. </member> <member name="window_minimized" type="bool" setter="set_window_minimized" getter="is_window_minimized"> - If [code]true[/code] the window is minimized. + If [code]true[/code], the window is minimized. </member> <member name="window_per_pixel_transparency_enabled" type="bool" setter="set_window_per_pixel_transparency_enabled" getter="get_window_per_pixel_transparency_enabled"> </member> diff --git a/doc/classes/OccluderPolygon2D.xml b/doc/classes/OccluderPolygon2D.xml index e8d6b54f27..58ad268f05 100644 --- a/doc/classes/OccluderPolygon2D.xml +++ b/doc/classes/OccluderPolygon2D.xml @@ -14,7 +14,7 @@ </methods> <members> <member name="closed" type="bool" setter="set_closed" getter="is_closed"> - If [code]true[/code] closes the polygon. A closed OccluderPolygon2D occludes the light coming from any direction. An opened OccluderPolygon2D occludes the light only at its outline's direction. Default value [code]true[/code]. + If [code]true[/code], closes the polygon. A closed OccluderPolygon2D occludes the light coming from any direction. An opened OccluderPolygon2D occludes the light only at its outline's direction. Default value [code]true[/code]. </member> <member name="cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" enum="OccluderPolygon2D.CullMode"> Set the direction of the occlusion culling when not [code]CULL_DISABLED[/code]. Default value [code]DISABLED[/code]. diff --git a/doc/classes/OrientedPathFollow.xml b/doc/classes/OrientedPathFollow.xml index bc6af4711b..665e3af6b2 100644 --- a/doc/classes/OrientedPathFollow.xml +++ b/doc/classes/OrientedPathFollow.xml @@ -15,7 +15,7 @@ </methods> <members> <member name="cubic_interp" type="bool" setter="set_cubic_interpolation" getter="get_cubic_interpolation"> - If [code]true[/code] the position between two cached points is interpolated cubically, and linearly otherwise. + If [code]true[/code], the position between two cached points is interpolated cubically, and linearly otherwise. The points along the [Curve3D] of the [Path] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough. There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. </member> diff --git a/doc/classes/ParallaxBackground.xml b/doc/classes/ParallaxBackground.xml index 2409b7a1c1..81795df87f 100644 --- a/doc/classes/ParallaxBackground.xml +++ b/doc/classes/ParallaxBackground.xml @@ -20,7 +20,7 @@ Base motion scale of all [ParallaxLayer] children. </member> <member name="scroll_ignore_camera_zoom" type="bool" setter="set_ignore_camera_zoom" getter="is_ignore_camera_zoom"> - If [code]true[/code] elements in [ParallaxLayer] child aren't affected by the zoom level of the camera. + If [code]true[/code], elements in [ParallaxLayer] child aren't affected by the zoom level of the camera. </member> <member name="scroll_limit_begin" type="Vector2" setter="set_limit_begin" getter="get_limit_begin"> Top left limits for scrolling to begin. If the camera is outside of this limit the background will stop scrolling. Must be lower than [member scroll_limit_end] to work. diff --git a/doc/classes/Particles.xml b/doc/classes/Particles.xml index 2e30750bf9..b6e31d3576 100644 --- a/doc/classes/Particles.xml +++ b/doc/classes/Particles.xml @@ -49,7 +49,7 @@ The number of draw passes when rendering particles. </member> <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting"> - If [code]true[/code] particles are being emitted. Default value: [code]true[/code]. + If [code]true[/code], particles are being emitted. Default value: [code]true[/code]. </member> <member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio"> Time ratio between each emission. If [code]0[/code] particles are emitted continuously. If [code]1[/code] all particles are emitted simultaneously. Default value: [code]0[/code]. @@ -62,10 +62,10 @@ Amount of time each particle will exist. Default value: [code]1[/code]. </member> <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates"> - If [code]true[/code] particles use the parent node's coordinate space. If [code]false[/code] they use global coordinates. Default value: [code]true[/code]. + If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. Default value: [code]true[/code]. </member> <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot"> - If [code]true[/code] only [code]amount[/code] particles will be emitted. Default value: [code]false[/code]. + If [code]true[/code], only [code]amount[/code] particles will be emitted. Default value: [code]false[/code]. </member> <member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time"> Amount of time to preprocess the particles before animation starts. Lets you start the animation some time after particles have started emitting. diff --git a/doc/classes/Particles2D.xml b/doc/classes/Particles2D.xml index 6416e409a3..a6d23ed0f2 100644 --- a/doc/classes/Particles2D.xml +++ b/doc/classes/Particles2D.xml @@ -33,7 +33,7 @@ Particle draw order. Uses [code]DRAW_ORDER_*[/code] values. Default value: [code]DRAW_ORDER_INDEX[/code]. </member> <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting"> - If [code]true[/code] particles are being emitted. Default value: [code]true[/code]. + If [code]true[/code], particles are being emitted. Default value: [code]true[/code]. </member> <member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio"> How rapidly particles in an emission cycle are emitted. If greater than [code]0[/code], there will be a gap in emissions before the next cycle begins. Default value: [code]0[/code]. @@ -46,12 +46,12 @@ Amount of time each particle will exist. Default value: [code]1[/code]. </member> <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates"> - If [code]true[/code] particles use the parent node's coordinate space. If [code]false[/code] they use global coordinates. Default value: [code]true[/code]. + If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. Default value: [code]true[/code]. </member> <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map"> </member> <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot"> - If [code]true[/code] only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end. Default value: [code]false[/code]. + If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end. Default value: [code]false[/code]. </member> <member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time"> Particle system starts as if it had already run for this many seconds. diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml index 2904d4c578..b34272d176 100644 --- a/doc/classes/ParticlesMaterial.xml +++ b/doc/classes/ParticlesMaterial.xml @@ -86,7 +86,7 @@ <member name="flag_align_y" type="bool" setter="set_flag" getter="get_flag"> </member> <member name="flag_disable_z" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code] particles will not move on the z axis. Default value: [code]true[/code] for [Particles2D], [code]false[/code] for [Particles]. + If [code]true[/code], particles will not move on the z axis. Default value: [code]true[/code] for [Particles2D], [code]false[/code] for [Particles]. </member> <member name="flag_rotate_y" type="bool" setter="set_flag" getter="get_flag"> </member> diff --git a/doc/classes/PathFollow.xml b/doc/classes/PathFollow.xml index 650fed7ec6..ed4a805a00 100644 --- a/doc/classes/PathFollow.xml +++ b/doc/classes/PathFollow.xml @@ -15,7 +15,7 @@ </methods> <members> <member name="cubic_interp" type="bool" setter="set_cubic_interpolation" getter="get_cubic_interpolation"> - If [code]true[/code] the position between two cached points is interpolated cubically, and linearly otherwise. + If [code]true[/code], the position between two cached points is interpolated cubically, and linearly otherwise. The points along the [Curve3D] of the [Path] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough. There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. </member> diff --git a/doc/classes/PathFollow2D.xml b/doc/classes/PathFollow2D.xml index 515c921d0d..a31652b7f9 100644 --- a/doc/classes/PathFollow2D.xml +++ b/doc/classes/PathFollow2D.xml @@ -15,7 +15,7 @@ </methods> <members> <member name="cubic_interp" type="bool" setter="set_cubic_interpolation" getter="get_cubic_interpolation"> - If [code]true[/code] the position between two cached points is interpolated cubically, and linearly otherwise. + If [code]true[/code], the position between two cached points is interpolated cubically, and linearly otherwise. The points along the [Curve2D] of the [Path2D] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough. There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. </member> diff --git a/doc/classes/PhysicsServer.xml b/doc/classes/PhysicsServer.xml index 7dfc8e66d4..40ee06fe6c 100644 --- a/doc/classes/PhysicsServer.xml +++ b/doc/classes/PhysicsServer.xml @@ -135,7 +135,7 @@ <argument index="0" name="area" type="RID"> </argument> <description> - If [code]true[/code] area collides with rays. + If [code]true[/code], area collides with rays. </description> </method> <method name="area_remove_shape"> @@ -556,7 +556,7 @@ <argument index="0" name="body" type="RID"> </argument> <description> - If [code]true[/code] the continuous collision detection mode is enabled. + If [code]true[/code], the continuous collision detection mode is enabled. </description> </method> <method name="body_is_omitting_force_integration" qualifiers="const"> @@ -574,7 +574,7 @@ <argument index="0" name="body" type="RID"> </argument> <description> - If [code]true[/code] the body can be detected by rays + If [code]true[/code], the body can be detected by rays </description> </method> <method name="body_remove_collision_exception"> @@ -653,7 +653,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> - If [code]true[/code] the continuous collision detection mode is enabled. + If [code]true[/code], the continuous collision detection mode is enabled. Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. </description> </method> @@ -1286,10 +1286,10 @@ Maximum acceleration for the motor. </constant> <constant name="HINGE_JOINT_FLAG_USE_LIMIT" value="0" enum="HingeJointFlag"> - If [code]true[/code] the Hinge has a maximum and a minimum rotation. + If [code]true[/code], the Hinge has a maximum and a minimum rotation. </constant> <constant name="HINGE_JOINT_FLAG_ENABLE_MOTOR" value="1" enum="HingeJointFlag"> - If [code]true[/code] a motor turns the Hinge + If [code]true[/code], a motor turns the Hinge </constant> <constant name="SLIDER_JOINT_LINEAR_LIMIT_UPPER" value="0" enum="SliderJointParam"> The maximum difference between the pivot points on their x-axis before damping happens. diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml index bf4519fd0a..c63d66ff5b 100644 --- a/doc/classes/Polygon2D.xml +++ b/doc/classes/Polygon2D.xml @@ -80,7 +80,7 @@ </methods> <members> <member name="antialiased" type="bool" setter="set_antialiased" getter="get_antialiased"> - If [code]true[/code] polygon edges will be anti-aliased. Default value: [code]false[/code]. + If [code]true[/code], polygon edges will be anti-aliased. Default value: [code]false[/code]. </member> <member name="bones" type="Array" setter="_set_bones" getter="_get_bones"> </member> @@ -91,7 +91,7 @@ Added padding applied to the bounding box when using [code]invert[/code]. Setting this value too small may result in a "Bad Polygon" error. Default value: [code]100[/code]. </member> <member name="invert_enable" type="bool" setter="set_invert" getter="get_invert"> - If [code]true[/code] polygon will be inverted, containing the area outside the defined points and extending to the [code]invert_border[/code]. Default value: [code]false[/code]. + If [code]true[/code], polygon will be inverted, containing the area outside the defined points and extending to the [code]invert_border[/code]. Default value: [code]false[/code]. </member> <member name="offset" type="Vector2" setter="set_offset" getter="get_offset"> The offset applied to each vertex. diff --git a/doc/classes/Popup.xml b/doc/classes/Popup.xml index 8eec105a80..be6e8b6ef1 100644 --- a/doc/classes/Popup.xml +++ b/doc/classes/Popup.xml @@ -50,7 +50,7 @@ </methods> <members> <member name="popup_exclusive" type="bool" setter="set_exclusive" getter="is_exclusive"> - If [code]true[/code] the popup will not be hidden when a click event occurs outside of it, or when it receives the [code]ui_cancel[/code] action event. + If [code]true[/code], the popup will not be hidden when a click event occurs outside of it, or when it receives the [code]ui_cancel[/code] action event. </member> </members> <signals> diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml index 0f03b7b80a..8d6e77751d 100644 --- a/doc/classes/ProgressBar.xml +++ b/doc/classes/ProgressBar.xml @@ -14,7 +14,7 @@ </methods> <members> <member name="percent_visible" type="bool" setter="set_percent_visible" getter="is_percent_visible"> - If [code]true[/code] the fill percentage is displayed on the bar. Default value: [code]true[/code]. + If [code]true[/code], the fill percentage is displayed on the bar. Default value: [code]true[/code]. </member> </members> <constants> diff --git a/doc/classes/Range.xml b/doc/classes/Range.xml index 46a6132b94..0dc02a68da 100644 --- a/doc/classes/Range.xml +++ b/doc/classes/Range.xml @@ -30,13 +30,13 @@ </methods> <members> <member name="allow_greater" type="bool" setter="set_allow_greater" getter="is_greater_allowed"> - If [code]true[/code] [member value] may be greater than [member max_value]. Default value: [code]false[/code]. + If [code]true[/code], [member value] may be greater than [member max_value]. Default value: [code]false[/code]. </member> <member name="allow_lesser" type="bool" setter="set_allow_lesser" getter="is_lesser_allowed"> - If [code]true[/code] [member value] may be less than [member min_value]. Default value: [code]false[/code]. + If [code]true[/code], [member value] may be less than [member min_value]. Default value: [code]false[/code]. </member> <member name="exp_edit" type="bool" setter="set_exp_ratio" getter="is_ratio_exp"> - If [code]true[/code] and [code]min_value[/code] is greater than 0, [code]value[/code] will be represented exponentially rather than linearly. + If [code]true[/code], and [code]min_value[/code] is greater than 0, [code]value[/code] will be represented exponentially rather than linearly. </member> <member name="max_value" type="float" setter="set_max" getter="get_max"> Maximum value. Range is clamped if [code]value[/code] is greater than [code]max_value[/code]. Default value: [code]100[/code]. @@ -51,7 +51,7 @@ The value mapped between 0 and 1. </member> <member name="rounded" type="bool" setter="set_use_rounded_values" getter="is_using_rounded_values"> - If [code]true[/code] [code]value[/code] will always be rounded to the nearest integer. Default value: [code]false[/code]. + If [code]true[/code], [code]value[/code] will always be rounded to the nearest integer. Default value: [code]false[/code]. </member> <member name="step" type="float" setter="set_step" getter="get_step"> If greater than 0, [code]value[/code] will always be rounded to a multiple of [code]step[/code]. If [code]rounded[/code] is also [code]true[/code], [code]value[/code] will first be rounded to a multiple of [code]step[/code] then rounded to the nearest integer. diff --git a/doc/classes/RayCast.xml b/doc/classes/RayCast.xml index 84c83d1282..61f2737c01 100644 --- a/doc/classes/RayCast.xml +++ b/doc/classes/RayCast.xml @@ -136,10 +136,10 @@ The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. </member> <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled"> - If [code]true[/code] collisions will be reported. Default value: [code]false[/code]. + If [code]true[/code], collisions will be reported. Default value: [code]false[/code]. </member> <member name="exclude_parent" type="bool" setter="set_exclude_parent_body" getter="get_exclude_parent_body"> - If [code]true[/code] collisions will be ignored for this RayCast's immediate parent. Default value: [code]true[/code]. + If [code]true[/code], collisions will be ignored for this RayCast's immediate parent. Default value: [code]true[/code]. </member> </members> <constants> diff --git a/doc/classes/RayShape.xml b/doc/classes/RayShape.xml index e03541011d..50d324f72c 100644 --- a/doc/classes/RayShape.xml +++ b/doc/classes/RayShape.xml @@ -17,7 +17,7 @@ The ray's length. </member> <member name="slips_on_slope" type="bool" setter="set_slips_on_slope" getter="get_slips_on_slope"> - If [code]true[/code] allow the shape to return the correct normal. Default value: [code]false[/code]. + If [code]true[/code], allow the shape to return the correct normal. Default value: [code]false[/code]. </member> </members> <constants> diff --git a/doc/classes/RayShape2D.xml b/doc/classes/RayShape2D.xml index 37cfe4f2d3..2fdc1930fb 100644 --- a/doc/classes/RayShape2D.xml +++ b/doc/classes/RayShape2D.xml @@ -17,7 +17,7 @@ The ray's length. </member> <member name="slips_on_slope" type="bool" setter="set_slips_on_slope" getter="get_slips_on_slope"> - If [code]true[/code] allow the shape to return the correct normal. Default value: [code]false[/code]. + If [code]true[/code], allow the shape to return the correct normal. Default value: [code]false[/code]. </member> </members> <constants> diff --git a/doc/classes/RemoteTransform.xml b/doc/classes/RemoteTransform.xml index 1a5d1eb907..3df94bdfca 100644 --- a/doc/classes/RemoteTransform.xml +++ b/doc/classes/RemoteTransform.xml @@ -18,16 +18,16 @@ The [NodePath] to the remote node, relative to the RemoteTransform's position in the scene. </member> <member name="update_position" type="bool" setter="set_update_position" getter="get_update_position"> - If [code]true[/code] the remote node's position is updated. Default value: [code]true[/code]. + If [code]true[/code], the remote node's position is updated. Default value: [code]true[/code]. </member> <member name="update_rotation" type="bool" setter="set_update_rotation" getter="get_update_rotation"> - If [code]true[/code] the remote node's rotation is updated. Default value: [code]true[/code]. + If [code]true[/code], the remote node's rotation is updated. Default value: [code]true[/code]. </member> <member name="update_scale" type="bool" setter="set_update_scale" getter="get_update_scale"> - If [code]true[/code] the remote node's scale is updated. Default value: [code]true[/code]. + If [code]true[/code], the remote node's scale is updated. Default value: [code]true[/code]. </member> <member name="use_global_coordinates" type="bool" setter="set_use_global_coordinates" getter="get_use_global_coordinates"> - If [code]true[/code] global coordinates are used. If [code]false[/code] local coordinates are used. Default value: [code]true[/code]. + If [code]true[/code], global coordinates are used. If [code]false[/code], local coordinates are used. Default value: [code]true[/code]. </member> </members> <constants> diff --git a/doc/classes/RemoteTransform2D.xml b/doc/classes/RemoteTransform2D.xml index d83ec9f6b1..cf0e6c6199 100644 --- a/doc/classes/RemoteTransform2D.xml +++ b/doc/classes/RemoteTransform2D.xml @@ -18,16 +18,16 @@ The [NodePath] to the remote node, relative to the RemoteTransform2D's position in the scene. </member> <member name="update_position" type="bool" setter="set_update_position" getter="get_update_position"> - If [code]true[/code] the remote node's position is updated. Default value: [code]true[/code]. + If [code]true[/code], the remote node's position is updated. Default value: [code]true[/code]. </member> <member name="update_rotation" type="bool" setter="set_update_rotation" getter="get_update_rotation"> - If [code]true[/code] the remote node's rotation is updated. Default value: [code]true[/code]. + If [code]true[/code], the remote node's rotation is updated. Default value: [code]true[/code]. </member> <member name="update_scale" type="bool" setter="set_update_scale" getter="get_update_scale"> - If [code]true[/code] the remote node's scale is updated. Default value: [code]true[/code]. + If [code]true[/code], the remote node's scale is updated. Default value: [code]true[/code]. </member> <member name="use_global_coordinates" type="bool" setter="set_use_global_coordinates" getter="get_use_global_coordinates"> - If [code]true[/code] global coordinates are used. If [code]false[/code] local coordinates are used. Default value: [code]true[/code]. + If [code]true[/code], global coordinates are used. If [code]false[/code], local coordinates are used. Default value: [code]true[/code]. </member> </members> <constants> diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 145ce7537b..ae5e0496cb 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -225,7 +225,7 @@ </methods> <members> <member name="bbcode_enabled" type="bool" setter="set_use_bbcode" getter="is_using_bbcode"> - If [code]true[/code] the label uses BBCode formatting. Default value: [code]false[/code]. + If [code]true[/code], the label uses BBCode formatting. Default value: [code]false[/code]. </member> <member name="bbcode_text" type="String" setter="set_bbcode" getter="get_bbcode"> The label's text in BBCode format. Is not representative of manual modifications to the internal tag stack. Erases changes made by other methods when edited. @@ -234,7 +234,7 @@ If [code]true[/code], the label underlines meta tags such as [url]{text}[/url]. Default value: [code]true[/code]. </member> <member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color"> - If [code]true[/code] the label uses the custom font color. Default value: [code]false[/code]. + If [code]true[/code], the label uses the custom font color. Default value: [code]false[/code]. </member> <member name="percent_visible" type="float" setter="set_percent_visible" getter="get_percent_visible"> The text's visibility, as a [float] between 0.0 and 1.0. diff --git a/doc/classes/RigidBody.xml b/doc/classes/RigidBody.xml index 4ff332402b..8ad8b34db6 100644 --- a/doc/classes/RigidBody.xml +++ b/doc/classes/RigidBody.xml @@ -21,7 +21,7 @@ <argument index="0" name="state" type="PhysicsDirectBodyState"> </argument> <description> - Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default it works in addition to the usual physics behavior, but [method set_use_custom_integrator] allows you to disable the default behavior and do fully custom force integration for a body. + Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it works in addition to the usual physics behavior, but [method set_use_custom_integrator] allows you to disable the default behavior and do fully custom force integration for a body. </description> </method> <method name="add_central_force"> @@ -130,20 +130,20 @@ RigidBody's bounciness. </member> <member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep"> - If [code]true[/code] the RigidBody will not calculate forces and will act as a static body while there is no movement. It will wake up when forces are applied through other collisions or when the [code]apply_impulse[/code] method is used. + If [code]true[/code], the RigidBody will not calculate forces and will act as a static body while there is no movement. It will wake up when forces are applied through other collisions or when the [code]apply_impulse[/code] method is used. </member> <member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled"> - If [code]true[/code] the RigidBody will emit signals when it collides with another RigidBody. + If [code]true[/code], the RigidBody will emit signals when it collides with another RigidBody. </member> <member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported"> The maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. </member> <member name="continuous_cd" type="bool" setter="set_use_continuous_collision_detection" getter="is_using_continuous_collision_detection"> - If [code]true[/code] continuous collision detection is used. + If [code]true[/code], continuous collision detection is used. Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. Continuous collision detection is more precise, and misses less impacts by small, fast-moving objects. Not using continuous collision detection is faster to compute, but can miss small, fast-moving objects. </member> <member name="custom_integrator" type="bool" setter="set_use_custom_integrator" getter="is_using_custom_integrator"> - If [code]true[/code] internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined. + If [code]true[/code], internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined. </member> <member name="friction" type="float" setter="set_friction" getter="get_friction"> The body's friction, from 0 (frictionless) to 1 (max friction). @@ -166,7 +166,7 @@ <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override"> </member> <member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping"> - If [code]true[/code] the body is sleeping and will not calculate forces until woken up by a collision or the [code]apply_impulse[/code] method. + If [code]true[/code], the body is sleeping and will not calculate forces until woken up by a collision or the [code]apply_impulse[/code] method. </member> <member name="weight" type="float" setter="set_weight" getter="get_weight"> The body's weight based on its mass and the global 3D gravity. Global values are set in "Project > Project Settings > Physics > 3d". diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml index 079440ab8b..d4e0374bed 100644 --- a/doc/classes/RigidBody2D.xml +++ b/doc/classes/RigidBody2D.xml @@ -20,7 +20,7 @@ <argument index="0" name="state" type="Physics2DDirectBodyState"> </argument> <description> - Allows you to read and safely modify the simulation state for the object. Use this instead of [Node._physics_process] if you need to directly change the body's [code]position[/code] or other physics properties. By default it works in addition to the usual physics behavior, but [member custom_integrator] allows you to disable the default behavior and write custom force integration for a body. + Allows you to read and safely modify the simulation state for the object. Use this instead of [Node._physics_process] if you need to directly change the body's [code]position[/code] or other physics properties. By default, it works in addition to the usual physics behavior, but [member custom_integrator] allows you to disable the default behavior and write custom force integration for a body. </description> </method> <method name="add_central_force"> @@ -130,10 +130,10 @@ The body's bounciness. Default value: [code]0[/code]. </member> <member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep"> - If [code]true[/code] the body will not calculate forces and will act as a static body if there is no movement. The body will wake up when other forces are applied via collisions or by using [method apply_impulse] or [method add_force]. Default value: [code]true[/code]. + If [code]true[/code], the body will not calculate forces and will act as a static body if there is no movement. The body will wake up when other forces are applied via collisions or by using [method apply_impulse] or [method add_force]. Default value: [code]true[/code]. </member> <member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled"> - If [code]true[/code] the body will emit signals when it collides with another RigidBody2D. See also [member contacts_reported]. Default value: [code]false[/code]. + If [code]true[/code], the body will emit signals when it collides with another RigidBody2D. See also [member contacts_reported]. Default value: [code]false[/code]. </member> <member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported"> The maximum number of contacts to report. Default value: [code]0[/code]. @@ -143,7 +143,7 @@ Continuous collision detection tries to predict where a moving body will collide instead of moving it and correcting its movement after collision. Continuous collision detection is slower, but more precise and misses fewer collisions with small, fast-moving objects. Raycasting and shapecasting methods are available. See [code]CCD_MODE_[/code] constants for details. </member> <member name="custom_integrator" type="bool" setter="set_use_custom_integrator" getter="is_using_custom_integrator"> - If [code]true[/code] internal force integration is disabled for this body. Aside from collision response, the body will only move as determined by the [method _integrate_forces] function. + If [code]true[/code], internal force integration is disabled for this body. Aside from collision response, the body will only move as determined by the [method _integrate_forces] function. </member> <member name="friction" type="float" setter="set_friction" getter="get_friction"> The body's friction. Values range from [code]0[/code] (frictionless) to [code]1[/code] (maximum friction). Default value: [code]1[/code]. @@ -169,7 +169,7 @@ <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override"> </member> <member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping"> - If [code]true[/code] the body is sleeping and will not calculate forces until woken up by a collision or by using [method apply_impulse] or [method add_force]. + If [code]true[/code], the body is sleeping and will not calculate forces until woken up by a collision or by using [method apply_impulse] or [method add_force]. </member> <member name="weight" type="float" setter="set_weight" getter="get_weight"> The body's weight based on its mass and the "Default Gravity" value in "Project > Project Settings > Physics > 2d". diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index dd94ee66d2..04d3fad57b 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -192,7 +192,7 @@ <argument index="0" name="enabled" type="bool"> </argument> <description> - If [code]true[/code] the application automatically accepts quitting. + If [code]true[/code], the application automatically accepts quitting. </description> </method> <method name="set_group"> @@ -236,7 +236,7 @@ <argument index="0" name="enabled" type="bool"> </argument> <description> - If [code]true[/code] the application quits automatically on going back (e.g. on Android). + If [code]true[/code], the application quits automatically on going back (e.g. on Android). </description> </method> <method name="set_screen_stretch"> @@ -270,27 +270,27 @@ The default [MultiplayerAPI] instance for this SceneTree. </member> <member name="multiplayer_poll" type="bool" setter="set_multiplayer_poll_enabled" getter="is_multiplayer_poll_enabled"> - If [code]true[/code] (default) enable the automatic polling of the [MultiplayerAPI] for this SceneTree during [signal idle_frame]. + If [code]true[/code], (default) enable the automatic polling of the [MultiplayerAPI] for this SceneTree during [signal idle_frame]. When [code]false[/code] you need to manually call [method MultiplayerAPI.poll] for processing network packets and delivering RPCs/RSETs. This allows to run RPCs/RSETs in a different loop (e.g. physics, thread, specific time step) and for manual [Mutex] protection when accessing the [MultiplayerAPI] from threads. </member> <member name="network_peer" type="NetworkedMultiplayerPeer" setter="set_network_peer" getter="get_network_peer"> The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the SceneTree will become a network server (check with [method is_network_server()]) and will set root node's network mode to master (see NETWORK_MODE_* constants in [Node]), or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to SceneTree's signals. </member> <member name="paused" type="bool" setter="set_pause" getter="is_paused"> - If [code]true[/code] the SceneTree is paused. + If [code]true[/code], the SceneTree is paused. Doing so will have the following behavior: * 2D and 3D physics will be stopped. * _process and _physics_process will not be called anymore in nodes. * _input and _input_event will not be called anymore either. </member> <member name="refuse_new_network_connections" type="bool" setter="set_refuse_new_network_connections" getter="is_refusing_new_network_connections"> - If [code]true[/code] the SceneTree's [member network_peer] refuses new incoming connections. + If [code]true[/code], the SceneTree's [member network_peer] refuses new incoming connections. </member> <member name="root" type="Viewport" setter="" getter="get_root"> The SceneTree's [Viewport]. </member> <member name="use_font_oversampling" type="bool" setter="set_use_font_oversampling" getter="is_using_font_oversampling"> - If [code]true[/code] font oversampling is used. + If [code]true[/code], font oversampling is used. </member> </members> <signals> diff --git a/doc/classes/ShortCut.xml b/doc/classes/ShortCut.xml index 1b5fc035c2..b3bb364e54 100644 --- a/doc/classes/ShortCut.xml +++ b/doc/classes/ShortCut.xml @@ -32,7 +32,7 @@ <return type="bool"> </return> <description> - If [code]true[/code] this shortcut is valid. + If [code]true[/code], this shortcut is valid. </description> </method> </methods> diff --git a/doc/classes/Spatial.xml b/doc/classes/Spatial.xml index 6f9d779737..e7dc0dcc3f 100644 --- a/doc/classes/Spatial.xml +++ b/doc/classes/Spatial.xml @@ -318,7 +318,7 @@ Local translation of this node. </member> <member name="visible" type="bool" setter="set_visible" getter="is_visible"> - If [code]true[/code] this node is drawn. Default value: [code]true[/code]. + If [code]true[/code], this node is drawn. Default value: [code]true[/code]. </member> </members> <signals> diff --git a/doc/classes/SpatialMaterial.xml b/doc/classes/SpatialMaterial.xml index 3503505999..62a34821fe 100644 --- a/doc/classes/SpatialMaterial.xml +++ b/doc/classes/SpatialMaterial.xml @@ -23,12 +23,12 @@ The strength of the anisotropy effect. </member> <member name="anisotropy_enabled" type="bool" setter="set_feature" getter="get_feature"> - If [code]true[/code] anisotropy is enabled. Changes the shape of the specular blob and aligns it to tangent space. Default value: [code]false[/code]. + If [code]true[/code], anisotropy is enabled. Changes the shape of the specular blob and aligns it to tangent space. Default value: [code]false[/code]. </member> <member name="anisotropy_flowmap" type="Texture" setter="set_texture" getter="get_texture"> </member> <member name="ao_enabled" type="bool" setter="set_feature" getter="get_feature"> - If [code]true[/code] ambient occlusion is enabled. + If [code]true[/code], ambient occlusion is enabled. </member> <member name="ao_light_affect" type="float" setter="set_ao_light_affect" getter="get_ao_light_affect"> </member> @@ -41,7 +41,7 @@ <member name="clearcoat" type="float" setter="set_clearcoat" getter="get_clearcoat"> </member> <member name="clearcoat_enabled" type="bool" setter="set_feature" getter="get_feature"> - If [code]true[/code] clearcoat rendering is enabled. Adds a secondary transparent pass to the material. Default value: [code]false[/code]. + If [code]true[/code], clearcoat rendering is enabled. Adds a secondary transparent pass to the material. Default value: [code]false[/code]. </member> <member name="clearcoat_gloss" type="float" setter="set_clearcoat_gloss" getter="get_clearcoat_gloss"> </member> @@ -50,7 +50,7 @@ <member name="depth_deep_parallax" type="bool" setter="set_depth_deep_parallax" getter="is_depth_deep_parallax_enabled"> </member> <member name="depth_enabled" type="bool" setter="set_feature" getter="get_feature"> - If [code]true[/code] Depth mapping is enabled. See also [member normal_enabled]. + If [code]true[/code], Depth mapping is enabled. See also [member normal_enabled]. </member> <member name="depth_flip_binormal" type="bool" setter="set_depth_deep_parallax_flip_binormal" getter="get_depth_deep_parallax_flip_binormal"> </member> @@ -86,7 +86,7 @@ The emitted light's color. See [member emission_enabled]. </member> <member name="emission_enabled" type="bool" setter="set_feature" getter="get_feature"> - If [code]true[/code] the body emits light. + If [code]true[/code], the body emits light. </member> <member name="emission_energy" type="float" setter="set_emission_energy" getter="get_emission_energy"> The emitted light's strength. See [member emission_enabled]. @@ -100,33 +100,33 @@ <member name="flags_albedo_tex_force_srgb" type="bool" setter="set_flag" getter="get_flag"> </member> <member name="flags_disable_ambient_light" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code] the object receives no ambient light. Default value: [code]false[/code]. + If [code]true[/code], the object receives no ambient light. Default value: [code]false[/code]. </member> <member name="flags_do_not_receive_shadows" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code] the object receives no shadow that would otherwise be cast onto it. Default value: [code]false[/code]. + If [code]true[/code], the object receives no shadow that would otherwise be cast onto it. Default value: [code]false[/code]. </member> <member name="flags_ensure_correct_normals" type="bool" setter="set_flag" getter="get_flag"> </member> <member name="flags_fixed_size" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code] the object is rendered at the same size regardless of distance. Default value: [code]false[/code]. + If [code]true[/code], the object is rendered at the same size regardless of distance. Default value: [code]false[/code]. </member> <member name="flags_no_depth_test" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code] depth testing is disabled and the object will be drawn in render order. + If [code]true[/code], depth testing is disabled and the object will be drawn in render order. </member> <member name="flags_transparent" type="bool" setter="set_feature" getter="get_feature"> - If [code]true[/code] transparency is enabled on the body. Default value: [code]false[/code]. See also [member params_blend_mode]. + If [code]true[/code], transparency is enabled on the body. Default value: [code]false[/code]. See also [member params_blend_mode]. </member> <member name="flags_unshaded" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code] the object is unaffected by lighting. Default value: [code]false[/code]. + If [code]true[/code], the object is unaffected by lighting. Default value: [code]false[/code]. </member> <member name="flags_use_point_size" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code] render point size can be changed. Note: this is only effective for objects whose geometry is point-based rather than triangle-based. See also [member params_point_size]. + If [code]true[/code], render point size can be changed. Note: this is only effective for objects whose geometry is point-based rather than triangle-based. See also [member params_point_size]. </member> <member name="flags_vertex_lighting" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code] lighting is calculated per vertex rather than per pixel. This may increase performance on low-end devices. Default value: [code]false[/code]. + If [code]true[/code], lighting is calculated per vertex rather than per pixel. This may increase performance on low-end devices. Default value: [code]false[/code]. </member> <member name="flags_world_triplanar" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code] triplanar mapping is calculated in world space rather than object local space. See also [member uv1_triplanar]. Default value: [code]false[/code]. + If [code]true[/code], triplanar mapping is calculated in world space rather than object local space. See also [member uv1_triplanar]. Default value: [code]false[/code]. </member> <member name="metallic" type="float" setter="set_metallic" getter="get_metallic"> The reflectivity of the object's surface. The higher the value the more light is reflected. @@ -139,7 +139,7 @@ <member name="metallic_texture_channel" type="int" setter="set_metallic_texture_channel" getter="get_metallic_texture_channel" enum="SpatialMaterial.TextureChannel"> </member> <member name="normal_enabled" type="bool" setter="set_feature" getter="get_feature"> - If [code]true[/code] normal mapping is enabled. + If [code]true[/code], normal mapping is enabled. </member> <member name="normal_scale" type="float" setter="set_normal_scale" getter="get_normal_scale"> The strength of the normal map's effect. @@ -166,7 +166,7 @@ The algorithm used for diffuse light scattering. See [enum DiffuseMode]. </member> <member name="params_grow" type="bool" setter="set_grow_enabled" getter="is_grow_enabled"> - If [code]true[/code] enables the vertex grow setting. See [member params_grow_amount]. + If [code]true[/code], enables the vertex grow setting. See [member params_grow_amount]. </member> <member name="params_grow_amount" type="float" setter="set_grow" getter="get_grow"> Grows object vertices in the direction of their normals. @@ -185,7 +185,7 @@ The number of horizontal frames in the particle spritesheet. Only enabled when using [code]BillboardMode.BILLBOARD_PARTICLES[/code]. See [member params_billboard_mode]. </member> <member name="particles_anim_loop" type="bool" setter="set_particles_anim_loop" getter="get_particles_anim_loop"> - If [code]true[/code] particle animations are looped. Only enabled when using [code]BillboardMode.BILLBOARD_PARTICLES[/code]. See [member params_billboard_mode]. + If [code]true[/code], particle animations are looped. Only enabled when using [code]BillboardMode.BILLBOARD_PARTICLES[/code]. See [member params_billboard_mode]. </member> <member name="particles_anim_v_frames" type="int" setter="set_particles_anim_v_frames" getter="get_particles_anim_v_frames"> The number of vertical frames in the particle spritesheet. Only enabled when using [code]BillboardMode.BILLBOARD_PARTICLES[/code]. See [member params_billboard_mode]. @@ -193,10 +193,10 @@ <member name="proximity_fade_distance" type="float" setter="set_proximity_fade_distance" getter="get_proximity_fade_distance"> </member> <member name="proximity_fade_enable" type="bool" setter="set_proximity_fade" getter="is_proximity_fade_enabled"> - If [code]true[/code] the proximity and distance fade effect is enabled. Default value: [code]false[/code]. + If [code]true[/code], the proximity and distance fade effect is enabled. Default value: [code]false[/code]. </member> <member name="refraction_enabled" type="bool" setter="set_feature" getter="get_feature"> - If [code]true[/code] the refraction effect is enabled. Distorts transparency based on light from behind the object. Default value: [code]false[/code]. + If [code]true[/code], the refraction effect is enabled. Distorts transparency based on light from behind the object. Default value: [code]false[/code]. </member> <member name="refraction_scale" type="float" setter="set_refraction" getter="get_refraction"> The strength of the refraction effect. @@ -208,7 +208,7 @@ <member name="rim" type="float" setter="set_rim" getter="get_rim"> </member> <member name="rim_enabled" type="bool" setter="set_feature" getter="get_feature"> - If [code]true[/code] rim effect is enabled. Default value: [code]false[/code]. + If [code]true[/code], rim effect is enabled. Default value: [code]false[/code]. </member> <member name="rim_texture" type="Texture" setter="set_texture" getter="get_texture"> </member> @@ -223,7 +223,7 @@ <member name="roughness_texture_channel" type="int" setter="set_roughness_texture_channel" getter="get_roughness_texture_channel" enum="SpatialMaterial.TextureChannel"> </member> <member name="subsurf_scatter_enabled" type="bool" setter="set_feature" getter="get_feature"> - If [code]true[/code] subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges. + If [code]true[/code], subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges. </member> <member name="subsurf_scatter_strength" type="float" setter="set_subsurface_scattering_strength" getter="get_subsurface_scattering_strength"> The strength of the subsurface scattering effect. @@ -234,7 +234,7 @@ The color used by the transmission effect. Represents the light passing through an object. </member> <member name="transmission_enabled" type="bool" setter="set_feature" getter="get_feature"> - If [code]true[/code] the transmission effect is enabled. Default value: [code]false[/code]. + If [code]true[/code], the transmission effect is enabled. Default value: [code]false[/code]. </member> <member name="transmission_texture" type="Texture" setter="set_texture" getter="get_texture"> </member> @@ -255,10 +255,10 @@ <member name="uv2_triplanar_sharpness" type="float" setter="set_uv2_triplanar_blend_sharpness" getter="get_uv2_triplanar_blend_sharpness"> </member> <member name="vertex_color_is_srgb" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code] the model's vertex colors are processed as sRGB mode. Default value: [code]false[/code]. + If [code]true[/code], the model's vertex colors are processed as sRGB mode. Default value: [code]false[/code]. </member> <member name="vertex_color_use_as_albedo" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code] the vertex color is used as albedo color. Default value: [code]false[/code]. + If [code]true[/code], the vertex color is used as albedo color. Default value: [code]false[/code]. </member> </members> <constants> diff --git a/doc/classes/Sprite.xml b/doc/classes/Sprite.xml index 52650c7300..d1cdbffc6c 100644 --- a/doc/classes/Sprite.xml +++ b/doc/classes/Sprite.xml @@ -29,13 +29,13 @@ </methods> <members> <member name="centered" type="bool" setter="set_centered" getter="is_centered"> - If [code]true[/code] texture is centered. Default value: [code]true[/code]. + If [code]true[/code], texture is centered. Default value: [code]true[/code]. </member> <member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h"> - If [code]true[/code] texture is flipped horizontally. Default value: [code]false[/code]. + If [code]true[/code], texture is flipped horizontally. Default value: [code]false[/code]. </member> <member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v"> - If [code]true[/code] texture is flipped vertically. Default value: [code]false[/code]. + If [code]true[/code], texture is flipped vertically. Default value: [code]false[/code]. </member> <member name="frame" type="int" setter="set_frame" getter="get_frame"> Current frame to display from sprite sheet. [member vframes] or [member hframes] must be greater than 1. @@ -50,10 +50,10 @@ The texture's drawing offset. </member> <member name="region_enabled" type="bool" setter="set_region" getter="is_region"> - If [code]true[/code] texture is cut from a larger atlas texture. See [code]region_rect[/code]. Default value: [code]false[/code]. + If [code]true[/code], texture is cut from a larger atlas texture. See [code]region_rect[/code]. Default value: [code]false[/code]. </member> <member name="region_filter_clip" type="bool" setter="set_region_filter_clip" getter="is_region_filter_clip_enabled"> - If [code]true[/code] the outermost pixels get blurred out. + If [code]true[/code], the outermost pixels get blurred out. </member> <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect"> The region of the atlas texture to display. [member region_enabled] must be [code]true[/code]. diff --git a/doc/classes/Sprite3D.xml b/doc/classes/Sprite3D.xml index 2a65246dde..f43fa34785 100644 --- a/doc/classes/Sprite3D.xml +++ b/doc/classes/Sprite3D.xml @@ -20,7 +20,7 @@ The number of columns in the sprite sheet. </member> <member name="region_enabled" type="bool" setter="set_region" getter="is_region"> - If [code]true[/code] texture will be cut from a larger atlas texture. See [member region_rect]. Default value: [code]false[/code]. + If [code]true[/code], texture will be cut from a larger atlas texture. See [member region_rect]. Default value: [code]false[/code]. </member> <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect"> The region of the atlas texture to display. [member region_enabled] must be [code]true[/code]. diff --git a/doc/classes/SpriteBase3D.xml b/doc/classes/SpriteBase3D.xml index fd4b583928..12d58808d5 100644 --- a/doc/classes/SpriteBase3D.xml +++ b/doc/classes/SpriteBase3D.xml @@ -31,16 +31,16 @@ The direction in which the front of the texture faces. </member> <member name="centered" type="bool" setter="set_centered" getter="is_centered"> - If [code]true[/code] texture will be centered. Default value: [code]true[/code]. + If [code]true[/code], texture will be centered. Default value: [code]true[/code]. </member> <member name="double_sided" type="bool" setter="set_draw_flag" getter="get_draw_flag"> - If [code]true[/code] texture can be seen from the back as well, if [code]false[/code], it is invisible when looking at it from behind. Default value: [code]true[/code]. + If [code]true[/code], texture can be seen from the back as well, if [code]false[/code], it is invisible when looking at it from behind. Default value: [code]true[/code]. </member> <member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h"> - If [code]true[/code] texture is flipped horizontally. Default value: [code]false[/code]. + If [code]true[/code], texture is flipped horizontally. Default value: [code]false[/code]. </member> <member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v"> - If [code]true[/code] texture is flipped vertically. Default value: [code]false[/code]. + If [code]true[/code], texture is flipped vertically. Default value: [code]false[/code]. </member> <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate"> A color value that gets multiplied on, could be used for mood-coloring or to simulate the color of light. @@ -55,10 +55,10 @@ The size of one pixel's width on the Sprite to scale it in 3D. </member> <member name="shaded" type="bool" setter="set_draw_flag" getter="get_draw_flag"> - If [code]true[/code] the [Light] in the [Environment] has effects on the Sprite. Default value: [code]false[/code]. + If [code]true[/code], the [Light] in the [Environment] has effects on the Sprite. Default value: [code]false[/code]. </member> <member name="transparent" type="bool" setter="set_draw_flag" getter="get_draw_flag"> - If [code]true[/code] the texture's transparency and the opacity are used to make those parts of the Sprite invisible. Default value: [code]true[/code]. + If [code]true[/code], the texture's transparency and the opacity are used to make those parts of the Sprite invisible. Default value: [code]true[/code]. </member> </members> <constants> diff --git a/doc/classes/SpriteFrames.xml b/doc/classes/SpriteFrames.xml index 0e11d797e4..e261b2112f 100644 --- a/doc/classes/SpriteFrames.xml +++ b/doc/classes/SpriteFrames.xml @@ -55,7 +55,7 @@ <argument index="0" name="anim" type="String"> </argument> <description> - If [code]true[/code] the given animation will loop. + If [code]true[/code], the given animation will loop. </description> </method> <method name="get_animation_names" qualifiers="const"> @@ -100,7 +100,7 @@ <argument index="0" name="anim" type="String"> </argument> <description> - If [code]true[/code] the named animation exists. + If [code]true[/code], the named animation exists. </description> </method> <method name="remove_animation"> @@ -142,7 +142,7 @@ <argument index="1" name="loop" type="bool"> </argument> <description> - If [code]true[/code] the animation will loop. + If [code]true[/code], the animation will loop. </description> </method> <method name="set_animation_speed"> diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml index f17c10b31e..04285b62df 100644 --- a/doc/classes/TabContainer.xml +++ b/doc/classes/TabContainer.xml @@ -148,7 +148,7 @@ The alignment of all tabs in the tab container. See the [code]ALIGN_*[/code] constants for details. </member> <member name="tabs_visible" type="bool" setter="set_tabs_visible" getter="are_tabs_visible"> - If [code]true[/code] tabs are visible. If [code]false[/code] tabs' content and titles are hidden. Default value: [code]true[/code]. + If [code]true[/code], tabs are visible. If [code]false[/code], tabs' content and titles are hidden. Default value: [code]true[/code]. </member> </members> <signals> diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml index 350b49513d..de57250d8b 100644 --- a/doc/classes/Tabs.xml +++ b/doc/classes/Tabs.xml @@ -126,7 +126,7 @@ <argument index="0" name="enabled" type="bool"> </argument> <description> - If [code]true[/code] enables selecting a tab with right mouse button. + If [code]true[/code], enables selecting a tab with right mouse button. </description> </method> <method name="set_tab_disabled"> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index b2e3885ff2..e237cfa220 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -359,39 +359,39 @@ </methods> <members> <member name="breakpoint_gutter" type="bool" setter="set_breakpoint_gutter_enabled" getter="is_breakpoint_gutter_enabled"> - If [code]true[/code] the breakpoint gutter is visible. + If [code]true[/code], the breakpoint gutter is visible. </member> <member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled"> - If [code]true[/code] the caret (visual cursor) blinks. + If [code]true[/code], the caret (visual cursor) blinks. </member> <member name="caret_blink_speed" type="float" setter="cursor_set_blink_speed" getter="cursor_get_blink_speed"> Duration (in seconds) of a caret's blinking cycle. </member> <member name="caret_block_mode" type="bool" setter="cursor_set_block_mode" getter="cursor_is_block_mode"> - If [code]true[/code] the caret displays as a rectangle. - If [code]false[/code] the caret displays as a bar. + If [code]true[/code], the caret displays as a rectangle. + If [code]false[/code], the caret displays as a bar. </member> <member name="caret_moving_by_right_click" type="bool" setter="set_right_click_moves_caret" getter="is_right_click_moving_caret"> - If [code]true[/code] a right click moves the cursor at the mouse position before displaying the context menu. - If [code]false[/code] the context menu disregards mouse location. + If [code]true[/code], a right click moves the cursor at the mouse position before displaying the context menu. + If [code]false[/code], the context menu disregards mouse location. </member> <member name="context_menu_enabled" type="bool" setter="set_context_menu_enabled" getter="is_context_menu_enabled"> - If [code]true[/code] a right click displays the context menu. + If [code]true[/code], a right click displays the context menu. </member> <member name="hiding_enabled" type="int" setter="set_hiding_enabled" getter="is_hiding_enabled"> </member> <member name="highlight_all_occurrences" type="bool" setter="set_highlight_all_occurrences" getter="is_highlight_all_occurrences_enabled"> </member> <member name="highlight_current_line" type="bool" setter="set_highlight_current_line" getter="is_highlight_current_line_enabled"> - If [code]true[/code] the line containing the cursor is highlighted. + If [code]true[/code], the line containing the cursor is highlighted. </member> <member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color"> </member> <member name="readonly" type="bool" setter="set_readonly" getter="is_readonly"> - If [code]true[/code] read-only mode is enabled. Existing text cannot be modified and new text cannot be added. + If [code]true[/code], read-only mode is enabled. Existing text cannot be modified and new text cannot be added. </member> <member name="show_line_numbers" type="bool" setter="set_show_line_numbers" getter="is_show_line_numbers_enabled"> - If [code]true[/code] line numbers are displayed to the left of the text. + If [code]true[/code], line numbers are displayed to the left of the text. </member> <member name="smooth_scrolling" type="bool" setter="set_smooth_scroll_enable" getter="is_smooth_scroll_enabled"> </member> diff --git a/doc/classes/TextureButton.xml b/doc/classes/TextureButton.xml index 7e54ab9fe8..f61db22138 100644 --- a/doc/classes/TextureButton.xml +++ b/doc/classes/TextureButton.xml @@ -15,7 +15,7 @@ </methods> <members> <member name="expand" type="bool" setter="set_expand" getter="get_expand"> - If [code]true[/code] the texture stretches to the edges of the node's bounding rectangle using the [member stretch_mode]. If [code]false[/code] the texture will not scale with the node. Default value: [code]false[/code]. + If [code]true[/code], the texture stretches to the edges of the node's bounding rectangle using the [member stretch_mode]. If [code]false[/code], the texture will not scale with the node. Default value: [code]false[/code]. </member> <member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" enum="TextureButton.StretchMode"> Controls the texture's behavior when you resize the node's bounding rectangle, [b]only if[/b] [member expand] is [code]true[/code]. Set it to one of the [code]STRETCH_*[/code] constants. See the constants to learn more. diff --git a/doc/classes/TextureProgress.xml b/doc/classes/TextureProgress.xml index 3cbaf0429c..a98a2e9f74 100644 --- a/doc/classes/TextureProgress.xml +++ b/doc/classes/TextureProgress.xml @@ -17,7 +17,7 @@ The fill direction. Uses FILL_* constants. </member> <member name="nine_patch_stretch" type="bool" setter="set_nine_patch_stretch" getter="get_nine_patch_stretch"> - If [code]true[/code] Godot treats the bar's textures like [NinePatchRect]. Use [code]stretch_margin_*[/code], like [member stretch_margin_bottom], to set up the nine patch's 3x3 grid. Default value: [code]false[/code]. + If [code]true[/code], Godot treats the bar's textures like [NinePatchRect]. Use [code]stretch_margin_*[/code], like [member stretch_margin_bottom], to set up the nine patch's 3x3 grid. Default value: [code]false[/code]. </member> <member name="radial_center_offset" type="Vector2" setter="set_radial_center_offset" getter="get_radial_center_offset"> Offsets [member texture_progress] if [member fill_mode] is [code]FILL_CLOCKWISE[/code] or [code]FILL_COUNTER_CLOCKWISE[/code]. diff --git a/doc/classes/TextureRect.xml b/doc/classes/TextureRect.xml index 95afc5d281..78065afcc9 100644 --- a/doc/classes/TextureRect.xml +++ b/doc/classes/TextureRect.xml @@ -14,7 +14,7 @@ </methods> <members> <member name="expand" type="bool" setter="set_expand" getter="has_expand"> - If [code]true[/code] the texture scales to fit its bounding rectangle. Default value: [code]false[/code]. + If [code]true[/code], the texture scales to fit its bounding rectangle. Default value: [code]false[/code]. </member> <member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" enum="TextureRect.StretchMode"> Controls the texture's behavior when resizing the node's bounding rectangle. See [enum StretchMode]. diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index 7034d75473..a272508f10 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -257,7 +257,7 @@ Position for tile origin. Uses TILE_ORIGIN_* constants. Default value: TILE_ORIGIN_TOP_LEFT. </member> <member name="cell_y_sort" type="bool" setter="set_y_sort_mode" getter="is_y_sort_mode_enabled"> - If [code]true[/code] the TileMap's children will be drawn in order of their Y coordinate. Default value: [code]false[/code]. + If [code]true[/code], the TileMap's children will be drawn in order of their Y coordinate. Default value: [code]false[/code]. </member> <member name="collision_bounce" type="float" setter="set_collision_bounce" getter="get_collision_bounce"> Bounce value for static body collisions (see [code]collision_use_kinematic[/code]). Default value: 0. @@ -272,7 +272,7 @@ The collision mask(s) for all colliders in the TileMap. </member> <member name="collision_use_kinematic" type="bool" setter="set_collision_use_kinematic" getter="get_collision_use_kinematic"> - If [code]true[/code] TileMap collisions will be handled as a kinematic body. If [code]false[/code] collisions will be handled as static body. Default value: [code]false[/code]. + If [code]true[/code], TileMap collisions will be handled as a kinematic body. If [code]false[/code], collisions will be handled as static body. Default value: [code]false[/code]. </member> <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="TileMap.Mode"> The TileMap orientation mode. Uses MODE_* constants. Default value: MODE_SQUARE. diff --git a/doc/classes/Timer.xml b/doc/classes/Timer.xml index 65d638c4c0..1d9b08cbd6 100644 --- a/doc/classes/Timer.xml +++ b/doc/classes/Timer.xml @@ -38,13 +38,13 @@ </methods> <members> <member name="autostart" type="bool" setter="set_autostart" getter="has_autostart"> - If [code]true[/code] the timer will automatically start when entering the scene tree. Default value: [code]false[/code]. + If [code]true[/code], the timer will automatically start when entering the scene tree. Default value: [code]false[/code]. </member> <member name="one_shot" type="bool" setter="set_one_shot" getter="is_one_shot"> - If [code]true[/code] the timer will stop when reaching 0. If [code]false[/code] it will restart. Default value: [code]false[/code]. + If [code]true[/code], the timer will stop when reaching 0. If [code]false[/code], it will restart. Default value: [code]false[/code]. </member> <member name="paused" type="bool" setter="set_paused" getter="is_paused"> - If [code]true[/code] the timer is paused and will not process until it is unpaused again, even if [method start] is called. + If [code]true[/code], the timer is paused and will not process until it is unpaused again, even if [method start] is called. </member> <member name="process_mode" type="int" setter="set_timer_process_mode" getter="get_timer_process_mode" enum="Timer.TimerProcessMode"> Processing mode. See [enum TimerProcessMode]. diff --git a/doc/classes/TouchScreenButton.xml b/doc/classes/TouchScreenButton.xml index 1b37ce95ba..6cc688d3c5 100644 --- a/doc/classes/TouchScreenButton.xml +++ b/doc/classes/TouchScreenButton.xml @@ -30,7 +30,7 @@ The button's texture for the normal state. </member> <member name="passby_press" type="bool" setter="set_passby_press" getter="is_passby_press_enabled"> - If [code]true[/code] passby presses are enabled. + If [code]true[/code], passby presses are enabled. </member> <member name="pressed" type="Texture" setter="set_texture_pressed" getter="get_texture_pressed"> The button's texture for the pressed state. @@ -39,10 +39,10 @@ The button's shape. </member> <member name="shape_centered" type="bool" setter="set_shape_centered" getter="is_shape_centered"> - If [code]true[/code] the button's shape is centered. + If [code]true[/code], the button's shape is centered. </member> <member name="shape_visible" type="bool" setter="set_shape_visible" getter="is_shape_visible"> - If [code]true[/code] the button's shape is visible. + If [code]true[/code], the button's shape is visible. </member> <member name="visibility_mode" type="int" setter="set_visibility_mode" getter="get_visibility_mode" enum="TouchScreenButton.VisibilityMode"> The button's visibility mode. See [code]VISIBILITY_*[/code] constants. diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index 1ad8166b91..d4a11247dc 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -184,7 +184,7 @@ <argument index="1" name="expand" type="bool"> </argument> <description> - If [code]true[/code] the column will have the "Expand" flag of [Control]. + If [code]true[/code], the column will have the "Expand" flag of [Control]. </description> </method> <method name="set_column_min_width"> @@ -215,16 +215,16 @@ <argument index="0" name="visible" type="bool"> </argument> <description> - If [code]true[/code] column titles are visible. + If [code]true[/code], column titles are visible. </description> </method> </methods> <members> <member name="allow_reselect" type="bool" setter="set_allow_reselect" getter="get_allow_reselect"> - If [code]true[/code] the currently selected cell may be selected again. + If [code]true[/code], the currently selected cell may be selected again. </member> <member name="allow_rmb_select" type="bool" setter="set_allow_rmb_select" getter="get_allow_rmb_select"> - If [code]true[/code] a right mouse button click can select items. + If [code]true[/code], a right mouse button click can select items. </member> <member name="columns" type="int" setter="set_columns" getter="get_columns"> The amount of columns. @@ -233,10 +233,10 @@ The drop mode as an OR combination of flags. See [code]DROP_MODE_*[/code] constants. Once dropping is done, reverts to [code]DROP_MODE_DISABLED[/code]. Setting this during [method Control.can_drop_data] is recommended. </member> <member name="hide_folding" type="bool" setter="set_hide_folding" getter="is_folding_hidden"> - If [code]true[/code] the folding arrow is hidden. + If [code]true[/code], the folding arrow is hidden. </member> <member name="hide_root" type="bool" setter="set_hide_root" getter="is_root_hidden"> - If [code]true[/code] the tree's root is hidden. + If [code]true[/code], the tree's root is hidden. </member> <member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" enum="Tree.SelectMode"> Allow single or multiple selection. See the [code]SELECT_*[/code] constants. diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index b4227b34be..209e5a8bd0 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -352,7 +352,7 @@ <argument index="1" name="checked" type="bool"> </argument> <description> - If [code]true[/code] the column [code]column[/code] is checked. + If [code]true[/code], the column [code]column[/code] is checked. </description> </method> <method name="set_custom_as_button"> @@ -411,7 +411,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> - If [code]true[/code] column [code]column[/code] is editable. + If [code]true[/code], column [code]column[/code] is editable. </description> </method> <method name="set_expand_right"> @@ -422,7 +422,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> - If [code]true[/code] column [code]column[/code] is expanded to the right. + If [code]true[/code], column [code]column[/code] is expanded to the right. </description> </method> <method name="set_icon"> @@ -502,7 +502,7 @@ <argument index="1" name="selectable" type="bool"> </argument> <description> - If [code]true[/code] the given column is selectable. + If [code]true[/code], the given column is selectable. </description> </method> <method name="set_text"> @@ -540,13 +540,13 @@ </methods> <members> <member name="collapsed" type="bool" setter="set_collapsed" getter="is_collapsed"> - If [code]true[/code] the TreeItem is collapsed. + If [code]true[/code], the TreeItem is collapsed. </member> <member name="custom_minimum_height" type="int" setter="set_custom_minimum_height" getter="get_custom_minimum_height"> The custom minimum height. </member> <member name="disable_folding" type="bool" setter="set_disable_folding" getter="is_folding_disabled"> - If [code]true[/code] folding is disabled for this TreeItem. + If [code]true[/code], folding is disabled for this TreeItem. </member> </members> <constants> diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml index e792835605..b902821fb2 100644 --- a/doc/classes/Tween.xml +++ b/doc/classes/Tween.xml @@ -346,7 +346,7 @@ The tween's speed multiplier. For example, set it to [code]1.0[/code] for normal speed, [code]2.0[/code] for two times normal speed, or [code]0.5[/code] for half of the normal speed. A value of [code]0[/code] pauses the animation, but see also [method set_active] or [method stop_all] for this. </member> <member name="repeat" type="bool" setter="set_repeat" getter="is_repeat"> - If [code]true[/code] the tween loops. + If [code]true[/code], the tween loops. </member> </members> <signals> diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml index 9ffa3aa52b..c4c129b0f6 100644 --- a/doc/classes/VideoPlayer.xml +++ b/doc/classes/VideoPlayer.xml @@ -52,7 +52,7 @@ The embedded audio track to play. </member> <member name="autoplay" type="bool" setter="set_autoplay" getter="has_autoplay"> - If [code]true[/code] playback starts when the scene loads. Default value: [code]false[/code]. + If [code]true[/code], playback starts when the scene loads. Default value: [code]false[/code]. </member> <member name="buffering_msec" type="int" setter="set_buffering_msec" getter="get_buffering_msec"> Amount of time in milliseconds to store in buffer while playing. @@ -61,10 +61,10 @@ Audio bus to use for sound playback. </member> <member name="expand" type="bool" setter="set_expand" getter="has_expand"> - If [code]true[/code] the video scales to the control size. Default value: [code]true[/code]. + If [code]true[/code], the video scales to the control size. Default value: [code]true[/code]. </member> <member name="paused" type="bool" setter="set_paused" getter="is_paused"> - If [code]true[/code] the video is paused. + If [code]true[/code], the video is paused. </member> <member name="stream" type="VideoStream" setter="set_stream" getter="get_stream"> </member> diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 4706651c6e..880dc43c90 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -178,7 +178,7 @@ <argument index="0" name="enabled" type="bool"> </argument> <description> - If [code]true[/code] the size override affects stretch as well. + If [code]true[/code], the size override affects stretch as well. </description> </method> <method name="unhandled_input"> @@ -208,13 +208,13 @@ </methods> <members> <member name="arvr" type="bool" setter="set_use_arvr" getter="use_arvr"> - If [code]true[/code] the viewport will be used in AR/VR process. Default value: [code]false[/code]. + If [code]true[/code], the viewport will be used in AR/VR process. Default value: [code]false[/code]. </member> <member name="audio_listener_enable_2d" type="bool" setter="set_as_audio_listener_2d" getter="is_audio_listener_2d"> - If [code]true[/code] the viewport will process 2D audio streams. Default value: [code]false[/code]. + If [code]true[/code], the viewport will process 2D audio streams. Default value: [code]false[/code]. </member> <member name="audio_listener_enable_3d" type="bool" setter="set_as_audio_listener" getter="is_audio_listener"> - If [code]true[/code] the viewport will process 3D audio streams. Default value: [code]false[/code]. + If [code]true[/code], the viewport will process 3D audio streams. Default value: [code]false[/code]. </member> <member name="canvas_transform" type="Transform2D" setter="set_canvas_transform" getter="get_canvas_transform"> The canvas transform of the viewport, useful for changing the on-screen positions of all child [CanvasItem]s. This is relative to the global canvas transform of the viewport. @@ -223,33 +223,33 @@ The overlay mode for test rendered geometry in debug purposes. Default value: [code]DEBUG_DRAW_DISABLED[/code]. </member> <member name="disable_3d" type="bool" setter="set_disable_3d" getter="is_3d_disabled"> - If [code]true[/code] the viewport will disable 3D rendering. For actual disabling use [code]usage[/code]. Default value: [code]false[/code]. + If [code]true[/code], the viewport will disable 3D rendering. For actual disabling use [code]usage[/code]. Default value: [code]false[/code]. </member> <member name="global_canvas_transform" type="Transform2D" setter="set_global_canvas_transform" getter="get_global_canvas_transform"> The global canvas transform of the viewport. The canvas transform is relative to this. </member> <member name="gui_disable_input" type="bool" setter="set_disable_input" getter="is_input_disabled"> - If [code]true[/code] the viewport will not receive input event. Default value: [code]false[/code]. + If [code]true[/code], the viewport will not receive input event. Default value: [code]false[/code]. </member> <member name="gui_snap_controls_to_pixels" type="bool" setter="set_snap_controls_to_pixels" getter="is_snap_controls_to_pixels_enabled"> - If [code]true[/code] the GUI controls on the viewport will lay pixel perfectly. Default value: [code]true[/code]. + If [code]true[/code], the GUI controls on the viewport will lay pixel perfectly. Default value: [code]true[/code]. </member> <member name="handle_input_locally" type="bool" setter="set_handle_input_locally" getter="is_handling_input_locally"> </member> <member name="hdr" type="bool" setter="set_hdr" getter="get_hdr"> - If [code]true[/code] the viewport rendering will receive benefits from High Dynamic Range algorithm. Default value: [code]true[/code]. + If [code]true[/code], the viewport rendering will receive benefits from High Dynamic Range algorithm. Default value: [code]true[/code]. </member> <member name="keep_3d_linear" type="bool" setter="set_keep_3d_linear" getter="get_keep_3d_linear"> - If [code]true[/code] the result after 3D rendering will not have a linear to sRGB color conversion applied. This is important when the viewport is used as a render target where the result is used as a texture on a 3D object rendered in another viewport. It is also important if the viewport is used to create data that is not color based (noise, heightmaps, pickmaps, etc.). Do not enable this when the viewport is used as a texture on a 2D object or if the viewport is your final output. + If [code]true[/code], the result after 3D rendering will not have a linear to sRGB color conversion applied. This is important when the viewport is used as a render target where the result is used as a texture on a 3D object rendered in another viewport. It is also important if the viewport is used to create data that is not color based (noise, heightmaps, pickmaps, etc.). Do not enable this when the viewport is used as a texture on a 2D object or if the viewport is your final output. </member> <member name="msaa" type="int" setter="set_msaa" getter="get_msaa" enum="Viewport.MSAA"> The multisample anti-aliasing mode. Default value: [code]MSAA_DISABLED[/code]. </member> <member name="own_world" type="bool" setter="set_use_own_world" getter="is_using_own_world"> - If [code]true[/code] the viewport will use [World] defined in [code]world[/code] property. Default value: [code]false[/code]. + If [code]true[/code], the viewport will use [World] defined in [code]world[/code] property. Default value: [code]false[/code]. </member> <member name="physics_object_picking" type="bool" setter="set_physics_object_picking" getter="get_physics_object_picking"> - If [code]true[/code] the objects rendered by viewport become subjects of mouse picking process. Default value: [code]false[/code]. + If [code]true[/code], the objects rendered by viewport become subjects of mouse picking process. Default value: [code]false[/code]. </member> <member name="render_target_clear_mode" type="int" setter="set_clear_mode" getter="get_clear_mode" enum="Viewport.ClearMode"> The clear mode when viewport used as a render target. Default value: [code]CLEAR_MODE_ALWAYS[/code]. @@ -258,7 +258,7 @@ The update mode when viewport used as a render target. Default value: [code]UPDATE_WHEN_VISIBLE[/code]. </member> <member name="render_target_v_flip" type="bool" setter="set_vflip" getter="get_vflip"> - If [code]true[/code] the result of rendering will be flipped vertically. Default value: [code]false[/code]. + If [code]true[/code], the result of rendering will be flipped vertically. Default value: [code]false[/code]. </member> <member name="shadow_atlas_quad_0" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv"> The subdivision amount of first quadrant on shadow atlas. Default value: [code]SHADOW_ATLAS_QUADRANT_SUBDIV_4[/code]. @@ -279,7 +279,7 @@ The width and height of viewport. </member> <member name="transparent_bg" type="bool" setter="set_transparent_background" getter="has_transparent_background"> - If [code]true[/code] the viewport should render its background as transparent. Default value: [code]false[/code]. + If [code]true[/code], the viewport should render its background as transparent. Default value: [code]false[/code]. </member> <member name="usage" type="int" setter="set_usage" getter="get_usage" enum="Viewport.Usage"> The rendering mode of viewport. Default value: [code]USAGE_3D[/code]. diff --git a/doc/classes/ViewportContainer.xml b/doc/classes/ViewportContainer.xml index dde429440d..e022b8fa90 100644 --- a/doc/classes/ViewportContainer.xml +++ b/doc/classes/ViewportContainer.xml @@ -14,7 +14,7 @@ </methods> <members> <member name="stretch" type="bool" setter="set_stretch" getter="is_stretch_enabled"> - If [code]true[/code] the viewport will be scaled to the control's size. Default value:[code]false[/code]. + If [code]true[/code], the viewport will be scaled to the control's size. Default value:[code]false[/code]. </member> <member name="stretch_shrink" type="int" setter="set_stretch_shrink" getter="get_stretch_shrink"> </member> diff --git a/doc/classes/VisibilityEnabler.xml b/doc/classes/VisibilityEnabler.xml index 5f0a4ef0f4..fc6ceac5de 100644 --- a/doc/classes/VisibilityEnabler.xml +++ b/doc/classes/VisibilityEnabler.xml @@ -14,10 +14,10 @@ </methods> <members> <member name="freeze_bodies" type="bool" setter="set_enabler" getter="is_enabler_enabled"> - If [code]true[/code] [RigidBody] nodes will be paused. + If [code]true[/code], [RigidBody] nodes will be paused. </member> <member name="pause_animations" type="bool" setter="set_enabler" getter="is_enabler_enabled"> - If [code]true[/code] [AnimationPlayer] nodes will be paused. + If [code]true[/code], [AnimationPlayer] nodes will be paused. </member> </members> <constants> diff --git a/doc/classes/VisibilityEnabler2D.xml b/doc/classes/VisibilityEnabler2D.xml index eab9bd1991..8d393fc138 100644 --- a/doc/classes/VisibilityEnabler2D.xml +++ b/doc/classes/VisibilityEnabler2D.xml @@ -14,22 +14,22 @@ </methods> <members> <member name="freeze_bodies" type="bool" setter="set_enabler" getter="is_enabler_enabled"> - If [code]true[/code] [RigidBody2D] nodes will be paused. + If [code]true[/code], [RigidBody2D] nodes will be paused. </member> <member name="pause_animated_sprites" type="bool" setter="set_enabler" getter="is_enabler_enabled"> - If [code]true[/code] [AnimatedSprite] nodes will be paused. + If [code]true[/code], [AnimatedSprite] nodes will be paused. </member> <member name="pause_animations" type="bool" setter="set_enabler" getter="is_enabler_enabled"> - If [code]true[/code] [AnimationPlayer] nodes will be paused. + If [code]true[/code], [AnimationPlayer] nodes will be paused. </member> <member name="pause_particles" type="bool" setter="set_enabler" getter="is_enabler_enabled"> - If [code]true[/code] [Particles2D] nodes will be paused. + If [code]true[/code], [Particles2D] nodes will be paused. </member> <member name="physics_process_parent" type="bool" setter="set_enabler" getter="is_enabler_enabled"> - If [code]true[/code] the parent's [method Node._physics_process] will be stopped. + If [code]true[/code], the parent's [method Node._physics_process] will be stopped. </member> <member name="process_parent" type="bool" setter="set_enabler" getter="is_enabler_enabled"> - If [code]true[/code] the parent's [method Node._process] will be stopped. + If [code]true[/code], the parent's [method Node._process] will be stopped. </member> </members> <constants> diff --git a/doc/classes/VisibilityNotifier.xml b/doc/classes/VisibilityNotifier.xml index 95da708420..16329d1d0d 100644 --- a/doc/classes/VisibilityNotifier.xml +++ b/doc/classes/VisibilityNotifier.xml @@ -15,7 +15,7 @@ <return type="bool"> </return> <description> - If [code]true[/code] the bounding box is on the screen. + If [code]true[/code], the bounding box is on the screen. </description> </method> </methods> diff --git a/doc/classes/VisibilityNotifier2D.xml b/doc/classes/VisibilityNotifier2D.xml index aaaa9b63bb..c60591cce6 100644 --- a/doc/classes/VisibilityNotifier2D.xml +++ b/doc/classes/VisibilityNotifier2D.xml @@ -15,7 +15,7 @@ <return type="bool"> </return> <description> - If [code]true[/code] the bounding rectangle is on the screen. + If [code]true[/code], the bounding rectangle is on the screen. </description> </method> </methods> diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml index d2bc56001c..4fd78b9682 100644 --- a/doc/classes/VisualServer.xml +++ b/doc/classes/VisualServer.xml @@ -3494,7 +3494,7 @@ <argument index="0" name="shrink" type="bool"> </argument> <description> - If [code]true[/code] sets internal processes to shrink all image data to half the size. + If [code]true[/code], sets internal processes to shrink all image data to half the size. </description> </method> <method name="texture_set_size_override"> @@ -3517,7 +3517,7 @@ <argument index="0" name="enable" type="bool"> </argument> <description> - If [code]true[/code] the image will be stored in the texture's images array if overwritten. + If [code]true[/code], the image will be stored in the texture's images array if overwritten. </description> </method> <method name="viewport_attach_camera"> @@ -3610,7 +3610,7 @@ <argument index="1" name="active" type="bool"> </argument> <description> - If [code]true[/code] sets the viewport active, else sets it inactive. + If [code]true[/code], sets the viewport active, else sets it inactive. </description> </method> <method name="viewport_set_canvas_stacking"> @@ -3672,7 +3672,7 @@ <argument index="1" name="disabled" type="bool"> </argument> <description> - If [code]true[/code] a viewport's 3D rendering is disabled. + If [code]true[/code], a viewport's 3D rendering is disabled. </description> </method> <method name="viewport_set_disable_environment"> @@ -3683,7 +3683,7 @@ <argument index="1" name="disabled" type="bool"> </argument> <description> - If [code]true[/code] rendering of a viewport's environment is disabled. + If [code]true[/code], rendering of a viewport's environment is disabled. </description> </method> <method name="viewport_set_global_canvas_transform"> @@ -3705,7 +3705,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> - If [code]true[/code] the viewport renders to hdr. + If [code]true[/code], the viewport renders to hdr. </description> </method> <method name="viewport_set_hide_canvas"> @@ -3716,7 +3716,7 @@ <argument index="1" name="hidden" type="bool"> </argument> <description> - If [code]true[/code] the viewport's canvas is not rendered. + If [code]true[/code], the viewport's canvas is not rendered. </description> </method> <method name="viewport_set_hide_scenario"> @@ -3808,7 +3808,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> - If [code]true[/code] the viewport renders its background as transparent. + If [code]true[/code], the viewport renders its background as transparent. </description> </method> <method name="viewport_set_update_mode"> @@ -3841,7 +3841,7 @@ <argument index="1" name="use_arvr" type="bool"> </argument> <description> - If [code]true[/code] the viewport uses augmented or virtual reality technologies. See [ARVRInterface]. + If [code]true[/code], the viewport uses augmented or virtual reality technologies. See [ARVRInterface]. </description> </method> <method name="viewport_set_vflip"> @@ -3852,7 +3852,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> - If [code]true[/code] the viewport's rendering is flipped vertically. + If [code]true[/code], the viewport's rendering is flipped vertically. </description> </method> </methods> diff --git a/doc/classes/WindowDialog.xml b/doc/classes/WindowDialog.xml index f7f2d10fcd..51931444fc 100644 --- a/doc/classes/WindowDialog.xml +++ b/doc/classes/WindowDialog.xml @@ -21,7 +21,7 @@ </methods> <members> <member name="resizable" type="bool" setter="set_resizable" getter="get_resizable"> - If [code]true[/code] the user can resize the window. Default value: [code]false[/code]. + If [code]true[/code], the user can resize the window. Default value: [code]false[/code]. </member> <member name="window_title" type="String" setter="set_title" getter="get_title"> The text displayed in the window's title bar. diff --git a/doc/classes/YSort.xml b/doc/classes/YSort.xml index 45ae8645b1..e9233ff079 100644 --- a/doc/classes/YSort.xml +++ b/doc/classes/YSort.xml @@ -14,7 +14,7 @@ </methods> <members> <member name="sort_enabled" type="bool" setter="set_sort_enabled" getter="is_sort_enabled"> - If [code]true[/code] child nodes are sorted, otherwise sorting is disabled. Default: [code]true[/code]. + If [code]true[/code], child nodes are sorted, otherwise sorting is disabled. Default: [code]true[/code]. </member> </members> <constants> diff --git a/drivers/gles2/rasterizer_canvas_gles2.cpp b/drivers/gles2/rasterizer_canvas_gles2.cpp index e6be0f57fc..86fe45e498 100644 --- a/drivers/gles2/rasterizer_canvas_gles2.cpp +++ b/drivers/gles2/rasterizer_canvas_gles2.cpp @@ -186,6 +186,42 @@ RasterizerStorageGLES2::Texture *RasterizerCanvasGLES2::_bind_canvas_texture(con glBindTexture(GL_TEXTURE_2D, storage->resources.white_tex); } + if (p_normal_map == state.current_normal) { + //do none + state.canvas_shader.set_uniform(CanvasShaderGLES2::USE_DEFAULT_NORMAL, state.current_normal.is_valid()); + + } else if (p_normal_map.is_valid()) { + + RasterizerStorageGLES2::Texture *normal_map = storage->texture_owner.getornull(p_normal_map); + + if (!normal_map) { + state.current_normal = RID(); + glActiveTexture(GL_TEXTURE0 + storage->config.max_texture_image_units - 2); + glBindTexture(GL_TEXTURE_2D, storage->resources.normal_tex); + state.canvas_shader.set_uniform(CanvasShaderGLES2::USE_DEFAULT_NORMAL, false); + + } else { + + normal_map = normal_map->get_ptr(); + + if (normal_map->redraw_if_visible) { //check before proxy, because this is usually used with proxies + VisualServerRaster::redraw_request(); + } + + glActiveTexture(GL_TEXTURE0 + storage->config.max_texture_image_units - 2); + glBindTexture(GL_TEXTURE_2D, normal_map->tex_id); + state.current_normal = p_normal_map; + state.canvas_shader.set_uniform(CanvasShaderGLES2::USE_DEFAULT_NORMAL, true); + } + + } else { + + state.current_normal = RID(); + glActiveTexture(GL_TEXTURE0 + storage->config.max_texture_image_units - 2); + glBindTexture(GL_TEXTURE_2D, storage->resources.normal_tex); + state.canvas_shader.set_uniform(CanvasShaderGLES2::USE_DEFAULT_NORMAL, false); + } + return tex_return; } @@ -1053,10 +1089,164 @@ void RasterizerCanvasGLES2::canvas_render_items(Item *p_item_list, int p_z, cons _set_uniforms(); - _canvas_item_render_commands(p_item_list, NULL, reclip, material_ptr); + if (unshaded || (state.uniforms.final_modulate.a > 0.001 && (!shader_cache || shader_cache->canvas_item.light_mode != RasterizerStorageGLES2::Shader::CanvasItem::LIGHT_MODE_LIGHT_ONLY) && !ci->light_masked)) + _canvas_item_render_commands(p_item_list, NULL, reclip, material_ptr); rebind_shader = true; // hacked in for now. + if ((blend_mode == RasterizerStorageGLES2::Shader::CanvasItem::BLEND_MODE_MIX || blend_mode == RasterizerStorageGLES2::Shader::CanvasItem::BLEND_MODE_PMALPHA) && p_light && !unshaded) { + + Light *light = p_light; + bool light_used = false; + VS::CanvasLightMode mode = VS::CANVAS_LIGHT_MODE_ADD; + state.uniforms.final_modulate = ci->final_modulate; // remove the canvas modulate + + while (light) { + + if (ci->light_mask & light->item_mask && p_z >= light->z_min && p_z <= light->z_max && ci->global_rect_cache.intersects_transformed(light->xform_cache, light->rect_cache)) { + + //intersects this light + + if (!light_used || mode != light->mode) { + + mode = light->mode; + + switch (mode) { + + case VS::CANVAS_LIGHT_MODE_ADD: { + glBlendEquation(GL_FUNC_ADD); + glBlendFunc(GL_SRC_ALPHA, GL_ONE); + + } break; + case VS::CANVAS_LIGHT_MODE_SUB: { + glBlendEquation(GL_FUNC_REVERSE_SUBTRACT); + glBlendFunc(GL_SRC_ALPHA, GL_ONE); + } break; + case VS::CANVAS_LIGHT_MODE_MIX: + case VS::CANVAS_LIGHT_MODE_MASK: { + glBlendEquation(GL_FUNC_ADD); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + } break; + } + } + + if (!light_used) { + + state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_LIGHTING, true); + light_used = true; + } + + bool has_shadow = light->shadow_buffer.is_valid() && ci->light_mask & light->item_shadow_mask; + + state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_SHADOWS, has_shadow); + if (has_shadow) { + state.canvas_shader.set_conditional(CanvasShaderGLES2::SHADOW_USE_GRADIENT, light->shadow_gradient_length > 0); + switch (light->shadow_filter) { + + case VS::CANVAS_LIGHT_FILTER_NONE: state.canvas_shader.set_conditional(CanvasShaderGLES2::SHADOW_FILTER_NEAREST, true); break; + case VS::CANVAS_LIGHT_FILTER_PCF3: state.canvas_shader.set_conditional(CanvasShaderGLES2::SHADOW_FILTER_PCF3, true); break; + case VS::CANVAS_LIGHT_FILTER_PCF5: state.canvas_shader.set_conditional(CanvasShaderGLES2::SHADOW_FILTER_PCF5, true); break; + case VS::CANVAS_LIGHT_FILTER_PCF7: state.canvas_shader.set_conditional(CanvasShaderGLES2::SHADOW_FILTER_PCF7, true); break; + case VS::CANVAS_LIGHT_FILTER_PCF9: state.canvas_shader.set_conditional(CanvasShaderGLES2::SHADOW_FILTER_PCF9, true); break; + case VS::CANVAS_LIGHT_FILTER_PCF13: state.canvas_shader.set_conditional(CanvasShaderGLES2::SHADOW_FILTER_PCF13, true); break; + } + } + + bool light_rebind = state.canvas_shader.bind(); + + if (light_rebind) { + + _set_uniforms(); + } + + state.canvas_shader.set_uniform(CanvasShaderGLES2::LIGHT_MATRIX, light->light_shader_xform); + Transform2D basis_inverse = light->light_shader_xform.affine_inverse().orthonormalized(); + basis_inverse[2] = Vector2(); + state.canvas_shader.set_uniform(CanvasShaderGLES2::LIGHT_MATRIX_INVERSE, basis_inverse); + state.canvas_shader.set_uniform(CanvasShaderGLES2::LIGHT_LOCAL_MATRIX, light->xform_cache.affine_inverse()); + state.canvas_shader.set_uniform(CanvasShaderGLES2::LIGHT_COLOR, light->color * light->energy); + state.canvas_shader.set_uniform(CanvasShaderGLES2::LIGHT_POS, light->light_shader_pos); + state.canvas_shader.set_uniform(CanvasShaderGLES2::LIGHT_HEIGHT, light->height); + state.canvas_shader.set_uniform(CanvasShaderGLES2::LIGHT_OUTSIDE_ALPHA, light->mode == VS::CANVAS_LIGHT_MODE_MASK ? 1.0 : 0.0); + + if (has_shadow) { + RasterizerStorageGLES2::CanvasLightShadow *cls = storage->canvas_light_shadow_owner.get(light->shadow_buffer); + glActiveTexture(GL_TEXTURE0 + storage->config.max_texture_image_units - 4); + glBindTexture(GL_TEXTURE_2D, cls->distance); + state.canvas_shader.set_uniform(CanvasShaderGLES2::SHADOW_MATRIX, light->shadow_matrix_cache); + state.canvas_shader.set_uniform(CanvasShaderGLES2::LIGHT_SHADOW_COLOR, light->shadow_color); + state.canvas_shader.set_uniform(CanvasShaderGLES2::SHADOWPIXEL_SIZE, (1.0 / light->shadow_buffer_size) * (1.0 + light->shadow_smooth)); + if (light->radius_cache == 0) { + state.canvas_shader.set_uniform(CanvasShaderGLES2::SHADOW_GRADIENT, 0.0); + } else { + state.canvas_shader.set_uniform(CanvasShaderGLES2::SHADOW_GRADIENT, light->shadow_gradient_length / (light->radius_cache * 1.1)); + } + state.canvas_shader.set_uniform(CanvasShaderGLES2::SHADOW_DISTANCE_MULT, light->radius_cache * 1.1); + + /*canvas_shader.set_uniform(CanvasShaderGLES2::SHADOW_MATRIX,light->shadow_matrix_cache); + canvas_shader.set_uniform(CanvasShaderGLES2::SHADOW_ESM_MULTIPLIER,light->shadow_esm_mult); + canvas_shader.set_uniform(CanvasShaderGLES2::LIGHT_SHADOW_COLOR,light->shadow_color);*/ + } + + glActiveTexture(GL_TEXTURE0 + storage->config.max_texture_image_units - 3); + RasterizerStorageGLES2::Texture *t = storage->texture_owner.getornull(light->texture); + if (!t) { + glBindTexture(GL_TEXTURE_2D, storage->resources.white_tex); + } else { + t = t->get_ptr(); + + glBindTexture(t->target, t->tex_id); + } + + glActiveTexture(GL_TEXTURE0); + _canvas_item_render_commands(p_item_list, NULL, reclip, material_ptr); //redraw using light + } + + light = light->next_ptr; + } + + if (light_used) { + + state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_LIGHTING, false); + state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_SHADOWS, false); + state.canvas_shader.set_conditional(CanvasShaderGLES2::SHADOW_FILTER_NEAREST, false); + state.canvas_shader.set_conditional(CanvasShaderGLES2::SHADOW_FILTER_PCF3, false); + state.canvas_shader.set_conditional(CanvasShaderGLES2::SHADOW_FILTER_PCF5, false); + state.canvas_shader.set_conditional(CanvasShaderGLES2::SHADOW_FILTER_PCF7, false); + state.canvas_shader.set_conditional(CanvasShaderGLES2::SHADOW_FILTER_PCF9, false); + state.canvas_shader.set_conditional(CanvasShaderGLES2::SHADOW_FILTER_PCF13, false); + + state.canvas_shader.bind(); + + last_blend_mode = -1; + + /* + //this is set again, so it should not be needed anyway? + state.canvas_item_modulate = unshaded ? ci->final_modulate : Color( + ci->final_modulate.r * p_modulate.r, + ci->final_modulate.g * p_modulate.g, + ci->final_modulate.b * p_modulate.b, + ci->final_modulate.a * p_modulate.a ); + + + state.canvas_shader.set_uniform(CanvasShaderGLES2::MODELVIEW_MATRIX,state.final_transform); + state.canvas_shader.set_uniform(CanvasShaderGLES2::EXTRA_MATRIX,Transform2D()); + state.canvas_shader.set_uniform(CanvasShaderGLES2::FINAL_MODULATE,state.canvas_item_modulate); + + glBlendEquation(GL_FUNC_ADD); + + if (storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_TRANSPARENT]) { + glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA); + } else { + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + } + + //@TODO RESET canvas_blend_mode + */ + } + } + if (reclip) { glEnable(GL_SCISSOR_TEST); int y = storage->frame.current_rt->height - (current_clip->final_clip_rect.position.y + current_clip->final_clip_rect.size.y); @@ -1077,8 +1267,121 @@ void RasterizerCanvasGLES2::canvas_debug_viewport_shadows(Light *p_lights_with_s } void RasterizerCanvasGLES2::canvas_light_shadow_buffer_update(RID p_buffer, const Transform2D &p_light_xform, int p_light_mask, float p_near, float p_far, LightOccluderInstance *p_occluders, CameraMatrix *p_xform_cache) { -} + RasterizerStorageGLES2::CanvasLightShadow *cls = storage->canvas_light_shadow_owner.get(p_buffer); + ERR_FAIL_COND(!cls); + + glDisable(GL_BLEND); + glDisable(GL_SCISSOR_TEST); + glDisable(GL_DITHER); + glDisable(GL_CULL_FACE); + glDepthFunc(GL_LEQUAL); + glEnable(GL_DEPTH_TEST); + glDepthMask(true); + + glBindFramebuffer(GL_FRAMEBUFFER, cls->fbo); + + state.canvas_shadow_shader.set_conditional(CanvasShadowShaderGLES2::USE_RGBA_SHADOWS, storage->config.use_rgba_2d_shadows); + state.canvas_shadow_shader.bind(); + + glViewport(0, 0, cls->size, cls->height); + glClearDepth(1.0f); + glClearColor(1, 1, 1, 1); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + VS::CanvasOccluderPolygonCullMode cull = VS::CANVAS_OCCLUDER_POLYGON_CULL_DISABLED; + + for (int i = 0; i < 4; i++) { + + //make sure it remains orthogonal, makes easy to read angle later + + Transform light; + light.origin[0] = p_light_xform[2][0]; + light.origin[1] = p_light_xform[2][1]; + light.basis[0][0] = p_light_xform[0][0]; + light.basis[0][1] = p_light_xform[1][0]; + light.basis[1][0] = p_light_xform[0][1]; + light.basis[1][1] = p_light_xform[1][1]; + + //light.basis.scale(Vector3(to_light.elements[0].length(),to_light.elements[1].length(),1)); + + //p_near=1; + CameraMatrix projection; + { + real_t fov = 90; + real_t nearp = p_near; + real_t farp = p_far; + real_t aspect = 1.0; + + real_t ymax = nearp * Math::tan(Math::deg2rad(fov * 0.5)); + real_t ymin = -ymax; + real_t xmin = ymin * aspect; + real_t xmax = ymax * aspect; + + projection.set_frustum(xmin, xmax, ymin, ymax, nearp, farp); + } + + Vector3 cam_target = Basis(Vector3(0, 0, Math_PI * 2 * (i / 4.0))).xform(Vector3(0, 1, 0)); + projection = projection * CameraMatrix(Transform().looking_at(cam_target, Vector3(0, 0, -1)).affine_inverse()); + + state.canvas_shadow_shader.set_uniform(CanvasShadowShaderGLES2::PROJECTION_MATRIX, projection); + state.canvas_shadow_shader.set_uniform(CanvasShadowShaderGLES2::LIGHT_MATRIX, light); + state.canvas_shadow_shader.set_uniform(CanvasShadowShaderGLES2::DISTANCE_NORM, 1.0 / p_far); + + if (i == 0) + *p_xform_cache = projection; + + glViewport(0, (cls->height / 4) * i, cls->size, cls->height / 4); + + LightOccluderInstance *instance = p_occluders; + + while (instance) { + + RasterizerStorageGLES2::CanvasOccluder *cc = storage->canvas_occluder_owner.get(instance->polygon_buffer); + if (!cc || cc->len == 0 || !(p_light_mask & instance->light_mask)) { + + instance = instance->next; + continue; + } + + state.canvas_shadow_shader.set_uniform(CanvasShadowShaderGLES2::WORLD_MATRIX, instance->xform_cache); + if (cull != instance->cull_cache) { + + cull = instance->cull_cache; + switch (cull) { + case VS::CANVAS_OCCLUDER_POLYGON_CULL_DISABLED: { + + glDisable(GL_CULL_FACE); + + } break; + case VS::CANVAS_OCCLUDER_POLYGON_CULL_CLOCKWISE: { + + glEnable(GL_CULL_FACE); + glCullFace(GL_FRONT); + } break; + case VS::CANVAS_OCCLUDER_POLYGON_CULL_COUNTER_CLOCKWISE: { + + glEnable(GL_CULL_FACE); + glCullFace(GL_BACK); + + } break; + } + } + + glBindBuffer(GL_ARRAY_BUFFER, cc->vertex_id); + glEnableVertexAttribArray(VS::ARRAY_VERTEX); + glVertexAttribPointer(VS::ARRAY_VERTEX, 3, GL_FLOAT, false, 0, 0); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, cc->index_id); + + glDrawElements(GL_TRIANGLES, cc->len * 3, GL_UNSIGNED_SHORT, 0); + + instance = instance->next; + } + } + + glBindBuffer(GL_ARRAY_BUFFER, 0); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); +} void RasterizerCanvasGLES2::reset_canvas() { glDisable(GL_CULL_FACE); @@ -1094,7 +1397,7 @@ void RasterizerCanvasGLES2::reset_canvas() { } // bind the back buffer to a texture so shaders can use it. - // It should probably use texture unit -3 (as GLES3 does as well) but currently that's buggy. + // It should probably use texture unit -3 (as GLES2 does as well) but currently that's buggy. // keeping this for now as there's nothing else that uses texture unit 2 // TODO ^ if (storage->frame.current_rt) { @@ -1264,6 +1567,8 @@ void RasterizerCanvasGLES2::initialize() { glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); } + state.canvas_shadow_shader.init(); + state.canvas_shader.init(); state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_TEXTURE_RECT, true); diff --git a/drivers/gles2/rasterizer_canvas_gles2.h b/drivers/gles2/rasterizer_canvas_gles2.h index cf1c239b6e..a940a2f07e 100644 --- a/drivers/gles2/rasterizer_canvas_gles2.h +++ b/drivers/gles2/rasterizer_canvas_gles2.h @@ -36,7 +36,7 @@ #include "shaders/canvas.glsl.gen.h" #include "shaders/lens_distorted.glsl.gen.h" -// #include "shaders/canvas_shadow.glsl.gen.h" +#include "shaders/canvas_shadow.glsl.gen.h" class RasterizerSceneGLES2; @@ -70,7 +70,7 @@ public: Uniforms uniforms; bool canvas_texscreen_used; CanvasShaderGLES2 canvas_shader; - // CanvasShadowShaderGLES3 canvas_shadow_shader; + CanvasShadowShaderGLES2 canvas_shadow_shader; LensDistortedShaderGLES2 lens_shader; bool using_texture_rect; diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp index e68d0f1cc5..810fa701c0 100644 --- a/drivers/gles2/rasterizer_storage_gles2.cpp +++ b/drivers/gles2/rasterizer_storage_gles2.cpp @@ -1138,6 +1138,7 @@ void RasterizerStorageGLES2::_update_shader(Shader *p_shader) const { case VS::SHADER_CANVAS_ITEM: { + p_shader->canvas_item.light_mode = Shader::CanvasItem::LIGHT_MODE_NORMAL; p_shader->canvas_item.blend_mode = Shader::CanvasItem::BLEND_MODE_MIX; p_shader->canvas_item.uses_screen_texture = false; @@ -1150,8 +1151,8 @@ void RasterizerStorageGLES2::_update_shader(Shader *p_shader) const { shaders.actions_canvas.render_mode_values["blend_mul"] = Pair<int *, int>(&p_shader->canvas_item.blend_mode, Shader::CanvasItem::BLEND_MODE_MUL); shaders.actions_canvas.render_mode_values["blend_premul_alpha"] = Pair<int *, int>(&p_shader->canvas_item.blend_mode, Shader::CanvasItem::BLEND_MODE_PMALPHA); - // shaders.actions_canvas.render_mode_values["unshaded"] = Pair<int *, int>(&p_shader->canvas_item.light_mode, Shader::CanvasItem::LIGHT_MODE_UNSHADED); - // shaders.actions_canvas.render_mode_values["light_only"] = Pair<int *, int>(&p_shader->canvas_item.light_mode, Shader::CanvasItem::LIGHT_MODE_LIGHT_ONLY); + shaders.actions_canvas.render_mode_values["unshaded"] = Pair<int *, int>(&p_shader->canvas_item.light_mode, Shader::CanvasItem::LIGHT_MODE_UNSHADED); + shaders.actions_canvas.render_mode_values["light_only"] = Pair<int *, int>(&p_shader->canvas_item.light_mode, Shader::CanvasItem::LIGHT_MODE_LIGHT_ONLY); shaders.actions_canvas.usage_flag_pointers["SCREEN_UV"] = &p_shader->canvas_item.uses_screen_uv; shaders.actions_canvas.usage_flag_pointers["SCREEN_PIXEL_SIZE"] = &p_shader->canvas_item.uses_screen_uv; @@ -4193,16 +4194,154 @@ void RasterizerStorageGLES2::render_target_set_msaa(RID p_render_target, VS::Vie /* CANVAS SHADOW */ RID RasterizerStorageGLES2::canvas_light_shadow_buffer_create(int p_width) { - return RID(); + + CanvasLightShadow *cls = memnew(CanvasLightShadow); + if (p_width > config.max_texture_size) + p_width = config.max_texture_size; + + cls->size = p_width; + cls->height = 16; + + glActiveTexture(GL_TEXTURE0); + + glGenFramebuffers(1, &cls->fbo); + glBindFramebuffer(GL_FRAMEBUFFER, cls->fbo); + + glGenRenderbuffers(1, &cls->depth); + glBindRenderbuffer(GL_RENDERBUFFER, cls->depth); + glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT24, cls->size, cls->height); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, cls->depth); + glBindRenderbuffer(GL_RENDERBUFFER, 0); + + glGenTextures(1, &cls->distance); + glBindTexture(GL_TEXTURE_2D, cls->distance); + if (config.use_rgba_2d_shadows) { + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, cls->size, cls->height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); + } else { + glTexImage2D(GL_TEXTURE_2D, 0, GL_R32F, cls->size, cls->height, 0, GL_RED, GL_FLOAT, NULL); + } + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, cls->distance, 0); + + GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER); + //printf("errnum: %x\n",status); + glBindFramebuffer(GL_FRAMEBUFFER, RasterizerStorageGLES2::system_fbo); + + if (status != GL_FRAMEBUFFER_COMPLETE) { + memdelete(cls); + ERR_FAIL_COND_V(status != GL_FRAMEBUFFER_COMPLETE, RID()); + } + + return canvas_light_shadow_owner.make_rid(cls); } /* LIGHT SHADOW MAPPING */ RID RasterizerStorageGLES2::canvas_light_occluder_create() { - return RID(); + + CanvasOccluder *co = memnew(CanvasOccluder); + co->index_id = 0; + co->vertex_id = 0; + co->len = 0; + + return canvas_occluder_owner.make_rid(co); } void RasterizerStorageGLES2::canvas_light_occluder_set_polylines(RID p_occluder, const PoolVector<Vector2> &p_lines) { + + CanvasOccluder *co = canvas_occluder_owner.get(p_occluder); + ERR_FAIL_COND(!co); + + co->lines = p_lines; + + if (p_lines.size() != co->len) { + + if (co->index_id) + glDeleteBuffers(1, &co->index_id); + if (co->vertex_id) + glDeleteBuffers(1, &co->vertex_id); + + co->index_id = 0; + co->vertex_id = 0; + co->len = 0; + } + + if (p_lines.size()) { + + PoolVector<float> geometry; + PoolVector<uint16_t> indices; + int lc = p_lines.size(); + + geometry.resize(lc * 6); + indices.resize(lc * 3); + + PoolVector<float>::Write vw = geometry.write(); + PoolVector<uint16_t>::Write iw = indices.write(); + + PoolVector<Vector2>::Read lr = p_lines.read(); + + const int POLY_HEIGHT = 16384; + + for (int i = 0; i < lc / 2; i++) { + + vw[i * 12 + 0] = lr[i * 2 + 0].x; + vw[i * 12 + 1] = lr[i * 2 + 0].y; + vw[i * 12 + 2] = POLY_HEIGHT; + + vw[i * 12 + 3] = lr[i * 2 + 1].x; + vw[i * 12 + 4] = lr[i * 2 + 1].y; + vw[i * 12 + 5] = POLY_HEIGHT; + + vw[i * 12 + 6] = lr[i * 2 + 1].x; + vw[i * 12 + 7] = lr[i * 2 + 1].y; + vw[i * 12 + 8] = -POLY_HEIGHT; + + vw[i * 12 + 9] = lr[i * 2 + 0].x; + vw[i * 12 + 10] = lr[i * 2 + 0].y; + vw[i * 12 + 11] = -POLY_HEIGHT; + + iw[i * 6 + 0] = i * 4 + 0; + iw[i * 6 + 1] = i * 4 + 1; + iw[i * 6 + 2] = i * 4 + 2; + + iw[i * 6 + 3] = i * 4 + 2; + iw[i * 6 + 4] = i * 4 + 3; + iw[i * 6 + 5] = i * 4 + 0; + } + + //if same buffer len is being set, just use BufferSubData to avoid a pipeline flush + + if (!co->vertex_id) { + glGenBuffers(1, &co->vertex_id); + glBindBuffer(GL_ARRAY_BUFFER, co->vertex_id); + glBufferData(GL_ARRAY_BUFFER, lc * 6 * sizeof(real_t), vw.ptr(), GL_STATIC_DRAW); + } else { + + glBindBuffer(GL_ARRAY_BUFFER, co->vertex_id); + glBufferSubData(GL_ARRAY_BUFFER, 0, lc * 6 * sizeof(real_t), vw.ptr()); + } + + glBindBuffer(GL_ARRAY_BUFFER, 0); //unbind + + if (!co->index_id) { + + glGenBuffers(1, &co->index_id); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, co->index_id); + glBufferData(GL_ELEMENT_ARRAY_BUFFER, lc * 3 * sizeof(uint16_t), iw.ptr(), GL_DYNAMIC_DRAW); + } else { + + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, co->index_id); + glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, 0, lc * 3 * sizeof(uint16_t), iw.ptr()); + } + + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); //unbind + + co->len = lc; + } } VS::InstanceType RasterizerStorageGLES2::get_base_type(RID p_rid) const { @@ -4415,6 +4554,30 @@ bool RasterizerStorageGLES2::free(RID p_rid) { lightmap_capture_data_owner.free(p_rid); memdelete(lightmap_capture); return true; + + } else if (canvas_occluder_owner.owns(p_rid)) { + + CanvasOccluder *co = canvas_occluder_owner.get(p_rid); + if (co->index_id) + glDeleteBuffers(1, &co->index_id); + if (co->vertex_id) + glDeleteBuffers(1, &co->vertex_id); + + canvas_occluder_owner.free(p_rid); + memdelete(co); + + return true; + + } else if (canvas_light_shadow_owner.owns(p_rid)) { + + CanvasLightShadow *cls = canvas_light_shadow_owner.get(p_rid); + glDeleteFramebuffers(1, &cls->fbo); + glDeleteRenderbuffers(1, &cls->depth); + glDeleteTextures(1, &cls->distance); + canvas_light_shadow_owner.free(p_rid); + memdelete(cls); + + return true; } else { return false; } @@ -4471,6 +4634,7 @@ void RasterizerStorageGLES2::initialize() { config.float_texture_supported = config.extensions.has("GL_ARB_texture_float") || config.extensions.has("GL_OES_texture_float"); config.s3tc_supported = config.extensions.has("GL_EXT_texture_compression_s3tc"); config.etc1_supported = config.extensions.has("GL_OES_compressed_ETC1_RGB8_texture"); + config.use_rgba_2d_shadows = false; frame.count = 0; frame.delta = 0; diff --git a/drivers/gles2/rasterizer_storage_gles2.h b/drivers/gles2/rasterizer_storage_gles2.h index ec7616b9f3..7f9bcb4854 100644 --- a/drivers/gles2/rasterizer_storage_gles2.h +++ b/drivers/gles2/rasterizer_storage_gles2.h @@ -76,6 +76,8 @@ public: bool keep_original_textures; bool force_vertex_shading; + + bool use_rgba_2d_shadows; } config; struct Resources { @@ -86,6 +88,7 @@ public: GLuint aniso_tex; GLuint radical_inverse_vdc_cache_tex; + bool use_rgba_2d_shadows; GLuint quadie; @@ -400,7 +403,6 @@ public: int blend_mode; - /* enum LightMode { LIGHT_MODE_NORMAL, LIGHT_MODE_UNSHADED, @@ -408,7 +410,6 @@ public: }; int light_mode; - */ bool uses_screen_texture; bool uses_screen_uv; @@ -1161,10 +1162,31 @@ public: /* CANVAS SHADOW */ + struct CanvasLightShadow : public RID_Data { + + int size; + int height; + GLuint fbo; + GLuint depth; + GLuint distance; //for older devices + }; + + RID_Owner<CanvasLightShadow> canvas_light_shadow_owner; + virtual RID canvas_light_shadow_buffer_create(int p_width); /* LIGHT SHADOW MAPPING */ + struct CanvasOccluder : public RID_Data { + + GLuint vertex_id; // 0 means, unconfigured + GLuint index_id; // 0 means, unconfigured + PoolVector<Vector2> lines; + int len; + }; + + RID_Owner<CanvasOccluder> canvas_occluder_owner; + virtual RID canvas_light_occluder_create(); virtual void canvas_light_occluder_set_polylines(RID p_occluder, const PoolVector<Vector2> &p_lines); diff --git a/drivers/gles2/shaders/SCsub b/drivers/gles2/shaders/SCsub index d959d3f740..085c43319c 100644 --- a/drivers/gles2/shaders/SCsub +++ b/drivers/gles2/shaders/SCsub @@ -6,7 +6,7 @@ if 'GLES2_GLSL' in env['BUILDERS']: env.GLES2_GLSL('copy.glsl'); # env.GLES2_GLSL('resolve.glsl'); env.GLES2_GLSL('canvas.glsl'); -# env.GLES2_GLSL('canvas_shadow.glsl'); + env.GLES2_GLSL('canvas_shadow.glsl'); env.GLES2_GLSL('scene.glsl'); env.GLES2_GLSL('cubemap_filter.glsl'); env.GLES2_GLSL('cube_to_dp.glsl'); diff --git a/drivers/gles2/shaders/canvas.glsl b/drivers/gles2/shaders/canvas.glsl index 87a615ade1..01a90d0725 100644 --- a/drivers/gles2/shaders/canvas.glsl +++ b/drivers/gles2/shaders/canvas.glsl @@ -31,6 +31,38 @@ uniform vec4 src_rect; uniform highp float time; + + +#ifdef USE_LIGHTING + +// light matrices +uniform highp mat4 light_matrix; +uniform highp mat4 light_matrix_inverse; +uniform highp mat4 light_local_matrix; +uniform highp mat4 shadow_matrix; +uniform highp vec4 light_color; +uniform highp vec4 light_shadow_color; +uniform highp vec2 light_pos; +uniform highp float shadowpixel_size; +uniform highp float shadow_gradient; +uniform highp float light_height; +uniform highp float light_outside_alpha; +uniform highp float shadow_distance_mult; + +varying vec4 light_uv_interp; +varying vec2 transformed_light_uv; +varying vec4 local_rot; + +#ifdef USE_SHADOWS +varying highp vec2 pos; +#endif + +const bool at_light_pass = true; +#else +const bool at_light_pass = false; +#endif + + /* clang-format off */ VERTEX_SHADER_GLOBALS @@ -48,8 +80,19 @@ vec2 select(vec2 a, vec2 b, bvec2 c) { void main() { + vec4 color = color_attrib; +#ifdef USE_INSTANCING + mat4 extra_matrix_instance = extra_matrix * transpose(mat4(instance_xform0, instance_xform1, instance_xform2, vec4(0.0, 0.0, 0.0, 1.0))); + color *= instance_color; + vec4 instance_custom = instance_custom_data; + +#else + mat4 extra_matrix_instance = extra_matrix; + vec4 instance_custom = vec4(0.0); +#endif + #ifdef USE_TEXTURE_RECT if (dst_rect.z < 0.0) { // Transpose is encoded as negative dst_rect.z @@ -73,8 +116,6 @@ void main() { vec4 outvec = vec4(vertex.xy, 0.0, 1.0); uv_interp = uv_attrib; - - #endif { @@ -98,6 +139,27 @@ VERTEX_SHADER_CODE #endif gl_Position = projection_matrix * outvec; + +#ifdef USE_LIGHTING + + light_uv_interp.xy = (light_matrix * outvec).xy; + light_uv_interp.zw = (light_local_matrix * outvec).xy; + + transformed_light_uv = (mat3(light_matrix_inverse) * vec3(light_uv_interp.zw, 0.0)).xy; //for normal mapping + +#ifdef USE_SHADOWS + pos = outvec.xy; +#endif + + local_rot.xy = normalize((modelview_matrix * (extra_matrix_instance * vec4(1.0, 0.0, 0.0, 0.0))).xy); + local_rot.zw = normalize((modelview_matrix * (extra_matrix_instance * vec4(0.0, 1.0, 0.0, 0.0))).xy); +#ifdef USE_TEXTURE_RECT + local_rot.xy *= sign(src_rect.z); + local_rot.zw *= sign(src_rect.w); +#endif + +#endif + } /* clang-format off */ @@ -135,6 +197,41 @@ uniform vec2 screen_pixel_size; #endif +#ifdef USE_LIGHTING + +uniform highp mat4 light_matrix; +uniform highp mat4 light_local_matrix; +uniform highp mat4 shadow_matrix; +uniform highp vec4 light_color; +uniform highp vec4 light_shadow_color; +uniform highp vec2 light_pos; +uniform highp float shadowpixel_size; +uniform highp float shadow_gradient; +uniform highp float light_height; +uniform highp float light_outside_alpha; +uniform highp float shadow_distance_mult; + +uniform lowp sampler2D light_texture; // texunit:-3 +varying vec4 light_uv_interp; +varying vec2 transformed_light_uv; + +varying vec4 local_rot; + +#ifdef USE_SHADOWS + +uniform highp sampler2D shadow_texture; // texunit:-4 +varying highp vec2 pos; + +#endif + +const bool at_light_pass = true; +#else +const bool at_light_pass = false; +#endif + +uniform bool use_default_normal; + + /* clang-format off */ FRAGMENT_SHADER_GLOBALS @@ -153,15 +250,236 @@ void main() { #ifdef SCREEN_UV_USED vec2 screen_uv = gl_FragCoord.xy * screen_pixel_size; #endif + + vec3 normal; + +#if defined(NORMAL_USED) + + bool normal_used = true; +#else + bool normal_used = false; +#endif + + if (use_default_normal) { + normal.xy = texture2D(normal_texture, uv_interp).xy * 2.0 - 1.0; + normal.z = sqrt(1.0 - dot(normal.xy, normal.xy)); + normal_used = true; + } else { + normal = vec3(0.0, 0.0, 1.0); + } + { + float normal_depth = 1.0; + +#if defined(NORMALMAP_USED) + vec3 normal_map = vec3(0.0, 0.0, 1.0); + normal_used = true; +#endif + /* clang-format off */ FRAGMENT_SHADER_CODE /* clang-format on */ - } +#if defined(NORMALMAP_USED) + normal = mix(vec3(0.0, 0.0, 1.0), normal_map * vec3(2.0, -2.0, 1.0) - vec3(1.0, -1.0, 0.0), normal_depth); +#endif + } color *= final_modulate; +#ifdef USE_LIGHTING + + vec2 light_vec = transformed_light_uv; + + if (normal_used) { + normal.xy = mat2(local_rot.xy, local_rot.zw) * normal.xy; + } + + float att = 1.0; + + vec2 light_uv = light_uv_interp.xy; + vec4 light = texture2D(light_texture, light_uv); + + if (any(lessThan(light_uv_interp.xy, vec2(0.0, 0.0))) || any(greaterThanEqual(light_uv_interp.xy, vec2(1.0, 1.0)))) { + color.a *= light_outside_alpha; //invisible + + } else { + float real_light_height = light_height; + vec4 real_light_color = light_color; + vec4 real_light_shadow_color = light_shadow_color; + +#if defined(USE_LIGHT_SHADER_CODE) + //light is written by the light shader + light_compute( + light, + light_vec, + real_light_height, + real_light_color, + light_uv, + real_light_shadow_color, + normal, + uv, +#if defined(SCREEN_UV_USED) + screen_uv, +#endif + color); +#endif + + light *= real_light_color; + + if (normal_used) { + vec3 light_normal = normalize(vec3(light_vec, -real_light_height)); + light *= max(dot(-light_normal, normal), 0.0); + } + + color *= light; + +#ifdef USE_SHADOWS + light_vec = light_uv_interp.zw; //for shadows + float angle_to_light = -atan(light_vec.x, light_vec.y); + float PI = 3.14159265358979323846264; + /*int i = int(mod(floor((angle_to_light+7.0*PI/6.0)/(4.0*PI/6.0))+1.0, 3.0)); // +1 pq os indices estao em ordem 2,0,1 nos arrays + float ang*/ + + float su, sz; + + float abs_angle = abs(angle_to_light); + vec2 point; + float sh; + if (abs_angle < 45.0 * PI / 180.0) { + point = light_vec; + sh = 0.0 + (1.0 / 8.0); + } else if (abs_angle > 135.0 * PI / 180.0) { + point = -light_vec; + sh = 0.5 + (1.0 / 8.0); + } else if (angle_to_light > 0.0) { + + point = vec2(light_vec.y, -light_vec.x); + sh = 0.25 + (1.0 / 8.0); + } else { + + point = vec2(-light_vec.y, light_vec.x); + sh = 0.75 + (1.0 / 8.0); + } + + highp vec4 s = shadow_matrix * vec4(point, 0.0, 1.0); + s.xyz /= s.w; + su = s.x * 0.5 + 0.5; + sz = s.z * 0.5 + 0.5; + //sz=lightlength(light_vec); + + highp float shadow_attenuation = 0.0; + +#ifdef USE_RGBA_SHADOWS + +#define SHADOW_DEPTH(m_tex, m_uv) dot(texture2D((m_tex), (m_uv)), vec4(1.0 / (256.0 * 256.0 * 256.0), 1.0 / (256.0 * 256.0), 1.0 / 256.0, 1)) + +#else + +#define SHADOW_DEPTH(m_tex, m_uv) (texture2D((m_tex), (m_uv)).r) + +#endif + +#ifdef SHADOW_USE_GRADIENT + +#define SHADOW_TEST(m_ofs) \ + { \ + highp float sd = SHADOW_DEPTH(shadow_texture, vec2(m_ofs, sh)); \ + shadow_attenuation += 1.0 - smoothstep(sd, sd + shadow_gradient, sz); \ + } + +#else + +#define SHADOW_TEST(m_ofs) \ + { \ + highp float sd = SHADOW_DEPTH(shadow_texture, vec2(m_ofs, sh)); \ + shadow_attenuation += step(sz, sd); \ + } + +#endif + +#ifdef SHADOW_FILTER_NEAREST + + SHADOW_TEST(su); + +#endif + +#ifdef SHADOW_FILTER_PCF3 + + SHADOW_TEST(su + shadowpixel_size); + SHADOW_TEST(su); + SHADOW_TEST(su - shadowpixel_size); + shadow_attenuation /= 3.0; + +#endif + +#ifdef SHADOW_FILTER_PCF5 + + SHADOW_TEST(su + shadowpixel_size * 2.0); + SHADOW_TEST(su + shadowpixel_size); + SHADOW_TEST(su); + SHADOW_TEST(su - shadowpixel_size); + SHADOW_TEST(su - shadowpixel_size * 2.0); + shadow_attenuation /= 5.0; + +#endif + +#ifdef SHADOW_FILTER_PCF7 + + SHADOW_TEST(su + shadowpixel_size * 3.0); + SHADOW_TEST(su + shadowpixel_size * 2.0); + SHADOW_TEST(su + shadowpixel_size); + SHADOW_TEST(su); + SHADOW_TEST(su - shadowpixel_size); + SHADOW_TEST(su - shadowpixel_size * 2.0); + SHADOW_TEST(su - shadowpixel_size * 3.0); + shadow_attenuation /= 7.0; + +#endif + +#ifdef SHADOW_FILTER_PCF9 + + SHADOW_TEST(su + shadowpixel_size * 4.0); + SHADOW_TEST(su + shadowpixel_size * 3.0); + SHADOW_TEST(su + shadowpixel_size * 2.0); + SHADOW_TEST(su + shadowpixel_size); + SHADOW_TEST(su); + SHADOW_TEST(su - shadowpixel_size); + SHADOW_TEST(su - shadowpixel_size * 2.0); + SHADOW_TEST(su - shadowpixel_size * 3.0); + SHADOW_TEST(su - shadowpixel_size * 4.0); + shadow_attenuation /= 9.0; + +#endif + +#ifdef SHADOW_FILTER_PCF13 + + SHADOW_TEST(su + shadowpixel_size * 6.0); + SHADOW_TEST(su + shadowpixel_size * 5.0); + SHADOW_TEST(su + shadowpixel_size * 4.0); + SHADOW_TEST(su + shadowpixel_size * 3.0); + SHADOW_TEST(su + shadowpixel_size * 2.0); + SHADOW_TEST(su + shadowpixel_size); + SHADOW_TEST(su); + SHADOW_TEST(su - shadowpixel_size); + SHADOW_TEST(su - shadowpixel_size * 2.0); + SHADOW_TEST(su - shadowpixel_size * 3.0); + SHADOW_TEST(su - shadowpixel_size * 4.0); + SHADOW_TEST(su - shadowpixel_size * 5.0); + SHADOW_TEST(su - shadowpixel_size * 6.0); + shadow_attenuation /= 13.0; + +#endif + + //color *= shadow_attenuation; + color = mix(real_light_shadow_color, color, shadow_attenuation); +//use shadows +#endif + } + +//use lighting +#endif + gl_FragColor = color; } diff --git a/drivers/gles2/shaders/canvas_shadow.glsl b/drivers/gles2/shaders/canvas_shadow.glsl index e3c8140e31..51af004e39 100644 --- a/drivers/gles2/shaders/canvas_shadow.glsl +++ b/drivers/gles2/shaders/canvas_shadow.glsl @@ -1,15 +1,23 @@ /* clang-format off */ [vertex] +#ifdef USE_GLES_OVER_GL +#define mediump +#define highp +#else +precision highp float; +precision highp int; +#endif + +attribute highp vec3 vertex; // attrib:0 + uniform highp mat4 projection_matrix; /* clang-format on */ uniform highp mat4 light_matrix; uniform highp mat4 world_matrix; uniform highp float distance_norm; -layout(location = 0) in highp vec3 vertex; - -out highp vec4 position_interp; +varying highp vec4 position_interp; void main() { @@ -20,31 +28,29 @@ void main() { /* clang-format off */ [fragment] -in highp vec4 position_interp; -/* clang-format on */ - -#ifdef USE_RGBA_SHADOWS - -layout(location = 0) out lowp vec4 distance_buf; - +#ifdef USE_GLES_OVER_GL +#define mediump +#define highp #else +precision mediump float; +precision mediump int; +#endif -layout(location = 0) out highp float distance_buf; +varying highp vec4 position_interp; +/* clang-format on */ -#endif void main() { - highp float depth = ((position_interp.z / position_interp.w) + 1.0) * 0.5 + 0.0; //bias; + highp float depth = ((position_interp.z / position_interp.w) + 1.0) * 0.5 + 0.0; // bias #ifdef USE_RGBA_SHADOWS highp vec4 comp = fract(depth * vec4(256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0)); comp -= comp.xxyz * vec4(0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0); - distance_buf = comp; + gl_FragColor = comp; #else - distance_buf = depth; - + gl_FragColor = vec4(depth); #endif } diff --git a/drivers/gles2/shaders/scene.glsl b/drivers/gles2/shaders/scene.glsl index aba283970a..32721c892b 100644 --- a/drivers/gles2/shaders/scene.glsl +++ b/drivers/gles2/shaders/scene.glsl @@ -1091,7 +1091,6 @@ void light_compute( inout vec3 diffuse_light, inout vec3 specular_light) { - //this makes lights behave closer to linear, but then addition of lights looks bad //better left disabled @@ -1914,7 +1913,6 @@ FRAGMENT_SHADER_CODE #ifdef USE_SHADOW { highp vec4 splane = shadow_coord; - splane.xyz /= splane.w; float shadow = sample_shadow(light_shadow_atlas, splane); light_att *= shadow; diff --git a/drivers/unix/ip_unix.cpp b/drivers/unix/ip_unix.cpp index 949609bb9a..b39be64bef 100644 --- a/drivers/unix/ip_unix.cpp +++ b/drivers/unix/ip_unix.cpp @@ -55,10 +55,12 @@ #include <iphlpapi.h> #endif // MINGW hack #endif -#else +#else // UNIX #include <netdb.h> #ifdef ANDROID_ENABLED -#include "platform/android/ifaddrs_android.h" +// We could drop this file once we up our API level to 24, +// where the NDK's ifaddrs.h supports to needed getifaddrs. +#include "thirdparty/misc/ifaddrs-android.h" #else #ifdef __FreeBSD__ #include <sys/types.h> @@ -201,7 +203,7 @@ void IP_Unix::get_local_addresses(List<IP_Address> *r_addresses) const { #endif -#else +#else // UNIX void IP_Unix::get_local_addresses(List<IP_Address> *r_addresses) const { diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index 279274734f..12a1263042 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -202,6 +202,12 @@ uint64_t OS_Unix::get_system_time_secs() const { return uint64_t(tv_now.tv_sec); } +uint64_t OS_Unix::get_system_time_msecs() const { + struct timeval tv_now; + gettimeofday(&tv_now, NULL); + return uint64_t(tv_now.tv_sec * 1000 + tv_now.tv_usec / 1000); +} + OS::Date OS_Unix::get_date(bool utc) const { time_t t = time(NULL); diff --git a/drivers/unix/os_unix.h b/drivers/unix/os_unix.h index b702454603..94a8d040cd 100644 --- a/drivers/unix/os_unix.h +++ b/drivers/unix/os_unix.h @@ -84,6 +84,7 @@ public: virtual uint64_t get_unix_time() const; virtual uint64_t get_system_time_secs() const; + virtual uint64_t get_system_time_msecs() const; virtual void delay_usec(uint32_t p_usec) const; virtual uint64_t get_ticks_usec() const; diff --git a/editor/code_editor.h b/editor/code_editor.h index 2d233c61c6..5c71d23554 100644 --- a/editor/code_editor.h +++ b/editor/code_editor.h @@ -152,7 +152,6 @@ class CodeTextEditor : public VBoxContainer { Label *info; Timer *idle; Timer *code_complete_timer; - bool enable_complete_timer; Timer *font_resize_timer; int font_resize_val; diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp index d3a3289a18..c9367edec6 100644 --- a/editor/plugins/tile_map_editor_plugin.cpp +++ b/editor/plugins/tile_map_editor_plugin.cpp @@ -516,6 +516,12 @@ void TileMapEditor::_update_palette() { manual_palette->set_current(selected); manual_palette->show(); } + + if (tileset->tile_get_tile_mode(sel_tile) == TileSet::AUTO_TILE) { + manual_button->show(); + } else { + manual_button->hide(); + } } void TileMapEditor::_pick_tile(const Point2 &p_pos) { diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp index feba757a9c..e5551d385b 100644 --- a/editor/plugins/tile_set_editor_plugin.cpp +++ b/editor/plugins/tile_set_editor_plugin.cpp @@ -2263,7 +2263,7 @@ void TileSetEditor::update_workspace_tile_mode() { tool_editmode[EDITMODE_BITMASK]->hide(); tool_editmode[EDITMODE_PRIORITY]->hide(); tool_editmode[EDITMODE_Z_INDEX]->hide(); - } else if (tileset->tile_get_tile_mode(get_current_tile()) == TileSet::AUTO_TILE || tileset->tile_get_tile_mode(get_current_tile()) == TileSet::ATLAS_TILE) { + } else if (tileset->tile_get_tile_mode(get_current_tile()) == TileSet::AUTO_TILE) { if (edit_mode == EDITMODE_ICON) select_coord(tileset->autotile_get_icon_coordinate(get_current_tile())); else diff --git a/main/main.cpp b/main/main.cpp index f6902ffe23..da9c2c3198 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1029,8 +1029,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph message_queue = memnew(MessageQueue); - ProjectSettings::get_singleton()->register_global_defaults(); - if (p_second_phase) return setup2(); diff --git a/modules/gridmap/doc_classes/GridMap.xml b/modules/gridmap/doc_classes/GridMap.xml index 9b9088dd82..dd2628a7fd 100644 --- a/modules/gridmap/doc_classes/GridMap.xml +++ b/modules/gridmap/doc_classes/GridMap.xml @@ -192,13 +192,13 @@ </methods> <members> <member name="cell_center_x" type="bool" setter="set_center_x" getter="get_center_x"> - If [code]true[/code] grid items are centered on the X axis. + If [code]true[/code], grid items are centered on the X axis. </member> <member name="cell_center_y" type="bool" setter="set_center_y" getter="get_center_y"> - If [code]true[/code] grid items are centered on the Y axis. + If [code]true[/code], grid items are centered on the Y axis. </member> <member name="cell_center_z" type="bool" setter="set_center_z" getter="get_center_z"> - If [code]true[/code] grid items are centered on the Z axis. + If [code]true[/code], grid items are centered on the Z axis. </member> <member name="cell_octant_size" type="int" setter="set_octant_size" getter="get_octant_size"> The size of each octant measured in number of cells. This applies to all three axis. diff --git a/modules/visual_script/doc_classes/VisualScriptCondition.xml b/modules/visual_script/doc_classes/VisualScriptCondition.xml index 353898c93a..4657436c8f 100644 --- a/modules/visual_script/doc_classes/VisualScriptCondition.xml +++ b/modules/visual_script/doc_classes/VisualScriptCondition.xml @@ -4,7 +4,7 @@ A Visual Script node which branches the flow. </brief_description> <description> - A Visual Script node that checks a [bool] input port. If [code]true[/code] it will exit via the “true” sequence port. If [code]false[/code] it will exit via the "false" sequence port. After exiting either, it exits via the “done” port. Sequence ports may be left disconnected. + A Visual Script node that checks a [bool] input port. If [code]true[/code], it will exit via the “true” sequence port. If [code]false[/code], it will exit via the "false" sequence port. After exiting either, it exits via the “done” port. Sequence ports may be left disconnected. [b]Input Ports:[/b] - Sequence: [code]if (cond) is[/code] - Data (boolean): [code]cond[/code] diff --git a/modules/visual_script/doc_classes/VisualScriptReturn.xml b/modules/visual_script/doc_classes/VisualScriptReturn.xml index 6095520eff..0ca3e3b612 100644 --- a/modules/visual_script/doc_classes/VisualScriptReturn.xml +++ b/modules/visual_script/doc_classes/VisualScriptReturn.xml @@ -19,7 +19,7 @@ </methods> <members> <member name="return_enabled" type="bool" setter="set_enable_return_value" getter="is_return_value_enabled"> - If [code]true[/code] the [code]return[/code] input port is available. + If [code]true[/code], the [code]return[/code] input port is available. </member> <member name="return_type" type="int" setter="set_return_type" getter="get_return_type" enum="Variant.Type"> The return value's data type. diff --git a/modules/webm/libvpx/SCsub b/modules/webm/libvpx/SCsub index 98e38b9027..348de485be 100644 --- a/modules/webm/libvpx/SCsub +++ b/modules/webm/libvpx/SCsub @@ -379,6 +379,9 @@ if webm_cpu_x86: env_libvpx.add_source_files(env.modules_sources, libvpx_sources_x86_64asm) elif webm_cpu_arm: env_libvpx.add_source_files(env.modules_sources, libvpx_sources_arm) + if env["platform"] == 'android': + env_libvpx.Append(CPPPATH=[libvpx_dir + "third_party/android"]) + env_libvpx.add_source_files(env.modules_sources, [libvpx_dir + "third_party/android/cpu-features.c"]) env_libvpx_neon = env_libvpx.Clone() if env["platform"] == 'android' and env["android_arch"] == 'armv6': diff --git a/modules/websocket/doc_classes/WebSocketClient.xml b/modules/websocket/doc_classes/WebSocketClient.xml index b3ea535495..6b73b80350 100644 --- a/modules/websocket/doc_classes/WebSocketClient.xml +++ b/modules/websocket/doc_classes/WebSocketClient.xml @@ -25,7 +25,7 @@ </argument> <description> Connect to the given URL requesting one of the given [code]protocols[/code] as sub-protocol. - If [code]true[/code] is passed as [code]gd_mp_api[/code], the client will behave like a network peer for the [MultiplayerAPI]. Note: connections to non Godot servers will not work, and [signal data_received] will not be emitted when this option is true. + If [code]true[/code], is passed as [code]gd_mp_api[/code], the client will behave like a network peer for the [MultiplayerAPI]. Note: connections to non Godot servers will not work, and [signal data_received] will not be emitted when this option is true. </description> </method> <method name="disconnect_from_host"> diff --git a/platform/android/SCsub b/platform/android/SCsub index fb0ec75b16..ad682b9324 100644 --- a/platform/android/SCsub +++ b/platform/android/SCsub @@ -21,11 +21,6 @@ android_files = [ # 'power_android.cpp' ] -thirdparty_files = [ - 'ifaddrs_android.cpp', - 'cpu-features.c', -] - env_android = env.Clone() if env['target'] == "profile": env_android.Append(CPPFLAGS=['-DPROFILER_ENABLED']) @@ -36,14 +31,10 @@ for x in android_files: env_thirdparty = env_android.Clone() env_thirdparty.disable_warnings() -for x in thirdparty_files: - android_objects.append(env_thirdparty.SharedObject(x)) - -prog = None +android_objects.append(env_thirdparty.SharedObject('#thirdparty/misc/ifaddrs-android.cc')) abspath = env.Dir(".").abspath - with open_utf8(abspath + "/build.gradle.template", "r") as gradle_basein: gradle_text = gradle_basein.read() diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index 7f8d50b8ab..bfe737f138 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -1157,6 +1157,9 @@ public: r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, launcher_icons[i].option_id, PROPERTY_HINT_FILE, "*.png"), "")); } + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "keystore/debug", PROPERTY_HINT_GLOBAL_FILE, "*.keystore"), "")); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "keystore/debug_user"), "")); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "keystore/debug_password"), "")); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "keystore/release", PROPERTY_HINT_GLOBAL_FILE, "*.keystore"), "")); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "keystore/release_user"), "")); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "keystore/release_password"), "")); @@ -1417,12 +1420,15 @@ public: err += "OpenJDK 8 jarsigner not configured in the Editor Settings.\n"; } - String dk = EditorSettings::get_singleton()->get("export/android/debug_keystore"); + String dk = p_preset->get("keystore/debug"); if (!FileAccess::exists(dk)) { - valid = false; - err += "Debug keystore not configured in the Editor Settings.\n"; + dk = EditorSettings::get_singleton()->get("export/android/debug_keystore"); + if (!FileAccess::exists(dk)) { + valid = false; + err += "Debug keystore not configured in the Editor Settings nor in the preset.\n"; + } } bool apk_expansion = p_preset->get("apk_expansion/enable"); @@ -1772,9 +1778,17 @@ public: String password; String user; if (p_debug) { - keystore = EditorSettings::get_singleton()->get("export/android/debug_keystore"); - password = EditorSettings::get_singleton()->get("export/android/debug_keystore_pass"); - user = EditorSettings::get_singleton()->get("export/android/debug_keystore_user"); + + keystore = p_preset->get("keystore/debug"); + password = p_preset->get("keystore/debug_password"); + user = p_preset->get("keystore/debug_user"); + + if (keystore.empty()) { + + keystore = EditorSettings::get_singleton()->get("export/android/debug_keystore"); + password = EditorSettings::get_singleton()->get("export/android/debug_keystore_pass"); + user = EditorSettings::get_singleton()->get("export/android/debug_keystore_user"); + } ep.step("Signing debug APK...", 103); diff --git a/platform/android/globals/global_defaults.cpp b/platform/android/globals/global_defaults.cpp deleted file mode 100644 index efeb8598e5..0000000000 --- a/platform/android/globals/global_defaults.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/*************************************************************************/ -/* global_defaults.cpp */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2018 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. */ -/*************************************************************************/ - -#include "global_defaults.h" -#include "core/project_settings.h" - -void register_android_global_defaults() { -} diff --git a/platform/android/globals/global_defaults.h b/platform/android/globals/global_defaults.h deleted file mode 100644 index 99da2dd527..0000000000 --- a/platform/android/globals/global_defaults.h +++ /dev/null @@ -1,31 +0,0 @@ -/*************************************************************************/ -/* global_defaults.h */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2018 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. */ -/*************************************************************************/ - -void register_android_global_defaults(); diff --git a/platform/android/ifaddrs_android.cpp b/platform/android/ifaddrs_android.cpp deleted file mode 100644 index f6d5cdbe77..0000000000 --- a/platform/android/ifaddrs_android.cpp +++ /dev/null @@ -1,230 +0,0 @@ -/* - * libjingle - * Copyright 2012, Google Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "ifaddrs_android.h" -#include <stdlib.h> -#include <string.h> -#include <sys/types.h> -#include <sys/socket.h> -#include <sys/utsname.h> -#include <sys/ioctl.h> -#include <netinet/in.h> -#include <net/if.h> -#include <unistd.h> -#include <errno.h> -#include <linux/netlink.h> -#include <linux/rtnetlink.h> - -struct netlinkrequest { - nlmsghdr header; - ifaddrmsg msg; -}; - -namespace { -const int kMaxReadSize = 4096; -} - -static int set_ifname(struct ifaddrs* ifaddr, int interface) { - char buf[IFNAMSIZ] = {0}; - char* name = if_indextoname(interface, buf); - if (name == NULL) { - return -1; - } - ifaddr->ifa_name = new char[strlen(name) + 1]; - strncpy(ifaddr->ifa_name, name, strlen(name) + 1); - return 0; -} - -static int set_flags(struct ifaddrs* ifaddr) { - int fd = socket(AF_INET, SOCK_DGRAM, 0); - if (fd == -1) { - return -1; - } - ifreq ifr; - memset(&ifr, 0, sizeof(ifr)); - strncpy(ifr.ifr_name, ifaddr->ifa_name, IFNAMSIZ - 1); - int rc = ioctl(fd, SIOCGIFFLAGS, &ifr); - close(fd); - if (rc == -1) { - return -1; - } - ifaddr->ifa_flags = ifr.ifr_flags; - return 0; -} - -static int set_addresses(struct ifaddrs* ifaddr, ifaddrmsg* msg, void* data, - size_t len) { - if (msg->ifa_family == AF_INET) { - sockaddr_in* sa = new sockaddr_in; - sa->sin_family = AF_INET; - memcpy(&sa->sin_addr, data, len); - ifaddr->ifa_addr = reinterpret_cast<sockaddr*>(sa); - } else if (msg->ifa_family == AF_INET6) { - sockaddr_in6* sa = new sockaddr_in6; - sa->sin6_family = AF_INET6; - sa->sin6_scope_id = msg->ifa_index; - memcpy(&sa->sin6_addr, data, len); - ifaddr->ifa_addr = reinterpret_cast<sockaddr*>(sa); - } else { - return -1; - } - return 0; -} - -static int make_prefixes(struct ifaddrs* ifaddr, int family, int prefixlen) { - char* prefix = NULL; - if (family == AF_INET) { - sockaddr_in* mask = new sockaddr_in; - mask->sin_family = AF_INET; - memset(&mask->sin_addr, 0, sizeof(in_addr)); - ifaddr->ifa_netmask = reinterpret_cast<sockaddr*>(mask); - if (prefixlen > 32) { - prefixlen = 32; - } - prefix = reinterpret_cast<char*>(&mask->sin_addr); - } else if (family == AF_INET6) { - sockaddr_in6* mask = new sockaddr_in6; - mask->sin6_family = AF_INET6; - memset(&mask->sin6_addr, 0, sizeof(in6_addr)); - ifaddr->ifa_netmask = reinterpret_cast<sockaddr*>(mask); - if (prefixlen > 128) { - prefixlen = 128; - } - prefix = reinterpret_cast<char*>(&mask->sin6_addr); - } else { - return -1; - } - for (int i = 0; i < (prefixlen / 8); i++) { - *prefix++ = 0xFF; - } - char remainder = 0xff; - remainder <<= (8 - prefixlen % 8); - *prefix = remainder; - return 0; -} - -static int populate_ifaddrs(struct ifaddrs* ifaddr, ifaddrmsg* msg, void* bytes, - size_t len) { - if (set_ifname(ifaddr, msg->ifa_index) != 0) { - return -1; - } - if (set_flags(ifaddr) != 0) { - return -1; - } - if (set_addresses(ifaddr, msg, bytes, len) != 0) { - return -1; - } - if (make_prefixes(ifaddr, msg->ifa_family, msg->ifa_prefixlen) != 0) { - return -1; - } - return 0; -} - -int getifaddrs(struct ifaddrs** result) { - int fd = socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE); - if (fd < 0) { - return -1; - } - netlinkrequest ifaddr_request; - memset(&ifaddr_request, 0, sizeof(ifaddr_request)); - ifaddr_request.header.nlmsg_flags = NLM_F_ROOT | NLM_F_REQUEST; - ifaddr_request.header.nlmsg_type = RTM_GETADDR; - ifaddr_request.header.nlmsg_len = NLMSG_LENGTH(sizeof(ifaddrmsg)); - ssize_t count = send(fd, &ifaddr_request, ifaddr_request.header.nlmsg_len, 0); - if (static_cast<size_t>(count) != ifaddr_request.header.nlmsg_len) { - close(fd); - return -1; - } - struct ifaddrs* start = NULL; - struct ifaddrs* current = NULL; - char buf[kMaxReadSize]; - ssize_t amount_read = recv(fd, &buf, kMaxReadSize, 0); - while (amount_read > 0) { - nlmsghdr* header = reinterpret_cast<nlmsghdr*>(&buf[0]); - size_t header_size = static_cast<size_t>(amount_read); - for ( ; NLMSG_OK(header, header_size); - header = NLMSG_NEXT(header, header_size)) { - switch (header->nlmsg_type) { - case NLMSG_DONE: - // Success. Return. - *result = start; - close(fd); - return 0; - case NLMSG_ERROR: - close(fd); - freeifaddrs(start); - return -1; - case RTM_NEWADDR: { - ifaddrmsg* address_msg = - reinterpret_cast<ifaddrmsg*>(NLMSG_DATA(header)); - rtattr* rta = IFA_RTA(address_msg); - ssize_t payload_len = IFA_PAYLOAD(header); - while (RTA_OK(rta, payload_len)) { - if (rta->rta_type == IFA_ADDRESS) { - int family = address_msg->ifa_family; - if (family == AF_INET || family == AF_INET6) { - ifaddrs* newest = new ifaddrs; - memset(newest, 0, sizeof(ifaddrs)); - if (current) { - current->ifa_next = newest; - } else { - start = newest; - } - if (populate_ifaddrs(newest, address_msg, RTA_DATA(rta), - RTA_PAYLOAD(rta)) != 0) { - freeifaddrs(start); - *result = NULL; - return -1; - } - current = newest; - } - } - rta = RTA_NEXT(rta, payload_len); - } - break; - } - } - } - amount_read = recv(fd, &buf, kMaxReadSize, 0); - } - close(fd); - freeifaddrs(start); - return -1; -} - -void freeifaddrs(struct ifaddrs* addrs) { - struct ifaddrs* last = NULL; - struct ifaddrs* cursor = addrs; - while (cursor) { - delete[] cursor->ifa_name; - delete cursor->ifa_addr; - delete cursor->ifa_netmask; - last = cursor; - cursor = cursor->ifa_next; - delete last; - } -} diff --git a/platform/iphone/globals/global_defaults.cpp b/platform/iphone/globals/global_defaults.cpp deleted file mode 100644 index 423f50995e..0000000000 --- a/platform/iphone/globals/global_defaults.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/*************************************************************************/ -/* global_defaults.cpp */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2018 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. */ -/*************************************************************************/ - -#include "global_defaults.h" -#include "core/project_settings.h" - -void register_iphone_global_defaults() { -} diff --git a/platform/iphone/globals/global_defaults.h b/platform/iphone/globals/global_defaults.h deleted file mode 100644 index 3e3c220f4a..0000000000 --- a/platform/iphone/globals/global_defaults.h +++ /dev/null @@ -1,31 +0,0 @@ -/*************************************************************************/ -/* global_defaults.h */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2018 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. */ -/*************************************************************************/ - -void register_iphone_global_defaults(); diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index e1cbbcc66b..dff87b2c5d 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -2142,8 +2142,13 @@ uint64_t OS_Windows::get_unix_time() const { uint64_t OS_Windows::get_system_time_secs() const { - const uint64_t WINDOWS_TICK = 10000000; - const uint64_t SEC_TO_UNIX_EPOCH = 11644473600LL; + return get_system_time_msecs() / 1000; +} + +uint64_t OS_Windows::get_system_time_msecs() const { + + const uint64_t WINDOWS_TICK = 10000; + const uint64_t MSEC_TO_UNIX_EPOCH = 11644473600000LL; SYSTEMTIME st; GetSystemTime(&st); @@ -2154,7 +2159,7 @@ uint64_t OS_Windows::get_system_time_secs() const { ret <<= 32; ret |= ft.dwLowDateTime; - return (uint64_t)(ret / WINDOWS_TICK - SEC_TO_UNIX_EPOCH); + return (uint64_t)(ret / WINDOWS_TICK - MSEC_TO_UNIX_EPOCH); } void OS_Windows::delay_usec(uint32_t p_usec) const { diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index d09ade4daa..e12e465dd3 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -254,6 +254,7 @@ public: virtual TimeZoneInfo get_time_zone_info() const; virtual uint64_t get_unix_time() const; virtual uint64_t get_system_time_secs() const; + virtual uint64_t get_system_time_msecs() const; virtual bool can_draw() const; virtual Error set_cwd(const String &p_cwd); diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index ee76a90019..37886861e0 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -840,7 +840,7 @@ void TileMap::update_cell_bitmask(int p_x, int p_y) { Map<PosKey, Cell>::Element *E = tile_map.find(p); if (E != NULL) { int id = get_cell(p_x, p_y); - if (tile_set->tile_get_tile_mode(id) == TileSet::AUTO_TILE || tile_set->tile_get_tile_mode(id) == TileSet::ATLAS_TILE) { + if (tile_set->tile_get_tile_mode(id) == TileSet::AUTO_TILE) { uint16_t mask = 0; if (tile_set->autotile_get_bitmask_mode(id) == TileSet::BITMASK_2X2) { if (tile_set->is_tile_bound(id, get_cell(p_x - 1, p_y - 1)) && tile_set->is_tile_bound(id, get_cell(p_x, p_y - 1)) && tile_set->is_tile_bound(id, get_cell(p_x - 1, p_y))) { @@ -904,7 +904,8 @@ void TileMap::update_cell_bitmask(int p_x, int p_y) { PosKey qk(p_x / _get_quadrant_size(), p_y / _get_quadrant_size()); Map<PosKey, Quadrant>::Element *Q = quadrant_map.find(qk); _make_quadrant_dirty(Q); - } else { + + } else if (tile_set->tile_get_tile_mode(id) == TileSet::SINGLE_TILE) { E->get().autotile_coord_x = 0; E->get().autotile_coord_y = 0; } @@ -1630,6 +1631,8 @@ void TileMap::_bind_methods() { ClassDB::bind_method(D_METHOD("is_cell_y_flipped", "x", "y"), &TileMap::is_cell_y_flipped); ClassDB::bind_method(D_METHOD("is_cell_transposed", "x", "y"), &TileMap::is_cell_transposed); + ClassDB::bind_method(D_METHOD("get_cell_autotile_coord", "x", "y"), &TileMap::get_cell_autotile_coord); + ClassDB::bind_method(D_METHOD("fix_invalid_tiles"), &TileMap::fix_invalid_tiles); ClassDB::bind_method(D_METHOD("clear"), &TileMap::clear); diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp index 4f4d375481..a378c517ed 100644 --- a/scene/resources/texture.cpp +++ b/scene/resources/texture.cpp @@ -2067,7 +2067,7 @@ void TextureLayered::create(uint32_t p_width, uint32_t p_height, uint32_t p_dept width = p_width; height = p_height; depth = p_depth; - + format = p_format; flags = p_flags; } diff --git a/thirdparty/README.md b/thirdparty/README.md index e63e1fc109..5e42436f32 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -31,7 +31,7 @@ Files extracted from upstream source: ## certs - Upstream: Mozilla, via https://apps.fedoraproject.org/packages/ca-certificates -- Version: 2018.2.22 +- Version: 2018.2.26 - License: MPL 2.0 File extracted from a recent Fedora install: @@ -229,6 +229,9 @@ TODO. Important: File `libvpx/vpx_dsp/x86/vpx_subpixel_8t_intrin_avx2.c` has Godot-made change marked with `// -- GODOT --` comments. +The files `libvpx/third_party/android/cpu-features.{c,h}` were copied +from the Android NDK r18. + ## libwebp @@ -337,6 +340,10 @@ Collection of single-file libraries used in Godot components. * Upstream: http://www.efgh.com/software/md5.htm * Version: TBD, might not be latest from above URL * License: RSA Message-Digest License +- `open-simplex-noise.{c,h}` + * Upstream: https://github.com/smcameron/open-simplex-noise-in-c + * Version: git (0d555e7, 2015) + * License: Unlicense - `pcg.{cpp,h}` * Upstream: http://www.pcg-random.org * Version: minimal C implementation, http://www.pcg-random.org/download.html @@ -354,11 +361,6 @@ Collection of single-file libraries used in Godot components. * Upstream: https://github.com/ivanfratric/polypartition (`src/polypartition.cpp`) * Version: TBD, class was renamed * License: MIT -- `open-simplex-noise.{c,h}` - * Upstream: https://github.com/smcameron/open-simplex-noise-in-c - * Version: git (0d555e7, 2015) - * License: Unlicense - ### modules @@ -371,6 +373,13 @@ Collection of single-file libraries used in Godot components. * Version: ? * License: BSD +### platform + +- `ifaddrs-android.{cc,h}` + * Upstream: https://chromium.googlesource.com/external/webrtc/stable/talk/+/master/base/ifaddrs-android.h + * Version: 5976650 (2013) + * License: BSD-3-Clause + ### scene - `easing_equations.cpp` diff --git a/thirdparty/certs/ca-certificates.crt b/thirdparty/certs/ca-certificates.crt index 01dd29097e..613456b6d3 100644 --- a/thirdparty/certs/ca-certificates.crt +++ b/thirdparty/certs/ca-certificates.crt @@ -695,55 +695,6 @@ kJtN3X3n57LNXMhqlfil9o3EXXgIvnsG1knPGTZQIy4I5p4FTUcY1Rbpsda2ENW7 l7+ijrRU -----END CERTIFICATE----- -# Certplus Root CA G1 ------BEGIN CERTIFICATE----- -MIIFazCCA1OgAwIBAgISESBVg+QtPlRWhS2DN7cs3EYRMA0GCSqGSIb3DQEBDQUA -MD4xCzAJBgNVBAYTAkZSMREwDwYDVQQKDAhDZXJ0cGx1czEcMBoGA1UEAwwTQ2Vy -dHBsdXMgUm9vdCBDQSBHMTAeFw0xNDA1MjYwMDAwMDBaFw0zODAxMTUwMDAwMDBa -MD4xCzAJBgNVBAYTAkZSMREwDwYDVQQKDAhDZXJ0cGx1czEcMBoGA1UEAwwTQ2Vy -dHBsdXMgUm9vdCBDQSBHMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIB -ANpQh7bauKk+nWT6VjOaVj0W5QOVsjQcmm1iBdTYj+eJZJ+622SLZOZ5KmHNr49a -iZFluVj8tANfkT8tEBXgfs+8/H9DZ6itXjYj2JizTfNDnjl8KvzsiNWI7nC9hRYt -6kuJPKNxQv4c/dMcLRC4hlTqQ7jbxofaqK6AJc96Jh2qkbBIb6613p7Y1/oA/caP -0FG7Yn2ksYyy/yARujVjBYZHYEMzkPZHogNPlk2dT8Hq6pyi/jQu3rfKG3akt62f -6ajUeD94/vI4CTYd0hYCyOwqaK/1jpTvLRN6HkJKHRUxrgwEV/xhc/MxVoYxgKDE -EW4wduOU8F8ExKyHcomYxZ3MVwia9Az8fXoFOvpHgDm2z4QTd28n6v+WZxcIbekN -1iNQMLAVdBM+5S//Ds3EC0pd8NgAM0lm66EYfFkuPSi5YXHLtaW6uOrc4nBvCGrc -h2c0798wct3zyT8j/zXhviEpIDCB5BmlIOklynMxdCm+4kLV87ImZsdo/Rmz5yCT -mehd4F6H50boJZwKKSTUzViGUkAksnsPmBIgJPaQbEfIDbsYIC7Z/fyL8inqh3SV -4EJQeIQEQWGw9CEjjy3LKCHyamz0GqbFFLQ3ZU+V/YDI+HLlJWvEYLF7bY5KinPO -WftwenMGE9nTdDckQQoRb5fc5+R+ob0V8rqHDz1oihYHAgMBAAGjYzBhMA4GA1Ud -DwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSowcCbkahDFXxd -Bie0KlHYlwuBsTAfBgNVHSMEGDAWgBSowcCbkahDFXxdBie0KlHYlwuBsTANBgkq -hkiG9w0BAQ0FAAOCAgEAnFZvAX7RvUz1isbwJh/k4DgYzDLDKTudQSk0YcbX8ACh -66Ryj5QXvBMsdbRX7gp8CXrc1cqh0DQT+Hern+X+2B50ioUHj3/MeXrKls3N/U/7 -/SMNkPX0XtPGYX2eEeAC7gkE2Qfdpoq3DIMku4NQkv5gdRE+2J2winq14J2by5BS -S7CTKtQ+FjPlnsZlFT5kOwQ/2wyPX1wdaR+v8+khjPPvl/aatxm2hHSco1S1cE5j -2FddUyGbQJJD+tZ3VTNPZNX70Cxqjm0lpu+F6ALEUz65noe8zDUa3qHpimOHZR4R -Kttjd5cUvpoUmRGywO6wT/gUITJDT5+rosuoD6o7BlXGEilXCNQ314cnrUlZp5Gr -RHpejXDbl85IULFzk/bwg2D5zfHhMf1bfHEhYxQUqq/F3pN+aLHsIqKqkHWetUNy -6mSjhEv9DKgma3GX7lZjZuhCVPnHHd/Qj1vfyDBviP4NxDMcU6ij/UgQ8uQKTuEV -V/xuZDDCVRHc6qnNSlSsKWNEz0pAoNZoWRsz+e86i9sgktxChL8Bq4fA1SCC28a5 -g4VCXA9DO2pJNdWY9BW/+mGBDAkgGNLQFwzLSABQ6XaCjGTXOqAHVcweMcDvOrRl -++O/QmueD6i9a5jc2NvLi6Td11n0bt3+qsOR0C5CB8AMTVPNJLFMWx5R9N/pkvo= ------END CERTIFICATE----- - -# Certplus Root CA G2 ------BEGIN CERTIFICATE----- -MIICHDCCAaKgAwIBAgISESDZkc6uo+jF5//pAq/Pc7xVMAoGCCqGSM49BAMDMD4x -CzAJBgNVBAYTAkZSMREwDwYDVQQKDAhDZXJ0cGx1czEcMBoGA1UEAwwTQ2VydHBs -dXMgUm9vdCBDQSBHMjAeFw0xNDA1MjYwMDAwMDBaFw0zODAxMTUwMDAwMDBaMD4x -CzAJBgNVBAYTAkZSMREwDwYDVQQKDAhDZXJ0cGx1czEcMBoGA1UEAwwTQ2VydHBs -dXMgUm9vdCBDQSBHMjB2MBAGByqGSM49AgEGBSuBBAAiA2IABM0PW1aC3/BFGtat -93nwHcmsltaeTpwftEIRyoa/bfuFo8XlGVzX7qY/aWfYeOKmycTbLXku54uNAm8x -Ik0G42ByRZ0OQneezs/lf4WbGOT8zC5y0xaTTsqZY1yhBSpsBqNjMGEwDgYDVR0P -AQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNqDYwJ5jtpMxjwj -FNiPwyCrKGBZMB8GA1UdIwQYMBaAFNqDYwJ5jtpMxjwjFNiPwyCrKGBZMAoGCCqG -SM49BAMDA2gAMGUCMHD+sAvZ94OX7PNVHdTcswYO/jOYnYs5kGuUIe22113WTNch -p+e/IQ8rzfcq3IUHnQIxAIYUFuXcsGXCwI4Un78kFmjlvPl5adytRSv3tjFzzAal -U5ORGpOucGpnutee5WEaXw== ------END CERTIFICATE----- - # Certum Trusted Network CA -----BEGIN CERTIFICATE----- MIIDuzCCAqOgAwIBAgIDBETAMA0GCSqGSIb3DQEBBQUAMH4xCzAJBgNVBAYTAlBM @@ -1679,6 +1630,40 @@ Mx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7rkpeDMdmztcpH WD9f -----END CERTIFICATE----- +# GlobalSign Root CA - R6 +-----BEGIN CERTIFICATE----- +MIIFgzCCA2ugAwIBAgIORea7A4Mzw4VlSOb/RVEwDQYJKoZIhvcNAQEMBQAwTDEg +MB4GA1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjYxEzARBgNVBAoTCkdsb2Jh +bFNpZ24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMTQxMjEwMDAwMDAwWhcNMzQx +MjEwMDAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSNjET +MBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCAiIwDQYJ +KoZIhvcNAQEBBQADggIPADCCAgoCggIBAJUH6HPKZvnsFMp7PPcNCPG0RQssgrRI +xutbPK6DuEGSMxSkb3/pKszGsIhrxbaJ0cay/xTOURQh7ErdG1rG1ofuTToVBu1k +ZguSgMpE3nOUTvOniX9PeGMIyBJQbUJmL025eShNUhqKGoC3GYEOfsSKvGRMIRxD +aNc9PIrFsmbVkJq3MQbFvuJtMgamHvm566qjuL++gmNQ0PAYid/kD3n16qIfKtJw +LnvnvJO7bVPiSHyMEAc4/2ayd2F+4OqMPKq0pPbzlUoSB239jLKJz9CgYXfIWHSw +1CM69106yqLbnQneXUQtkPGBzVeS+n68UARjNN9rkxi+azayOeSsJDa38O+2HBNX +k7besvjihbdzorg1qkXy4J02oW9UivFyVm4uiMVRQkQVlO6jxTiWm05OWgtH8wY2 +SXcwvHE35absIQh1/OZhFj931dmRl4QKbNQCTXTAFO39OfuD8l4UoQSwC+n+7o/h +bguyCLNhZglqsQY6ZZZZwPA1/cnaKI0aEYdwgQqomnUdnjqGBQCe24DWJfncBZ4n +WUx2OVvq+aWh2IMP0f/fMBH5hc8zSPXKbWQULHpYT9NLCEnFlWQaYw55PfWzjMpY +rZxCRXluDocZXFSxZba/jJvcE+kNb7gu3GduyYsRtYQUigAZcIN5kZeR1Bonvzce +MgfYFGM8KEyvAgMBAAGjYzBhMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTAD +AQH/MB0GA1UdDgQWBBSubAWjkxPioufi1xzWx/B/yGdToDAfBgNVHSMEGDAWgBSu +bAWjkxPioufi1xzWx/B/yGdToDANBgkqhkiG9w0BAQwFAAOCAgEAgyXt6NH9lVLN +nsAEoJFp5lzQhN7craJP6Ed41mWYqVuoPId8AorRbrcWc+ZfwFSY1XS+wc3iEZGt +Ixg93eFyRJa0lV7Ae46ZeBZDE1ZXs6KzO7V33EByrKPrmzU+sQghoefEQzd5Mr61 +55wsTLxDKZmOMNOsIeDjHfrYBzN2VAAiKrlNIC5waNrlU/yDXNOd8v9EDERm8tLj +vUYAGm0CuiVdjaExUd1URhxN25mW7xocBFymFe944Hn+Xds+qkxV/ZoVqW/hpvvf +cDDpw+5CRu3CkwWJ+n1jez/QcYF8AOiYrg54NMMl+68KnyBr3TsTjxKM4kEaSHpz +oHdpx7Zcf4LIHv5YGygrqGytXm3ABdJ7t+uA/iU3/gKbaKxCXcPu9czc8FB10jZp +nOZ7BN9uBmm23goJSFmH63sUYHpkqmlD75HHTOwY3WzvUy2MmeFe8nI+z1TIvWfs +pA9MRf/TuTAjB0yPEL+GltmZWrSZVxykzLsViVO6LAUP5MSeGbEYNNVMnbrt9x+v +JJUEeKgDu+6B5dpffItKoZB0JaezPkvILFa9x8jvOOJckvB595yEunQtYQEgfn7R +8k8HWV+LLUNS60YMlOH1Zkd5d9VUWx+tJDfLRVpOoERIyNiwmcUVhAn21klJwGW4 +5hpxbqCo8YLoRT5s1gLXCmeDBVrJpBA= +-----END CERTIFICATE----- + # Global Chambersign Root - 2008 -----BEGIN CERTIFICATE----- MIIHSTCCBTGgAwIBAgIJAMnN0+nVfSPOMA0GCSqGSIb3DQEBBQUAMIGsMQswCQYD @@ -2175,88 +2160,21 @@ aPFlTc58Bd9TZaml8LGXBHAVRgOY1NK/VLSgWH1Sb9pWJmLU2NuJMW8c8CLC02Ic Nc1MaRVUGpCY3useX8p3x8uOPUNpnJpY0CQ73xtAln41rYHHTnG6iBM= -----END CERTIFICATE----- -# OpenTrust Root CA G1 ------BEGIN CERTIFICATE----- -MIIFbzCCA1egAwIBAgISESCzkFU5fX82bWTCp59rY45nMA0GCSqGSIb3DQEBCwUA -MEAxCzAJBgNVBAYTAkZSMRIwEAYDVQQKDAlPcGVuVHJ1c3QxHTAbBgNVBAMMFE9w -ZW5UcnVzdCBSb290IENBIEcxMB4XDTE0MDUyNjA4NDU1MFoXDTM4MDExNTAwMDAw -MFowQDELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCU9wZW5UcnVzdDEdMBsGA1UEAwwU -T3BlblRydXN0IFJvb3QgQ0EgRzEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIK -AoICAQD4eUbalsUwXopxAy1wpLuwxQjczeY1wICkES3d5oeuXT2R0odsN7faYp6b -wiTXj/HbpqbfRm9RpnHLPhsxZ2L3EVs0J9V5ToybWL0iEA1cJwzdMOWo010hOHQX -/uMftk87ay3bfWAfjH1MBcLrARYVmBSO0ZB3Ij/swjm4eTrwSSTilZHcYTSSjFR0 -77F9jAHiOH3BX2pfJLKOYheteSCtqx234LSWSE9mQxAGFiQD4eCcjsZGT44ameGP -uY4zbGneWK2gDqdkVBFpRGZPTBKnjix9xNRbxQA0MMHZmf4yzgeEtE7NCv82TWLx -p2NX5Ntqp66/K7nJ5rInieV+mhxNaMbBGN4zK1FGSxyO9z0M+Yo0FMT7MzUj8czx -Kselu7Cizv5Ta01BG2Yospb6p64KTrk5M0ScdMGTHPjgniQlQ/GbI4Kq3ywgsNw2 -TgOzfALU5nsaqocTvz6hdLubDuHAk5/XpGbKuxs74zD0M1mKB3IDVedzagMxbm+W -G+Oin6+Sx+31QrclTDsTBM8clq8cIqPQqwWyTBIjUtz9GVsnnB47ev1CI9sjgBPw -vFEVVJSmdz7QdFG9URQIOTfLHzSpMJ1ShC5VkLG631UAC9hWLbFJSXKAqWLXwPYY -EQRVzXR7z2FwefR7LFxckvzluFqrTJOVoSfupb7PcSNCupt2LQIDAQABo2MwYTAO -BgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUl0YhVyE1 -2jZVx/PxN3DlCPaTKbYwHwYDVR0jBBgwFoAUl0YhVyE12jZVx/PxN3DlCPaTKbYw -DQYJKoZIhvcNAQELBQADggIBAB3dAmB84DWn5ph76kTOZ0BP8pNuZtQ5iSas000E -PLuHIT839HEl2ku6q5aCgZG27dmxpGWX4m9kWaSW7mDKHyP7Rbr/jyTwyqkxf3kf -gLMtMrpkZ2CvuVnN35pJ06iCsfmYlIrM4LvgBBuZYLFGZdwIorJGnkSI6pN+VxbS -FXJfLkur1J1juONI5f6ELlgKn0Md/rcYkoZDSw6cMoYsYPXpSOqV7XAp8dUv/TW0 -V8/bhUiZucJvbI/NeJWsZCj9VrDDb8O+WVLhX4SPgPL0DTatdrOjteFkdjpY3H1P -XlZs5VVZV6Xf8YpmMIzUUmI4d7S+KNfKNsSbBfD4Fdvb8e80nR14SohWZ25g/4/I -i+GOvUKpMwpZQhISKvqxnUOOBZuZ2mKtVzazHbYNeS2WuOvyDEsMpZTGMKcmGS3t -TAZQMPH9WD25SxdfGbRqhFS0OE85og2WaMMolP3tLR9Ka0OWLpABEPs4poEL0L91 -09S5zvE/bw4cHjdx5RiHdRk/ULlepEU0rbDK5uUTdg8xFKmOLZTW1YVNcxVPS/Ky -Pu1svf0OnWZzsD2097+o4BGkxK51CUpjAEggpsadCwmKtODmzj7HPiY46SvepghJ -AwSQiumPv+i2tCqjI40cHLI5kqiPAlxAOXXUc0ECd97N4EOH1uS6SsNsEn/+KuYj -1oxx ------END CERTIFICATE----- - -# OpenTrust Root CA G2 ------BEGIN CERTIFICATE----- -MIIFbzCCA1egAwIBAgISESChaRu/vbm9UpaPI+hIvyYRMA0GCSqGSIb3DQEBDQUA -MEAxCzAJBgNVBAYTAkZSMRIwEAYDVQQKDAlPcGVuVHJ1c3QxHTAbBgNVBAMMFE9w -ZW5UcnVzdCBSb290IENBIEcyMB4XDTE0MDUyNjAwMDAwMFoXDTM4MDExNTAwMDAw -MFowQDELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCU9wZW5UcnVzdDEdMBsGA1UEAwwU -T3BlblRydXN0IFJvb3QgQ0EgRzIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIK -AoICAQDMtlelM5QQgTJT32F+D3Y5z1zCU3UdSXqWON2ic2rxb95eolq5cSG+Ntmh -/LzubKh8NBpxGuga2F8ORAbtp+Dz0mEL4DKiltE48MLaARf85KxP6O6JHnSrT78e -CbY2albz4e6WiWYkBuTNQjpK3eCasMSCRbP+yatcfD7J6xcvDH1urqWPyKwlCm/6 -1UWY0jUJ9gNDlP7ZvyCVeYCYitmJNbtRG6Q3ffyZO6v/v6wNj0OxmXsWEH4db0fE -FY8ElggGQgT4hNYdvJGmQr5J1WqIP7wtUdGejeBSzFfdNTVY27SPJIjki9/ca1TS -gSuyzpJLHB9G+h3Ykst2Z7UJmQnlrBcUVXDGPKBWCgOz3GIZ38i1MH/1PCZ1Eb3X -G7OHngevZXHloM8apwkQHZOJZlvoPGIytbU6bumFAYueQ4xncyhZW+vj3CzMpSZy -YhK05pyDRPZRpOLAeiRXyg6lPzq1O4vldu5w5pLeFlwoW5cZJ5L+epJUzpM5ChaH -vGOz9bGTXOBut9Dq+WIyiET7vycotjCVXRIouZW+j1MY5aIYFuJWpLIsEPUdN6b4 -t/bQWVyJ98LVtZR00dX+G7bw5tYee9I8y6jj9RjzIR9u701oBnstXW5DiabA+aC/ -gh7PU3+06yzbXfZqfUAkBXKJOAGTy3HCOV0GEfZvePg3DTmEJwIDAQABo2MwYTAO -BgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUajn6QiL3 -5okATV59M4PLuG53hq8wHwYDVR0jBBgwFoAUajn6QiL35okATV59M4PLuG53hq8w -DQYJKoZIhvcNAQENBQADggIBAJjLq0A85TMCl38th6aP1F5Kr7ge57tx+4BkJamz -Gj5oXScmp7oq4fBXgwpkTx4idBvpkF/wrM//T2h6OKQQbA2xx6R3gBi2oihEdqc0 -nXGEL8pZ0keImUEiyTCYYW49qKgFbdEfwFFEVn8nNQLdXpgKQuswv42hm1GqO+qT -RmTFAHneIWv2V6CG1wZy7HBGS4tz3aAhdT7cHcCP009zHIXZ/n9iyJVvttN7jLpT -wm+bREx50B1ws9efAvSyB7DH5fitIw6mVskpEndI2S9G/Tvw/HRwkqWOOAgfZDC2 -t0v7NqwQjqBSM2OdAzVWxWm9xiNaJ5T2pBL4LTM8oValX9YZ6e18CL13zSdkzJTa -TkZQh+D5wVOAHrut+0dSixv9ovneDiK3PTNZbNTe9ZUGMg1RGUFcPk8G97krgCf2 -o6p6fAbhQ8MTOWIaNr3gKC6UAuQpLmBVrkA9sHSSXvAgZJY/X0VdiLWK2gKgW0VU -3jg9CcCoSmVGFvyqv1ROTVu+OEO3KMqLM6oaJbolXCkvW0pujOotnCr2BXbgd5eA -iN1nE28daCSLT7d0geX0YJ96Vdc+N9oWaz53rK4YcJUIeSkDiv7BO7M/Gg+kO14f -WKGVyasvc0rQLW6aWQ9VGHgtPFGml4vmu7JwqkwR3v98KzfUetF3NI/n+UL3PIEM -S1IK ------END CERTIFICATE----- - -# OpenTrust Root CA G3 ------BEGIN CERTIFICATE----- -MIICITCCAaagAwIBAgISESDm+Ez8JLC+BUCs2oMbNGA/MAoGCCqGSM49BAMDMEAx -CzAJBgNVBAYTAkZSMRIwEAYDVQQKDAlPcGVuVHJ1c3QxHTAbBgNVBAMMFE9wZW5U -cnVzdCBSb290IENBIEczMB4XDTE0MDUyNjAwMDAwMFoXDTM4MDExNTAwMDAwMFow -QDELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCU9wZW5UcnVzdDEdMBsGA1UEAwwUT3Bl -blRydXN0IFJvb3QgQ0EgRzMwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAARK7liuTcpm -3gY6oxH84Bjwbhy6LTAMidnW7ptzg6kjFYwvWYpa3RTqnVkrQ7cG7DK2uu5Bta1d -oYXM6h0UZqNnfkbilPPntlahFVmhTzeXuSIevRHr9LIfXsMUmuXZl5mjYzBhMA4G -A1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRHd8MUi2I5 -DMlv4VBN0BBY3JWIbTAfBgNVHSMEGDAWgBRHd8MUi2I5DMlv4VBN0BBY3JWIbTAK -BggqhkjOPQQDAwNpADBmAjEAj6jcnboMBBf6Fek9LykBl7+BFjNAk2z8+e2AcG+q -j9uEwov1NcoG3GRvaBbhj5G5AjEA2Euly8LQCGzpGPta3U1fJAuwACEl74+nBCZx -4nxp5V2a+EEfOzmTk51V6s2N8fvB +# OISTE WISeKey Global Root GC CA +-----BEGIN CERTIFICATE----- +MIICaTCCAe+gAwIBAgIQISpWDK7aDKtARb8roi066jAKBggqhkjOPQQDAzBtMQsw +CQYDVQQGEwJDSDEQMA4GA1UEChMHV0lTZUtleTEiMCAGA1UECxMZT0lTVEUgRm91 +bmRhdGlvbiBFbmRvcnNlZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwg +Um9vdCBHQyBDQTAeFw0xNzA1MDkwOTQ4MzRaFw00MjA1MDkwOTU4MzNaMG0xCzAJ +BgNVBAYTAkNIMRAwDgYDVQQKEwdXSVNlS2V5MSIwIAYDVQQLExlPSVNURSBGb3Vu +ZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5IEdsb2JhbCBS +b290IEdDIENBMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAETOlQwMYPchi82PG6s4ni +eUqjFqdrVCTbUf/q9Akkwwsin8tqJ4KBDdLArzHkdIJuyiXZjHWd8dvQmqJLIX4W +p2OQ0jnUsYd4XxiWD1AbNTcPasbc2RNNpI6QN+a9WzGRo1QwUjAOBgNVHQ8BAf8E +BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUSIcUrOPDnpBgOtfKie7T +rYy0UGYwEAYJKwYBBAGCNxUBBAMCAQAwCgYIKoZIzj0EAwMDaAAwZQIwJsdpW9zV +57LnyAyMjMPdeYwbY9XJUpROTYJKcx6ygISpJcBMWm1JKWB4E+J+SOtkAjEA2zQg +Mgj/mkkCtojeFK9dbJlxjRo/i9fgojaGHAeCOnZT/cKi7e97sIBPWA9LUzm9 -----END CERTIFICATE----- # QuoVadis Root CA @@ -3302,33 +3220,6 @@ jZBf3+6f9L/uHfuY5H+QK4R4EA5sSVPvFVtlRkpdr7r7OnIdzfYliB6XzCGcKQEN ZetX2fNXlrtIzYE= -----END CERTIFICATE----- -# TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı H5 ------BEGIN CERTIFICATE----- -MIIEJzCCAw+gAwIBAgIHAI4X/iQggTANBgkqhkiG9w0BAQsFADCBsTELMAkGA1UE -BhMCVFIxDzANBgNVBAcMBkFua2FyYTFNMEsGA1UECgxEVMOcUktUUlVTVCBCaWxn -aSDEsGxldGnFn2ltIHZlIEJpbGnFn2ltIEfDvHZlbmxpxJ9pIEhpem1ldGxlcmkg -QS7Fni4xQjBABgNVBAMMOVTDnFJLVFJVU1QgRWxla3Ryb25payBTZXJ0aWZpa2Eg -SGl6bWV0IFNhxJ9sYXnEsWPEsXPEsSBINTAeFw0xMzA0MzAwODA3MDFaFw0yMzA0 -MjgwODA3MDFaMIGxMQswCQYDVQQGEwJUUjEPMA0GA1UEBwwGQW5rYXJhMU0wSwYD -VQQKDERUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmlsacWfaW0gR8O8 -dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLjFCMEAGA1UEAww5VMOcUktUUlVTVCBF -bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxIEg1MIIB -IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApCUZ4WWe60ghUEoI5RHwWrom -/4NZzkQqL/7hzmAD/I0Dpe3/a6i6zDQGn1k19uwsu537jVJp45wnEFPzpALFp/kR -Gml1bsMdi9GYjZOHp3GXDSHHmflS0yxjXVW86B8BSLlg/kJK9siArs1mep5Fimh3 -4khon6La8eHBEJ/rPCmBp+EyCNSgBbGM+42WAA4+Jd9ThiI7/PS98wl+d+yG6w8z -5UNP9FR1bSmZLmZaQ9/LXMrI5Tjxfjs1nQ/0xVqhzPMggCTTV+wVunUlm+hkS7M0 -hO8EuPbJbKoCPrZV4jI3X/xml1/N1p7HIL9Nxqw/dV8c7TKcfGkAaZHjIxhT6QID -AQABo0IwQDAdBgNVHQ4EFgQUVpkHHtOsDGlktAxQR95DLL4gwPswDgYDVR0PAQH/ -BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAJ5FdnsX -SDLyOIspve6WSk6BGLFRRyDN0GSxDsnZAdkJzsiZ3GglE9Rc8qPoBP5yCccLqh0l -VX6Wmle3usURehnmp349hQ71+S4pL+f5bFgWV1Al9j4uPqrtd3GqqpmWRgqujuwq -URawXs3qZwQcWDD1YIq9pr1N5Za0/EKJAWv2cMhQOQwt1WbZyNKzMrcbGW3LM/nf -peYVhDfwwvJllpKQd/Ct9JDpEXjXk4nAPQu6KfTomZ1yju2dL+6SfaHx/126M2CF -Yv4HAqGEVka+lgqaE9chTLd8B59OTj+RdPsnnRHM3eaxynFNExc5JsUpISuTKWqW -+qtB4Uu2NQvAmxU= ------END CERTIFICATE----- - # USERTrust ECC Certification Authority -----BEGIN CERTIFICATE----- MIICjzCCAhWgAwIBAgIQXIuZxVqUxdJxVt7NiYDMJjAKBggqhkjOPQQDAzCBiDEL diff --git a/platform/android/cpu-features.c b/thirdparty/libvpx/third_party/android/cpu-features.c index 9cdadd5407..e2bd749b01 100644 --- a/platform/android/cpu-features.c +++ b/thirdparty/libvpx/third_party/android/cpu-features.c @@ -28,6 +28,10 @@ /* ChangeLog for this library: * + * NDK r10e?: Add MIPS MSA feature. + * + * NDK r10: Support for 64-bit CPUs (Intel, ARM & MIPS). + * * NDK r8d: Add android_setCpu(). * * NDK r8c: Add new ARM CPU features: VFPv2, VFP_D32, VFP_FP16, @@ -57,20 +61,17 @@ * NDK r4: Initial release */ -#if defined(__le32__) - -// When users enter this, we should only provide interface and -// libportable will give the implementations. - -#else // !__le32__ +#include "cpu-features.h" -#include <sys/system_properties.h> +#include <dlfcn.h> +#include <errno.h> +#include <fcntl.h> #include <pthread.h> -#include "cpu-features.h" #include <stdio.h> #include <stdlib.h> -#include <fcntl.h> -#include <errno.h> +#include <string.h> +#include <sys/system_properties.h> +#include <unistd.h> static pthread_once_t g_once; static int g_inited; @@ -82,15 +83,7 @@ static int g_cpuCount; static uint32_t g_cpuIdArm; #endif -static const int android_cpufeatures_debug = 0; - -#ifdef __arm__ -# define DEFAULT_CPU_FAMILY ANDROID_CPU_FAMILY_ARM -#elif defined __i386__ -# define DEFAULT_CPU_FAMILY ANDROID_CPU_FAMILY_X86 -#else -# define DEFAULT_CPU_FAMILY ANDROID_CPU_FAMILY_UNKNOWN -#endif +static const int android_cpufeatures_debug = 0; #define D(...) \ do { \ @@ -118,6 +111,25 @@ static __inline__ void x86_cpuid(int func, int values[4]) values[2] = c; values[3] = d; } +#elif defined(__x86_64__) +static __inline__ void x86_cpuid(int func, int values[4]) +{ + int64_t a, b, c, d; + /* We need to preserve ebx since we're compiling PIC code */ + /* this means we can't use "=b" for the second output register */ + __asm__ __volatile__ ( \ + "push %%rbx\n" + "cpuid\n" \ + "mov %%rbx, %1\n" + "pop %%rbx\n" + : "=a" (a), "=r" (b), "=c" (c), "=d" (d) \ + : "a" (func) \ + ); + values[0] = a; + values[1] = b; + values[2] = c; + values[3] = d; +} #endif /* Get the size of a file by reading it until the end. This is needed @@ -127,7 +139,8 @@ static __inline__ void x86_cpuid(int func, int values[4]) static int get_file_size(const char* pathname) { - int fd, result = 0; + + int fd, result = 0; char buffer[256]; fd = open(pathname, O_RDONLY); @@ -187,6 +200,7 @@ read_file(const char* pathname, char* buffer, size_t buffsize) return count; } +#ifdef __arm__ /* Extract the content of a the first occurence of a given field in * the content of /proc/cpuinfo and return it as a heap-allocated * string that must be freed by the caller. @@ -199,7 +213,7 @@ extract_cpuinfo_field(const char* buffer, int buflen, const char* field) int fieldlen = strlen(field); const char* bufend = buffer + buflen; char* result = NULL; - int len, ignore; + int len; const char *p, *q; /* Look for first field occurence, and ensures it starts the line. */ @@ -272,6 +286,7 @@ has_list_item(const char* list, const char* item) } return 0; } +#endif /* __arm__ */ /* Parse a number starting from 'input', but not going further * than 'limit'. Return the value into '*result'. @@ -316,11 +331,13 @@ parse_decimal(const char* input, const char* limit, int* result) return parse_number(input, limit, 10, result); } +#ifdef __arm__ static const char* parse_hexadecimal(const char* input, const char* limit, int* result) { return parse_number(input, limit, 16, result); } +#endif /* __arm__ */ /* This small data type is used to represent a CPU list / mask, as read * from sysfs on Linux. See http://www.kernel.org/doc/Documentation/cputopology.txt @@ -432,6 +449,18 @@ cpulist_read_from(CpuList* list, const char* filename) cpulist_parse(list, file, filelen); } +#if defined(__aarch64__) +// see <uapi/asm/hwcap.h> kernel header +#define HWCAP_FP (1 << 0) +#define HWCAP_ASIMD (1 << 1) +#define HWCAP_AES (1 << 3) +#define HWCAP_PMULL (1 << 4) +#define HWCAP_SHA1 (1 << 5) +#define HWCAP_SHA2 (1 << 6) +#define HWCAP_CRC32 (1 << 7) +#endif + +#if defined(__arm__) // See <asm/hwcap.h> kernel header. #define HWCAP_VFP (1 << 6) @@ -443,27 +472,84 @@ cpulist_read_from(CpuList* list, const char* filename) #define HWCAP_IDIVA (1 << 17) #define HWCAP_IDIVT (1 << 18) +// see <uapi/asm/hwcap.h> kernel header +#define HWCAP2_AES (1 << 0) +#define HWCAP2_PMULL (1 << 1) +#define HWCAP2_SHA1 (1 << 2) +#define HWCAP2_SHA2 (1 << 3) +#define HWCAP2_CRC32 (1 << 4) + +// This is the list of 32-bit ARMv7 optional features that are _always_ +// supported by ARMv8 CPUs, as mandated by the ARM Architecture Reference +// Manual. +#define HWCAP_SET_FOR_ARMV8 \ + ( HWCAP_VFP | \ + HWCAP_NEON | \ + HWCAP_VFPv3 | \ + HWCAP_VFPv4 | \ + HWCAP_IDIVA | \ + HWCAP_IDIVT ) +#endif + +#if defined(__mips__) +// see <uapi/asm/hwcap.h> kernel header +#define HWCAP_MIPS_R6 (1 << 0) +#define HWCAP_MIPS_MSA (1 << 1) +#endif + +#if defined(__arm__) || defined(__aarch64__) || defined(__mips__) + #define AT_HWCAP 16 +#define AT_HWCAP2 26 + +// Probe the system's C library for a 'getauxval' function and call it if +// it exits, or return 0 for failure. This function is available since API +// level 20. +// +// This code does *NOT* check for '__ANDROID_API__ >= 20' to support the +// edge case where some NDK developers use headers for a platform that is +// newer than the one really targetted by their application. +// This is typically done to use newer native APIs only when running on more +// recent Android versions, and requires careful symbol management. +// +// Note that getauxval() can't really be re-implemented here, because +// its implementation does not parse /proc/self/auxv. Instead it depends +// on values that are passed by the kernel at process-init time to the +// C runtime initialization layer. +static uint32_t +get_elf_hwcap_from_getauxval(int hwcap_type) { + typedef unsigned long getauxval_func_t(unsigned long); + + dlerror(); + void* libc_handle = dlopen("libc.so", RTLD_NOW); + if (!libc_handle) { + D("Could not dlopen() C library: %s\n", dlerror()); + return 0; + } + + uint32_t ret = 0; + getauxval_func_t* func = (getauxval_func_t*) + dlsym(libc_handle, "getauxval"); + if (!func) { + D("Could not find getauxval() in C library\n"); + } else { + // Note: getauxval() returns 0 on failure. Doesn't touch errno. + ret = (uint32_t)(*func)(hwcap_type); + } + dlclose(libc_handle); + return ret; +} +#endif #if defined(__arm__) -/* Compute the ELF HWCAP flags. - */ +// Parse /proc/self/auxv to extract the ELF HW capabilities bitmap for the +// current CPU. Note that this file is not accessible from regular +// application processes on some Android platform releases. +// On success, return new ELF hwcaps, or 0 on failure. static uint32_t -get_elf_hwcap(const char* cpuinfo, int cpuinfo_len) -{ - /* IMPORTANT: - * Accessing /proc/self/auxv doesn't work anymore on all - * platform versions. More specifically, when running inside - * a regular application process, most of /proc/self/ will be - * non-readable, including /proc/self/auxv. This doesn't - * happen however if the application is debuggable, or when - * running under the "shell" UID, which is why this was not - * detected appropriately. - */ -#if 0 - uint32_t result = 0; +get_elf_hwcap_from_proc_self_auxv(void) { const char filepath[] = "/proc/self/auxv"; - int fd = open(filepath, O_RDONLY); + int fd = TEMP_FAILURE_RETRY(open(filepath, O_RDONLY)); if (fd < 0) { D("Could not open %s: %s\n", filepath, strerror(errno)); return 0; @@ -471,11 +557,10 @@ get_elf_hwcap(const char* cpuinfo, int cpuinfo_len) struct { uint32_t tag; uint32_t value; } entry; + uint32_t result = 0; for (;;) { - int ret = read(fd, (char*)&entry, sizeof entry); + int ret = TEMP_FAILURE_RETRY(read(fd, (char*)&entry, sizeof entry)); if (ret < 0) { - if (errno == EINTR) - continue; D("Error while reading %s: %s\n", filepath, strerror(errno)); break; } @@ -489,12 +574,33 @@ get_elf_hwcap(const char* cpuinfo, int cpuinfo_len) } close(fd); return result; -#else - // Recreate ELF hwcaps by parsing /proc/cpuinfo Features tag. +} + +/* Compute the ELF HWCAP flags from the content of /proc/cpuinfo. + * This works by parsing the 'Features' line, which lists which optional + * features the device's CPU supports, on top of its reference + * architecture. + */ +static uint32_t +get_elf_hwcap_from_proc_cpuinfo(const char* cpuinfo, int cpuinfo_len) { uint32_t hwcaps = 0; + long architecture = 0; + char* cpuArch = extract_cpuinfo_field(cpuinfo, cpuinfo_len, "CPU architecture"); + if (cpuArch) { + architecture = strtol(cpuArch, NULL, 10); + free(cpuArch); + + if (architecture >= 8L) { + // This is a 32-bit ARM binary running on a 64-bit ARM64 kernel. + // The 'Features' line only lists the optional features that the + // device's CPU supports, compared to its reference architecture + // which are of no use for this process. + D("Faking 32-bit ARM HWCaps on ARMv%ld CPU\n", architecture); + return HWCAP_SET_FOR_ARMV8; + } + } char* cpuFeatures = extract_cpuinfo_field(cpuinfo, cpuinfo_len, "Features"); - if (cpuFeatures != NULL) { D("Found cpuFeatures = '%s'\n", cpuFeatures); @@ -520,7 +626,6 @@ get_elf_hwcap(const char* cpuinfo, int cpuinfo_len) free(cpuFeatures); } return hwcaps; -#endif } #endif /* __arm__ */ @@ -609,9 +714,6 @@ android_cpuInit(void) #ifdef __arm__ { - char* features = NULL; - char* architecture = NULL; - /* Extract architecture from the "CPU Architecture" field. * The list is well-known, unlike the the output of * the 'Processor' field which can vary greatly. @@ -632,10 +734,7 @@ android_cpuInit(void) /* read the initial decimal number, ignore the rest */ archNumber = strtol(cpuArch, &end, 10); - /* Here we assume that ARMv8 will be upwards compatible with v7 - * in the future. Unfortunately, there is no 'Features' field to - * indicate that Thumb-2 is supported. - */ + /* Note that ARMv8 is upwards compatible with ARMv7. */ if (end > cpuArch && archNumber >= 7) { hasARMv7 = 1; } @@ -676,7 +775,19 @@ android_cpuInit(void) } /* Extract the list of CPU features from ELF hwcaps */ - uint32_t hwcaps = get_elf_hwcap(cpuinfo, cpuinfo_len); + uint32_t hwcaps = 0; + hwcaps = get_elf_hwcap_from_getauxval(AT_HWCAP); + if (!hwcaps) { + D("Parsing /proc/self/auxv to extract ELF hwcaps!\n"); + hwcaps = get_elf_hwcap_from_proc_self_auxv(); + } + if (!hwcaps) { + // Parsing /proc/self/auxv will fail from regular application + // processes on some Android platform versions, when this happens + // parse proc/cpuinfo instead. + D("Parsing /proc/cpuinfo to extract ELF hwcaps!\n"); + hwcaps = get_elf_hwcap_from_proc_cpuinfo(cpuinfo, cpuinfo_len); + } if (hwcaps != 0) { int has_vfp = (hwcaps & HWCAP_VFP); @@ -737,6 +848,27 @@ android_cpuInit(void) g_cpuFeatures |= ANDROID_CPU_ARM_FEATURE_iWMMXt; } + /* Extract the list of CPU features from ELF hwcaps2 */ + uint32_t hwcaps2 = 0; + hwcaps2 = get_elf_hwcap_from_getauxval(AT_HWCAP2); + if (hwcaps2 != 0) { + int has_aes = (hwcaps2 & HWCAP2_AES); + int has_pmull = (hwcaps2 & HWCAP2_PMULL); + int has_sha1 = (hwcaps2 & HWCAP2_SHA1); + int has_sha2 = (hwcaps2 & HWCAP2_SHA2); + int has_crc32 = (hwcaps2 & HWCAP2_CRC32); + + if (has_aes) + g_cpuFeatures |= ANDROID_CPU_ARM_FEATURE_AES; + if (has_pmull) + g_cpuFeatures |= ANDROID_CPU_ARM_FEATURE_PMULL; + if (has_sha1) + g_cpuFeatures |= ANDROID_CPU_ARM_FEATURE_SHA1; + if (has_sha2) + g_cpuFeatures |= ANDROID_CPU_ARM_FEATURE_SHA2; + if (has_crc32) + g_cpuFeatures |= ANDROID_CPU_ARM_FEATURE_CRC32; + } /* Extract the cpuid value from various fields */ // The CPUID value is broken up in several entries in /proc/cpuinfo. // This table is used to rebuild it from the entries. @@ -806,10 +938,64 @@ android_cpuInit(void) g_cpuFeatures |= entry->or_flags; } + // Special case: The emulator-specific Android 4.2 kernel fails + // to report support for the 32-bit ARM IDIV instruction. + // Technically, this is a feature of the virtual CPU implemented + // by the emulator. Note that it could also support Thumb IDIV + // in the future, and this will have to be slightly updated. + char* hardware = extract_cpuinfo_field(cpuinfo, + cpuinfo_len, + "Hardware"); + if (hardware) { + if (!strcmp(hardware, "Goldfish") && + g_cpuIdArm == 0x4100c080 && + (g_cpuFamily & ANDROID_CPU_ARM_FEATURE_ARMv7) != 0) { + g_cpuFeatures |= ANDROID_CPU_ARM_FEATURE_IDIV_ARM; + } + free(hardware); + } } #endif /* __arm__ */ +#ifdef __aarch64__ + { + /* Extract the list of CPU features from ELF hwcaps */ + uint32_t hwcaps = 0; + hwcaps = get_elf_hwcap_from_getauxval(AT_HWCAP); + if (hwcaps != 0) { + int has_fp = (hwcaps & HWCAP_FP); + int has_asimd = (hwcaps & HWCAP_ASIMD); + int has_aes = (hwcaps & HWCAP_AES); + int has_pmull = (hwcaps & HWCAP_PMULL); + int has_sha1 = (hwcaps & HWCAP_SHA1); + int has_sha2 = (hwcaps & HWCAP_SHA2); + int has_crc32 = (hwcaps & HWCAP_CRC32); + + if(has_fp == 0) { + D("ERROR: Floating-point unit missing, but is required by Android on AArch64 CPUs\n"); + } + if(has_asimd == 0) { + D("ERROR: ASIMD unit missing, but is required by Android on AArch64 CPUs\n"); + } -#ifdef __i386__ + if (has_fp) + g_cpuFeatures |= ANDROID_CPU_ARM64_FEATURE_FP; + if (has_asimd) + g_cpuFeatures |= ANDROID_CPU_ARM64_FEATURE_ASIMD; + if (has_aes) + g_cpuFeatures |= ANDROID_CPU_ARM64_FEATURE_AES; + if (has_pmull) + g_cpuFeatures |= ANDROID_CPU_ARM64_FEATURE_PMULL; + if (has_sha1) + g_cpuFeatures |= ANDROID_CPU_ARM64_FEATURE_SHA1; + if (has_sha2) + g_cpuFeatures |= ANDROID_CPU_ARM64_FEATURE_SHA2; + if (has_crc32) + g_cpuFeatures |= ANDROID_CPU_ARM64_FEATURE_CRC32; + } + } +#endif /* __aarch64__ */ + +#if defined(__i386__) || defined(__x86_64__) int regs[4]; /* According to http://en.wikipedia.org/wiki/CPUID */ @@ -829,10 +1015,50 @@ android_cpuInit(void) if ((regs[2] & (1 << 23)) != 0) { g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_POPCNT; } + if ((regs[2] & (1 << 19)) != 0) { + g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_SSE4_1; + } + if ((regs[2] & (1 << 20)) != 0) { + g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_SSE4_2; + } if (vendorIsIntel && (regs[2] & (1 << 22)) != 0) { g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_MOVBE; } + if ((regs[2] & (1 << 25)) != 0) { + g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_AES_NI; + } + if ((regs[2] & (1 << 28)) != 0) { + g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_AVX; + } + if ((regs[2] & (1 << 30)) != 0) { + g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_RDRAND; + } + + x86_cpuid(7, regs); + if ((regs[1] & (1 << 5)) != 0) { + g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_AVX2; + } + if ((regs[1] & (1 << 29)) != 0) { + g_cpuFeatures |= ANDROID_CPU_X86_FEATURE_SHA_NI; + } + + #endif +#if defined( __mips__) + { /* MIPS and MIPS64 */ + /* Extract the list of CPU features from ELF hwcaps */ + uint32_t hwcaps = 0; + hwcaps = get_elf_hwcap_from_getauxval(AT_HWCAP); + if (hwcaps != 0) { + int has_r6 = (hwcaps & HWCAP_MIPS_R6); + int has_msa = (hwcaps & HWCAP_MIPS_MSA); + if (has_r6) + g_cpuFeatures |= ANDROID_CPU_MIPS_FEATURE_R6; + if (has_msa) + g_cpuFeatures |= ANDROID_CPU_MIPS_FEATURE_MSA; + } + } +#endif /* __mips__ */ free(cpuinfo); } @@ -1085,5 +1311,3 @@ android_setCpuArm(int cpu_count, uint64_t cpu_features, uint32_t cpu_id) * ARCH_NEON_FP16 (+EXT_FP16) * */ - -#endif // defined(__le32__) diff --git a/platform/android/cpu-features.h b/thirdparty/libvpx/third_party/android/cpu-features.h index 01b7fe207c..1e9724197a 100644 --- a/platform/android/cpu-features.h +++ b/thirdparty/libvpx/third_party/android/cpu-features.h @@ -33,6 +33,9 @@ __BEGIN_DECLS +/* A list of valid values returned by android_getCpuFamily(). + * They describe the CPU Architecture of the current process. + */ typedef enum { ANDROID_CPU_FAMILY_UNKNOWN = 0, ANDROID_CPU_FAMILY_ARM, @@ -46,11 +49,24 @@ typedef enum { } AndroidCpuFamily; -/* Return family of the device's CPU */ -extern AndroidCpuFamily android_getCpuFamily(void); +/* Return the CPU family of the current process. + * + * Note that this matches the bitness of the current process. I.e. when + * running a 32-bit binary on a 64-bit capable CPU, this will return the + * 32-bit CPU family value. + */ +extern AndroidCpuFamily android_getCpuFamily(void); + +/* Return a bitmap describing a set of optional CPU features that are + * supported by the current device's CPU. The exact bit-flags returned + * depend on the value returned by android_getCpuFamily(). See the + * documentation for the ANDROID_CPU_*_FEATURE_* flags below for details. + */ +extern uint64_t android_getCpuFeatures(void); -/* The list of feature flags for ARM CPUs that can be recognized by the - * library. Value details are: +/* The list of feature flags for ANDROID_CPU_FAMILY_ARM that can be + * recognized by the library (see note below for 64-bit ARM). Value details + * are: * * VFPv2: * CPU supports the VFPv2 instruction set. Many, but not all, ARMv6 CPUs @@ -106,6 +122,27 @@ extern AndroidCpuFamily android_getCpuFamily(void); * ARM CPU. This is only available on a few XScale-based CPU designs * sold by Marvell. Pretty rare in practice. * + * AES: + * CPU supports AES instructions. These instructions are only + * available for 32-bit applications running on ARMv8 CPU. + * + * CRC32: + * CPU supports CRC32 instructions. These instructions are only + * available for 32-bit applications running on ARMv8 CPU. + * + * SHA2: + * CPU supports SHA2 instructions. These instructions are only + * available for 32-bit applications running on ARMv8 CPU. + * + * SHA1: + * CPU supports SHA1 instructions. These instructions are only + * available for 32-bit applications running on ARMv8 CPU. + * + * PMULL: + * CPU supports 64-bit PMULL and PMULL2 instructions. These + * instructions are only available for 32-bit applications + * running on ARMv8 CPU. + * * If you want to tell the compiler to generate code that targets one of * the feature set above, you should probably use one of the following * flags (for more details, see technical note at the end of this file): @@ -153,6 +190,13 @@ extern AndroidCpuFamily android_getCpuFamily(void); * * -mcpu=iwmmxt * Allows the use of iWMMXt instrinsics with GCC. + * + * IMPORTANT NOTE: These flags should only be tested when + * android_getCpuFamily() returns ANDROID_CPU_FAMILY_ARM, i.e. this is a + * 32-bit process. + * + * When running a 64-bit ARM process on an ARMv8 CPU, + * android_getCpuFeatures() will return a different set of bitflags */ enum { ANDROID_CPU_ARM_FEATURE_ARMv7 = (1 << 0), @@ -167,19 +211,84 @@ enum { ANDROID_CPU_ARM_FEATURE_IDIV_ARM = (1 << 9), ANDROID_CPU_ARM_FEATURE_IDIV_THUMB2 = (1 << 10), ANDROID_CPU_ARM_FEATURE_iWMMXt = (1 << 11), + ANDROID_CPU_ARM_FEATURE_AES = (1 << 12), + ANDROID_CPU_ARM_FEATURE_PMULL = (1 << 13), + ANDROID_CPU_ARM_FEATURE_SHA1 = (1 << 14), + ANDROID_CPU_ARM_FEATURE_SHA2 = (1 << 15), + ANDROID_CPU_ARM_FEATURE_CRC32 = (1 << 16), +}; + +/* The bit flags corresponding to the output of android_getCpuFeatures() + * when android_getCpuFamily() returns ANDROID_CPU_FAMILY_ARM64. Value details + * are: + * + * FP: + * CPU has Floating-point unit. + * + * ASIMD: + * CPU has Advanced SIMD unit. + * + * AES: + * CPU supports AES instructions. + * + * CRC32: + * CPU supports CRC32 instructions. + * + * SHA2: + * CPU supports SHA2 instructions. + * + * SHA1: + * CPU supports SHA1 instructions. + * + * PMULL: + * CPU supports 64-bit PMULL and PMULL2 instructions. + */ +enum { + ANDROID_CPU_ARM64_FEATURE_FP = (1 << 0), + ANDROID_CPU_ARM64_FEATURE_ASIMD = (1 << 1), + ANDROID_CPU_ARM64_FEATURE_AES = (1 << 2), + ANDROID_CPU_ARM64_FEATURE_PMULL = (1 << 3), + ANDROID_CPU_ARM64_FEATURE_SHA1 = (1 << 4), + ANDROID_CPU_ARM64_FEATURE_SHA2 = (1 << 5), + ANDROID_CPU_ARM64_FEATURE_CRC32 = (1 << 6), }; +/* The bit flags corresponding to the output of android_getCpuFeatures() + * when android_getCpuFamily() returns ANDROID_CPU_FAMILY_X86 or + * ANDROID_CPU_FAMILY_X86_64. + */ enum { ANDROID_CPU_X86_FEATURE_SSSE3 = (1 << 0), ANDROID_CPU_X86_FEATURE_POPCNT = (1 << 1), ANDROID_CPU_X86_FEATURE_MOVBE = (1 << 2), + ANDROID_CPU_X86_FEATURE_SSE4_1 = (1 << 3), + ANDROID_CPU_X86_FEATURE_SSE4_2 = (1 << 4), + ANDROID_CPU_X86_FEATURE_AES_NI = (1 << 5), + ANDROID_CPU_X86_FEATURE_AVX = (1 << 6), + ANDROID_CPU_X86_FEATURE_RDRAND = (1 << 7), + ANDROID_CPU_X86_FEATURE_AVX2 = (1 << 8), + ANDROID_CPU_X86_FEATURE_SHA_NI = (1 << 9), +}; + +/* The bit flags corresponding to the output of android_getCpuFeatures() + * when android_getCpuFamily() returns ANDROID_CPU_FAMILY_MIPS + * or ANDROID_CPU_FAMILY_MIPS64. Values are: + * + * R6: + * CPU executes MIPS Release 6 instructions natively, and + * supports obsoleted R1..R5 instructions only via kernel traps. + * + * MSA: + * CPU supports Mips SIMD Architecture instructions. + */ +enum { + ANDROID_CPU_MIPS_FEATURE_R6 = (1 << 0), + ANDROID_CPU_MIPS_FEATURE_MSA = (1 << 1), }; -extern uint64_t android_getCpuFeatures(void); -#define android_getCpuFeaturesExt android_getCpuFeatures /* Return the number of CPU cores detected on this device. */ -extern int android_getCpuCount(void); +extern int android_getCpuCount(void); /* The following is used to force the CPU count and features * mask in sandboxed processes. Under 4.1 and higher, these processes diff --git a/thirdparty/misc/ifaddrs-android.cc b/thirdparty/misc/ifaddrs-android.cc new file mode 100644 index 0000000000..1f8835b829 --- /dev/null +++ b/thirdparty/misc/ifaddrs-android.cc @@ -0,0 +1,221 @@ +/* + * libjingle + * Copyright 2012, Google Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "ifaddrs-android.h" +#include <stdlib.h> +#include <string.h> +#include <sys/types.h> +#include <sys/socket.h> +#include <sys/utsname.h> +#include <sys/ioctl.h> +#include <netinet/in.h> +#include <net/if.h> +#include <unistd.h> +#include <errno.h> +#include <linux/netlink.h> +#include <linux/rtnetlink.h> +struct netlinkrequest { + nlmsghdr header; + ifaddrmsg msg; +}; +namespace { +const int kMaxReadSize = 4096; +}; +int set_ifname(struct ifaddrs* ifaddr, int interface) { + char buf[IFNAMSIZ] = {0}; + char* name = if_indextoname(interface, buf); + if (name == NULL) { + return -1; + } + ifaddr->ifa_name = new char[strlen(name) + 1]; + strncpy(ifaddr->ifa_name, name, strlen(name) + 1); + return 0; +} +int set_flags(struct ifaddrs* ifaddr) { + int fd = socket(AF_INET, SOCK_DGRAM, 0); + if (fd == -1) { + return -1; + } + ifreq ifr; + memset(&ifr, 0, sizeof(ifr)); + strncpy(ifr.ifr_name, ifaddr->ifa_name, IFNAMSIZ - 1); + int rc = ioctl(fd, SIOCGIFFLAGS, &ifr); + close(fd); + if (rc == -1) { + return -1; + } + ifaddr->ifa_flags = ifr.ifr_flags; + return 0; +} +int set_addresses(struct ifaddrs* ifaddr, ifaddrmsg* msg, void* data, + size_t len) { + if (msg->ifa_family == AF_INET) { + sockaddr_in* sa = new sockaddr_in; + sa->sin_family = AF_INET; + memcpy(&sa->sin_addr, data, len); + ifaddr->ifa_addr = reinterpret_cast<sockaddr*>(sa); + } else if (msg->ifa_family == AF_INET6) { + sockaddr_in6* sa = new sockaddr_in6; + sa->sin6_family = AF_INET6; + sa->sin6_scope_id = msg->ifa_index; + memcpy(&sa->sin6_addr, data, len); + ifaddr->ifa_addr = reinterpret_cast<sockaddr*>(sa); + } else { + return -1; + } + return 0; +} +int make_prefixes(struct ifaddrs* ifaddr, int family, int prefixlen) { + char* prefix = NULL; + if (family == AF_INET) { + sockaddr_in* mask = new sockaddr_in; + mask->sin_family = AF_INET; + memset(&mask->sin_addr, 0, sizeof(in_addr)); + ifaddr->ifa_netmask = reinterpret_cast<sockaddr*>(mask); + if (prefixlen > 32) { + prefixlen = 32; + } + prefix = reinterpret_cast<char*>(&mask->sin_addr); + } else if (family == AF_INET6) { + sockaddr_in6* mask = new sockaddr_in6; + mask->sin6_family = AF_INET6; + memset(&mask->sin6_addr, 0, sizeof(in6_addr)); + ifaddr->ifa_netmask = reinterpret_cast<sockaddr*>(mask); + if (prefixlen > 128) { + prefixlen = 128; + } + prefix = reinterpret_cast<char*>(&mask->sin6_addr); + } else { + return -1; + } + for (int i = 0; i < (prefixlen / 8); i++) { + *prefix++ = 0xFF; + } + char remainder = 0xff; + remainder <<= (8 - prefixlen % 8); + *prefix = remainder; + return 0; +} +int populate_ifaddrs(struct ifaddrs* ifaddr, ifaddrmsg* msg, void* bytes, + size_t len) { + if (set_ifname(ifaddr, msg->ifa_index) != 0) { + return -1; + } + if (set_flags(ifaddr) != 0) { + return -1; + } + if (set_addresses(ifaddr, msg, bytes, len) != 0) { + return -1; + } + if (make_prefixes(ifaddr, msg->ifa_family, msg->ifa_prefixlen) != 0) { + return -1; + } + return 0; +} +int getifaddrs(struct ifaddrs** result) { + int fd = socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE); + if (fd < 0) { + return -1; + } + netlinkrequest ifaddr_request; + memset(&ifaddr_request, 0, sizeof(ifaddr_request)); + ifaddr_request.header.nlmsg_flags = NLM_F_ROOT | NLM_F_REQUEST; + ifaddr_request.header.nlmsg_type = RTM_GETADDR; + ifaddr_request.header.nlmsg_len = NLMSG_LENGTH(sizeof(ifaddrmsg)); + ssize_t count = send(fd, &ifaddr_request, ifaddr_request.header.nlmsg_len, 0); + if (static_cast<size_t>(count) != ifaddr_request.header.nlmsg_len) { + close(fd); + return -1; + } + struct ifaddrs* start = NULL; + struct ifaddrs* current = NULL; + char buf[kMaxReadSize]; + ssize_t amount_read = recv(fd, &buf, kMaxReadSize, 0); + while (amount_read > 0) { + nlmsghdr* header = reinterpret_cast<nlmsghdr*>(&buf[0]); + size_t header_size = static_cast<size_t>(amount_read); + for ( ; NLMSG_OK(header, header_size); + header = NLMSG_NEXT(header, header_size)) { + switch (header->nlmsg_type) { + case NLMSG_DONE: + // Success. Return. + *result = start; + close(fd); + return 0; + case NLMSG_ERROR: + close(fd); + freeifaddrs(start); + return -1; + case RTM_NEWADDR: { + ifaddrmsg* address_msg = + reinterpret_cast<ifaddrmsg*>(NLMSG_DATA(header)); + rtattr* rta = IFA_RTA(address_msg); + ssize_t payload_len = IFA_PAYLOAD(header); + while (RTA_OK(rta, payload_len)) { + if (rta->rta_type == IFA_ADDRESS) { + int family = address_msg->ifa_family; + if (family == AF_INET || family == AF_INET6) { + ifaddrs* newest = new ifaddrs; + memset(newest, 0, sizeof(ifaddrs)); + if (current) { + current->ifa_next = newest; + } else { + start = newest; + } + if (populate_ifaddrs(newest, address_msg, RTA_DATA(rta), + RTA_PAYLOAD(rta)) != 0) { + freeifaddrs(start); + *result = NULL; + return -1; + } + current = newest; + } + } + rta = RTA_NEXT(rta, payload_len); + } + break; + } + } + } + amount_read = recv(fd, &buf, kMaxReadSize, 0); + } + close(fd); + freeifaddrs(start); + return -1; +} +void freeifaddrs(struct ifaddrs* addrs) { + struct ifaddrs* last = NULL; + struct ifaddrs* cursor = addrs; + while (cursor) { + delete[] cursor->ifa_name; + delete cursor->ifa_addr; + delete cursor->ifa_netmask; + last = cursor; + cursor = cursor->ifa_next; + delete last; + } +} diff --git a/platform/android/ifaddrs_android.h b/thirdparty/misc/ifaddrs-android.h index 539fa40455..6e204af26f 100644 --- a/platform/android/ifaddrs_android.h +++ b/thirdparty/misc/ifaddrs-android.h @@ -33,13 +33,13 @@ // about every network interface available on the host. // See 'man getifaddrs' on Linux or OS X (nb: it is not a POSIX function). struct ifaddrs { - struct ifaddrs* ifa_next; - char* ifa_name; - unsigned int ifa_flags; - struct sockaddr* ifa_addr; - struct sockaddr* ifa_netmask; - // Real ifaddrs has broadcast, point to point and data members. - // We don't need them (yet?). + struct ifaddrs* ifa_next; + char* ifa_name; + unsigned int ifa_flags; + struct sockaddr* ifa_addr; + struct sockaddr* ifa_netmask; + // Real ifaddrs has broadcast, point to point and data members. + // We don't need them (yet?). }; int getifaddrs(struct ifaddrs** result); void freeifaddrs(struct ifaddrs* addrs); |