summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/io/stream_peer.cpp25
-rw-r--r--doc/classes/@GDScript.xml10
-rw-r--r--doc/classes/AABB.xml2
-rw-r--r--doc/classes/Animation.xml2
-rw-r--r--doc/classes/AnimationPlayer.xml2
-rw-r--r--doc/classes/AudioServer.xml2
-rw-r--r--doc/classes/AudioStream.xml2
-rw-r--r--doc/classes/BakedLightmap.xml2
-rw-r--r--doc/classes/CanvasItem.xml2
-rw-r--r--doc/classes/CanvasLayer.xml2
-rw-r--r--doc/classes/CollisionShape.xml2
-rw-r--r--doc/classes/CollisionShape2D.xml2
-rw-r--r--doc/classes/Control.xml4
-rw-r--r--doc/classes/DirectionalLight.xml2
-rw-r--r--doc/classes/Directory.xml2
-rw-r--r--doc/classes/EditorPlugin.xml2
-rw-r--r--doc/classes/Environment.xml2
-rw-r--r--doc/classes/File.xml2
-rw-r--r--doc/classes/GIProbe.xml2
-rw-r--r--doc/classes/HTTPClient.xml2
-rw-r--r--doc/classes/HTTPRequest.xml2
-rw-r--r--doc/classes/KinematicBody.xml2
-rw-r--r--doc/classes/Light.xml2
-rw-r--r--doc/classes/NetworkedMultiplayerPeer.xml2
-rw-r--r--doc/classes/Node.xml2
-rw-r--r--doc/classes/Node2D.xml2
-rw-r--r--doc/classes/OmniLight.xml2
-rw-r--r--doc/classes/Physics2DDirectSpaceState.xml2
-rw-r--r--doc/classes/PhysicsBody.xml2
-rw-r--r--doc/classes/PhysicsBody2D.xml2
-rw-r--r--doc/classes/PhysicsDirectSpaceState.xml2
-rw-r--r--doc/classes/Plane.xml2
-rw-r--r--doc/classes/Rect2.xml2
-rw-r--r--doc/classes/ReflectionProbe.xml2
-rw-r--r--doc/classes/RichTextLabel.xml2
-rw-r--r--doc/classes/RigidBody.xml2
-rw-r--r--doc/classes/SceneTree.xml2
-rw-r--r--doc/classes/Script.xml2
-rw-r--r--doc/classes/Shader.xml2
-rw-r--r--doc/classes/Shape.xml2
-rw-r--r--doc/classes/Shape2D.xml2
-rw-r--r--doc/classes/Spatial.xml2
-rw-r--r--doc/classes/SpatialMaterial.xml2
-rw-r--r--doc/classes/SpotLight.xml2
-rw-r--r--doc/classes/StreamPeer.xml24
-rw-r--r--doc/classes/StreamPeerSSL.xml2
-rw-r--r--doc/classes/TileMap.xml2
-rw-r--r--doc/classes/Transform.xml2
-rw-r--r--doc/classes/Vector2.xml2
-rw-r--r--doc/classes/Vector3.xml2
-rw-r--r--doc/classes/Viewport.xml2
-rw-r--r--doc/classes/World.xml2
-rw-r--r--doc/classes/World2D.xml2
-rw-r--r--doc/classes/WorldEnvironment.xml2
-rw-r--r--main/main.cpp6
-rw-r--r--modules/gdnative/pluginscript/pluginscript_instance.cpp5
-rw-r--r--modules/gdnative/pluginscript/pluginscript_language.cpp1
-rw-r--r--modules/gdnative/pluginscript/pluginscript_script.cpp49
-rw-r--r--modules/gdnative/pluginscript/pluginscript_script.h2
-rw-r--r--modules/gdscript/doc_classes/GDScript.xml2
-rw-r--r--modules/gdscript/gdscript_functions.cpp6
-rw-r--r--modules/gridmap/doc_classes/GridMap.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScript.xml2
-rw-r--r--modules/visual_script/visual_script_builtin_funcs.cpp16
-rw-r--r--platform/android/export/export.cpp28
-rw-r--r--platform/android/java/src/org/godotengine/godot/input/GodotTextInputWrapper.java11
-rw-r--r--scene/gui/scroll_container.cpp4
-rw-r--r--scene/register_scene_types.cpp8
-rw-r--r--scene/resources/font.cpp39
-rw-r--r--scene/resources/font.h8
70 files changed, 209 insertions, 143 deletions
diff --git a/core/io/stream_peer.cpp b/core/io/stream_peer.cpp
index fc00c26889..f6c4948fc3 100644
--- a/core/io/stream_peer.cpp
+++ b/core/io/stream_peer.cpp
@@ -375,18 +375,18 @@ void StreamPeer::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_big_endian", "enable"), &StreamPeer::set_big_endian);
ClassDB::bind_method(D_METHOD("is_big_endian_enabled"), &StreamPeer::is_big_endian_enabled);
- ClassDB::bind_method(D_METHOD("put_8", "val"), &StreamPeer::put_8);
- ClassDB::bind_method(D_METHOD("put_u8", "val"), &StreamPeer::put_u8);
- ClassDB::bind_method(D_METHOD("put_16", "val"), &StreamPeer::put_16);
- ClassDB::bind_method(D_METHOD("put_u16", "val"), &StreamPeer::put_u16);
- ClassDB::bind_method(D_METHOD("put_32", "val"), &StreamPeer::put_32);
- ClassDB::bind_method(D_METHOD("put_u32", "val"), &StreamPeer::put_u32);
- ClassDB::bind_method(D_METHOD("put_64", "val"), &StreamPeer::put_64);
- ClassDB::bind_method(D_METHOD("put_u64", "val"), &StreamPeer::put_u64);
- ClassDB::bind_method(D_METHOD("put_float", "val"), &StreamPeer::put_float);
- ClassDB::bind_method(D_METHOD("put_double", "val"), &StreamPeer::put_double);
- ClassDB::bind_method(D_METHOD("put_utf8_string", "val"), &StreamPeer::put_utf8_string);
- ClassDB::bind_method(D_METHOD("put_var", "val"), &StreamPeer::put_var);
+ ClassDB::bind_method(D_METHOD("put_8", "value"), &StreamPeer::put_8);
+ ClassDB::bind_method(D_METHOD("put_u8", "value"), &StreamPeer::put_u8);
+ ClassDB::bind_method(D_METHOD("put_16", "value"), &StreamPeer::put_16);
+ ClassDB::bind_method(D_METHOD("put_u16", "value"), &StreamPeer::put_u16);
+ ClassDB::bind_method(D_METHOD("put_32", "value"), &StreamPeer::put_32);
+ ClassDB::bind_method(D_METHOD("put_u32", "value"), &StreamPeer::put_u32);
+ ClassDB::bind_method(D_METHOD("put_64", "value"), &StreamPeer::put_64);
+ ClassDB::bind_method(D_METHOD("put_u64", "value"), &StreamPeer::put_u64);
+ ClassDB::bind_method(D_METHOD("put_float", "value"), &StreamPeer::put_float);
+ ClassDB::bind_method(D_METHOD("put_double", "value"), &StreamPeer::put_double);
+ ClassDB::bind_method(D_METHOD("put_utf8_string", "value"), &StreamPeer::put_utf8_string);
+ ClassDB::bind_method(D_METHOD("put_var", "value"), &StreamPeer::put_var);
ClassDB::bind_method(D_METHOD("get_8"), &StreamPeer::get_8);
ClassDB::bind_method(D_METHOD("get_u8"), &StreamPeer::get_u8);
@@ -418,7 +418,6 @@ void StreamPeerBuffer::_bind_methods() {
ClassDB::bind_method(D_METHOD("duplicate"), &StreamPeerBuffer::duplicate);
ADD_PROPERTY(PropertyInfo(Variant::POOL_BYTE_ARRAY, "data_array"), "set_data_array", "get_data_array");
-
}
Error StreamPeerBuffer::put_data(const uint8_t *p_data, int p_bytes) {
diff --git a/doc/classes/@GDScript.xml b/doc/classes/@GDScript.xml
index 9b73849534..b9694d0e6d 100644
--- a/doc/classes/@GDScript.xml
+++ b/doc/classes/@GDScript.xml
@@ -182,14 +182,14 @@
<method name="clamp">
<return type="float">
</return>
- <argument index="0" name="val" type="float">
+ <argument index="0" name="value" type="float">
</argument>
<argument index="1" name="min" type="float">
</argument>
<argument index="2" name="max" type="float">
</argument>
<description>
- Clamps [code]val[/code] and returns a value not less than [code]min[/code] and not more than [code]max[/code].
+ Clamps [code]value[/code] and returns a value not less than [code]min[/code] and not more than [code]max[/code].
[codeblock]
speed = 1000
# a is 20
@@ -466,7 +466,7 @@
</argument>
<argument index="1" name="to" type="float">
</argument>
- <argument index="2" name="value" type="float">
+ <argument index="2" name="weight" type="float">
</argument>
<description>
Returns a normalized value considering the given range.
@@ -589,10 +589,10 @@
<method name="nearest_po2">
<return type="int">
</return>
- <argument index="0" name="val" type="int">
+ <argument index="0" name="value" type="int">
</argument>
<description>
- Returns the nearest larger power of 2 for integer [code]val[/code].
+ Returns the nearest larger power of 2 for integer [code]value[/code].
[codeblock]
nearest_po2(3) # returns 4
nearest_po2(4) # returns 4
diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml
index 6ca327b9df..c288e2a0c3 100644
--- a/doc/classes/AABB.xml
+++ b/doc/classes/AABB.xml
@@ -7,7 +7,7 @@
AABB consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/math/index.html
+ http://docs.godotengine.org/en/3.0/learning/features/math/index.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index e618e69258..104cdb114c 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -8,7 +8,7 @@
Animations are just data containers, and must be added to odes such as an [AnimationPlayer] or [AnimationTreePlayer] to be played back.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/animation/index.html
+ http://docs.godotengine.org/en/3.0/learning/features/animation/index.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml
index 50e4e9ff2b..4baef0a7f0 100644
--- a/doc/classes/AnimationPlayer.xml
+++ b/doc/classes/AnimationPlayer.xml
@@ -7,7 +7,7 @@
An animation player is used for general purpose playback of [Animation] resources. It contains a dictionary of animations (referenced by name) and custom blend times between their transitions. Additionally, animations can be played and blended in different channels.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/step_by_step/animations.html
+ http://docs.godotengine.org/en/3.0/learning/step_by_step/animations.html
http://docs.godotengine.org/en/3.0/learning/features/animation/index.html
</tutorials>
<demos>
diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml
index c0c7f4b4ea..c078359c11 100644
--- a/doc/classes/AudioServer.xml
+++ b/doc/classes/AudioServer.xml
@@ -7,7 +7,7 @@
AudioServer is a low level server interface for audio access. It is in charge of creating sample data (playable audio) as well as its playback via a voice interface.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/audio/audio_buses.html
+ http://docs.godotengine.org/en/3.0/learning/features/audio/audio_buses.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/AudioStream.xml b/doc/classes/AudioStream.xml
index b7ec1a017f..7de0cb91f1 100644
--- a/doc/classes/AudioStream.xml
+++ b/doc/classes/AudioStream.xml
@@ -7,7 +7,7 @@
Base class for audio streams. Audio streams are used for music playback, or other types of streamed sounds that don't fit or require more flexibility than a [Sample].
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/audio/audio_streams.html
+ http://docs.godotengine.org/en/3.0/learning/features/audio/audio_streams.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/BakedLightmap.xml b/doc/classes/BakedLightmap.xml
index 6a8e10485f..e193b8d89f 100644
--- a/doc/classes/BakedLightmap.xml
+++ b/doc/classes/BakedLightmap.xml
@@ -5,7 +5,7 @@
<description>
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/3d/baked_lightmaps.html
+ http://docs.godotengine.org/en/3.0/learning/features/3d/baked_lightmaps.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index 6d5576d958..ed53bc85be 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -11,7 +11,7 @@
Ultimately, a transform notification can be requested, which will notify the node that its global position changed in case the parent tree changed.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/2d/2d_transforms.html
+ http://docs.godotengine.org/en/3.0/learning/features/2d/2d_transforms.html
http://docs.godotengine.org/en/3.0/learning/features/2d/custom_drawing_in_2d.html
</tutorials>
<demos>
diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml
index 1533a29e54..625fa217ca 100644
--- a/doc/classes/CanvasLayer.xml
+++ b/doc/classes/CanvasLayer.xml
@@ -7,7 +7,7 @@
Canvas drawing layer. [CanvasItem] nodes that are direct or indirect children of a [code]CanvasLayer[/code] will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a [code]CanvasLayer[/code] with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below).
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/2d/2d_transforms.html
+ http://docs.godotengine.org/en/3.0/learning/features/2d/2d_transforms.html
http://docs.godotengine.org/en/3.0/learning/features/2d/canvas_layers.html
</tutorials>
<demos>
diff --git a/doc/classes/CollisionShape.xml b/doc/classes/CollisionShape.xml
index e2f1d81386..f7215ea09f 100644
--- a/doc/classes/CollisionShape.xml
+++ b/doc/classes/CollisionShape.xml
@@ -7,7 +7,7 @@
Editor facility for creating and editing collision shapes in 3D space. You can use this node to represent all sorts of collision shapes, for example, add this to an [Area] to give it a detection shape, or add it to a [PhysicsBody] to give create solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method get_shape] to get the actual shape.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/physics/physics_introduction.html
+ http://docs.godotengine.org/en/3.0/learning/features/physics/physics_introduction.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml
index 4382bc99db..3bfa29968b 100644
--- a/doc/classes/CollisionShape2D.xml
+++ b/doc/classes/CollisionShape2D.xml
@@ -7,7 +7,7 @@
Editor facility for creating and editing collision shapes in 2D space. You can use this node to represent all sorts of collision shapes, for example, add this to an [Area2D] to give it a detection shape, or add it to a [PhysicsBody2D] to give create solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method get_shape] to get the actual shape.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/physics/physics_introduction.html
+ http://docs.godotengine.org/en/3.0/learning/features/physics/physics_introduction.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index b974ecda64..3ce0457755 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -13,8 +13,8 @@
[Theme] resources change the Control's appearance. If you change the [Theme] on a [code]Control[/code] node, it affects all of its children. To override some of the theme's parameters, call one of the [code]add_*_override[/code] methods, like [method add_font_override]. You can override the theme with the inspector.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/gui/index.html
- http://docs.godotengine.org/en/3.0/learning/features/2d/custom_drawing_in_2d.html
+ http://docs.godotengine.org/en/3.0/learning/features/gui/index.html
+ http://docs.godotengine.org/en/3.0/learning/features/2d/custom_drawing_in_2d.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/DirectionalLight.xml b/doc/classes/DirectionalLight.xml
index 74fe8e856f..d8db695176 100644
--- a/doc/classes/DirectionalLight.xml
+++ b/doc/classes/DirectionalLight.xml
@@ -7,7 +7,7 @@
A DirectionalLight is a type of [Light] node that emits light constantly in one direction (the negative z axis of the node). It is used lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldspace location of the DirectionalLight transform (origin) is ignored, only the basis is used do determine light direction.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/3d/lights_and_shadows.html
+ http://docs.godotengine.org/en/3.0/learning/features/3d/lights_and_shadows.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml
index bd854dde3c..776db64fe6 100644
--- a/doc/classes/Directory.xml
+++ b/doc/classes/Directory.xml
@@ -23,7 +23,7 @@
[/codeblock]
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/step_by_step/filesystem.html
+ http://docs.godotengine.org/en/3.0/learning/step_by_step/filesystem.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index 1f94ef5ddf..6ff6053b77 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -7,7 +7,7 @@
Plugins are used by the editor to extend functionality. The most common types of plugins are those which edit a given node or resource type, import plugins and export plugins.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/development/plugins/index.html
+ http://docs.godotengine.org/en/3.0/development/plugins/index.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml
index f5fd874346..fcd7b17b18 100644
--- a/doc/classes/Environment.xml
+++ b/doc/classes/Environment.xml
@@ -12,7 +12,7 @@
- Adjustments
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/3d/environment_and_post_processing.html
+ http://docs.godotengine.org/en/3.0/learning/features/3d/environment_and_post_processing.html
http://docs.godotengine.org/en/3.0/learning/features/3d/high_dynamic_range.html
</tutorials>
<demos>
diff --git a/doc/classes/File.xml b/doc/classes/File.xml
index 2491e3b614..f1106f61b7 100644
--- a/doc/classes/File.xml
+++ b/doc/classes/File.xml
@@ -22,7 +22,7 @@
[/codeblock]
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/step_by_step/filesystem.html
+ http://docs.godotengine.org/en/3.0/learning/step_by_step/filesystem.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/GIProbe.xml b/doc/classes/GIProbe.xml
index 687974ba0f..487f0113f6 100644
--- a/doc/classes/GIProbe.xml
+++ b/doc/classes/GIProbe.xml
@@ -5,7 +5,7 @@
<description>
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/3d/gi_probes.html
+ http://docs.godotengine.org/en/3.0/learning/features/3d/gi_probes.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml
index e08b902246..1c07bcf88f 100644
--- a/doc/classes/HTTPClient.xml
+++ b/doc/classes/HTTPClient.xml
@@ -10,7 +10,7 @@
For more information on HTTP, see https://developer.mozilla.org/en-US/docs/Web/HTTP (or read RFC 2616 to get it straight from the source: https://tools.ietf.org/html/rfc2616).
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/networking/http_client_class.html
+ http://docs.godotengine.org/en/3.0/learning/features/networking/http_client_class.html
http://docs.godotengine.org/en/3.0/learning/features/networking/ssl_certificates.html
</tutorials>
<demos>
diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml
index 02d74aba0b..be65600d81 100644
--- a/doc/classes/HTTPRequest.xml
+++ b/doc/classes/HTTPRequest.xml
@@ -8,7 +8,7 @@
Can be used to make HTTP requests, i.e. download or upload files or web content via HTTP.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/networking/ssl_certificates.html
+ http://docs.godotengine.org/en/3.0/learning/features/networking/ssl_certificates.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml
index bda749fc9d..747c46cced 100644
--- a/doc/classes/KinematicBody.xml
+++ b/doc/classes/KinematicBody.xml
@@ -9,7 +9,7 @@
Kinematic Characters: KinematicBody also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/physics/kinematic_character_2d.html
+ http://docs.godotengine.org/en/3.0/learning/features/physics/kinematic_character_2d.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Light.xml b/doc/classes/Light.xml
index 073cc34069..e6bf39848c 100644
--- a/doc/classes/Light.xml
+++ b/doc/classes/Light.xml
@@ -7,7 +7,7 @@
Light is the abstract base class for light nodes, so it shouldn't be used directly (It can't be instanced). Other types of light nodes inherit from it. Light contains the common variables and parameters used for lighting.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/3d/lights_and_shadows.html
+ http://docs.godotengine.org/en/3.0/learning/features/3d/lights_and_shadows.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/NetworkedMultiplayerPeer.xml b/doc/classes/NetworkedMultiplayerPeer.xml
index 441768d643..5a600319b1 100644
--- a/doc/classes/NetworkedMultiplayerPeer.xml
+++ b/doc/classes/NetworkedMultiplayerPeer.xml
@@ -7,7 +7,7 @@
Manages the connection to network peers. Assigns unique IDs to each client connected to the server.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/networking/high_level_multiplayer.html
+ http://docs.godotengine.org/en/3.0/learning/features/networking/high_level_multiplayer.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index 657c4b443c..e7627e11c5 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -16,7 +16,7 @@
[b]Networking with nodes:[/b] After connecting to a server (or making one, see [NetworkedMultiplayerENet]) it is possible to use the built-in RPC (remote procedure call) system to communicate over the network. By calling [method rpc] with a method name, it will be called locally and in all connected peers (peers = clients and the server that accepts connections), with behaviour varying depending on the network mode ([method set_network_mode]) of the receiving peer. To identify which node receives the RPC call Godot will use its [NodePath] (make sure node names are the same on all peers).
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/step_by_step/scenes_and_nodes.html
+ http://docs.godotengine.org/en/3.0/learning/step_by_step/scenes_and_nodes.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml
index 882327db0a..17fcd09384 100644
--- a/doc/classes/Node2D.xml
+++ b/doc/classes/Node2D.xml
@@ -7,7 +7,7 @@
A 2D game object, with a position, rotation and scale. All 2D physics nodes and sprites inherit from Node2D. Use Node2D as a parent node to move, scale and rotate children in a 2D project. Also gives control on the node's render order.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/2d/custom_drawing_in_2d.html
+ http://docs.godotengine.org/en/3.0/learning/features/2d/custom_drawing_in_2d.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/OmniLight.xml b/doc/classes/OmniLight.xml
index d9f7d2c07e..b3c3ce31e1 100644
--- a/doc/classes/OmniLight.xml
+++ b/doc/classes/OmniLight.xml
@@ -7,7 +7,7 @@
An OmniDirectional light is a type of [Light] node that emits lights in all directions. The light is attenuated through the distance and this attenuation can be configured by changing the energy, radius and attenuation parameters of [Light].
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/3d/lights_and_shadows.html
+ http://docs.godotengine.org/en/3.0/learning/features/3d/lights_and_shadows.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Physics2DDirectSpaceState.xml b/doc/classes/Physics2DDirectSpaceState.xml
index f1086e86e8..08b10da717 100644
--- a/doc/classes/Physics2DDirectSpaceState.xml
+++ b/doc/classes/Physics2DDirectSpaceState.xml
@@ -7,7 +7,7 @@
Direct access object to a space in the [Physics2DServer]. It's used mainly to do queries against objects and areas residing in a given space.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/physics/ray-casting.html
+ http://docs.godotengine.org/en/3.0/learning/features/physics/ray-casting.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/PhysicsBody.xml b/doc/classes/PhysicsBody.xml
index 99b5629eba..078512ccc9 100644
--- a/doc/classes/PhysicsBody.xml
+++ b/doc/classes/PhysicsBody.xml
@@ -7,7 +7,7 @@
PhysicsBody is an abstract base class for implementing a physics body. All *Body types inherit from it.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/physics/physics_introduction.html
+ http://docs.godotengine.org/en/3.0/learning/features/physics/physics_introduction.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml
index c82e404e4f..340422aea6 100644
--- a/doc/classes/PhysicsBody2D.xml
+++ b/doc/classes/PhysicsBody2D.xml
@@ -7,7 +7,7 @@
PhysicsBody2D is an abstract base class for implementing a physics body. All *Body2D types inherit from it.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/physics/physics_introduction.html
+ http://docs.godotengine.org/en/3.0/learning/features/physics/physics_introduction.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/PhysicsDirectSpaceState.xml b/doc/classes/PhysicsDirectSpaceState.xml
index d02f2261ea..88a567831b 100644
--- a/doc/classes/PhysicsDirectSpaceState.xml
+++ b/doc/classes/PhysicsDirectSpaceState.xml
@@ -7,7 +7,7 @@
Direct access object to a space in the [PhysicsServer]. It's used mainly to do queries against objects and areas residing in a given space.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/physics/ray-casting.html
+ http://docs.godotengine.org/en/3.0/learning/features/physics/ray-casting.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml
index c69730ebee..307049e055 100644
--- a/doc/classes/Plane.xml
+++ b/doc/classes/Plane.xml
@@ -7,7 +7,7 @@
Plane represents a normalized plane equation. Basically, "normal" is the normal of the plane (a,b,c normalized), and "d" is the distance from the origin to the plane (in the direction of "normal"). "Over" or "Above" the plane is considered the side of the plane towards where the normal is pointing.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/math/index.html
+ http://docs.godotengine.org/en/3.0/learning/features/math/index.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml
index 8301891220..4890c2bc2c 100644
--- a/doc/classes/Rect2.xml
+++ b/doc/classes/Rect2.xml
@@ -7,7 +7,7 @@
Rect2 consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/math/index.html
+ http://docs.godotengine.org/en/3.0/learning/features/math/index.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml
index 0a6f534fe6..50eca9699a 100644
--- a/doc/classes/ReflectionProbe.xml
+++ b/doc/classes/ReflectionProbe.xml
@@ -5,7 +5,7 @@
<description>
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/3d/reflection_probes.html
+ http://docs.godotengine.org/en/3.0/learning/features/3d/reflection_probes.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index 70631c6c61..a50d4e0393 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -8,7 +8,7 @@
Note that assignments to [member bbcode_text] clear the tag stack and reconstruct it from the property's contents. Any edits made to [member bbcode_text] will erase previous edits made from other manual sources such as [method append_bbcode] and the [code]push_*[/code] / [method pop] methods.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/gui/bbcode_in_richtextlabel.html
+ http://docs.godotengine.org/en/3.0/learning/features/gui/bbcode_in_richtextlabel.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/RigidBody.xml b/doc/classes/RigidBody.xml
index 247be1d433..ffc5c86074 100644
--- a/doc/classes/RigidBody.xml
+++ b/doc/classes/RigidBody.xml
@@ -11,7 +11,7 @@
As a warning, don't change RigidBody's position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop will yield strange behavior.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/physics/physics_introduction.html
+ http://docs.godotengine.org/en/3.0/learning/features/physics/physics_introduction.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml
index 28eba6ae8f..f6b8d25488 100644
--- a/doc/classes/SceneTree.xml
+++ b/doc/classes/SceneTree.xml
@@ -5,7 +5,7 @@
<description>
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/step_by_step/scene_tree.html
+ http://docs.godotengine.org/en/3.0/learning/step_by_step/scene_tree.html
http://docs.godotengine.org/en/3.0/learning/features/viewports/multiple_resolutions.html
</tutorials>
<demos>
diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml
index bbe360cb8c..14570ab611 100644
--- a/doc/classes/Script.xml
+++ b/doc/classes/Script.xml
@@ -8,7 +8,7 @@
The 'new' method of a script subclass creates a new instance. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/step_by_step/scripting.html
+ http://docs.godotengine.org/en/3.0/learning/step_by_step/scripting.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Shader.xml b/doc/classes/Shader.xml
index 14c47940aa..d39014fa2d 100644
--- a/doc/classes/Shader.xml
+++ b/doc/classes/Shader.xml
@@ -7,7 +7,7 @@
To be changed, ignore.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/shading/index.html
+ http://docs.godotengine.org/en/3.0/learning/features/shading/index.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Shape.xml b/doc/classes/Shape.xml
index 6cedfd937c..706c66d38e 100644
--- a/doc/classes/Shape.xml
+++ b/doc/classes/Shape.xml
@@ -7,7 +7,7 @@
Base class for all 3D shape resources. All 3D shapes that inherit from this can be set into a [PhysicsBody] or [Area].
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/physics/physics_introduction.html
+ http://docs.godotengine.org/en/3.0/learning/features/physics/physics_introduction.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Shape2D.xml b/doc/classes/Shape2D.xml
index c835ab4922..97171fdd2c 100644
--- a/doc/classes/Shape2D.xml
+++ b/doc/classes/Shape2D.xml
@@ -7,7 +7,7 @@
Base class for all 2D Shapes. All 2D shape types inherit from this.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/physics/physics_introduction.html
+ http://docs.godotengine.org/en/3.0/learning/features/physics/physics_introduction.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Spatial.xml b/doc/classes/Spatial.xml
index f9e53673dc..8529823467 100644
--- a/doc/classes/Spatial.xml
+++ b/doc/classes/Spatial.xml
@@ -9,7 +9,7 @@
Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the Spatial object is set as top level. Affine operations in this coordinate system correspond to direct affine operations on the Spatial's transform. The word local below refers to this coordinate system. The coordinate system that is attached to the Spatial object itself is referred to as object-local coordinate system.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/3d/introduction_to_3d.html
+ http://docs.godotengine.org/en/3.0/learning/features/3d/introduction_to_3d.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/SpatialMaterial.xml b/doc/classes/SpatialMaterial.xml
index 617fc10a47..044e6fbd18 100644
--- a/doc/classes/SpatialMaterial.xml
+++ b/doc/classes/SpatialMaterial.xml
@@ -5,7 +5,7 @@
<description>
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/3d/spatial_material.html
+ http://docs.godotengine.org/en/3.0/learning/features/3d/spatial_material.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/SpotLight.xml b/doc/classes/SpotLight.xml
index 58489cae2c..68b2eec3a1 100644
--- a/doc/classes/SpotLight.xml
+++ b/doc/classes/SpotLight.xml
@@ -7,7 +7,7 @@
A SpotLight light is a type of [Light] node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance and this attenuation can be configured by changing the energy, radius and attenuation parameters of [Light]. TODO: Image of a spotlight.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/3d/lights_and_shadows.html
+ http://docs.godotengine.org/en/3.0/learning/features/3d/lights_and_shadows.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml
index ec11bfc6ee..014f8b8657 100644
--- a/doc/classes/StreamPeer.xml
+++ b/doc/classes/StreamPeer.xml
@@ -134,7 +134,7 @@
<method name="put_16">
<return type="void">
</return>
- <argument index="0" name="val" type="int">
+ <argument index="0" name="value" type="int">
</argument>
<description>
Put a signed 16 bit value into the stream.
@@ -143,7 +143,7 @@
<method name="put_32">
<return type="void">
</return>
- <argument index="0" name="val" type="int">
+ <argument index="0" name="value" type="int">
</argument>
<description>
Put a signed 32 bit value into the stream.
@@ -152,7 +152,7 @@
<method name="put_64">
<return type="void">
</return>
- <argument index="0" name="val" type="int">
+ <argument index="0" name="value" type="int">
</argument>
<description>
Put a signed 64 bit value into the stream.
@@ -161,7 +161,7 @@
<method name="put_8">
<return type="void">
</return>
- <argument index="0" name="val" type="int">
+ <argument index="0" name="value" type="int">
</argument>
<description>
Put a signed byte into the stream.
@@ -179,7 +179,7 @@
<method name="put_double">
<return type="void">
</return>
- <argument index="0" name="val" type="float">
+ <argument index="0" name="value" type="float">
</argument>
<description>
Put a double-precision float into the stream.
@@ -188,7 +188,7 @@
<method name="put_float">
<return type="void">
</return>
- <argument index="0" name="val" type="float">
+ <argument index="0" name="value" type="float">
</argument>
<description>
Put a single-precision float into the stream.
@@ -206,7 +206,7 @@
<method name="put_u16">
<return type="void">
</return>
- <argument index="0" name="val" type="int">
+ <argument index="0" name="value" type="int">
</argument>
<description>
Put an unsigned 16 bit value into the stream.
@@ -215,7 +215,7 @@
<method name="put_u32">
<return type="void">
</return>
- <argument index="0" name="val" type="int">
+ <argument index="0" name="value" type="int">
</argument>
<description>
Put an unsigned 32 bit value into the stream.
@@ -224,7 +224,7 @@
<method name="put_u64">
<return type="void">
</return>
- <argument index="0" name="val" type="int">
+ <argument index="0" name="value" type="int">
</argument>
<description>
Put an unsigned 64 bit value into the stream.
@@ -233,7 +233,7 @@
<method name="put_u8">
<return type="void">
</return>
- <argument index="0" name="val" type="int">
+ <argument index="0" name="value" type="int">
</argument>
<description>
Put an unsigned byte into the stream.
@@ -242,7 +242,7 @@
<method name="put_utf8_string">
<return type="void">
</return>
- <argument index="0" name="val" type="String">
+ <argument index="0" name="value" type="String">
</argument>
<description>
Put a zero-terminated utf8 string into the stream.
@@ -251,7 +251,7 @@
<method name="put_var">
<return type="void">
</return>
- <argument index="0" name="val" type="Variant">
+ <argument index="0" name="value" type="Variant">
</argument>
<description>
Put a Variant into the stream.
diff --git a/doc/classes/StreamPeerSSL.xml b/doc/classes/StreamPeerSSL.xml
index 6503e8ad73..23b7f71595 100644
--- a/doc/classes/StreamPeerSSL.xml
+++ b/doc/classes/StreamPeerSSL.xml
@@ -7,7 +7,7 @@
SSL Stream peer. This object can be used to connect to SSL servers.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/networking/ssl_certificates.html
+ http://docs.godotengine.org/en/3.0/learning/features/networking/ssl_certificates.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml
index 58630780c8..faecf5664c 100644
--- a/doc/classes/TileMap.xml
+++ b/doc/classes/TileMap.xml
@@ -7,7 +7,7 @@
Node for 2D tile-based maps. Tilemaps use a [TileSet] which contain a list of tiles (textures plus optional collision, navigation, and/or occluder shapes) which are used to create grid-based maps.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/2d/using_tilemaps.html
+ http://docs.godotengine.org/en/3.0/learning/features/2d/using_tilemaps.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml
index 4d093c8bfc..1cb808532d 100644
--- a/doc/classes/Transform.xml
+++ b/doc/classes/Transform.xml
@@ -7,7 +7,7 @@
Represents one or many transformations in 3D space such as translation, rotation, or scaling. It consists of a [Basis] "basis" and an [Vector3] "origin". It is similar to a 3x4 matrix.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/math/index.html
+ http://docs.godotengine.org/en/3.0/learning/features/math/index.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index c7ed45dfce..ac54c2f09c 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -7,7 +7,7 @@
2-element structure that can be used to represent positions in 2d-space, or any other pair of numeric values.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/math/index.html
+ http://docs.godotengine.org/en/3.0/learning/features/math/index.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index a0c09a752c..dafb215177 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -7,7 +7,7 @@
Vector3 is one of the core classes of the engine, and includes several built-in helper functions to perform basic vector math operations.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/math/index.html
+ http://docs.godotengine.org/en/3.0/learning/features/math/index.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index ad008a0c97..8bc8913764 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -12,7 +12,7 @@
Finally, viewports can also behave as render targets, in which case they will not be visible unless the associated texture is used to draw.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/2d/2d_transforms.html
+ http://docs.godotengine.org/en/3.0/learning/features/2d/2d_transforms.html
http://docs.godotengine.org/en/3.0/learning/features/viewports/index.html
</tutorials>
<demos>
diff --git a/doc/classes/World.xml b/doc/classes/World.xml
index 868eed787a..97631b8e0d 100644
--- a/doc/classes/World.xml
+++ b/doc/classes/World.xml
@@ -7,7 +7,7 @@
Class that has everything pertaining to a world. A physics space, a visual scenario and a sound space. Spatial nodes register their resources into the current world.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/physics/ray-casting.html
+ http://docs.godotengine.org/en/3.0/learning/features/physics/ray-casting.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/World2D.xml b/doc/classes/World2D.xml
index 7abc9061af..57f91b1fa9 100644
--- a/doc/classes/World2D.xml
+++ b/doc/classes/World2D.xml
@@ -7,7 +7,7 @@
Class that has everything pertaining to a 2D world. A physics space, a visual scenario and a sound space. 2D nodes register their resources into the current 2D world.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/physics/ray-casting.html
+ http://docs.godotengine.org/en/3.0/learning/features/physics/ray-casting.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/WorldEnvironment.xml b/doc/classes/WorldEnvironment.xml
index 5fee1eb56a..06a24c98d9 100644
--- a/doc/classes/WorldEnvironment.xml
+++ b/doc/classes/WorldEnvironment.xml
@@ -7,7 +7,7 @@
The [code]WorldEnvironment[/code] node can be added to a scene in order to set default [Environment] variables for the scene. The [code]WorldEnvironment[/code] can be overridden by an [Environment] node set on the current [Camera]. Additionally, only one [code]WorldEnvironment[/code] may be instanced in a given scene at a time. The [code]WorldEnvironment[/code] allows the user to specify default lighting parameters (e.g. ambient lighting), various post-processing effects (e.g. SSAO, DOF, Tonemapping), and how to draw the background (e.g. solid color, skybox).
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/3d/environment_and_post_processing.html
+ http://docs.godotengine.org/en/3.0/learning/features/3d/environment_and_post_processing.html
</tutorials>
<demos>
</demos>
diff --git a/main/main.cpp b/main/main.cpp
index 0b231b9d30..be334fac48 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -1822,6 +1822,9 @@ void Main::cleanup() {
ERR_FAIL_COND(!_start_success);
+ message_queue->flush();
+ memdelete(message_queue);
+
if (script_debugger) {
if (use_debug_profiler) {
script_debugger->profiling_end();
@@ -1879,9 +1882,6 @@ void Main::cleanup() {
if (engine)
memdelete(engine);
- message_queue->flush();
- memdelete(message_queue);
-
unregister_core_driver_types();
unregister_core_types();
diff --git a/modules/gdnative/pluginscript/pluginscript_instance.cpp b/modules/gdnative/pluginscript/pluginscript_instance.cpp
index 52d112bc93..931ab0bfe4 100644
--- a/modules/gdnative/pluginscript/pluginscript_instance.cpp
+++ b/modules/gdnative/pluginscript/pluginscript_instance.cpp
@@ -84,8 +84,9 @@ Variant PluginScriptInstance::call(const StringName &p_method, const Variant **p
godot_variant ret = _desc->call_method(
_data, (godot_string_name *)&p_method, (const godot_variant **)p_args,
p_argcount, (godot_variant_call_error *)&r_error);
- Variant *var_ret = (Variant *)&ret;
- return *var_ret;
+ Variant var_ret = *(Variant *)&ret;
+ godot_variant_destroy(&ret);
+ return var_ret;
}
#if 0 // TODO: Don't rely on default implementations provided by ScriptInstance ?
diff --git a/modules/gdnative/pluginscript/pluginscript_language.cpp b/modules/gdnative/pluginscript/pluginscript_language.cpp
index 8101ebc6f3..8018178bd5 100644
--- a/modules/gdnative/pluginscript/pluginscript_language.cpp
+++ b/modules/gdnative/pluginscript/pluginscript_language.cpp
@@ -103,6 +103,7 @@ Ref<Script> PluginScriptLanguage::get_template(const String &p_class_name, const
if (_desc.get_template_source_code) {
godot_string src = _desc.get_template_source_code(_data, (godot_string *)&p_class_name, (godot_string *)&p_base_class_name);
script->set_source_code(*(String *)&src);
+ godot_string_destroy(&src);
}
return script;
}
diff --git a/modules/gdnative/pluginscript/pluginscript_script.cpp b/modules/gdnative/pluginscript/pluginscript_script.cpp
index b4525ff8aa..8290582b9b 100644
--- a/modules/gdnative/pluginscript/pluginscript_script.cpp
+++ b/modules/gdnative/pluginscript/pluginscript_script.cpp
@@ -131,13 +131,10 @@ ScriptInstance *PluginScript::instance_create(Object *p_this) {
#endif
}
- PluginScript *top = this;
- // TODO: can be optimized by storing a PluginScript::_base_parent direct pointer
- while (top->_ref_base_parent.is_valid())
- top = top->_ref_base_parent.ptr();
- if (top->_native_parent) {
- if (!ClassDB::is_parent_class(p_this->get_class_name(), top->_native_parent)) {
- String msg = "Script inherits from native type '" + String(top->_native_parent) + "', so it can't be instanced in object of type: '" + p_this->get_class() + "'";
+ StringName base_type = get_instance_base_type();
+ if (base_type) {
+ if (!ClassDB::is_parent_class(p_this->get_class_name(), base_type)) {
+ String msg = "Script inherits from native type '" + String(base_type) + "', so it can't be instanced in object of type: '" + p_this->get_class() + "'";
// TODO: implement PluginscriptLanguage::debug_break_parse
// if (ScriptDebugger::get_singleton()) {
// _language->debug_break_parse(get_path(), 0, msg);
@@ -210,29 +207,31 @@ Error PluginScript::reload(bool p_keep_state) {
// TODO: GDscript uses `ScriptDebugger` here to jump into the parsing error
return err;
}
+
+ // Script's parent is passed as base_name which can make reference to a
+ // ClassDB name (i.e. `Node2D`) or a ressource path (i.e. `res://foo/bar.gd`)
+ StringName *base_name = (StringName *)&manifest.base;
+ if (*base_name) {
+
+ if (ClassDB::class_exists(*base_name)) {
+ _native_parent = *base_name;
+ } else {
+ Ref<Script> res = ResourceLoader::load(*base_name);
+ if (res.is_valid()) {
+ _ref_base_parent = res;
+ } else {
+ String name = *(StringName *)&manifest.name;
+ ERR_EXPLAIN(_path + ": Script '" + name + "' has an invalid parent '" + *base_name + "'.");
+ ERR_FAIL_V(ERR_PARSE_ERROR);
+ }
+ }
+ }
+
_valid = true;
// Use the manifest to configure this script object
_data = manifest.data;
_name = *(StringName *)&manifest.name;
_tool = manifest.is_tool;
- // Base name is either another PluginScript or a regular class accessible
- // through ClassDB
- StringName *base_name = (StringName *)&manifest.base;
- for (SelfList<PluginScript> *e = _language->_script_list.first(); e != NULL; e = e->next()) {
- if (e->self()->_name == *base_name) {
- // Found you, base is a PluginScript !
- _ref_base_parent = Ref<PluginScript>(e->self());
- break;
- }
- }
- if (!_ref_base_parent.is_valid()) {
- // Base is a native ClassDB
- if (!ClassDB::class_exists(*base_name)) {
- ERR_EXPLAIN("Unknown script '" + String(_name) + "' parent '" + String(*base_name) + "'.");
- ERR_FAIL_V(ERR_PARSE_ERROR);
- }
- _native_parent = *base_name;
- }
Dictionary *members = (Dictionary *)&manifest.member_lines;
for (const Variant *key = members->next(); key != NULL; key = members->next(key)) {
diff --git a/modules/gdnative/pluginscript/pluginscript_script.h b/modules/gdnative/pluginscript/pluginscript_script.h
index 6b343ad844..6729eecb32 100644
--- a/modules/gdnative/pluginscript/pluginscript_script.h
+++ b/modules/gdnative/pluginscript/pluginscript_script.h
@@ -53,7 +53,7 @@ private:
bool _tool;
bool _valid;
- Ref<PluginScript> _ref_base_parent;
+ Ref<Script> _ref_base_parent;
StringName _native_parent;
SelfList<PluginScript> _script_list;
diff --git a/modules/gdscript/doc_classes/GDScript.xml b/modules/gdscript/doc_classes/GDScript.xml
index 31328ab834..ba7d56a3b2 100644
--- a/modules/gdscript/doc_classes/GDScript.xml
+++ b/modules/gdscript/doc_classes/GDScript.xml
@@ -8,7 +8,7 @@
[method new] creates a new instance of the script. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/scripting/gdscript/index.html
+ http://docs.godotengine.org/en/3.0/learning/scripting/gdscript/index.html
</tutorials>
<demos>
</demos>
diff --git a/modules/gdscript/gdscript_functions.cpp b/modules/gdscript/gdscript_functions.cpp
index f15f2197da..eceec27814 100644
--- a/modules/gdscript/gdscript_functions.cpp
+++ b/modules/gdscript/gdscript_functions.cpp
@@ -1483,7 +1483,7 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) {
return mi;
} break;
case MATH_INVERSE_LERP: {
- MethodInfo mi("inverse_lerp", PropertyInfo(Variant::REAL, "from"), PropertyInfo(Variant::REAL, "to"), PropertyInfo(Variant::REAL, "value"));
+ MethodInfo mi("inverse_lerp", PropertyInfo(Variant::REAL, "from"), PropertyInfo(Variant::REAL, "to"), PropertyInfo(Variant::REAL, "weight"));
mi.return_val.type = Variant::REAL;
return mi;
} break;
@@ -1579,12 +1579,12 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) {
return mi;
} break;
case LOGIC_CLAMP: {
- MethodInfo mi("clamp", PropertyInfo(Variant::REAL, "val"), PropertyInfo(Variant::REAL, "min"), PropertyInfo(Variant::REAL, "max"));
+ MethodInfo mi("clamp", PropertyInfo(Variant::REAL, "value"), PropertyInfo(Variant::REAL, "min"), PropertyInfo(Variant::REAL, "max"));
mi.return_val.type = Variant::REAL;
return mi;
} break;
case LOGIC_NEAREST_PO2: {
- MethodInfo mi("nearest_po2", PropertyInfo(Variant::INT, "val"));
+ MethodInfo mi("nearest_po2", PropertyInfo(Variant::INT, "value"));
mi.return_val.type = Variant::INT;
return mi;
} break;
diff --git a/modules/gridmap/doc_classes/GridMap.xml b/modules/gridmap/doc_classes/GridMap.xml
index 788aa5c6b3..0073631a8b 100644
--- a/modules/gridmap/doc_classes/GridMap.xml
+++ b/modules/gridmap/doc_classes/GridMap.xml
@@ -10,7 +10,7 @@
A GridMap is split into a sparse collection of octants for efficient rendering and physics processing. Every octant has the same dimensions and can contain several cells.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/3d/using_gridmaps.html
+ http://docs.godotengine.org/en/3.0/learning/features/3d/using_gridmaps.html
</tutorials>
<demos>
</demos>
diff --git a/modules/visual_script/doc_classes/VisualScript.xml b/modules/visual_script/doc_classes/VisualScript.xml
index fa94e9ef86..a037344c70 100644
--- a/modules/visual_script/doc_classes/VisualScript.xml
+++ b/modules/visual_script/doc_classes/VisualScript.xml
@@ -9,7 +9,7 @@
You are most likely to use this class via the Visual Script editor or when writing plugins for it.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/scripting/visual_script/index.html
+ http://docs.godotengine.org/en/3.0/learning/scripting/visual_script/index.html
</tutorials>
<demos>
</demos>
diff --git a/modules/visual_script/visual_script_builtin_funcs.cpp b/modules/visual_script/visual_script_builtin_funcs.cpp
index 1ee0989564..7f0a42da82 100644
--- a/modules/visual_script/visual_script_builtin_funcs.cpp
+++ b/modules/visual_script/visual_script_builtin_funcs.cpp
@@ -257,10 +257,10 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const
case MATH_ASIN:
case MATH_ACOS:
case MATH_ATAN:
- case MATH_ATAN2:
case MATH_SQRT: {
- return PropertyInfo(Variant::REAL, "num");
+ return PropertyInfo(Variant::REAL, "s");
} break;
+ case MATH_ATAN2:
case MATH_FMOD:
case MATH_FPOSMOD: {
if (p_idx == 0)
@@ -273,7 +273,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const
case MATH_ROUND:
case MATH_ABS:
case MATH_SIGN: {
- return PropertyInfo(Variant::REAL, "num");
+ return PropertyInfo(Variant::REAL, "s");
} break;
@@ -287,7 +287,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const
case MATH_EXP:
case MATH_ISNAN:
case MATH_ISINF: {
- return PropertyInfo(Variant::REAL, "num");
+ return PropertyInfo(Variant::REAL, "s");
} break;
case MATH_EASE: {
if (p_idx == 0)
@@ -318,7 +318,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const
else if (p_idx == 1)
return PropertyInfo(Variant::REAL, "to");
else
- return PropertyInfo(Variant::REAL, "value");
+ return PropertyInfo(Variant::REAL, "weight");
} break;
case MATH_RANGE_LERP: {
if (p_idx == 0)
@@ -415,14 +415,14 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const
} break;
case LOGIC_CLAMP: {
if (p_idx == 0)
- return PropertyInfo(Variant::REAL, "a");
- else if (p_idx == 0) // FIXME: is it ok to test p_idx == 0 twice?
+ return PropertyInfo(Variant::REAL, "value");
+ else if (p_idx == 1)
return PropertyInfo(Variant::REAL, "min");
else
return PropertyInfo(Variant::REAL, "max");
} break;
case LOGIC_NEAREST_PO2: {
- return PropertyInfo(Variant::INT, "num");
+ return PropertyInfo(Variant::INT, "value");
} break;
case OBJ_WEAKREF: {
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index b26d2a3aa4..2a61f8d873 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -552,6 +552,10 @@ class EditorExportAndroid : public EditorExportPlatform {
return OK;
}
+ static Error ignore_apk_file(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total) {
+ return OK;
+ }
+
void _fix_manifest(const Ref<EditorExportPreset> &p_preset, Vector<uint8_t> &p_manifest, bool p_give_internet) {
// Leaving the unused types commented because looking these constants up
@@ -1504,6 +1508,10 @@ public:
cl.push_back(passwd);
}*/
+ APKExportData ed;
+ ed.ep = &ep;
+ ed.apk = unaligned_apk;
+ err = export_project_files(p_preset, ignore_apk_file, &ed, save_apk_so);
} else {
//all files
@@ -1531,17 +1539,17 @@ public:
err = export_project_files(p_preset, save_apk_file, &ed, save_apk_so);
}
+ }
- if (!err) {
- APKExportData ed;
- ed.ep = &ep;
- ed.apk = unaligned_apk;
- for (int i = 0; i < sizeof(launcher_icons) / sizeof(launcher_icons[0]); ++i) {
- String icon_path = String(p_preset->get(launcher_icons[i].option_id)).strip_edges();
- if (icon_path != "" && icon_path.ends_with(".png") && FileAccess::exists(icon_path)) {
- Vector<uint8_t> data = FileAccess::get_file_as_array(icon_path);
- store_in_apk(&ed, launcher_icons[i].export_path, data);
- }
+ if (!err) {
+ APKExportData ed;
+ ed.ep = &ep;
+ ed.apk = unaligned_apk;
+ for (int i = 0; i < sizeof(launcher_icons) / sizeof(launcher_icons[0]); ++i) {
+ String icon_path = String(p_preset->get(launcher_icons[i].option_id)).strip_edges();
+ if (icon_path != "" && icon_path.ends_with(".png") && FileAccess::exists(icon_path)) {
+ Vector<uint8_t> data = FileAccess::get_file_as_array(icon_path);
+ store_in_apk(&ed, launcher_icons[i].export_path, data);
}
}
}
diff --git a/platform/android/java/src/org/godotengine/godot/input/GodotTextInputWrapper.java b/platform/android/java/src/org/godotengine/godot/input/GodotTextInputWrapper.java
index 1102ab7450..5d13f17ffb 100644
--- a/platform/android/java/src/org/godotengine/godot/input/GodotTextInputWrapper.java
+++ b/platform/android/java/src/org/godotengine/godot/input/GodotTextInputWrapper.java
@@ -103,13 +103,16 @@ public class GodotTextInputWrapper implements TextWatcher, OnEditorActionListene
public void onTextChanged(final CharSequence pCharSequence, final int start, final int before, final int count) {
//Log.d(TAG, "onTextChanged(" + pCharSequence + ")start: " + start + ",count: " + count + ",before: " + before);
+ final int[] newChars = new int[count];
+ for (int i = start; i < start + count; ++i) {
+ newChars[i - start] = pCharSequence.charAt(i);
+ }
mView.queueEvent(new Runnable() {
@Override
public void run() {
- for (int i = start; i < start + count; ++i) {
- final int ch = pCharSequence.charAt(i);
- GodotLib.key(0, ch, true);
- GodotLib.key(0, ch, false);
+ for (int i = 0; i < count; ++i) {
+ GodotLib.key(0, newChars[i], true);
+ GodotLib.key(0, newChars[i], false);
}
}
});
diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp
index 413edca218..33b3d46486 100644
--- a/scene/gui/scroll_container.cpp
+++ b/scene/gui/scroll_container.cpp
@@ -462,9 +462,9 @@ void ScrollContainer::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_enable_v_scroll", "enable"), &ScrollContainer::set_enable_v_scroll);
ClassDB::bind_method(D_METHOD("is_v_scroll_enabled"), &ScrollContainer::is_v_scroll_enabled);
ClassDB::bind_method(D_METHOD("_update_scrollbar_position"), &ScrollContainer::_update_scrollbar_position);
- ClassDB::bind_method(D_METHOD("set_h_scroll", "val"), &ScrollContainer::set_h_scroll);
+ ClassDB::bind_method(D_METHOD("set_h_scroll", "value"), &ScrollContainer::set_h_scroll);
ClassDB::bind_method(D_METHOD("get_h_scroll"), &ScrollContainer::get_h_scroll);
- ClassDB::bind_method(D_METHOD("set_v_scroll", "val"), &ScrollContainer::set_v_scroll);
+ ClassDB::bind_method(D_METHOD("set_v_scroll", "value"), &ScrollContainer::set_v_scroll);
ClassDB::bind_method(D_METHOD("get_v_scroll"), &ScrollContainer::get_v_scroll);
ADD_GROUP("Scroll", "scroll_");
diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp
index 2dee74f561..bb0cf168af 100644
--- a/scene/register_scene_types.cpp
+++ b/scene/register_scene_types.cpp
@@ -201,6 +201,8 @@ static ResourceFormatLoaderDynamicFont *resource_loader_dynamic_font = NULL;
static ResourceFormatLoaderStreamTexture *resource_loader_stream_texture = NULL;
+static ResourceFormatLoaderBMFont *resource_loader_bmfont = NULL;
+
static ResourceFormatSaverShader *resource_saver_shader = NULL;
static ResourceFormatLoaderShader *resource_loader_shader = NULL;
@@ -233,6 +235,9 @@ void register_scene_types() {
resource_loader_shader = memnew(ResourceFormatLoaderShader);
ResourceLoader::add_resource_format_loader(resource_loader_shader, true);
+ resource_loader_bmfont = memnew(ResourceFormatLoaderBMFont);
+ ResourceLoader::add_resource_format_loader(resource_loader_bmfont, true);
+
OS::get_singleton()->yield(); //may take time to init
ClassDB::register_class<Object>();
@@ -652,6 +657,9 @@ void unregister_scene_types() {
if (resource_loader_shader) {
memdelete(resource_loader_shader);
}
+ if (resource_loader_bmfont) {
+ memdelete(resource_loader_bmfont);
+ }
SpatialMaterial::finish_shaders();
ParticlesMaterial::finish_shaders();
diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp
index 026bcea270..6fc5778dd8 100644
--- a/scene/resources/font.cpp
+++ b/scene/resources/font.cpp
@@ -596,3 +596,42 @@ BitmapFont::~BitmapFont() {
clear();
}
+
+////////////
+
+RES ResourceFormatLoaderBMFont::load(const String &p_path, const String &p_original_path, Error *r_error) {
+
+ if (r_error)
+ *r_error = ERR_FILE_CANT_OPEN;
+
+ Ref<BitmapFont> font;
+ font.instance();
+
+ Error err = font->create_from_fnt(p_path);
+
+ if (err) {
+ if (r_error)
+ *r_error = err;
+ return RES();
+ }
+
+ return font;
+}
+
+void ResourceFormatLoaderBMFont::get_recognized_extensions(List<String> *p_extensions) const {
+
+ p_extensions->push_back("fnt");
+}
+
+bool ResourceFormatLoaderBMFont::handles_type(const String &p_type) const {
+
+ return (p_type == "BitmapFont");
+}
+
+String ResourceFormatLoaderBMFont::get_resource_type(const String &p_path) const {
+
+ String el = p_path.get_extension().to_lower();
+ if (el == "fnt")
+ return "BitmapFont";
+ return "";
+}
diff --git a/scene/resources/font.h b/scene/resources/font.h
index 3f228ca002..ae08890be3 100644
--- a/scene/resources/font.h
+++ b/scene/resources/font.h
@@ -159,4 +159,12 @@ public:
~BitmapFont();
};
+class ResourceFormatLoaderBMFont : public ResourceFormatLoader {
+public:
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
+ virtual void get_recognized_extensions(List<String> *p_extensions) const;
+ virtual bool handles_type(const String &p_type) const;
+ virtual String get_resource_type(const String &p_path) const;
+};
+
#endif