Commit Graph

5731 Commits

Author SHA1 Message Date
Rémi Verschelde 4e360ac612
Merge pull request #70702 from vnen/gdscript-error-on-assign-void
GDScript: Error when assigning return value of void function
2023-01-03 12:23:00 +01:00
Clay John 61c7b7fb13
Merge pull request #67853 from Zylann/fix_lods_with_doubles
Fix usages of mesh simplification functions in float=64 builds
2023-01-02 12:33:44 -07:00
Yuri Rubinsky b28571ca3e Optimize `wrapf` function a bit 2023-01-01 23:17:29 +03:00
George Marques 0c15844551
GDScript: Error when assigning return value of void function
This also makes built-in method calls empty the return value when the
method is void, to avoid keeping returning a garbage value in such case.
2022-12-30 12:08:58 -03:00
Yuri Rubinsky 16efd0b0fc Divide `AStarGrid2D::default_heuristic` into two different heuristics 2022-12-24 09:31:02 +03:00
Rémi Verschelde f5a6c9cf50
Merge pull request #62029 from Maran23/optional-default-value-project-settings
Allow to specify a default value in `ProjectSettings.get_setting()`
2022-12-21 22:23:43 +01:00
Marius Hanl 5aa243f9da Added the possibility to define a default value in ProjectSettings.get_setting(), which is used when no setting is set.
Also added tests for the project settings.

Co-authored-by: Yuri Sizov <11782833+YuriSizov@users.noreply.github.com>
2022-12-21 19:49:57 +01:00
Rémi Verschelde 186f6f0d87
Merge pull request #70403 from rburing/fix_edge_map_capacity
Fix edge map capacity in convex hull computer
2022-12-21 18:29:38 +01:00
Rémi Verschelde 1df71f89a8
Merge pull request #70355 from Chaosus/gds_fix_loops
Fix empty zero assigners for the variant types
2022-12-21 18:25:28 +01:00
Ricardo Buring e0e45e013e Fix edge map capacity in convex hull computer
The desired capacity could be less than the default, so reserve would
error.
2022-12-21 17:12:36 +01:00
stmSi 96b0fbb756 Fix crashed when compressing empty image data. 2022-12-21 16:39:35 +06:30
Rémi Verschelde 4f3ec4121a
Merge pull request #70350 from Chaosus/stringname_operator
Add missing != operator to `StringName`
2022-12-21 09:21:32 +01:00
Yuri Rubinsky 0bcbf8e00d Add `get_point_position` method to `AStarGrid2D` 2022-12-20 23:21:38 +03:00
Yuri Rubinsky fff3d812a5 Fix empty zero assigners for the variant types 2022-12-20 19:02:44 +03:00
Yuri Rubinsky 522d4243bf Add missing != operator to `StringName` 2022-12-20 17:25:54 +03:00
Rémi Verschelde 2a04b18d37
Merge pull request #70339 from Chaosus/astargrid2d_weight_scale
Restore weight scale for `AStarGrid2D` (partially)
2022-12-20 13:30:37 +01:00
Rémi Verschelde f318d60e06
Merge pull request #65376 from reduz/astc-support
Implement basic ASTC support
2022-12-20 12:44:30 +01:00
Juan Linietsky 71d21c7ccb Implement basic ASTC support
Implements basic ASTC support:
* Only 4x4 and 8x8 block sizes.
* Other block sizes are too complex to handle for Godot image compression handling. May be implemented sometime in the future.

The need for ASTC is mostly for the following use cases:
* Implement a high quality compression option for textures on mobile and M1 Apple hardware.
* For this, the 4x4 is sufficient, since it uses the same size as BPTC.

ASTC supports a lot of block sizes, but the benefit of supporting most of them is slim, while the implementation complexity in Godot is very high.
Supporting only 4x4 (and 8x8) solves the real problem, which is lack of a BPTC alternative on hardware where it's missing.

