1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-29 16:16:38 +00:00
Commit Graph

8936 Commits

Author SHA1 Message Date
Lukas Tenbrink
ad600125df Rewrite HashMapHasherDefault based on type traits - it is now possible to declare a default hashing function for any type.
Remove cross-project includes from `hashfuncs.h`.
Improve hashing function for `Color` (based on values instead of `String`).
Move `Variant` comparison from `hash_map.h` to `dictionary.cpp` (`VariantComparatorDictionary`), where it's used.
Remove now unnecessary `HashableHasher`.
2025-10-05 01:49:11 +02:00
Lukas Tenbrink
1db0a60dc0 Replace std::size usage with std_size to avoid <iterator> include. 2025-10-05 00:26:11 +02:00
HolonProduction
5c3eb8b227 Autocompletion: Filter ClassDB argument options 2025-10-04 23:44:07 +02:00
Lukas Tenbrink
4211499248 Change Memory from a class into a namespace. 2025-10-04 17:22:07 +02:00
Thaddeus Crews
06827c91c6 Merge pull request #107839 from Rudolph-B/Occlusion-Culling-Optimization
Minor Optimization to Occlusion Culling
2025-10-03 12:01:13 -05:00
Thaddeus Crews
f6aa5ba23c Merge pull request #97210 from AleksLitynski/object-snapshot-debugger
Add an ObjectDB Profiling Tool
2025-10-03 12:01:11 -05:00
Thaddeus Crews
6dfe5de9a8 Merge pull request #111158 from WhalesState/trivial-itr
Refactor `Array` iterators to be trivially copyable.
2025-10-03 12:01:10 -05:00
Thaddeus Crews
00f8f62be7 Merge pull request #106084 from Kaleb-Reid/fix-geometry-3d
Fix ghost collisions in segment_intersects_convex()
2025-10-03 12:01:02 -05:00
Thaddeus Crews
38af23a654 Merge pull request #89409 from aaronfranke/server-folders
Move server files into their subfolders
2025-10-03 12:01:00 -05:00
Thaddeus Crews
f44aa13a9f Merge pull request #111090 from dsnopek/gdextension-compat-unexposed-classes-redo
GDExtension: Prevent breaking compatibility for unexposed classes that can only be created once
2025-10-02 15:12:00 -05:00
Mounir Tohami
9ff5325642 Refactor Array iterators to be trivially copyable. 2025-10-02 14:30:55 +03:00
Lukas Tenbrink
712bc99668 Add STATIC_ASSERT_INCOMPLETE_TYPE to enforce include minimality.
Add enforcements against `Dictionary` for `ustring.h` and two for `Dictionary` and `String` from `array.h`.
2025-10-01 23:46:35 +02:00
Thaddeus Crews
6bfcfd1d33 Merge pull request #106039 from Ivorforce/cowdata-reserve-exact
Add `reserve_exact` to `CowData`, and change growth factor to 1.5x
2025-10-01 13:12:43 -05:00
Thaddeus Crews
f9be832eca Merge pull request #110257 from BlueCube3310/mip-gen-all-formats
Image: Support generating mipmaps for all uncompressed formats
2025-10-01 13:12:40 -05:00
Lukas Tenbrink
ac85d24e64 Add GDType and Object::_gdtype_ptr for first-class Object typing.
The type is currently bare-bones, but will be expanded in future PRs.
2025-10-01 18:49:48 +02:00
Lukas Tenbrink
bac9a9be85 Add comments to String::size to lead people to length() and explain the difference.
# Conflicts:
#	core/string/ustring.h
2025-10-01 12:08:37 +02:00
Lukas Tenbrink
c993db9688 Add reserve_exact to CowData and Vector.
Change growth factor to be an indeterministic 1.5x.
Use `reserve_exact` in `FileAccess` to reduce on binary file loading RAM usage.

