1
0
Fork 0
Commit Graph

8743 Commits

Author SHA1 Message Date
Lukas Tenbrink 670ab7a383 Add `resize_initialized` and `resize_uninitialized` to `LocalVector`. 2025-05-26 18:35:41 +02:00
Lukas Tenbrink 4cb8a0c77e Add `resize_initialized` and `resize_uninitialized` to `Vector`. These functions serve as replacements for `resize`, to make sure the caller understands whether elements need to be initialized 'by hand' after the call. 2025-05-26 18:35:41 +02:00
Thaddeus Crews 955744fdaf
Merge pull request #106733 from Ivorforce/ok-rainbows
Use OkHSV for `RichTextLabel` rainbows
2025-05-26 11:24:44 -05:00
Thaddeus Crews 8bcec7afa9
Merge pull request #106730 from Ivorforce/simplify-memnew-arr-placement
Simplify `Memory::memnew_arr_placement` to always initialize memory
2025-05-26 11:24:43 -05:00
Thaddeus Crews c38b856f39
Merge pull request #106717 from KoBeWi/uid_in_path_factory
Expose helper methods for converting UIDs
2025-05-26 11:24:40 -05:00
Thaddeus Crews 81953d3cc2
Merge pull request #106445 from YYF233333/opt_sarray
Optimize and simplify `sarray`
2025-05-26 11:24:38 -05:00
Thaddeus Crews 06301bee3e
Merge pull request #106775 from Ivorforce/gdsoftclass-expand
Move compatible functionality from `GDCLASS` to `GDSOFTCLASS`.
2025-05-26 11:24:26 -05:00
Thaddeus Crews 506417fe43
Merge pull request #105623 from lodetrick/section-feature-hide
Allow Inspector Section Checkboxes to hide features, Add "On" text to checkboxes
2025-05-26 11:24:25 -05:00
Thaddeus Crews 6132792f05
Merge pull request #106386 from bruvzg/mac_fs_name
Implement `get_filesystem_type` on macOS and Linux.
2025-05-26 11:24:25 -05:00
Thaddeus Crews c2fde491b7
Merge pull request #105996 from a-johnston/fuzzy_search_case_fix
Only update case sensitive fuzzy searching within `set_query`
2025-05-26 11:24:23 -05:00
Thaddeus Crews f196a7128c
Merge pull request #106759 from aaronp64/time_year_calc
Update `time.cpp` year/unix time conversions to be constant time
2025-05-26 11:24:22 -05:00
Lukas Tenbrink 621a8d14fa Move compatible functionality from `GDCLASS` to `GDSOFTCLASS`. 2025-05-26 17:41:15 +02:00
Pedro J. Estébanez 6841b45552 Add tests for resource duplication 2025-05-26 17:05:04 +02:00
Fabio Alessandrelli c28d5d0058 Revert "Expose get_rpc_config and get_node_rpc_config"
This reverts commit 8835f326b1.
2025-05-26 15:57:38 +02:00
Pedro J. Estébanez 342266cfd9 Overhaul `Variant::duplicate()` for resources
This in the scope of a duplication triggered via any type in the `Variant` realm. that is, the following: `Variant` itself, `Array` and `Dictionary`. That includes invoking `duplicate()` from scripts.

A `duplicate_deep(deep_subresources_mode)` method is added to `Variant`, `Array` and `Dictionary` (for compatibility reasons, simply adding an extra parameter was not possible). The default value for it is `RESOURCE_DEEP_DUPLICATE_NONE`, which is like calling `duplicate(true)`.

Remarks:
- The results of copying resources via those `Variant` types are exactly the same as if the copy were initiated from the `Resource` type at C++.
- In order to keep some separation between `Variant` and the higher-level animal which is `Resource`, `Variant` still contains the original code for that, so it's self-sufficient unless there's a `Resource` involved. Once the deep copy finds a `Resource` that has to be copied according to the duplication parameters, the algorithm invokes the `Resource` duplication machinery. When the stack is unwind back to a nesting level `Variant` can handle, `Variant` duplication logic keeps functioning.

While that is good from a responsibility separation standpoint, that would have a caveat: `Variant` would not be aware of the mapping between original and duplicate subresources and so wouldn't be able to keep preventing multiple duplicates.

To avoid that, this commit also introduces a wormwhole, a sharing mechanism by which `Variant` and `Resource` can collaborate in managing the lifetime of the original-to-duplicates map. The user-visible benefit is that the overduplicate prevention works as broadly as the whole `Variant` entity being copied, including all nesting levels, regardless how disconnected the data members containing resources may be across al the nesting levels. In other words, despite the aforementioned division of duties between `Variant` and `Resource` duplication logic, the duplicates map is shared among them. It's created when first finding a `Resource` and, however how deep the copy was working at that point, the map kept alive unitl the stack is unwind to the root user call, until the first step of the recursion.

Thanks to that common map of duplicates, this commit is able to fix the issue that `Resource::duplicate_for_local_scene()` used to ignore overridden duplicate logic.
2025-05-26 10:06:40 +02:00
Pedro J. Estébanez 2a03b459b9 Overhaul `Resource::duplicate()`
Thanks to a refactor, `Resource::duplicate_for_local_scene()` and `Resource::duplicate()` are now both users of the same, parametrized, implementation.

`Resource::duplicate()` now honors deepness in a more consistent and predictable fashion. `Resource::duplicate_deep()` is added (instead of just adding a parameter to the former, for compatibility needs).

The behavior after this change is as follows:
  - Deep (`deep=true`, formerly `subresources=true`):
    - Previously, only resources found as direct property values of the one to copy would be, recursively, duplicated.
    - Now, in addition, arrays and dictionaries are walked so the copy is truly deep, and only local subresources found across are copied.
    - Previously, subresources would be duplicated as many times as being referenced throughout the main resource.
    - Now, each subresource is only duplicated once and from that point, a referenced to that single copy is used. That's the enhanced behavior that `duplicate_for_local_scene()` already featured.
    - The behavior with respect to packed arrays is still duplication.
    - Formerly, arrays and dictionaries were recursive duplicated, with resources ignored.
    - Now, arrays and dictionaries are recursive duplicated, with resources duplicated.
    - When doing it through `duplicate_deep()`, there's a` deep_subresources_mode` parameter, with various possibilites to control if no resources are duplicated (so arrays, etc. are, but keeping referencing the originals), if only the internal ones are (resources with no non-local path, the default), or if all of them are. The default is to copy every subresource, just like `duplicate(true)`.
  - Not deep (`deep=false`, formerly `subresources=false`): <a name="resource-shallow"></a>
    - Previously, the first level of resources found as direct property values would be duplicated unconditionally. Packed arrays, arrays and dictionaries were non-recursively duplicated.
    - Now, no subresource found at any level in any form will be duplicated, but the original reference kept instead. Packed arrays, arrays and dictionaries are referenced, not duplicated at all.
    - Now, resources found as values of always-duplicate properties are duplicated, recursively or not matching what was requested for the root call.

