Age | Commit message (Collapse) | Author |
|
Remove cartesian2polar and polar2cartesian
|
|
Add Vector2.from_angle() method
|
|
|
|
|
|
|
|
Array::insert consistent with Pool*Array::insert
|
|
Fix crash when dividing by 0 in Vector2/3i
|
|
Correct null and boolean values being capitalised by the str command
|
|
Negative indices are supported to pop an element relative from the end.
|
|
|
|
Expose `String.simplify_path`
|
|
|
|
* Exposed as utility functions.
* Not very useful for script, but vital for creating servers using native extensions.
|
|
* Allows calling into native extensions directly with a pointer
* Makes it easier to implement some APIs more efficiently
* Appears with a "*" in the documentation for the argument.
* Implementing the pointer handling is entirely up to the implementation, although the extension API provides some hint.
* AudioStream has been implemented as an example, allowing to create NativeExtension based AudioStreams.
|
|
* New syntax is type safe.
* New syntax allows for type safe virtuals in native extensions.
* New syntax permits extremely fast calling.
Note: Everything was replaced where possible except for `_gui_input` `_input` and `_unhandled_input`.
These will require API rework on a separate PR as they work different than the rest of the functions.
Added a new method flag METHOD_FLAG_OBJECT_CORE, used internally. Allows to not dump the core virtuals like `_notification` to the json API, since each language will implement those as it is best fits.
|
|
Fix initialization of objects in VariantInternal
|
|
|
|
|
|
|
|
Thanks to neikeq for the initial work.
Co-authored-by: Ignacio Roldán Etcheverry <neikeq@users.noreply.github.com>
|
|
|
|
Error handling functions for GdScript
|
|
|
|
|
|
Move code for looking_at to Basis
|
|
|
|
- Fix library loading and initialization.
- Add extra methods/parameters in the interface needed by extenstions.
- Add Variant destructors and functions for extracting values and
creating Variants from values.
|
|
They have the wrong type and cause issues with extensions.
|
|
|
|
Remove obsolete `dectime` method
|
|
Replaced by "move_toward"
|
|
They could cause a segfault when parsing values with ID "Resource"
as apparently we never set a valid `func` for it.
Fixes crash part of #42115.
|
|
Variants like dictionaries and arrays can have cyclic references, which
caused `encode_variant` to run an infinite recursion.
Instead of keeping a stack and looking for cyclic references which would
make serialization slower, this commit adds a `MAX_RECURSION_DEPTH`
constant to Variant, and have `encode_variant` keep track of the current
recursion depth, bailing when it's too high since this likely means a
cyclic reference has been encountered.
|
|
Change Variant bool conversion to uint8_t
|
|
This ensures more portable conversion since not every path assume bool
is 32-bits and there's no loss converting to 8-bits anyway.
|
|
This should fix various issues where retrieving enum values from
scripting languages would result in corrupted values (where 32 bits
were valid, and the other 32 random data).
|
|
|
|
|
|
Found via `codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,fave,findn,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint`
|
|
Change in PackedByteArray decode api and docs
|
|
Documentation for new PackedByteArray::to_***_array methods
Documentation for to_byte_array method for PackedInt32/Int64/Float32/Float64Array
|
|
|
|
The `Math_INF` and `Math_NAN` defines were just aliases for those
constants, so we might as well use them directly.
Some portions of the code were already using `INFINITY` directly.
|
|
Increase the number of arguments accepted by UndoRedo methods
|
|
Fix 'in' operator to check if an object member exists
|
|
|
|
|
|
* Lua table syntax uses named indexing: `{ mykey = myvalue }`
* Python style syntax uses string indexing: `{ "mykey" : myvalue }`
* Both are incompatible since a StringName key wont fetch a String key, hence confusing.
* This PR proposes always using String for indexing at a very minimal performance cost. Always indexing with StringNames will be faster, but they are considerably more expensive to create.
|
|
|
|
|