1
0
Fork 0
Commit Graph

908 Commits

Author SHA1 Message Date
Thaddeus Crews 16a11ac88b
Merge pull request #111358 from Ivorforce/no-variant-hasher
Remove `VariantHasher` and `VariantComparator` in favour of specialising `HashMapHasherDefault` and `HashMapComparatorDefault`.
2025-10-10 10:26:12 -05:00
Thaddeus Crews d4a87d9bb3
Merge pull request #106636 from Ivorforce/dictionary-mutating-fix
Fix `Dictionary::operator[]` from C++ accidentally modifying `const` dictionaries.
2025-10-10 10:26:01 -05:00
Thaddeus Crews c41e47034e
Merge pull request #111342 from Ivorforce/dict-assert-no-string
Assert that `dictionary.h` does not include `String`, and that neither of the fundamental containers include `Object`
2025-10-09 11:46:50 -05:00
Thaddeus Crews 7efb51c9d3
Merge pull request #111361 from Ivorforce/cleanup-hashfuncs
Clean up `hashfuncs.h`
2025-10-09 11:46:43 -05:00
Lukas Tenbrink f678729f89 Clean up `hashfuncs.h`: Move long functions to `hashfuncs.cpp` and replace `static` with `inline`. Remove `hash_make_uint64_t` and `hash_make_uint32_t`. 2025-10-07 13:50:18 +02:00
Lukas Tenbrink d2ee378d1c Remove `VariantHasher` and `VariantComparator` in favour of specializing `HashMapHasherDefault` and `HashMapComparatorDefault`. 2025-10-07 13:47:39 +02:00
Gergely Kis 6c44c80c62 LibGodot: Core - Build Godot Engine as a Library
* Add a new GodotInstance GDCLASS that provides startup and iteration commands to control a Godot instance.
* Adds a libgodot_create_godot_instance entry point that creates a new Godot instance and returns a GodotInstance object.
* Adds a libgodot_destroy_godot_instance entry point that destroys the Godot instance.

Sample Apps: https://github.com/migeran/libgodot_project

