Commit graph

1551 commits

Author SHA1 Message Date
Ignacio Roldán Etcheverry
202f0f2f1b
Merge pull request #64959 from raulsntos/dotnet/fix-malloc-size
C#: Fix byteCount in `NativeMemory.Alloc`
2022-08-28 01:44:56 +02:00
Rémi Verschelde
19e2f30a55
Merge pull request #64860 from raulsntos/dotnet/sync-math
Sync C# cubic interpolation with core
2022-08-27 19:01:37 +02:00
Rémi Verschelde
b5294b5759
Merge pull request #64922 from akien-mga/dotnet-fix-app-host-version-detection
.NET: Change NETCore.App version detection to use highest match
2022-08-27 18:58:40 +02:00
Raul Santos
ebe008d41b
C#: Fix byteCount in NativeMemory.Alloc
`NativeMemory.Alloc` takes the byte count as parameter, this is
calculated by multiplying the element size in bytes by the length
of the array.
2022-08-27 17:35:53 +02:00
Raul Santos
f64b845514
C#: Add CubicInterpolateAngle 2022-08-27 12:28:54 +02:00
Raul Santos
623f4a52ca
C#: Add CubicInterpolateInTime 2022-08-27 12:27:11 +02:00
Raul Santos
4c5cefe4fe
C#: Rename and fix Quaternion.SphericalCubicInterpolate 2022-08-27 12:26:38 +02:00
Raul Santos
f72b7a1595
C#: Fix Quaternion.CubicSlerp 2022-08-27 12:26:38 +02:00
Raul Santos
8ad0ef75b8
C#: Add Exp and Log to Quaternion 2022-08-27 12:26:38 +02:00
Raul Santos
b526a0d824
C#: Add GetAngle and GetAxis to Quaternion 2022-08-27 12:26:38 +02:00
Raul Santos
961a086d20
C#: Fix Transform3D interpolation and add spherical interpolation 2022-08-27 12:26:38 +02:00
Raul Santos
b35fcf3620
C#: Add missing match check in Quaternion.Slerpni 2022-08-27 12:26:37 +02:00
Rémi Verschelde
488c501633
Merge pull request #64942 from paulloz/cs-fix-color-names
C#: Fix dictionary keys in Colors
2022-08-27 08:10:07 +02:00
Paul Joannon
4c05b95857
C#: Fix dictionary keys in Colors 2022-08-26 23:27:45 +02:00
Rémi Verschelde
f9f2446972
Merge pull request #64367 from Mickeon/rename-var-to-str
Rename `str2var` to `str_to_var` and similar
2022-08-26 23:04:06 +02:00
Micky
59e11934d8 Rename str2var to str_to_var and similar
Affects the Math class, a good chunk of the audio code, and a lot of other miscellaneous classes, too.

- `var2str` -> `var_to_str`
- `str2var` -> `str_to_var`
- `bytes2var` -> `bytes_to_var`
- `bytes2var_with_objects` -> `bytes_to_var_with_objects`
- `var2bytes` -> `var_to_bytes`
- `var2bytes_with_objects` -> `var_to_bytes_with_objects`
- `linear2db` -> `linear_to_db`
- `db2linear` -> `db_to_linear`
- `deg2rad` -> `deg_to_rad`
- `rad2deg` -> `rad_to_deg`

- `dict2inst` -> `dict_to_inst`
- `inst2dict` -> `inst_to_dict`
2022-08-26 14:58:22 +02:00
Rémi Verschelde
3d43ffdb5b .NET: Change NETCore.App version detection to use highest match
`libnethost.a` detection failed on my Linux system (Mageia 9, using Fedora 36
dotnet repos), because it used the first match which isn't the one matching
the rest of the SDK:
```
$ dotnet --list-runtimes
Microsoft.AspNetCore.App 3.1.28 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.8 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.28 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.8 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
```

