summaryrefslogtreecommitdiffstats
path: root/modules/visual_script/visual_script_builtin_funcs.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Make some debug prints verbose-only, remove othersRémi Verschelde2018-08-241-4/+1
|
* Move things into the title bars of Visual Script nodes.Pieter-Jan Briers2018-04-301-1/+3
| | | | | | This is an attempt to make VS slightly nicer to use. WiP.
* Fixes for parameter names of builtin functions in visual scripts/coreChaosus2018-01-161-8/+8
|
* 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.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Add cartesian to polar conversion functionspablotato2017-11-201-0/+38
|
* Add print_error function, akin to print_lineGeorge Marques2017-11-161-1/+1
|
* Merge pull request #12035 from Chaosus/wrapfuncRémi Verschelde2017-10-311-0/+40
|\ | | | | Added new Wrap functions for numbers
| * Added new wrap functionsChaosus2017-10-131-0/+40
| |
* | Merge pull request #12097 from rcurtis/issue12065Rémi Verschelde2017-10-201-3/+6
|\ \ | | | | | | Visualscript: Fixes untouched value is null instead of 0
| * | Fixed issue that improperly initialized visual node properties to NilRCurtis2017-10-141-3/+6
| |/
* / VisualScript: add inverse_lerp & range_lerpPoommetee Ketson2017-10-131-1/+47
|/
* Fix enums bindingsMaxim Sheronov2017-09-131-0/+59
| | | | | Add missed bindings for enums Move some enums to class to have correct output of api.json
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* Add closest_power_of_2 func and implement mix_rate/latency on OS XMarcelo Fernandez2017-08-171-1/+1
|
* Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-081-0/+1
|
* A Whole New World (clang-format edition)Rémi Verschelde2017-03-051-374/+339
| | | | | | | | | | | | | | | | | | | | | | | | I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
* Add a bunch of missing Godot headers in own filesRémi Verschelde2017-03-051-0/+29
|
* Added missing FIXMEs in PR #7878Ferenc Arn2017-03-021-1/+1
|
* Various fixes detected using PVS-Studio static analyzer.Thaer Razeq2017-02-281-1/+1
| | | | | | | - Add FIXME tags comments to some unfixed potential bugs - Remove some checks (always false: unsigned never < 0) - Fix some if statements based on reviews. - Bunch of missing `else` statements
* Rename the _MD macro to D_METHODHein-Pieter van Braam2017-02-131-2/+2
| | | | | | This new name also makes its purpose a little clearer This is a step towards fixing #56
* Remove use of _SCS from ADD_METHODHein-Pieter van Braam2017-02-131-1/+1
| | | | This saves typing and is a step towards fixing #56
* Overloaded basic math funcs (double and float variants). Use real_t rather ↵Ferenc Arn2017-01-161-31/+31
| | | | | | than float or double in generic functions (core/math) whenever possible. Also inlined some more math functions.
* Merge pull request #7532 from tagcup/pcg_prngRémi Verschelde2017-01-161-2/+2
|\ | | | | Replace the existing PRNG (Xorshift31) with (minimal) PCG-32.
| * Replace the existing PRNG (Xorshift31) with (minimal) PCG (XSH-RR variant ↵Ferenc Arn2017-01-151-2/+2
| | | | | | | | | | | | with 32-bit output, 64-bit state). PCG is better than many alternatives by many metrics (see www.pcg-random.org) including statistical quality with good speed.
* | Style: Cleanups, added headers, renamed filesRémi Verschelde2017-01-161-1/+1
|/ | | | | | | | | Made sure files in core/ and tools/ have a proper Godot license header when written by us. Also renamed aabb.{cpp,h} and object_type_db.{cpp,h} to rect3.{cpp,h} and class_db.{cpp,h} respectively. Also added a proper header to core/io/base64.{c,h} after clarifying the licensing with the original author (public domain).
* Merge pull request #7093 from bojidar-bg/named-colorsRémi Verschelde2017-01-111-2/+24
|\ | | | | Add named colors to GDScript/Visual Script/core.