Commit Graph

30 Commits

Author SHA1 Message Date
Chaosus a29680c25a [Mono] Improve Mathf
(cherry picked from commit 655a4e6540)
2018-04-15 00:57:14 +02:00
Alexander Alekseev 3a430e46b9 [mono] Fixes #17936 as GodotSharp (Core\Basic.cs) requires C#7 now, but we most probably should keep C#6 yet
(cherry picked from commit 5677aed175)
2018-04-15 00:56:14 +02:00
Chaosus 63a88c69ac Added wrap functions to C#
(cherry picked from commit d52722c6da)
2018-04-15 00:52:29 +02:00
Paul Joannon 3bd414786c [mono] rename functions to conform to PascalCase
in:
* StringExtensions.cs
* Transform.cs

(cherry picked from commit d7020aef8d)
2018-04-14 23:53:56 +02:00
Carter Anderson c7adcc8dca Fix mono basis GetEuler bug and marshalling/unmarshalling
(cherry picked from commit 91f271fa9e)
2018-04-14 23:20:33 +02:00
Aaron Franke 577f3ccaf9 Replace float with real_t, default Vectors, other misc C# improvements
Replace float with real_t in most files, defined at the top of each file via using. Objects such as Vector3 now accept doubles as inputs, and convert to real_t internally. I've added default Vectors such as Vector3.Zero. Other misc C# improvements such as Mathf.RoundToInt(). Color continues to use float only because high precision is not needed for 8-bit color math and to keep things simple. Everything seems to compile and work fine, but testing is requested, as this is the first time I've ever contributed to Godot.

(cherry picked from commit ff97c97c93)
2018-04-14 23:20:03 +02:00
Hein-Pieter van Braam 4e1d19b20c Revert "[Mono] Basis values now marshalled in the correct order."
This reverts commit 9173819b71.

The fixes for these issues aren't quite baked yet. Taking them out of
3.0.2
2018-02-27 17:52:18 +01:00
Ignacio Etcheverry dde14e15c6 Mono: Better versioning and gracefully unloading of Godot API assemblies
(cherry picked from commit f37090ccf4)
2018-02-26 22:36:03 +01:00
Paul Joannon 416cd9c8b8 add a [Signal] attribute to CSharpScripts
(cherry picked from commit efd52cd172)
2018-02-19 22:39:44 +01:00
Nathan Warden 9173819b71 [Mono] Basis values now marshalled in the correct order.
(cherry picked from commit 0cc4de1f24)
2018-02-19 22:13:45 +01:00
Nathan Warden 4a3a597377 Fix an infinite recursion in the Mathf.Decimals method when using floats.
(cherry picked from commit 2109bd3f97)
2018-02-04 20:08:26 +01:00
Ignacio Etcheverry 58448561c7 Mono: Fix NodePath and RID bindings 2018-01-25 23:46:54 +01:00
Rémi Verschelde 9f479f096c Fix typos in code and docs with codespell
Using v1.11.0 from https://github.com/lucasdemarchi/codespell
2018-01-18 22:01:42 +01:00
Kelly Thomas ed17b42654
remove c#7 features for compatibility with 2015 Build Tools
https://github.com/godotengine/godot/issues/15742
2018-01-18 19:43:23 +08:00
Ignacio Etcheverry bff9627dc4 Mono: Some StackTrace to StackInfo[] fixes
- Sometimes `StackFrame.GetMethod()` returns null (e.g.: latest frame of a `MissingMethodException`). Still not sure what to do with that frame (maybe skip it), but at least it no longer fails.
- Skip `CSharpLanguage::debug_get_current_stack_info()` if an error is printed from `GDMonoUtils::update_corlib_cache()`.
- Fix crash when calling `GDMonoUtils::print_unhandled_exception(exc)` if there is no ScriptDebugger attached.
2018-01-12 19:31:15 +01:00
Pieter-Jan Briers 6e14cf991a Fixes Mono color creation from string.
Fixes #15468

Also improves the error messages if the string isn't hex, because saying that the color value is negative is just a side effect of the implementation and tells you nothing.
2018-01-10 13:56:30 +01:00
Ignacio Etcheverry 5be356b72f Mono: Implement stack info for errors and exceptions 2018-01-09 17:19:03 +01:00
Rémi Verschelde e4213e66b2 Add missing copyright headers and fix formatting
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.
2018-01-05 01:22:23 +01:00
Rémi Verschelde b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Ignacio Etcheverry b271aa48e4 Mono: Script lifetime fixes
- alloc_language_binding: Use strong GC handle as well for references. Fixes #15138
- Set the native instance field of Godot.Object to IntPtr.Zero when it's freed.
- Create weak handles without tracking resurrection (that was causing trouble). This means we have to call notification predelete before queueing a native Object for deletion, and use the MonoObject* passed by the finalizer because the weak GC handle target will return NULL at this point.
2018-01-01 03:05:13 +01:00
Ignacio Etcheverry 0a0a44da8d Mono: Make the bindings generator output enums
- Switch to PascalCase for constants names
2017-12-24 04:20:41 +01:00
Unknown fd1b94e307 Improve slang, especially in user-visible parts 2017-12-05 15:41:38 +01:00
Andreas Haas e69dd3c712
Mono: Use PascalCase in core types. 2017-11-21 23:32:40 +01:00
pablotato 054a2ac579 Add cartesian to polar conversion functions 2017-11-20 23:34:40 +01:00
Ferenc Arn d28763a4c1 Rename Rect3 to AABB.
Fixes #12973.
2017-11-17 11:01:41 -05:00
Leon Krause 9b7b46143d Move singleton management from ProjectSettings to Engine 2017-11-14 15:15:13 +01:00
Rémi Verschelde 5bc2cf257b Convert DOS line endings to Unix line endings
Should fix issues some of us have with `misc/dist/uwp_template/AppxManifest.xml`
always showing up as modified.
Might cause issues on Windows due to the removal of BOMs or change of line endings
in some of the Mono, UWP or gradlew.bat files, we will test and adapt if need be.
2017-11-05 11:37:59 +01:00
Ignacio Etcheverry 6e6b455d1f Export attribute fixes and improvements
- Allow non-public fields to be exported as well (to avoid confusion).
- Set PROPERTY_HINT_RESOURCE_TYPE for resource derived fields.
- Support enums and automatically fill PROPERTY_HINT_ENUM's hint_string for enum fields.
2017-10-17 14:42:13 +02:00
Ferenc Arn 8ddbd19777 Apply a few recent chages in Quat and Basis to their respective Mono counterparts. (#11899) 2017-10-09 14:49:53 +02:00
Ignacio Etcheverry e36fb95c50 Added mono module 2017-10-03 00:01:26 +02:00