Commit graph

38 commits

Author SHA1 Message Date
Hein-Pieter van Braam
4e25e5066b Reduce String CoW
By introducing an intermediate proxy class for the array subscript
operator for String and CharString we can control better when CowData
will actually CoW.

This should improve performance of String usage for most cases.
2018-12-16 16:51:38 +01:00
lupoDharkael
2380f320e0 Update GDNantive API
Add missing Rect2 methods to GDNative API
Add missing Quat methods to GDNative API
Add missing NodePath methods to GDNative API
Add missing String methods to GDNative API
Add missing Array methods to GDNative API
Add missing Basis methods to GDNative API
Add missing Color methods to GDNative API
Update gdnative_api.json
2018-10-26 17:25:57 +02:00
Thomas Herzog
e0f763f1c9 [GDNative] add Variant::Operator 2018-09-13 17:23:38 +02:00
Rémi Verschelde
277b24dfb7 Make core/ includes absolute, remove subfolders from include path
This allows more consistency in the manner we include core headers,
where previously there would be a mix of absolute, relative and
include path-dependent includes.
2018-09-12 09:52:22 +02:00
Thomas Herzog
492b4cf837 [GDNative] add initial core 1.1 extension 2018-08-30 19:18:55 +02:00
Aaron Franke
cf136a91d6 [Core] Completely kill math_2d.h, change includes 2018-08-11 03:08:34 -05:00
Aaron Franke
28fc195339 [Core] Change math_2d includes to vector2 includes where relevant 2018-08-10 14:59:29 -05:00
Hein-Pieter van Braam
0e29f7974b Reduce unnecessary COW on Vector by make writing explicit
This commit makes operator[] on Vector const and adds a write proxy to it.  From
now on writes to Vectors need to happen through the .write proxy. So for
instance:

Vector<int> vec;
vec.push_back(10);
std::cout << vec[0] << std::endl;
vec.write[0] = 20;

Failing to use the .write proxy will cause a compilation error.

In addition COWable datatypes can now embed a CowData pointer to their data.
This means that String, CharString, and VMap no longer use or derive from
Vector.

_ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug
builds. This is a lot faster for Vector in the editor and while running tests.
The reason why this difference used to exist is because force-inlined methods
used to give a bad debugging experience. After extensive testing with modern
compilers this is no longer the case.
2018-07-26 00:54:16 +02:00
Pedro J. Estébanez
00e98458ba Revert "Unify http- and percent- encode/decode"
This reverts commit b76ee30917.
2018-04-12 21:12:34 +02:00
Pedro J. Estébanez
b76ee30917 Unify http- and percent- encode/decode
There was a percent-prefixed version, which was exposed, and a http-prefixed version which was not (only to GDNative).
This commit keeps the percent-prefixed versions, but with the http-prefixed implementations.
2018-03-27 19:18:30 +02:00
Marc Gilleron
a3937e1220 Added GDNative copy constructor for PoolVectors Read and Write 2018-01-18 02:44:37 +01:00
Ruslan Mustakov
a5e98c5e33 Fix GDNative procedures returning godot_char_string 2018-01-12 22:35:41 +07:00
karroffel
9ece961abe [GDNative] updates to string API and const fixes 2018-01-11 00:17:43 +01:00
Rémi Verschelde
e4213e66b2 Add missing copyright headers and fix formatting
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
Rémi Verschelde
b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Ruslan Mustakov
9d6d20e67c Remove get_stack_bottom
It's not used in godot-nim any longer and there were no other uses for
it.
2017-12-16 13:10:26 +07:00
Indah Sylvia
3996a05324 Fixed typo: substract to subtract 2017-12-05 11:34:46 +07:00
Rémi Verschelde
613d374bc5
Merge pull request #12284 from bojidar-bg/allow-subproperty-set
Allow for getting/setting "dotted" properties of objects
2017-11-21 22:44:14 +01:00
Bojidar Marinov
0cf9597758
Allow for getting/setting indexed properties of objects using get/set_indexed
Performance is around the same as using pure set() through GDScript.
2017-11-21 20:58:21 +02:00
poke1024
d6e54de502 Add bsearch and bsearch_custom to Array 2017-11-21 08:50:31 +01:00
Karroffel
5d666319e3 [GDNative] add a way to register call types 2017-11-20 14:49:22 +01:00
Karroffel
33ffdba553 [GDNative] removed godot_string_c_str 2017-11-20 11:10:05 +01:00
Karroffel
0865365e21 [GDNative] loading error and version error procs 2017-11-20 11:09:55 +01:00
Ferenc Arn
d28763a4c1 Rename Rect3 to AABB.
Fixes #12973.
2017-11-17 11:01:41 -05:00
Rémi Verschelde
61a693cf78
Merge pull request #12922 from eska014/engine-singletons
Singleton management changes
2017-11-14 20:44:55 +01:00
Thomas Herzog
bd2b1a62d9
Merge pull request #12586 from karroffel/gdnative-gdnlibrary-changes
[GDNative] use feature tags, added load once option
2017-11-14 15:34:07 +01:00
Leon Krause
9b7b46143d Move singleton management from ProjectSettings to Engine 2017-11-14 15:15:13 +01:00
Karroffel
a2e09a5d41 [GDNative] even more API fixes 2017-11-07 18:17:11 +01:00
Thomas Herzog
3cbcf5c2dd
Merge pull request #12612 from karroffel/gdnative-poolarray-accessors
[GDNative] added Read and Write accessors to pool arrays
2017-11-04 14:22:25 +01:00
Karroffel
af5c6be074 [GDNative] added Read and Write accessors to pool arrays 2017-11-03 18:17:58 +01:00
Karroffel
8b11e17f70 [GDNative] small API bug fixes 2017-11-03 16:05:21 +01:00
Karroffel
d82942e1c5 [GDNative] removed anchors 2017-11-03 15:17:50 +01:00
Emmanuel Leblond
e715be0f0a
[GDnative] add pluginscript \o/ 2017-10-17 10:50:13 +02:00
Emmanuel Leblond
d17951f57e
[GDnative] Add string_name api 2017-10-08 16:47:10 +02:00
Hein-Pieter van Braam
833c3917b2 Allow booleanization of all types
We now allow booleanization of all types. This means that empty versions
of all types now evaluate to false. So a Vector2(0,0), Dictionary(),
etc.

This allows you to write GDScript like:
if not Dictionary():
  print("Empty dict")

Booleanization can now also no longer fail. There is no more valid flag,
this changes Variant and GDNative API.
2017-09-19 18:55:31 +02:00
Ruslan Mustakov
f08bc0df7c Construct Variants from Reference properly in GDNative
Previously godot_variant_new_object constructed Variant without
accounting for the fact that the Object can be a Reference, so refcount
was not increased and References were destructed prematurely.

Also, Reference::init_ref did not propagate refcount increment to the
script instance, which led to desync of refcount info on the script
side and Godot side.
2017-09-14 19:40:36 +07:00
mrawlingst
6aa5bc2347 Change Color.to_32() to to_rgba32() and format as RGBA 2017-09-07 16:19:44 -04:00
Karroffel
7878329e6f merged gdnative and nativescript module 2017-09-03 15:28:43 +02:00