Commit graph

370 commits

Author SHA1 Message Date
Rémi Verschelde 277b24dfb7 Make core/ includes absolute, remove subfolders from include path
This allows more consistency in the manner we include core headers,
where previously there would be a mix of absolute, relative and
include path-dependent includes.
2018-09-12 09:52:22 +02:00
Ignacio Etcheverry d21c64cc3b C#: Fix cs_files glue mismatch bug 2018-09-12 03:24:08 +02:00
Ignacio Etcheverry e558e1ec09 Fix/workaround for issue #21667
When a Reference managed instance is garbage collected and its finalizer is called, it could happen that the native instance is referenced once again before the finalizer can unreference and memdelete it. The workaround is to create a new managed instance when this happens (at least for now).
2018-09-12 03:24:08 +02:00
Ignacio Etcheverry 61426464ea Add some mono root hint dirs for OSX
Fixes #13355
2018-09-12 03:24:08 +02:00
Ignacio Etcheverry 691d4e3835 Allow special characters in C# glue files
Fixes #21139

- Surround the generated file modules/mono/glue/cs_compressed.gen.h with ifdef TOOLS_ENABLED
2018-09-12 03:24:08 +02:00
Ignacio Etcheverry b1356a3590 Cleanup of c# api files and bindings generator
- We no longer generate RID and NodePath C# classes. Both will be maintained manually.
- We no longer generate C# declarations and runtime registration of internal calls for the following classes: RID, NodePath, String, GD, SignalAwaiter and Godot.Object (partial base).
- We no longer auto-generate the base members of Godot.Object. They will be maintained manually as a partial class.

This makes it easier to maintain these C# classes and their internal calls, as well as the bindings generator which no longer generates C# classes that don't derive from Godot Object, and it no longer generates the Godot.Object base members (which where unreadable in the bindings generator code).

- Added missing 'RID(Object from)' constructor to the RID C# class.
- Replaced MONO_GLUE_DISABLED constant macro with MONO_GLUE_ENABLED.
- Add sources in module/mono/glue even if glue is disabled, but surround glue files with ifdef MONO_GLUE_ENABLED.
2018-09-12 03:23:45 +02:00
Aaron Franke 627ed98ed1 [Mono] Various style changes and naming standardization 2018-09-10 15:22:10 -04:00
Aaron Franke 4743852466 [Mono] Tabs -> Spaces 2018-09-10 15:12:49 -04:00
Ignacio Etcheverry 6b10e3750e
Merge pull request #21497 from neikeq/hm
C# generated classes ignore warning CS1591 and cleanup
2018-08-27 21:43:46 +02:00
Ignacio Etcheverry aa2bcf3dfc C# generated classes ignore warning CS1591 and cleanup 2018-08-27 20:39:51 +02:00
Ignacio Etcheverry 78bb53f85d
Merge pull request #21205 from KellyThomas/c-sharp-feature-parity-quat
[Mono] Quat - add some missing constructors and methods
2018-08-27 16:18:09 +02:00
Ignacio Etcheverry db55d8a4b6
Merge pull request #21423 from exts/mono/collections
[Mono] Added Collections namespace to Array & Dictionary
2018-08-26 19:11:45 +02:00
exts 035d498af2 Added Collections namespace to Array & Dictionary 2018-08-25 17:19:37 -05:00
Juan Linietsky 8c435a343e
Merge pull request #16927 from neikeq/rework-refcount-notify
Notify instance binding data api of refcount increment/decrement
2018-08-25 11:01:55 -03:00
Ignacio Etcheverry d72a281468
Merge pull request #20717 from PJB3005/18-08-04-godot-exceptions
Fix Mono exception handling.
2018-08-24 16:27:43 +02:00
Ignacio Etcheverry 750f128a05
Merge pull request #20707 from aaronfranke/mono-combine
[Mono] Move several related small files
2018-08-24 15:53:38 +02:00
Rémi Verschelde de59fe04e7 Add print_verbose to print to stdout only in verbose mode
Equivalent of the cumbersome:
if (OS::get_singleton()->is_stdout_verbose())
	print_line(msg);
2018-08-24 09:23:20 +02:00
Kelly Thomas a941684590 mono: Quat - add some missing constructors and methods 2018-08-24 07:56:54 +08:00
Pieter-Jan Briers af39684885 Fix Mono exception handling.
First of all, this fixes the handling of exceptions so the engine actually notices them,
it was broken in 4172fa03b5.

