summaryrefslogtreecommitdiff
path: root/modules/mono/mono_gd
AgeCommit message (Collapse)Author
2021-06-04Rename Quat to QuaternionMarcel Admiraal
2021-06-03Rename Variant TRANSFORM to TRANSFORM3DAaron Franke
Also _transform to _transform3d
2021-06-03Rename Transform to Transform3D in coreAaron Franke
2021-04-29Replace remaining uses of `NULL` with `nullptr`Rémi Verschelde
Follow-up to #38736 (these uses were likely added after this PR was merged).
2021-04-26Remove uses of `auto` for better readability and online code reviewsHugo Locurcio
The current code style guidelines forbid the use of `auto`. Some uses of `auto` are still present, such as in UWP code (which can't be currently tested) and macros (where removing `auto` isn't easy).
2021-04-17C#: Fix `double` casting in wasm m2n trampolinesIgnacio Roldán Etcheverry
The trampolines were casting double to `size_t` (likely a copy-paste mistake), so the value was getting truncated.
2021-03-18Mono: Fix Android build after #46900Rémi Verschelde
2021-03-13Replace malloc's with Godot's memalloc macroEv1lbl0w
2021-03-08Merge pull request #46174 from xill47/mono-appdomain-unhandled-exception-eventRémi Verschelde
Added mono_unhandled_exception call to unhandled_exception hook
2021-03-08Added mono_unhandled_exception call to unhandled_exception hookIlya Kuznetsov
2021-03-06Add C# source generator for a new ScriptPath attributeIgnacio Etcheverry
This source generator adds a newly introduced attribute, `ScriptPath` to all classes that: - Are top-level classes (not inner/nested). - Have the `partial` modifier. - Inherit `Godot.Object`. - The class name matches the file name. A build error is thrown if the generator finds a class that meets these conditions but is not declared `partial`, unless the class is annotated with the `DisableGodotGenerators` attribute. We also generate an `AssemblyHasScripts` assembly attribute which Godot uses to get all the script classes in the assembly, eliminating the need for Godot to search them. We can also avoid searching in assemblies that don't have this attribute. This will be good for performance in the future once we support multiple assemblies with Godot script classes. This is an example of what the generated code looks like: ``` using Godot; namespace Foo { [ScriptPathAttribute("res://Player.cs")] // Multiple partial declarations are allowed [ScriptPathAttribute("res://Foo/Player.cs")] partial class Player {} } [assembly:AssemblyHasScripts(new System.Type[] { typeof(Foo.Player) })] ``` The new attributes replace script metadata which we were generating by determining the namespace of script classes with a very simple parser. This fixes several issues with the old approach related to parser errors and conditional compilation. It also makes the task part of the MSBuild project build, rather than a separate step executed by the Godot editor.
2021-02-08Initialize class/struct variables with default values in modules/Rafał Mikrut
2021-01-31Merge pull request #45315 from RandomShaper/modernize_threadRémi Verschelde
Modernize Thread
2021-01-29Modernize ThreadPedro J. Estébanez
- Based on C++11's `thread` and `thread_local` - No more need to allocate-deallocate or check for null - No pointer anymore, just a member variable - Platform-specific implementations no longer needed (except for the few cases of non-portable functions) - Simpler for `NO_THREADS` - Thread ids are now the same across platforms (main is 1; others follow)
2021-01-26Merge pull request #45029 from neikeq/issue-40023Rémi Verschelde
C#: Fix System.Collections.Generic.List marshalling
2021-01-19Cleanup: Remove executable bit from files which don't need itRémi Verschelde
Drop unused xpmfix.sh script.
2021-01-19C # mono supports Unicode codemagian1127
2021-01-12CI: Update to clang-format 11 and apply ternary operator changesRémi Verschelde
2021-01-08C#: Fix System.Collections.Generic.List marshallingIgnacio Etcheverry
2021-01-01Update copyright statements to 2021Rémi Verschelde
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 🎆
2020-12-29Fix missed renamings from empty() to is_empty()Rémi Verschelde
Those were missed in #44401 or added by later PRs.
2020-12-28Rename empty() to is_empty()Marcel Admiraal
2020-12-17Merge pull request #44105 from neikeq/mono-wasm-m2n-hookRémi Verschelde
Mono: Make Godot provide its own WASM m2n trampolines
2020-12-14Mono: Make Godot provide its own WASM m2n trampolinesIgnacio Etcheverry
This depends on a custom Mono patch from this commit: godotengine/godot-mono-builds@0e312939bd0dc4b807cc15dbe76a7b65456ab928
2020-12-06Tweak log file names for consistency between Mono and non-Mono logsHugo Locurcio
- Avoid spaces in Mono log file names. - Use a `.log` extension for Mono logs, just like non-Mono logs. - Use periods to separate hours/minutes/seconds for non-Mono logs.
2020-12-06Merge pull request #44106 from neikeq/mono-invoke-no-params-boxingRémi Verschelde
Don't box params on Native->C# calls with Variant params
2020-12-06Don't box params on Native->C# calls with Variant paramsIgnacio Etcheverry
Godot uses Variant parameters for calls to script methods. Up until now we were boxing such parameters when marshalling them for invokation, even if they were value types. Now Godot allocates the marshalled parameters on the stack, reducing the GC allocations resulted from boxing.
2020-12-05Fix unhandled exception re-thrown in the editorIgnacio Etcheverry
2020-11-16Remove empty lines around braces with the formatting scriptAaron Franke
2020-11-09Variant: Rename Type::_RID to Type::RIDRémi Verschelde
The underscore prefix was used to avoid the conflict between the `RID` class name and the matching enum value in `Variant::Type`. This can be fixed differently by prefixing uses of the `RID` class in `Variant` with the scope resolution operator, as done already for `AABB`.
2020-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
2020-10-26C#: Fix custom event signals crash on hot-reloadIgnacio Etcheverry
Cleanup and re-initialization of event signals before and after hot-reload should be working correctly now.
2020-10-18Refactor MethodBind to use variadic templatesreduz
Removed make_binders and the old style generated binders.
2020-10-02iOS: RefactoringSergey Minakov
Enabled ARC for iOS. Weakify/Strongify macros for objc blocks. Removed old version checks. Specific types for ObjC++ modules to exclude unneeded bridging. Separate DeviceMetrics class for device specific data. Replaced old/deprecated functionality.
2020-09-13Add mono log message to error for fatal errorsTom Daffin
2020-09-08C#: Fix endless reload loop if project has unicode charsIgnacio Etcheverry
The assembly modified time wasn't picked properly as the path was treated as latin-1, so the file watcher was constantly firing the event.
2020-09-04Merge pull request #41748 from neikeq/issue-41712Rémi Verschelde
Fix 'Parameter "assembly" is null' error
2020-09-04Fix 'Parameter "assembly" is null' errorIgnacio Etcheverry
This error was normally being printed when trying to open the project assembly while the project was not yet built. The error should not be printed. It's the job of this method's caller to decide whether to print an error or not if loading failed.
2020-09-03[Complex Test Layouts] Change `String` to use UTF-32 encoding on all platforms.bruvzg
2020-08-30Fix clang-tidy warnings due to semicolon after mono module macrosIgnacio Etcheverry
This also enforces them to end with a semicolon.
2020-07-27Pop from front to avoid infinite loop with nested classesNhiqill
2020-07-05Fix Mono PackedArray MarshallingDaniel Doran
2020-07-05Merge pull request #40137 from neikeq/fix-clangtidy-warnings-monoRémi Verschelde
Mono/C#: Fix several clang-tidy warnings and cleanup
2020-07-05Mono/C#: Fix several clang-tidy warnings and cleanupIgnacio Etcheverry
2020-07-03fix crash when pass null in print array in GD.printendlesstravel
fix crash when pass null in print array in GD.print 2 fix crash when pass null in print array in GD.print 3 fix space
2020-06-25Mono/C#: Fix unhandled exception not being printedIgnacio Etcheverry
For some reason `mono_unhandled_exception` is not printing the exception as its comment claims. Use `mono_print_unhandled_exception` instead.
2020-06-17return boxed long when marshalling a godot int to mono runtime in dynamic ↵Michael Belousov
contexts
2020-05-30Fixes building mono release templatesNutmegStudio
2020-05-22Mono/C#: Don't try to load project assembly in project managerIgnacio Etcheverry
This was causing an error message when launching the manager, because there is no project assembly to load.
2020-05-14Style: Enforce separation line between function definitionsRémi Verschelde
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.