Note: This does not yet support encoding on import, an ASTC encoder will need to be added.
2022-12-20 11:26:30 +01:00
Yuri Rubinsky 8c478dcec9 Restore weight scale for `AStarGrid2D` (partially) 2022-12-20 12:22:32 +03:00
Rémi Verschelde 418ec03a40
Merge pull request #65990 from touilleMan/gdextension-expose-builtins-members-real-types
Expose in builtins' members internal type & size (on top of offset) in extension_api.json
2022-12-19 16:26:05 +01:00
Hugo Locurcio 70f6d42c92
Remove Disable Touch debug project setting
This project setting was only implemented and iOS and likely served
no purpose outside of debugging during development of engine features.

It was also located in a confusing location in the project settings
editor, as it was located below a root category (which appears in bold
and is normally not seen as clickable by users).
2022-12-17 18:47:29 +01:00
Rémi Verschelde ffed638cbc
Merge pull request #70116 from Calinou/vibrate-handheld-silence-warning
Silence `Input.vibrate_handheld()` warning as it's already documented
2022-12-16 13:47:11 +01:00
Haoyu Qiu 207e52c161 Fix String::word_wrap() for long words
- Changes `TextServer.string_get_word_breaks()`
  - Returns pairs of boundary start and end offsets
  - Accepts `chars_per_line` to return line breaks
- Removes `String::word_wrap()`

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2022-12-16 13:18:57 +08:00
Hugo Locurcio 4a991887bf
Silence `Input.vibrate_handheld()` warning as it's already documented
The warning causes messages to be spammed if you are calling this
method in a game that runs on both desktop and mobile platforms,
unless you guard all calls to `Input.vibrate_handheld()` with
`OS.has_feature("mobile") or OS.has_feature("web")`.