This commit also changes what's the virtual method to override to customize the duplication (now it's the protected `_duplicate()` instead of the public `duplicate()`).
2025-05-26 10:05:25 +02:00
kobewi 9c37ca5383 Expose helper methods for converting UIDs 2025-05-25 00:26:16 +02:00
Pāvels Nadtočajevs d609cf62a0
Implement `get_filesystem_type` on macOS and Linux. 2025-05-23 23:05:06 +03:00
aaronp64 ba68e2a1e8 Update time.cpp year/unix time conversions to be constant time
Added functions to convert between year and day from unix timestamps in constant time, to avoid having to iterate one year at a time.
2025-05-23 14:02:14 -04:00
Yufeng Ying 8773f95e40 Optimize and simplify sarray. 2025-05-23 23:47:57 +08:00
Yufeng Ying 3545e945f6 Simplify implementation of errarray. 2025-05-23 23:14:59 +08:00
Lukas Tenbrink ea6fbd6687 Use OkHSV for rainbow labels. 2025-05-22 22:53:32 +02:00
Lukas Tenbrink 4371aa864d Simplify `Memory::memnew_arr_placement` to always initialize memory, to force callers to make the decision of whether to initialize. 2025-05-22 22:25:12 +02:00
Thaddeus Crews 15cd5e1619
Merge pull request #106689 from aaronp64/ringbuffer_localvector
Use `LocalVector` for `RingBuffer`
2025-05-22 12:15:03 -05:00
Thaddeus Crews 6258a3e224
Merge pull request #98750 from aaronfranke/grisu
Use Grisu2 algorithm in `String::num_scientific` to fix serializing
2025-05-22 12:15:02 -05:00
Thaddeus Crews c3c3657a0d
Merge pull request #106661 from KirbyRider1337/dont-compare-the-same-item-with-itself
Prevent comparison of items with themselves while partitioning sort arrays
2025-05-22 12:14:58 -05:00
Thaddeus Crews 1b5064e3e3
Merge pull request #105505 from Ivorforce/simplify-force-trivial
Simplify use of `LocalVector` `force_trivial` template parameter.
2025-05-22 12:14:58 -05:00
Aaron Franke 15de1d6c35
Use Grisu2 algorithm in String::num_scientific to fix serializing 2025-05-22 09:13:16 -07:00
kobewi 42249bb659 Add @export_file_path to export raw paths (no UID) 2025-05-22 13:25:17 +02:00
Logan Detrick 1a427d3dec Add feature hint string and "On" text for checkable groups 2025-05-21 14:56:55 -07:00
KirbyRider1337 caf8053b86 Adjusted get_median_from_3 and partitioner to also retrieve the pivot's index and check if either end of the partitioner has reached it to avoid comparing things with themselves 2025-05-21 14:38:09 -04:00
aaronp64 2a02cabe4d Use LocalVector for RingBuffer
Updated RingBuffer to use LocalVector instead of Vector, to avoid _copy_on_write overhead when writing to the buffer.
2025-05-21 13:50:10 -04:00
Danil Alexeev 7aafa6ef18
GDScript: Remove `leftmost_column` and `rightmost_column` fields 2025-05-21 18:16:20 +03:00
Rémi Verschelde 25a3c27c41
Merge pull request #105628 from rsanchezsaez/apple/ios-visionos-4.5
Native visionOS platform support
2025-05-20 23:09:07 +02:00
Ricardo Sanchez-Saez 47971c0a27
Introduce 'visionos' platform derived from 'apple_embedded' 2025-05-19 15:47:01 -07:00
Ricardo Sanchez-Saez 457299449d
Introduce 'drivers/apple_embedded' abstract platform for code reuse 2025-05-19 15:37:13 -07:00
Lukas Tenbrink 70f8dd29f5 Simplify use of `LocalVector` `force_trivial` template parameter. 2025-05-19 20:27:14 +02:00
Thaddeus Crews a2aefab4c7
Merge pull request #106486 from BlueCube3310/image-ch-detect-fix
Image: Fix detecting color channels
2025-05-19 08:01:40 -05:00
Thaddeus Crews 6c2d288ef1
Merge pull request #106337 from TokageItLab/arc-tolerance
Fix Quaternion arc constructor tolerance
2025-05-19 08:01:37 -05:00
Thaddeus Crews 2bf7ac76cf
Merge pull request #106456 from Repiteo/style/remove-DEBUG_METHODS_ENABLED
Style: Remove redundant `DEBUG_METHODS_ENABLED` macro
2025-05-19 08:01:35 -05:00
Thaddeus Crews 2d42b889d1
Merge pull request #104124 from Ivorforce/alloc-static-calloc
Add `Memory::alloc_static_zeroed` to allocate memory that's filled with zeroes.
2025-05-19 08:01:33 -05:00
Pedro J. Estébanez f5383df83b Overhaul `Resource::duplicate_for_local_scene()`
- Serves as a first step for future refactors.
- Code is simpler.
- Algorithm is more efficient: instead of two passes (dumb copy + resolve copies), it's single-pass.
- Now obeys `PROPERTY_USAGE_NEVER_DUPLICATE`.
- Now handles deep self-references (the resource to be duplicated being referenced somewhere deep).
2025-05-19 10:01:11 +02:00
Lukas Tenbrink 6fe17b264e Use `if` based mod in `HashMap` and `HashSet` in loops (faster than `fastmod`). 2025-05-18 20:05:34 +02:00
Yufeng Ying 1384e82c2c Improve ScriptLanguage get keyword API. 2025-05-17 18:43:19 +08:00
Thaddeus Crews 5620a215a1
Merge pull request #106021 from Alex2782/fix_xbox_controller_on_android
Fix Xbox Controller on Android
2025-05-16 07:43:09 -05:00
BlueCube3310 0f9986470a Image: Fix detecting color channels 2025-05-16 12:47:57 +02:00
Adam Johnston 76a65de3ab Change fuzzy search to only set case sensitive within set_query 2025-05-15 12:00:55 -07:00
Thaddeus Crews d237e31a89
Style: Remove redundant `DEBUG_METHODS_ENABLED`
• Replaced with functionally identical and far more ubiquitous `DEBUG_ENABLED`
2025-05-15 13:09:41 -05:00
Thaddeus Crews 5538850d87
Core: Convert `Pair`/`KeyValue` to `constexpr` 2025-05-15 10:37:41 -05:00
Pedro J. Estébanez 820380817a Exclude RD creation test functions from templates 2025-05-15 10:12:38 +02:00
Yufeng Ying 3bf400ffae Move bisect to Span and deduplicate code.
Co-authored-by: Lukas Tenbrink <lukas.tenbrink@gmail.com>
2025-05-14 18:19:09 +08:00
Rémi Verschelde 1de9789806
Linux: Drop `ppc32` (32-bit PowerPC) architecture support
This was added together with `ppc64le` in #54490, but seemingly only for the
purpose of getting it to compile on a Linux distro that aims at maximizing
support for all CPU architectures.

I don't think anyone has ever _run_ Godot on a `ppc32` system (do those even
support OpenGL ES 3.0?) and so I don't think we should aim to support it.

