Age | Commit message (Collapse) | Author |
|
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
|
|
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.
|
|
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.
|
|
|
|
Using clang-tidy's `modernize-use-bool-literals`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-bool-literals.html
|
|
Using clang-tidy's `modernize-use-nullptr`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
|
|
Using `clang-tidy`'s `modernize-use-default-member-init` check and
manual review of the changes, and some extra manual changes that
`clang-tidy` failed to do.
Also went manually through all of `core` to find occurrences that
`clang-tidy` couldn't handle, especially all initializations done
in a constructor without using initializer lists.
|
|
|
|
|
|
|
|
It is now possible to register protocol handlers (default tcp://) to
support additional debugging communication layers (e.g. websocket).
|
|
This closes https://github.com/godotengine/godot-docs/issues/2531.
|
|
Also renamed `delaunay.h` to `delaunay_2d.h` to match the class name.
|
|
New GPU lightmapper
|
|
Removed by mistake in #38292 like the Windows `__XINPUT_DEVICE__`,
this magic binding is referenced directly in our code.
|
|
-Added LocalVector (needed it)
-Added stb_rect_pack (It's pretty cool, we could probably use it for other stuff too)
-Fixes and changes all around the place
-Added library for 128 bits fixed point (required for Delaunay3D)
|
|
GDScript: Add join method on String
|
|
This reverts commit ec7b481170dcd6a7b4cf0e6c1221e204ff7945f3.
This was wrong, `d` is not a distance but the `d` constant in the
parametric equation `ax + by + cz = d` describing the plane.
|
|
Part of #33027.
|
|
Part of #33027, also discussed in #29848.
Enforcing the use of brackets even on single line statements would be
preferred, but `clang-format` doesn't have this functionality yet.
|
|
|
|
Allow using integer vectors for iteration and make range() use them
|
|
|
|
Fix object leaks caused by unfulfilled yields
|
|
|
|
|
|
Docs: Add join on String.xml
|
|
Required for `JoypadWindows::probe_joypads`.
Partially reverts 510e83498e768ffbec8177f18a50180de828b844. Fixes #38554.
|
|
Add a Color constructor for Color with alpha
|
|
Fix: can't convert Transform -> Transform2D
|
|
Fix: #38528
|
|
Fix: printing empty string does nothing in editor output pannel
|
|
Fix: #38490
|
|
Format remote printerr properly in script debugger output
|
|
Now the stack saved in a `GDScriptFunctionState` is cleared as soon as the `yield()` operation is known not to be resumed because either the script, the instance or both are deleted.
This clears problems like leaked objects by eliminating cases of circular references between `GDScriptFunctionState`s preventing them and the objects they refer to in their saved stacks from being released. As an example, this makes using `SceneTreeTimer` safer.
Furthermore, with this change it's now possible to print early warnings about `yield()`s to released script/instances, as now we know they won't be successfully resumed as the condition for that happens. However, this PR doesn't add such messages, to keep the observed behavior the same for the time being.
Also, now a backup of the function name in `GDScriptFunctionState` is used, since the script may not be valid by the time the function name is needed for the resume-after-yield error messages.
|
|
Fix array slicing.
|
|
|
|
element in Octree<T, use_pairs, AL>::cull_convex().
|
|
Priorize Embedded PCKs on loading
|
|
If existing, embedded PCKs are loaded before the pcks the engine might
find next to it.
Fixes #37568
|
|
Implement Skew in Node2D
|
|
|
|
|
|
Skew is x-axis only, because it must be bidirectionally convertible to a 2x3 matrix, but you can subtract it to the rotation to get the effect on y-axis
|
|
|
|
This fixes numerous false positives coming out of the culling system.
AABB checks are now a full separating-axis check against the frustum, with the points of the frustum being compared to the planes of the box just as the points of the box were being compared to the planes of the frustum. This fixes large objects behind the camera not being culled correctly.
Some systems that used frustums that were (sometimes mistakenly?) unbounded on one or more side have been modified to be fully enclosed.
|
|
|
|
Warn when trying to open `res://` or `user://` with `OS.shell_open()`
|
|
|
|
makes VibrationInfo protected
|