Commit graph

23 commits

Author SHA1 Message Date
Rémi Verschelde
ac3322b0af
Use const references where possible for List range iterators 2021-07-25 12:22:25 +02:00
Aaron Franke
4e6efd1b07
Use C++ iterators for Lists in many situations 2021-07-23 17:38:28 -04:00
reduz
b1d15c51bc 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
2021-06-25 17:32:45 -03:00
reduz
2c81e5fa0e Make some variant internal functions public.
-Make constructors, ops and setget inline functions public
-Should help optimizing the GDScript VM
2021-06-17 19:59:28 -03:00
Pedro J. Estébanez
04688b92ff Rename Reference to RefCounted 2021-06-11 18:48:42 +02:00
Marcel Admiraal
8acd13a456 Rename Quat to Quaternion 2021-06-04 18:14:32 +01:00
Aaron Franke
08a85352fb
Rename Variant TRANSFORM to TRANSFORM3D
Also _transform to _transform3d
2021-06-03 07:30:01 -04:00
Aaron Franke
de3f6699a5
Rename Transform to Transform3D in core 2021-06-03 07:30:01 -04:00
Julien Nguyen
026b8497d1 Fix PackedFloat32Array get index not working 2021-04-12 23:33:06 +02:00
Rémi Verschelde
d83761ba80
Style: Apply clang-tidy's readability-braces-around-statements 2021-04-05 14:09:59 +02:00
George Marques
997a8ae9e8
Make Variant setget use set() method of Array
This ensure that typed arrays are properly checked when setting an
element.

Moved the macro to a straight declaration since the macro was only used
for Array and it now is quite specific to the Array class.
2021-03-18 10:18:59 -03:00
Anshul7sp1
91181c2086 Fixes small typos and grammar correction 2021-03-12 19:05:16 +05:30
Rémi Verschelde
b5334d14f7
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
Marcel Admiraal
5b937d493f Rename empty() to is_empty() 2020-12-28 10:39:56 +00:00
George Marques
d66a58a4d4
Add helper count function to Variant
To get counts of items before getting the list, which is useful for
GDNative so users can pre-allocate the buffer with the correct size
without having to get the list twice.
2020-12-27 11:14:29 -03:00
Jordan Schidlowsky
2d56e09276 packed*arrays are pass by ref now. support duplicate and update documentation 2020-12-17 16:09:32 -06:00
George Marques
0abacae2d3
Fix object check on Variant key checker 2020-12-10 18:18:52 -03:00
George Marques
e4e9231420
Use pointer parameters in Variant function pointers
Instead of references. This is needed because those function pointers
are used in GDNative which needs to work with plain C, which doesn't
support passing parameters by reference.
2020-12-10 18:18:47 -03:00
George Marques
c8e3fb8b05
Variant: Merge get() and validated_get()
Since they do pretty much the same thing. The validated_get() was
renamed to get() since that is more performant.
2020-11-20 17:26:19 -03:00
George Marques
8a9e3524a9
Fix variant getters not setting return type
The validated getters were only setting the value without changing the
type, leading to wrong results. This uses the same path used for
methods to the same purpose.
2020-11-20 15:55:17 -03:00
Rémi Verschelde
9d2e8f2f27
Variant: Rename Type::_RID to Type::RID
The underscore prefix was used to avoid the conflict between the `RID` class
name and the matching enum value in `Variant::Type`.

This can be fixed differently by prefixing uses of the `RID` class in `Variant`
with the scope resolution operator, as done already for `AABB`.
2020-11-09 16:29:04 +01:00
reduz
221a2a1742 Refactored variant constructor logic 2020-11-09 08:54:43 -03:00
reduz
127458ed17 Reorganized core/ directory, it was too fatty already
-Removed FuncRef, since Callable makes it obsolete
-Removed int_types.h as its obsolete in c++11+
-Changed color names code
2020-11-07 20:17:12 -03:00
Renamed from core/variant_setget.cpp (Browse further)