Developed by [Migeran](https://migeran.com)

Sponsors & Acknowledgements:

* Initial development sponsored by [Smirk Software](https://www.smirk.gg/)
* Rebasing to Godot 4.3 and further development sponsored by [Xibbon Inc.](https://xibbon.com)
* The GDExtension registration of the host process & build system changes were based
  on @Faolan-Rad's LibGodot PR: https://github.com/godotengine/godot/pull/72883
* Thanks to Ben Rog-Wilhelm (Zorbathut) for creating a smaller, minimal version for easier review.
* Thanks to Ernest Lee (iFire) for his support

Co-Authored-By: Gabor Koncz <gabor.koncz@migeran.com>
Co-Authored-By: Ben Rog-Wilhelm <zorba-github@pavlovian.net>
2025-10-07 02:15:41 +02:00
Lukas Tenbrink 839e0358b3 Assert that `dictionary.h` does not include `String`, and that neither of the fundamental containers include `Object`. 2025-10-06 23:03:27 +02:00
Lukas Tenbrink dc5e615a1d Remove `Array` include from `dictionary.h` and `ustring.h`. 2025-10-06 16:21:36 +02: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 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 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
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
Lukas Tenbrink 406b22d2d5 Delete `VariantGetInternalPtr` and `VariantImplicitConvert`.
Replace uses with `VariantInternalAccessor`.
2025-09-19 00:20:07 +02:00
Lukas Tenbrink f81287d765 Introduce `VariantImplicitConvert<>` template for types that can be implicitly converted to and from `Variant`.
De-duplicate a lot of `VariantGetInternalPtr`, `VariantInternalAccessor`, `VariantInitializer` and `VariantDefaultInitializer`.
2025-09-19 00:20:07 +02:00
Lukas Tenbrink 0be2a77156 Fix `Dictionary::operator[]` from C++ accidentally modifying `const` dictionaries.
Fix `AudioStreamWav` inserting keys into the input dictionary.
2025-09-18 21:17:42 +02:00
Thaddeus Crews d90d8afa5a
Merge pull request #108118 from YYF233333/varray_and_vformat
Simplify `varray`
2025-09-18 12:42:25 -05:00
Lukas Tenbrink a916325e6a Use `Span` for `String.sprintf`, to accelerate `vformat` not needing to allocate an `Array`. 2025-09-18 19:29:04 +02:00
Aaron Franke 6bc6110a90
Apply rtos_fix hack for handling 32-bit floats on all calls to rtos_fix 2025-09-17 07:05:33 -07:00
Thaddeus Crews 1a89648c61
Merge pull request #110206 from aaronp64/remove_unused_enum_bitfield_param
Remove unused parameter in `__constant_get_enum_name`/`__constant_get_bitfield_name`
2025-09-16 20:29:01 -05:00
Thaddeus Crews c39edeca6d
Merge pull request #109744 from Repiteo/core/math-constants-semantic
Core: Integrate semantic constants in math structs
2025-09-16 11:44:49 -05:00
Yufeng Ying 8f36c97a49 Optimize varray. 2025-09-16 15:01:26 +08:00
aaronp64 4c3f2be16d Avoid repeated _copy_on_write() calls in Array::resize()
Updated Array::resize() to call ptrw() once before looping to initialize typed array elements, instead of accessing each through .write[].
2025-09-15 14:03:21 -04:00
aaronp64 cfde73ac17 Remove unused parameter in __constant_get_enum_name/__constant_get_bitfield_name
Removed unused String parameter in __constant_get_enum_name() and __constant_get_bitfield_name() to avoid creating/destroying extra Strings.
2025-09-02 13:13:12 -04:00
Thaddeus Crews 84c0ec04f3
Core: Integrate semantic constants in math structs
- Excludes self-explanatory constants (ZERO, ONE, etc)
2025-08-19 10:15:08 -05:00
Mikael Hermansson 494471dda2 Fix `printraw` causing infinite recursion in `Logger._log_message` 2025-07-31 20:24:47 +02:00
George Marques 28d3214acd
Expose type validator from Dictionary and allow testing without error
- Now you can get the ContainerTypeValidate from a Dictionary (both for
  keys and for values).
- ContainerTypeValidate exposes a validator function that does not show
  any error in case of failure. This allows testing values before trying
  to use them in Dictionary.
2025-07-24 13:35:48 -03:00
Rémi Verschelde a0f9f5d90a
Merge pull request #107770 from RandomShaper/fix_res_dupe_bindings
Enhance bindings of deep resource duplication
2025-06-21 11:14:19 +02:00
Pedro J. Estébanez 7dc37bdc9c Enhance bindings of deep resource duplication 2025-06-20 18:40:41 +02:00
Rémi Verschelde 6eb6e3e6e0
Merge pull request #107457 from akien-mga/improve-error-message-call-single-argument
Improve error messages for method calls expecting only 1 argument
2025-06-12 22:49:36 +02:00
Rémi Verschelde ae484828bb
Merge pull request #107408 from Ivorforce/node-path-string-explicit
Make conversions from `NodePath` to `String` explicit.
2025-06-12 22:49:03 +02:00
Rémi Verschelde 1a64b6b5b6
Merge pull request #106913 from Ivorforce/string-resize-uninitialized
Rename `String::resize` to `resize_uninitialized`
2025-06-12 22:48:45 +02:00
OsakiTsukiko 805ad87340
Add PackedByteArray conversion to PackedVector2Array, PackedVector3Array, PackedVector4Array and PackedColorArray 2025-06-12 17:05:57 +02:00
Rémi Verschelde d1083c9722
Improve error messages for method calls expecting only 1 argument 2025-06-12 17:02:59 +02:00
Rémi Verschelde d9cd011e2f
Merge pull request #107406 from Ivorforce/ip-to-string-explicit
Core: Remove implicit conversions from `IPAddress` to `String`, to avoid accidental conversions
2025-06-12 01:15:53 +02:00
Danil Alexeev f864d0ce11
GDScript: Re-add `ord()` function 2025-06-11 21:01:13 +03:00
Lukas Tenbrink b13a0e1834 Rename `String::resize` to `resize_uninitialized`, to better communicate to callers that new characters must be initialized. 2025-06-11 18:13:02 +02:00
Lukas Tenbrink e2931a5c19 Make conversions from `NodePath` to `String` explicit. 2025-06-11 16:50:27 +02:00
Lukas Tenbrink 1498eb327f Make `IPAddress` to `String` conversion explicit. 2025-06-11 15:44:16 +02:00
Lukas Tenbrink d2f9d31270 Make more types (`Callable`, `Signal`) conversion to `String` explicit. 2025-06-10 23:55:35 +02:00
Thaddeus Crews 86415f1732
Merge pull request #99150 from dalexeev/gds-fix-callable-call-errror-text
GDScript: Fix `Callable` call error text
2025-06-09 12:31:39 -05:00
Thaddeus Crews 7d5ecc2c6f
Merge pull request #107295 from Ivorforce/explicit-math-to-string
Remove implicit conversions from math types to `String`, to avoid accidental conversions
2025-06-09 12:31:30 -05:00
Thaddeus Crews 01ef1c0eae
Merge pull request #105231 from Ivorforce/ptr-to-arg-nomacro
Convert `PtrToArg` macros to regular C++ structs.
2025-06-09 12:31:25 -05:00
Lukas Tenbrink ed836df150 Make conversions from math types to `String` explicit, to avoid accidental conversions. 2025-06-09 01:58:18 +02:00
Rémi Verschelde f759f52d8f
Merge pull request #106902 from lyuma/config_file_uids
Implement UID references in VariantParser
2025-06-09 00:44:32 +02:00
Lyuma f948ab5366 Implement uid Resource references in VariantWriter
VariantWriter now writes the uid and the path into Resource() references.
This change will affect ConfigFile, used for .import or project settings.
2025-06-08 06:11:35 -07:00
Lukas Tenbrink 78ae5919af Convert `PtrToArg` macros to regular C++ structs. 2025-06-07 22:17:06 +02:00
Zi Ye b957cf73ef Optimized and exposed Basis::scaled_local. 2025-06-05 13:06:46 -05:00
Rémi Verschelde 61639d9574
Merge pull request #106996 from Ivorforce/no-oa-hashmap
Core: Remove `OAHashMap`, in favour of `AHashMap`
2025-06-05 13:12:34 +02:00