diff --git a/core/extension/gdextension_interface.h b/core/extension/gdextension_interface.h index 8268afc3adcb..b401acef8295 100644 --- a/core/extension/gdextension_interface.h +++ b/core/extension/gdextension_interface.h @@ -842,7 +842,7 @@ typedef void (*GDExtensionInterfaceMemFree)(void *p_ptr); * * Logs an error to Godot's built-in debugger and to the OS terminal. * - * @param p_description The code trigging the error. + * @param p_description The code triggering the error. * @param p_function The function name where the error occurred. * @param p_file The file where the error occurred. * @param p_line The line where the error occurred. @@ -856,7 +856,7 @@ typedef void (*GDExtensionInterfacePrintError)(const char *p_description, const * * Logs an error with a message to Godot's built-in debugger and to the OS terminal. * - * @param p_description The code trigging the error. + * @param p_description The code triggering the error. * @param p_message The message to show along with the error. * @param p_function The function name where the error occurred. * @param p_file The file where the error occurred. @@ -871,7 +871,7 @@ typedef void (*GDExtensionInterfacePrintErrorWithMessage)(const char *p_descript * * Logs a warning to Godot's built-in debugger and to the OS terminal. * - * @param p_description The code trigging the warning. + * @param p_description The code triggering the warning. * @param p_function The function name where the warning occurred. * @param p_file The file where the warning occurred. * @param p_line The line where the warning occurred. @@ -885,7 +885,7 @@ typedef void (*GDExtensionInterfacePrintWarning)(const char *p_description, cons * * Logs a warning with a message to Godot's built-in debugger and to the OS terminal. * - * @param p_description The code trigging the warning. + * @param p_description The code triggering the warning. * @param p_message The message to show along with the warning. * @param p_function The function name where the warning occurred. * @param p_file The file where the warning occurred. @@ -900,7 +900,7 @@ typedef void (*GDExtensionInterfacePrintWarningWithMessage)(const char *p_descri * * Logs a script error to Godot's built-in debugger and to the OS terminal. * - * @param p_description The code trigging the error. + * @param p_description The code triggering the error. * @param p_function The function name where the error occurred. * @param p_file The file where the error occurred. * @param p_line The line where the error occurred. @@ -914,7 +914,7 @@ typedef void (*GDExtensionInterfacePrintScriptError)(const char *p_description, * * Logs a script error with a message to Godot's built-in debugger and to the OS terminal. * - * @param p_description The code trigging the error. + * @param p_description The code triggering the error. * @param p_message The message to show along with the error. * @param p_function The function name where the error occurred. * @param p_file The file where the error occurred. diff --git a/core/object/script_language.cpp b/core/object/script_language.cpp index 542cb2b24d90..5afe45ca359f 100644 --- a/core/object/script_language.cpp +++ b/core/object/script_language.cpp @@ -568,7 +568,7 @@ void ScriptLanguage::frame() { } TypedArray ScriptLanguage::CodeCompletionOption::get_option_characteristics(const String &p_base) { - // Return characacteristics of the match found by order of importance. + // Return characteristics of the match found by order of importance. // Matches will be ranked by a lexicographical order on the vector returned by this function. // The lower values indicate better matches and that they should go before in the order of appearance. if (last_matches == matches) { diff --git a/core/string/translation_server.cpp b/core/string/translation_server.cpp index 3d49d482dd6b..cb2bfad6df24 100644 --- a/core/string/translation_server.cpp +++ b/core/string/translation_server.cpp @@ -483,6 +483,7 @@ void TranslationServer::setup() { main_domain->set_pseudolocalization_skip_placeholders_enabled(GLOBAL_DEF("internationalization/pseudolocalization/skip_placeholders", true)); #ifdef TOOLS_ENABLED + ProjectSettings::get_singleton()->set_custom_property_info(PropertyInfo(Variant::STRING, "internationalization/locale/test", PROPERTY_HINT_LOCALE_ID, "")); ProjectSettings::get_singleton()->set_custom_property_info(PropertyInfo(Variant::STRING, "internationalization/locale/fallback", PROPERTY_HINT_LOCALE_ID, "")); #endif } diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml index b4a256c54f94..d7009a96fa91 100644 --- a/doc/classes/BaseMaterial3D.xml +++ b/doc/classes/BaseMaterial3D.xml @@ -88,7 +88,7 @@ The strength of the anisotropy effect. This is multiplied by [member anisotropy_flowmap]'s alpha channel if a texture is defined there and the texture contains an alpha channel. - If [code]true[/code], anisotropy is enabled. Anisotropy changes the shape of the specular blob and aligns it to tangent space. This is useful for brushed aluminium and hair reflections. + If [code]true[/code], anisotropy is enabled. Anisotropy changes the shape of the specular blob and aligns it to tangent space. This is useful for brushed aluminum and hair reflections. [b]Note:[/b] Mesh tangents are needed for anisotropy to work. If the mesh does not contain tangents, the anisotropy effect will appear broken. [b]Note:[/b] Material anisotropy should not to be confused with anisotropic texture filtering, which can be enabled by setting [member texture_filter] to [constant TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC]. diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 3cb76e2926a6..1e12d619e22f 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -1316,7 +1316,7 @@ Duplicate the node's script (also overriding the duplicated children's scripts, if combined with [constant DUPLICATE_USE_INSTANTIATION]). - Duplicate using [method PackedScene.instantiate]. If the node comes from a scene saved on disk, re-uses [method PackedScene.instantiate] as the base for the duplicated node and its children. + Duplicate using [method PackedScene.instantiate]. If the node comes from a scene saved on disk, reuses [method PackedScene.instantiate] as the base for the duplicated node and its children. The node will not be internal. diff --git a/doc/classes/String.xml b/doc/classes/String.xml index d0512b8e1cbc..69441e0010c6 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -6,7 +6,7 @@ This is the built-in string Variant type (and the one used by GDScript). Strings may contain any number of Unicode characters, and expose methods useful for manipulating and generating strings. Strings are reference-counted and use a copy-on-write approach (every modification to a string returns a new [String]), so passing them around is cheap in resources. Some string methods have corresponding variations. Variations suffixed with [code]n[/code] ([method countn], [method findn], [method replacen], etc.) are [b]case-insensitive[/b] (they make no distinction between uppercase and lowercase letters). Method variations prefixed with [code]r[/code] ([method rfind], [method rsplit], etc.) are reversed, and start from the end of the string, instead of the beginning. - To convert any Variant to or from a string, see [method @GlobalScope.str], [method @GlobalScope.str_to_var], and [method @GlobalScope.var_to_str]. + To convert any [Variant] to or from a string, see [method @GlobalScope.str], [method @GlobalScope.str_to_var], and [method @GlobalScope.var_to_str]. [b]Note:[/b] In a boolean context, a string will evaluate to [code]false[/code] if it is empty ([code]""[/code]). Otherwise, a string will always evaluate to [code]true[/code]. diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml index 147d9fa4bd53..1c4dcc890d96 100644 --- a/doc/classes/Tween.xml +++ b/doc/classes/Tween.xml @@ -89,7 +89,7 @@ [/codeblocks] Some [Tweener]s use transitions and eases. The first accepts a [enum TransitionType] constant, and refers to the way the timing of the animation is handled (see [url=https://easings.net/]easings.net[/url] for some examples). The second accepts an [enum EaseType] constant, and controls where the [code]trans_type[/code] is applied to the interpolation (in the beginning, the end, or both). If you don't know which transition and easing to pick, you can try different [enum TransitionType] constants with [constant EASE_IN_OUT], and use the one that looks best. [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/tween_cheatsheet.webp]Tween easing and transition types cheatsheet[/url] - [b]Note:[/b] Tweens are not designed to be re-used and trying to do so results in an undefined behavior. Create a new Tween for each animation and every time you replay an animation from start. Keep in mind that Tweens start immediately, so only create a Tween when you want to start animating. + [b]Note:[/b] Tweens are not designed to be reused and trying to do so results in an undefined behavior. Create a new Tween for each animation and every time you replay an animation from start. Keep in mind that Tweens start immediately, so only create a Tween when you want to start animating. [b]Note:[/b] The tween is processed after all of the nodes in the current frame, i.e. node's [method Node._process] method would be called before the tween (or [method Node._physics_process] depending on the value passed to [method set_process_mode]). diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml index 6e833ef25a52..87c40af8bb27 100644 --- a/doc/classes/Window.xml +++ b/doc/classes/Window.xml @@ -805,6 +805,7 @@ Full screen mode with full multi-window support. Full screen window covers the entire display area of a screen and has no decorations. The display's video mode is not changed. + [b]On Android:[/b] This enables immersive mode. [b]On Windows:[/b] Multi-window full-screen mode has a 1px border of the [member ProjectSettings.rendering/environment/defaults/default_clear_color] color. [b]On macOS:[/b] A new desktop is used to display the running project. [b]Note:[/b] Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling full screen mode. @@ -812,6 +813,7 @@ A single window full screen mode. This mode has less overhead, but only one window can be open on a given screen at a time (opening a child window or application switching will trigger a full screen transition). Full screen window covers the entire display area of a screen and has no border or decorations. The display's video mode is not changed. + [b]On Android:[/b] This enables immersive mode. [b]On Windows:[/b] Depending on video driver, full screen transition might cause screens to go black for a moment. [b]On macOS:[/b] A new desktop is used to display the running project. Exclusive full screen mode prevents Dock and Menu from showing up when the mouse pointer is hovering the edge of the screen. [b]On Linux (X11):[/b] Exclusive full screen mode bypasses compositor. diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index 1a612a3e551d..c8dc1a92684b 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -1298,12 +1298,12 @@ void AnimationTimelineEdit::_zoom_changed(double) { double timeline_right = timeline_left + timeline_width_seconds; double timeline_center = timeline_left + timeline_width_seconds / 2.0; - if (zoom_callback_occured) { // Zooming with scroll wheel will focus on the position of the mouse. + if (zoom_callback_occurred) { // Zooming with scroll wheel will focus on the position of the mouse. double zoom_scroll_origin_norm = (zoom_scroll_origin.x - get_name_limit()) / timeline_width_pixels; zoom_scroll_origin_norm = MAX(zoom_scroll_origin_norm, 0); zoom_pivot = timeline_left + timeline_width_seconds * zoom_scroll_origin_norm; zoom_pivot_delta = updated_timeline_width_seconds * zoom_scroll_origin_norm; - zoom_callback_occured = false; + zoom_callback_occurred = false; } else { // Zooming with slider will depend on the current play position. // If the play position is not in range, or exactly in the center, zoom in on the center. if (get_play_position() < timeline_left || get_play_position() > timeline_left + timeline_width_seconds || get_play_position() == timeline_center) { @@ -1952,7 +1952,7 @@ void AnimationTimelineEdit::_pan_callback(Vector2 p_scroll_vec, Ref void AnimationTimelineEdit::_zoom_callback(float p_zoom_factor, Vector2 p_origin, Ref p_event) { double current_zoom_value = get_zoom()->get_value(); zoom_scroll_origin = p_origin; - zoom_callback_occured = true; + zoom_callback_occurred = true; get_zoom()->set_value(MAX(0.01, current_zoom_value - (1.0 - p_zoom_factor))); } diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h index f17386b0c903..5d998aed66f1 100644 --- a/editor/animation_track_editor.h +++ b/editor/animation_track_editor.h @@ -232,7 +232,7 @@ class AnimationTimelineEdit : public Range { double hscroll_on_zoom_buffer = -1.0; Vector2 zoom_scroll_origin; - bool zoom_callback_occured = false; + bool zoom_callback_occurred = false; virtual void gui_input(const Ref &p_event) override; void _track_added(int p_track); diff --git a/editor/editor_log.h b/editor/editor_log.h index 899b4a9ac491..da2503bb4f6e 100644 --- a/editor/editor_log.h +++ b/editor/editor_log.h @@ -145,11 +145,10 @@ class EditorLog : public HBoxContainer { Button *show_search_button = nullptr; LineEdit *search_box = nullptr; - // Reference to the "Output" button on the toolbar so we can update it's icon when - // Warnings or Errors are encounetered. + // Reference to the "Output" button on the toolbar so we can update its icon when warnings or errors are encountered. Button *tool_button = nullptr; - bool is_loading_state = false; // Used to disable saving requests while loading (some signals from buttons will try trigger a save, which happens during loading). + bool is_loading_state = false; // Used to disable saving requests while loading (some signals from buttons will trigger a save, which happens during loading). Timer *save_state_timer = nullptr; static void _error_handler(void *p_self, const char *p_func, const char *p_file, int p_line, const char *p_error, const char *p_errorexp, bool p_editor_notify, ErrorHandlerType p_type); diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index ca0241b6c15d..fd41253c5b2f 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -3364,169 +3364,169 @@ void VisualShaderEditor::_setup_node(VisualShaderNode *p_node, const Vector(p_node); + VisualShaderNodeFloatOp *float_op = Object::cast_to(p_node); - if (floatOp) { + if (float_op) { ERR_FAIL_COND(p_ops[0].get_type() != Variant::INT); - floatOp->set_operator((VisualShaderNodeFloatOp::Operator)(int)p_ops[0]); + float_op->set_operator((VisualShaderNodeFloatOp::Operator)(int)p_ops[0]); return; } } // FLOAT_FUNC { - VisualShaderNodeFloatFunc *floatFunc = Object::cast_to(p_node); + VisualShaderNodeFloatFunc *float_func = Object::cast_to(p_node); - if (floatFunc) { + if (float_func) { ERR_FAIL_COND(p_ops[0].get_type() != Variant::INT); - floatFunc->set_function((VisualShaderNodeFloatFunc::Function)(int)p_ops[0]); + float_func->set_function((VisualShaderNodeFloatFunc::Function)(int)p_ops[0]); return; } } // VECTOR_OP { - VisualShaderNodeVectorOp *vecOp = Object::cast_to(p_node); + VisualShaderNodeVectorOp *vec_op = Object::cast_to(p_node); - if (vecOp) { + if (vec_op) { ERR_FAIL_COND(p_ops[0].get_type() != Variant::INT); ERR_FAIL_COND(p_ops[1].get_type() != Variant::INT); - vecOp->set_operator((VisualShaderNodeVectorOp::Operator)(int)p_ops[0]); - vecOp->set_op_type((VisualShaderNodeVectorOp::OpType)(int)p_ops[1]); + vec_op->set_operator((VisualShaderNodeVectorOp::Operator)(int)p_ops[0]); + vec_op->set_op_type((VisualShaderNodeVectorOp::OpType)(int)p_ops[1]); return; } } // VECTOR_FUNC { - VisualShaderNodeVectorFunc *vecFunc = Object::cast_to(p_node); + VisualShaderNodeVectorFunc *vec_func = Object::cast_to(p_node); - if (vecFunc) { + if (vec_func) { ERR_FAIL_COND(p_ops[0].get_type() != Variant::INT); ERR_FAIL_COND(p_ops[1].get_type() != Variant::INT); - vecFunc->set_function((VisualShaderNodeVectorFunc::Function)(int)p_ops[0]); - vecFunc->set_op_type((VisualShaderNodeVectorFunc::OpType)(int)p_ops[1]); + vec_func->set_function((VisualShaderNodeVectorFunc::Function)(int)p_ops[0]); + vec_func->set_op_type((VisualShaderNodeVectorFunc::OpType)(int)p_ops[1]); return; } } // COLOR_OP { - VisualShaderNodeColorOp *colorOp = Object::cast_to(p_node); + VisualShaderNodeColorOp *color_op = Object::cast_to(p_node); - if (colorOp) { + if (color_op) { ERR_FAIL_COND(p_ops[0].get_type() != Variant::INT); - colorOp->set_operator((VisualShaderNodeColorOp::Operator)(int)p_ops[0]); + color_op->set_operator((VisualShaderNodeColorOp::Operator)(int)p_ops[0]); return; } } // COLOR_FUNC { - VisualShaderNodeColorFunc *colorFunc = Object::cast_to(p_node); + VisualShaderNodeColorFunc *color_func = Object::cast_to(p_node); - if (colorFunc) { + if (color_func) { ERR_FAIL_COND(p_ops[0].get_type() != Variant::INT); - colorFunc->set_function((VisualShaderNodeColorFunc::Function)(int)p_ops[0]); + color_func->set_function((VisualShaderNodeColorFunc::Function)(int)p_ops[0]); return; } } // INT_OP { - VisualShaderNodeIntOp *intOp = Object::cast_to(p_node); + VisualShaderNodeIntOp *int_op = Object::cast_to(p_node); - if (intOp) { + if (int_op) { ERR_FAIL_COND(p_ops[0].get_type() != Variant::INT); - intOp->set_operator((VisualShaderNodeIntOp::Operator)(int)p_ops[0]); + int_op->set_operator((VisualShaderNodeIntOp::Operator)(int)p_ops[0]); return; } } // INT_FUNC { - VisualShaderNodeIntFunc *intFunc = Object::cast_to(p_node); + VisualShaderNodeIntFunc *int_func = Object::cast_to(p_node); - if (intFunc) { + if (int_func) { ERR_FAIL_COND(p_ops[0].get_type() != Variant::INT); - intFunc->set_function((VisualShaderNodeIntFunc::Function)(int)p_ops[0]); + int_func->set_function((VisualShaderNodeIntFunc::Function)(int)p_ops[0]); return; } } // UINT_OP { - VisualShaderNodeUIntOp *uintOp = Object::cast_to(p_node); + VisualShaderNodeUIntOp *uint_op = Object::cast_to(p_node); - if (uintOp) { + if (uint_op) { ERR_FAIL_COND(p_ops[0].get_type() != Variant::INT); - uintOp->set_operator((VisualShaderNodeUIntOp::Operator)(int)p_ops[0]); + uint_op->set_operator((VisualShaderNodeUIntOp::Operator)(int)p_ops[0]); return; } } // UINT_FUNC { - VisualShaderNodeUIntFunc *uintFunc = Object::cast_to(p_node); + VisualShaderNodeUIntFunc *uint_func = Object::cast_to(p_node); - if (uintFunc) { + if (uint_func) { ERR_FAIL_COND(p_ops[0].get_type() != Variant::INT); - uintFunc->set_function((VisualShaderNodeUIntFunc::Function)(int)p_ops[0]); + uint_func->set_function((VisualShaderNodeUIntFunc::Function)(int)p_ops[0]); return; } } // TRANSFORM_OP { - VisualShaderNodeTransformOp *matOp = Object::cast_to(p_node); + VisualShaderNodeTransformOp *mat_op = Object::cast_to(p_node); - if (matOp) { + if (mat_op) { ERR_FAIL_COND(p_ops[0].get_type() != Variant::INT); - matOp->set_operator((VisualShaderNodeTransformOp::Operator)(int)p_ops[0]); + mat_op->set_operator((VisualShaderNodeTransformOp::Operator)(int)p_ops[0]); return; } } // TRANSFORM_FUNC { - VisualShaderNodeTransformFunc *matFunc = Object::cast_to(p_node); + VisualShaderNodeTransformFunc *mat_func = Object::cast_to(p_node); - if (matFunc) { + if (mat_func) { ERR_FAIL_COND(p_ops[0].get_type() != Variant::INT); - matFunc->set_function((VisualShaderNodeTransformFunc::Function)(int)p_ops[0]); + mat_func->set_function((VisualShaderNodeTransformFunc::Function)(int)p_ops[0]); return; } } // VECTOR_COMPOSE { - VisualShaderNodeVectorCompose *vecCompose = Object::cast_to(p_node); + VisualShaderNodeVectorCompose *vec_compose = Object::cast_to(p_node); - if (vecCompose) { + if (vec_compose) { ERR_FAIL_COND(p_ops[0].get_type() != Variant::INT); - vecCompose->set_op_type((VisualShaderNodeVectorCompose::OpType)(int)p_ops[0]); + vec_compose->set_op_type((VisualShaderNodeVectorCompose::OpType)(int)p_ops[0]); return; } } // VECTOR_DECOMPOSE { - VisualShaderNodeVectorDecompose *vecDecompose = Object::cast_to(p_node); + VisualShaderNodeVectorDecompose *vec_decompose = Object::cast_to(p_node); - if (vecDecompose) { + if (vec_decompose) { ERR_FAIL_COND(p_ops[0].get_type() != Variant::INT); - vecDecompose->set_op_type((VisualShaderNodeVectorDecompose::OpType)(int)p_ops[0]); + vec_decompose->set_op_type((VisualShaderNodeVectorDecompose::OpType)(int)p_ops[0]); return; } } // UV_FUNC { - VisualShaderNodeUVFunc *uvFunc = Object::cast_to(p_node); + VisualShaderNodeUVFunc *uv_func = Object::cast_to(p_node); - if (uvFunc) { + if (uv_func) { ERR_FAIL_COND(p_ops[0].get_type() != Variant::INT); - uvFunc->set_function((VisualShaderNodeUVFunc::Function)(int)p_ops[0]); + uv_func->set_function((VisualShaderNodeUVFunc::Function)(int)p_ops[0]); return; } } @@ -3566,13 +3566,13 @@ void VisualShaderEditor::_setup_node(VisualShaderNode *p_node, const Vector(p_node); + VisualShaderNodeDerivativeFunc *der_func = Object::cast_to(p_node); - if (derFunc) { + if (der_func) { ERR_FAIL_COND(p_ops[0].get_type() != Variant::INT); ERR_FAIL_COND(p_ops[1].get_type() != Variant::INT); - derFunc->set_function((VisualShaderNodeDerivativeFunc::Function)(int)p_ops[0]); - derFunc->set_op_type((VisualShaderNodeDerivativeFunc::OpType)(int)p_ops[1]); + der_func->set_function((VisualShaderNodeDerivativeFunc::Function)(int)p_ops[0]); + der_func->set_op_type((VisualShaderNodeDerivativeFunc::OpType)(int)p_ops[1]); return; } } @@ -3590,32 +3590,32 @@ void VisualShaderEditor::_setup_node(VisualShaderNode *p_node, const Vector(p_node); + VisualShaderNodeClamp *clamp_func = Object::cast_to(p_node); - if (clampFunc) { + if (clamp_func) { ERR_FAIL_COND(p_ops[0].get_type() != Variant::INT); - clampFunc->set_op_type((VisualShaderNodeClamp::OpType)(int)p_ops[0]); + clamp_func->set_op_type((VisualShaderNodeClamp::OpType)(int)p_ops[0]); return; } } // SWITCH { - VisualShaderNodeSwitch *switchFunc = Object::cast_to(p_node); + VisualShaderNodeSwitch *switch_func = Object::cast_to(p_node); - if (switchFunc) { + if (switch_func) { ERR_FAIL_COND(p_ops[0].get_type() != Variant::INT); - switchFunc->set_op_type((VisualShaderNodeSwitch::OpType)(int)p_ops[0]); + switch_func->set_op_type((VisualShaderNodeSwitch::OpType)(int)p_ops[0]); return; } } // FACEFORWARD { - VisualShaderNodeFaceForward *faceForward = Object::cast_to(p_node); - if (faceForward) { + VisualShaderNodeFaceForward *face_forward = Object::cast_to(p_node); + if (face_forward) { ERR_FAIL_COND(p_ops[0].get_type() != Variant::INT); - faceForward->set_op_type((VisualShaderNodeFaceForward::OpType)(int)p_ops[0]); + face_forward->set_op_type((VisualShaderNodeFaceForward::OpType)(int)p_ops[0]); return; } } @@ -3632,33 +3632,33 @@ void VisualShaderEditor::_setup_node(VisualShaderNode *p_node, const Vector(p_node); + VisualShaderNodeSmoothStep *smooth_step_func = Object::cast_to(p_node); - if (smoothStepFunc) { + if (smooth_step_func) { ERR_FAIL_COND(p_ops[0].get_type() != Variant::INT); - smoothStepFunc->set_op_type((VisualShaderNodeSmoothStep::OpType)(int)p_ops[0]); + smooth_step_func->set_op_type((VisualShaderNodeSmoothStep::OpType)(int)p_ops[0]); return; } } // STEP { - VisualShaderNodeStep *stepFunc = Object::cast_to(p_node); + VisualShaderNodeStep *step_func = Object::cast_to(p_node); - if (stepFunc) { + if (step_func) { ERR_FAIL_COND(p_ops[0].get_type() != Variant::INT); - stepFunc->set_op_type((VisualShaderNodeStep::OpType)(int)p_ops[0]); + step_func->set_op_type((VisualShaderNodeStep::OpType)(int)p_ops[0]); return; } } // MULTIPLY_ADD { - VisualShaderNodeMultiplyAdd *fmaFunc = Object::cast_to(p_node); + VisualShaderNodeMultiplyAdd *fma_func = Object::cast_to(p_node); - if (fmaFunc) { + if (fma_func) { ERR_FAIL_COND(p_ops[0].get_type() != Variant::INT); - fmaFunc->set_op_type((VisualShaderNodeMultiplyAdd::OpType)(int)p_ops[0]); + fma_func->set_op_type((VisualShaderNodeMultiplyAdd::OpType)(int)p_ops[0]); } } diff --git a/misc/dist/html/editor.html b/misc/dist/html/editor.html index 4f2a3bc0531f..9bc9474cfd2f 100644 --- a/misc/dist/html/editor.html +++ b/misc/dist/html/editor.html @@ -710,7 +710,7 @@

Important - Please read } else if (typeof err === 'string') { setStatusNotice(err); } else { - setStatusNotice('An unknown error occured'); + setStatusNotice('An unknown error occurred.'); } setStatusMode('notice'); initializing = false; diff --git a/misc/dist/html/full-size.html b/misc/dist/html/full-size.html index 3d68b66f49d1..4bb311fe7b16 100644 --- a/misc/dist/html/full-size.html +++ b/misc/dist/html/full-size.html @@ -140,7 +140,7 @@ } else if (typeof err === 'string') { setStatusNotice(err); } else { - setStatusNotice('An unknown error occured'); + setStatusNotice('An unknown error occurred.'); } setStatusMode('notice'); initializing = false; diff --git a/modules/gdscript/gdscript_byte_codegen.cpp b/modules/gdscript/gdscript_byte_codegen.cpp index fb4d27caab4e..122e9cb4bad6 100644 --- a/modules/gdscript/gdscript_byte_codegen.cpp +++ b/modules/gdscript/gdscript_byte_codegen.cpp @@ -1879,7 +1879,7 @@ void GDScriptByteCodeGenerator::end_block() { void GDScriptByteCodeGenerator::clear_temporaries() { for (int slot_idx : temporaries_pending_clear) { - // The temporary may have been re-used as something else since it was added to the list. + // The temporary may have been reused as something else since it was added to the list. // In that case, there's **no** need to clear it. if (temporaries[slot_idx].can_contain_object) { clear_address(Address(Address::TEMPORARY, slot_idx)); // Can contain `RefCounted`, so clear it. @@ -1928,7 +1928,7 @@ void GDScriptByteCodeGenerator::clear_address(const Address &p_address) { } } -// Returns `true` if the local has been re-used and not cleaned up with `clear_address()`. +// Returns `true` if the local has been reused and not cleaned up with `clear_address()`. bool GDScriptByteCodeGenerator::is_local_dirty(const Address &p_address) const { ERR_FAIL_COND_V(p_address.mode != Address::LOCAL_VARIABLE, false); return dirty_locals.has(p_address.address); diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp index f4f445e09667..a8d0f7dbf65d 100644 --- a/modules/gdscript/gdscript_compiler.cpp +++ b/modules/gdscript/gdscript_compiler.cpp @@ -2188,7 +2188,7 @@ Error GDScriptCompiler::_parse_block(CodeGen &codegen, const GDScriptParser::Sui initialized = true; } else if ((local_type.has_type && local_type.kind == GDScriptDataType::BUILTIN) || codegen.generator->is_local_dirty(local)) { // Initialize with default for the type. Built-in types must always be cleared (they cannot be `null`). - // Objects and untyped variables are assigned to `null` only if the stack address has been re-used and not cleared. + // Objects and untyped variables are assigned to `null` only if the stack address has been reused and not cleared. codegen.generator->clear_address(local); initialized = true; } diff --git a/modules/godot_physics_3d/godot_space_3d.cpp b/modules/godot_physics_3d/godot_space_3d.cpp index 9f82a87f8522..9c7ba6af7783 100644 --- a/modules/godot_physics_3d/godot_space_3d.cpp +++ b/modules/godot_physics_3d/godot_space_3d.cpp @@ -468,7 +468,7 @@ static void _rest_cbk_result(const Vector3 &p_point_A, int p_index_A, const Vect real_t tested_len = is_best_result ? rd->best_result.len : len; for (; result_index < prev_result_count - 1; ++result_index) { if (tested_len > rd->other_results[result_index].len) { - // Re-using a previous result. + // Reusing a previous result. rd->result_count--; break; } diff --git a/modules/godot_physics_3d/joints/godot_pin_joint_3d.cpp b/modules/godot_physics_3d/joints/godot_pin_joint_3d.cpp index 05ae0839e4f1..304c05f59d5d 100644 --- a/modules/godot_physics_3d/joints/godot_pin_joint_3d.cpp +++ b/modules/godot_physics_3d/joints/godot_pin_joint_3d.cpp @@ -96,7 +96,7 @@ void GodotPinJoint3D::solve(real_t p_step) { Vector3 rel_pos1 = pivotAInW - A->get_transform().origin; Vector3 rel_pos2 = pivotBInW - B->get_transform().origin; - //this jacobian entry could be re-used for all iterations + //this jacobian entry could be reused for all iterations Vector3 vel1 = A->get_velocity_in_local_point(rel_pos1); Vector3 vel2 = B->get_velocity_in_local_point(rel_pos2); diff --git a/scene/2d/line_builder.cpp b/scene/2d/line_builder.cpp index f8a8aa487c36..ea949712ee2c 100644 --- a/scene/2d/line_builder.cpp +++ b/scene/2d/line_builder.cpp @@ -370,7 +370,7 @@ void LineBuilder::build() { } if (!is_intersecting) { - // In this case the joint is too corrupted to be re-used, + // In this case the joint is too corrupted to be reused, // start again the strip with fallback points strip_begin(pos_up0, pos_down0, color1, uvx1); } diff --git a/scene/3d/physics/vehicle_body_3d.cpp b/scene/3d/physics/vehicle_body_3d.cpp index 981e872af229..f414195615c6 100644 --- a/scene/3d/physics/vehicle_body_3d.cpp +++ b/scene/3d/physics/vehicle_body_3d.cpp @@ -542,7 +542,7 @@ void VehicleBody3D::_resolve_single_bilateral(PhysicsDirectBodyState3D *s, const if (body2) { rel_pos2 = pos2 - body2->get_global_transform().origin; } - //this jacobian entry could be re-used for all iterations + // This jacobian entry could be reused for all iterations. Vector3 vel1 = s->get_linear_velocity() + (s->get_angular_velocity()).cross(rel_pos1); // * mPos); Vector3 vel2; diff --git a/scene/gui/code_edit.cpp b/scene/gui/code_edit.cpp index 89f156477577..cbd51ca69456 100644 --- a/scene/gui/code_edit.cpp +++ b/scene/gui/code_edit.cpp @@ -3545,13 +3545,13 @@ void CodeEdit::_filter_code_completion_candidates_impl() { for (int i = 1; *string_to_complete_char_lower && (all_possible_subsequence_matches.size() > 0); i++, string_to_complete_char_lower++) { // find all occurrences of ssq_lower to avoid looking everywhere each time - Vector all_ocurence; + Vector all_occurrences; if (long_option) { - all_ocurence.push_back(target_lower.find_char(*string_to_complete_char_lower)); + all_occurrences.push_back(target_lower.find_char(*string_to_complete_char_lower)); } else { for (int j = i; j < target_lower.length(); j++) { if (target_lower[j] == *string_to_complete_char_lower) { - all_ocurence.push_back(j); + all_occurrences.push_back(j); } } } @@ -3569,7 +3569,7 @@ void CodeEdit::_filter_code_completion_candidates_impl() { continue; } } - for (int index : all_ocurence) { + for (int index : all_occurrences) { if (index > next_index) { Vector> new_match = subsequence_match; new_match.push_back({ index, 1 }); diff --git a/servers/audio/effects/audio_effect_record.cpp b/servers/audio/effects/audio_effect_record.cpp index 6f358d54bb33..4e8a17af0283 100644 --- a/servers/audio/effects/audio_effect_record.cpp +++ b/servers/audio/effects/audio_effect_record.cpp @@ -125,7 +125,7 @@ Ref AudioEffectRecord::instantiate() { ins.instantiate(); ins->is_recording = false; - //Re-using the buffer size calculations from audio_effect_delay.cpp + // Reusing the buffer size calculations from audio_effect_delay.cpp. float ring_buffer_max_size = IO_BUFFER_SIZE_MS; ring_buffer_max_size /= 1000.0; //convert to seconds ring_buffer_max_size *= AudioServer::get_singleton()->get_mix_rate(); diff --git a/servers/audio/effects/audio_effect_stereo_enhance.cpp b/servers/audio/effects/audio_effect_stereo_enhance.cpp index e0ea97f90fbe..f32904036b8f 100644 --- a/servers/audio/effects/audio_effect_stereo_enhance.cpp +++ b/servers/audio/effects/audio_effect_stereo_enhance.cpp @@ -39,34 +39,34 @@ void AudioEffectStereoEnhanceInstance::process(const AudioFrame *p_src_frames, A unsigned int delay_frames = (base->time_pullout / 1000.0) * AudioServer::get_singleton()->get_mix_rate(); for (int i = 0; i < p_frame_count; i++) { - float l = p_src_frames[i].left; - float r = p_src_frames[i].right; + float left = p_src_frames[i].left; + float right = p_src_frames[i].right; - float center = (l + r) / 2.0f; + float center = (left + right) / 2.0f; - l = (center + (l - center) * intensity); - r = (center + (r - center) * intensity); + left = (center + (left - center) * intensity); + right = (center + (right - center) * intensity); if (surround_mode) { - float val = (l + r) / 2.0; + float val = (left + right) / 2.0; delay_ringbuff[ringbuff_pos & ringbuff_mask] = val; float out = delay_ringbuff[(ringbuff_pos - delay_frames) & ringbuff_mask] * surround_amount; - l += out; - r += -out; + left += out; + right += -out; } else { - float val = r; + float val = right; delay_ringbuff[ringbuff_pos & ringbuff_mask] = val; - //r is delayed - r = delay_ringbuff[(ringbuff_pos - delay_frames) & ringbuff_mask]; + // The right channel is delayed. + right = delay_ringbuff[(ringbuff_pos - delay_frames) & ringbuff_mask]; } - p_dst_frames[i].left = l; - p_dst_frames[i].right = r; + p_dst_frames[i].left = left; + p_dst_frames[i].right = right; ringbuff_pos++; } }