Debian dropped support for its PowerPC (`ppc32`) arch in Debian 9, released
in 2017.
2025-05-14 10:22:12 +02:00
Silc Lizard (Tokage) Renew 37aca09b23 Fix Quaternion arc constructor tolerance 2025-05-14 07:15:12 +09:00
Thaddeus Crews 0717136785
Merge pull request #106353 from YYF233333/hashmap_zst
Optimize `HashMap` size for zero-sized Allocators
2025-05-13 16:22:28 -05:00
Thaddeus Crews 1c4b660312
Merge pull request #96611 from Dynamic-Pistol/master
Add `PROPERTY_HINT_INPUT_NAME` for use with `@export_custom` to allow using input actions
2025-05-13 16:22:25 -05:00
Thaddeus Crews f648eea7f4
Merge pull request #106209 from YYF233333/opt_get_actions
Optimize `InputMap::get_actions`
2025-05-13 16:22:23 -05:00
Thaddeus Crews 243c8932d3
Merge pull request #82497 from Repiteo/typed-array-consolidation
Typed array equality operator update
2025-05-13 16:22:15 -05:00
Thaddeus Crews a2b49d0800
Merge pull request #93883 from TV4Fun/variant_join
Consolidate and simplify string joining code in `VariantUtilityFunctions`
2025-05-13 16:22:13 -05:00
Thaddeus Crews 172794337c
Merge pull request #99985 from allenwp/release-only-crash-99797
Print error message when index is out of range in `Variant::iter_get`
2025-05-13 16:22:11 -05:00
Thaddeus Crews 5b935881fc
Typed array equality operator logic updated
• Instead of calling to `_ref`, the same effect is achieved by calling to the base class assignment operator
• No longer need to be expose `_ref`; set back to private & remove reference from gdextension_interface
2025-05-13 14:41:16 -05:00
Allen Pestaluky 5657ecc542 Print error message when index is out of range in `Variant::iter_get` of `DEBUG_ENABLED` builds.
Mitigates #99797
2025-05-13 13:57:16 -04:00
Yufeng Ying 0babb2ab02 Optimize HashMap size for zero-sized Allocators. 2025-05-13 21:44:39 +08:00
Lukas Tenbrink 3207066e19 Add `Memory::alloc_static_zeroed` to allocate memory that's filled with zeroes.
This is generally faster than `malloc` followed by `memset` / loop-set to 0.
2025-05-13 01:57:05 +02:00
Rémi Verschelde 620206b0ae
Merge pull request #106309 from aaronp64/string_chr_appends
Avoid single character `String` allocations when appending characters
2025-05-13 01:05:45 +02:00
Rémi Verschelde 03cae12314
Merge pull request #106295 from timothyqiu/legacy-l10n
Remove translation loading logic that was never used
2025-05-13 01:05:31 +02:00
Rémi Verschelde 4c62c8aceb
Merge pull request #106020 from Ivorforce/hashmap-duplicate-hash
Optimize `HashMap` insertion by removing duplicate computation of hash and position
2025-05-13 01:04:57 +02:00
Rémi Verschelde a529abc361
Merge pull request #101339 from Ivorforce/remove-nothing
Remove unintentional use of zero-width space.
2025-05-13 01:04:19 +02:00
Rémi Verschelde 2b037e8989
Merge pull request #93276 from mashumafi/avoid-vec-copy
Avoid unnecessary copy-on-write Vector/Array
2025-05-13 01:04:16 +02:00
Rémi Verschelde b8fba34c17
Merge pull request #75629 from RedworkDE/non-atomic-error-macros
Remove pointless use of atomics in error macros
2025-05-13 01:04:12 +02:00
Joel Croteau 981f1e9298 Rename `VariantUtilityFunctions::join()` to `join_string()` 2025-05-12 17:51:09 -05:00
Joel Croteau 8be7ad32e7 Consolidate and simplify string joining code in `VariantUtilityFunctions`
`variant_utility.cpp` has 8 different copies of the exact same loop to join
vararg strings together. This is bad coding process and makes the codebase
needlessly cluttered. Also, the loop itself has an i == 0 check that is
unnecessary since String is auto-initialized to be empty and String::operator+=
already checks if it is empty before appending. This is a non-functional change
that only reorganizes the code to be a bit more readable.
2025-05-12 17:47:14 -05:00
aaronp64 8fb3697916 Avoid single character String allocations when appending characters
Removed calls to String::chr() when appending characters to Strings in Expression, Resource, and VariantParser, to avoid creating temporary Strings for each character.  Also updated the Resource case to resize String up front, since size is known.
2025-05-12 17:35:42 -04:00
Lukas Tenbrink e8c3409d40 Remove 4 unintentional uses of zero-width space and zero-width non-joiner. 2025-05-12 22:00:37 +02:00
RedworkDE c5777c43d9 Remove pointless use of atomics in error macros 2025-05-12 17:06:19 +02:00
mashumafi b73346ef19 Avoid copy-on-write when reading vectors 2025-05-12 16:08:05 +02:00
Haoyu Qiu bbc6643e4c Remove translation loading logic that was never used 2025-05-12 19:05:20 +08:00
Yufeng Ying 55a61cbd4a Optimize InputMap::get_actions. 2025-05-12 17:51:27 +08:00
Thaddeus Crews 1b439d49a9
Merge pull request #100446 from YYF233333/vmap
Replace `VMap` used in `VisualShader` with `HashMap` and remove `VMap`
2025-05-09 11:29:25 -05:00
Thaddeus Crews ba710dfde3
Merge pull request #106170 from IphStich/fix-typed-dictionary
Fix for debugging typed dictionaries
2025-05-09 11:29:18 -05:00
Thaddeus Crews 0bf9d88797
Merge pull request #106167 from Faless/mbedtls/fix_enable_threading
mbedTLS: Fix concurrency issues with TLS
2025-05-09 11:29:17 -05:00
Yufeng Ying 2db0a44519 Remove vmap.h 2025-05-09 19:05:28 +08:00
Thaddeus Crews 16aaa0a213
Merge pull request #103944 from KoBeWi/more_red_info
Improve error messages for `add_property_info()`
2025-05-08 07:19:33 -05:00
Elise 057759d413 Fix for debugging typed dictionaries 2025-05-08 21:11:23 +10:00
Fabio Alessandrelli 2c789788c0 mbedTLS: Fix concurrency issues with TLS
When we first integrated mbedTLS, we decided not to enable
MBEDTLS_THREADING_C (which adds mutex locking to calls modifying the
state), and instead to simply create separate contexts ("states") for
each connection.

This worked fine until recently.
Sadly, mbedTLS 3 added a global state for the new PSA crypto
functionalities (which are required to support TLSv1.3).
This results in TLSv1.3 connections to access and modify the global
state concurrently when running in threads.

This commit enables MBEDTLS_THREADING_C, and MBEDTLS_THREADING_C_ALT to
provide a generic Godot implementation using the engine Mutex class.
2025-05-08 11:45:00 +02:00
Thaddeus Crews 090d244b16
Merge pull request #101356 from Ivorforce/inline-utf-creation-functions
Inline `String::utf8` and `String::utf16` for their simplicity.
2025-05-07 12:48:32 -05:00
Thaddeus Crews 075b55068e
Merge pull request #100067 from aaronp64/randi_range_overflow
Fix `RandomPCG::random(int, int)` overflow bug
2025-05-07 12:48:30 -05:00
Thaddeus Crews 051712dfb8
Merge pull request #103264 from mhilbrunner/docs-path-join
Rename "file" param for str.path_join() to "path"
2025-05-07 12:48:29 -05:00
Thaddeus Crews 0ce3d75c20
Merge pull request #93783 from aaronp64/json_stringify_performance
Improve `JSON::stringify` performance
2025-05-07 12:48:28 -05:00
Thaddeus Crews aa1ca2b244
Merge pull request #93517 from Repiteo/core/nodiscard-strings
Core: Add `[[nodiscard]]` to string-like classes/structs
2025-05-07 12:48:27 -05:00
aaronp64 f13b4b760a Improve JSON::stringify performance
- Changed stringify to call static function _stringify directly, instead of creating JSON object
- Changed colon and end_statement from String to const char * to avoid extra allocations in each _stringify call
- Pass result String reference to each _stringify call to append to instead of allocating new String in each call

