diff options
Diffstat (limited to 'modules/mono/glue')
-rw-r--r-- | modules/mono/glue/cs_files/Error.cs | 47 | ||||
-rw-r--r-- | modules/mono/glue/cs_files/ExportAttribute.cs | 8 | ||||
-rw-r--r-- | modules/mono/glue/cs_files/GD.cs | 4 | ||||
-rw-r--r-- | modules/mono/glue/cs_files/Rect2.cs | 12 | ||||
-rw-r--r-- | modules/mono/glue/glue_header.h | 8 |
5 files changed, 16 insertions, 63 deletions
diff --git a/modules/mono/glue/cs_files/Error.cs b/modules/mono/glue/cs_files/Error.cs deleted file mode 100644 index dee4b88f74..0000000000 --- a/modules/mono/glue/cs_files/Error.cs +++ /dev/null @@ -1,47 +0,0 @@ -namespace Godot -{ - public enum Error : int - { - OK = 0, - FAILED = 1, - ERR_UNAVAILABLE = 2, - ERR_UNCONFIGURED = 3, - ERR_UNAUTHORIZED = 4, - ERR_PARAMETER_RANGE_ERROR = 5, - ERR_OUT_OF_MEMORY = 6, - ERR_FILE_NOT_FOUND = 7, - ERR_FILE_BAD_DRIVE = 8, - ERR_FILE_BAD_PATH = 9, - ERR_FILE_NO_PERMISSION = 10, - ERR_FILE_ALREADY_IN_USE = 11, - ERR_FILE_CANT_OPEN = 12, - ERR_FILE_CANT_WRITE = 13, - ERR_FILE_CANT_READ = 14, - ERR_FILE_UNRECOGNIZED = 15, - ERR_FILE_CORRUPT = 16, - ERR_FILE_MISSING_DEPENDENCIES = 17, - ERR_FILE_EOF = 18, - ERR_CANT_OPEN = 19, - ERR_CANT_CREATE = 20, - ERR_PARSE_ERROR = 43, - ERROR_QUERY_FAILED = 21, - ERR_ALREADY_IN_USE = 22, - ERR_LOCKED = 23, - ERR_TIMEOUT = 24, - ERR_CANT_AQUIRE_RESOURCE = 28, - ERR_INVALID_DATA = 30, - ERR_INVALID_PARAMETER = 31, - ERR_ALREADY_EXISTS = 32, - ERR_DOES_NOT_EXIST = 33, - ERR_DATABASE_CANT_READ = 34, - ERR_DATABASE_CANT_WRITE = 35, - ERR_COMPILATION_FAILED = 36, - ERR_METHOD_NOT_FOUND = 37, - ERR_LINK_FAILED = 38, - ERR_SCRIPT_FAILED = 39, - ERR_CYCLIC_LINK = 40, - ERR_BUSY = 44, - ERR_HELP = 46, - ERR_BUG = 47 - } -} diff --git a/modules/mono/glue/cs_files/ExportAttribute.cs b/modules/mono/glue/cs_files/ExportAttribute.cs index dce9cc59a0..e6f569e1bb 100644 --- a/modules/mono/glue/cs_files/ExportAttribute.cs +++ b/modules/mono/glue/cs_files/ExportAttribute.cs @@ -5,13 +5,13 @@ namespace Godot [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] public class ExportAttribute : Attribute { - private int hint; - private string hint_string; + private PropertyHint hint; + private string hintString; - public ExportAttribute(int hint = GD.PROPERTY_HINT_NONE, string hint_string = "") + public ExportAttribute(PropertyHint hint = PropertyHint.None, string hintString = "") { this.hint = hint; - this.hint_string = hint_string; + this.hintString = hintString; } } } diff --git a/modules/mono/glue/cs_files/GD.cs b/modules/mono/glue/cs_files/GD.cs index 99fc289161..b335ef55e4 100644 --- a/modules/mono/glue/cs_files/GD.cs +++ b/modules/mono/glue/cs_files/GD.cs @@ -2,10 +2,8 @@ using System; namespace Godot { - public static class GD + public static partial class GD { - /*{GodotGlobalConstants}*/ - public static object Bytes2Var(byte[] bytes) { return NativeCalls.godot_icall_Godot_bytes2var(bytes); diff --git a/modules/mono/glue/cs_files/Rect2.cs b/modules/mono/glue/cs_files/Rect2.cs index f2718d7b7a..e1fbb65da5 100644 --- a/modules/mono/glue/cs_files/Rect2.cs +++ b/modules/mono/glue/cs_files/Rect2.cs @@ -109,14 +109,14 @@ namespace Godot return g; } - public Rect2 GrowMargin(int margin, float by) + public Rect2 GrowMargin(Margin margin, float by) { Rect2 g = this; - g.GrowIndividual((GD.MARGIN_LEFT == margin) ? by : 0, - (GD.MARGIN_TOP == margin) ? by : 0, - (GD.MARGIN_RIGHT == margin) ? by : 0, - (GD.MARGIN_BOTTOM == margin) ? by : 0); + g.GrowIndividual((Margin.Left == margin) ? by : 0, + (Margin.Top == margin) ? by : 0, + (Margin.Right == margin) ? by : 0, + (Margin.Bottom == margin) ? by : 0); return g; } @@ -230,4 +230,4 @@ namespace Godot }); } } -}
\ No newline at end of file +} diff --git a/modules/mono/glue/glue_header.h b/modules/mono/glue/glue_header.h index 75a4eb2b40..5e41da299b 100644 --- a/modules/mono/glue/glue_header.h +++ b/modules/mono/glue/glue_header.h @@ -53,9 +53,11 @@ } \ Object *m_instance = ci->creation_func(); -void godot_icall_Object_Dtor(Object *ptr) { - ERR_FAIL_NULL(ptr); - _GodotSharp::get_singleton()->queue_dispose(ptr); +void godot_icall_Object_Dtor(MonoObject *obj, Object *ptr) { +#ifdef DEBUG_ENABLED + CRASH_COND(ptr == NULL); +#endif + _GodotSharp::get_singleton()->queue_dispose(obj, ptr); } // -- ClassDB -- |