Commit graph

254 commits

Author SHA1 Message Date
Nathan Franke
41a20171eb
align to horizontal_alignment, valign to vertical_alignment, related 2021-12-09 01:38:46 -06:00
Yuri Roubinsky
76f6c0849c Make compile shader function to use struct instead long parameter list 2021-12-08 11:34:40 +03:00
Rémi Verschelde
46d384060e
Merge pull request #35901 from nathanfranke/pool-byte-array-subarray-exclusive 2021-12-07 14:00:59 +01:00
Rémi Verschelde
3f1a8e2f77
Merge pull request #55545 from akien-mga/doc-aabb-has_point
AABB: Improve docs and test for `has_point`
2021-12-02 21:10:53 +01:00
Rémi Verschelde
892a5a72cd
Merge pull request #55474 from akien-mga/copy-operators-no-reference 2021-12-02 17:34:45 +01:00
Rémi Verschelde
2017590ef6
AABB: Improve docs and test for has_point
Contrarily to the 2D Rect2i counterpart, it doesn't make much sense in 3D
and for floating-point AABBs to exclude points on some of its faces.
2021-12-02 15:45:55 +01:00
Rémi Verschelde
3b9de26fec
Merge pull request #53868 from aaronfranke/curve 2021-12-02 00:17:47 +01:00
Yuri Roubinsky
5ba93619fa Allow using empty statements in the shader, added formatting warning 2021-12-01 11:52:25 +03:00
Aaron Franke
129911f61a
Improve Curve with const and real_t 2021-11-30 14:24:27 -06:00
Rémi Verschelde
7da392bcc5
Don't return reference on copy assignment operators
We prefer to prevent using chained assignment (`T a = b = c = T();`) as this
can lead to confusing code and subtle bugs.

According to https://en.wikipedia.org/wiki/Assignment_operator_(C%2B%2B), C++
allows any arbitrary return type, so this is standard compliant.

This could be re-assessed if/when we have an actual need for a behavior more
akin to that of the C++ STL, for now this PR simply changes a handful of
cases which were inconsistent with the rest of the codebase (`void` return
type was already the most common case prior to this commit).
2021-11-30 16:26:29 +01:00
Nathan Franke
dd30253cdc
PackedByteArray, Array slice end exclusive, rename subarray to slice 2021-11-26 22:13:12 -06:00
Rémi Verschelde
1b89296fad
Merge pull request #55227 from ator-dev/fix-code-folding 2021-11-25 22:21:46 +01:00
ator-dev
bac0a035c9 Fix code folding when end of block is unindented delimiter 2021-11-24 22:43:06 +00:00
Rémi Verschelde
b1bf82d2b4
Merge pull request #52456 from kleonc/image-fill-rect 2021-11-24 16:34:01 +01:00
Lightning_A
e078f970db Rename remove() to remove_at() when removing by index 2021-11-23 18:58:57 -07:00
kleonc
91595b16e3 Add Image::fill_rect method 2021-11-23 18:06:23 +01:00
Paulb23
eb9100f085 Fix divide by zero in pck_packer 2021-11-17 18:07:29 +00:00
Aaron Franke
3c0fdcc8ac
Use "enum class" for input enums 2021-11-12 15:37:54 -06:00
Rémi Verschelde
36c4451a7b
Rect2: Clarify docs for has_point excluding bottom and right borders
Improve tests, as well as documentation for `expand`.
2021-11-11 22:51:29 +01:00
Rémi Verschelde
2beaae4b6f
String: Remove erase method, bindings can't mutate String 2021-11-11 11:23:32 +01:00
Aaron Franke
99a282f631
Move and organize tests into subfolders 2021-11-07 00:43:31 -06:00
Brian Semrau
dc11e73bf0 Rename AABB get_area to get_volume 2021-11-05 18:22:42 -04:00
Emmanuel Leblond
f9ba2efe1e
Modify Dictionary::operator== to do real key/value comparison with recursive support (and add unittests) 2021-10-30 13:11:01 +02:00
Rémi Verschelde
3b11e33a09
clang-format: Disable alignment of operands, too unreliable
Sets `AlignOperands` to `DontAlign`.