These changes make JSON::stringify around 2-3x faster in most cases
2025-05-06 18:27:32 -04:00
aaronp64 1089f61868 Fix RandomPCG::random(int, int) overflow bug
- Use int64_t for subtraction before converting to uint32_t
- Don't add one to uint32_t max value for rand() bounds
2025-05-06 17:54:12 -04:00
Thaddeus Crews 579feb387c
Core: Add `[[nodiscard]]` to string-like classes 2025-05-06 12:23:41 -05:00
aaronp64 d176ba045f Array performance improvements to reduce copying/copy_on_write calls
- Avoid temporary copy of p_array in Array::append_array when types match
- Call ptrw() once before looping in methods that return new Arrays, to avoid copy_on_write call for each item (recursive_duplicate, slice, filter, map)
2025-05-06 13:19:50 -04:00
Lukas Tenbrink 26a6d4062d Inline `String::utf8` and `String::utf16` for their simplicity. 2025-05-06 17:20:03 +02:00
Thaddeus Crews e085acd71c
Merge pull request #104815 from Ivorforce/strnlen
Rename `_strlen_clipped` to `strnlen` (and use the system equivalent for `char *` inputs)
2025-05-06 08:38:06 -05:00
Thaddeus Crews bd22587170
Merge pull request #106093 from KoBeWi/deprecated_forever
Remove registration of deprecated classes
2025-05-06 08:38:05 -05:00
Thaddeus Crews 4cb030d6bf
Merge pull request #106089 from mihe/rogue-newlines
Fix empty lines being added for errors with no script backtrace
2025-05-06 08:38:04 -05:00
Thaddeus Crews 7efe897343
Merge pull request #106085 from clayjohn/texture-decompress-import
Fix loading BPTC/ASTC textures on devices that don't support them
2025-05-06 08:38:04 -05:00
Thaddeus Crews 5fec9a9fdc
Merge pull request #100057 from aaronp64/container_validate_obj_perf
Improve `ContainerTypeValidate` performance for object types
2025-05-06 08:38:03 -05:00
Thaddeus Crews aa24e3b671
Merge pull request #105884 from stuartcarnie/macos_embedded
macOS: Embedded window support.
2025-05-06 08:37:59 -05:00
Lukas Tenbrink ec32dae1da Rename `_strlen_clipped` to `strnlen` (and use the system equivalent for `char *` inputs).
Add `strnlen` for `char16_t *` and `wchar_t *`.
2025-05-06 15:17:07 +02:00
Stuart Carnie 00e1fdec2c MacOS: Embedded window support. 2025-05-06 06:09:05 +10:00
kobewi 242293c451 Remove registration of deprecated classes 2025-05-05 20:16:50 +02:00
Thaddeus Crews 5bc01f2994
Merge pull request #105080 from beicause/basisu-ktx2-settings
BasisU: Use KTX2 format and add import options to configure encoder
2025-05-05 11:24:20 -05:00
Thaddeus Crews 5aca298548
Merge pull request #106051 from dalexeev/move-alt-codes-from-char-range
Move `alt_code_oem437` and `alt_code_cp1252` to separate header file
2025-05-05 11:24:14 -05:00
Thaddeus Crews 743c1eed49
Merge pull request #106027 from aaronp64/string_format_perf
Reduce allocations/copies in `String::format`
2025-05-05 11:24:13 -05:00
Mikael Hermansson 31b90246e7 Fix empty lines being added for errors with no script backtrace 2025-05-05 13:27:21 +02:00
clayjohn 2b3923880a Continue checking for a texture decompression path even if end of import file is not reached 2025-05-05 00:19:32 -07:00
Danil Alexeev 413cb795cd
Move `alt_code_oem437` and `alt_code_cp1252` to separate header file 2025-05-03 11:52:49 +03:00
Alexander Hartmann cf00265386 Fix Xbox Controller on Android 2025-05-03 01:09:05 +02:00
LuoZhihao 237597b01f BasisU: Use KTX2 format and add import options to configure encoder 2025-05-03 01:45:38 +08:00
Lukas Tenbrink 1d49a557b6 Optimize away duplicate hash and position computation in `HashMap` on insert.
Co-authored-by: Nazarii <nazarii.yablonskyi.pp.2022@lpnu.ua>
2025-05-02 19:02:03 +02:00
aaronp64 a4ba8c37c9 Reduce allocations/copies in String::format
- Updated initial new_string copy to use copy constructor/increase ref count instead of copying to new allocated memory
- Removed Variant copies from Array before assigning to String
- Only convert i to String when needed
2025-05-02 12:32:11 -04:00
Danil Alexeev 2b30f23595
GDScript: Fix `Callable` call error text 2025-05-02 18:30:35 +03:00
Thaddeus Crews 01fc9aee6c
Core: Modernize C headers with C++ equivalents 2025-05-02 08:23:01 -05:00
Thaddeus Crews 9e9f6c9c35
Merge pull request #105916 from Repiteo/core/msvc-fastfail
Core: Use `__fastfail()` in MSVC error macros
2025-04-30 16:51:53 -05:00
Thaddeus Crews 304347c3ac
Merge pull request #104055 from Ivorforce/fixed-vector
Core: Add `FixedVector` template - a collection that can be used completely on the stack.
2025-04-30 16:51:53 -05:00
Thaddeus Crews baf9d6e150
Merge pull request #105871 from Ivorforce/quick-stringname-fixes
Quick `StringName` improvements.
2025-04-30 16:51:52 -05:00
Thaddeus Crews fb08e94c35
Merge pull request #105930 from a-johnston/fuzzy_search_index_field
Add original index field to fuzzy search result
2025-04-30 16:51:51 -05:00
Lukas Tenbrink 1b1ab76a14 Add `FixedVector` template.
This is a high performance `Vector`-like object that can be used if the maximum number of objects is small and known, and the objects are needed only temporarily.
2025-04-30 19:14:08 +02:00
Lukas Tenbrink 91362a61da Simplify `StringName` to `bool` conversions.
Move `mutex` include of `string_name.h` to `string_name.cpp`.
2025-04-30 16:59:34 +02:00
lawnjelly f8f350a32a Add `GLOBAL_GET` cached macros.
GLOBAL_GET is an expensive operation which should not be used each frame / tick.
This PR adds macros which do a cheaper revision check, and only call the expensive GLOBAL_GET when project settings have changed.

