Commit graph

5883 commits

Author SHA1 Message Date
Rémi Verschelde
cd0f1e9b10
Merge pull request #72740 from Sauermann/fix-event-device-id
Fix mouse/drag/touch InputEvents having no device id
2023-02-06 23:51:26 +01:00
Markus Sauermann
8748f4dcaa Fix mouse/drag/touch InputEvents having no device id
Some internally created emulated/instantiated events didn't have a
device id. This PR sets for these cases a device id.

Also rename `DEVICE_ID_TOUCH_MOUSE` to the more generic
`DEVICE_ID_EMULATION`.
2023-02-06 22:49:42 +01:00
Rémi Verschelde
632911ea1d
Merge pull request #72786 from timothyqiu/no-libc
Remove unnecessary `stdio.h` from gdextension interface
2023-02-06 22:47:14 +01:00
Yuri Sizov
945207885b
Merge pull request #72546 from vonagam/fix-typed-array-can-reference
GDScript: Fix can_reference check for typed arrays
2023-02-06 23:32:47 +03:00
Dmitrii Maganov
8400308ab3 GDScript: Fix can_reference check for typed arrays 2023-02-06 22:00:16 +02:00
Rémi Verschelde
112f8faf5c
Merge pull request #72703 from lyuma/stringname_constructor_mistake
StringName: fix returning dangling data from char constructor.
2023-02-06 17:47:27 +01:00
Lyuma
82c52eab6c StringName: fix returning dangling data from char constructor.
Fixes a copy paste mistake in the `StringName(const char *,bool)` constructor,
to match the same form as the other two constrcutors.
This fixes a case where this constructor can return a dangling pointer and cause use-after-free.
2023-02-06 07:16:55 -08:00
Haoyu Qiu
f4ffa87a35 Remove unnecessary stdio.h from gdextension interface 2023-02-06 16:11:50 +08:00
bitsawer
d1521933bb Expose and document ProjectSettings.get_global_class_list() 2023-02-04 23:22:27 +02:00
Rémi Verschelde
bbff9fd7a4
Merge pull request #71786 from raulsntos/dotnet/array
Sync C# Array with Core
2023-02-04 00:24:06 +01:00
Silc Renew
1459b9c24c Fix scaled_orthogonal() & subgizmo global scaling 2023-02-04 00:46:04 +09:00
kobewi
c1cc8fd87f Remove unused has_global_classes() 2023-02-03 15:43:56 +01:00
George Marques
5fc7918594
GDScript: Improve usability of setter chains
- Consider PackedArrays non-shared since they are copied on C++/script
  boundaries.
- Add error messages in the analyzer when assigning to read-only
  properties.
- Add specific error message at runtime when assignment fails because
  the property is read-only.
2023-02-02 10:20:35 -03:00
Aaron Franke
0fcdf48f83
Remove unused has_slashes from NodePath 2023-02-01 11:32:39 -06:00
Rémi Verschelde
e52213e2fa
More codespell fixes, do more changes from previous ignore list 2023-02-01 12:11:36 +01:00
Rémi Verschelde
394bb0ee2b
Fix various typos with codespell
Finally do the childs -> children rename too.
2023-02-01 08:45:41 +01:00
Rémi Verschelde
68299e0f94
Merge pull request #72492 from maiself/fix-binary-res-typed-array
Fix loading of binary resources with typed arrays
2023-02-01 08:02:28 +01:00
Rémi Verschelde
e8240031e7
Merge pull request #71479 from raulsntos/virtual-return-type
Use enum instead of int in virtual methods return type
2023-02-01 07:45:28 +01:00
Rémi Verschelde
27fdb06fed
Merge pull request #71322 from EricEzaM/55856-proj-settings-initial-array-dict-shared-instance
Fix Project Settings array/dicts initial value being shared instances of the current value.
2023-02-01 07:29:44 +01:00
Mai Lavelle
87e6885f5e Fix loading of binary resources with typed arrays 2023-02-01 01:22:43 -05:00
Raul Santos
9e9eac4676
Use enum instead of int in virtual methods return type 2023-01-31 19:06:49 +01:00
Rémi Verschelde
8612c12be6
Merge pull request #72452 from akien-mga/global_class_always_create
Always create global class list, even if empty
2023-01-31 16:00:12 +01:00
Rémi Verschelde
534369d267
Merge pull request #64423 from RandomShaper/safe_input_synth
Warn users about unsafe usage of `InputEvent`
2023-01-31 15:56:43 +01:00
Rémi Verschelde
38a806e13f
Always create global class list, even if empty
Fixes #72451.
2023-01-31 15:28:53 +01:00
Pedro J. Estébanez
a2af839a59 Warn users about unsafe usage of InputEvent 2023-01-31 14:39:51 +01:00
Rémi Verschelde
e1648b3327
Merge pull request #72445 from reduz/restore-script-class-cache-if-removed
Restore script class cache if removed
2023-01-31 13:20:04 +01:00
Juan Linietsky
79897dd5bc Restore script class cache if removed
I have no idea why anyone would do this, but this fixes it.

Fixes #72154. Depends on #72444 being merged to function properly.
2023-01-31 11:28:21 +01:00
Dmitrii Maganov
5909f9f075 GDScript: Fix issues with typed arrays 2023-01-31 11:54:41 +02:00
Juan Linietsky
28f51ba547 Refactor high quality texture import
* Only two texture import modes for low/high quality now:
  * S3TC/BPTC
  * ETC2/ASTC
