summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SConstruct1
-rw-r--r--core/ustring.cpp2
-rw-r--r--doc/base/classes.xml270
-rw-r--r--drivers/SCsub1
-rw-r--r--drivers/ao/SCsub5
-rw-r--r--drivers/ao/audio_driver_ao.cpp161
-rw-r--r--drivers/ao/audio_driver_ao.h79
-rw-r--r--platform/x11/detect.py13
-rw-r--r--platform/x11/os_x11.cpp11
-rw-r--r--platform/x11/os_x11.h5
-rw-r--r--platform/x11/platform_config.h2
-rw-r--r--tools/editor/editor_help.cpp3
-rw-r--r--tools/editor/editor_node.cpp36
-rw-r--r--tools/editor/editor_node.h2
-rw-r--r--tools/editor/scenes_dock.cpp2
15 files changed, 222 insertions, 371 deletions
diff --git a/SConstruct b/SConstruct
index f818c597fe..05c53a15fc 100644
--- a/SConstruct
+++ b/SConstruct
@@ -119,7 +119,6 @@ opts.Add('etc1','etc1 Texture compression support (yes/no)','yes')
opts.Add('builtin_zlib','Use built-in zlib (yes/no)','yes')
opts.Add('openssl','Use OpenSSL (yes/no/builtin)','no')
opts.Add('musepack','Musepack Audio (yes/no)','yes')
-opts.Add('ao', 'Enable libao audio driver (yes/no)', 'no')
opts.Add("CXX", "Compiler");
opts.Add("CCFLAGS", "Custom flags for the C++ compiler");
opts.Add("CFLAGS", "Custom flags for the C compiler");
diff --git a/core/ustring.cpp b/core/ustring.cpp
index 72ad2a15e7..f3c89a7908 100644
--- a/core/ustring.cpp
+++ b/core/ustring.cpp
@@ -3096,7 +3096,7 @@ String String::http_escape() const {
res += ord;
} else {
char h_Val[3];
- _snprintf(h_Val, 3, "%.2X", ord);
+ snprintf(h_Val, 3, "%.2X", ord);
res += "%";
res += h_Val;
}
diff --git a/doc/base/classes.xml b/doc/base/classes.xml
index da53cb90a5..44a7cccfe5 100644
--- a/doc/base/classes.xml
+++ b/doc/base/classes.xml
@@ -3197,6 +3197,24 @@
<description>
</description>
</method>
+ <method name="set_animation_process_mode">
+ <argument index="0" name="mode" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_animation_process_mode" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="advance">
+ <argument index="0" name="delta" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="reset">
<description>
</description>
@@ -5477,7 +5495,7 @@
</constant>
</constants>
</class>
-<class name="ButtonGroup" inherits="Control" category="Core">
+<class name="ButtonGroup" inherits="BoxContainer" category="Core">
<brief_description>
Group of Buttons.
</brief_description>
@@ -5523,6 +5541,10 @@
</methods>
<constants>
</constants>
+ <theme_items>
+ <theme_item name="panel" type="StyleBox">
+ </theme_item>
+ </theme_items>
</class>
<class name="Camera" inherits="Spatial" category="Core">
<brief_description>
@@ -6628,7 +6650,7 @@
<argument index="0" name="radius" type="float">
</argument>
<description>
- Radius of the [CapsuleShape2D].
+ Set the radius of the [CapsuleShape2D].
</description>
</method>
<method name="get_radius" qualifiers="const">
@@ -6642,7 +6664,7 @@
<argument index="0" name="height" type="float">
</argument>
<description>
- Height of the [CapsuleShape2D].
+ Set the height of the [CapsuleShape2D].
</description>
</method>
<method name="get_height" qualifiers="const">
@@ -6947,7 +6969,7 @@
Base node for 2D collisionables.
</brief_description>
<description>
- CollisionObject2D is the base class for 2D physics collisionables. They can hold any number of 2D collision shapes. Usually, they are edited by placing CollisionBody2D and CollisionPolygon2D nodes as children. Such nodes are for reference ant not present outside the editor, so code should use the regular shape API.
+ CollisionObject2D is the base class for 2D physics collisionables. They can hold any number of 2D collision shapes. Usually, they are edited by placing [CollisionBody2D] and [CollisionPolygon2D] nodes as children. Such nodes are for reference and not present outside the editor, so code should use the regular shape API.
</description>
<methods>
<method name="_input_event" qualifiers="virtual">
@@ -7143,58 +7165,69 @@
</class>
<class name="CollisionPolygon2D" inherits="Node2D" category="Core">
<brief_description>
- Editor-Only class.
+ Editor-only class for easy editing of collision polygons.
</brief_description>
<description>
- Editor-Only class. This is not present when running the game. It's used in the editor to properly edit and position collision shapes in [CollisionObject2D]. This is not accessible from regular code. This class is for editing custom shape polygons.
+ Editor-only class. This is not present when running the game. It's used in the editor to properly edit and position collision shapes in [CollisionObject2D]. This is not accessible from regular code. This class is for editing custom shape polygons.
</description>
<methods>
<method name="set_polygon">
<argument index="0" name="polygon" type="Vector2Array">
</argument>
<description>
+ Set the array of points forming the polygon.
+ When editing the point list via the editor, depending on [method get_build_mode], it has to be a list of points (for [code]build_mode[/code]=0), or a list of lines (for [code]build_mode[/code]=1). In the second case, the even elements of the array define the start point of the line, and the odd elements the end point.
</description>
</method>
<method name="get_polygon" qualifiers="const">
<return type="Vector2Array">
</return>
<description>
+ Return the list of points that define the polygon.
</description>
</method>
<method name="set_build_mode">
<argument index="0" name="arg0" type="int">
</argument>
<description>
+ Set whether the polygon is to be a [ConvexPolygon2D] ([code]build_mode[/code]=0), or a [ConcavePolygon2D] ([code]build_mode[/code]=1).
</description>
</method>
<method name="get_build_mode" qualifiers="const">
<return type="int">
</return>
<description>
+ Return whether the polygon is a [ConvexPolygon2D] ([code]build_mode[/code]=0), or a [ConcavePolygon2D] ([code]build_mode[/code]=1).
</description>
</method>
<method name="set_trigger">
<argument index="0" name="arg0" type="bool">
</argument>
<description>
+ Set whether this polygon is a trigger. A trigger polygon detects collisions, but is otherwise unaffected by physics (i.e. colliding objects will not get blocked).
</description>
</method>
<method name="is_trigger" qualifiers="const">
<return type="bool">
</return>
<description>
+ Return whether this polygon is a trigger.
</description>
</method>
<method name="get_collision_object_first_shape" qualifiers="const">
<return type="int">
</return>
<description>
+ Return the index of the first shape generated by the editor.
+ When [code]build_mode[/code] is set to generate convex polygons, the shape shown in the editor may be decomopsed into many convex polygons. In that case, a range of indexes is needed to directly access the [Shape2D]s.
+ When [code]build_mode[/code] is set to generate concave polygons, there is only one [Shape2D] generated, so the start index and the end index are the same.
</description>
</method>
<method name="get_collision_object_last_shape" qualifiers="const">
<return type="int">
</return>
<description>
+ Return the index of the last shape generated by the editor.
</description>
</method>
</methods>
@@ -7253,40 +7286,45 @@
</class>
<class name="CollisionShape2D" inherits="Node2D" category="Core">
<brief_description>
- Editor-Only class.
+ Editor-only class for easy editing of shapes.
</brief_description>
<description>
- Editor-Only class. This is not present when running the game. It's used in the editor to properly edit and position collision shapes in [CollisionObject2D]. This is not accessible from regular code.
+ Editor-only class. This is not present when running the game. It's used in the editor to properly edit and position collision shapes in [CollisionObject2D]. This is not accessible from regular code.
</description>
<methods>
<method name="set_shape">
<argument index="0" name="shape" type="Object">
</argument>
<description>
+ Set this shape's [Shape2D]. This will not appear as a node, but can be directly edited as a property.
</description>
</method>
<method name="get_shape" qualifiers="const">
<return type="Object">
</return>
<description>
+ Return this shape's [Shape2D].
</description>
</method>
<method name="set_trigger">
<argument index="0" name="enable" type="bool">
</argument>
<description>
+ Set whether this shape is a trigger. A trigger shape detects collisions, but is otherwise unaffected by physics (i.e. will not block movement of colliding objects).
</description>
</method>
<method name="is_trigger" qualifiers="const">
<return type="bool">
</return>
<description>
+ Return whether this shape is a trigger.
</description>
</method>
<method name="get_collision_object_shape_index" qualifiers="const">
<return type="int">
</return>
<description>
+ Return the index of this shape inside its container [CollisionObject2D]. This can be used to directly access the underlying [Shape2D].
</description>
</method>
</methods>
@@ -7298,7 +7336,7 @@
Color in RGBA format.
</brief_description>
<description>
- A color is represented as red, green and blue (r,g,b) components. Additionally, "a" represents the alpha component, often used for transparency. Values are in floating point and usually range from 0 to 1. Some methods (such as set_modulate() ) may accept values > 1.
+ A color is represented as red, green and blue (r,g,b) components. Additionally, "a" represents the alpha component, often used for transparency. Values are in floating point and usually range from 0 to 1. Some methods (such as set_modulate() ) may accept values &gt; 1.
</description>
<methods>
<method name="blend">
@@ -7666,7 +7704,7 @@
Concave polygon shape.
</brief_description>
<description>
- Concave polygon shape resource, which can be set into a [PhysicsBody] or area. This shape is created by feeding a list of triangles.
+ Concave polygon shape resource, which can be set into a [PhysicsBody] or area. This shape is created by feeding a list of triangles.
</description>
<methods>
<method name="set_faces">
@@ -7693,6 +7731,7 @@
</brief_description>
<description>
Concave polygon 2D shape resource for physics. It is made out of segments and is very optimal for complex polygonal concave collisions. It is really not advised to use for RigidBody nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions.
+ The main difference between a [ConvexPolygonShape2D] and a [ConcavePolygonShape2D] is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection.
</description>
<methods>
<method name="set_segments">
@@ -8583,14 +8622,15 @@
Convex Polygon Shape for 2D physics.
</brief_description>
<description>
- Convex Polygon Shape for 2D physics.
+ Convex Polygon Shape for 2D physics. A convex polygon, whatever its shape, is internally decomposed into as many convex polygons as needed to ensure all collision checks against it are always done on convex polygons (which are faster to check).
+ The main difference between a [ConvexPolygonShape2D] and a [ConcavePolygonShape2D] is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection.
</description>
<methods>
<method name="set_point_cloud">
<argument index="0" name="point_cloud" type="Vector2Array">
</argument>
<description>
- Create the point set from a point cloud. The resulting convex hull will be set as the shape.
+ Currently, this method does nothing.
</description>
</method>
<method name="set_points">
@@ -8871,12 +8911,12 @@ Cubic interpolation tends to follow the curves better, but linear is faster (and
</description>
</method>
<method name="tesselate" qualifiers="const">
+ <return type="Vector2Array">
+ </return>
<argument index="0" name="max_stages" type="int" default="5">
</argument>
<argument index="1" name="tolerance_degrees" type="float" default="4">
</argument>
- <return type="Vector2Array">
- </return>
<description>
Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts.
This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough.
@@ -8884,16 +8924,6 @@ This approximation makes straight segments between each point, then subdivides t
"tolerance_degrees" controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided.
</description>
</method>
- <method name="tesselate" qualifiers="const">
- <return type="Vector2Array">
- </return>
- <argument index="0" name="max_stages" type="int" default="5">
- </argument>
- <argument index="1" name="tolerance_degrees" type="float" default="4">
- </argument>
- <description>
- </description>
- </method>
</methods>
<constants>
</constants>
@@ -9078,12 +9108,12 @@ Cubic interpolation tends to follow the curves better, but linear is faster (and
</description>
</method>
<method name="tesselate" qualifiers="const">
+ <return type="Vector3Array">
+ </return>
<argument index="0" name="max_stages" type="int" default="5">
</argument>
<argument index="1" name="tolerance_degrees" type="float" default="4">
</argument>
- <return type="Vector3Array">
- </return>
<description>
Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts.
This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough.
@@ -9091,16 +9121,6 @@ This approximation makes straight segments between each point, then subdivides t
"tolerance_degrees" controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided.
</description>
</method>
- <method name="tesselate" qualifiers="const">
- <return type="Vector3Array">
- </return>
- <argument index="0" name="max_stages" type="int" default="5">
- </argument>
- <argument index="1" name="tolerance_degrees" type="float" default="4">
- </argument>
- <description>
- </description>
- </method>
</methods>
<constants>
</constants>
@@ -10761,6 +10781,14 @@ This approximation makes straight segments between each point, then subdivides t
</constant>
<constant name="FLAG_DISCARD_ALPHA" value="3">
</constant>
+ <constant name="LIGHT_SHADER_LAMBERT" value="0">
+ </constant>
+ <constant name="LIGHT_SHADER_WRAP" value="1">
+ </constant>
+ <constant name="LIGHT_SHADER_VELVET" value="2">
+ </constant>
+ <constant name="LIGHT_SHADER_TOON" value="3">
+ </constant>
</constants>
</class>
<class name="Font" inherits="Resource" category="Core">
@@ -12521,7 +12549,7 @@ This approximation makes straight segments between each point, then subdivides t
<argument index="3" name="verify_host" type="bool" default="true">
</argument>
<description>
- Connect to a host. This needs to be done before any requests are sent.
+ Connect to a host. This needs to be done before any requests are sent.
The host should not have http:// prepended but will strip the protocol identifier if provided.
verify_host will check the SSL identity of the host if set to true.
@@ -12545,10 +12573,9 @@ verify_host will check the SSL identity of the host if set to true.
<argument index="3" name="body" type="String" default="&quot;&quot;">
</argument>
<description>
- Sends a request to the connected host. The url is the what is normally behind the hostname,
-i.e;
+ Sends a request to the connected host. The url is the what is normally behind the hostname, i.e:
http://somehost.com/index.php
-url would be &quot;index.php&quot;
+url would be "index.php"
Headers are HTTP request headers
@@ -12566,8 +12593,8 @@ var result = httpClient.request(httpClient.METHOD_POST, "index.php", headers, qu
</return>
<argument index="0" name="body" type="String">
</argument>
- <description>
- Stub function
+ <description>
+ Stub function
</description>
</method>
<method name="send_body_data">
@@ -12576,7 +12603,7 @@ var result = httpClient.request(httpClient.METHOD_POST, "index.php", headers, qu
<argument index="0" name="body" type="RawArray">
</argument>
<description>
- Stub function
+ Stub function
</description>
</method>
<method name="close">
@@ -12629,14 +12656,14 @@ var result = httpClient.request(httpClient.METHOD_POST, "index.php", headers, qu
<argument index="0" name="bytes" type="int">
</argument>
<description>
- Sets the size of the buffer used and maximum bytes to read per iteration
+ Sets the size of the buffer used and maximum bytes to read per iteration
</description>
</method>
<method name="set_blocking_mode">
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- If set to true, execute will wait until all data is read from the response.
+ If set to true, execute will wait until all data is read from the response.
</description>
</method>
<method name="is_blocking_mode_enabled" qualifiers="const">
@@ -12649,30 +12676,30 @@ var result = httpClient.request(httpClient.METHOD_POST, "index.php", headers, qu
<return type="int">
</return>
<description>
- Returns a status string like STATUS_REQUESTING. Need to call [method poll] in order to get status updates.
+ Returns a status string like STATUS_REQUESTING. Need to call [method poll] in order to get status updates.
</description>
</method>
<method name="poll">
<return type="Error">
</return>
- <description>
- This needs to be called in order to have any request processed. Check results with [method get_status]
+ <description>
+ This needs to be called in order to have any request processed. Check results with [method get_status]
</description>
</method>
- <method name="query_string_from_dict">
- <return type="String">
- </return>
- <argument index="0" name="fields" type="Dictionary">
- </argument>
- <description>
- Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary.
+ <method name="query_string_from_dict">
+ <return type="String">
+ </return>
+ <argument index="0" name="fields" type="Dictionary">
+ </argument>
+ <description>
+ Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary.
var fields = {"username": "user", "password": "pass"}
String queryString = httpClient.query_string_from_dict(fields)
returns:= "username=user&amp;password=pass"
- </description>
- </method>
+ </description>
+ </method>
</methods>
<constants>
<constant name="METHOD_GET" value="0">
@@ -14453,6 +14480,12 @@ returns:= "username=user&amp;password=pass"
<description>
</description>
</method>
+ <method name="get_instance_path" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
</methods>
<constants>
</constants>
@@ -15902,6 +15935,18 @@ returns:= "username=user&amp;password=pass"
LineEdit provides a single line string editor, used for text fields.
</description>
<methods>
+ <method name="set_align">
+ <argument index="0" name="align" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_align" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="clear">
<description>
Clear the [LineEdit] text.
@@ -16015,6 +16060,14 @@ returns:= "username=user&amp;password=pass"
</signal>
</signals>
<constants>
+ <constant name="ALIGN_LEFT" value="0">
+ </constant>
+ <constant name="ALIGN_CENTER" value="1">
+ </constant>
+ <constant name="ALIGN_RIGHT" value="2">
+ </constant>
+ <constant name="ALIGN_FILL" value="3">
+ </constant>
</constants>
<theme_items>
<theme_item name="minimum_spaces" type="int">
@@ -16682,11 +16735,11 @@ returns:= "username=user&amp;password=pass"
</method>
</methods>
<members>
- <member name="x" type="Vector2">
+ <member name="x" type="float">
</member>
- <member name="y" type="Vector2">
+ <member name="y" type="float">
</member>
- <member name="o" type="Vector2">
+ <member name="o" type="float">
</member>
</members>
<constants>
@@ -16733,6 +16786,8 @@ returns:= "username=user&amp;password=pass"
</theme_item>
<theme_item name="pressed" type="StyleBox">
</theme_item>
+ <theme_item name="focus" type="StyleBox">
+ </theme_item>
<theme_item name="disabled" type="StyleBox">
</theme_item>
<theme_item name="normal" type="StyleBox">
@@ -18584,6 +18639,18 @@ returns:= "username=user&amp;password=pass"
Replace a node in a scene by a given one. Subscriptions that pass through this node will be lost.
</description>
</method>
+ <method name="set_scene_instance_load_placeholder">
+ <argument index="0" name="load_placeholder" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_scene_instance_load_placeholder" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_viewport" qualifiers="const">
<return type="Object">
</return>
@@ -21573,16 +21640,16 @@ This method controls whether the position between two cached points is interpola
</methods>
<constants>
<constant name="ROTATION_NONE" value="0">
- Forbids the PathFollow to rotate.
+ Forbids the PathFollow to rotate.
</constant>
<constant name="ROTATION_Y" value="1">
- Allows the PathFollow to rotate in the Y axis only.
+ Allows the PathFollow to rotate in the Y axis only.
</constant>
<constant name="ROTATION_XY" value="2">
- Allows the PathFollow to rotate in both the X, and Y axes.
+ Allows the PathFollow to rotate in both the X, and Y axes.
</constant>
<constant name="ROTATION_XYZ" value="3">
- Allows the PathFollow to rotate in any axis.
+ Allows the PathFollow to rotate in any axis.
</constant>
</constants>
</class>
@@ -21697,10 +21764,6 @@ This method controls whether the position between two cached points is interpola
</description>
</method>
</methods>
- <members>
- <member name="lookahead" type="float">
- </member>
- </members>
<constants>
</constants>
</class>
@@ -26057,6 +26120,14 @@ This method controls whether the position between two cached points is interpola
<description>
</description>
</method>
+ <method name="xform">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="v" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="Quat">
<return type="Quat">
</return>
@@ -26584,19 +26655,21 @@ This method controls whether the position between two cached points is interpola
Ray 2D shape resource for physics.
</brief_description>
<description>
- Ray 2D shape resource for physics. A ray is not really a collision body, isntead it tries to separate itself from whatever is touching its far endpoint. It's often useful for ccharacters.
+ Ray 2D shape resource for physics. A ray is not really a collision body, isntead it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters.
</description>
<methods>
<method name="set_length">
<argument index="0" name="length" type="float">
</argument>
<description>
+ Set the length of the ray.
</description>
</method>
<method name="get_length" qualifiers="const">
<return type="float">
</return>
<description>
+ Return the length of the ray.
</description>
</method>
</methods>
@@ -26866,27 +26939,22 @@ This method controls whether the position between two cached points is interpola
<methods>
<method name="compile">
<return type="int">
- [OK] if the regular expression was valid. [FAIL] otherwise.
</return>
<argument index="0" name="pattern" type="String">
- The string to be converted into a regular expression.
+ </argument>
+ <argument index="1" name="expanded" type="bool" default="true">
</argument>
<description>
- Once created, a RegEx object needs a regular expression to be assigned to it. This method tries to convert the string given to an usable regular expression.
</description>
</method>
<method name="find" qualifiers="const">
<return type="int">
- The position within the string (starting with 0) where the pattern was found. It will return -1 if the pattern was not found, it was invalid, or the start or end positions were beyond the string's end.
</return>
<argument index="0" name="text" type="String">
- The text to search the pattern in.
</argument>
<argument index="1" name="start" type="int" default="0">
- The position in the string (starting with 0) to start searching from.
</argument>
<argument index="2" name="end" type="int" default="-1">
- The position in the string (starting with 0) to stop searching. A value less than the start position means "end of the string".
</argument>
<description>
This method tries to find the pattern within the string, and returns the position where it was found. It also stores any capturing group (see [method get_capture]) for further retrieval.
@@ -26915,7 +26983,6 @@ This method controls whether the position between two cached points is interpola
<return type="String">
</return>
<argument index="0" name="capture" type="int">
- The number of the captured group, starting with 0. Like other regular expression engines, Godot's engine takes 0 as the full expression, and 1 as the first pair of capturing parentheses.
</argument>
<description>
Returns a captured group. A captured group is the part of a string that matches a part of the pattern delimited by parentheses (unless they are non-capturing parentheses [i](?:)[/i]).
@@ -26923,7 +26990,6 @@ This method controls whether the position between two cached points is interpola
</method>
<method name="get_captures" qualifiers="const">
<return type="StringArray">
- A list contining all the strings captured by the regular expression.
</return>
<description>
Return a list of all the captures made by the regular expression.
@@ -29543,24 +29609,28 @@ This method controls whether the position between two cached points is interpola
<argument index="0" name="a" type="Vector2">
</argument>
<description>
+ Set the first point's position.
</description>
</method>
<method name="get_a" qualifiers="const">
<return type="Vector2">
</return>
<description>
+ Return the first point's position.
</description>
</method>
<method name="set_b">
<argument index="0" name="b" type="Vector2">
</argument>
<description>
+ Set the second point's position.
</description>
</method>
<method name="get_b" qualifiers="const">
<return type="Vector2">
</return>
<description>
+ Return the second point's position.
</description>
</method>
</methods>
@@ -30608,13 +30678,14 @@ This method controls whether the position between two cached points is interpola
</argument>
<description>
Use a custom solver bias. No need to change this unless you really know what you are doing.
+ The solver bias is a factor controlling how much two objects "rebound" off each other, when colliding, to avoid them getting into each other because of numerical imprecision.
</description>
</method>
<method name="get_custom_solver_bias" qualifiers="const">
<return type="float">
</return>
<description>
- Return the custom solver bias. No need to change this unless you really know what you are doing.
+ Return the custom solver bias.
</description>
</method>
<method name="collide">
@@ -30627,6 +30698,8 @@ This method controls whether the position between two cached points is interpola
<argument index="2" name="shape_xform" type="Matrix32">
</argument>
<description>
+ Return whether this shape is colliding with another.
+ This method needs the transformation matrix for this shape ([code]local_xform[/code]), the shape to check collisions with ([code]with_shape[/code]), and the transformation matrix of that shape ([code]shape_xform[/code]).
</description>
</method>
<method name="collide_with_motion">
@@ -30643,6 +30716,8 @@ This method controls whether the position between two cached points is interpola
<argument index="4" name="shape_motion" type="Vector2">
</argument>
<description>
+ Return whether this shape would collide with another, if a given movemen was applied.
+ This method needs the transformation matrix for this shape ([code]local_xform[/code]), the movement to test on this shape ([code]local_motion[/code]), the shape to check collisions with ([code]with_shape[/code]), the transformation matrix of that shape ([code]shape_xform[/code]), and the movement to test ont the other object ([code]shape_motion[/code]).
</description>
</method>
<method name="collide_and_get_contacts">
@@ -30653,6 +30728,8 @@ This method controls whether the position between two cached points is interpola
<argument index="2" name="shape_xform" type="Matrix32">
</argument>
<description>
+ Return a list of the points where this shape touches another. If there are no collisions, the list is empty.
+ This method needs the transformation matrix for this shape ([code]local_xform[/code]), the shape to check collisions with ([code]with_shape[/code]), and the transformation matrix of that shape ([code]shape_xform[/code]).
</description>
</method>
<method name="collide_with_motion_and_get_contacts">
@@ -30667,6 +30744,8 @@ This method controls whether the position between two cached points is interpola
<argument index="4" name="shape_motion" type="Vector2">
</argument>
<description>
+ Return a list of the points where this shape would touch another, if a given movement was applied. If there are no collisions, the list is empty.
+ This method needs the transformation matrix for this shape ([code]local_xform[/code]), the movement to test on this shape ([code]local_motion[/code]), the shape to check collisions with ([code]with_shape[/code]), the transformation matrix of that shape ([code]shape_xform[/code]), and the movement to test ont the other object ([code]shape_motion[/code]).
</description>
</method>
</methods>
@@ -33988,15 +34067,17 @@ This method controls whether the position between two cached points is interpola
<method name="cursor_set_column">
<argument index="0" name="column" type="int">
</argument>
+ <argument index="1" name="arg1" type="bool">
+ </argument>
<description>
- Set the current column of the text editor.
</description>
</method>
<method name="cursor_set_line">
<argument index="0" name="line" type="int">
</argument>
+ <argument index="1" name="arg1" type="bool">
+ </argument>
<description>
- Set the current line of the text editor.
</description>
</method>
<method name="cursor_get_column" qualifiers="const">
@@ -36252,6 +36333,18 @@ This method controls whether the position between two cached points is interpola
<description>
</description>
</method>
+ <method name="set_hide_folding">
+ <argument index="0" name="hide" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_folding_hidden" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
</methods>
<signals>
<signal name="item_activated">
@@ -37404,6 +37497,14 @@ This method controls whether the position between two cached points is interpola
<description>
</description>
<methods>
+ <method name="angle">
+ <return type="float">
+ </return>
+ <description>
+ Returns the result of atan2 when called with the Vector's x and y as parameters (Math::atan2(x,y)).
+ Be aware that it therefore returns an angle oriented clockwise with regard to the (0, 1) unit vector, and not an angle oriented counter-clockwise with regard to the (1, 0) unit vector (which would be the typical trigonometric representation of the angle when calling Math::atan2(y,x)).
+ </description>
+ </method>
<method name="angle_to">
<return type="float">
</return>
@@ -37422,13 +37523,6 @@ This method controls whether the position between two cached points is interpola
Returns the angle in radians between the line connecting the two points and the x coordinate.
</description>
</method>
- <method name="atan2">
- <return type="float">
- </return>
- <description>
- Returns the result of atan2 when called with the Vector's x and y as parameters.
- </description>
- </method>
<method name="cubic_interpolate">
<return type="Vector2">
</return>
diff --git a/drivers/SCsub b/drivers/SCsub
index 3cc7b3f402..b94309013a 100644
--- a/drivers/SCsub
+++ b/drivers/SCsub
@@ -7,7 +7,6 @@ Export('env')
SConscript('unix/SCsub');
SConscript('alsa/SCsub');
-SConscript('ao/SCsub');
SConscript('pulseaudio/SCsub');
SConscript('windows/SCsub');
SConscript('gles2/SCsub');
diff --git a/drivers/ao/SCsub b/drivers/ao/SCsub
deleted file mode 100644
index 9fbb467baa..0000000000
--- a/drivers/ao/SCsub
+++ /dev/null
@@ -1,5 +0,0 @@
-Import('env')
-
-env.add_source_files(env.drivers_sources,"*.cpp")
-
-Export('env')
diff --git a/drivers/ao/audio_driver_ao.cpp b/drivers/ao/audio_driver_ao.cpp
deleted file mode 100644
index a484a5882e..0000000000
--- a/drivers/ao/audio_driver_ao.cpp
+++ /dev/null
@@ -1,161 +0,0 @@
-/*************************************************************************/
-/* audio_driver_ao.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014 Anton Yabchinskiy. */
-/* */
-/* 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 "audio_driver_ao.h"
-
-#ifdef AO_ENABLED
-
-#include "globals.h"
-#include "os/os.h"
-
-#include <cstring>
-
-Error AudioDriverAO::init() {
-
- active = false;
- thread_exited = false;
- exit_thread = false;
- pcm_open = false;
- samples_in = NULL;
-
- mix_rate = 44100;
- output_format = OUTPUT_STEREO;
- channels = 2;
-
- ao_sample_format format;
-
- format.bits = 16;
- format.rate = mix_rate;
- format.channels = channels;
- format.byte_format = AO_FMT_LITTLE;
- format.matrix = "L,R";
-
- device = ao_open_live(ao_default_driver_id(), &format, NULL);
- ERR_FAIL_COND_V(device == NULL, ERR_CANT_OPEN);
-
- int latency = GLOBAL_DEF("audio/output_latency", 25);
- buffer_size = nearest_power_of_2( latency * mix_rate / 1000 );
-
- samples_in = memnew_arr(int32_t, buffer_size * channels);
-
- mutex = Mutex::create();
- thread = Thread::create(AudioDriverAO::thread_func, this);
-
- return OK;
-};
-
-void AudioDriverAO::thread_func(void* p_udata) {
- AudioDriverAO* ad = (AudioDriverAO*)p_udata;
-
- // Overwrite samples on conversion
- int16_t* samples_out = reinterpret_cast<int16_t*>(ad->samples_in);
- unsigned int n_samples = ad->buffer_size * ad->channels;
- unsigned int n_bytes = n_samples * sizeof(int16_t);
-
- while (!ad->exit_thread) {
- if (ad->active) {
- ad->lock();
- ad->audio_server_process(ad->buffer_size, ad->samples_in);
- ad->unlock();
-
- for (unsigned int i = 0; i < n_samples; i++) {
- samples_out[i] = ad->samples_in[i] >> 16;
- }
- } else {
- memset(samples_out, 0, n_bytes);
- }
-
- if (ad->exit_thread)
- break;
-
- if (!ao_play(ad->device, reinterpret_cast<char*>(samples_out), n_bytes)) {
- ERR_PRINT("ao_play() failed");
- }
- };
-
- ad->thread_exited = true;
-};
-
-void AudioDriverAO::start() {
- active = true;
-};
-
-int AudioDriverAO::get_mix_rate() const {
- return mix_rate;
-};
-
-AudioDriverSW::OutputFormat AudioDriverAO::get_output_format() const {
- return output_format;
-};
-
-void AudioDriverAO::lock() {
- if (!thread || !mutex)
- return;
- mutex->lock();
-};
-
-void AudioDriverAO::unlock() {
- if (!thread || !mutex)
- return;
- mutex->unlock();
-};
-
-void AudioDriverAO::finish() {
- if (!thread)
- return;
-
- exit_thread = true;
- Thread::wait_to_finish(thread);
-
- if (samples_in) {
- memdelete_arr(samples_in);
- };
-
- memdelete(thread);
- if (mutex)
- memdelete(mutex);
-
- if (device)
- ao_close(device);
-
- thread = NULL;
-};
-
-AudioDriverAO::AudioDriverAO() {
- mutex = NULL;
- thread = NULL;
-
- ao_initialize();
-};
-
-AudioDriverAO::~AudioDriverAO() {
- ao_shutdown();
-};
-
-#endif
diff --git a/drivers/ao/audio_driver_ao.h b/drivers/ao/audio_driver_ao.h
deleted file mode 100644
index 023e051c8b..0000000000
--- a/drivers/ao/audio_driver_ao.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*************************************************************************/
-/* audio_driver_ao.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014 Anton Yabchinskiy. */
-/* */
-/* 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 "servers/audio/audio_server_sw.h"
-
-#ifdef AO_ENABLED
-
-#include "core/os/thread.h"
-#include "core/os/mutex.h"
-
-#include <ao/ao.h>
-
-class AudioDriverAO : public AudioDriverSW {
-
- Thread* thread;
- Mutex* mutex;
-
- ao_device* device;
-
- int32_t* samples_in;
-
- static void thread_func(void* p_udata);
- int buffer_size;
-
- unsigned int mix_rate;
- OutputFormat output_format;
-
- int channels;
-
- bool active;
- bool thread_exited;
- mutable bool exit_thread;
- bool pcm_open;
-
-public:
-
- const char* get_name() const {
- return "libao";
- };
-
- virtual Error init();
- virtual void start();
- virtual int get_mix_rate() const;
- virtual OutputFormat get_output_format() const;
- virtual void lock();
- virtual void unlock();
- virtual void finish();
-
- AudioDriverAO();
- ~AudioDriverAO();
-};
-
-#endif
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index 6b1347a3cc..9a52a7c92b 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -1,7 +1,6 @@
import os
import sys
-import platform
def is_active():
@@ -144,14 +143,10 @@ def configure(env):
-
+
env.Append(CPPFLAGS=['-DOPENGL_ENABLED','-DGLEW_ENABLED'])
- if platform.platform() == 'Linux':
- env.Append(CPPFLAGS=["-DALSA_ENABLED"])
- env.Append(LIBS=['asound'])
- if env['ao'] == 'yes':
- env.ParseConfig('pkg-config ao --cflags --libs')
- env.Append(CPPFLAGS=['-DAO_ENABLED'])
+ env.Append(CPPFLAGS=["-DALSA_ENABLED"])
+
if (env["pulseaudio"]=="yes"):
if not os.system("pkg-config --exists libpulse-simple"):
print("Enabling PulseAudio")
@@ -161,7 +156,7 @@ def configure(env):
print("PulseAudio development libraries not found, disabling driver")
env.Append(CPPFLAGS=['-DX11_ENABLED','-DUNIX_ENABLED','-DGLES2_ENABLED','-DGLES_OVER_GL'])
- env.Append(LIBS=['GL', 'GLU', 'pthread', 'z'])
+ env.Append(LIBS=['GL', 'GLU', 'pthread','asound','z']) #TODO detect linux/BSD!
#env.Append(CPPFLAGS=['-DMPC_FIXED_POINT'])
#host compiler is default..
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index bd60cf480e..74ebad748a 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -32,10 +32,9 @@
#include "key_mapping_x11.h"
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#include "print_string.h"
#include "servers/physics/physics_server_sw.h"
-
+#include "errno.h"
#include "X11/Xutil.h"
@@ -1673,7 +1672,7 @@ void OS_X11::close_joystick(int p_id) {
};
void OS_X11::probe_joystick(int p_id) {
- #if !defined(__FreeBSD__) && !defined(__OpenBSD__)
+ #ifndef __FreeBSD__
if (p_id == -1) {
@@ -1728,7 +1727,7 @@ void OS_X11::move_window_to_foreground() {
}
void OS_X11::process_joysticks() {
- #if !defined(__FreeBSD__) && !defined(__OpenBSD__)
+ #ifndef __FreeBSD__
int bytes;
js_event events[32];
InputEvent ievent;
@@ -1961,10 +1960,6 @@ OS_X11::OS_X11() {
AudioDriverManagerSW::add_driver(&driver_alsa);
#endif
-#ifdef AO_ENABLED
- AudioDriverManagerSW::add_driver(&driver_ao);
-#endif
-
minimized = false;
xim_style=0L;
mouse_mode=MOUSE_MODE_VISIBLE;
diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h
index a4b3d580d1..ed61df8f0e 100644
--- a/platform/x11/os_x11.h
+++ b/platform/x11/os_x11.h
@@ -43,7 +43,6 @@
#include "servers/spatial_sound_2d/spatial_sound_2d_server_sw.h"
#include "drivers/rtaudio/audio_driver_rtaudio.h"
#include "drivers/alsa/audio_driver_alsa.h"
-#include "drivers/ao/audio_driver_ao.h"
#include "drivers/pulseaudio/audio_driver_pulseaudio.h"
#include "servers/physics_2d/physics_2d_server_sw.h"
#include "servers/physics_2d/physics_2d_server_wrap_mt.h"
@@ -135,10 +134,6 @@ class OS_X11 : public OS_Unix {
AudioDriverALSA driver_alsa;
#endif
-#ifdef AO_ENABLED
- AudioDriverAO driver_ao;
-#endif
-
#ifdef PULSEAUDIO_ENABLED
AudioDriverPulseAudio driver_pulseaudio;
#endif
diff --git a/platform/x11/platform_config.h b/platform/x11/platform_config.h
index 1556b56058..c01d0aa380 100644
--- a/platform/x11/platform_config.h
+++ b/platform/x11/platform_config.h
@@ -29,7 +29,7 @@
#ifdef __linux__
#include <alloca.h>
#endif
-#if defined(__FreeBSD__) || defined(__OpenBSD__)
+#ifdef __FreeBSD__
#include <stdlib.h>
#endif
diff --git a/tools/editor/editor_help.cpp b/tools/editor/editor_help.cpp
index 1bc09c5102..321ac76240 100644
--- a/tools/editor/editor_help.cpp
+++ b/tools/editor/editor_help.cpp
@@ -1428,7 +1428,8 @@ EditorHelp::EditorHelp() {
{
Panel *pc = memnew( Panel );
Ref<StyleBoxFlat> style( memnew( StyleBoxFlat ) );
- style->set_bg_color( EditorSettings::get_singleton()->get("text_editor/background_color") );
+ style->set_bg_color( EditorSettings::get_singleton()->get("text_editor/background_color") );
+ pc->set_v_size_flags(SIZE_EXPAND_FILL);
pc->add_style_override("panel", style); //get_stylebox("normal","TextEdit"));
vbc->add_child(pc);
class_desc = memnew( RichTextLabel );
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index 22acfd4d07..7d837f3211 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -2012,6 +2012,11 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
} break;
+ case SCENE_TAB_CLOSE: {
+ _remove_scene(tab_closing);
+ _update_scene_tabs();
+ current_option = -1;
+ } break;
case FILE_SAVE_SCENE: {
@@ -2023,7 +2028,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
return;
};
// fallthrough to save_as
- };
+ } break;
case FILE_SAVE_AS_SCENE: {
Node *scene = editor_data.get_edited_scene_root();
@@ -2957,23 +2962,23 @@ void EditorNode::_remove_edited_scene() {
_update_title();
_update_scene_tabs();
- if (editor_data.get_edited_scene_count()==1) {
- //make new scene appear saved
- set_current_version(editor_data.get_undo_redo().get_version());
- unsaved_cache=false;
- }
+// if (editor_data.get_edited_scene_count()==1) {
+// //make new scene appear saved
+// set_current_version(editor_data.get_undo_redo().get_version());
+// unsaved_cache=false;
+// }
}
void EditorNode::_remove_scene(int index) {
// printf("Attempting to remove scene %d (current is %d)\n", index, editor_data.get_edited_scene());
+
if (editor_data.get_edited_scene() == index) {
//Scene to remove is current scene
_remove_edited_scene();
}
else {
- // Scene to remove is not active scene.");
+ // Scene to remove is not active scene
editor_data.remove_scene(index);
- editor_data.get_undo_redo().clear_history();
}
}
@@ -4467,8 +4472,19 @@ void EditorNode::_scene_tab_script_edited(int p_tab) {
}
void EditorNode::_scene_tab_closed(int p_tab) {
- _remove_scene(p_tab);
- _update_scene_tabs();
+ current_option = SCENE_TAB_CLOSE;
+ tab_closing = p_tab;
+ if (unsaved_cache) {
+ confirmation->get_ok()->set_text("Yes");
+ //confirmation->get_cancel()->show();
+ confirmation->set_text("Close scene? (Unsaved changes will be lost)");
+ confirmation->popup_centered_minsize();
+ }
+ else {
+ _remove_scene(p_tab);
+ //_update_scene_tabs();
+ }
+
}
diff --git a/tools/editor/editor_node.h b/tools/editor/editor_node.h
index bd88e1a4b9..002df0f3ea 100644
--- a/tools/editor/editor_node.h
+++ b/tools/editor/editor_node.h
@@ -173,6 +173,7 @@ class EditorNode : public Node {
SOURCES_REIMPORT,
DEPENDENCY_LOAD_CHANGED_IMAGES,
DEPENDENCY_UPDATE_IMPORTED,
+ SCENE_TAB_CLOSE,
IMPORT_PLUGIN_BASE=100,
@@ -217,6 +218,7 @@ class EditorNode : public Node {
//main tabs
Tabs *scene_tabs;
+ int tab_closing;
int old_split_ofs;
diff --git a/tools/editor/scenes_dock.cpp b/tools/editor/scenes_dock.cpp
index dfd729354d..c9b376ebec 100644
--- a/tools/editor/scenes_dock.cpp
+++ b/tools/editor/scenes_dock.cpp
@@ -155,7 +155,7 @@ void ScenesDock::_notification(int p_what) {
if (initialized)
return;
- initialized=false;
+ initialized=true;
EditorFileSystem::get_singleton()->connect("filesystem_changed",this,"_fs_changed");