diff options
Diffstat (limited to 'modules/mono')
-rw-r--r-- | modules/mono/editor/godotsharp_builds.cpp | 13 | ||||
-rw-r--r-- | modules/mono/editor/mono_bottom_panel.cpp | 23 | ||||
-rw-r--r-- | modules/mono/glue/cs_files/Basis.cs | 12 | ||||
-rw-r--r-- | modules/mono/glue/cs_files/Mathf.cs | 12 |
4 files changed, 33 insertions, 27 deletions
diff --git a/modules/mono/editor/godotsharp_builds.cpp b/modules/mono/editor/godotsharp_builds.cpp index ad07f043b2..2f2b5768db 100644 --- a/modules/mono/editor/godotsharp_builds.cpp +++ b/modules/mono/editor/godotsharp_builds.cpp @@ -525,11 +525,10 @@ void GodotSharpBuilds::BuildProcess::start(bool p_blocking) { } } -GodotSharpBuilds::BuildProcess::BuildProcess(const MonoBuildInfo &p_build_info, GodotSharpBuild_ExitCallback p_callback) { - - build_info = p_build_info; - build_tab = NULL; - exit_callback = p_callback; - exited = true; - exit_code = -1; +GodotSharpBuilds::BuildProcess::BuildProcess(const MonoBuildInfo &p_build_info, GodotSharpBuild_ExitCallback p_callback) : + build_info(p_build_info), + build_tab(NULL), + exit_callback(p_callback), + exited(true), + exit_code(-1) { } diff --git a/modules/mono/editor/mono_bottom_panel.cpp b/modules/mono/editor/mono_bottom_panel.cpp index 32aec2a3b5..f1cf0bcdf5 100644 --- a/modules/mono/editor/mono_bottom_panel.cpp +++ b/modules/mono/editor/mono_bottom_panel.cpp @@ -437,21 +437,16 @@ void MonoBuildTab::_bind_methods() { ClassDB::bind_method("_issue_activated", &MonoBuildTab::_issue_activated); } -MonoBuildTab::MonoBuildTab(const MonoBuildInfo &p_build_info, const String &p_logs_dir) { - - build_info = p_build_info; - logs_dir = p_logs_dir; - - build_exited = false; - - issues_list = memnew(ItemList); +MonoBuildTab::MonoBuildTab(const MonoBuildInfo &p_build_info, const String &p_logs_dir) : + build_info(p_build_info), + logs_dir(p_logs_dir), + build_exited(false), + issues_list(memnew(ItemList)), + error_count(0), + warning_count(0), + errors_visible(true), + warnings_visible(true) { issues_list->set_v_size_flags(SIZE_EXPAND_FILL); issues_list->connect("item_activated", this, "_issue_activated"); add_child(issues_list); - - error_count = 0; - warning_count = 0; - - errors_visible = true; - warnings_visible = true; } diff --git a/modules/mono/glue/cs_files/Basis.cs b/modules/mono/glue/cs_files/Basis.cs index 89b3e94c35..2e7e5404c4 100644 --- a/modules/mono/glue/cs_files/Basis.cs +++ b/modules/mono/glue/cs_files/Basis.cs @@ -49,20 +49,20 @@ namespace Godot public Vector3 x { - get => GetAxis(0); - set => SetAxis(0, value); + get { return GetAxis(0); } + set { SetAxis(0, value); } } public Vector3 y { - get => GetAxis(1); - set => SetAxis(1, value); + get { return GetAxis(1); } + set { SetAxis(1, value); } } public Vector3 z { - get => GetAxis(2); - set => SetAxis(2, value); + get { return GetAxis(2); } + set { SetAxis(2, value); } } private Vector3 _x; diff --git a/modules/mono/glue/cs_files/Mathf.cs b/modules/mono/glue/cs_files/Mathf.cs index 8b9c264d0d..adbcc855ef 100644 --- a/modules/mono/glue/cs_files/Mathf.cs +++ b/modules/mono/glue/cs_files/Mathf.cs @@ -257,5 +257,17 @@ namespace Godot { return (real_t)Math.Tanh(s); } + + public static int Wrap(int val, int min, int max) + { + int rng = max - min; + return min + ((((val - min) % rng) + rng) % rng); + } + + public static real_t Wrap(real_t val, real_t min, real_t max) + { + real_t rng = max - min; + return min + (val - min) - (rng * Floor((val - min) / rng)); + } } } |