Since the limitation is already documented (and is obvious enough
given the method's name), the warning message is redundant.
2022-12-16 01:12:20 +01:00
bruvzg 53c76fa5d1
[RTL/TextServer] Add baseline inline alignment mode for objects and RTL tables. 2022-12-15 23:16:02 +02:00
Hei cc245ff8a6
Fix "p_zfar" to "p_znear" in Projection.create_orthogonal
Was confused why it always gave inf:s.
2022-12-15 19:03:33 +02:00
Emmanuel Leblond 2c2fd0820a
Expose in builtins' members internal type & size (on top of offset) in extension_api.json 2022-12-15 12:43:42 +01:00
Rémi Verschelde 762c6d4b36
Merge pull request #69709 from RandomShaper/refactor_spirv_reflection
Refactor SPIR-V reflection into a generic RenderingDevice feature
2022-12-15 09:21:35 +01:00
Jan Haller ebb3306da3 Extension header: amend const correctness of `p_args` parameters
A while ago, argument arrays were passed as const GDNativeTypePtr* (void* const*)
This was changed to GDNativeConstTypePtr* (void const**), adding const on the value but removing it on the pointer level.
This commit changes argument types to const GDExtensionConstTypePtr* (void const* const*).

Besides object pointers, the same change is applied to variant pointers.
2022-12-14 18:25:30 +01:00
Bastiaan Olij 7502e1dc0d Improve logic around using Ref<T> with GDExtension virtual functions 2022-12-13 10:54:29 +11:00
lawnjelly 491594ef0f VariantParser make readahead optional
It turns out some areas are independently moving / reading filepointers outside of the VariantParser, which can cause the readahead caching to get out of sync.

This PR makes the VariantParser readahead to be optional to allow for these use cases.
2022-12-12 15:14:39 +00:00
Rémi Verschelde 5f35b1d516
Sync controller mappings DB with SDL2 community repo
Synced with gabomdq/SDL_GameControllerDB@adf7ec1edf
2022-12-12 13:43:15 +01:00
Pedro J. Estébanez 2095ca26d0 Add default, zeroing constructor to BitField 2022-12-12 12:12:26 +01:00
Rémi Verschelde f1edd03d4c
Merge pull request #69718 from groud/finally_rename_gdnative_to_gdextension
Rename all gdnative occurences to gdextension
2022-12-12 11:43:59 +01:00
Gilles Roudière be1c9d677d Rename all gdnative occurences to gdextension
Non-exhaustive list of case-sensitive renames:

GDExtension -> GDNative
GDNATIVE -> GDEXTENSION
gdextension -> gdnative
ExtensionExtension ->Extension (for where there was GDNativeExtension)
EXTENSION_EXTENSION ->EXTENSION (for where there was GDNATIVE_EXTENSION)
gdnlib -> gdextension
gdn_interface -> gde_interface
gdni -> gde_interface
2022-12-12 11:04:57 +01:00
Rémi Verschelde e7d892159c
Merge pull request #69538 from mihe/feature-tag-double
Add feature tags to signify engine float precision
2022-12-11 11:51:59 +01:00
Rémi Verschelde 907298d673
Merge pull request #68747 from rune-scape/rune-stringname-unification
GDScript: Unify StringName and String
2022-12-09 18:06:48 +01:00
Rémi Verschelde 2d02cb67ee
Merge pull request #69661 from Mickeon/fix-editor-cannot-disconnect-signal
Fix unable to disconnect signal in Editor once created
2022-12-09 07:34:29 +01:00
Micky 885f2a4eca Fix unable to disconnect signal in Editor once created
Adds a CONNECT_INHERITED flag to connections, only available in editor builds. This flag denotes that the signal has been inherited from a previous Scene in the instancing hierarchy.
2022-12-08 13:36:48 +01:00
Adam Scott 4a16b8630e Fix `ResourceLoader::thread_load_tasks` crash 2022-12-07 16:59:10 -05:00
Mikael Hermansson 8c108177d7 Add feature tags to signify engine float precision 2022-12-07 16:13:17 +01:00
Aaron Franke d543ddf1c9
Fix Variant StringName `is_zero` being inverted 2022-12-06 21:49:43 -06:00
Rémi Verschelde 83b426bca5
Merge pull request #67906 from groud/simpler_gdextension_config
Remove unnecessary checks when exporting gdextension binaries and allow using a prefix to auto-detect files
2022-12-06 11:01:09 +01:00
rune-scape e79be6ce07 Unify String and StringName 2022-12-05 21:46:47 -05:00
Rémi Verschelde 1cf1d00bc9
Merge pull request #69602 from Rindbee/fix-string-mod
Fix suppressed error message on error when using % format string
2022-12-05 18:06:31 +01:00
Rémi Verschelde a50e4fed18
Merge pull request #69343 from YuriSizov/core-missing-property-revert-getters
Add missing public `property_*_revert` getters
2022-12-05 18:05:59 +01:00
Rindbee 694ee1bf52 Fix suppressed error message on error when using % format string
Before, the valid flag would always be true. On formatting errors,
an error message is returned as the result. (No error prompts.)
2022-12-05 22:09:10 +08:00
Rémi Verschelde a738f50886
Merge pull request #69357 from TokageItLab/byebye-trigger
Remove `UPDATE_TRIGGER` mode from `ValueTrack::UpdateMode` & Match behaviors between `AnimationTree` and `AnimationPlayer`
2022-12-05 00:06:23 +01:00
Rémi Verschelde f4bccf90a3
Merge pull request #69119 from lawnjelly/faster_variant_parser_master
Add readahead to VariantParser [4.x]
2022-12-05 00:06:14 +01:00
bruvzg ecec415988
Use system fonts as fallback and improve system font handling.
Add support for font weight and stretch selection when using system fonts.
Add function to get system fallback font from a font name, style, text, and language code.
Implement system font support for Android.
Use system fonts as a last resort fallback.
2022-12-04 18:44:20 +02:00