Co-authored-by: Lukas Tenbrink <lukas.tenbrink@gmail.com>
2025-04-30 15:08:50 +01:00
Adam Johnston e025c9ed11 Add original index field to fuzzy search result 2025-04-29 17:39:59 -07:00
Thaddeus Crews 60aae6d856
Merge pull request #86653 from Mickeon/string-format-error
Improve error message for `String.format` when using nested Arrays
2025-04-29 16:05:20 -05:00
Thaddeus Crews eb3d0604ba
Merge pull request #105876 from KoBeWi/dynamic_outline
Inline static variables (part 1)
2025-04-29 16:05:16 -05:00
Thaddeus Crews d849ebb776
Merge pull request #105896 from piiertho/enhancement/gdextension/fallback-to-default-get-property-state-when-not-overriden
Fallback to ScriptInstance::get_property_state when get_property_state is not implemented in ScriptInstanceExtension
2025-04-29 16:05:15 -05:00
Thaddeus Crews 347e51e077
Merge pull request #105922 from aaronp64/dictionary_has_all
Avoid extra copy/validation of keys in `Dictionary::has_all`
2025-04-29 16:05:14 -05:00
aaronp64 e4bd611e19 Avoid extra copy/validation of keys in Dictionary::has_all
Updated Dictionary::has_all to check its HashMap directly for each validated key instead of going through Dictionary::has, to avoid additional copy/validation of each key.
2025-04-29 15:27:12 -04:00
Thaddeus Crews b23a233b5b
Core: Use `__fastfail()` in MSVC error macros 2025-04-29 12:25:11 -05:00
kobewi 5af4bef46f Inline static variables (part 1) 2025-04-29 18:10:44 +02:00
Pierre-Thomas Meisels e8c036beeb Fallback to ScriptInstance::get_property_state when get_property_state is not implemented in ScriptInstanceExtension 2025-04-29 09:43:20 +02:00
Thaddeus Crews 44d20b2dc6
Merge pull request #100619 from Ivorforce/cowdata-resize-direct
Optimize / refactor `CowData`, combining resize and fork to avoid unnecessary reallocations.
2025-04-28 18:45:54 -05:00
Lukas Tenbrink e57427900f Use `BinaryMutex` instead of `Mutex` for `StringName`. 2025-04-28 17:13:26 +02:00
Thaddeus Crews b7d4426fff
Merge pull request #104269 from lawnjelly/fti_scene_tree4
Physics Interpolation - Move 3D FTI to `SceneTree`
2025-04-28 10:01:34 -05:00
Thaddeus Crews 751ef44a13
Merge pull request #87714 from KoBeWi/hack_uid()
Expose `set_uid()`
2025-04-28 10:01:30 -05:00
Lukas Tenbrink f064a415b3 Use `PagedAllocator` for `StringName` to accelerate and localize allocations. 2025-04-28 10:38:17 +02:00
kobewi 6f4cf04fb8 Expose set_uid() 2025-04-28 10:13:43 +02:00
Pāvels Nadtočajevs 03048aa94a
Improve edited scene layout direction detection. 2025-04-28 07:57:26 +03:00
Thaddeus Crews f8a8d6cf04
Merge pull request #105700 from dementive/config-file-get-improvement
Improve ConfigFile get_sections and get_section_keys by returning Vector<String>
2025-04-27 19:21:31 -05:00
Thaddeus Crews 74fc4dae15
Merge pull request #95585 from HolonProduction/remove-cache
ScriptEditor: Remove obsolete completion cache
2025-04-27 19:21:30 -05:00
Thaddeus Crews 18f5b668d7
Merge pull request #105817 from Ivorforce/extension-loader-gdclass-fix
Fix `GDExtensionLoader` using the wrong super type in `GDSOFTCLASS`.
2025-04-27 19:21:29 -05:00
Thaddeus Crews df78d4a866
Merge pull request #105546 from Splizard/fix_gdextension_tostring
Fix GDExtension `Object/Node::to_string` to check `is_valid` before returning the result
2025-04-27 19:21:24 -05:00
Thaddeus Crews 1a2a1b07df
Merge pull request #105799 from Repiteo/scons/enum-conversion-warnings
SCons: Add enum conversion warning
2025-04-27 19:21:23 -05:00
Thaddeus Crews 3947cbe3b2
Merge pull request #104386 from Repiteo/core/cpp-math
Core: Replace C math headers with C++ equivalents
2025-04-27 19:21:22 -05:00
Thaddeus Crews ba0ad482ec
Merge pull request #105760 from Ivorforce/string-name-encapsulate
Remove unnecessary `StringName` `idx` cache in `_Data` to reduce its size.
2025-04-27 19:21:15 -05:00
Thaddeus Crews 999294d77a
Core: Integrate `CharStringT` 2025-04-27 09:58:39 -05:00
Lukas Tenbrink f2bab45202 Fix `GDExtensionLoader` using the wrong super type in `GDSOFTCLASS`. 2025-04-27 10:28:08 +02:00
HolonProduction 56bad11517 ScriptEditor: Remove obsolete completion cache 2025-04-26 22:59:10 +02:00
Thaddeus Crews dc9c34f0c6
SCons: Add enum conversion warning 2025-04-26 12:06:20 -05:00
lawnjelly ae04a3a5dd Physics Interpolation - Move 3D FTI to `SceneTree`
Moves 3D interpolation from server to the client code (`SceneTree`).
Complete rework of 3D physics interpolation, but using the same user API.
2025-04-26 14:13:30 +01:00
Thaddeus Crews e37c6261ea
Merge pull request #105767 from Ivorforce/no-alloc-count
Optimize static allocations by removing unused `Memory::alloc_count`.
2025-04-25 18:25:32 -05:00
Lukas Tenbrink af7610576a Remove unused `Memory::alloc_count`. 2025-04-25 21:44:26 +02:00
Lukas Tenbrink 3b31636985 Remove unnecessary `StringName` `idx` cache in `_Data` to reduce its size by 4 bytes.
Encapsulate `StringName` details in its cpp file.
2025-04-25 19:22:29 +02:00
Thaddeus Crews 5c9f93ce03
SCons: Begin decoupling generation & build code 2025-04-25 08:23:01 -05:00
dementive b8e44a0000 Improve ConfigFile get_sections and get_section_keys by returning Vector<String> 2025-04-24 20:10:31 -04:00
Thaddeus Crews 28089c40c1
Merge pull request #91006 from reduz/live-backtrace
Ability to print and log script backtraces
2025-04-24 17:18:52 -05:00
Thaddeus Crews ca4038f22a
Merge pull request #103336 from dugramen/projecsetting-override-order
Keep ProjectSettings overrides right below the original setting
2025-04-24 17:18:46 -05:00
Lukas Tenbrink d74ef8cb01 Rename `LocalVector.invert()` -> `LocalVector.reverse()` to match the `Vector`, `String` and `List` APIs. 2025-04-24 22:36:32 +02:00
dugramen 3354c32984 Keep ProjectSettings overrides right below the original setting 2025-04-24 15:00:40 -04:00
reduz d1dcb40d56 Ability to print and log script backtraces
Co-authored-by: Mikael Hermansson <mikael@hermansson.io>
2025-04-24 18:54:41 +02:00
Dynamic-Pistol c8fed1e1d0 Add PROPERTY_HINT_INPUT_NAME
Added PROPERTY_HINT_INPUT_NAME for StringName based off https://github.com/godotengine/godot-proposals/discussions/7559
2025-04-23 22:23:44 +02:00
Thaddeus Crews 931820d33c
Merge pull request #105278 from Ivorforce/reserve-smoke-test
Smoke test: Log an error if `reserve()` is called with fewer elements than `size()`
2025-04-23 12:01:28 -05:00
Thaddeus Crews 841c29d62c
Merge pull request #104985 from Ivorforce/stringname-always-string
Always use `String` as `StringName` backing internally.
2025-04-23 12:01:27 -05:00
Lukas Tenbrink 7c37188ca1 Smoke test: In collections, log an error if `reserve()` is called with a number smaller than the current size. Don't log an error if it is called with a number smaller than the current capacity. 2025-04-23 16:47:47 +02:00
RedMser a96e8ac62c Remove old path remaps system
Unused in public repositories, deprecated for over 6 years, and the
replacement system is well-tested by now.
2025-04-23 15:48:33 +02:00
Lukas Tenbrink 91fe434a86 Always use `String` as `StringName` backing internally. 2025-04-23 14:57:03 +02:00
Thaddeus Crews 2ffd5a3913
Merge pull request #104738 from YYF233333/cleanup_rid_owner
Use `LocalVector` in `RID_Owner::get_owned_list`
2025-04-22 10:44:25 -05:00
Thaddeus Crews c0e695d5e8
Merge pull request #100944 from Nazarwadim/LocalVector_use_1.5x_growth_factor
Use 1.5x growth factor for LocalVector
2025-04-21 08:24:22 -05:00
Thaddeus Crews 6c35474568
Merge pull request #105538 from clayjohn/rid_owner-validation
Remove 2^31 cap on RID allocations
2025-04-21 08:24:21 -05:00
Thaddeus Crews 0cc292f880
Merge pull request #105272 from lodetrick/add_section_toggle
Add enable checkboxes to editor sections
2025-04-21 08:24:20 -05:00
Yyf2333 1a70a06a43 Change RID_Owner::get_owned_list. 2025-04-21 01:04:27 +08:00
Quentin Quaadgras 23ffdd79e8 fix gdextension Object/Node::to_string to check is_valid before returning the result
at best, this results in an empty string, at worst, the result is never
initialised when is_valid is false.
2025-04-19 10:45:12 +12:00
clayjohn c6c06a966a Allow chunk validator to wrap around in RID_Alloc so that we do not need to crash once we have made 2^31 allocations 2025-04-18 00:06:53 -07:00
Thaddeus Crews ad40939b6f
Core: Replace C math headers with C++ equivalents
- Minor restructuring to ensure `math_funcs.h` is the central point for math functions
2025-04-16 15:49:02 -05:00
Thaddeus Crews c5c1cd4440
Merge pull request #105453 from reduz/signals-thread-safe
Add thread safety to Object signals
2025-04-16 15:39:22 -05:00
Marc Gilleron 5e6df6a196 Use Math::abs to avoid ambiguity with integer abs 2025-04-16 20:41:36 +02:00
Juan 2f39d8ebef Add thread safety to Object signals
* It turns out the majority of this work was done already by AThousandShips as part of #89451. This allows to do lock-less emitting of signals.
* This means, that only the signal map needs to be protected, making the task simple and without risk of deadlocks, or affecting performance.
* Objects can choose to not protect signals for performance (as example Node uses thread guards for protection, so these signals are not thread safe).
2025-04-16 17:14:44 +02:00
cier ebe9370724 Add enable checkboxes to editor sections
Fixes https://github.com/godotengine/godot-proposals/issues/4173
2025-04-15 13:49:41 -07:00
Thaddeus Crews 86b1fc7205
Merge pull request #104774 from Cykyrios/fix-center-bbcode-ansi-tag
Add missing "/" to "center" tag in `__print_line_rich()`
2025-04-15 12:28:44 -05:00
Thaddeus Crews 29dcead192
Merge pull request #105394 from Zylann/quaternion_abs
Use Math::abs to avoid ambiguity with integer abs
2025-04-15 12:28:41 -05:00
Thaddeus Crews b8950a4662
Merge pull request #105392 from aaronp64/array_min_max
Optimize `Array` `min`/`max` methods
2025-04-15 12:28:40 -05:00
Lukas Tenbrink 015a3b0434 Optimize / refactor `CowData`, combining `resize` and `fork` to avoid unnecessary reallocations. 2025-04-15 17:01:26 +02:00
Thaddeus Crews e5ccaa79e2
Merge pull request #105334 from WindyDarian/insert_at_end
Allow inserting at end of array again
2025-04-14 19:39:54 -05:00
Thaddeus Crews 034e614f10
Merge pull request #105326 from basicer/fix-unused-paramater-warning
Supress unused paramater warning conflicting with if constexpr
2025-04-14 19:39:52 -05:00
Thaddeus Crews 3d80279f80
Merge pull request #90971 from billuo/string-format-rid
Fix `RID` cannot be string formatted
2025-04-14 19:39:50 -05:00
Thaddeus Crews f56a4d4fe4
Merge pull request #105138 from stuartcarnie/fix_hangs
Renderer: Reduce scope of mutex locks to prevent common deadlocks
2025-04-14 19:39:47 -05:00
Thaddeus Crews 53608e3376
Merge pull request #104239 from Ivorforce/optimize-undenormalize
Optimize reverb by removing stray `volatile` from the `undenormalize` function signature.
2025-04-14 19:39:46 -05:00
Thaddeus Crews af252823ac
Merge pull request #101291 from Ivorforce/stringname-to-bool
Change `StringName.operator const void *` to `explicit operator bool`.
2025-04-14 19:39:45 -05:00
Thaddeus Crews e2b6a45e8d
Merge pull request #105247 from bruvzg/fix_nested_bbcode
Fix BBCode print with nested `[`.
2025-04-14 19:39:43 -05:00
Marc Gilleron 40b5468c6d Use Math::abs to avoid ambiguity with integer abs 2025-04-14 23:54:07 +02:00
aaronp64 ecf63dd079 Optimize Array min/max methods
Updated Array::min and Array::max to not copy Variants for comparison, and store index instead of copying each time new min/max is found.
2025-04-14 15:40:06 -04:00
Marc Gilleron ab36db2cfa Print Godot version when an extension is found to be incompatible 2025-04-13 14:14:23 +02:00
Windy Darian effd1b71ce allow inserting at end of array again 2025-04-12 22:16:19 -04:00
Stuart Carnie 09282c316a Renderer: Reduce scope of mutex locks to prevent common deadlocks
Fixes #102877
2025-04-13 06:56:13 +10:00
Rob Blanckaert 88a43b7039 Supress unused paramater warning conflicting with if constexpr 2025-04-12 13:18:12 -07:00
Thaddeus Crews addab4f001
Merge pull request #95916 from Repiteo/core/bit-field
Core: Add dedicated `BitField` template
2025-04-11 13:29:13 -05:00
Thaddeus Crews 0d267e7b1e
Core: Add dedicated `BitField` template 2025-04-11 11:53:26 -05:00
Lukas Tenbrink e989d7bd89 Change `StringName.operator const void *` to `explicit operator bool`. 2025-04-11 18:34:01 +02:00
Lukas Tenbrink b711d72e8f Remove unnecessary `friend class` declarations of `CowData`.
Use default implementations for various containers.
2025-04-11 18:26:08 +02:00
Thaddeus Crews d236bd8633
Merge pull request #99543 from KoBeWi/using_rng_to_destroy_rng
Add `create_id_for_path()` to ResourceUID
2025-04-11 09:51:12 -05:00
Thaddeus Crews 4972a524fc
Merge pull request #96139 from Alex2782/reverting_pr_84331
Add configuration option to disable `Scroll Deadzone` on Android
2025-04-11 09:51:08 -05:00
Thaddeus Crews 0964badc05
Merge pull request #105210 from nikitalita/gdsoftclass-fa-da
Add GDSOFTCLASS to FileAccess and DirAccess derived classes
2025-04-11 09:51:08 -05:00
Thaddeus Crews 717df3ee88
Merge pull request #105249 from Repiteo/core/math-defs-namespace
Core: Use `Math` namespace for constants
2025-04-11 09:51:04 -05:00
kobewi ff1f040893 Add create_id_for_path() to ResourceUID 2025-04-11 00:53:34 +02:00
Thaddeus Crews 297650a912
Merge pull request #93466 from bruvzg/alt_oem
[TextEdit / LineEdit] Add support for OEM Alt codes input.
2025-04-10 16:53:46 -05:00
Thaddeus Crews 31bb3be5a6
Merge pull request #105145 from bruvzg/swap_pba
Add bswap methods to the `PackedByteArray` bindings.
2025-04-10 16:53:46 -05:00
Thaddeus Crews 94282d88f9
Core: Use `Math` namespace for constants 2025-04-10 16:29:30 -05:00
Priahoud bf963e767e Add Options, Functions and Settings to convert Node-Names and Strings to kebab-case
- refactored and renamed String::_camelcase_to_underscore to String:_separate_compound_words
- refactored String::to_snake_case to work with the refactored String::_separate_compound_words
- created char_utils::is_hyphen to catch all hyphen variants in kebab-case conversion
- created String::to_kebab_case using the new String::_separate_compound_words
- created corresponding Documentation in String and StringName
- simplified both switch statements in EditorNode and ProjectDialog
- added new kebab-casing Option for Node Names in ProjectSettings
- added missing camelCase Options to Scene- and Node-Names in ProjectSettings
- simplified Mono RuntimeInterop Functions
- hooked up the ConnectionsDialog
- created additional Unit Tests
2025-04-10 21:22:21 +02:00
Pāvels Nadtočajevs bd3a264011
Fix BBCode print with nested `[`. 2025-04-10 19:53:12 +03:00
Thaddeus Crews c67b9a43e3
Merge pull request #100086 from erodozer/multipart-ext-import
Support multi dot extensions in import plugins
2025-04-10 10:18:18 -05:00
Thaddeus Crews cade15a163
Merge pull request #92475 from AThousandShips/string_replace_char
Add `String::replace_char(s)` methods for performance and convenience
2025-04-10 10:18:16 -05:00
Thaddeus Crews fc1dbda769
Merge pull request #105164 from stuartcarnie/apple_pthread
Apple: Add pthread implementation of `Thread` class
2025-04-10 10:18:12 -05:00
A Thousand Ships 889410dcda
Add `String::replace_char(s)` methods for performance and convenience 2025-04-10 13:08:45 +02:00
bruvzg aa0ade5b49
[TextEdit / LineEdit] Add support for OEM Alt codes input. 2025-04-10 08:52:19 +03:00
Stuart Carnie 8c8d6de3e7 Apple: Add pthread implementation of `Thread` class
This allows Apple platforms to override the default stack size of
a thread in the WorkerThreadPool, which is 512KiB by default.

