summaryrefslogtreecommitdiff
path: root/core/variant
AgeCommit message (Collapse)Author
2021-09-07Implement properties arrays in the Inspector.Gilles Roudière
2021-09-01Merge pull request #52270 from KoBeWi/goodbye_polarGeorge Marques
Remove cartesian2polar and polar2cartesian
2021-09-01Merge pull request #48237 from KoBeWi/they_came_from_angleGeorge Marques
Add Vector2.from_angle() method
2021-08-31Add Vector2.from_angle() methodkobewi
2021-08-31Remove cartesian2polar and polar2cartesiankobewi
2021-08-29Rename String::is_rel_path to String::is_relative_pathWilson E. Alvarez
2021-08-28Merge pull request #47406 from mashumafi/master-Array-insert-rcMax Hilbrunner
Array::insert consistent with Pool*Array::insert
2021-08-28Merge pull request #43522 from qarmin/divide_by_zero_in_vectoriMax Hilbrunner
Fix crash when dividing by 0 in Vector2/3i
2021-08-27Merge pull request #52090 from balloonpopper/bug52060Max Hilbrunner
Correct null and boolean values being capitalised by the str command
2021-08-27Add an `Array.pop_at()` method to pop an element at an arbitrary indexHugo Locurcio
Negative indices are supported to pop an element relative from the end.
2021-08-26Correct null and boolean values being capitalised by the str commandBalloonpopper
2021-08-24Merge pull request #52041 from Rubonnek/expose-simplify-pathMax Hilbrunner
Expose `String.simplify_path`
2021-08-24Expose String.simplify_pathWilson E. Alvarez
2021-08-23Expose RID creation utilities.reduz
* Exposed as utility functions. * Not very useful for script, but vital for creating servers using native extensions.
2021-08-23Implement NativeExtension pointer argumentsreduz
* 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.
2021-08-22Replace BIND_VMETHOD by new GDVIRTUAL syntaxreduz
* 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.
2021-08-20Merge pull request #51902 from vnen/variant-internal-constructorRémi Verschelde
Fix initialization of objects in VariantInternal
2021-08-19Fix initialization of objects in VariantInternalGeorge Marques
2021-08-18Merge pull request #51627 from mhilbrunner/todo-for-neikeqRémi Verschelde
2021-08-17Fixes to tests for Variant and Geometry3DAaron Franke
2021-08-17Namespaces instead of underscore prefix for bindsMax Hilbrunner
Thanks to neikeq for the initial work. Co-authored-by: Ignacio Roldán Etcheverry <neikeq@users.noreply.github.com>
2021-08-15Fix crash when dividing by 0 in Vector2/3iRafał Mikrut
2021-08-11Merge pull request #38992 from Dragoncraft89/masterRémi Verschelde
Error handling functions for GdScript
2021-08-10Use Key enum instead of plain integersAaron Franke
2021-08-10Merge pull request #51017 from vnen/extension-fixesRémi Verschelde
2021-08-10Merge pull request #50682 from aaronfranke/basis-looking-atRémi Verschelde
Move code for looking_at to Basis
2021-08-08[Text Server] Improve object (image/table) inline alignment.bruvzg
2021-08-05Improve extension systemGeorge Marques
- 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.
2021-08-05Fix a few default parameters in bindingsGeorge Marques
They have the wrong type and cause issues with extensions.
2021-08-01Move code for looking_at to BasisAaron Franke
2021-07-31Merge pull request #51084 from aaronfranke/no-dectimeRémi Verschelde
Remove obsolete `dectime` method
2021-07-30Remove obsolete "dectime" methodAaron Franke
Replaced by "move_toward"
2021-07-30VariantParser: Fix uninitialized ResourceParser funcsRémi Verschelde
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.
2021-07-30[Net] Fix Marshalls infinite recursion crash.Fabio Alessandrelli
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.
2021-07-27Merge pull request #50939 from vnen/fix-variant-bool-conversionRémi Verschelde
Change Variant bool conversion to uint8_t
2021-07-27Change Variant bool conversion to uint8_tGeorge Marques
This ensures more portable conversion since not every path assume bool is 32-bits and there's no loss converting to 8-bits anyway.
2021-07-27[Core] Make enum variant cast and encoding 64 bitsFabio Alessandrelli
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).
2021-07-25Merge pull request #50809 from akien-mga/iterators-const-referencesRémi Verschelde
2021-07-25Use const references where possible for List range iteratorsRémi Verschelde
2021-07-25Fix various typos with codespellluz paz
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`
2021-07-24Merge pull request #50535 from ChristopheClaustre/packedbytearray_decode_apiRémi Verschelde
Change in PackedByteArray decode api and docs
2021-07-24New to_***_array method to decode PackedByteArray to Packed***ArrayChristopheClaustre
Documentation for new PackedByteArray::to_***_array methods Documentation for to_byte_array method for PackedInt32/Int64/Float32/Float64Array
2021-07-23Use C++ iterators for Lists in many situationsAaron Franke
2021-07-21Use the standard C `INFINITY` and `NAN` constants directlyHugo Locurcio
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.
2021-07-20Merge pull request #50206 from groud/undoredo_increase_args_countRémi Verschelde
Increase the number of arguments accepted by UndoRedo methods
2021-07-13Merge pull request #50056 from Blackiris/fix-in-operatorGeorge Marques
Fix 'in' operator to check if an object member exists
2021-07-06Increase the number of arguments accepted by UndoRedo methodsGilles Roudière
2021-07-05Fix Variant tags parsing.bruvzg
2021-07-01Force String as Dictionary key instead of StringNamereduz
* 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.
2021-07-01Fix 'in' operator to check if an object member existsJulien Nguyen