diff --git a/core/command_queue_mt.h b/core/command_queue_mt.h index cecc9e405dc..3942b961d3a 100644 --- a/core/command_queue_mt.h +++ b/core/command_queue_mt.h @@ -55,7 +55,7 @@ #define _COMMA_11 , #define _COMMA_12 , -// 1-based comma separed list of ITEMs +// 1-based comma separated list of ITEMs #define COMMA_SEP_LIST(ITEM, LENGTH) _COMMA_SEP_LIST_##LENGTH(ITEM) #define _COMMA_SEP_LIST_12(ITEM) \ _COMMA_SEP_LIST_11(ITEM) \ @@ -95,7 +95,7 @@ ITEM(1) #define _COMMA_SEP_LIST_0(ITEM) -// 1-based semicolon separed list of ITEMs +// 1-based semicolon separated list of ITEMs #define SEMIC_SEP_LIST(ITEM, LENGTH) _SEMIC_SEP_LIST_##LENGTH(ITEM) #define _SEMIC_SEP_LIST_12(ITEM) \ _SEMIC_SEP_LIST_11(ITEM); \ @@ -135,7 +135,7 @@ ITEM(1) #define _SEMIC_SEP_LIST_0(ITEM) -// 1-based space separed list of ITEMs +// 1-based space separated list of ITEMs #define SPACE_SEP_LIST(ITEM, LENGTH) _SPACE_SEP_LIST_##LENGTH(ITEM) #define _SPACE_SEP_LIST_12(ITEM) \ _SPACE_SEP_LIST_11(ITEM) \ diff --git a/core/compressed_translation.h b/core/compressed_translation.h index 400fa4491b0..ccc47d0bf6d 100644 --- a/core/compressed_translation.h +++ b/core/compressed_translation.h @@ -38,7 +38,7 @@ class PHashTranslation : public Translation { GDCLASS(PHashTranslation, Translation); //this translation uses a sort of modified perfect hash algorithm - //it requieres hashing strings twice and then does a binary search, + //it requires hashing strings twice and then does a binary search, //so it's slower, but at the same time it has an extreemly high chance //of catching untranslated strings diff --git a/core/error_macros.h b/core/error_macros.h index 1f9164a99b1..b8d0c7e0c37 100644 --- a/core/error_macros.h +++ b/core/error_macros.h @@ -33,7 +33,7 @@ #include "typedefs.h" /** - * Error macros. Unlike exceptions and asserts, these macros try to mantain consistency and stability + * Error macros. Unlike exceptions and asserts, these macros try to maintain consistency and stability * inside the code. It is recommended to always return processable data, so in case of an error, the * engine can stay working well. * In most cases, bugs and/or invalid data are not fatal and should never allow a perfectly running application diff --git a/core/global_constants.cpp b/core/global_constants.cpp index a24bf03c9a9..04810afe73c 100644 --- a/core/global_constants.cpp +++ b/core/global_constants.cpp @@ -580,7 +580,7 @@ void register_global_constants() { BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_COLOR_ARRAY", Variant::POOL_COLOR_ARRAY); BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_MAX", Variant::VARIANT_MAX); - //comparation + //comparison BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_EQUAL", Variant::OP_EQUAL); BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_NOT_EQUAL", Variant::OP_NOT_EQUAL); BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_LESS", Variant::OP_LESS); diff --git a/core/io/ip_address.cpp b/core/io/ip_address.cpp index 7261363ad6d..6d979d10eb5 100644 --- a/core/io/ip_address.cpp +++ b/core/io/ip_address.cpp @@ -211,7 +211,7 @@ IP_Address::IP_Address(const String &p_string) { clear(); if (p_string == "*") { - // Wildcard (not a vaild IP) + // Wildcard (not a valid IP) wildcard = true; } else if (p_string.find(":") >= 0) { diff --git a/core/map.h b/core/map.h index 5ff269c26bf..700d4b8693d 100644 --- a/core/map.h +++ b/core/map.h @@ -197,7 +197,7 @@ private: if (node->right != _data._nil) { node = node->right; - while (node->left != _data._nil) { /* returns the minium of the right subtree of node */ + while (node->left != _data._nil) { /* returns the minimum of the right subtree of node */ node = node->left; } return node; @@ -219,7 +219,7 @@ private: if (node->left != _data._nil) { node = node->left; - while (node->right != _data._nil) { /* returns the minium of the left subtree of node */ + while (node->right != _data._nil) { /* returns the minimum of the left subtree of node */ node = node->right; } return node; diff --git a/core/message_queue.cpp b/core/message_queue.cpp index 3ceafe1a302..25ee6eafaec 100644 --- a/core/message_queue.cpp +++ b/core/message_queue.cpp @@ -278,7 +278,7 @@ void MessageQueue::flush() { while (read_pos < buffer_end) { - //lock on each interation, so a call can re-add itself to the message queue + //lock on each iteration, so a call can re-add itself to the message queue Message *message = (Message *)&buffer[read_pos]; diff --git a/core/pool_allocator.cpp b/core/pool_allocator.cpp index d81e1912bf7..017586b92ac 100644 --- a/core/pool_allocator.cpp +++ b/core/pool_allocator.cpp @@ -90,7 +90,7 @@ bool PoolAllocator::find_hole(EntryArrayPos *p_pos, int p_for_size) { int hole_size = entry.pos - prev_entry_end_pos; - /* detemine if what we want fits in that hole */ + /* determine if what we want fits in that hole */ if (hole_size >= p_for_size) { *p_pos = i; return true; @@ -100,7 +100,7 @@ bool PoolAllocator::find_hole(EntryArrayPos *p_pos, int p_for_size) { prev_entry_end_pos = entry_end(entry); } - /* No holes between entrys, check at the end..*/ + /* No holes between entries, check at the end..*/ if ((pool_size - prev_entry_end_pos) >= p_for_size) { *p_pos = entry_count; diff --git a/core/script_debugger_remote.cpp b/core/script_debugger_remote.cpp index 41071ace5df..632285f48da 100644 --- a/core/script_debugger_remote.cpp +++ b/core/script_debugger_remote.cpp @@ -1016,11 +1016,11 @@ void ScriptDebuggerRemote::add_profiling_frame_data(const StringName &p_name, co } void ScriptDebuggerRemote::profiling_start() { - //ignores this, uses it via connnection + //ignores this, uses it via connection } void ScriptDebuggerRemote::profiling_end() { - //ignores this, uses it via connnection + //ignores this, uses it via connection } void ScriptDebuggerRemote::profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_physics_time, float p_physics_frame_time) { diff --git a/core/set.h b/core/set.h index 4f17c953b15..d79dd816440 100644 --- a/core/set.h +++ b/core/set.h @@ -185,7 +185,7 @@ private: if (node->right != _data._nil) { node = node->right; - while (node->left != _data._nil) { /* returns the minium of the right subtree of node */ + while (node->left != _data._nil) { /* returns the minimum of the right subtree of node */ node = node->left; } return node; @@ -207,7 +207,7 @@ private: if (node->left != _data._nil) { node = node->left; - while (node->right != _data._nil) { /* returns the minium of the left subtree of node */ + while (node->right != _data._nil) { /* returns the minimum of the left subtree of node */ node = node->right; } return node; diff --git a/core/variant.h b/core/variant.h index 51ee8ea9d1b..0a4afada5b7 100644 --- a/core/variant.h +++ b/core/variant.h @@ -293,7 +293,7 @@ public: // If this changes the table in variant_op must be updated enum Operator { - //comparation + //comparison OP_EQUAL, OP_NOT_EQUAL, OP_LESS, diff --git a/core/variant_op.cpp b/core/variant_op.cpp index 8656163fd8b..97b469861c8 100644 --- a/core/variant_op.cpp +++ b/core/variant_op.cpp @@ -147,7 +147,7 @@ Variant::operator bool() const { return booleanize(); } -// We consider all unitialized or empty types to be false based on the type's +// We consider all uninitialized or empty types to be false based on the type's // zeroiness. bool Variant::booleanize() const { return !is_zero(); diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml index 17243b2100e..8f102d7b310 100644 --- a/doc/classes/ConfigFile.xml +++ b/doc/classes/ConfigFile.xml @@ -4,7 +4,7 @@ Helper class to handle INI-style files. - This helper class can be used to store [Variant] values on the filesystem using INI-style formatting. The stored values are indentified by a section and a key: + This helper class can be used to store [Variant] values on the filesystem using INI-style formatting. The stored values are identified by a section and a key: [codeblock] [section] some_key=42 diff --git a/doc/classes/File.xml b/doc/classes/File.xml index 3ac2a7e643a..ca946cacfaf 100644 --- a/doc/classes/File.xml +++ b/doc/classes/File.xml @@ -380,7 +380,7 @@ If [code]true[/code] the file's endianness is swapped. Use this if you're dealing with files written in big endian machines. - Note that this is about the file format, not CPU type. This is always reseted to [code]false[/code] whenever you open the file. + Note that this is about the file format, not CPU type. This is always reset to [code]false[/code] whenever you open the file. diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml index 3fa780e8926..633beb76d47 100644 --- a/doc/classes/HTTPClient.xml +++ b/doc/classes/HTTPClient.xml @@ -384,7 +384,7 @@ HTTP status code [code]429 Too Many Requests[/code]. The user has sent too many requests in a given amount of time (see "rate limiting"). Back off and increase time between requests or try again later. - HTTP status code [code]431 Rquest Header Fields Too Large[/code]. The server is unwilling to process the request because its header fields are too large. The request MAY be resubmitted after reducing the size of the request header fields. + HTTP status code [code]431 Request Header Fields Too Large[/code]. The server is unwilling to process the request because its header fields are too large. The request MAY be resubmitted after reducing the size of the request header fields. HTTP status code [code]451 Response Unavailable For Legal Reasons[/code]. The server is denying access to the resource as a consequence of a legal demand. diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml index a5eadae7156..d0d4ce6c21b 100644 --- a/doc/classes/Line2D.xml +++ b/doc/classes/Line2D.xml @@ -53,7 +53,7 @@ - Overwites the position in point [code]i[/code] with the supplied [code]position[/code]. + Overwrites the position in point [code]i[/code] with the supplied [code]position[/code]. diff --git a/doc/classes/Sprite.xml b/doc/classes/Sprite.xml index c1afb35e093..1045581cdf1 100644 --- a/doc/classes/Sprite.xml +++ b/doc/classes/Sprite.xml @@ -26,7 +26,7 @@ Current frame to display from sprite sheet. [member vframes] or [member hframes] must be greater than 1. - The number of collumns in the sprite sheet. + The number of columns in the sprite sheet. The normal map gives depth to the Sprite. diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 0698a615294..1657980d035 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -123,7 +123,7 @@ - Get the enabled status of the size strech override set with [method set_size_override_stretch]. + Get the enabled status of the size stretch override set with [method set_size_override_stretch]. diff --git a/drivers/convex_decomp/b2d_decompose.cpp b/drivers/convex_decomp/b2d_decompose.cpp index d1f7a4d3c3a..14456144a60 100644 --- a/drivers/convex_decomp/b2d_decompose.cpp +++ b/drivers/convex_decomp/b2d_decompose.cpp @@ -94,7 +94,7 @@ static Vector > _b2d_decompose(const Vector &p_polygon) float32 dot = dx0 * dx1 + dy0 * dy1; if (fabs(cross) < b2_angularSlop && dot > 0) { //Angle too close, split the triangle across from this point. - //This is guaranteed to result in two triangles that satify + //This is guaranteed to result in two triangles that satisfy //the tolerance (one of the angles is 90 degrees) float32 dx2 = curr.x[lower] - curr.x[upper]; float32 dy2 = curr.y[lower] - curr.y[upper]; diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp index 0fc095a8680..a287dca1edc 100644 --- a/drivers/gles3/rasterizer_storage_gles3.cpp +++ b/drivers/gles3/rasterizer_storage_gles3.cpp @@ -908,7 +908,7 @@ Ref RasterizerStorageGLES3::texture_get_data(RID p_texture, VS::CubeMapSi return Ref(img); #else - ERR_EXPLAIN("Sorry, It's not posible to obtain images back in OpenGL ES"); + ERR_EXPLAIN("Sorry, It's not possible to obtain images back in OpenGL ES"); return Ref(); #endif } diff --git a/editor/dictionary_property_edit.cpp b/editor/dictionary_property_edit.cpp index 4c0ad593856..a87edfd00da 100644 --- a/editor/dictionary_property_edit.cpp +++ b/editor/dictionary_property_edit.cpp @@ -41,7 +41,7 @@ void DictionaryPropertyEdit::_notif_changev(const String &p_v) { void DictionaryPropertyEdit::_set_key(const Variant &p_old_key, const Variant &p_new_key) { - // TODO: Set key of a dictionary is not allowd yet + // TODO: Set key of a dictionary is not allowed yet return; } diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 78844bb1249..ce789b1c562 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -2912,7 +2912,7 @@ void EditorNode::_set_main_scene_state(Dictionary p_state, Node *p_for_scene) { if (p_state.has("editor_index")) { int index = p_state["editor_index"]; - if (current < 2) { //if currently in spatial/2d, only switch to spatial/2d. if curently in script, stay there + if (current < 2) { //if currently in spatial/2d, only switch to spatial/2d. if currently in script, stay there if (index < 2 || !get_edited_scene()) { _editor_select(index); } diff --git a/editor/import/resource_importer_csv_translation.cpp b/editor/import/resource_importer_csv_translation.cpp index 22c32f5fc97..ec0500361d3 100644 --- a/editor/import/resource_importer_csv_translation.cpp +++ b/editor/import/resource_importer_csv_translation.cpp @@ -50,7 +50,7 @@ void ResourceImporterCSVTranslation::get_recognized_extensions(List *p_e } String ResourceImporterCSVTranslation::get_save_extension() const { - return ""; //does not save a single resoure + return ""; //does not save a single resource } String ResourceImporterCSVTranslation::get_resource_type() const { diff --git a/editor/plugins/collision_polygon_editor_plugin.cpp b/editor/plugins/collision_polygon_editor_plugin.cpp index d8d3c0cee69..4410242d9ce 100644 --- a/editor/plugins/collision_polygon_editor_plugin.cpp +++ b/editor/plugins/collision_polygon_editor_plugin.cpp @@ -140,7 +140,7 @@ bool CollisionPolygonEditor::forward_spatial_gui_input(Camera *p_camera, const R Vector poly = node->get_polygon(); //first check if a point is to be added (segment split) - real_t grab_treshold = EDITOR_DEF("editors/poly_editor/point_grab_radius", 8); + real_t grab_threshold = EDITOR_DEF("editors/poly_editor/point_grab_radius", 8); switch (mode) { @@ -159,7 +159,7 @@ bool CollisionPolygonEditor::forward_spatial_gui_input(Camera *p_camera, const R return true; } else { - if (wip.size() > 1 && p_camera->unproject_position(gt.xform(Vector3(wip[0].x, wip[0].y, depth))).distance_to(gpoint) < grab_treshold) { + if (wip.size() > 1 && p_camera->unproject_position(gt.xform(Vector3(wip[0].x, wip[0].y, depth))).distance_to(gpoint) < grab_threshold) { //wip closed _wip_close(); @@ -213,7 +213,7 @@ bool CollisionPolygonEditor::forward_spatial_gui_input(Camera *p_camera, const R continue; //not valid to reuse point real_t d = cp.distance_to(gpoint); - if (d < closest_dist && d < grab_treshold) { + if (d < closest_dist && d < grab_threshold) { closest_dist = d; closest_pos = cp; closest_idx = i; @@ -242,7 +242,7 @@ bool CollisionPolygonEditor::forward_spatial_gui_input(Camera *p_camera, const R Vector2 cp = p_camera->unproject_position(gt.xform(Vector3(poly[i].x, poly[i].y, depth))); real_t d = cp.distance_to(gpoint); - if (d < closest_dist && d < grab_treshold) { + if (d < closest_dist && d < grab_threshold) { closest_dist = d; closest_pos = cp; closest_idx = i; @@ -288,7 +288,7 @@ bool CollisionPolygonEditor::forward_spatial_gui_input(Camera *p_camera, const R Vector2 cp = p_camera->unproject_position(gt.xform(Vector3(poly[i].x, poly[i].y, depth))); real_t d = cp.distance_to(gpoint); - if (d < closest_dist && d < grab_treshold) { + if (d < closest_dist && d < grab_threshold) { closest_dist = d; closest_pos = cp; closest_idx = i; diff --git a/main/input_default.cpp b/main/input_default.cpp index 5057c5f53a1..323748346a8 100644 --- a/main/input_default.cpp +++ b/main/input_default.cpp @@ -429,7 +429,7 @@ Point2 InputDefault::get_last_mouse_speed() const { int InputDefault::get_mouse_button_mask() const { - return mouse_button_mask; // do not trust OS implementaiton, should remove it - OS::get_singleton()->get_mouse_button_state(); + return mouse_button_mask; // do not trust OS implementation, should remove it - OS::get_singleton()->get_mouse_button_state(); } void InputDefault::warp_mouse_position(const Vector2 &p_to) { diff --git a/methods.py b/methods.py index f4d33fb6d8c..ab49ae9ddab 100644 --- a/methods.py +++ b/methods.py @@ -1432,7 +1432,7 @@ def use_windows_spawn_fix(self, platform=None): # that makes object files with same names to be overwritten so the last wins and # the library looses symbols defined by overwritten objects. # By enabling quick append instead of the default mode (replacing), libraries will - # got built correctly regardless the invokation strategy. + # got built correctly regardless the invocation strategy. # Furthermore, since SCons will rebuild the library from scratch when an object file # changes, no multiple versions of the same object file will be present. self.Replace(ARFLAGS='q') @@ -1607,7 +1607,7 @@ def detect_visual_c_compiler_version(tools_env): # There is no flag to give to visual c compilers to set the architecture, ie scons bits argument (32,64,ARM etc) # There are many different cl.exe files that are run, and each one compiles & links to a different architecture # As far as I know, the only way to figure out what compiler will be run when Scons calls cl.exe via Program() - # is to check the PATH variable and figure out which one will be called first. Code bellow does that and returns: + # is to check the PATH variable and figure out which one will be called first. Code below does that and returns: # the following string values: # "" Compiler not detected @@ -1627,7 +1627,7 @@ def detect_visual_c_compiler_version(tools_env): if 'VCINSTALLDIR' in tools_env: # print("Checking VCINSTALLDIR") - # find() works with -1 so big ifs bellow are needed... the simplest solution, in fact + # find() works with -1 so big ifs below are needed... the simplest solution, in fact # First test if amd64 and amd64_x86 compilers are present in the path vc_amd64_compiler_detection_index = tools_env["PATH"].find(tools_env["VCINSTALLDIR"] + "BIN\\amd64;") if(vc_amd64_compiler_detection_index > -1): diff --git a/modules/bullet/bullet_physics_server.cpp b/modules/bullet/bullet_physics_server.cpp index 51de4998fa4..c4f9f8800cd 100644 --- a/modules/bullet/bullet_physics_server.cpp +++ b/modules/bullet/bullet_physics_server.cpp @@ -783,7 +783,7 @@ int BulletPhysicsServer::body_get_max_contacts_reported(RID p_body) const { return body->get_max_collisions_detection(); } -void BulletPhysicsServer::body_set_contacts_reported_depth_threshold(RID p_body, float p_treshold) { +void BulletPhysicsServer::body_set_contacts_reported_depth_threshold(RID p_body, float p_threshold) { WARN_PRINT("Not supported by bullet and even Godot"); } diff --git a/modules/bullet/bullet_physics_server.h b/modules/bullet/bullet_physics_server.h index e0e46cd369c..a9cf58cb8f0 100644 --- a/modules/bullet/bullet_physics_server.h +++ b/modules/bullet/bullet_physics_server.h @@ -239,7 +239,7 @@ public: virtual void body_set_max_contacts_reported(RID p_body, int p_contacts); virtual int body_get_max_contacts_reported(RID p_body) const; - virtual void body_set_contacts_reported_depth_threshold(RID p_body, float p_treshold); + virtual void body_set_contacts_reported_depth_threshold(RID p_body, float p_threshold); virtual float body_get_contacts_reported_depth_threshold(RID p_body) const; virtual void body_set_omit_force_integration(RID p_body, bool p_omit); diff --git a/modules/bullet/godot_motion_state.h b/modules/bullet/godot_motion_state.h index fe5d8418b70..fa58e865894 100644 --- a/modules/bullet/godot_motion_state.h +++ b/modules/bullet/godot_motion_state.h @@ -87,7 +87,7 @@ public: public: /// Use this function to move kinematic body - /// -- or set initial transfom before body creation. + /// -- or set initial transform before body creation. void moveBody(const btTransform &newWorldTransform) { bodyKinematicWorldTransf = newWorldTransform; } diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp index 88d9c20ebaa..47bdfaba1ff 100644 --- a/modules/bullet/space_bullet.cpp +++ b/modules/bullet/space_bullet.cpp @@ -628,7 +628,7 @@ void SpaceBullet::destroy_world() { void SpaceBullet::check_ghost_overlaps() { - /// Algorith support variables + /// Algorithm support variables btConvexShape *other_body_shape; btConvexShape *area_shape; btGjkPairDetector::ClosestPointInput gjk_input; diff --git a/modules/gdnative/include/pluginscript/godot_pluginscript.h b/modules/gdnative/include/pluginscript/godot_pluginscript.h index 671be3bbb94..d1671c014e1 100644 --- a/modules/gdnative/include/pluginscript/godot_pluginscript.h +++ b/modules/gdnative/include/pluginscript/godot_pluginscript.h @@ -64,7 +64,7 @@ typedef struct { //this is used by script languages that keep a reference counter of their own //you can make make Ref<> not die when it reaches zero, so deleting the reference //depends entirely from the script. - // Note: You can set thoses function pointer to NULL if not needed. + // Note: You can set those function pointer to NULL if not needed. void (*refcount_incremented)(godot_pluginscript_instance_data *p_data); bool (*refcount_decremented)(godot_pluginscript_instance_data *p_data); // return true if it can die } godot_pluginscript_instance_desc; diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp index 1649fb52f28..048948dada4 100644 --- a/modules/gdscript/gdscript_compiler.cpp +++ b/modules/gdscript/gdscript_compiler.cpp @@ -181,7 +181,7 @@ int GDScriptCompiler::_parse_expression(CodeGen &codegen, const GDScriptParser:: //wait, identifier could be a local variable or something else... careful here, must reference properly //as stack may be more interesting to work with - //This could be made much simpler by just indexing "self", but done this way (with custom self-addressing modes) increases peformance a lot. + //This could be made much simpler by just indexing "self", but done this way (with custom self-addressing modes) increases performance a lot. const GDScriptParser::IdentifierNode *in = static_cast(p_expression); diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index b6978a61185..532b72ce6b8 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -4071,7 +4071,7 @@ void GDScriptParser::_parse_class(ClassNode *p_class) { ConstantNode *cn = static_cast(subexpr); if (cn->value.get_type() == Variant::NIL) { - _set_error("Can't accept a null constant expression for infering export type."); + _set_error("Can't accept a null constant expression for inferring export type."); return; } member._export.type = cn->value.get_type(); @@ -4207,7 +4207,7 @@ void GDScriptParser::_parse_class(ClassNode *p_class) { } break; case GDScriptTokenizer::TK_PR_ENUM: { - //mutiple constant declarations.. + //multiple constant declarations.. int last_assign = -1; // Incremented by 1 right before the assingment. String enum_name; diff --git a/modules/regex/doc_classes/RegEx.xml b/modules/regex/doc_classes/RegEx.xml index 2cf80acd282..920d0e97c49 100644 --- a/modules/regex/doc_classes/RegEx.xml +++ b/modules/regex/doc_classes/RegEx.xml @@ -4,14 +4,14 @@ Class for searching text for patterns using regular expressions. - Regular Expression (or regex) is a compact programming language that can be used to recognise strings that follow a specific pattern, such as URLs, email addresses, complete sentences, etc. For instance, a regex of [code]ab[0-9][/code] would find any string that is [code]ab[/code] followed by any number from [code]0[/code] to [code]9[/code]. For a more in-depth look, you can easily find various tutorials and detailed explainations on the Internet. + Regular Expression (or regex) is a compact programming language that can be used to recognise strings that follow a specific pattern, such as URLs, email addresses, complete sentences, etc. For instance, a regex of [code]ab[0-9][/code] would find any string that is [code]ab[/code] followed by any number from [code]0[/code] to [code]9[/code]. For a more in-depth look, you can easily find various tutorials and detailed explanations on the Internet. To begin, the RegEx object needs to be compiled with the search pattern using [method compile] before it can be used. [codeblock] var regex = RegEx.new() regex.compile("\\w-(\\d+)") [/codeblock] The search pattern must be escaped first for gdscript before it is escaped for the expression. For example, [code]compile("\\d+")[/code] would be read by RegEx as [code]\d+[/code]. Similarly, [code]compile("\"(?:\\\\.|[^\"])*\"")[/code] would be read as [code]"(?:\\.|[^"])*"[/code] - Using [method search] you can find the pattern within the given text. If a pattern is found, [RegExMatch] is returned and you can retrieve details of the results using fuctions such as [method RegExMatch.get_string] and [method RegExMatch.get_start]. + Using [method search] you can find the pattern within the given text. If a pattern is found, [RegExMatch] is returned and you can retrieve details of the results using functions such as [method RegExMatch.get_string] and [method RegExMatch.get_start]. [codeblock] var regex = RegEx.new() regex.compile("\\w-(\\d+)") diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp index 5987fdf5da8..ef680547ca4 100644 --- a/modules/visual_script/visual_script.cpp +++ b/modules/visual_script/visual_script.cpp @@ -2182,7 +2182,7 @@ void VisualScriptInstance::create(const Ref &p_script, Object *p_o Ref node = F->get().node; VisualScriptNodeInstance *instance = instances[F->key()]; - // conect to default values + // connect to default values for (int i = 0; i < instance->input_port_count; i++) { if (instance->input_ports[i] == -1) { @@ -2192,7 +2192,7 @@ void VisualScriptInstance::create(const Ref &p_script, Object *p_o } } - // conect to trash + // connect to trash for (int i = 0; i < instance->output_port_count; i++) { if (instance->output_ports[i] == -1) { instance->output_ports[i] = function.trash_pos; //trash is same for all diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp index e0b4fde2379..c5654a5a20c 100644 --- a/modules/visual_script/visual_script_nodes.cpp +++ b/modules/visual_script/visual_script_nodes.cpp @@ -425,7 +425,7 @@ PropertyInfo VisualScriptOperator::get_input_value_port_info(int p_idx) const { } PropertyInfo VisualScriptOperator::get_output_value_port_info(int p_idx) const { static const Variant::Type port_types[Variant::OP_MAX] = { - //comparation + //comparison Variant::BOOL, //OP_EQUAL, Variant::BOOL, //OP_NOT_EQUAL, Variant::BOOL, //OP_LESS, @@ -466,7 +466,7 @@ PropertyInfo VisualScriptOperator::get_output_value_port_info(int p_idx) const { } static const char *op_names[] = { - //comparation + //comparison "Equal", //OP_EQUAL, "NotEqual", //OP_NOT_EQUAL, "Less", //OP_LESS, @@ -506,7 +506,7 @@ String VisualScriptOperator::get_caption() const { String VisualScriptOperator::get_text() const { static const wchar_t *op_names[] = { - //comparation + //comparison L"A = B", //OP_EQUAL, L"A \u2260 B", //OP_NOT_EQUAL, L"A < B", //OP_LESS, diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index 2a61f8d8738..6b4d0ff8c49 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -257,7 +257,7 @@ class EditorExportAndroid : public EditorExportPlatform { if (dpos == -1) continue; d = d.substr(0, dpos).strip_edges(); - //print_line("found devuce: "+d); + //print_line("found device: "+d); ldevices.push_back(d); } @@ -996,7 +996,7 @@ public: public: virtual void get_preset_features(const Ref &p_preset, List *r_features) { - // Reenable when a GLES 2.0 backend is readded + // Re-enable when a GLES 2.0 backend is read /*int api = p_preset->get("graphics/api"); if (api == 0) r_features->push_back("etc"); diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index c469af410e7..72d52d1e0c1 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -1068,7 +1068,7 @@ Error OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_a unsigned int attributeCount = 0; - // OS X needs non-zero color size, so set resonable values + // OS X needs non-zero color size, so set reasonable values int colorBits = 32; // Fail if a robustness strategy was requested @@ -1114,7 +1114,7 @@ Error OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_a */ // NOTE: All NSOpenGLPixelFormats on the relevant cards support sRGB - // frambuffer, so there's no need (and no way) to request it + // framebuffer, so there's no need (and no way) to request it ADD_ATTR(0); diff --git a/platform/uwp/export/export.cpp b/platform/uwp/export/export.cpp index 620f6c0f24a..7d7bee92270 100644 --- a/platform/uwp/export/export.cpp +++ b/platform/uwp/export/export.cpp @@ -1082,7 +1082,7 @@ public: r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/debug", PROPERTY_HINT_GLOBAL_FILE, "zip"), "")); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/release", PROPERTY_HINT_GLOBAL_FILE, "zip"), "")); - // Capabilites + // Capabilities const char **basic = uwp_capabilities; while (*basic) { r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "capabilities/" + String(*basic).camelcase_to_underscore(false)), false)); diff --git a/platform/windows/detect.py b/platform/windows/detect.py index b8a9ed482c7..ffadaf0f7f2 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -148,11 +148,11 @@ def configure(env): ## Compiler configuration env['ENV'] = os.environ - # This detection function needs the tools env (that is env['ENV'], not SCons's env), and that is why it's this far bellow in the code + # This detection function needs the tools env (that is env['ENV'], not SCons's env), and that is why it's this far below in the code compiler_version_str = methods.detect_visual_c_compiler_version(env['ENV']) print("Detected MSVC compiler: " + compiler_version_str) - # If building for 64bit architecture, disable assembly optimisations for 32 bit builds (theora as of writting)... vc compiler for 64bit can not compile _asm + # If building for 64bit architecture, disable assembly optimisations for 32 bit builds (theora as of writing)... vc compiler for 64bit can not compile _asm if(compiler_version_str == "amd64" or compiler_version_str == "x86_amd64"): env["bits"] = "64" env["x86_libtheora_opt_vc"] = False diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 64b894c4391..1e7538178a7 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -731,7 +731,7 @@ void OS_X11::set_wm_fullscreen(bool p_enabled) { XFree(xsh); } - // Using EWMH -- Extened Window Manager Hints + // Using EWMH -- Extended Window Manager Hints XEvent xev; Atom wm_state = XInternAtom(x11_display, "_NET_WM_STATE", False); Atom wm_fullscreen = XInternAtom(x11_display, "_NET_WM_STATE_FULLSCREEN", False); diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp index b11deb08fd4..0ac35f13cb1 100644 --- a/scene/2d/audio_stream_player_2d.cpp +++ b/scene/2d/audio_stream_player_2d.cpp @@ -226,14 +226,14 @@ void AudioStreamPlayer2D::_notification(int p_what) { setseek = setplay; active = true; setplay = -1; - //do not update, this makes it easier to animate (will shut off otherise) + //do not update, this makes it easier to animate (will shut off otherwise) //_change_notify("playing"); //update property in editor } //stop playing if no longer active if (!active) { set_physics_process_internal(false); - //do not update, this makes it easier to animate (will shut off otherise) + //do not update, this makes it easier to animate (will shut off otherwise) //_change_notify("playing"); //update property in editor emit_signal("finished"); } diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp index bf3bc42e4e1..1bc240cb570 100644 --- a/scene/3d/audio_stream_player_3d.cpp +++ b/scene/3d/audio_stream_player_3d.cpp @@ -536,14 +536,14 @@ void AudioStreamPlayer3D::_notification(int p_what) { setseek = setplay; active = true; setplay = -1; - //do not update, this makes it easier to animate (will shut off otherise) + //do not update, this makes it easier to animate (will shut off otherwise) ///_change_notify("playing"); //update property in editor } //stop playing if no longer active if (!active) { set_physics_process_internal(false); - //do not update, this makes it easier to animate (will shut off otherise) + //do not update, this makes it easier to animate (will shut off otherwise) //_change_notify("playing"); //update property in editor emit_signal("finished"); } diff --git a/scene/gui/dialogs.h b/scene/gui/dialogs.h index e61ede7c3d8..feb080dd06e 100644 --- a/scene/gui/dialogs.h +++ b/scene/gui/dialogs.h @@ -108,7 +108,7 @@ class AcceptDialog : public WindowDialog { HBoxContainer *hbc; Label *label; Button *ok; - //Button *cancel; no more cancel (there is X on tht titlebar) + //Button *cancel; no more cancel (there is X on that titlebar) bool hide_on_ok; void _custom_action(const String &p_action); diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index e8454e021f2..2aafe5e415a 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -628,7 +628,7 @@ void TextEdit::_notification(int p_what) { VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(Point2i(), get_size()), cache.background_color); } //compute actual region to start (may be inside say, a comment). - //slow in very large documments :( but ok for source! + //slow in very large documents :( but ok for source! for (int i = 0; i < cursor.line_ofs; i++) { @@ -4471,7 +4471,7 @@ bool TextEdit::search(const String &p_key, uint32_t p_search_flags, int p_from_l ERR_FAIL_INDEX_V(p_from_line, text.size(), false); ERR_FAIL_INDEX_V(p_from_column, text[p_from_line].length() + 1, false); - //search through the whole documment, but start by current line + //search through the whole document, but start by current line int line = p_from_line; int pos = -1; diff --git a/scene/gui/texture_progress.cpp b/scene/gui/texture_progress.cpp index 01b00c34ea4..4a419098a0e 100644 --- a/scene/gui/texture_progress.cpp +++ b/scene/gui/texture_progress.cpp @@ -158,7 +158,7 @@ void TextureProgress::draw_nine_patch_stretched(const Ref &p_texture, F if (p_ratio < 1.0) { // Drawing a partially-filled 9-patch is a little tricky - // texture is divided by 3 sections toward fill direction, - // then middle section is streching while the other two aren't. + // then middle section is stretching while the other two aren't. double width_total = 0.0; double width_texture = 0.0; diff --git a/scene/main/node.cpp b/scene/main/node.cpp index ac85dd64afa..cf22383e36f 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -2010,7 +2010,7 @@ void Node::set_editable_instance(Node *p_node, bool p_editable) { if (!p_editable) { data.editable_instances.erase(p); // Avoid this flag being needlessly saved; - // also give more visual feedback if editable children is reenabled + // also give more visual feedback if editable children is re-enabled set_display_folded(false); } else { data.editable_instances[p] = true; diff --git a/scene/main/node.h b/scene/main/node.h index dc6bda46216..9e82441413e 100644 --- a/scene/main/node.h +++ b/scene/main/node.h @@ -104,7 +104,7 @@ private: StringName name; SceneTree *tree; bool inside_tree; - bool ready_notified; //this is a small hack, so if a node is added during _ready() to the tree, it corretly gets the _ready() notification + bool ready_notified; //this is a small hack, so if a node is added during _ready() to the tree, it correctly gets the _ready() notification bool ready_first; #ifdef TOOLS_ENABLED NodePath import_path; //path used when imported, used by scene editors to keep tracking diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index 55ae9fe1ec5..136fd4cfd13 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -1778,7 +1778,7 @@ void SceneTree::_rpc(Node *p_from, int p_to, bool p_unreliable, bool p_set, cons psc->id = last_send_cache_id++; } - //create base packet, lots of harcode because it must be tight + //create base packet, lots of hardcode because it must be tight int ofs = 0; diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp index 8a1978cf85c..66d8e2a49ac 100644 --- a/scene/resources/material.cpp +++ b/scene/resources/material.cpp @@ -1479,9 +1479,9 @@ bool SpatialMaterial::is_grow_enabled() const { return grow_enabled; } -void SpatialMaterial::set_alpha_scissor_threshold(float p_treshold) { - alpha_scissor_threshold = p_treshold; - VS::get_singleton()->material_set_param(_get_material(), shader_names->alpha_scissor_threshold, p_treshold); +void SpatialMaterial::set_alpha_scissor_threshold(float p_threshold) { + alpha_scissor_threshold = p_threshold; + VS::get_singleton()->material_set_param(_get_material(), shader_names->alpha_scissor_threshold, p_threshold); } float SpatialMaterial::get_alpha_scissor_threshold() const { diff --git a/scene/resources/material.h b/scene/resources/material.h index 10bbcfd642e..2c297cda411 100644 --- a/scene/resources/material.h +++ b/scene/resources/material.h @@ -566,7 +566,7 @@ public: void set_grow(float p_grow); float get_grow() const; - void set_alpha_scissor_threshold(float p_treshold); + void set_alpha_scissor_threshold(float p_threshold); float get_alpha_scissor_threshold() const; void set_on_top_of_alpha(); diff --git a/scene/resources/primitive_meshes.h b/scene/resources/primitive_meshes.h index 1eaa007bd7c..94a7a055a30 100644 --- a/scene/resources/primitive_meshes.h +++ b/scene/resources/primitive_meshes.h @@ -189,7 +189,7 @@ public: }; /** - Similar to quadmesh but with tesselation support + Similar to quadmesh but with tessellation support */ class PlaneMesh : public PrimitiveMesh { diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp index de75bb39760..f256e0397d3 100644 --- a/scene/resources/style_box.cpp +++ b/scene/resources/style_box.cpp @@ -650,14 +650,14 @@ void StyleBoxFlat::draw(RID p_canvas_item, const Rect2 &p_rect) const { style_rect = style_rect.grow(-((aa_size + 1) / 2)); } - //adapt borders (prevent weired overlapping/glitchy drawings) + //adapt borders (prevent weird overlapping/glitchy drawings) int width = MAX(style_rect.size.width, 0); int height = MAX(style_rect.size.height, 0); int adapted_border[4] = { INT_MAX, INT_MAX, INT_MAX, INT_MAX }; adapt_values(MARGIN_TOP, MARGIN_BOTTOM, adapted_border, border_width, height, height, height); adapt_values(MARGIN_LEFT, MARGIN_RIGHT, adapted_border, border_width, width, width, width); - //adapt corners (prevent weired overlapping/glitchy drawings) + //adapt corners (prevent weird overlapping/glitchy drawings) int adapted_corner[4] = { INT_MAX, INT_MAX, INT_MAX, INT_MAX }; adapt_values(CORNER_TOP_RIGHT, CORNER_BOTTOM_RIGHT, adapted_corner, corner_radius, height, height - adapted_border[MARGIN_BOTTOM], height - adapted_border[MARGIN_TOP]); adapt_values(CORNER_TOP_LEFT, CORNER_BOTTOM_LEFT, adapted_corner, corner_radius, height, height - adapted_border[MARGIN_BOTTOM], height - adapted_border[MARGIN_TOP]); diff --git a/servers/arvr_server.h b/servers/arvr_server.h index 34f143c0e00..63b7edc73b9 100644 --- a/servers/arvr_server.h +++ b/servers/arvr_server.h @@ -49,7 +49,7 @@ class ARVRPositionalTracker; Also each positioning tracker is accessible from here. I've added some additional info into this header file that should move - into the documention, I will do so when we're close to accepting this PR + into the documentation, I will do so when we're close to accepting this PR or as a separate PR once this has been merged into the master branch. **/ diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp index 5c453a3113a..783788a6a15 100644 --- a/servers/audio_server.cpp +++ b/servers/audio_server.cpp @@ -153,7 +153,7 @@ void AudioDriverManager::initialize(int p_driver) { ERR_PRINT("AudioDriverManager: all drivers failed, falling back to dummy driver"); dummy_driver.set_singleton(); } else { - ERR_PRINT("AudioDriverManager: dummy driver faild to init()"); + ERR_PRINT("AudioDriverManager: dummy driver failed to init()"); } } @@ -858,7 +858,7 @@ void AudioServer::init() { channel_disable_threshold_db = GLOBAL_DEF("audio/channel_disable_threshold_db", -60.0); channel_disable_frames = float(GLOBAL_DEF("audio/channel_disable_time", 2.0)) * get_mix_rate(); - buffer_size = 1024; //harcoded for now + buffer_size = 1024; //hardcoded for now temp_buffer.resize(get_channel_count());