This must be increased, as SPIRV-Cross, used by the Metal driver, can
use deeply nested stacks, as can debug builds.
2025-04-10 09:35:40 +10:00
Thaddeus Crews 7b74eb1a9b
Merge pull request #105205 from aaronp64/dictionary_has_validated_key
Use validated key in `Dictionary::has`
2025-04-09 18:12:02 -05:00
Thaddeus Crews 7a6c3b309f
Merge pull request #105130 from bruvzg/uri_fix_plus
Add uri_file_decode to handle + in file names.
2025-04-09 18:11:56 -05:00
nikitalita 2d0ae77719 add GDSOFTCLASS to FileAccess and DirAccess derived classes 2025-04-09 11:52:50 -07:00
aaronp64 117b1c3da1 Use validated key in Dictionary::has
Updated Dictionary::has to use validated key when checking variant_map, to handle cases when passed in key is converted to Dictionary's key type.
2025-04-09 12:22:48 -04:00
Pāvels Nadtočajevs 7c4d45ba3b
Add bswap methods to the `PackedByteArray` bindings. 2025-04-09 18:51:50 +03:00
Thaddeus Crews a8598cd8e2
Merge pull request #71542 from bruvzg/export_project_settings
[Export] Use project settings overrides with the target preset features instead of current platform features.
2025-04-09 08:51:47 -05:00
Thaddeus Crews ec675fc329
Merge pull request #100333 from YYF233333/reduce_list
Use `LocalVector` instead of `List` as arg of `Dictionary::get_key_list`
2025-04-09 08:51:45 -05:00
Thaddeus Crews 4c02239c5f
Merge pull request #105180 from bruvzg/thread_crash
Fix Thread crash when using invalid callback signature. And invalid message formatting.
2025-04-09 08:51:43 -05:00
Thaddeus Crews 217d1c6d2f
Merge pull request #105178 from bruvzg/endianess_notes
Remove misleading and incorrect notes about endianness. Fix FileAccess and StreamPeer not doing what name suggests.
2025-04-09 08:51:42 -05:00
Thaddeus Crews e6b2a42053
Merge pull request #83027 from rarysson/array-negative-indexes
Add negative index to `Array.remove_at` and `Array.insert`
2025-04-09 08:51:40 -05:00
Thaddeus Crews 0563f4f978
Merge pull request #105166 from Ivorforce/get-class-static-stringname
Change `get_class_static` to return `StringName`.
2025-04-09 08:51:39 -05:00
Thaddeus Crews e764068e99
Merge pull request #105159 from adamscott/define_my_int
Move `THREADS_ENABLED` check after common imports
2025-04-09 08:51:38 -05:00
Pāvels Nadtočajevs 41a87f06e1
Fix Thread crash when using invalid callback signature. And invalid message formatting. 2025-04-09 11:57:25 +03:00
Pāvels Nadtočajevs bd98aad3fa
Remove misleading and incorrect notes about endianness. Fix FileAccess and StreamPeer not doing what name suggests. 2025-04-09 11:01:25 +03:00
Lukas Tenbrink fbe64ffb45 Change `get_class_static` to return `StringName`.
Use that static `get_class_static` for `_get_class_namev` to avoid duplication.
2025-04-08 23:25:05 +02:00
Yufeng Ying f7e4987d0e Dictionary::get_key_list use LocalVector instead of List. 2025-04-09 02:46:24 +08:00
Adam Scott b7402b7597
Move `THREADS_ENABLED` check after common imports 2025-04-08 14:24:13 -04:00
bruvzg c6739f64df
[Export] Use project settings overrides with the target preset features instead of current platform features. 2025-04-08 21:22:37 +03:00
Rarysson Guilherme fe39ffeb7d Add negative index to `Array.remove_at` and `Array.insert` 2025-04-08 14:55:39 -03:00
Thaddeus Crews 36991aba34
Merge pull request #104264 from YYF233333/layout/gdvirtual
Optimize gdvirtual function layout
2025-04-08 12:32:51 -05:00
Thaddeus Crews 80e7f1a6d7
Merge pull request #105144 from Ivorforce/file-access-crompressed-size
Fix `FileAccessCompressed` claiming one byte more than it actually has.
2025-04-08 12:32:49 -05:00
Thaddeus Crews e6a61b1ecc
Merge pull request #76829 from bruvzg/ac_kit_direct
Implement screen reader support using AccessKit library.
2025-04-08 12:32:47 -05:00
Thaddeus Crews 6fe4d8d0f8
Merge pull request #104082 from YYF233333/dict_iter
Do not iterate `Dictionary` with `get_key_at_index`
2025-04-08 12:32:45 -05:00
Thaddeus Crews 95dc68c8c6
Merge pull request #105107 from bruvzg/min-max-flag
Add separate `minimize_disabled` and `maximize_disabled` window flags.
2025-04-08 12:32:44 -05:00
Thaddeus Crews 5dc7d56b92
Merge pull request #105099 from Ivorforce/object-classname-cache
Fix caching of objects' class name pointer in `Object` instances.
2025-04-08 12:32:40 -05:00
Pāvels Nadtočajevs b106dfd4f9
Base accessibility API. 2025-04-08 20:14:28 +03:00
Lukas Tenbrink 68f4502a5b Fix `FileAccessCompressed` claiming one byte more than it actually has.
Add a unit test for fastlz compressed file access.
2025-04-08 15:19:58 +02:00
Pāvels Nadtočajevs 9abe2e5294
Add `uri_file_decode` to handle `+` in file names. 2025-04-07 23:49:17 +03:00
Alex cd68034e01 Add configuration option to disable `Scroll Deadzone` on Android 2025-04-07 22:15:31 +02:00
Lukas Tenbrink e7f087b91a Fix caching of objects' class name pointer in `Object` instances.
Use `get_class_name` for `get_class` calls. Merge `get_parent_class_static` into `get_class_static`.
2025-04-07 21:05:21 +02:00
Pāvels Nadtočajevs f37fb49739
Add separate `minimize_disabled` and `maximize_disabled` window flags. 2025-04-07 18:58:11 +03:00
Yufeng Ying bbc380b07e Do not iterate Dictionary with get_key_at_index. 2025-04-07 21:54:13 +08:00
Thaddeus Crews 0fbb22c095
Merge pull request #104432 from YYF233333/dict_iter2
Do not iterate `Dictionary` with `Dictionary::keys()`
2025-04-07 08:43:33 -05:00
Thaddeus Crews 45a64319e1
Merge pull request #104771 from Repiteo/ci/pre-commit-bump
CI: Bump various pre-commit hooks
2025-04-07 08:43:27 -05:00
Thaddeus Crews 4a3c8a5c58
Merge pull request #104897 from MewPurPur/optimize-color-from-string
Optimize Color.html()
2025-04-07 08:43:26 -05:00
Thaddeus Crews b9665b9ee9
Merge pull request #104991 from nikitalita/fix_inf_neg
`VariantWriter::write`: fix writing negative infinity when `p_compat` is true
2025-04-07 08:43:21 -05:00
Thaddeus Crews 5edb235018
CI: Bump various pre-commit hooks 2025-04-07 08:23:35 -05:00
Thaddeus Crews 8a93218aab
Core: Natively convert enum/BitField with Variant 2025-04-05 12:35:34 -05:00
MewPurPur 45b1071e7c Optimize Color.html() 2025-04-05 14:00:30 +03:00
Yufeng Ying 8ae16699c5 Do not use Dictionary::keys() for Dictionary iteration. 2025-04-05 18:42:13 +08:00
Thaddeus Crews 4b36c0491e
Merge pull request #105020 from YYF233333/opt_get_inheriters
Optimize `ClassDB::get_inheriters_from_class`
2025-04-04 17:40:59 -05:00
Thaddeus Crews 046c9f540c
Merge pull request #105030 from Ivorforce/class-is-enabled-object
Move `GD_IS_CLASS_ENABLED` and respective include from `class_db.h` to `object.h`, as this is where it's needed.
2025-04-04 17:40:58 -05:00
Lukas Tenbrink aa5ca4f1a2 Move `GD_IS_CLASS_ENABLED` and respective include from `class_db.h` to `object.h`, as this is where it's needed. 2025-04-04 23:45:35 +02:00
Thaddeus Crews 78922d756a
Core: Decouple `GDCLASS` from ClassDB 2025-04-04 16:21:30 -05:00
Yufeng Ying 4029051bb1 Change ClassDB::get_inheriters_from_class. 2025-04-04 23:47:19 +08:00
Yufeng Ying 057858a0fb Optimize gdvirtual layout.
Co-authored-by: David Snopek <dsnopek@gmail.com>
2025-04-04 22:54:42 +08:00
runzh-crypto 9977abd697 Validate custom directory when project is started 2025-04-04 21:21:42 +08:00
Thaddeus Crews 21db8487a2
Merge pull request #104664 from tomfull123/missing-typed-dictionary-initializer-list
Add missing `initializer_list` constructor to TypedDictionary
2025-04-03 16:50:23 -05:00
Thaddeus Crews 6bd249a4c2
Merge pull request #104850 from Repiteo/core/warning-macros
Core: Integrate warning suppression macro helpers
2025-04-03 16:50:22 -05:00
nikitalita 046651e729 `VariantWriter::write`: fix writing negative infinity when p_compat is true 2025-04-03 14:36:34 -07:00
Lukas Tenbrink e6d166344b Remove unused `get_inheritance_list_static` from `GDCLASS`. 2025-04-03 17:18:28 +02:00
Thaddeus Crews 207a2b6472
Core: Integrate warning suppression macro helpers 2025-04-03 10:13:46 -05:00
Thaddeus Crews d0b3e0b474
Merge pull request #104921 from Ivorforce/no-get-valid-parents
Remove unused `get_valid_parents_static` functions from `GDCLASS`.
2025-04-03 09:27:54 -05:00
Thaddeus Crews e5c5cb4ce2
Merge pull request #104906 from Daylily-Zeleen/daylily-zeleen/allow_instantiate_unexposed_editor_plugin_from_gdextension
Allow instantiating unexposed `EditorPlugin` from GDExtension.
2025-04-03 09:27:50 -05:00
Rémi Verschelde 35beb07eef
CryptoCore: Use size_t for buffer sizes to fix encoding/sums of 2.0+ GiB files.
Fixes #104949.
2025-04-03 11:29:59 +02:00
Tom 8a3f9846c5 Add missing initializer_list constructor for TypedDictionary 2025-04-03 00:17:44 +01:00
Daylily-Zeleen 1cc879afc0 Allow instantiate unexposed EditorPlugin form GDExtension. 2025-04-02 23:52:14 +08:00
Thaddeus Crews 1f56d96cf2
Merge pull request #104893 from Repiteo/scons/external-includes-alt
SCons: Add `CPPEXTPATH` for external includes
2025-04-02 07:48:03 -05:00
Thaddeus Crews 9f222d500d
Merge pull request #104375 from YYF233333/is_empty
Replace `size() == 0` with `is_empty()`
2025-04-02 07:37:31 -05:00
Thaddeus Crews f25fc34439
SCons: Add `CPPEXTPATH` for external includes 2025-04-02 07:29:08 -05:00
Lukas Tenbrink be82731f99 Removed unused `get_valid_parents_static` functions from `GDCLASS`. 2025-04-02 13:50:47 +02:00
Yufeng Ying 7a1a970c25 size() <= 0 and size() < 1. 2025-04-02 19:18:44 +08:00
Yufeng Ying 4f4031a675 Replace size() == 0 with is_empty(). 2025-04-02 19:18:43 +08:00
smix8 f2197a1013 Expose TriangleMesh api functions wrapped for scripting
Adds script wrapped TriangleMesh api functions to create and query the triangle BVH tree.
2025-04-02 09:52:35 +02:00
Thaddeus Crews 1f1b1c56e7
Merge pull request #104381 from Ivorforce/object-notification-nobool
Optimize `Object::notification` by avoiding runtime branches
2025-04-01 19:53:37 -05:00
Thaddeus Crews 92002b1c69
Merge pull request #104218 from zaevi/fix_OptimizedTranslation_hash
Fix hash issue with OptimizedTranslation caused by signed char
2025-04-01 19:53:37 -05:00
Thaddeus Crews 21956851ac
Merge pull request #104885 from MewPurPur/html-validation-optimization
Optimize Color HTML validation
2025-04-01 19:53:32 -05:00
MewPurPur 250cc58388 Optimize HTML color validation 2025-04-01 21:26:21 +03:00
Michael Alexsander 556933306a
Allow to compile templates without navigation features 2025-04-01 11:53:35 -03:00
Lukas Tenbrink 8a76e31547 Remove bool from `Object::notification` virtual function; replace with separate functions to avoid branching. 2025-04-01 15:26:32 +02:00
Thaddeus Crews d52b84e472
Merge pull request #103993 from aaronfranke/geometry-segment
Directly use segment points in Geometry2D/3D function parameters
2025-04-01 08:01:34 -05:00
Thaddeus Crews abd565eb19
Merge pull request #104844 from Ivorforce/gdsoftclass
Add and require `GDSOFTCLASS` for `Object` subclasses that want to cast but do not use `GDCLASS`.
2025-03-31 19:02:03 -05:00
Lukas Tenbrink fa0a3c9c6e Add and require `GDSOFTCLASS` for `Object` subclasses that want to cast but do not use `GDCLASS`. 2025-03-31 20:49:50 +02:00
Thaddeus Crews 8f6bb119f4
Merge pull request #100602 from KoBeWi/over_100_changes_in_50_random_files_aka_the_best_kind_of_PR
Add templated version of `ObjectDB::get_instance()`
2025-03-31 12:03:47 -05:00
Thaddeus Crews f704113abe
Merge pull request #104649 from Ivorforce/move-semantics-ref-array-dict
Add move semantics to `Ref`
2025-03-31 12:03:44 -05:00
Thaddeus Crews 64f80ca0e9
Merge pull request #104810 from kiroxas/utf8_cleanup
Replace `append_utfx` with direct `String::utfx`
2025-03-31 12:03:44 -05:00
Lukas Tenbrink ccdc5862e9 Add `LocalVector.erase_unordered`, mimicking `erase` but with `remove_at_unordered`, to remove duplicate logic.
`erase_unordered` should be preferred over `erase` where order is not important, for its performance benefits.

