Commit graph

92 commits

Author SHA1 Message Date
Rémi Verschelde
ed11756d26
GDNative: Fix size mismatch on 32-bit platforms for Signal and Callable
Fixes #48645.
2021-05-11 20:25:01 +02:00
Rémi Verschelde
01f80201bf
Merge pull request #38645 from KoBeWi/FMR
Add filter, map and reduce to Array
2021-05-06 20:44:01 +02:00
Hugo Locurcio
3f078c99f6
Rename IP_Unix, IP_Address and TCP_Server to remove underscores 2021-05-06 02:52:01 +02:00
Tomasz Chabora
c50acc7339 Add filter, map and reduce to Array 2021-05-05 15:54:57 +02:00
Rémi Verschelde
c9e874b62d
Merge pull request #48442 from akien-mga/posmod-int64_t
Re-bind posmod, use int64_t instead of int
2021-05-04 15:15:52 +02:00
Rémi Verschelde
e196733e88
Re-bind posmod, use int64_t instead of int
Fixes #48420, fixes #48421.
The binding was missed when moving GDScript built-in to Global Scope it seems.

Co-authored-by: kleonc <9283098+kleonc@users.noreply.github.com>
2021-05-04 13:25:08 +02:00
reduz
c76acf6890 Add RPC to Callable
-Up to each scripting language to implement this
-If not supported for the function, it will just error when you try to call
2021-05-03 19:21:37 -03:00
Rémi Verschelde
f9b9992c25
Merge pull request #35245 from qarmin/unsigned_bit_shift
Don't allow to use in bit shift negative operands
2021-05-03 15:48:49 +02:00
Rémi Verschelde
9e9ac9f6ad
Merge pull request #46476 from DarknessCatt/master
Add fill method to Arrays and PackedArrays
2021-04-28 16:52:31 +02:00
Rémi Verschelde
305b2a15bf
Merge pull request #48239 from akien-mga/goodbye-copymem
Core: Drop custom `copymem`/`zeromem` defines
2021-04-28 11:04:05 +02:00
Florian Kothmeier
a2c419bdc9
Raise error if Resource is of wrong type as function argument 2021-04-27 21:24:08 +02:00
Rémi Verschelde
8247667a3e
Core: Drop custom copymem/zeromem defines
We've been using standard C library functions `memcpy`/`memset` for these since
2016 with 67f65f6639.

There was still the possibility for third-party platform ports to override the
definitions with a custom header, but this doesn't seem useful anymore.
2021-04-27 16:26:27 +02:00
Matheus Lima Cunha
efd27a63c1 Add fill method to Arrays and PackedArrays 2021-04-21 11:33:53 -03:00
George Marques
a6c5938909
Remove return value type adjust of builtin method calls
Make calls faster with the caveat that the caller needs to make sure
that the return value type is already correct.
2021-04-16 12:04:34 -03:00
Julien Nguyen
026b8497d1 Fix PackedFloat32Array get index not working 2021-04-12 23:33:06 +02:00
reduz
e67c63108b Add marshalling to PackedByteArray
-Decode/Encode functions for u8,s8,u16,s16,u32,s32,u64,s64,half,float,double,variant
-Improved binder template to allow this

Given in Godot 4.0 PackedByteArray is passed as reference, it is now possible to have these functions there, which makes the most sense.
2021-04-10 13:09:22 -03:00
Rémi Verschelde
d83761ba80
Style: Apply clang-tidy's readability-braces-around-statements 2021-04-05 14:09:59 +02:00
Rémi Verschelde
4b6e9f3157
Merge pull request #46991 from madmiraal/rename-invert-reverse
Rename Array.invert() to Array.reverse()
2021-04-01 13:32:22 +02:00
Rémi Verschelde
aba03110ba
Merge pull request #46830 from vnen/gdscript-typed-arrays
GDScript typed arrays
2021-03-29 16:47:38 +02:00
Marcel Admiraal
755c70b871 Rename Array.invert() to Array.reverse()
Does the same internally for List and Vector<>, which includes all
PackedArray types.
2021-03-21 10:20:08 +00:00
Aaron Franke
affe3c817a
Use real_t in GridMap and VariantParser 2021-03-19 00:56:34 -04: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
George Marques
fbfdd5e110
Add functions to retrieve type of a typed Array 2021-03-18 10:18:58 -03:00
George Marques
497dab94be
Don't check type when assigning Array
The array should just assimilate the type of the other one since
assignment in this case means a change in the reference.

