Commit Graph

52 Commits

Author SHA1 Message Date
Kelly Thomas c7e98eef67 Fix index out of range error in string.Extension() 2018-05-21 18:48:53 +08:00
Rémi Verschelde 228b09bafb
Merge pull request #18974 from KellyThomas/c-sharp-feature-parity-basis
Mono: Basis constructor for euler parameter
2018-05-18 21:09:57 +02:00
Ignacio Etcheverry fc90f41f53
Merge pull request #18975 from KellyThomas/c-sharp-feature-parity-color
mono: New Color methods:  Darkened, Lightened and ToRgba32
2018-05-18 20:09:01 +02:00
Kelly Thomas 16e1b4bacf mono: Plane, expose Normal, and D 2018-05-17 23:04:20 +08:00
Kelly Thomas 88bd33f451 mono: New Color methods: Darkened, Lightened and ToRgba32 2018-05-17 21:41:19 +08:00
Kelly Thomas c26d30986a Mono: Basis constructor for euler parameter 2018-05-17 21:31:14 +08:00
Ignacio Etcheverry 41f79a6f14
Merge pull request #18889 from madadam/async-await-fix
Set current SynchronizationContext before the game loop starts
2018-05-16 23:44:55 +02:00
Guilherme Felipe 35024d4e7b Add missing copyright headers 2018-05-16 14:50:44 -03:00
Adam Cigánek f25240cfe6 Set current SynchronizationContext before the game loop starts
This fixes the problem that `SynchronizationContext.Current` would be null
during the call to `_EnterTree`, `_Ready` and the first call to `_Process` thus
the task continuations would be scheduled outside the main thread, which is unexpected and might lead to crashes.

With this change, task continuations are scheduled always on the main thread and so async/await can be used without any explicit synchronization, which is what is expected.

Fixes #18849
2018-05-15 15:09:40 +02:00
Kelly thomas a6bd2c6e72 round / ceil methods for c sharp vectors 2018-05-04 20:17:10 +08:00
Xavier Cho 6b611e6431 #18051: Fix indentation issues introduced during clean up 2018-04-17 07:53:27 +09:00
Xavier Cho e59fad3924 #18051: Do not use `var` in a for-loop, or where type is not obvious 2018-04-17 07:39:37 +09:00
Xavier Cho 94edd92248 #18051: Use common name for Color type argument 2018-04-17 07:39:37 +09:00
Xavier Cho f0bf5532fa #18051: Remove redundant verbatim prefixes 2018-04-17 07:39:37 +09:00
Xavier Cho 85787776a5 #18051: Use default parameter value 2018-04-17 07:39:37 +09:00
Xavier Cho b765c051cb #18051: Use array initializer when applicable 2018-04-17 07:39:37 +09:00
Xavier Cho 9097c71255 #18051: Remove redundant parenthesis 2018-04-17 07:39:37 +09:00
Xavier Cho 93dd59d763 #18051: Remove unnecessary variable assignments 2018-04-17 07:39:37 +09:00
Xavier Cho fdfc478c88 #18051: Use 'var' when applicable 2018-04-17 07:39:37 +09:00
Xavier Cho 0ef3e0577b #18051: Remove redundant casts and 'using', 'else', 'this' statements 2018-04-17 07:39:37 +09:00
Xavier Cho 9e2e6bb1e2 Remove duplicated declaration of RoundToInt() from Mathf 2018-04-17 07:39:37 +09:00
Chaosus 655a4e6540 [Mono] Improve Mathf 2018-04-13 20:15:49 +03:00
Alexander Alekseev 5677aed175 [mono] Fixes #17936 as GodotSharp (Core\Basic.cs) requires C#7 now, but we most probably should keep C#6 yet 2018-04-03 09:48:03 +03:00
Chaosus d52722c6da Added wrap functions to C# 2018-03-26 14:33:09 +03:00
Carter Anderson 91f271fa9e Fix mono basis GetEuler bug and marshalling/unmarshalling 2018-03-24 13:45:11 -07:00
Ignacio Etcheverry a8d8c06753
Merge pull request #17134 from aaronfranke/master
[Mono] Replace float with real_t, other misc C# improvements
2018-03-24 21:10:41 +01:00
Aaron Franke ff97c97c93 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.
2018-03-22 21:53:21 -05:00
Paul Joannon d7020aef8d
[mono] rename functions to conform to PascalCase
in:
* StringExtensions.cs
* Transform.cs
2018-03-04 15:37:29 +01:00
Ignacio Etcheverry f37090ccf4 Mono: Better versioning and gracefully unloading of Godot API assemblies 2018-02-25 20:56:27 +01:00
Ignacio Etcheverry 6e200b1fe0
Merge pull request #16326 from NathanWarden/fix_basis_mono
[Mono] Basis values now marshalled in the correct order.
2018-02-18 19:54:53 +01:00
Paul Joannon efd52cd172
add a [Signal] attribute to CSharpScripts 2018-02-17 19:29:26 +01:00
Nathan Warden 0cc4de1f24 [Mono] Basis values now marshalled in the correct order. 2018-02-02 16:45:30 -05:00
Nathan Warden 2109bd3f97 Fix an infinite recursion in the Mathf.Decimals method when using floats. 2018-01-31 14:02:17 -05: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