Co-authored-by: smix8 <smix8@users.noreply.github.com>
2025-03-31 13:31:53 +02:00
Aaron Franke c1acc839a8
Directly use segment points in Geometry2D/3D function parameters 2025-03-30 16:25:59 -07:00
Kiro 23129a66ed Replace append_utfx with direct String::utfx 2025-03-30 19:56:38 +02:00
Thaddeus Crews 3b1a481f13
Merge pull request #97843 from detomon/optimize-a-star-grid-2d-solve
Reduce allocations when solving path in `AStarGrid2D`
2025-03-30 09:06:02 -05:00
Thaddeus Crews 6fed7a3000
Merge pull request #104745 from BlueCube3310/rgb565-typo-fix
Image: Fix typo at `_set_color_at_ofs` with `FORMAT_RGB565`
2025-03-30 09:06:01 -05:00
Thaddeus Crews 8b2952a71c
Merge pull request #101504 from AThousandShips/nav_split_new
[Navigation] Create a dedicated 2D navigation server
2025-03-30 09:05:43 -05:00
Cyril B. de5c1f9707 Add missing / for center tag in __print_line_rich 2025-03-29 20:21:31 +01:00
BlueCube3310 647b99c6d0 Image: Fix typo at `_set_color_at_ofs` with `FORMAT_RGB565` 2025-03-29 17:51:31 +01:00
Thaddeus Crews 152c14b053
Merge pull request #104597 from bruvzg/path_check
Implement `DirAccess.is_equivalent` method.
2025-03-29 10:16:34 -05:00