Next, unhandled exceptions now do NOT cause an abort(). They're logged now,
so before #16987. The pending exception thing still works though.
2018-08-23 20:21:36 +02:00
Aaron Franke 514856d8c7 [Mono] Move several small related files 2018-08-23 12:50:04 -04:00
Kelly Thomas 46207ae7aa [Mono] AABB - Position, Size, End setters, Rect2 - End setter 2018-08-23 23:45:18 +08:00
Rémi Verschelde 1e729630d6
Merge pull request #21240 from aaronfranke/mono-project-vector
[Mono] Vector2/3 Project methods
2018-08-23 08:59:26 +02:00
Ignacio Etcheverry 908a30964a Notify instance binding data api of refcount increment/decrement 2018-08-23 01:38:48 +02:00
Ignacio Etcheverry 980b81dd2a
Merge pull request #21174 from KellyThomas/c-sharp-feature-parity-rect2
[Mono] Rect2 - add Abs(), rename private fields
2018-08-22 22:34:45 +02:00
Aaron Franke 434973fb83 [Mono] Vector2/3 Project methods 2018-08-22 13:27:35 -04:00
Ignacio Etcheverry 143c471eff Mono: Fix weird crash when loading corlib 2018-08-22 00:49:38 +02:00
Ignacio Etcheverry 5df91099c7
Merge pull request #18502 from space-wizards/18-04-29-assembly-load-hook
assembly_load_hook fallback for registering GDMonoAssemblies.
2018-08-22 00:27:35 +02:00
Rémi Verschelde 404ee1a56b Style: Fix issues that went past CI 2018-08-21 21:28:06 +02:00
Rémi Verschelde a319d72071
Merge pull request #21253 from aaronfranke/plane-constants
Rename Plane constants, add to Mono
2018-08-21 21:16:41 +02:00
Rémi Verschelde 2969dffbe3 Deprecate incorrect Color::gray()
This average is not a proper approximation of a grayscale value,
get_v() is better suited for that.

If we want a real to_grayscale() conversion, it's somewhat more
involved: https://en.wikipedia.org/wiki/Grayscale

Remove the deprecated Gray() from C# bindings as it conflicts
with new named color constants.
2018-08-21 17:48:31 +02:00
Aaron Franke a986686ac4 Rename Plane constants, add to Mono
But I'm not tagging PR as [Core] or [Mono] due to it being a minor change anyway.
2018-08-21 01:35:07 -04:00
Justin Abene c6a4ca5c9e Prevent "cannot use a string pattern on a bytes-like object"
Fixes #21207
2018-08-20 00:42:47 -04:00
Kelly Thomas 792a8446ac mono: add Abs() to Rect2 and rename private fields 2018-08-19 19:18:12 +08:00
Ignacio Etcheverry 7287300433 Mono: Improve C# core files (glue/cs_files) buildsystem
- Search C# files recursively in 'glue/cs_files'.
- Determine a version for the C# core files automatically. The latest modified time will do for now.
2018-08-17 13:51:55 +02:00
Rémi Verschelde 4548ec4a49
Merge pull request #20945 from neikeq/dict-erase-retbool
Dictionary: remove erase_checked(key), make erase(key) return bool
2018-08-15 01:08:23 +02:00
Rémi Verschelde b4f579b5ba
Merge pull request #20583 from neikeq/issue-15371
Fix case where exported properties value is lost
2018-08-14 21:08:56 +02:00
Kelly Thomas 815d08f10c mono: add constants to transform and vector structs 2018-08-15 02:03:36 +08:00
Ignacio Etcheverry 21d285e30f Dictionary: remove erase_checked(key), make erase(key) return bool 2018-08-14 19:19:05 +02:00
Ignacio Etcheverry d7b9fcd336
Merge pull request #20890 from KellyThomas/mono-is-instance-valid
mono: add IsInstanceValid(), move WeakRef()
2018-08-14 18:12:18 +02:00
Kelly Thomas 9341129d14 mono: add IsInstanceValid(), move WeakRef() 2018-08-14 15:48:54 +08:00
Rémi Verschelde 695b8d254e SCons: Fix mono_root initialization
As advised by @neikeq.
2018-08-14 08:55:37 +02:00
Ignacio Etcheverry c4e75aa63a
Merge pull request #20706 from mysticfall/issue-20705
Add missing GetPtr() for Dictionary<> and Array<>
2018-08-13 22:37:09 +02:00
Teashrock 51a0a38135 Fixed absent variable exception while trying to raise another exception. 2018-08-13 16:28:28 +02:00
George Marques eb48119821
Added system for GDScript warnings
- Count and panel per script.
- Ability to disable warnings per script using special comments.
- Ability to disable warnings globally using Project Settings.
- Option to treat enabled warnings as errors.
2018-08-10 16:00:47 -03:00
Juan Linietsky ea3d997f9d
Revert "added get_creation_time function for gdscript" 2018-08-10 13:29:49 -03:00
Juan Linietsky 275e0d5ee4
Merge pull request #18914 from notwarp/master
added get_creation_time function for gdscript
2018-08-10 13:28:47 -03:00
Xavier Cho 5d2c239772 Add missing GetPtr() for Dictionary<> and Array<>
Add missing GetPtr() method for generic versions of Dictionary
and Array to fix #20705.
2018-08-04 14:34:55 +09:00
Ignacio Etcheverry b911165679
Merge pull request #20600 from exts/new_generic_methods
Mono: Added generic methods for PackedScene & ResourceLoader
2018-08-04 05:22:38 +02:00
exts cdb4ae471b Added generic method for ResourceLoader: Load<T>() 2018-08-03 13:40:42 -05:00
Ignacio Etcheverry 3fa2404a79
Merge pull request #20644 from NickToony/master
Fixed Windows mono compile
2018-08-01 03:52:46 +02:00