diff options
Diffstat (limited to 'modules/mono')
| -rw-r--r-- | modules/mono/build_scripts/mono_configure.py | 3 | ||||
| -rw-r--r-- | modules/mono/csharp_script.cpp | 39 | ||||
| -rw-r--r-- | modules/mono/csharp_script.h | 4 | ||||
| -rw-r--r-- | modules/mono/glue/GodotSharp/GodotSharp/Core/Basis.cs | 4 | ||||
| -rw-r--r-- | modules/mono/glue/GodotSharp/GodotSharp/Core/Plane.cs | 2 | ||||
| -rw-r--r-- | modules/mono/glue/GodotSharp/GodotSharp/Core/Quat.cs | 2 | ||||
| -rw-r--r-- | modules/mono/glue/GodotSharp/GodotSharp/Core/Transform.cs | 4 | ||||
| -rw-r--r-- | modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs | 8 |
8 files changed, 14 insertions, 52 deletions
diff --git a/modules/mono/build_scripts/mono_configure.py b/modules/mono/build_scripts/mono_configure.py index 80e3b59325..3e771e06f0 100644 --- a/modules/mono/build_scripts/mono_configure.py +++ b/modules/mono/build_scripts/mono_configure.py @@ -125,7 +125,8 @@ def configure(env, env_mono): if not mono_prefix and (os.getenv("MONO32_PREFIX") or os.getenv("MONO64_PREFIX")): print( - "WARNING: The environment variables 'MONO32_PREFIX' and 'MONO64_PREFIX' are deprecated; use the 'mono_prefix' SCons parameter instead" + "WARNING: The environment variables 'MONO32_PREFIX' and 'MONO64_PREFIX' are deprecated; use the" + " 'mono_prefix' SCons parameter instead" ) # Although we don't support building with tools for any platform where we currently use static AOT, diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 6a7e4a80b7..bbdec224f0 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -896,7 +896,7 @@ void CSharpLanguage::reload_assemblies(bool p_soft_reload) { // Call OnBeforeSerialize if (csi->script->script_class->implements_interface(CACHED_CLASS(ISerializationListener))) { - obj->get_script_instance()->call_multilevel(string_names.on_before_serialize); + obj->get_script_instance()->call(string_names.on_before_serialize); } // Save instance info @@ -1132,7 +1132,7 @@ void CSharpLanguage::reload_assemblies(bool p_soft_reload) { // Call OnAfterDeserialization if (csi->script->script_class->implements_interface(CACHED_CLASS(ISerializationListener))) { - obj->get_script_instance()->call_multilevel(string_names.on_after_deserialize); + obj->get_script_instance()->call(string_names.on_after_deserialize); } } } @@ -1865,41 +1865,6 @@ Variant CSharpInstance::call(const StringName &p_method, const Variant **p_args, return Variant(); } -void CSharpInstance::call_multilevel(const StringName &p_method, const Variant **p_args, int p_argcount) { - GD_MONO_SCOPE_THREAD_ATTACH; - - if (script.is_valid()) { - MonoObject *mono_object = get_mono_object(); - - ERR_FAIL_NULL(mono_object); - - _call_multilevel(mono_object, p_method, p_args, p_argcount); - } -} - -void CSharpInstance::_call_multilevel(MonoObject *p_mono_object, const StringName &p_method, const Variant **p_args, int p_argcount) { - GD_MONO_ASSERT_THREAD_ATTACHED; - - GDMonoClass *top = script->script_class; - - while (top && top != script->native) { - GDMonoMethod *method = top->get_method(p_method, p_argcount); - - if (method) { - method->invoke(p_mono_object, p_args); - return; - } - - top = top->get_parent_class(); - } -} - -void CSharpInstance::call_multilevel_reversed(const StringName &p_method, const Variant **p_args, int p_argcount) { - // Sorry, the method is the one that controls the call order - - call_multilevel(p_method, p_args, p_argcount); -} - bool CSharpInstance::_reference_owner_unsafe() { #ifdef DEBUG_ENABLED CRASH_COND(!base_ref); diff --git a/modules/mono/csharp_script.h b/modules/mono/csharp_script.h index c2370364f9..f0b43a40f9 100644 --- a/modules/mono/csharp_script.h +++ b/modules/mono/csharp_script.h @@ -265,8 +265,6 @@ class CSharpInstance : public ScriptInstance { friend void GDMonoInternals::tie_managed_to_unmanaged(MonoObject *, Object *); static CSharpInstance *create_for_managed_type(Object *p_owner, CSharpScript *p_script, const MonoGCHandleData &p_gchandle); - void _call_multilevel(MonoObject *p_mono_object, const StringName &p_method, const Variant **p_args, int p_argcount); - void get_properties_state_for_reloading(List<Pair<StringName, Variant>> &r_state); void get_event_signals_state_for_reloading(List<Pair<StringName, Array>> &r_state); @@ -285,8 +283,6 @@ public: /* TODO */ void get_method_list(List<MethodInfo> *p_list) const override {} bool has_method(const StringName &p_method) const override; Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) override; - void call_multilevel(const StringName &p_method, const Variant **p_args, int p_argcount) override; - void call_multilevel_reversed(const StringName &p_method, const Variant **p_args, int p_argcount) override; void mono_object_disposed(MonoObject *p_obj); diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Basis.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Basis.cs index 16c666b8eb..5aba31c622 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Basis.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Basis.cs @@ -554,7 +554,7 @@ namespace Godot /// Returns a vector transformed (multiplied) by the basis matrix. /// </summary> /// <param name="v">A vector to transform.</param> - /// <returns>The transfomed vector.</returns> + /// <returns>The transformed vector.</returns> public Vector3 Xform(Vector3 v) { return new Vector3 @@ -572,7 +572,7 @@ namespace Godot /// basis matrix only if it represents a rotation-reflection. /// </summary> /// <param name="v">A vector to inversely transform.</param> - /// <returns>The inversely transfomed vector.</returns> + /// <returns>The inversely transformed vector.</returns> public Vector3 XformInv(Vector3 v) { return new Vector3 diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Plane.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Plane.cs index 3b4e749532..2f8b5f297c 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Plane.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Plane.cs @@ -109,7 +109,7 @@ namespace Godot /// <summary> /// Returns the shortest distance from this plane to the position `point`. /// </summary> - /// <param name="point">The position to use for the calcualtion.</param> + /// <param name="point">The position to use for the calculation.</param> /// <returns>The shortest distance.</returns> public real_t DistanceTo(Vector3 point) { diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Quat.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Quat.cs index 7c978801bd..b33490f9cb 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Quat.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Quat.cs @@ -299,7 +299,7 @@ namespace Godot /// Returns a vector transformed (multiplied) by this quaternion. /// </summary> /// <param name="v">A vector to transform.</param> - /// <returns>The transfomed vector.</returns> + /// <returns>The transformed vector.</returns> public Vector3 Xform(Vector3 v) { #if DEBUG diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform.cs index 98d4b92bd1..ac47f6029f 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform.cs @@ -248,7 +248,7 @@ namespace Godot /// Returns a vector transformed (multiplied) by this transformation matrix. /// </summary> /// <param name="v">A vector to transform.</param> - /// <returns>The transfomed vector.</returns> + /// <returns>The transformed vector.</returns> public Vector3 Xform(Vector3 v) { return new Vector3 @@ -266,7 +266,7 @@ namespace Godot /// transformation matrix only if it represents a rotation-reflection. /// </summary> /// <param name="v">A vector to inversely transform.</param> - /// <returns>The inversely transfomed vector.</returns> + /// <returns>The inversely transformed vector.</returns> public Vector3 XformInv(Vector3 v) { Vector3 vInv = v - origin; diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs index 9f9ae50c59..06bbe98497 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs @@ -181,7 +181,7 @@ namespace Godot /// This method does not account for translation (the origin vector). /// </summary> /// <param name="v">A vector to transform.</param> - /// <returns>The transfomed vector.</returns> + /// <returns>The transformed vector.</returns> public Vector2 BasisXform(Vector2 v) { return new Vector2(Tdotx(v), Tdoty(v)); @@ -195,7 +195,7 @@ namespace Godot /// basis matrix only if it represents a rotation-reflection. /// </summary> /// <param name="v">A vector to inversely transform.</param> - /// <returns>The inversely transfomed vector.</returns> + /// <returns>The inversely transformed vector.</returns> public Vector2 BasisXformInv(Vector2 v) { return new Vector2(x.Dot(v), y.Dot(v)); @@ -355,7 +355,7 @@ namespace Godot /// Returns a vector transformed (multiplied) by this transformation matrix. /// </summary> /// <param name="v">A vector to transform.</param> - /// <returns>The transfomed vector.</returns> + /// <returns>The transformed vector.</returns> public Vector2 Xform(Vector2 v) { return new Vector2(Tdotx(v), Tdoty(v)) + origin; @@ -365,7 +365,7 @@ namespace Godot /// Returns a vector transformed (multiplied) by the inverse transformation matrix. /// </summary> /// <param name="v">A vector to inversely transform.</param> - /// <returns>The inversely transfomed vector.</returns> + /// <returns>The inversely transformed vector.</returns> public Vector2 XformInv(Vector2 v) { Vector2 vInv = v - origin; |