summaryrefslogtreecommitdiffstats
path: root/core/variant_call.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge pull request #20627 from malcolmhoward/core-dictionary-get-keyRémi Verschelde2018-11-191-0/+2
|\ | | | | #20488 core dictionary get key
| * Added Python-like .get() method to Dictionary in GDScript #20488m2018-11-191-0/+2
| | | | | | | | Added .get() method to Dictionary class in GDScript to return the value if the key exists, or return Null if the key does not exist.
* | Always initialize VariantCall return_type.Fabio Alessandrelli2018-11-171-2/+0
|/ | | | | | | | The return_type is used by the GDScript parser (and possibly other scripting languages), so it MUST be initialized at least. It could be initialized to Variant::NIL in release, but I see no reason for not setting the actual value. See similar issue in 95dfa5b .
* add ONE constants to Vector2 and Vector3Kelly Thomas2018-10-071-0/+2
|
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-5/+5
| | | | | | This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
* Added max() and min() functions to array to return greater or lesser element ↵Juan Linietsky2018-08-231-0/+4
| | | | (or null if data is not of compatible type or empty array). Closes #15697
* Merge pull request #21253 from aaronfranke/plane-constantsRémi Verschelde2018-08-211-3/+3
|\ | | | | Rename Plane constants, add to Mono
| * Rename Plane constants, add to MonoAaron Franke2018-08-211-3/+3
| | | | | | But I'm not tagging PR as [Core] or [Mono] due to it being a minor change anyway.
* | Remove circle/diamond and NodePath String constantsRémi Verschelde2018-08-211-12/+0
|/ | | | | | | | | They were introduced in #14704 but need more discussion IMO, they don't strike me as core features that would have to be registered in Variant directly. Moreover, they currently break the documentation XML as string constants end up encoded as e.g. `value=""..""`.
* add project method to Vector2/3Thomas Herzog2018-08-161-0/+4
|
* Merge pull request #20945 from neikeq/dict-erase-retboolRémi Verschelde2018-08-151-1/+1
|\ | | | | Dictionary: remove erase_checked(key), make erase(key) return bool
| * Dictionary: remove erase_checked(key), make erase(key) return boolIgnacio Etcheverry2018-08-141-1/+1
| |
* | Fix int(String) != int(int) conversionChaosus2018-08-141-1/+1
| |
* | Allow some non-integer built-in constants in gdscriptBernhard Liebl2018-07-311-5/+77
|/
* Merge pull request #18282 from aaronfranke/better-mathfRémi Verschelde2018-07-261-2/+10
|\ | | | | [Core] [Mono] Fix Color missing int export methods, added 64-bit
| * Expose 64-bit Color methods to GDScript and fix/update Color XML docAaron Franke2018-07-251-2/+10
| |
* | Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam2018-07-261-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | This commit makes operator[] on Vector const and adds a write proxy to it. From now on writes to Vectors need to happen through the .write proxy. So for instance: Vector<int> vec; vec.push_back(10); std::cout << vec[0] << std::endl; vec.write[0] = 20; Failing to use the .write proxy will cause a compilation error. In addition COWable datatypes can now embed a CowData pointer to their data. This means that String, CharString, and VMap no longer use or derive from Vector. _ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug builds. This is a lot faster for Vector in the editor and while running tests. The reason why this difference used to exist is because force-inlined methods used to give a bad debugging experience. After extensive testing with modern compilers this is no longer the case.
* Sync classref with current sourceRémi Verschelde2018-05-281-0/+2
| | | | Also fix binding of Basis.slerp
* Merge pull request #14715 from Krakean/string_add_rsplit2Max Hilbrunner2018-05-231-0/+2
|\ | | | | Added rsplit() method to String class
| * Added rsplit() for String classDmitry Koteroff2017-12-151-0/+2
| | | | | | | | Docs updated
* | Add SLERP to Vector{2,3}, optimize Quat's Vector3 rotation.tagcup2018-05-121-1/+17
| | | | | | | | Also even out Basis and Quat APIs a little.
* | Vector3::round, Vector2::round & Vector2::ceil methods were added.Alexander Alekseev2018-05-041-0/+6
| | | | | | | | | | Now both structs (Vector2 & Vector3) have round, floor & ceil methods. (see #18603)
* | Merge pull request #16649 from ibrahn/visual-script-release-crashRémi Verschelde2018-05-011-1/+1
|\ \ | | | | | | fix for segfault when using CallBasic in visual script on release build
| * | fix for segfault when using CallBasic in visual script on release buildIbrahn Sahir2018-02-121-1/+1
| | |
* | | add string trim_prefix trim_suffix lstrip and rstrip methodsbosak2018-04-171-0/+8
| | |
* | | Duplicate Arrays and Dictionaries when instancing scene in editorBojidar Marinov2018-03-131-4/+4
| | | | | | | | | | | | | | | | | | Also, add deep (=false) parameter to Array.duplicate and Dictionary.duplicate Fixes #13971
* | | Bring back Vector2.cross()Bernhard Liebl2018-03-071-2/+2
| | |
* | | Merge pull request #15563 from poke1024/gdscript-shuffleRémi Verschelde2018-02-191-0/+2
|\ \ \ | | | | | | | | Add shuffle() method to Array
| * | | Add shuffle() method to Arraypoke10242018-01-101-0/+2
| | | |
* | | | Merge pull request #15852 from poke1024/color_hsvRémi Verschelde2018-02-191-0/+2
|\ \ \ \ | |_|/ / |/| | | Add Color.from_hsv()
| * | | Add Color.from_hsv()Bernhard Liebl2018-01-181-0/+2
| |/ /
* | | Fix broken variant call of Vector3.snappedTimur Celik2018-02-031-1/+1
| | |
* | | Fix wrong return type of xform functionsPoommetee Ketson2018-01-301-4/+4
|/ /
* | Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | | | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* | Merge pull request #15220 from ibrahn/variantcall-defargs-fixRémi Verschelde2018-01-031-2/+3
|\ \ | | | | | | fix VariantCall default parameter ordering
| * | fix VariantCall default parameter orderingIbrahn Sahir2017-12-311-2/+3
| | |
* | | Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
|/ / | | | | | | Happy new year to the wonderful Godot community!
* / Dictionary::copy -> ::duplicateWill Nations2017-12-171-0/+2
|/
* Added third argument for String.split() function (see issue #14349)Dmitry Koteroff2017-12-151-2/+2
| | | | | | | | Remove negative limit, leave only positive and make it reflect behaviour like in Python Also limit renamed to maxsplit to match Python one. Also docs updated. Fix indent
* Merge pull request #13347 from Noshyaar/hang_in_thereRémi Verschelde2017-12-091-0/+2
|\ | | | | Rect2: add function returning same rect with positive w and h
| * Rect2: add function returning same rect with positive w and hPoommetee Ketson2017-11-281-0/+2
| |
* | Style: Apply new clang-format 5.0 style to all filesRémi Verschelde2017-12-071-3/+3
|/
* Made Vector::ptrw explicit for writing, compiler was sometimes using the ↵Juan Linietsky2017-11-251-1/+1
| | | | | | wrong function, leading to unnecesary copy on writes and reduced performance.
* Make tween able to be used as before (without the need for ":...")Bojidar Marinov2017-11-221-0/+2
| | | | Fixes #13174
* Merge pull request #12371 from donkeybonks/color-lighten-darkenRémi Verschelde2017-11-221-0/+4
|\ | | | | Add Color.lighten and Color.darken (like LESS.css or SASS) #2
| * Add Color.lightened and Color.darkened (like LESS.css or SASS)Kyle Van Berendonck2017-11-211-0/+4
| |
* | Merge pull request #13151 from akien-mga/basis-vector3-constructorRémi Verschelde2017-11-221-6/+0
|\ \ | | | | | | Properly implement Basis constructor using Vector3 of Euler angles
| * | Properly implement Basis constructor using Vector3 of Euler anglesRémi Verschelde2017-11-211-6/+0
| | | | | | | | | | | | Fixes #13104.
* | | Merge pull request #12284 from bojidar-bg/allow-subproperty-setRémi Verschelde2017-11-211-2/+2
|\ \ \ | |/ / |/| | Allow for getting/setting "dotted" properties of objects
| * | Allow for getting/setting indexed properties of objects using get/set_indexedBojidar Marinov2017-11-211-2/+2
| | | | | | | | | | | | Performance is around the same as using pure set() through GDScript.