This also adds a `typed_assign` function for the cases where type
validation is wanted.
2021-03-18 10:18:58 -03:00
Rémi Verschelde
224f5cab99
Merge pull request #46378 from reduz/static-method-in-variant-types
Add static method support to core Variant types
2021-03-16 15:44:04 +01:00
reduz
ecfa570ccb Add static method support to core Variant types
* Properly exposed, including validated and variant call
* Bound static functions in String and Color
* Did not add support for scripting languages, will have to be added manually.
2021-03-16 10:53:05 -03:00
Anshul7sp1
91181c2086 Fixes small typos and grammar correction 2021-03-12 19:05:16 +05:30
Rémi Verschelde
83b1acdc60
Merge pull request #45545 from abaire/relaxes_gltf_name_sanitization
Relaxes node name sanitization in gltf documents.
2021-03-09 14:54:33 +01:00
Alex Hirsch
6985967c3b Add missing ERR_FAIL_INDEX check to Variant::construct
Other functions in the same file validate parameters using the ERR_FAIL
macros. This validation was missing for Variant::construct resulting in
a crash when called with invalid data (p_type < 0).

fix #46067
2021-03-04 18:50:37 +01:00
Rafał Mikrut
2cbdcb03a1 Don't allow to use in bit shift negative operands 2021-03-04 16:25:40 +01:00
abaire
61cc1c8624 Relaxes Node naming constraints in glTF documents to match the Editor. 2021-02-24 08:22:27 -08:00
George Marques
f1088e1b70
Bind ClockDirection enum
It's the only enum in math_defs.h not bound, and it's used by Plane.
2021-02-23 13:56:28 -03:00
Aaron Franke
7d9ad2b845
Use Vector3.UP as a default value for look_at's up vector 2021-02-16 18:33:23 -05:00
JestemStefan
2c71ff1119
Added signed_angle_to for Vector3 2021-02-16 05:07:33 -05:00
kobewi
fb83d905da Change sort_custom/bsearch_custom to use Callables 2021-02-04 14:37:52 +01:00
Aaron Franke
f55445079a
Replace ColorN and from HTML with a string constructor 2021-02-01 17:27:19 -05:00
Aaron Franke
e829b7aee4
Unify URI encoding/decoding and add to C#
http_escape and percent_encode have been unified into uri_encode, and http_unescape and percent_decode have been unified into uri_decode.
2021-01-28 07:45:01 -05:00
Aaron Franke
a3e3bf8227
Make hex_to_int and bin_to_int handle the prefix automatically
Also add BinToInt to C#
2021-01-28 07:43:53 -05:00
Rémi Verschelde
976e768e71
Merge pull request #45489 from aaronfranke/core
Type consistencies in core
2021-01-27 21:16:20 +01:00
Aaron Franke
1be0d6b30e
Type consistencies in core 2021-01-26 13:04:22 -05:00
Yuri Roubinsky
38a5d22079 Renamed String.ord_at to unicode_at 2021-01-26 20:36:12 +03:00
Marcel Admiraal
8b983bddfb Remove Quat set methods in favour of constructors 2021-01-26 06:52:04 +00:00
Rémi Verschelde
f6be114d02
Merge pull request #44427 from briansemrau/fix-variant-bitand-validated-eval
Fix bitwise-and eval not updating return type
2021-01-11 13:53:27 +01:00
Rémi Verschelde
eea3287c2d
Merge pull request #44661 from AndreaCatania/AndreaCatania-patch-5
Fixes: GDscript min and max are inverted
2021-01-05 13:42:08 +01:00
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
Rémi Verschelde
6cebb8c117
Merge pull request #44586 from madmiraal/rename-stepify
Rename Math::stepify to snapped
2020-12-28 21:46:43 +01:00
Rémi Verschelde
058f3fe069
Merge pull request #44149 from madmiraal/rename-tangent-orthogonal
Rename Vector2.tangent() to Vector2.orthogonal()
2020-12-28 16:00:12 +01:00
Marcel Admiraal
b743a2ef3c Rename Math::stepify to snapped 2020-12-28 13:01:30 +00:00
Marcel Admiraal
b628912af0 Rename Rect2 and Rect2i grow_margin() to grow_side() 2020-12-28 12:47:33 +00:00
Marcel Admiraal
5b937d493f Rename empty() to is_empty() 2020-12-28 10:39:56 +00:00