summaryrefslogtreecommitdiffstats
path: root/modules/visual_script/visual_script_builtin_funcs.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove `RES` and `REF` typedefs in favor of spelled out `Ref<>`Hugo Locurcio2022-05-031-1/+1
| | | | | | These typedefs don't save much typing compared to the full `Ref<Resource>` and `Ref<RefCounted>`, yet they sometimes introduce confusion among new contributors.
* Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`Rémi Verschelde2022-05-021-2/+2
| | | | | | | | | | | Didn't commit all the changes where it wants to initialize a struct with `{}`. Should be reviewed in a separate PR. Option `IgnoreArrays` enabled for now to be conservative, can be disabled to see if it proposes more useful changes. Also fixed manually a handful of other missing initializations / moved some from constructors.
* Fix some issues found by cppcheck.bruvzg2022-04-061-2/+2
|
* Implement cubic_interpolate() as MathFunc for refactoringSilc 'Tokage' Renew2022-02-121-0/+26
|
* Rename Variant::is_ref() to is_ref_counted()Pedro J. Estébanez2022-01-201-1/+1
|
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Fix `randfn` in visual scriptsYuri Roubinsky2021-11-171-2/+7
|
* Expose `randfn` to global scopeYuri Roubinsky2021-11-171-7/+19
|
* reimplement ping-pongSilc 'Tokage' Renew2021-11-031-0/+17
|
* Revert "Implement reverse playback and ping-pong loop in AnimationPlayer and ↵Juan Linietsky2021-10-111-17/+0
| | | | NodeAnimation"
* implement ping-pong loop in animationTokage2021-10-091-0/+17
| | | | Co-authored-by: Chaosus <chaosus89@gmail.com>
* Add `print_verbose()` built-in function to print in verbose mode onlyHugo Locurcio2021-09-211-1/+14
| | | | | | | | | | This can be used as a shorthand for: if OS.is_stdout_verbose(): print("...") Unlike `print_debug()`, this works in release builds too and can be toggled off in debug builds.
* Remove cartesian2polar and polar2cartesiankobewi2021-08-311-40/+0
|
* Remove obsolete "dectime" methodAaron Franke2021-07-301-23/+0
| | | | Replaced by "move_toward"
* Rename `instance()`->`instantiate()` when it's a verbLightning_A2021-06-191-1/+1
|
* Rename Reference to RefCountedPedro J. Estébanez2021-06-111-1/+1
|
* The built in function math/seed was missing the sequenceport.David Cambré2021-05-221-0/+1
|
* Re-bind posmod, use int64_t instead of intRémi Verschelde2021-05-041-1/+1
| | | | | | | Fixes #48420, fixes #48421. The binding was missed when moving GDScript built-in to Global Scope it seems. Co-authored-by: kleonc <9283098+kleonc@users.noreply.github.com>
* Removed _change_notifyreduz2021-02-101-1/+1
| | | | | | -For inspector refresh, the inspector now detects if a property change by polling a few times per second and then does update the control if so. This process is very cheap. -For property list refresh, a new signal (property_list_changed) was added to Object. _change_notify() is replaced by notify_property_list_changed() -Changed all objects using the old method to the signal, or just deleted the calls to _change_notify(<property>) since they are unnecesary now.
* Replace ColorN and from HTML with a string constructorAaron Franke2021-02-011-23/+0
|
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* Rename Math::stepify to snappedMarcel Admiraal2020-12-281-8/+8
|
* Remove empty lines around braces with the formatting scriptAaron Franke2020-11-161-1/+0
|
* Refactored variant constructor logicreduz2020-11-091-1/+1
|
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-43/+3
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Exposed randi_range to global funcs + renamed rand_range to randf_rangeYuri Roubinsky2020-11-061-13/+32
|
* [Complex Test Layouts] Change `String` to use UTF-32 encoding on all platforms.bruvzg2020-09-031-1/+1
|
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-55/+80
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-119/+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.
* Change MATH_POSMOD return type back to INTNico Mitchell2020-04-141-1/+3
|
* Change round return type to floatNico Mitchell2020-04-131-1/+1
|
* Replace NULL with nullptrlupoDharkael2020-04-021-2/+2
|
* Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky2020-02-251-51/+51
| | | | | | | | | | | | | | | | | | | | | - 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.
* Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky2020-02-201-23/+23
| | | | objects and made them default.
* PoolVector is gone, replaced by VectorJuan Linietsky2020-02-181-11/+11
| | | | | Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
* Remove deprecated decimals builtinRémi Verschelde2020-02-121-7/+7
| | | | Replaced by 'step_decimals' in 3.2 via #21425.
* 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.
* Implemented `ord` function in VisualScript64epicks2019-09-031-0/+32
|
* doc: Sync classref with current sourceRémi Verschelde2019-07-221-1/+1
|
* Added lerp_angles built-in functionChaosus2019-07-201-9/+15
| | | | | Co-authored-by: Xrayez <https://github.com/Xrayez> Co-authored-by: DleanJeans <https://github.com/DleanJeans>
* Add integer posmod and rename default arg namesAaron Franke2019-07-181-89/+42
| | | | | "posmod" is the integer version of "fposmod". We do not need a "mod" because of the % operator. I changed the default arg names from "x" and "y" to "a" and "b" because they are not coordinates. I also changed pow's arg names to "base" and "exp". Also, I reorganized the code in the VS built-in funcs switch statement.
* Added move_toward functions for float, Vector2 and Vector3Giacom2019-05-281-0/+20
|
* Style: Apply new changes from clang-format 8.0Rémi Verschelde2019-04-091-1/+2
| | | | | | It seems to stay compatible with formatting done by clang-format 6.0 and 7.0, so contributors can keep using those versions for now (they will not undo those changes).
* Merge pull request #27231 from Chaosus/smoothstepRémi Verschelde2019-04-081-0/+19
|\ | | | | Added smoothstep built-in function
| * Added smoothstep built-in functionChaosus2019-04-071-0/+19
| |
* | Add object encoding param to serialization methodsFabio Alessandrelli2019-04-011-10/+33
|/ | | | | | | | | Network peers get_var/put_var File get_var/store_var GDScript/Mono/VisualScript bytes2var/var2bytes Add MultiplayerAPI.allow_object_decoding member which deprecates PacketPeer.allow_object_decoding. Break ABI compatibaility (API compatibility for GDNative).
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Fixed argument names being swapped for atan2DualMatrix2018-09-161-1/+6
| | | | The arguments of atan2() should be y,x instead of x,y This was just wrong since the internal atan2 already had y,x as parameters, so if you followed the autocomplete the result would just be wrong.
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-7/+7
| | | | | | 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.