`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
2021-10-28 15:19:35 +02:00
bruvzg
63f3051154 Implement TextServer strip_diacritics function. 2021-10-28 10:12:57 +03:00
reduz
d03b7fbe09 Refactored Node3D rotation modes
* Made the Basis euler orders indexed via enum.
* Node3D has a new rotation_order property to choose Euler rotation order.
* Node3D has also a rotation_mode property to choose between Euler, Quaternion and Basis

Exposing these modes as well as the order makes Godot a lot friendlier for animators, which can choose the best way to interpolate rotations.
The new *Basis* mode makes the (exposed) transform property obsolete, so it was removed (can still be accessed by code of course).
2021-10-25 14:34:00 -03:00
Rémi Verschelde
4387f9645b
Merge pull request #52940 from groud/toast_notification 2021-10-19 09:57:13 +02:00
mennomax
b4eeeb315a
Swap args of Plane(point, normal) constructor
Now (normal, point)
2021-10-15 20:49:42 -05:00
Gilles Roudière
0587e5e018 Implement toast notifications in the editor 2021-10-14 13:30:54 +02:00
Paulb23
0caab00d66 Fix breakpointed_lines out of sync when removing lines above 2021-10-06 14:23:37 +01:00
Yuri Roubinsky
6873ecaaf9 Added support for uniform arrays in shaders 2021-10-04 13:57:44 +03:00
Jean-Michel Bernard
9c375170e4 Fix deleting selection at the first line do not work with backspace 2021-10-01 20:23:52 +02:00
bruvzg
0c0b5c84b0 Implement TextServer GDExtension interface, remove TextServer GDNative interface. 2021-10-01 15:13:29 +03:00
Rémi Verschelde
b32f84d473
Merge pull request #52850 from mashumafi/vector-bsearch 2021-10-01 07:52:51 +02:00
mashumafi
214bbfbefe Implement bsearch for Vector and Packed*Array 2021-09-30 23:57:26 +00:00
Lightning_A
c63b18507d Use range iterators for Map 2021-09-30 15:09:12 -06:00
O01eg
2cd052f889
Add tests for Translations 2021-09-29 10:39:20 +03:00
Camille Mohr-Daurat
341b532d5e
Merge pull request #52754 from nekomatata/dynamic-body-modes
Clarify RigidDynamicBody modes
2021-09-28 17:11:17 -07:00
Anilforextra
cdd912c48e Construct values only when necessary. 2021-09-25 14:46:45 +05:45
Rémi Verschelde
ba57252bd8
Merge pull request #52878 from AnilBK/add-get-center 2021-09-21 21:30:30 +02:00
Anilforextra
90908cd67d Add Get Center Method for Rect2/Rect2i and AABB. 2021-09-21 21:14:17 +05:45
Paulb23
1c08719d09 Add remaning code edit unit tests 2021-09-20 09:42:39 +01:00
George Marques
262d9397fb
Allow indexing of String values in scripting languages 2021-09-17 16:24:56 -03:00
PouleyKetchoupp
ed1ba5093f Clarify RigidDynamicBody modes
RigidDynamicBody modes are replaced with several properties to make their
usage clearer:
-lock_rotation: disable body's rotation (instead of MODE_LOCKED)
-freeze: no gravity or forces (instead of MODE_STATIC and MODE_KINEMATIC)
-freeze_mode: Static (can be only teleported) or Kinematic (can be animated)

Also renamed MODE_DYNAMIC_LOCKED to MODE_DYNAMIC_LINEAR in the physics
servers.
2021-09-16 16:03:48 -07:00
Camille Mohr-Daurat
1852afb6b0
Merge pull request #52679 from nekomatata/world-boundary-shape
Rename WorldMarginShape to WorldBoundaryShape
2021-09-15 16:02:40 -07:00
Aaron Franke
5d03c0e0b6
Fix String::num_real and String test cases when compiling with doubles 2021-09-15 13:41:12 -05:00
PouleyKetchoupp
bb75aec8bc Rename WorldMarginShape to WorldBoundaryShape 2021-09-14 11:16:31 -07:00
Rémi Verschelde
d2808b5a51
Merge pull request #52153 from timothyqiu/test-array-pop-at
Add unit tests for `Array.pop_at()`
2021-09-14 13:01:20 +02:00
Rémi Verschelde
70ba366743
Merge pull request #50375 from Paulb23/code_edit_unit_tests 2021-09-13 21:51:20 +02:00
Rémi Verschelde
41562b9198
Merge pull request #52049 from theraot/master 2021-09-13 16:49:24 +02:00