No idea why I still have 6.0.5 installed but it should pick the highest I guess.
2022-08-26 13:19:01 +02:00
fabriceci
f8cc88fab3 Restore RigidBody2/3D, SoftBody names in physics 2022-08-26 12:26:25 +02:00
Ignacio Roldán Etcheverry
e8ce36628f
Merge pull request #64901 from raulsntos/dotnet/equals
C#: Use pattern matching to simplify `Equals`
2022-08-26 08:33:52 +02:00
Raul Santos
9c9b8fcd34
Remove [Signal] attribute from events
- Remove event as a valid target of `SignalAttribute`
- Stop adding the `[Signal]` attribute to events in bindings_generator
- Make bindings_generator use the `EventHandler` suffix to be consistent with the C# source generator
- Remove obsolete comment about the signal's delegate name
2022-08-26 00:53:45 +02:00
Ignacio Roldán Etcheverry
a8476c04f4
Merge pull request #64852 from paulloz/dotnet6-export-category-attribute
C#: Preserve order of exported fields/categories
2022-08-25 23:26:03 +02:00
Rémi Verschelde
6d196c1ce3
Merge pull request #64898 from neikeq/dotnet-fix-find-arch 2022-08-25 22:18:38 +02:00
Paul Joannon
cf99d92a39
C#: Preserve order of exported fields/categories 2022-08-25 20:39:57 +02:00
Ignacio Roldán Etcheverry
09af583e10 C#: Fix buildsystem when dotnet --info does not specify arch
For some installations the architecture information is not printed.
2022-08-25 20:05:42 +02:00
Ignacio Roldán Etcheverry
f03ac21ea8
Merge pull request #52815 from magian1127/temp3
C# Generate SnakeName const
2022-08-25 20:02:16 +02:00
Raul Santos
f8ceceed15
Various C# documentation improvements
Fixes wrong/invalid documentation and add documentation to some OS members.
2022-08-25 17:09:32 +02:00
Magian
c371d1bac9 C# Generate StringName(SnakeName) for all class members 2022-08-25 23:07:20 +08:00
Rémi Verschelde
c7eb423eeb
Merge pull request #55778 from aaronfranke/use-arch-btw
[skip ci]
2022-08-25 13:03:48 +02:00
Ignacio Roldán Etcheverry
8769088f48
Merge pull request #64869 from bruvzg/dotnet_arch
[macOS] Check .NET binary architecture, and search for the cross compile SDK in the subfolders.
2022-08-25 11:25:08 +02:00
Aaron Franke
27b0f18275 Unify bits, arch, and android_arch into env["arch"]
Fully removes the `bits` option and adapts the code that relied on it.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2022-08-25 11:19:20 +02:00
bruvzg
0a427cf159
[macOS] Check .NET binary architecture, and search for the cross compile SDK in the subfolders. 2022-08-25 09:32:07 +03:00
Rémi Verschelde
6ffbec9e49
Merge pull request #64731 from raulsntos/dotnet6-variant-generics-analyzer
C#: Add `MustBeVariant` attribute and analyzer
2022-08-25 07:34:05 +02:00
Rémi Verschelde
e1266d2f35
Merge pull request #64781 from raulsntos/csharp_children
Add `includeInternal` to C# NodeExtensions and avoid printing errors in `GetChildOrNull`
2022-08-25 07:32:50 +02:00
Raul Santos
6468f9b37c
Add MustBeVariant attribute and analyzer
- MustBeVariant attribute can be used to enforce that generic types must
be a marshable from/to Variant.
- Also renames all diagnostic ids to be valid unicode identifiers.
2022-08-25 01:47:40 +02:00
Aaron Franke
09551c3d2b
Remove mentions of the Server platform from the Mono module 2022-08-24 14:56:40 -05:00
Ignacio Roldán Etcheverry
686286ed9d
Merge pull request #64742 from zaevi/csharp_add_grouping_attributes
C#: Add grouping attributes for properties.
2022-08-24 20:09:47 +02:00
Ignacio Roldán Etcheverry
e172b1aa91
Merge pull request #64743 from raulsntos/dotnet6-signal-analyzer
Improve C# signal analyzer errors
2022-08-24 19:28:47 +02:00
Raul Santos
a0da258401
Use pattern matching to simplify Equals
- Simplify and unify `Equals` implementation of C# struct types
- Also add pattern matching to replace a cast in `DebuggingUtils`
2022-08-24 14:15:33 +02:00
Raul Santos
22a3c585c2
Update C# named colors to use HEX codes 2022-08-24 10:46:06 +02:00
Raul Santos
665621aa1b
Avoid printing an error in GetChildOrNull
`GetChildOrNull` won't print an error when the given index is out of range,
similar to how the LINQ `ElementAtOrDefault` method works.
2022-08-24 10:10:47 +02:00
Ignacio Roldán Etcheverry
b438859d04
Merge pull request #64727 from raulsntos/csharp-remove-ctors
Remove copy constructors in C# structs
2022-08-24 08:28:58 +02:00
Ignacio Roldán Etcheverry
4d9ddc8ab3
Merge pull request #64773 from raulsntos/dotnet6-🦭
C#: Seal classes that can't be inherited from
2022-08-24 08:01:27 +02:00
Raul Santos
7924d643e5
Add includeInternal to C# NodeExtensions and fix get_child documentation
Node methods in C# extended to use generics
now have the optional parameter `includeInternal`
like their non-generic equivalents.

Also, fixed a typo in the `Node.get_child` documentation.
2022-08-23 18:19:44 +02:00
Raul Santos
d6574f025b
Seal classes that can't be inherited from 2022-08-23 11:08:59 +02:00
Rémi Verschelde
d5606503b4
Merge pull request #64762 from neikeq/csharp-dangling-callable-code 2022-08-23 11:08:28 +02:00
Rémi Verschelde
7e4817a096
Merge pull request #64729 from raulsntos/csharp-xform-operator
C#: Replace `Xform` and `XformInv` with `*` operator
2022-08-23 07:47:09 +02:00
Ignacio Roldán Etcheverry
bc12436f73 C#: Remove old Callable code left dangling after switch to .NET 6 2022-08-23 04:14:58 +02:00
Raul Santos
0b8b733d77
C#: Replace Xform and XformInv with * operator
- In cases where both `Xform`/`XformInv` and the `*` operator were
implemented the `Xform`/`XformInv` methods were removed in favor of the
`*` operator.
- In cases where the `Xform`/`XformInv` existed but not the `*` operator,
the `Xform`/`XformInv` methods were replaced with the `*` operator.
- In cases where no method existed, a new `*` operator has been
implemented to support the same operations that are supported in GDScript.
- Fixes the `Transform.Xform` and `Transform.XformInv` with `Rect2`
implementation to use a zero `Rect2` size to start expanding from
(which is how it's implemented in C++).
2022-08-22 21:11:24 +02:00
Raul Santos
3b201c2b04
Improve C# signal analyzer errors
Report the specific parameters that are not supported.
2022-08-22 19:44:05 +02:00
Zae
431a28fe19 C#: Add grouping attributes for properties. 2022-08-23 01:23:45 +08:00