summaryrefslogtreecommitdiffstats
path: root/core/variant_call.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix Vector3i and Vector2i AXIS_* constantsVivraan2020-08-051-5/+5
|
* Make all String float conversion methods be 64-bitAaron Franke2020-07-271-1/+1
|
* Update core documentation to match recent C# changesAaron Franke2020-07-211-2/+2
| | | | | | Also a few minor API changes like adding AABB.abs() Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* Add sort and has methods to PackedArraysAaron Franke2020-07-061-0/+36
|
* Remove String::find_last (same as rfind)Stijn Hinlopen2020-07-031-2/+0
|
* - Added more euler rotation orders support.Andrea Catania2020-06-121-0/+12
| | | | | | | | - Fixed floating point issue on the old one. - Fixed the equation on the get_euler_yxz function. - Added unit tests. This work has been kindly sponsored by IMVU.
* Fix docs generation for Vector2i/Vector3i/Rect2iYuri Roubinsky2020-06-031-0/+6
|
* Docs: Fix order of variant constants.bruvzg2020-05-201-0/+11
|
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-36/+69
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-78/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Merge pull request #38548 from kuruk-mm/add_string_join_to_gdscriptRémi Verschelde2020-05-101-0/+2
|\ | | | | GDScript: Add join method on String
| * GDScript: Add join method on StringMateo Kuruk Miccino2020-05-091-0/+2
| | | | | | | | Docs: Add join on String.xml
* | Style: clang-format: Disable AllowShortCaseLabelsOnASingleLineRémi Verschelde2020-05-101-62/+140
| | | | | | | | Part of #33027.
* | Merge pull request #36379 from aaronfranke/color-constructorsRémi Verschelde2020-05-071-0/+7
|\ \ | | | | | | Add a Color constructor for Color with alpha
| * | Color with alpha constructorAaron Franke2020-04-291-0/+7
| |/
* / Fix: can't convert Transform -> Transform2DThakee Nathees2020-05-071-0/+2
|/ | | | Fix: #38528
* [Core] Rename linear_interpolate to lerpAaron Franke2020-04-291-6/+6
|
* Print errors when passing an invalid type to xformAaron Franke2020-04-281-26/+18
|
* Replace NULL with nullptrlupoDharkael2020-04-021-4/+4
|
* Make dict erase node sequenced godotengine#37477Zak Grumbles2020-04-011-1/+1
| | | | * Updated macro call to make the visual Dictionary Erase node sequenced.
* Merge pull request #36896 from kuruk-mm/doc_return_variant_2Rémi Verschelde2020-03-161-1/+4
|\ | | | | Doctool and core: Fix return type in docs for some Variant methods...
| * Doctool and core: Fix return type in docs for some Variant methods assigning ↵Mateo Miccino2020-03-091-1/+4
| | | | | | | | PROPERTY_USAGE_NIL_IS_VARIANT to MethodInfo usage when we have something to return
* | Refactor ScriptDebugger.Fabio Alessandrelli2020-03-081-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | EngineDebugger is the new interface to access the debugger. It tries to be as agnostic as possible on the data that various subsystems can expose. It allows 2 types of interactions: - Profilers: A subsystem can register a profiler, assigning it a unique name. That name can be used to activate the profiler or add data to it. The registered profiler can be composed of up to 3 functions: - Toggle: called when the profiler is activated/deactivated. - Add: called whenever data is added to the debugger (via `EngineDebugger::profiler_add_frame_data`) - Tick: called every frame (during idle), receives frame times. - Captures: (Only relevant in remote debugger for now) A subsystem can register a capture, assigning it a unique name. When receiving a message, the remote debugger will check if it starts with `[prefix]:` and call the associated capture with name `prefix`. Port MultiplayerAPI, Servers, Scripts, Visual, Performance to the new profiler system. Port SceneDebugger and RemoteDebugger to the new capture system. The LocalDebugger also uses the new profiler system for scripts profiling.
* Turn Rect2's 'intersects_touch()' into an extra argument of 'intersects()'Michael Alexsander2020-03-041-2/+2
|
* Update docs and bindings for new integer vector typesRémi Verschelde2020-02-251-11/+11
|
* Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky2020-02-251-127/+177
| | | | | | | | | | | | | | | | | | | | | - Renames PackedIntArray to PackedInt32Array. - Renames PackedFloatArray to PackedFloat32Array. - Adds PackedInt64Array and PackedFloat64Array. - Renames Variant::REAL to Variant::FLOAT for consistency. Packed arrays are for storing large amount of data and creating stuff like meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of memory. That said, many users requested the ability to have 64 bits packed arrays for their games, so this is just an optional added type. For Variant, the float datatype is always 64 bits, and exposed as `float`. We still have `real_t` which is the datatype that can change from 32 to 64 bits depending on a compile flag (not entirely working right now, but that's the idea). It affects math related datatypes and code only. Neither Variant nor PackedArray make use of real_t, which is only intended for math precision, so the term is removed from there to keep only float.
* Store arrays inside of Variant as shared.Juan Linietsky2020-02-231-84/+109
| | | | | | | | | | | | | Arrays inside of Variant are unique and use reference counting. When you assign a variant containing a packed array to another, or when you call non const functions to arrays, this will work even if the array is inside a dictionary, so they will from now pass as reference. The difference with regular variant arrays is that, once passed to a function in the C++ API, they are no longer shared. This is required for security and thread safety, as those arrays are mainly used to pass data back and forth even between threads.
* Add support for Vector2i, Rect2i and Vector3i to VariantJuan Linietsky2020-02-221-0/+95
| | | | | | | WARNING: Requires C++17 'guaranteed copy elision' to fix ambiguous operator problems in Variant. This was added for this commit (and future C++17 uses) in #36457.
* Added StringName as a variant type.Juan Linietsky2020-02-211-4/+10
| | | | Also changed all relevant properties defined manually to StringName.
* Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky2020-02-201-23/+124
| | | | objects and made them default.
* PoolVector is gone, replaced by VectorJuan Linietsky2020-02-181-227/+223
| | | | | Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
* Changed logic and optimized ObjectID in ObjectDB and Variant, removed RefPtr.Juan Linietsky2020-02-151-16/+6
|
* Remove deprecated Color::grayHanif Bin Ariffin2020-02-121-2/+0
| | | | | | It was marked to be removed in Godot 3.1. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
* Document that translated does not behave like rotated or scaledAaron Franke2019-12-151-1/+1
|
* Merge pull request #27792 from Giacom/fix_quatRémi Verschelde2019-12-111-25/+24
|\ | | | | Fixes being unable to use the Quat(Vector3) constructor
| * Fixes being unable to use the Quat(Vector3) constructorGiacom2019-04-081-25/+24
| | | | | | | | | | | | | | | | | | The Quat(Vector3) constructor, to initialise a Quat by a euler angle, was impossible because Variant::construct would only check for constructors with greater than 1 arguments. I changed it to greater than or equal to 1 and moved it to the bottom of the priority list so it did not overshadow the other checks that checked for arguments equal to 1 for simple copy constructors.
* | Merge pull request #32477 from aaronfranke/equal-approx-separateRémi Verschelde2019-11-071-35/+53
|\ \ | | | | | | Make is_equal_approx separate and make == exact again
| * | Expose is_equal_approx and restore == to be exact againAaron Franke2019-10-141-34/+52
| | | | | | | | | | | | | | | | | | This commit changes behavior for GDScript and C#. Also did some organizing of the order to logically group related methods, mostly for Rect2 and AABB.
| * | Make is_equal_approx separate for structuresAaron Franke2019-10-141-1/+1
| | | | | | | | | | | | This commit adds exposed behavior for C#
* | | Added empty() function to pool array typesPouleyKetchoupp2019-10-311-0/+14
|/ /
* | Don't use in some functions empty PoolByteArraysqarmin2019-10-111-8/+13
| |
* | Merge pull request #32741 from qarmin/fix_string_utf_asciiRémi Verschelde2019-10-111-0/+8
|\ \ | | | | | | Don't use to_utf8() and to_ascii() on empty String
| * | Don't use to_utf8() and to_ascii() on empty Stringqarmin2019-10-111-0/+8
| | |
* | | Fix decompress PoolByteArray crashqarmin2019-10-101-2/+2
|/ /
* | Bind the `String::humanize_size` methodAndrii Doroshenko (Xrayez)2019-10-041-0/+2
| | | | | | | | | | The method signature is also changed to use `uint64_t` instead of `size_t` for it to be Variant-compatible.
* | Merge pull request #31883 from aole/create-string-function-repeatRémi Verschelde2019-09-241-0/+2
|\ \ | | | | | | Create a GDScript String function repeat
| * | Create a GDScript String function repeatBhupendra Aole2019-09-031-0/+2
| | | | | | | | | | | | Fixes #30610
* | | Add array slice methodCameron Reikes2019-09-141-0/+2
| | |
* | | Add transform methods for PoolVector*ArrayAndrii Doroshenko (Xrayez)2019-08-291-0/+4
|/ / | | | | | | | | | | Similarly to `Vector2` and `Rect2` transforms in 2D and Vector3, Plane, and AABB in 3D. PoolVector2Array and PoolVector3Array were the only missing Variant types in both Transform2D and Transform respectively.