From b1d15c51bc1ded928b266ffc06459dd8b2046eb4 Mon Sep 17 00:00:00 2001 From: reduz Date: Sat, 19 Jun 2021 12:58:49 -0300 Subject: Implement native extension system * Deprecates GDNative in favor of a simpler, lower level interface. * New extension system allows registering core engine classes. * Simple header interface in gdnative_interace.h --- doc/classes/@GlobalScope.xml | 2 ++ doc/classes/Color.xml | 40 +++++++++++----------- doc/classes/Control.xml | 4 +-- doc/classes/NativeExtension.xml | 57 +++++++++++++++++++++++++++++++ doc/classes/NativeExtensionManager.xml | 61 ++++++++++++++++++++++++++++++++++ doc/classes/Plane.xml | 14 ++++---- doc/classes/Quaternion.xml | 32 +++++++++--------- doc/classes/Vector2.xml | 24 ++++++------- doc/classes/Vector2i.xml | 24 ++++++------- doc/classes/Vector3.xml | 24 ++++++------- doc/classes/Vector3i.xml | 24 ++++++------- doc/classes/float.xml | 33 +++++++----------- doc/classes/int.xml | 45 ++++++++++--------------- 13 files changed, 243 insertions(+), 141 deletions(-) create mode 100644 doc/classes/NativeExtension.xml create mode 100644 doc/classes/NativeExtensionManager.xml (limited to 'doc') diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index fa118bec54..d0e594a78b 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -1224,6 +1224,8 @@ The [Marshalls] singleton. + + The [NavigationMeshGenerator] singleton. diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index 29c21b3213..7b1415e40d 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -80,14 +80,16 @@ + + - Constructs a [Color] from RGB values, typically between 0 and 1. Alpha will be 1. + Constructs a [Color] from RGBA values, typically between 0 and 1. [codeblocks] [gdscript] - var color = Color(0.2, 1.0, 0.7) # Similar to `Color8(51, 255, 178, 255)` + var color = Color(0.2, 1.0, 0.7, 0.8) # Similar to `Color8(51, 255, 178, 204)` [/gdscript] [csharp] - var color = new Color(0.2f, 1.0f, 0.7f); // Similar to `Color.Color8(51, 255, 178, 255)` + var color = new Color(0.2f, 1.0f, 0.7f, 0.8f); // Similar to `Color.Color8(51, 255, 178, 255, 204)` [/csharp] [/codeblocks] @@ -101,16 +103,14 @@ - - - Constructs a [Color] from RGBA values, typically between 0 and 1. + Constructs a [Color] from RGB values, typically between 0 and 1. Alpha will be 1. [codeblocks] [gdscript] - var color = Color(0.2, 1.0, 0.7, 0.8) # Similar to `Color8(51, 255, 178, 204)` + var color = Color(0.2, 1.0, 0.7) # Similar to `Color8(51, 255, 178, 255)` [/gdscript] [csharp] - var color = new Color(0.2f, 1.0f, 0.7f, 0.8f); // Similar to `Color.Color8(51, 255, 178, 255, 204)` + var color = new Color(0.2f, 1.0f, 0.7f); // Similar to `Color.Color8(51, 255, 178, 255)` [/csharp] [/codeblocks] @@ -346,12 +346,6 @@ - - - - - - @@ -360,12 +354,6 @@ - - - - - - @@ -414,6 +402,18 @@ + + + + + + + + + + + + diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index d7e70fad32..2692108d94 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -150,10 +150,10 @@ * it happens outside parent's rectangle and the parent has either [member rect_clip_content] enabled. - + - + Virtual method to be implemented by the user. Returns whether the given [code]point[/code] is inside this control. diff --git a/doc/classes/NativeExtension.xml b/doc/classes/NativeExtension.xml new file mode 100644 index 0000000000..c48af7df7b --- /dev/null +++ b/doc/classes/NativeExtension.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/NativeExtensionManager.xml b/doc/classes/NativeExtensionManager.xml new file mode 100644 index 0000000000..ba9018ff4c --- /dev/null +++ b/doc/classes/NativeExtensionManager.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml index cca5793fc7..12869061c4 100644 --- a/doc/classes/Plane.xml +++ b/doc/classes/Plane.xml @@ -169,23 +169,23 @@ - - + + + + - + - - + + - - diff --git a/doc/classes/Quaternion.xml b/doc/classes/Quaternion.xml index 660204ee7d..06434ab268 100644 --- a/doc/classes/Quaternion.xml +++ b/doc/classes/Quaternion.xml @@ -177,17 +177,17 @@ - + - + - + - + @@ -208,12 +208,6 @@ - - - - - - @@ -222,12 +216,6 @@ - - - - - - @@ -268,6 +256,18 @@ + + + + + + + + + + + + diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 07d09c31dc..498aefbef0 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -301,12 +301,6 @@ - - - - - - @@ -315,12 +309,6 @@ - - - - - - @@ -401,6 +389,18 @@ + + + + + + + + + + + + diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml index 930ec944ba..5f190de8ca 100644 --- a/doc/classes/Vector2i.xml +++ b/doc/classes/Vector2i.xml @@ -123,12 +123,6 @@ - - - - - - @@ -137,12 +131,6 @@ - - - - - - @@ -223,6 +211,18 @@ + + + + + + + + + + + + diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index eb1fd5f098..1361666c18 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -315,12 +315,6 @@ - - - - - - @@ -329,12 +323,6 @@ - - - - - - @@ -415,6 +403,18 @@ + + + + + + + + + + + + diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml index 8b45a62afa..e08bafa665 100644 --- a/doc/classes/Vector3i.xml +++ b/doc/classes/Vector3i.xml @@ -131,12 +131,6 @@ - - - - - - @@ -145,12 +139,6 @@ - - - - - - @@ -231,6 +219,18 @@ + + + + + + + + + + + + diff --git a/doc/classes/float.xml b/doc/classes/float.xml index f75c130039..585c847d22 100644 --- a/doc/classes/float.xml +++ b/doc/classes/float.xml @@ -142,16 +142,6 @@ Multiplies a [float] and an [int]. The result is a [float]. - - - - - Unary plus operator. Doesn't have any effect. - [codeblock] - var a = +2.5 # a is 2.5. - [/codeblock] - - @@ -170,17 +160,6 @@ Adds a [float] and an [int]. The result is a [float]. - - - - - Unary minus operator. Negates the number. - [codeblock] - var a = -2.5 # a is -2.5. - print(-a) # 2.5 - [/codeblock] - - @@ -308,6 +287,18 @@ Returns [code]true[/code] if this [float] is greater than or equal to the given [int]. + + + + + + + + + + + + diff --git a/doc/classes/int.xml b/doc/classes/int.xml index b0ad963998..95918c9007 100644 --- a/doc/classes/int.xml +++ b/doc/classes/int.xml @@ -126,21 +126,21 @@ - + - + - Multiplies an [int] and a [float]. The result is a [float]. + Multiplies two [int]s. - + - + - Multiplies two [int]s. + Multiplies an [int] and a [float]. The result is a [float]. @@ -203,16 +203,6 @@ [/codeblock] - - - - - Unary plus operator. Doesn't have any effect. - [codeblock] - var a = +1 # a is 1. - [/codeblock] - - @@ -231,17 +221,6 @@ Adds two integers. - - - - - Unary minus operator. Negates the number. - [codeblock] - var a = -1 # a is -1. - print(-a) # 1 - [/codeblock] - - @@ -414,6 +393,18 @@ [/codeblock] + + + + + + + + + + + + -- cgit v1.2.3