Commit graph

5903 commits

Author SHA1 Message Date
AndreaCatania
02f2107620
Improve error reporting when the Message Queue is out of Memory.
The function `statistics()`, called when the MessageQueue is out of memory,
will still use the MessageQueue so it crashes.
Moving the error above will improve the behavior since the developer will
find the crash reasons and the instruction on how to fix it.
2023-02-11 22:45:14 +01:00
Rémi Verschelde
8f46656ae4
Merge pull request #72316 from 0xafbf/component-wise-minmax
Added component-wise `min` and `max` functions for vectors
2023-02-11 22:05:12 +01:00
Andrés Botero
a90e151b2a Added component-wise min and max functions for vectors 2023-02-11 15:03:11 -05:00
Rémi Verschelde
f011d8ca9c
Math: Prevent division by zero in posmod
Fixes #43932.

Co-authored-by: David Hoppenbrouwers <david@salt-inc.org>
2023-02-11 20:44:45 +01:00
Rémi Verschelde
532381562e
Merge pull request #72654 from RandomShaper/ptrcall_ret_raw_obj
Avoid losing references to objects in the native-scripting boundary
2023-02-11 15:35:01 +01:00
Rémi Verschelde
5c5f1452db
Merge pull request #73075 from timothyqiu/ttrn-single
Don't warn when using `TTRN()` in a language without plurals
2023-02-11 14:35:03 +01:00
Haoyu Qiu
52b4014362 Don't warn when using TTRN() in a language without plurals 2023-02-11 13:21:57 +08:00
Emmanuel Leblond
58f4139164
Add Engine::unregister_script_language and make Engine::register_script_language returns a Error 2023-02-10 19:50:24 +01:00
Haoyu Qiu
26581ca574 Add some missing translatable editor strings 2023-02-10 16:55:50 +08:00
Rémi Verschelde
91409fe0c8
Merge pull request #72964 from AThousandShips/input_early_exit
Perform early exit in Input::is_anything_pressed
2023-02-09 23:42:12 +01:00
Rémi Verschelde
ab4a7b2b77
Merge pull request #72547 from MewPurPur/string-split-fix
Fix String.split() with empty string and delimeter
2023-02-09 16:12:57 +01:00
Ninni Pipping
29031700ba Perform early exit in Input::is_anything_pressed 2023-02-09 11:43:23 +01:00
Jan Haller
45e6abde1d GDExtension: array_set_typed() accepts enum instead of uint32_t 2023-02-08 23:24:56 +01:00
Rémi Verschelde
9f859a111c
Merge pull request #72866 from Sauermann/fix-release-button-mask
Fix mouse-button-mask on button release in unit test
2023-02-08 09:45:11 +01:00
Haoyu Qiu
d8d5cb1198 Use GDExtensionBool in GDExtension interface 2023-02-08 14:57:07 +08:00
Markus Sauermann
39d79ce217 Fix mouse-button-mask on button release in unit test
On mouse-button release, the mask is 0.
2023-02-08 01:17:40 +01:00
Haoyu Qiu
5d7e003b29
Prepare for moving editor and classref translations to godot-editor-l10n repo
- Separate editor interface and property translations.
- Add property translation in TranslationServer.
- The split and merge of the POT/PO/Makefiles and extract scripts is done
  directly in godot-editor-l10n, the files will be removed in the next commit.
- Remove the hardcoded "to_include" lists from the SCsub, we'll only commit the
  files which are ready to inclue.
2023-02-07 14:20:40 +01:00
Mikael Hermansson
99dba702f5
Expose _err_print_error with message parameter to GDExtension 2023-02-07 14:02:18 +01:00
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
Pedro J. Estébanez
0bcc7bb5c7 Avoid losing references to objects in the native-scripting boundary 2023-02-03 17:48:41 +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
VolTer
57e39d0ce9 Fix String.split() with empty string and delimeter 2023-02-02 01:34:11 +01: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