diff --git a/CHANGELOG.md b/CHANGELOG.md index 88c9e1a8a07..fe5631cefd2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,7 +37,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Ability to convert visual shaders to text-based shaders. - See the [complete list of new functions](https://github.com/godotengine/godot/pull/26164). - Improved visual scripting. - - Visual scripting now uses an unified graph where all functions are represented. + - Visual scripting now uses a unified graph where all functions are represented. - Nodes can now be edited directly in the graph. - Support for fuzzy searching. - The `tool` mode can now be enabled in visual scripts. @@ -900,7 +900,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Removed many debugging prints in the console. - Export templates now display an error dialog if no project was found when starting. - DynamicFont oversampling is now enabled by default. -- Nodes' internal logic now consistently use internal physics processing. +- Nodes' internal logic now consistently uses internal physics processing. - Allow attaching and clearing scripts on multiple nodes at once. - Default values are no longer saved in scene and resource files. - The selection rectangle of 2D nodes is now hidden when not pertinent (no more rectangle for collision shapes). diff --git a/SConstruct b/SConstruct index b006dddbe64..65a8d9e302f 100644 --- a/SConstruct +++ b/SConstruct @@ -385,7 +385,7 @@ if selected_platform in platform_list: if not (f[0] in ARGUMENTS): # allow command line to override platform flags env[f[0]] = f[1] - # Must happen after the flags definition, so that they can be used by platform detect + # Must happen after the flags' definition, so that they can be used by platform detect detect.configure(env) # Set our C and C++ standard requirements. diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp index 02effc20011..f7a6a8ece0f 100644 --- a/core/config/project_settings.cpp +++ b/core/config/project_settings.cpp @@ -393,7 +393,7 @@ Error ProjectSettings::_setup(const String &p_path, const String &p_main_pack, b if (exec_path != "") { // We do several tests sequentially until one succeeds to find a PCK, - // and if so we attempt loading it at the end. + // and if so, we attempt loading it at the end. // Attempt with PCK bundled into executable. bool found = _load_resource_pack(exec_path); diff --git a/core/core_bind.cpp b/core/core_bind.cpp index 2d6b8e5666b..c3d547c2c73 100644 --- a/core/core_bind.cpp +++ b/core/core_bind.cpp @@ -1377,9 +1377,9 @@ Vector _File::get_csv_line(const String &p_delim) const { return f->get_csv_line(p_delim); } -/**< use this for files WRITTEN in _big_ endian machines (ie, amiga/mac) +/**< use this for files WRITTEN in _big_ endian machines (i.e. amiga/mac) * It's not about the current CPU type but file formats. - * this flags get reset to false (little endian) on each open + * These flags get reset to false (little endian) on each open */ void _File::set_endian_swap(bool p_swap) { diff --git a/core/crypto/crypto.cpp b/core/crypto/crypto.cpp index f43f3e32905..6b3953f5888 100644 --- a/core/crypto/crypto.cpp +++ b/core/crypto/crypto.cpp @@ -100,7 +100,7 @@ void Crypto::load_default_certificates(String p_path) { PackedByteArray Crypto::hmac_digest(HashingContext::HashType p_hash_type, PackedByteArray p_key, PackedByteArray p_msg) { Ref ctx = Ref(HMACContext::create()); - ERR_FAIL_COND_V_MSG(ctx.is_null(), PackedByteArray(), "HMAC is not available witout mbedtls module."); + ERR_FAIL_COND_V_MSG(ctx.is_null(), PackedByteArray(), "HMAC is not available without mbedtls module."); Error err = ctx->start(p_hash_type, p_key); ERR_FAIL_COND_V(err != OK, PackedByteArray()); err = ctx->update(p_msg); @@ -108,7 +108,7 @@ PackedByteArray Crypto::hmac_digest(HashingContext::HashType p_hash_type, Packed return ctx->finish(); } -// Compares two HMACS for equality without leaking timing information in order to prevent timing attakcs. +// Compares two HMACS for equality without leaking timing information in order to prevent timing attacks. // @see: https://paragonie.com/blog/2015/11/preventing-timing-attacks-on-string-comparison-with-double-hmac-strategy bool Crypto::constant_time_compare(PackedByteArray p_trusted, PackedByteArray p_received) { const uint8_t *t = p_trusted.ptr(); diff --git a/core/debugger/engine_debugger.cpp b/core/debugger/engine_debugger.cpp index 895b8c23a9c..e5dba029c9e 100644 --- a/core/debugger/engine_debugger.cpp +++ b/core/debugger/engine_debugger.cpp @@ -192,7 +192,7 @@ void EngineDebugger::deinitialize() { singleton = nullptr; } - // Clear profilers/captuers/protocol handlers. + // Clear profilers/captures/protocol handlers. profilers.clear(); captures.clear(); protocols.clear(); diff --git a/core/input/input.cpp b/core/input/input.cpp index f928ae76548..3a8c1c16285 100644 --- a/core/input/input.cpp +++ b/core/input/input.cpp @@ -723,7 +723,7 @@ void Input::warp_mouse_position(const Vector2 &p_to) { Point2i Input::warp_mouse_motion(const Ref &p_motion, const Rect2 &p_rect) { // The relative distance reported for the next event after a warp is in the boundaries of the - // size of the rect on that axis, but it may be greater, in which case there's not problem as fmod() + // size of the rect on that axis, but it may be greater, in which case there's no problem as fmod() // will warp it, but if the pointer has moved in the opposite direction between the pointer relocation // and the subsequent event, the reported relative distance will be less than the size of the rect // and thus fmod() will be disabled for handling the situation. @@ -779,7 +779,7 @@ bool Input::is_emulating_touch_from_mouse() const { return emulate_touch_from_mouse; } -// Calling this whenever the game window is focused helps unstucking the "touch mouse" +// Calling this whenever the game window is focused helps unsticking the "touch mouse" // if the OS or its abstraction class hasn't properly reported that touch pointers raised void Input::ensure_touch_mouse_raised() { if (mouse_from_touch_index != -1) { diff --git a/core/input/input_map.cpp b/core/input/input_map.cpp index e0b25fa0928..7d85fd6492f 100644 --- a/core/input/input_map.cpp +++ b/core/input/input_map.cpp @@ -567,6 +567,7 @@ const OrderedHashMap>> &InputMap::get_builtins() { inputs.push_back(InputEventKey::create_reference(KEY_E | KEY_MASK_CTRL)); inputs.push_back(InputEventKey::create_reference(KEY_RIGHT | KEY_MASK_CMD)); default_builtin_cache.insert("ui_text_caret_line_end.OSX", inputs); + // Text Caret Movement Page Up/Down inputs = List>(); diff --git a/core/io/compression.cpp b/core/io/compression.cpp index 456023e2a61..980234cbfcd 100644 --- a/core/io/compression.cpp +++ b/core/io/compression.cpp @@ -181,8 +181,8 @@ int Compression::decompress(uint8_t *p_dst, int p_dst_max_size, const uint8_t *p } /** - This will handle both Gzip and Deflat streams. It will automatically allocate the output buffer into the provided p_dst_vect Vector. - This is required for compressed data who's final uncompressed size is unknown, as is the case for HTTP response bodies. + This will handle both Gzip and Deflate streams. It will automatically allocate the output buffer into the provided p_dst_vect Vector. + This is required for compressed data whose final uncompressed size is unknown, as is the case for HTTP response bodies. This is much slower however than using Compression::decompress because it may result in multiple full copies of the output buffer. */ int Compression::decompress_dynamic(Vector *p_dst_vect, int p_max_dst_size, const uint8_t *p_src, int p_src_size, Mode p_mode) { @@ -248,7 +248,7 @@ int Compression::decompress_dynamic(Vector *p_dst_vect, int p_max_dst_s out_mark += gzip_chunk; - // Encorce max output size + // Enforce max output size if (p_max_dst_size > -1 && strm.total_out > (uint64_t)p_max_dst_size) { (void)inflateEnd(&strm); p_dst_vect->resize(0); diff --git a/core/io/multiplayer_api.cpp b/core/io/multiplayer_api.cpp index 6b550e69c8a..94060cfe0b7 100644 --- a/core/io/multiplayer_api.cpp +++ b/core/io/multiplayer_api.cpp @@ -50,7 +50,7 @@ _FORCE_INLINE_ bool _should_call_local(MultiplayerAPI::RPCMode mode, bool is_mas // Do nothing. } break; case MultiplayerAPI::RPC_MODE_REMOTE: { - // Do nothing also. Remote cannot produce a local call. + // Do nothing. Remote cannot produce a local call. } break; case MultiplayerAPI::RPC_MODE_MASTERSYNC: { if (is_master) { @@ -675,7 +675,7 @@ Error MultiplayerAPI::_encode_and_compress_variant(const Variant &p_variant, uin return err; } if (r_buffer) { - // The first byte is not used by the marshaling, so store the type + // The first byte is not used by the marshalling, so store the type // so we know how to decompress and decode this variant. r_buffer[0] = p_variant.get_type(); } @@ -791,7 +791,7 @@ void MultiplayerAPI::_send_rpc(Node *p_from, int p_to, bool p_unreliable, bool p packet_cache.resize(m_amount); // Encode meta. - // The meta is composed by a single byte that contains (starting from the least segnificant bit): + // The meta is composed by a single byte that contains (starting from the least significant bit): // - `NetworkCommands` in the first three bits. // - `NetworkNodeIdCompression` in the next 2 bits. // - `NetworkNameIdCompression` in the next 1 bit. @@ -830,7 +830,7 @@ void MultiplayerAPI::_send_rpc(Node *p_from, int p_to, bool p_unreliable, bool p ofs += 4; } } else { - // The targets doesn't know the node yet, so we need to use 32 bits int. + // The targets don't know the node yet, so we need to use 32 bits int. node_id_compression = NETWORK_NODE_ID_COMPRESSION_32; MAKE_ROOM(ofs + 4); encode_uint32(psc->id, &(packet_cache.write[ofs])); diff --git a/core/io/packet_peer_udp.cpp b/core/io/packet_peer_udp.cpp index d8d63d976f0..3f46f2706e3 100644 --- a/core/io/packet_peer_udp.cpp +++ b/core/io/packet_peer_udp.cpp @@ -224,7 +224,7 @@ Error PacketPeerUDP::connect_to_host(const IP_Address &p_host, int p_port) { // I see no reason why we should get ERR_BUSY (wouldblock/eagain) here. // This is UDP, so connect is only used to tell the OS to which socket - // it shuold deliver packets when multiple are bound on the same address/port. + // it should deliver packets when multiple are bound on the same address/port. if (err != OK) { close(); ERR_FAIL_V_MSG(FAILED, "Unable to connect"); diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index fb6ad7d65eb..c4eb2a20bbd 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -1245,7 +1245,7 @@ Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, cons String ResourceFormatLoaderBinary::get_resource_type(const String &p_path) const { FileAccess *f = FileAccess::open(p_path, FileAccess::READ); if (!f) { - return ""; //could not rwead + return ""; //could not read } ResourceLoaderBinary loader; diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp index 8275dd0ad44..dcf71bb4a93 100644 --- a/core/io/resource_loader.cpp +++ b/core/io/resource_loader.cpp @@ -215,7 +215,7 @@ void ResourceLoader::_thread_load_function(void *p_userdata) { load_task.loader_id = Thread::get_caller_id(); if (load_task.semaphore) { - //this is an actual thread, so wait for Ok fom semaphore + //this is an actual thread, so wait for Ok from semaphore thread_load_semaphore->wait(); //wait until its ok to start loading } load_task.resource = _load(load_task.remapped_path, load_task.remapped_path != load_task.local_path ? load_task.local_path : String(), load_task.type_hint, load_task.cache_mode, &load_task.error, load_task.use_sub_threads, &load_task.progress); @@ -443,7 +443,7 @@ RES ResourceLoader::load_threaded_get(const String &p_path, Error *r_error) { ThreadLoadTask &load_task = thread_load_tasks[local_path]; - //semaphore still exists, meaning its still loading, request poll + //semaphore still exists, meaning it's still loading, request poll Semaphore *semaphore = load_task.semaphore; if (semaphore) { load_task.poll_requests++; @@ -452,7 +452,7 @@ RES ResourceLoader::load_threaded_get(const String &p_path, Error *r_error) { // As we got a semaphore, this means we are going to have to wait // until the sub-resource is done loading // - // As this thread will become 'blocked' we should "echange" its + // As this thread will become 'blocked' we should "exchange" its // active status with a waiting one, to ensure load continues. // // This ensures loading is never blocked and that is also within diff --git a/core/io/translation_loader_po.cpp b/core/io/translation_loader_po.cpp index 0e11ff514a4..9adf9122241 100644 --- a/core/io/translation_loader_po.cpp +++ b/core/io/translation_loader_po.cpp @@ -194,7 +194,7 @@ RES TranslationLoaderPO::load_translation(FileAccess *f, Error *r_error) { l = l.substr(1, l.length()); // Find final quote, ignoring escaped ones (\"). // The escape_next logic is necessary to properly parse things like \\" - // where the blackslash is the one being escaped, not the quote. + // where the backslash is the one being escaped, not the quote. int end_pos = -1; bool escape_next = false; for (int i = 0; i < l.length(); i++) { diff --git a/core/io/xml_parser.cpp b/core/io/xml_parser.cpp index 1574634aade..d5eb32513b0 100644 --- a/core/io/xml_parser.cpp +++ b/core/io/xml_parser.cpp @@ -344,7 +344,7 @@ void XMLParser::_bind_methods() { } Error XMLParser::read() { - // if not end reached, parse the node + // if end not reached, parse the node if (P && (P - data) < (int64_t)length - 1 && *P != 0) { _parse_current_node(); return OK; diff --git a/core/math/basis.cpp b/core/math/basis.cpp index cbdd8a8c9f8..cc2b7c6611c 100644 --- a/core/math/basis.cpp +++ b/core/math/basis.cpp @@ -132,7 +132,7 @@ bool Basis::is_symmetric() const { Basis Basis::diagonalize() { //NOTE: only implemented for symmetric matrices -//with the Jacobi iterative method method +//with the Jacobi iterative method #ifdef MATH_CHECKS ERR_FAIL_COND_V(!is_symmetric(), Basis()); #endif @@ -317,7 +317,7 @@ Vector3 Basis::rotref_posscale_decomposition(Basis &rotref) const { // Multiplies the matrix from left by the rotation matrix: M -> R.M // Note that this does *not* rotate the matrix itself. // -// The main use of Basis is as Transform.basis, which is used a the transformation matrix +// The main use of Basis is as Transform.basis, which is used by the transformation matrix // of 3D object. Rotate here refers to rotation of the object (which is R * (*this)), // not the matrix itself (which is R * (*this) * R.transposed()). Basis Basis::rotated(const Vector3 &p_axis, real_t p_phi) const { @@ -881,7 +881,7 @@ void Basis::get_axis_angle(Vector3 &r_axis, real_t &r_angle) const { if ((Math::abs(elements[1][0] - elements[0][1]) < epsilon) && (Math::abs(elements[2][0] - elements[0][2]) < epsilon) && (Math::abs(elements[2][1] - elements[1][2]) < epsilon)) { // singularity found // first check for identity matrix which must have +1 for all terms - // in leading diagonaland zero in other terms + // in leading diagonal and zero in other terms if ((Math::abs(elements[1][0] + elements[0][1]) < epsilon2) && (Math::abs(elements[2][0] + elements[0][2]) < epsilon2) && (Math::abs(elements[2][1] + elements[1][2]) < epsilon2) && (Math::abs(elements[0][0] + elements[1][1] + elements[2][2] - 3) < epsilon2)) { // this singularity is identity matrix so angle = 0 r_axis = Vector3(0, 1, 0); diff --git a/core/math/expression.cpp b/core/math/expression.cpp index 636ea601c77..f7ac44d3216 100644 --- a/core/math/expression.cpp +++ b/core/math/expression.cpp @@ -978,7 +978,7 @@ Expression::ENode *Expression::_parse_expression() { } } - /* Reduce the set set of expressions and place them in an operator tree, respecting precedence */ + /* Reduce the set of expressions and place them in an operator tree, respecting precedence */ while (expression.size() > 1) { int next_op = -1; diff --git a/core/math/geometry_2d.cpp b/core/math/geometry_2d.cpp index d67be14d331..feb1fb2fb88 100644 --- a/core/math/geometry_2d.cpp +++ b/core/math/geometry_2d.cpp @@ -87,9 +87,9 @@ struct _AtlasWorkRectResult { void Geometry2D::make_atlas(const Vector &p_rects, Vector &r_result, Size2i &r_size) { // Super simple, almost brute force scanline stacking fitter. // It's pretty basic for now, but it tries to make sure that the aspect ratio of the - // resulting atlas is somehow square. This is necessary because video cards have limits. - // On texture size (usually 2048 or 4096), so the more square a texture, the more chances. - // It will work in every hardware. + // resulting atlas is somehow square. This is necessary because video cards have limits + // on texture size (usually 2048 or 4096), so the squarer a texture, the more the chances + // that it will work in every hardware. // For example, it will prioritize a 1024x1024 atlas (works everywhere) instead of a // 256x8192 atlas (won't work anywhere). diff --git a/core/math/quick_hull.cpp b/core/math/quick_hull.cpp index ad28967d7ac..fe18cc3d413 100644 --- a/core/math/quick_hull.cpp +++ b/core/math/quick_hull.cpp @@ -268,7 +268,7 @@ Error QuickHull::build(const Vector &p_points, Geometry3D::MeshData &r_ for (Map::Element *E = lit_edges.front(); E; E = E->next()) { FaceConnect &fc = E->get(); if (fc.left && fc.right) { - continue; //edge is uninteresting, not on horizont + continue; //edge is uninteresting, not on horizon } //create new face! diff --git a/core/math/triangulate.cpp b/core/math/triangulate.cpp index 0047c0705da..fa1588dbc5a 100644 --- a/core/math/triangulate.cpp +++ b/core/math/triangulate.cpp @@ -97,7 +97,7 @@ bool Triangulate::snip(const Vector &p_contour, int u, int v, int w, in // It can happen that the triangulation ends up with three aligned vertices to deal with. // In this scenario, making the check below strict may reject the possibility of - // forming a last triangle with these aligned vertices, preventing the triangulatiom + // forming a last triangle with these aligned vertices, preventing the triangulation // from completing. // To avoid that we allow zero-area triangles if all else failed. float threshold = relaxed ? -CMP_EPSILON : CMP_EPSILON; diff --git a/core/object/object.cpp b/core/object/object.cpp index 1a9cce49d83..413f917518f 100644 --- a/core/object/object.cpp +++ b/core/object/object.cpp @@ -596,7 +596,7 @@ void Object::get_property_list(List *p_list, bool p_reversed) cons _get_property_listv(p_list, p_reversed); - if (!is_class("Script")) { // can still be set, but this is for userfriendlyness + if (!is_class("Script")) { // can still be set, but this is for user-friendliness p_list->push_back(PropertyInfo(Variant::OBJECT, "script", PROPERTY_HINT_RESOURCE_TYPE, "Script", PROPERTY_USAGE_DEFAULT)); } if (!metadata.is_empty()) { @@ -1671,7 +1671,7 @@ Variant::Type Object::get_static_property_type_indexed(const Vector for (int i = 1; i < p_path.size(); i++) { if (check.get_type() == Variant::OBJECT || check.get_type() == Variant::DICTIONARY || check.get_type() == Variant::ARRAY) { - // We cannot be sure about the type of properties this types can have + // We cannot be sure about the type of properties this type can have if (r_valid) { *r_valid = false; } @@ -1719,10 +1719,10 @@ void *Object::get_script_instance_binding(int p_script_language_index) { ERR_FAIL_INDEX_V(p_script_language_index, MAX_SCRIPT_INSTANCE_BINDINGS, nullptr); #endif - //it's up to the script language to make this thread safe, if the function is called twice due to threads being out of syncro + //it's up to the script language to make this thread safe, if the function is called twice due to threads being out of sync //just return the same pointer. //if you want to put a big lock in the entire function and keep allocated pointers in a map or something, feel free to do it - //as it should not really affect performance much (won't be called too often), as in far most caes the condition below will be false afterwards + //as it should not really affect performance much (won't be called too often), as in far most cases the condition below will be false afterwards if (!_script_instance_bindings[p_script_language_index]) { void *script_data = ScriptServer::get_language(p_script_language_index)->alloc_instance_binding_data(this); diff --git a/core/os/pool_allocator.cpp b/core/os/pool_allocator.cpp index b538ca0c960..9be3a62e2f2 100644 --- a/core/os/pool_allocator.cpp +++ b/core/os/pool_allocator.cpp @@ -136,7 +136,7 @@ void PoolAllocator::compact_up(int p_from) { for (int i = entry_count - 1; i >= p_from; i--) { Entry &entry = entry_array[entry_indices[i]]; - /* determine hole size to nextious entry */ + /* determine hole size for next entry */ int hole_size = next_entry_end_pos - (entry.pos + aligned(entry.len)); diff --git a/core/string/compressed_translation.cpp b/core/string/compressed_translation.cpp index ad90924293a..15abf63f7e4 100644 --- a/core/string/compressed_translation.cpp +++ b/core/string/compressed_translation.cpp @@ -44,7 +44,7 @@ struct _PHashTranslationCmp { void PHashTranslation::generate(const Ref &p_from) { // This method compresses a Translation instance. - // Right now it doesn't handle context or plurals, so Translation subclasses using plurals or context (i.e TranslationPO) shouldn't be compressed. + // Right now, it doesn't handle context or plurals, so Translation subclasses using plurals or context (i.e TranslationPO) shouldn't be compressed. #ifdef TOOLS_ENABLED List keys; p_from->get_message_list(&keys); diff --git a/core/string/translation_po.cpp b/core/string/translation_po.cpp index 846afe761b2..42ba30fbe5e 100644 --- a/core/string/translation_po.cpp +++ b/core/string/translation_po.cpp @@ -158,7 +158,7 @@ int TranslationPO::_get_plural_index(int p_n) const { void TranslationPO::_cache_plural_tests(const String &p_plural_rule) { // Some examples of p_plural_rule passed in can have the form: // "n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5" (Arabic) - // "n >= 2" (French) // When evaluating the last, esp careful with this one. + // "n >= 2" (French) // When evaluating the last, especially careful with this one. // "n != 1" (English) int first_ques_mark = p_plural_rule.find("?"); if (first_ques_mark == -1) { diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp index 9f931ef30b9..28228e4a83a 100644 --- a/core/string/ustring.cpp +++ b/core/string/ustring.cpp @@ -1764,7 +1764,7 @@ bool String::parse_utf8(const char *p_utf8, int p_len) { if (skip) { _UNICERROR("no space left"); - return true; //not enough spac + return true; //not enough space } } @@ -4480,7 +4480,7 @@ String String::sprintf(const Array &values, bool *error) const { for (; *self; self++) { const char32_t c = *self; - if (in_format) { // We have % - lets see what else we get. + if (in_format) { // We have % - let's see what else we get. switch (c) { case '%': { // Replace %% with % formatted += chr(c); diff --git a/core/variant/array.cpp b/core/variant/array.cpp index 9a2922a7770..347c6cd82e0 100644 --- a/core/variant/array.cpp +++ b/core/variant/array.cpp @@ -141,7 +141,7 @@ uint32_t Array::hash() const { void Array::_assign(const Array &p_array) { if (_p->typed.type != Variant::OBJECT && _p->typed.type == p_array._p->typed.type) { - //same type or untyped, just reference, shuold be fine + //same type or untyped, just reference, should be fine _ref(p_array); } else if (_p->typed.type == Variant::NIL) { //from typed to untyped, must copy, but this is cheap anyway _p->array = p_array._p->array; diff --git a/core/variant/callable.cpp b/core/variant/callable.cpp index bd51e2dd1e3..a1d9c5ed2f8 100644 --- a/core/variant/callable.cpp +++ b/core/variant/callable.cpp @@ -126,7 +126,7 @@ bool Callable::operator==(const Callable &p_callable) const { if (custom_a == custom_b) { if (custom_a) { if (custom == p_callable.custom) { - return true; //same pointer, dont even compare + return true; //same pointer, don't even compare } CallableCustom::CompareEqualFunc eq_a = custom->get_compare_equal_func(); @@ -155,7 +155,7 @@ bool Callable::operator<(const Callable &p_callable) const { if (custom_a == custom_b) { if (custom_a) { if (custom == p_callable.custom) { - return false; //same pointer, dont even compare + return false; //same pointer, don't even compare } CallableCustom::CompareLessFunc less_a = custom->get_compare_less_func(); diff --git a/core/variant/variant_setget.cpp b/core/variant/variant_setget.cpp index ea8263402ae..f9cc7c4ff48 100644 --- a/core/variant/variant_setget.cpp +++ b/core/variant/variant_setget.cpp @@ -2198,7 +2198,7 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant & } return; case STRING: { - //this is pretty funny and bizarre, but artists like to use it for typewritter effects + //this is pretty funny and bizarre, but artists like to use it for typewriter effects String sa = *reinterpret_cast(a._data._mem); String sb = *reinterpret_cast(b._data._mem); String dst; diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp index 9584dd3f674..469d80368d3 100644 --- a/drivers/vulkan/rendering_device_vulkan.cpp +++ b/drivers/vulkan/rendering_device_vulkan.cpp @@ -119,7 +119,7 @@ static void update_external_dependency_for_store(VkSubpassDependency &dependency } if (is_depth) { - // Depth resources have addtional stages that may be interested in them + // Depth resources have additional stages that may be interested in them dependency.dstStageMask |= VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT | VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT; dependency.dstAccessMask |= VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT; } @@ -3108,7 +3108,7 @@ Error RenderingDeviceVulkan::texture_clear(RID p_texture, const Color &p_color, VkImageLayout clear_layout = (src_tex->layout == VK_IMAGE_LAYOUT_GENERAL) ? VK_IMAGE_LAYOUT_GENERAL : VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL; - // NOTE: Perhaps the valid stages/accesses for a given onwner should be a property of the owner. (Here and places like _get_buffer_from_owner) + // NOTE: Perhaps the valid stages/accesses for a given owner should be a property of the owner. (Here and places like _get_buffer_from_owner) const VkPipelineStageFlags valid_texture_stages = VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT; constexpr VkAccessFlags read_access = VK_ACCESS_SHADER_READ_BIT; constexpr VkAccessFlags read_write_access = VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT; @@ -3250,7 +3250,7 @@ VkRenderPass RenderingDeviceVulkan::_render_pass_create(const Vector depth_stencil_references; Vector resolve_references; - // Set up a dependencies from/to external equivalent to the default (implicit) one, and then amend them + // Set up dependencies from/to external equivalent to the default (implicit) one, and then amend them const VkPipelineStageFlags default_access_mask = VK_ACCESS_INPUT_ATTACHMENT_READ_BIT | VK_ACCESS_COLOR_ATTACHMENT_READ_BIT | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT | @@ -3279,7 +3279,7 @@ VkRenderPass RenderingDeviceVulkan::_render_pass_create(const Vector &p_uniforms, } ERR_FAIL_COND_V_MSG(!buffer, RID(), "Storage buffer supplied (binding: " + itos(uniform.binding) + ") is invalid."); - //if 0, then its sized on link time + //if 0, then it's sized on link time ERR_FAIL_COND_V_MSG(set_uniform.length > 0 && buffer->size != (uint32_t)set_uniform.length, RID(), "Storage buffer supplied (binding: " + itos(uniform.binding) + ") size (" + itos(buffer->size) + " does not match size of shader uniform: (" + itos(set_uniform.length) + ")."); @@ -5336,7 +5336,7 @@ Vector RenderingDeviceVulkan::buffer_get_data(RID p_buffer) { ERR_FAIL_V_MSG(Vector(), "Buffer is either invalid or this type of buffer can't be retrieved. Only Index and Vertex buffers allow retrieving."); } - // Make sure no one is using the buffer -- the "false" gets us to the same command buffer as below. + // Make sure no one is using the buffer -- the "false" gets us to the same command buffer as below. _buffer_memory_barrier(buffer->buffer, 0, buffer->size, src_stage_mask, src_access_mask, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_ACCESS_TRANSFER_READ_BIT, false); VkCommandBuffer command_buffer = frames[frame].setup_command_buffer; @@ -5729,7 +5729,7 @@ RID RenderingDeviceVulkan::render_pipeline_create(RID p_shader, FramebufferForma #endif //create ID to associate with this pipeline RID id = render_pipeline_owner.make_rid(pipeline); - //now add aall the dependencies + //now add all the dependencies _add_dependency(id, p_shader); return id; } @@ -5780,7 +5780,7 @@ RID RenderingDeviceVulkan::compute_pipeline_create(RID p_shader) { //create ID to associate with this pipeline RID id = compute_pipeline_owner.make_rid(pipeline); - //now add aall the dependencies + //now add all the dependencies _add_dependency(id, p_shader); return id; } @@ -6817,7 +6817,7 @@ void RenderingDeviceVulkan::draw_list_end(uint32_t p_post_barrier) { // To ensure proper synchronization, we must make sure rendering is done before: // * Some buffer is copied - // * Another render pass happens (since we may be done + // * Another render pass happens (since we may be done) #ifdef FORCE_FULL_BARRIER _full_barrier(true); @@ -7780,7 +7780,7 @@ uint64_t RenderingDeviceVulkan::get_memory_usage() const { void RenderingDeviceVulkan::_flush(bool p_current_frame) { if (local_device.is_valid() && !p_current_frame) { - return; //flushign previous frames has no effect with local device + return; //flushing previous frames has no effect with local device } //not doing this crashes RADV (undefined behavior) if (p_current_frame) { diff --git a/drivers/vulkan/vulkan_context.cpp b/drivers/vulkan/vulkan_context.cpp index ad740efec41..69517b17bac 100644 --- a/drivers/vulkan/vulkan_context.cpp +++ b/drivers/vulkan/vulkan_context.cpp @@ -1313,13 +1313,13 @@ Error VulkanContext::swap_buffers() { DemoUpdateTargetIPD(demo); // Note: a real application would position its geometry to that it's in - // the correct locatoin for when the next image is presented. It might + // the correct location for when the next image is presented. It might // also wait, so that there's less latency between any input and when // the next image is rendered/presented. This demo program is so // simple that it doesn't do either of those. } #endif - // Wait for the image acquired semaphore to be signaled to ensure + // Wait for the image acquired semaphore to be signalled to ensure // that the image won't be rendered to until the presentation // engine has fully released ownership to the application, and it is // okay to render to the image. @@ -1385,7 +1385,7 @@ Error VulkanContext::swap_buffers() { ERR_FAIL_COND_V(err, ERR_CANT_CREATE); } - // If we are using separate queues we have to wait for image ownership, + // If we are using separate queues, we have to wait for image ownership, // otherwise wait for draw complete VkPresentInfoKHR present = { /*sType*/ VK_STRUCTURE_TYPE_PRESENT_INFO_KHR, diff --git a/main/main.cpp b/main/main.cpp index 9c8909f8fb5..67152bb52a8 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -529,7 +529,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph input_map = memnew(InputMap); globals = memnew(ProjectSettings); - register_core_settings(); //here globals is present + register_core_settings(); //here globals are present translation_server = memnew(TranslationServer); performance = memnew(Performance); @@ -1517,7 +1517,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) { input = memnew(Input); - /* Iniitalize Display Server */ + /* Initialize Display Server */ { String rendering_driver; // temp broken @@ -1547,7 +1547,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) { display_server->screen_set_orientation(window_orientation); } - /* Initialize Pen Table Driver */ + /* Initialize Pen Tablet Driver */ { GLOBAL_DEF_RST_NOVAL("input_devices/pen_tablet/driver", ""); @@ -1796,7 +1796,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) { if (!project_manager) { // If not running the project manager, and now that the engine is // able to load resources, load the global shader variables. - // If running on editor, dont load the textures because the editor + // If running on editor, don't load the textures because the editor // may want to import them first. Editor will reload those later. rendering_server->global_variables_load_settings(!editor); } @@ -1804,7 +1804,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) { _start_success = true; locale = String(); - ClassDB::set_current_api(ClassDB::API_NONE); //no more api is registered at this point + ClassDB::set_current_api(ClassDB::API_NONE); //no more APIs are registered at this point print_verbose("CORE API HASH: " + uitos(ClassDB::get_api_hash(ClassDB::API_CORE))); print_verbose("EDITOR API HASH: " + uitos(ClassDB::get_api_hash(ClassDB::API_EDITOR))); @@ -2606,7 +2606,7 @@ void Main::cleanup(bool p_force) { // Sync pending commands that may have been queued from a different thread during ScriptServer finalization RenderingServer::get_singleton()->sync(); - //clear global shader variables before scene and other graphics stuff is deinitialized. + //clear global shader variables before scene and other graphics stuff are deinitialized. rendering_server->global_variables_clear(); #ifdef TOOLS_ENABLED diff --git a/methods.py b/methods.py index 9b29eadc16f..725fb36caa9 100644 --- a/methods.py +++ b/methods.py @@ -334,7 +334,7 @@ def use_windows_spawn_fix(self, platform=None): # On Windows, due to the limited command line length, when creating a static library # from a very high number of objects SCons will invoke "ar" once per object file; # that makes object files with same names to be overwritten so the last wins and - # the library looses symbols defined by overwritten objects. + # the library loses symbols defined by overwritten objects. # By enabling quick append instead of the default mode (replacing), libraries will # got built correctly regardless the invocation strategy. # Furthermore, since SCons will rebuild the library from scratch when an object file @@ -478,7 +478,7 @@ def detect_visual_c_compiler_version(tools_env): # and not scons setup environment (env)... so make sure you call the right environment on it or it will fail to detect # the proper vc version that will be called - # There is no flag to give to visual c compilers to set the architecture, ie scons bits argument (32,64,ARM etc) + # There is no flag to give to visual c compilers to set the architecture, i.e. 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 below does that and returns: @@ -633,7 +633,7 @@ def generate_vs_project(env, num_jobs): 'call "' + batch_file + '" !plat!', ] - # windows allows us to have spaces in paths, so we need + # Windows allows us to have spaces in paths, so we need # to double quote off the directory. However, the path ends # in a backslash, so we need to remove this, lest it escape the # last double quote off, confusing MSBuild diff --git a/modules/bullet/bullet_physics_server.cpp b/modules/bullet/bullet_physics_server.cpp index 26e9f5a044b..7c27292e591 100644 --- a/modules/bullet/bullet_physics_server.cpp +++ b/modules/bullet/bullet_physics_server.cpp @@ -461,7 +461,7 @@ void BulletPhysicsServer3D::body_set_space(RID p_body, RID p_space) { } if (body->get_space() == space) { - return; //pointles + return; //pointless } body->set_space(space); @@ -617,11 +617,11 @@ uint32_t BulletPhysicsServer3D::body_get_collision_mask(RID p_body) const { } void BulletPhysicsServer3D::body_set_user_flags(RID p_body, uint32_t p_flags) { - // This function si not currently supported + // This function is not currently supported } uint32_t BulletPhysicsServer3D::body_get_user_flags(RID p_body) const { - // This function si not currently supported + // This function is not currently supported return 0; } @@ -898,7 +898,7 @@ void BulletPhysicsServer3D::soft_body_set_space(RID p_body, RID p_space) { } if (body->get_space() == space) { - return; //pointles + return; //pointless } body->set_space(space); diff --git a/modules/bullet/bullet_types_converter.cpp b/modules/bullet/bullet_types_converter.cpp index 7b21e4e4b26..19d4816372b 100644 --- a/modules/bullet/bullet_types_converter.cpp +++ b/modules/bullet/bullet_types_converter.cpp @@ -116,7 +116,7 @@ void UNSCALE_BT_BASIS(btTransform &scaledBasis) { } } else { // Column 1 scale not fuzzy zero. if (column2.fuzzyZero()) { - // Create two vectors othogonal to column 1. + // Create two vectors orthogonal to column 1. // Ensure that a default basis is created if column 1 = <0, 1, 0> column0 = btVector3(column1[1], -column1[0], 0); column2 = column0.cross(column1); diff --git a/modules/bullet/godot_collision_dispatcher.cpp b/modules/bullet/godot_collision_dispatcher.cpp index 5d1e4d34d80..423166c4081 100644 --- a/modules/bullet/godot_collision_dispatcher.cpp +++ b/modules/bullet/godot_collision_dispatcher.cpp @@ -43,7 +43,7 @@ GodotCollisionDispatcher::GodotCollisionDispatcher(btCollisionConfiguration *col bool GodotCollisionDispatcher::needsCollision(const btCollisionObject *body0, const btCollisionObject *body1) { if (body0->getUserIndex() == CASTED_TYPE_AREA || body1->getUserIndex() == CASTED_TYPE_AREA) { - // Avoide area narrow phase + // Avoid area narrow phase return false; } return btCollisionDispatcher::needsCollision(body0, body1); @@ -51,7 +51,7 @@ bool GodotCollisionDispatcher::needsCollision(const btCollisionObject *body0, co bool GodotCollisionDispatcher::needsResponse(const btCollisionObject *body0, const btCollisionObject *body1) { if (body0->getUserIndex() == CASTED_TYPE_AREA || body1->getUserIndex() == CASTED_TYPE_AREA) { - // Avoide area narrow phase + // Avoid area narrow phase return false; } return btCollisionDispatcher::needsResponse(body0, body1); diff --git a/modules/bullet/godot_result_callbacks.cpp b/modules/bullet/godot_result_callbacks.cpp index 15d625afeb9..e92b6c189cd 100644 --- a/modules/bullet/godot_result_callbacks.cpp +++ b/modules/bullet/godot_result_callbacks.cpp @@ -113,7 +113,7 @@ btScalar GodotAllConvexResultCallback::addSingleResult(btCollisionWorld::LocalCo PhysicsDirectSpaceState3D::ShapeResult &result = m_results[count]; - result.shape = convexResult.m_localShapeInfo->m_triangleIndex; // "m_triangleIndex" Is a odd name but contains the compound shape ID + result.shape = convexResult.m_localShapeInfo->m_triangleIndex; // "m_triangleIndex" Is an odd name but contains the compound shape ID result.rid = gObj->get_self(); result.collider_id = gObj->get_instance_id(); result.collider = result.collider_id.is_null() ? nullptr : ObjectDB::get_instance(result.collider_id); @@ -176,7 +176,7 @@ bool GodotClosestConvexResultCallback::needsCollision(btBroadphaseProxy *proxy0) btScalar GodotClosestConvexResultCallback::addSingleResult(btCollisionWorld::LocalConvexResult &convexResult, bool normalInWorldSpace) { if (convexResult.m_localShapeInfo) { - m_shapeId = convexResult.m_localShapeInfo->m_triangleIndex; // "m_triangleIndex" Is a odd name but contains the compound shape ID + m_shapeId = convexResult.m_localShapeInfo->m_triangleIndex; // "m_triangleIndex" Is an odd name but contains the compound shape ID } else { m_shapeId = 0; } diff --git a/modules/bullet/rigid_body_bullet.cpp b/modules/bullet/rigid_body_bullet.cpp index a5093afe9dc..433bff8c383 100644 --- a/modules/bullet/rigid_body_bullet.cpp +++ b/modules/bullet/rigid_body_bullet.cpp @@ -515,7 +515,7 @@ real_t RigidBodyBullet::get_param(PhysicsServer3D::BodyParameter p_param) const } void RigidBodyBullet::set_mode(PhysicsServer3D::BodyMode p_mode) { - // This is necessary to block force_integration untile next move + // This is necessary to block force_integration until next move can_integrate_forces = false; destroy_kinematic_utilities(); // The mode change is relevant to its mass @@ -725,7 +725,7 @@ void RigidBodyBullet::set_continuous_collision_detection(bool p_enable) { // 1 meter in one simulation frame btBody->setCcdMotionThreshold(1e-7); - /// Calculate using the rule writte below the CCD swept sphere radius + /// Calculate using the rule write below the CCD swept sphere radius /// CCD works on an embedded sphere of radius, make sure this radius /// is embedded inside the convex objects, preferably smaller: /// for an object of dimensions 1 meter, try 0.2 diff --git a/modules/bullet/soft_body_bullet.cpp b/modules/bullet/soft_body_bullet.cpp index 91a1934e07c..a8980984a79 100644 --- a/modules/bullet/soft_body_bullet.cpp +++ b/modules/bullet/soft_body_bullet.cpp @@ -336,7 +336,7 @@ void SoftBodyBullet::set_trimesh_body_shape(Vector p_indices, Vector::Element *e = unique_vertices.find(p_vertices_read[vs_vertex_index]); int vertex_id; if (e) { - // Already rxisting + // Already existing vertex_id = e->value(); } else { // Create new one diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp index 7d337bc4d0c..ceae3be8bc1 100644 --- a/modules/bullet/space_bullet.cpp +++ b/modules/bullet/space_bullet.cpp @@ -81,7 +81,7 @@ int BulletPhysicsDirectSpaceState::intersect_point(const Vector3 &p_point, Shape btResult.m_collisionFilterMask = p_collision_mask; space->dynamicsWorld->contactTest(&collision_object_point, btResult); - // The results is already populated by GodotAllConvexResultCallback + // The results are already populated by GodotAllConvexResultCallback return btResult.m_count; } diff --git a/modules/csg/csg.cpp b/modules/csg/csg.cpp index f0a2f17ba9b..8b46447f046 100644 --- a/modules/csg/csg.cpp +++ b/modules/csg/csg.cpp @@ -970,7 +970,7 @@ void CSGBrushOperation::Build2DFaces::_merge_faces(const Vector &p_segment_ continue; } - // Check if point is on an each edge. + // Check if point is on each edge. for (int face_edge_idx = 0; face_edge_idx < 3; ++face_edge_idx) { Vector2 edge_points[2] = { face_points[face_edge_idx], @@ -1076,7 +1076,7 @@ void CSGBrushOperation::Build2DFaces::_find_edge_intersections(const Vector2 p_s break; } - // If opposite point is on the segemnt, add its index to segment indices too. + // If opposite point is on the segment, add its index to segment indices too. Vector2 closest_point = Geometry2D::get_closest_point_to_segment(vertices[opposite_vertex_idx].point, p_segment_points); if ((closest_point - vertices[opposite_vertex_idx].point).length_squared() < vertex_snap2) { _add_vertex_idx_sorted(r_segment_indices, opposite_vertex_idx); @@ -1137,7 +1137,7 @@ int CSGBrushOperation::Build2DFaces::_insert_point(const Vector2 &p_point) { } } - // Check if point is on an each edge. + // Check if point is on each edge. bool on_edge = false; for (int face_edge_idx = 0; face_edge_idx < 3; ++face_edge_idx) { Vector2 edge_points[2] = { @@ -1400,7 +1400,7 @@ void CSGBrushOperation::update_faces(const CSGBrush &p_brush_a, const int p_face under_count++; } } - // If all points under or over the plane, there is no intesection. + // If all points under or over the plane, there is no intersection. if (over_count == 3 || under_count == 3) { return; } @@ -1421,7 +1421,7 @@ void CSGBrushOperation::update_faces(const CSGBrush &p_brush_a, const int p_face under_count++; } } - // If all points under or over the plane, there is no intesection. + // If all points under or over the plane, there is no intersection. if (over_count == 3 || under_count == 3) { return; } diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp index 40ba457e434..b97ee6ce4c6 100644 --- a/modules/csg/csg_shape.cpp +++ b/modules/csg/csg_shape.cpp @@ -1160,7 +1160,7 @@ CSGBrush *CSGBox3D::_build_brush() { materialsw[face] = material; face++; - //face 1 + //face 2 facesw[face * 3 + 0] = face_points[2] * vertex_mul; facesw[face * 3 + 1] = face_points[3] * vertex_mul; facesw[face * 3 + 2] = face_points[0] * vertex_mul; diff --git a/modules/enet/networked_multiplayer_enet.cpp b/modules/enet/networked_multiplayer_enet.cpp index 276f13e5532..25b87145b62 100644 --- a/modules/enet/networked_multiplayer_enet.cpp +++ b/modules/enet/networked_multiplayer_enet.cpp @@ -248,7 +248,7 @@ void NetworkedMultiplayerENet::poll() { int *new_id = memnew(int); *new_id = event.data; - if (*new_id == 0) { // Data zero is sent by server (enet won't let you configure this). Server is always 1. + if (*new_id == 0) { // Data zero is sent by server (ENet won't let you configure this). Server is always 1. *new_id = 1; } diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp index 1bdbb0b03bb..0025f4bb067 100644 --- a/modules/gdnative/nativescript/nativescript.cpp +++ b/modules/gdnative/nativescript/nativescript.cpp @@ -173,7 +173,7 @@ bool NativeScript::can_instance() const { #ifdef TOOLS_ENABLED // Only valid if this is either a tool script or a "regular" script. - // (so an environment whre scripting is disabled (and not the editor) would not + // (so, an environment where scripting is disabled (and not the editor) would not // create objects). return script_data && (is_tool() || ScriptServer::is_scripting_enabled()); #else diff --git a/modules/gdnative/register_types.cpp b/modules/gdnative/register_types.cpp index 31f4fecb193..d08bde9e23f 100644 --- a/modules/gdnative/register_types.cpp +++ b/modules/gdnative/register_types.cpp @@ -142,7 +142,7 @@ void GDNativeExportPlugin::_export_file(const String &p_path, const String &p_ty } } - // Add symbols for staticaly linked libraries on iOS + // Add symbols for statically linked libraries on iOS if (p_features.has("iOS")) { bool should_fake_dynamic = false; diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp index 06d628d23f3..76b7522f410 100644 --- a/modules/gdscript/gdscript_compiler.cpp +++ b/modules/gdscript/gdscript_compiler.cpp @@ -2419,7 +2419,7 @@ Error GDScriptCompiler::_parse_class_blocks(GDScript *p_script, const GDScriptPa p_script->initializer->call(instance, nullptr, 0, ce); if (ce.error != Callable::CallError::CALL_OK) { - //well, tough luck, not goinna do anything here + //well, tough luck, not gonna do anything here } } #endif diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp index c6c9a439df0..7b37aa40a2b 100644 --- a/modules/gdscript/gdscript_function.cpp +++ b/modules/gdscript/gdscript_function.cpp @@ -244,7 +244,7 @@ Variant GDScriptFunctionState::resume(const Variant &p_arg) { bool completed = true; // If the return value is a GDScriptFunctionState reference, - // then the function did awaited again after resuming. + // then the function did await again after resuming. if (ret.is_ref()) { GDScriptFunctionState *gdfs = Object::cast_to(ret); if (gdfs && gdfs->function == function) { diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index 15cb3146ee9..7f3dd6b2e51 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -3018,7 +3018,7 @@ GDScriptParser::ParseRule *GDScriptParser::get_rule(GDScriptTokenizer::Token::Ty // Avoid desync. static_assert(sizeof(rules) / sizeof(rules[0]) == GDScriptTokenizer::Token::TK_MAX, "Amount of parse rules don't match the amount of token types."); - // Let's assume this this never invalid, since nothing generates a TK_MAX. + // Let's assume this is never invalid, since nothing generates a TK_MAX. return &rules[p_token_type]; } diff --git a/modules/gdscript/gdscript_tokenizer.cpp b/modules/gdscript/gdscript_tokenizer.cpp index 315b8ee3b49..319778daab3 100644 --- a/modules/gdscript/gdscript_tokenizer.cpp +++ b/modules/gdscript/gdscript_tokenizer.cpp @@ -1169,7 +1169,7 @@ GDScriptTokenizer::Token GDScriptTokenizer::scan() { if (pending_newline) { pending_newline = false; if (!multiline_mode) { - // Don't return newline tokens on multine mode. + // Don't return newline tokens on multiline mode. return last_newline; } } diff --git a/modules/gdscript/gdscript_vm.cpp b/modules/gdscript/gdscript_vm.cpp index 4e098d7a6d5..2216fcab2d0 100644 --- a/modules/gdscript/gdscript_vm.cpp +++ b/modules/gdscript/gdscript_vm.cpp @@ -649,7 +649,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a if (scr_B) { //if B is a script, the only valid condition is that A has an instance which inherits from the script - //in other situation, this shoul return false. + //in other situation, this should return false. if (obj_A->get_script_instance() && obj_A->get_script_instance()->get_language() == GDScriptLanguage::get_singleton()) { GDScript *cmp = static_cast(obj_A->get_script_instance()->get_script().ptr()); diff --git a/modules/gdscript/register_types.cpp b/modules/gdscript/register_types.cpp index e90475a60e6..93b709a6131 100644 --- a/modules/gdscript/register_types.cpp +++ b/modules/gdscript/register_types.cpp @@ -85,7 +85,7 @@ public: return; } - // TODO: Readd compiled GDScript on export. + // TODO: Re-add compiled GDScript on export. return; } }; diff --git a/modules/mbedtls/stream_peer_mbedtls.cpp b/modules/mbedtls/stream_peer_mbedtls.cpp index d7597aa4359..b39a6ecc2f7 100644 --- a/modules/mbedtls/stream_peer_mbedtls.cpp +++ b/modules/mbedtls/stream_peer_mbedtls.cpp @@ -242,7 +242,7 @@ void StreamPeerMbedTLS::poll() { return; } - // We could pass NULL as second parameter, but some behaviour sanitizers doesn't seem to like that. + // We could pass NULL as second parameter, but some behaviour sanitizers don't seem to like that. // Passing a 1 byte buffer to workaround it. uint8_t byte; int ret = mbedtls_ssl_read(ssl_ctx->get_context(), &byte, 0); diff --git a/modules/mobile_vr/mobile_vr_interface.cpp b/modules/mobile_vr/mobile_vr_interface.cpp index 25b110dc628..5140cfbbaf7 100644 --- a/modules/mobile_vr/mobile_vr_interface.cpp +++ b/modules/mobile_vr/mobile_vr_interface.cpp @@ -153,8 +153,8 @@ void MobileVRInterface::set_position_from_sensors() { last_magnetometer_data = magneto; if (grav.length() < 0.1) { - // not ideal but use our accelerometer, this will contain shakey shakey user behaviour - // maybe look into some math but I'm guessing that if this isn't available, its because we lack the gyro sensor to actually work out + // not ideal but use our accelerometer, this will contain shaky user behaviour + // maybe look into some math but I'm guessing that if this isn't available, it's because we lack the gyro sensor to actually work out // what a stable gravity vector is grav = acc; if (grav.length() > 0.1) { @@ -181,8 +181,8 @@ void MobileVRInterface::set_position_from_sensors() { tracking_state = XRInterface::XR_NORMAL_TRACKING; }; - ///@TODO improve this, the magnetometer is very fidgity sometimes flipping the axis for no apparent reason (probably a bug on my part) - // if you have a gyro + accelerometer that combo tends to be better then combining all three but without a gyro you need the magnetometer.. + ///@TODO improve this, the magnetometer is very fidgety sometimes flipping the axis for no apparent reason (probably a bug on my part) + // if you have a gyro + accelerometer that combo tends to be better than combining all three but without a gyro you need the magnetometer.. if (has_magneto && has_grav && !has_gyro) { // convert to quaternions, easier to smooth those out Quat transform_quat(orientation); @@ -372,7 +372,7 @@ Transform MobileVRInterface::get_transform_for_eye(XRInterface::Eyes p_eye, cons if (initialized) { float world_scale = xr_server->get_world_scale(); - // we don't need to check for the existence of our HMD, doesn't effect our values... + // we don't need to check for the existence of our HMD, doesn't affect our values... // note * 0.01 to convert cm to m and * 0.5 as we're moving half in each direction... if (p_eye == XRInterface::EYE_LEFT) { transform_for_eye.origin.x = -(intraocular_dist * 0.01 * 0.5 * world_scale); @@ -402,7 +402,7 @@ CameraMatrix MobileVRInterface::get_projection_for_eye(XRInterface::Eyes p_eye, CameraMatrix eye; if (p_eye == XRInterface::EYE_MONO) { - ///@TODO for now hardcode some of this, what is really needed here is that this needs to be in sync with the real cameras properties + ///@TODO for now hardcode some of this, what is really needed here is that this needs to be in sync with the real camera's properties // which probably means implementing a specific class for iOS and Android. For now this is purely here as an example. // Note also that if you use a normal viewport with AR/VR turned off you can still use the tracker output of this interface // to position a stock standard Godot camera and have control over this. diff --git a/modules/text_server_adv/dynamic_font_adv.cpp b/modules/text_server_adv/dynamic_font_adv.cpp index b60b9ddaece..2521e68dda6 100644 --- a/modules/text_server_adv/dynamic_font_adv.cpp +++ b/modules/text_server_adv/dynamic_font_adv.cpp @@ -129,7 +129,7 @@ DynamicFontDataAdvanced::DataAtSize *DynamicFontDataAdvanced::get_data_for_size( fds->underline_position = (-FT_MulFix(fds->face->underline_position, fds->face->size->metrics.y_scale) / 64.0) / oversampling * fds->scale_color_font; fds->underline_thickness = (FT_MulFix(fds->face->underline_thickness, fds->face->size->metrics.y_scale) / 64.0) / oversampling * fds->scale_color_font; - //Load os2 TTF pable + //Load os2 TTF table fds->os2 = (TT_OS2 *)FT_Get_Sfnt_Table(fds->face, FT_SFNT_OS2); fds->hb_handle = hb_ft_font_create(fds->face, nullptr); diff --git a/modules/text_server_adv/text_server_adv.cpp b/modules/text_server_adv/text_server_adv.cpp index 2e3c2d1cab1..43b8f181017 100644 --- a/modules/text_server_adv/text_server_adv.cpp +++ b/modules/text_server_adv/text_server_adv.cpp @@ -166,7 +166,7 @@ bool TextServerAdvanced::load_support_data(const String &p_filename) { #ifdef ICU_STATIC_DATA if (icu_data == nullptr) { UErrorCode err = U_ZERO_ERROR; - u_init(&err); // Do not check for errors, since we only load part the of data. + u_init(&err); // Do not check for errors, since we only load part of the data. icu_data = (uint8_t *)&U_ICUDATA_ENTRY_POINT; } #else @@ -244,7 +244,7 @@ struct FeatureInfo { }; static FeatureInfo feature_set[] = { - // Registred OpenType feature tags. + // Registered OpenType feature tags. { HB_TAG('a', 'a', 'l', 't'), "access_all_alternates" }, { HB_TAG('a', 'b', 'v', 'f'), "above_base_forms" }, { HB_TAG('a', 'b', 'v', 'm'), "above_base_mark_positioning" }, @@ -484,7 +484,7 @@ static FeatureInfo feature_set[] = { { HB_TAG('v', 'r', 't', '2'), "vertical_alternates_and_rotation" }, { HB_TAG('v', 'r', 't', 'r'), "vertical_alternates_for_rotation" }, { HB_TAG('z', 'e', 'r', 'o'), "slashed_zero" }, - // Registred OpenType variation tags. + // Registered OpenType variation tags. { HB_TAG('i', 't', 'a', 'l'), "italic" }, { HB_TAG('o', 'p', 's', 'z'), "optical_size" }, { HB_TAG('s', 'l', 'n', 't'), "slant" }, @@ -1660,7 +1660,7 @@ bool TextServerAdvanced::shaped_text_update_breaks(RID p_shaped) { } if (sd->line_breaks_valid) { - return true; // Noting to do. + return true; // Nothing to do. } const UChar *data = sd->utf16.ptr(); @@ -1845,7 +1845,7 @@ bool TextServerAdvanced::shaped_text_update_justification_ops(RID p_shaped) { } if (sd->justification_ops_valid) { - return true; // Noting to do. + return true; // Nothing to do. } const UChar *data = sd->utf16.ptr(); diff --git a/modules/text_server_fb/text_server_fb.cpp b/modules/text_server_fb/text_server_fb.cpp index 60ab14738a8..f46f96d30df 100644 --- a/modules/text_server_fb/text_server_fb.cpp +++ b/modules/text_server_fb/text_server_fb.cpp @@ -1091,7 +1091,7 @@ bool TextServerFallback::shaped_text_update_breaks(RID p_shaped) { } if (sd->line_breaks_valid) { - return true; // Noting to do. + return true; // Nothing to do. } int sd_size = sd->glyphs.size(); diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp index 2517b171682..e91ae46a579 100644 --- a/modules/visual_script/visual_script.cpp +++ b/modules/visual_script/visual_script.cpp @@ -1369,7 +1369,7 @@ void VisualScriptInstance::_dependency_step(VisualScriptNodeInstance *node, int // Is a default value (unassigned input port). input_args[i] = &default_values[index]; } else { - // Rregular temporary in stack. + // Regular temporary in stack. input_args[i] = &variant_stack[index]; } } @@ -1391,7 +1391,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p ERR_FAIL_COND_V(!F, Variant()); Function *f = &F->get(); - // This call goes separate, so it can e yielded and suspended. + // This call goes separate, so it can be yielded and suspended. Variant *variant_stack = (Variant *)p_stack; bool *sequence_bits = (bool *)(variant_stack + f->max_stack); const Variant **input_args = (const Variant **)(sequence_bits + f->node_count); diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index fcd55b3049b..3b2cd505444 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -3958,7 +3958,7 @@ void VisualScriptEditor::_menu_option(int p_what) { if (start_node == -1) { // If we still don't have a start node then, // run through the nodes and select the first tree node, - // ie node without any input sequence but output sequence. + // i.e. node without any input sequence but output sequence. for (Set::Element *E = nodes_from.front(); E; E = E->next()) { if (!nodes_to.has(E->get())) { start_node = E->get(); diff --git a/modules/visual_script/visual_script_expression.cpp b/modules/visual_script/visual_script_expression.cpp index f673cbb06d2..cb4230bea99 100644 --- a/modules/visual_script/visual_script_expression.cpp +++ b/modules/visual_script/visual_script_expression.cpp @@ -1054,7 +1054,7 @@ VisualScriptExpression::ENode *VisualScriptExpression::_parse_expression() { } } - /* Reduce the set set of expressions and place them in an operator tree, respecting precedence */ + /* Reduce the set of expressions and place them in an operator tree, respecting precedence */ while (expression.size() > 1) { int next_op = -1; diff --git a/modules/visual_script/visual_script_flow_control.cpp b/modules/visual_script/visual_script_flow_control.cpp index e2a83235093..e977f9c96b4 100644 --- a/modules/visual_script/visual_script_flow_control.cpp +++ b/modules/visual_script/visual_script_flow_control.cpp @@ -800,7 +800,7 @@ public: } if (!ResourceCache::has(script)) { - //if the script is not in use by anyone, we can safely assume whathever we got is not casting to it. + //if the script is not in use by anyone, we can safely assume whatever we got is not casting to it. return 1; } Ref