# Conflicts:
#	core/templates/cowdata.h
2025-10-01 11:57:40 +02:00
Aaron Franke
3d1c9fd5de Move server files into their subfolders 2025-09-30 19:39:39 -07:00
Thaddeus Crews
55ac91b887 Merge pull request #111084 from Ivorforce/cowdata-reserve-verbose
Make `CowData::reserve` warn message when new capacity < size verbose, like other `reserve` methods
2025-09-30 18:35:23 -05:00
Thaddeus Crews
5a1bc65e06 Merge pull request #110058 from Rinnegatamante/pc_upstream
Perform per-line or per-rect blits in blit_rect.
2025-09-30 18:35:22 -05:00
Thaddeus Crews
e5bf31b170 Merge pull request #107369 from Ivorforce/node-iter-children
Core: Add `Node::iterate_children` as a fast way to iterate a node's children
2025-09-30 18:35:21 -05:00
Thaddeus Crews
a9d4900284 Merge pull request #109779 from dsnopek/thread-is-main-thread
Expose `Thread::is_main_thread()`
2025-09-30 18:35:16 -05:00
Thaddeus Crews
93fd5c7ad0 Merge pull request #110907 from beicause/extension-deconstruct-before-object
Free script and extension instance before object deconstructing
2025-09-30 18:35:10 -05:00
Thaddeus Crews
76c039fb09 Merge pull request #108725 from dsnopek/gdextension-mem-alloc-pad-align
GDExtension: Add `mem_alloc2` (and friends) so padding can be requested
2025-09-30 18:35:09 -05:00
Thaddeus Crews
6b22951162 Merge pull request #107954 from stuartcarnie/unix_domain_socket_support
Add Core UNIX domain socket support
2025-09-30 18:35:08 -05:00
Thaddeus Crews
4d13966c08 Merge pull request #108698 from Brogolem35/hashset_clear_optimize
Optimize and clean up HashSet::clear
2025-09-30 18:35:01 -05:00
David Snopek
2c707a911f GDExtension: Prevent breaking compatibility for unexposed classes that can only be created once 2025-09-30 14:48:06 -05:00
Lukas Tenbrink
8f533897d8 Make CowData::reserve warn message when new capacity < size verbose, like other reserve methods. 2025-09-30 20:21:02 +02:00
Thaddeus Crews
726c4e9fba Merge pull request #84658 from detomon/initialize-quaternion-variant-with-identity
Initialize `Quaternion` variant with identity
2025-09-30 11:19:19 -05:00
Thaddeus Crews
21fd4faf1b Merge pull request #107469 from Ivorforce/vector-localvector-explicit-span-conversions
Remove implicit conversions between `LocalVector` and `Vector`
2025-09-30 11:19:17 -05:00
Thaddeus Crews
79d0eea742 Merge pull request #110616 from aaronfranke/fix-rtos-fix-32bit
Apply rtos_fix hack for handling 32-bit floats on all calls to rtos_fix
2025-09-30 11:19:16 -05:00
Thaddeus Crews
62933b683e Merge pull request #105928 from Ivorforce/cowdata-reserve-capacity
Core: Add `reserve` function to `Array`, `Vector`, and `String`
2025-09-30 11:19:13 -05:00
Thaddeus Crews
e256771e86 Merge pull request #108836 from aaronfranke/json-grisu
Use num_scientific (Grisu2) when stringifying JSON with full precision
2025-09-30 11:19:12 -05:00
Thaddeus Crews
fdf32d1b2a Merge pull request #108577 from YYF233333/global_class_list
Simplify `ScriptServer::get_global_class_list`
2025-09-30 11:19:10 -05:00
Thaddeus Crews
f6fc2f4a08 Core: Remove skip_cr argument from String 2025-09-28 10:07:24 -05:00
Luo Zhihao
727066fe1f Free script and extension instance before object deconstructing
Co-Authored-By: Lukas Tenbrink <lukas.tenbrink@gmail.com>
2025-09-26 18:15:08 +08:00
Haoyu Qiu
4e80190a46 Move context and plural support to Translation
- `TranslationPO` is now an empty class. It exists for compatibility.
- `OptimizedTranslation` stays the same, no context or plural support.
2025-09-26 10:51:57 +08:00
Haoyu Qiu
e882e42e1b Add default plural rules
This makes the PO loader correctly handle the situation where the optional
`Plural-Forms` header field does not exist.

The `Translation` class and its subclasses always have access to valid plural
rules via `_get_plural_rules()`. Plural rules are prioritized:

1. `Translation.plural_rules_override`
2. `TranslationServer.get_plural_rules(locale)`
3. The English plural rules: `nplurals=2; plurals=(n != 1)`

Co-Authored-By: Pāvels Nadtočajevs <7645683+bruvzg@users.noreply.github.com>
2025-09-26 10:51:57 +08:00
Haoyu Qiu
ebb96e2303 Move plural rules logic into a separate class
- Extracts plural rules logic in `TranslationPO` into a new `PluralRules` class.
- Changes caching the last used plural index in `TranslationPO` into an LRU cache in `PluralRules`.
- Adds tests for `PluralRules`.
2025-09-26 10:51:55 +08:00
Lukas Tenbrink
1bf821c1e1 Store current capacity in CowData buffers, and rewrite most of it.
Add `reserve` to `CowData`, `Vector` and `Array`.

# Conflicts:
#	core/os/memory.h
#	core/templates/cowdata.h
2025-09-25 22:00:17 +02:00
Thaddeus Crews
1f7630f1bf Merge pull request #110841 from smix8/raster_casual
Make navmesh rasterization errors more lenient
2025-09-25 14:57:11 -05:00
Thaddeus Crews
5fda92451d Merge pull request #100145 from Ivorforce/memory-offset-func
Add `mem_aligned_address` to simplify data offset constants.
2025-09-25 14:57:09 -05:00
Stuart Carnie
7227fdd805 Core: Add UNIX domain socket support
> [!NOTE]
>
> Later versions of Windows has support for `AF_UNIX`, so it could be
> added.
2025-09-26 05:46:19 +10:00
Lukas Tenbrink
3ac159094f Add memory_get_offset to simplify data offset constants. 2025-09-25 20:55:33 +02:00
smix8
19df15f1dc Make navmesh rasterization errors more lenient
Make navmesh rasterization on the navigation regions and map more lenient by starting out with a lower internal cell scale by default and changing the merge error to just warning that can be toggled.
2025-09-25 20:18:18 +02:00
Thaddeus Crews
c32c2606f4 Merge pull request #110837 from wheatear-dev/add-gdsoftclass-deeper
Add `GDSOFTCLASS` to deeper inheritors of `Object`
2025-09-25 12:13:56 -05:00
A Thousand Ships
bd65cfa876 Revert "Replace many uses of is_class with derives_from."
This reverts commit 78b743cf4a.
2025-09-25 13:48:53 +02:00
Edward Moulsdale
e366471fdc Add GDSOFTCLASS to deeper inheritors of Object 2025-09-24 19:15:56 +01:00
BlueCube3310
f64ccadceb Image: Support generating mipmaps for all formats 2025-09-24 18:48:28 +02:00
Aaron Franke
a238af4d20 Use num_scientific (Grisu2) when stringifying JSON with full precision 2025-09-24 08:21:37 -07:00