summaryrefslogtreecommitdiff
path: root/core/variant
AgeCommit message (Collapse)Author
2021-08-17Fixes to tests for Variant and Geometry3DAaron Franke
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
2021-07-01Add Callable.is_valid() analogous to FuncRef.is_valid() from 3.xLyuma
2021-06-25Implement native extension systemreduz
* Deprecates GDNative in favor of a simpler, lower level interface. * New extension system allows registering core engine classes. * Simple header interface in gdnative_interace.h
2021-06-20Move many input enums to their own fileAaron Franke
2021-06-19Rename `instance()`->`instantiate()` when it's a verbLightning_A
2021-06-19Merge pull request #44806 from madmiraal/consolidate_jsonRémi Verschelde
Consolidate JSON, JSONParseResults and JSONParser into JSON
2021-06-19Consolidate JSON, JSONParseResults and JSONParser into JSONMarcel Admiraal
Renames JSON.parse_string() to parse() Renames JSON.decode_data() to stringify()
2021-06-19Merge pull request #49287 from reduz/expose-variant-internal-bindersRémi Verschelde
Make some Variant internal functions public.
2021-06-18Merge pull request #49659 from LightningAA/string-valid-integer-to-intRémi Verschelde
2021-06-18Merge pull request #44156 from aaronfranke/quat-angle-toRémi Verschelde
Add Quaternion angle_to method
2021-06-18Merge pull request #49638 from aaronfranke/multiply-transformsRémi Verschelde
Allow multiplying Transforms and Basis by numbers
2021-06-17Add Quaternion angle_to methodAaron Franke
2021-06-18Better format arguments in variant parserMichael Alexsander Silva Dias
2021-06-17Make some variant internal functions public.reduz
-Make constructors, ops and setget inline functions public -Should help optimizing the GDScript VM
2021-06-16Rename `is_valid_integer()` to `is_valid_int()`Lightning_A
Method from `String`
2021-06-15Allow multiplying Transforms and Basis by numbersAaron Franke
2021-06-14Fix json dump and print of circular structureHaoyu Qiu
2021-06-13Merge pull request #34668 from aaronfranke/to-stringRémi Verschelde
[Core] Reformat structure string operators
2021-06-12VariantParser: Fix reading StringNames with '&'.Rémi Verschelde
Keep support for '@' for now for compatibility. Fixes #49535. Fixes #49542.
2021-06-11Rename Reference to RefCountedPedro J. Estébanez
2021-06-11Reformat structure string operatorsAaron Franke
The order of numbers is not changed except for Transform2D. All logic is done inside of their structures (and not in Variant). For the number of decimals printed, they now use String::num_real which works best with real_t, except for Color which is fixed at 4 decimals (this is a reliable number of float digits when converting from 16-bpc so it seems like a good choice)
2021-06-11Merge pull request #49511 from akien-mga/core-diraccess-fileaccess-ioRémi Verschelde
Core: Move DirAccess and FileAccess to `core/io`