* Makes sense given this is the general preferred and most compatible combination in most platforms.
* Removed lossy_quality from VRAM texture compression options. It was unused everywhere.
* Added a new "high_quality" option to texture import. When enabled, it uses BPTC/ASTC (BC7/ASTC4x4) instead of S3TC/ETC2 (DXT1-5/ETC2,ETCA).
* Changed MacOS export settings so required texture formats depend on the architecture selected.

This solves the following problems:

* Makes it simpler to import textures as high quality, without having to worry about the specific format used.
* As the editor can now run on platforms such as web, Mac OS with Apple Silicion and Android, it should no longer be assumed that S3TC/BPTC is available by default for it.
2023-01-30 15:53:23 +01:00
Rémi Verschelde
6d6d6592c9
Merge pull request #71989 from bruvzg/set_typed_move
Move Array:set_typed to internal GDExtension structure and unexposed it.
2023-01-30 13:28:40 +01:00
Rémi Verschelde
bde3310f02
Merge pull request #71995 from Faless/net/4.x_tls_verify
[NET] Refactor TLS configuration.
2023-01-30 13:28:31 +01:00
bruvzg
5aa87ccc03
Move Array:set_typed to internal GDExtension structure and unexposed it. 2023-01-30 14:23:31 +02:00
Raul Santos
54f8fb010c
Sync C# Array with Core
- Add `AddRange` method.
- Add `Fill` method.
- Add `Max` and `Min` methods.
- Add `PickRandom` method.
- Add `Reverse` method.
- Add `RecursiveEqual` method.
- Add `Sort` method.
- Add `Slice` and `GetSliceRange` methods.
- Add `IndexOf` overload that takes an index parameter.
- Add `LastIndexOf` method.
- Add `BinarySearch` method.
- Add/update documentation.
2023-01-30 05:41:53 +01:00
Rémi Verschelde
d01ac9c736
Merge pull request #72287 from aaronfranke/tr2d-interp
Add support for interpolating skewed Transform2Ds
2023-01-29 14:13:02 +01:00
Adam Scott
bfffb8f254 Fix Resource::duplicate() missing packed arrays 2023-01-28 23:06:44 -05:00
Aaron Franke
5f3d3722b2
Add support for interpolating skewed transforms 2023-01-28 18:28:42 -06:00
Fabio Alessandrelli
7cd80e6a6d [Net] Remove StreamPeerTLS.blocking_handshake option.
Which was unused internally, and can be replaced by:

```
while tls.get_status() == tls.STATUS_HANDSHAKING:
  tls.poll()
```
2023-01-28 11:08:02 +01:00
Fabio Alessandrelli
adba870534 [NET] Refactor TLS configuration.
Use a TLSOptions configuration object which is created via static
functions.

- "TLSOptions.client": uses the standard CA and common name verification.
- "TLSOptions.client_unsafe": uses optional CA verification (i.e. if specified)
- "TLSOptions.server": is the standard server configuration (chain + key)

This will allow us to expand the TLS configuration options to include
e.g. mutual authentication without bloating the classes that uses
StreamPeerTLS and PacketPeerDTLS as underlying peers.
2023-01-28 11:08:02 +01:00
Pedro J. Estébanez
1de616d8dc Fix code style and consistency of RWLock and Semaphore 2023-01-27 18:45:25 +01:00
Yuri Rubinsky
0f8f0ab126
Merge pull request #72170 from Chaosus/astar_fix 2023-01-27 18:52:22 +03:00
Rémi Verschelde
2b55ac445b
Merge pull request #72111 from raulsntos/method-info-metadata
Add `GodotTypeInfo::Metadata` to `MethodInfo`
2023-01-27 15:41:38 +01:00
Rémi Verschelde
f0e3c3f4c3
Merge pull request #72168 from RandomShaper/sensible_lock_return
Booleanize various sync primitives' wait & locking methods
2023-01-27 15:40:43 +01:00
Yuri Rubinsky
cc0a243ce0 Enchance the performance of AStar by using a LocalVector(2) 2023-01-27 16:28:11 +03:00
Rémi Verschelde
9d555f5c68
Merge pull request #62499 from fire/gltf-binary-img-compression
Handle gltf binary images
2023-01-27 11:35:55 +01:00
Pedro J. Estébanez
f630940591 Booleanize various sync primitives' wait & locking methods 2023-01-27 11:15:30 +01:00
K. S. Ernest (iFire) Lee
39922d7167 Handle gltf binary
[ Ignore and Warn | Extract Textures (default) | Optimize Loading Embedded as Basisu ]

Enable compressed mip maps from Basis Universal for faster compressions.

Increase the quality of Basis to avoid corruption.

To keep compatibility use the first mip of the previous internal Godot format.

Because texture names may have invalid filename characters, adds String::validate_filename to sanitize filenames for import pipeline use.
2023-01-27 02:02:02 -08:00
Rémi Verschelde
e92393d295
Merge pull request #67783 from EricEzaM/67715-input-event-action-as-text
Make InputEventAction as_text() return the text of the first valid event for the action.
2023-01-27 10:30:00 +01:00
Dmitrii Maganov
abe6d67232 GDScript: Fix test for read-only state of constants 2023-01-27 05:28:08 +02:00
Raul Santos
cac7a784d6
Add GodotTypeInfo::Metadata to MethodInfo 2023-01-26 15:51:34 +01:00
Rémi Verschelde
31496c296a
Merge pull request #72078 from bitsawer/fix_optimize_vertices
Fix range loop iteration regressions
2023-01-26 01:11:25 +01:00