summaryrefslogtreecommitdiff
path: root/core/variant_call.cpp
AgeCommit message (Collapse)Author
2020-03-08Refactor ScriptDebugger.Fabio Alessandrelli
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.
2020-03-04Turn Rect2's 'intersects_touch()' into an extra argument of 'intersects()'Michael Alexsander
2020-02-25Update docs and bindings for new integer vector typesRémi Verschelde
2020-02-25Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky
- 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.
2020-02-23Store arrays inside of Variant as shared.Juan Linietsky
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.
2020-02-22Add support for Vector2i, Rect2i and Vector3i to VariantJuan Linietsky
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.
2020-02-21Added StringName as a variant type.Juan Linietsky
Also changed all relevant properties defined manually to StringName.
2020-02-20Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky
objects and made them default.
2020-02-18PoolVector is gone, replaced by VectorJuan Linietsky
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
2020-02-15Changed logic and optimized ObjectID in ObjectDB and Variant, removed RefPtr.Juan Linietsky
2020-02-12Remove deprecated Color::grayHanif Bin Ariffin
It was marked to be removed in Godot 3.1. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2020-01-01Update copyright statements to 2020Rémi Verschelde
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.
2019-12-15Document that translated does not behave like rotated or scaledAaron Franke
2019-12-11Merge pull request #27792 from Giacom/fix_quatRémi Verschelde
Fixes being unable to use the Quat(Vector3) constructor
2019-11-07Merge pull request #32477 from aaronfranke/equal-approx-separateRémi Verschelde
Make is_equal_approx separate and make == exact again
2019-10-31Added empty() function to pool array typesPouleyKetchoupp
2019-10-14Expose is_equal_approx and restore == to be exact againAaron Franke
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.
2019-10-14Make is_equal_approx separate for structuresAaron Franke
This commit adds exposed behavior for C#
2019-10-11Don't use in some functions empty PoolByteArraysqarmin
2019-10-11Merge pull request #32741 from qarmin/fix_string_utf_asciiRémi Verschelde
Don't use to_utf8() and to_ascii() on empty String
2019-10-11Don't use to_utf8() and to_ascii() on empty Stringqarmin
2019-10-10Fix decompress PoolByteArray crashqarmin
2019-10-04Bind the `String::humanize_size` methodAndrii Doroshenko (Xrayez)
The method signature is also changed to use `uint64_t` instead of `size_t` for it to be Variant-compatible.
2019-09-24Merge pull request #31883 from aole/create-string-function-repeatRémi Verschelde
Create a GDScript String function repeat
2019-09-14Add array slice methodCameron Reikes
2019-09-03Create a GDScript String function repeatBhupendra Aole
Fixes #30610
2019-08-29Add transform methods for PoolVector*ArrayAndrii Doroshenko (Xrayez)
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.
2019-08-23Merge pull request #31094 from aaronfranke/vector-sign-mod-etcRémi Verschelde
Add Vector2/3 sign and posmod functions, axis, docs, misc additions
2019-08-22Revert "Feature: Add SHA256 for PoolByteArray"Rémi Verschelde
This reverts commit e2c3bbabb0a12f58585bb441d91ee8882225b0ee. This was superseded by #29871 which adds more crypto features with a dedicated interface. Since this commit was never in a stable release (merged during 3.2 dev), we revert it to avoid having to deprecate it in favor of the Crypto API. See https://github.com/godotengine/godot/pull/31187#issuecomment-523377965
2019-08-21Add hex_encode function to PoolByteArrayFabio Alessandrelli
2019-08-19Move CryptoCore to it's own folder.Fabio Alessandrelli
Crypto classes will be placed in core/crypto.
2019-08-17Add Vector2/3 sign and posmod functions, misc additionsAaron Franke
Also make the docs more consistent, add Axis enum to Vector2, add > and >=. and C# also gets % and an override for vector-vector mod.
2019-08-17Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'core/' and 'editor/'Braden Bodily
Condensed some if and ERR statements. Added dots to end of error messages Couldn't figure out EXPLAINC. These files gave me trouble: core/error_macros.h, core/io/file_access_buffered_fa.h (where is it?), core/os/memory.cpp, drivers/png/png_driver_common.cpp, drivers/xaudio2/audio_driver_xaudio2.cpp (where is it?)
2019-08-09Add Basis constants and format Transform constantsAaron Franke
2019-07-28[Mono] Deprecate Set methodsAaron Franke
These silently fail, so they should be removed. I accidentally added most of these last year, trying to make everything else consistent with Quat, sorry! Also, a few tiny nitpicking changes are included, like whitespace and misspellings.
2019-07-23Added count method to StringChaosus
2019-07-20Changed some code showed in LGTM and Coverageqarmin
2019-07-06Added release function to PoolVector::Access.Ibrahn Sahir
For clarity, assign-to-release idiom for PoolVector::Read/Write replaced with a function call. Existing uses replaced (or removed if already handled by scope)
2019-07-03Add sha1 functions to string (using new CryptoCore)Fabio Alessandrelli
2019-07-02CryptoCore class to access to base crypto utils.Fabio Alessandrelli
Godot core needs MD5/SHA256/AES/Base64 which used to be provided by separate libraries. Since we bundle mbedtls in most cases, and we can easily only include the needed sources if we so desire, let's use it. To simplify library changes in the future, and better isolate header dependencies all functions have been wrapped around inside a class in `core/math/crypto_base.h`. If the mbedtls module is disabled, we only bundle the needed source files independently of the `builtin_mbedtls` option. If the module is enabled, the `builtin_mbedtls` option works as usual. Also remove some unused headers from StreamPeerMbedTLS which were causing build issues.
2019-06-19Merge pull request #28648 from KoBeWi/substr-1Rémi Verschelde
Make second parameter of substr optional
2019-06-19Merge pull request #29598 from GodotExplorer/uri-encodeRémi Verschelde
Expose String.http_escape and String.http_unescape
2019-06-11Improved documentation of rsplit Method for String class.Zak
Improved documentation of rsplit Method for String class. Removed "divisor" (i will also change variants_call.cpp) and added "delimiter" in its place. Also moved the example at the bottom of the description.
2019-06-08Expose String.http_escape and String.http_unescapegeequlim
2019-06-01Merge pull request #27789 from Giacom/move_towardsRémi Verschelde
Added move_toward functions for float, Vector2 and Vector3
2019-05-31Fix and expose String::strip_escapes(), use it in LineEdit pasteRémi Verschelde
Supersedes #27736.
2019-05-28Added move_toward functions for float, Vector2 and Vector3Giacom
2019-05-03Make second parameter of substr optionalTomasz Chabora
2019-04-23Merge pull request #24269 from xsellier/feature/master-add-sha256Hein-Pieter van Braam
Add SHA256 for PoolByteArray
2019-04-08Add ability to edit editor feature profilesJuan Linietsky
Allows enabling/disabling parts of the editor and storing/loading profiles for that.