diff options
Diffstat (limited to 'core')
32 files changed, 72 insertions, 74 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index cfd7677d6b..2477b1b187 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -1033,10 +1033,8 @@ void _OS::_bind_methods() { ClassDB::bind_method(D_METHOD("get_time", "utc"), &_OS::get_time, DEFVAL(false)); ClassDB::bind_method(D_METHOD("get_time_zone_info"), &_OS::get_time_zone_info); ClassDB::bind_method(D_METHOD("get_unix_time"), &_OS::get_unix_time); - ClassDB::bind_method(D_METHOD("get_datetime_from_unix_time", "unix_time_val"), - &_OS::get_datetime_from_unix_time); - ClassDB::bind_method(D_METHOD("get_unix_time_from_datetime", "datetime"), - &_OS::get_unix_time_from_datetime); + ClassDB::bind_method(D_METHOD("get_datetime_from_unix_time", "unix_time_val"), &_OS::get_datetime_from_unix_time); + ClassDB::bind_method(D_METHOD("get_unix_time_from_datetime", "datetime"), &_OS::get_unix_time_from_datetime); ClassDB::bind_method(D_METHOD("get_system_time_secs"), &_OS::get_system_time_secs); ClassDB::bind_method(D_METHOD("set_icon", "icon"), &_OS::set_icon); @@ -1337,7 +1335,7 @@ void _Geometry::_bind_methods() { ClassDB::bind_method(D_METHOD("build_box_planes", "extents"), &_Geometry::build_box_planes); ClassDB::bind_method(D_METHOD("build_cylinder_planes", "radius", "height", "sides", "axis"), &_Geometry::build_cylinder_planes, DEFVAL(Vector3::AXIS_Z)); ClassDB::bind_method(D_METHOD("build_capsule_planes", "radius", "height", "sides", "lats", "axis"), &_Geometry::build_capsule_planes, DEFVAL(Vector3::AXIS_Z)); - ClassDB::bind_method(D_METHOD("segment_intersects_circle", "segment_from", "segment_to", "circle_pos", "circle_radius"), &_Geometry::segment_intersects_circle); + ClassDB::bind_method(D_METHOD("segment_intersects_circle", "segment_from", "segment_to", "circle_position", "circle_radius"), &_Geometry::segment_intersects_circle); ClassDB::bind_method(D_METHOD("segment_intersects_segment_2d", "from_a", "to_a", "from_b", "to_b"), &_Geometry::segment_intersects_segment_2d); ClassDB::bind_method(D_METHOD("get_closest_points_between_segments_2d", "p1", "q1", "p2", "q2"), &_Geometry::get_closest_points_between_segments_2d); @@ -1353,7 +1351,7 @@ void _Geometry::_bind_methods() { ClassDB::bind_method(D_METHOD("ray_intersects_triangle", "from", "dir", "a", "b", "c"), &_Geometry::ray_intersects_triangle); ClassDB::bind_method(D_METHOD("segment_intersects_triangle", "from", "to", "a", "b", "c"), &_Geometry::segment_intersects_triangle); - ClassDB::bind_method(D_METHOD("segment_intersects_sphere", "from", "to", "spos", "sradius"), &_Geometry::segment_intersects_sphere); + ClassDB::bind_method(D_METHOD("segment_intersects_sphere", "from", "to", "sphere_position", "sphere_radius"), &_Geometry::segment_intersects_sphere); ClassDB::bind_method(D_METHOD("segment_intersects_cylinder", "from", "to", "height", "radius"), &_Geometry::segment_intersects_cylinder); ClassDB::bind_method(D_METHOD("segment_intersects_convex", "from", "to", "planes"), &_Geometry::segment_intersects_convex); ClassDB::bind_method(D_METHOD("point_is_inside_triangle", "point", "a", "b", "c"), &_Geometry::point_is_inside_triangle); @@ -1452,10 +1450,10 @@ void _File::seek_end(int64_t p_position) { ERR_FAIL_COND(!f); f->seek_end(p_position); } -int64_t _File::get_pos() const { +int64_t _File::get_position() const { ERR_FAIL_COND_V(!f, 0); - return f->get_pos(); + return f->get_position(); } int64_t _File::get_len() const { @@ -1534,7 +1532,7 @@ String _File::get_as_text() const { ERR_FAIL_COND_V(!f, String()); String text; - size_t original_pos = f->get_pos(); + size_t original_pos = f->get_position(); f->seek(0); String l = get_line(); @@ -1731,9 +1729,9 @@ void _File::_bind_methods() { ClassDB::bind_method(D_METHOD("open", "path", "flags"), &_File::open); ClassDB::bind_method(D_METHOD("close"), &_File::close); ClassDB::bind_method(D_METHOD("is_open"), &_File::is_open); - ClassDB::bind_method(D_METHOD("seek", "pos"), &_File::seek); - ClassDB::bind_method(D_METHOD("seek_end", "pos"), &_File::seek_end, DEFVAL(0)); - ClassDB::bind_method(D_METHOD("get_pos"), &_File::get_pos); + ClassDB::bind_method(D_METHOD("seek", "position"), &_File::seek); + ClassDB::bind_method(D_METHOD("seek_end", "position"), &_File::seek_end, DEFVAL(0)); + ClassDB::bind_method(D_METHOD("get_position"), &_File::get_position); ClassDB::bind_method(D_METHOD("get_len"), &_File::get_len); ClassDB::bind_method(D_METHOD("eof_reached"), &_File::eof_reached); ClassDB::bind_method(D_METHOD("get_8"), &_File::get_8); diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index 721acf657f..1a22d45932 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -399,7 +399,7 @@ public: void seek(int64_t p_position); ///< seek to a given position void seek_end(int64_t p_position = 0); ///< seek from the end of file - int64_t get_pos() const; ///< get position in the file + int64_t get_position() const; ///< get position in the file int64_t get_len() const; ///< get size of the file bool eof_reached() const; ///< reading passed EOF diff --git a/core/io/file_access_buffered.cpp b/core/io/file_access_buffered.cpp index 859f2e3f8c..9ec03bf32b 100644 --- a/core/io/file_access_buffered.cpp +++ b/core/io/file_access_buffered.cpp @@ -76,7 +76,7 @@ void FileAccessBuffered::seek_end(int64_t p_position) { file.offset = file.size + p_position; }; -size_t FileAccessBuffered::get_pos() const { +size_t FileAccessBuffered::get_position() const { return file.offset; }; diff --git a/core/io/file_access_buffered.h b/core/io/file_access_buffered.h index d3137058fb..70aaeb8ae0 100644 --- a/core/io/file_access_buffered.h +++ b/core/io/file_access_buffered.h @@ -72,7 +72,7 @@ protected: int get_cache_size(); public: - virtual size_t get_pos() const; ///< get position in the file + virtual size_t get_position() const; ///< get position in the file virtual size_t get_len() const; ///< get size of the file virtual void seek(size_t p_position); ///< seek to a given position diff --git a/core/io/file_access_compressed.cpp b/core/io/file_access_compressed.cpp index 70430ca5d3..4750945854 100644 --- a/core/io/file_access_compressed.cpp +++ b/core/io/file_access_compressed.cpp @@ -62,7 +62,7 @@ Error FileAccessCompressed::open_after_magic(FileAccess *p_base) { block_size = f->get_32(); read_total = f->get_32(); int bc = (read_total / block_size) + 1; - int acc_ofs = f->get_pos() + bc * 4; + int acc_ofs = f->get_position() + bc * 4; int max_bs = 0; for (int i = 0; i < bc; i++) { @@ -232,7 +232,7 @@ void FileAccessCompressed::seek_end(int64_t p_position) { seek(read_total + p_position); } } -size_t FileAccessCompressed::get_pos() const { +size_t FileAccessCompressed::get_position() const { ERR_FAIL_COND_V(!f, 0); if (writing) { diff --git a/core/io/file_access_compressed.h b/core/io/file_access_compressed.h index ba84c9767c..1a57e2d4ee 100644 --- a/core/io/file_access_compressed.h +++ b/core/io/file_access_compressed.h @@ -74,7 +74,7 @@ public: virtual void seek(size_t p_position); ///< seek to a given position virtual void seek_end(int64_t p_position = 0); ///< seek from the end of file - virtual size_t get_pos() const; ///< get position in the file + virtual size_t get_position() const; ///< get position in the file virtual size_t get_len() const; ///< get size of the file virtual bool eof_reached() const; ///< reading passed EOF diff --git a/core/io/file_access_encrypted.cpp b/core/io/file_access_encrypted.cpp index 12503f3be4..461c5bafe2 100644 --- a/core/io/file_access_encrypted.cpp +++ b/core/io/file_access_encrypted.cpp @@ -71,7 +71,7 @@ Error FileAccessEncrypted::open_and_parse(FileAccess *p_base, const Vector<uint8 unsigned char md5d[16]; p_base->get_buffer(md5d, 16); length = p_base->get_64(); - base = p_base->get_pos(); + base = p_base->get_position(); ERR_FAIL_COND_V(p_base->get_len() < base + length, ERR_FILE_CORRUPT); uint32_t ds = length; if (ds % 16) { @@ -199,7 +199,7 @@ void FileAccessEncrypted::seek_end(int64_t p_position) { seek(data.size() + p_position); } -size_t FileAccessEncrypted::get_pos() const { +size_t FileAccessEncrypted::get_position() const { return pos; } diff --git a/core/io/file_access_encrypted.h b/core/io/file_access_encrypted.h index 74d00a5a8f..82f60ac654 100644 --- a/core/io/file_access_encrypted.h +++ b/core/io/file_access_encrypted.h @@ -61,7 +61,7 @@ public: virtual void seek(size_t p_position); ///< seek to a given position virtual void seek_end(int64_t p_position = 0); ///< seek from the end of file - virtual size_t get_pos() const; ///< get position in the file + virtual size_t get_position() const; ///< get position in the file virtual size_t get_len() const; ///< get size of the file virtual bool eof_reached() const; ///< reading passed EOF diff --git a/core/io/file_access_memory.cpp b/core/io/file_access_memory.cpp index 5b186b7798..b948394385 100644 --- a/core/io/file_access_memory.cpp +++ b/core/io/file_access_memory.cpp @@ -120,7 +120,7 @@ void FileAccessMemory::seek_end(int64_t p_position) { pos = length + p_position; } -size_t FileAccessMemory::get_pos() const { +size_t FileAccessMemory::get_position() const { ERR_FAIL_COND_V(!data, 0); return pos; diff --git a/core/io/file_access_memory.h b/core/io/file_access_memory.h index 7feb16461b..b7b8430089 100644 --- a/core/io/file_access_memory.h +++ b/core/io/file_access_memory.h @@ -51,7 +51,7 @@ public: virtual void seek(size_t p_position); ///< seek to a given position virtual void seek_end(int64_t p_position); ///< seek from the end of file - virtual size_t get_pos() const; ///< get position in the file + virtual size_t get_position() const; ///< get position in the file virtual size_t get_len() const; ///< get size of the file virtual bool eof_reached() const; ///< reading passed EOF diff --git a/core/io/file_access_network.cpp b/core/io/file_access_network.cpp index 58ca2d4c58..8c624226a1 100644 --- a/core/io/file_access_network.cpp +++ b/core/io/file_access_network.cpp @@ -350,7 +350,7 @@ void FileAccessNetwork::seek_end(int64_t p_position) { seek(total_size + p_position); } -size_t FileAccessNetwork::get_pos() const { +size_t FileAccessNetwork::get_position() const { ERR_FAIL_COND_V(!opened, 0); return pos; diff --git a/core/io/file_access_network.h b/core/io/file_access_network.h index cd5046f007..abbe378b60 100644 --- a/core/io/file_access_network.h +++ b/core/io/file_access_network.h @@ -145,7 +145,7 @@ public: virtual void seek(size_t p_position); ///< seek to a given position virtual void seek_end(int64_t p_position = 0); ///< seek from the end of file - virtual size_t get_pos() const; ///< get position in the file + virtual size_t get_position() const; ///< get position in the file virtual size_t get_len() const; ///< get size of the file virtual bool eof_reached() const; ///< reading passed EOF diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp index e511085ac5..ff4c28ec39 100644 --- a/core/io/file_access_pack.cpp +++ b/core/io/file_access_pack.cpp @@ -140,17 +140,17 @@ bool PackedSourcePCK::try_open_pack(const String &p_path) { if (magic != 0x43504447) { //maybe at he end.... self contained exe f->seek_end(); - f->seek(f->get_pos() - 4); + f->seek(f->get_position() - 4); magic = f->get_32(); if (magic != 0x43504447) { memdelete(f); return false; } - f->seek(f->get_pos() - 12); + f->seek(f->get_position() - 12); uint64_t ds = f->get_64(); - f->seek(f->get_pos() - ds - 8); + f->seek(f->get_position() - ds - 8); magic = f->get_32(); if (magic != 0x43504447) { @@ -236,7 +236,7 @@ void FileAccessPack::seek_end(int64_t p_position) { seek(pf.size + p_position); } -size_t FileAccessPack::get_pos() const { +size_t FileAccessPack::get_position() const { return pos; } diff --git a/core/io/file_access_pack.h b/core/io/file_access_pack.h index 758e9afa8e..3deb0d2bd3 100644 --- a/core/io/file_access_pack.h +++ b/core/io/file_access_pack.h @@ -148,7 +148,7 @@ public: virtual void seek(size_t p_position); virtual void seek_end(int64_t p_position = 0); - virtual size_t get_pos() const; + virtual size_t get_position() const; virtual size_t get_len() const; virtual bool eof_reached() const; diff --git a/core/io/file_access_zip.cpp b/core/io/file_access_zip.cpp index 8c99ef2983..73b23ac702 100644 --- a/core/io/file_access_zip.cpp +++ b/core/io/file_access_zip.cpp @@ -65,7 +65,7 @@ static uLong godot_write(voidpf opaque, voidpf stream, const void *buf, uLong si static long godot_tell(voidpf opaque, voidpf stream) { FileAccess *f = (FileAccess *)opaque; - return f->get_pos(); + return f->get_position(); }; static long godot_seek(voidpf opaque, voidpf stream, uLong offset, int origin) { @@ -76,7 +76,7 @@ static long godot_seek(voidpf opaque, voidpf stream, uLong offset, int origin) { switch (origin) { case ZLIB_FILEFUNC_SEEK_CUR: - pos = f->get_pos() + offset; + pos = f->get_position() + offset; break; case ZLIB_FILEFUNC_SEEK_END: pos = f->get_len() + offset; @@ -301,7 +301,7 @@ void FileAccessZip::seek_end(int64_t p_position) { unzSeekCurrentFile(zfile, get_len() + p_position); }; -size_t FileAccessZip::get_pos() const { +size_t FileAccessZip::get_position() const { ERR_FAIL_COND_V(!zfile, 0); return unztell(zfile); diff --git a/core/io/file_access_zip.h b/core/io/file_access_zip.h index 2a8ec3fca5..a40e1a753d 100644 --- a/core/io/file_access_zip.h +++ b/core/io/file_access_zip.h @@ -98,7 +98,7 @@ public: virtual void seek(size_t p_position); ///< seek to a given position virtual void seek_end(int64_t p_position = 0); ///< seek from the end of file - virtual size_t get_pos() const; ///< get position in the file + virtual size_t get_position() const; ///< get position in the file virtual size_t get_len() const; ///< get size of the file virtual bool eof_reached() const; ///< reading passed EOF diff --git a/core/io/pck_packer.cpp b/core/io/pck_packer.cpp index f1f5b6f538..23e86580d1 100644 --- a/core/io/pck_packer.cpp +++ b/core/io/pck_packer.cpp @@ -119,7 +119,7 @@ Error PCKPacker::flush(bool p_verbose) { for (int i = 0; i < files.size(); i++) { file->store_pascal_string(files[i].path); - files[i].offset_offset = file->get_pos(); + files[i].offset_offset = file->get_position(); file->store_64(0); // offset file->store_64(files[i].size); // size @@ -130,10 +130,10 @@ Error PCKPacker::flush(bool p_verbose) { file->store_32(0); }; - uint64_t ofs = file->get_pos(); + uint64_t ofs = file->get_position(); ofs = _align(ofs, alignment); - _pad(file, ofs - file->get_pos()); + _pad(file, ofs - file->get_position()); const uint32_t buf_max = 65536; uint8_t *buf = memnew_arr(uint8_t, buf_max); @@ -150,7 +150,7 @@ Error PCKPacker::flush(bool p_verbose) { to_write -= read; }; - uint64_t pos = file->get_pos(); + uint64_t pos = file->get_position(); file->seek(files[i].offset_offset); // go back to store the file's offset file->store_64(ofs); file->seek(pos); diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index 16ec6cd3c5..900db7c2dc 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -1179,7 +1179,7 @@ Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, cons save_ustring(fw, get_ustring(f)); //type - size_t md_ofs = f->get_pos(); + size_t md_ofs = f->get_position(); size_t importmd_ofs = f->get_64(); fw->store_64(0); //metadata offset @@ -1227,7 +1227,7 @@ Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, cons save_ustring(fw, path); } - int64_t size_diff = (int64_t)fw->get_pos() - (int64_t)f->get_pos(); + int64_t size_diff = (int64_t)fw->get_position() - (int64_t)f->get_position(); //internal resources uint32_t int_resources_size = f->get_32(); @@ -1880,7 +1880,7 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const RES &p } else { save_unicode_string(r->get_path()); //actual external } - ofs_pos.push_back(f->get_pos()); + ofs_pos.push_back(f->get_position()); f->store_64(0); //offset in 64 bits } @@ -1891,7 +1891,7 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const RES &p ResourceData &rd = E->get(); - ofs_table.push_back(f->get_pos()); + ofs_table.push_back(f->get_position()); save_unicode_string(rd.type); f->store_32(rd.properties.size()); diff --git a/core/io/stream_peer.cpp b/core/io/stream_peer.cpp index f4f81f0807..2583eb369d 100644 --- a/core/io/stream_peer.cpp +++ b/core/io/stream_peer.cpp @@ -405,9 +405,9 @@ void StreamPeer::_bind_methods() { void StreamPeerBuffer::_bind_methods() { - ClassDB::bind_method(D_METHOD("seek", "pos"), &StreamPeerBuffer::seek); + ClassDB::bind_method(D_METHOD("seek", "position"), &StreamPeerBuffer::seek); ClassDB::bind_method(D_METHOD("get_size"), &StreamPeerBuffer::get_size); - ClassDB::bind_method(D_METHOD("get_pos"), &StreamPeerBuffer::get_pos); + ClassDB::bind_method(D_METHOD("get_position"), &StreamPeerBuffer::get_position); ClassDB::bind_method(D_METHOD("resize", "size"), &StreamPeerBuffer::resize); ClassDB::bind_method(D_METHOD("set_data_array", "data"), &StreamPeerBuffer::set_data_array); ClassDB::bind_method(D_METHOD("get_data_array"), &StreamPeerBuffer::get_data_array); @@ -484,7 +484,7 @@ int StreamPeerBuffer::get_size() const { return data.size(); } -int StreamPeerBuffer::get_pos() const { +int StreamPeerBuffer::get_position() const { return pointer; } diff --git a/core/io/stream_peer.h b/core/io/stream_peer.h index 1ee997c123..b120d18501 100644 --- a/core/io/stream_peer.h +++ b/core/io/stream_peer.h @@ -111,7 +111,7 @@ public: void seek(int p_pos); int get_size() const; - int get_pos() const; + int get_position() const; void resize(int p_size); void set_data_array(const PoolVector<uint8_t> &p_data); diff --git a/core/io/xml_parser.cpp b/core/io/xml_parser.cpp index 3a4be7cd13..8ae68183d7 100644 --- a/core/io/xml_parser.cpp +++ b/core/io/xml_parser.cpp @@ -369,7 +369,7 @@ void XMLParser::_bind_methods() { ClassDB::bind_method(D_METHOD("is_empty"), &XMLParser::is_empty); ClassDB::bind_method(D_METHOD("get_current_line"), &XMLParser::get_current_line); ClassDB::bind_method(D_METHOD("skip_section"), &XMLParser::skip_section); - ClassDB::bind_method(D_METHOD("seek", "pos"), &XMLParser::seek); + ClassDB::bind_method(D_METHOD("seek", "position"), &XMLParser::seek); ClassDB::bind_method(D_METHOD("open", "file"), &XMLParser::open); ClassDB::bind_method(D_METHOD("open_buffer", "buffer"), &XMLParser::open_buffer); diff --git a/core/io/zip_io.h b/core/io/zip_io.h index 8cf971ee08..ce3c919b77 100644 --- a/core/io/zip_io.h +++ b/core/io/zip_io.h @@ -72,7 +72,7 @@ static uLong zipio_write(voidpf opaque, voidpf stream, const void *buf, uLong si static long zipio_tell(voidpf opaque, voidpf stream) { FileAccess *f = *(FileAccess **)opaque; - return f->get_pos(); + return f->get_position(); }; static long zipio_seek(voidpf opaque, voidpf stream, uLong offset, int origin) { @@ -83,7 +83,7 @@ static long zipio_seek(voidpf opaque, voidpf stream, uLong offset, int origin) { switch (origin) { case ZLIB_FILEFUNC_SEEK_CUR: - pos = f->get_pos() + offset; + pos = f->get_position() + offset; break; case ZLIB_FILEFUNC_SEEK_END: pos = f->get_len() + offset; diff --git a/core/math/a_star.cpp b/core/math/a_star.cpp index d1afcec18f..4f80fb2491 100644 --- a/core/math/a_star.cpp +++ b/core/math/a_star.cpp @@ -58,7 +58,7 @@ void AStar::add_point(int p_id, const Vector3 &p_pos, real_t p_weight_scale) { } } -Vector3 AStar::get_point_pos(int p_id) const { +Vector3 AStar::get_point_position(int p_id) const { ERR_FAIL_COND_V(!points.has(p_id), Vector3()); @@ -171,7 +171,7 @@ int AStar::get_closest_point(const Vector3 &p_point) const { return closest_id; } -Vector3 AStar::get_closest_pos_in_segment(const Vector3 &p_point) const { +Vector3 AStar::get_closest_position_in_segment(const Vector3 &p_point) const { real_t closest_dist = 1e20; bool found = false; @@ -412,8 +412,8 @@ PoolVector<int> AStar::get_id_path(int p_from_id, int p_to_id) { void AStar::_bind_methods() { ClassDB::bind_method(D_METHOD("get_available_point_id"), &AStar::get_available_point_id); - ClassDB::bind_method(D_METHOD("add_point", "id", "pos", "weight_scale"), &AStar::add_point, DEFVAL(1.0)); - ClassDB::bind_method(D_METHOD("get_point_pos", "id"), &AStar::get_point_pos); + ClassDB::bind_method(D_METHOD("add_point", "id", "position", "weight_scale"), &AStar::add_point, DEFVAL(1.0)); + ClassDB::bind_method(D_METHOD("get_point_position", "id"), &AStar::get_point_position); ClassDB::bind_method(D_METHOD("get_point_weight_scale", "id"), &AStar::get_point_weight_scale); ClassDB::bind_method(D_METHOD("remove_point", "id"), &AStar::remove_point); ClassDB::bind_method(D_METHOD("has_point", "id"), &AStar::has_point); @@ -425,8 +425,8 @@ void AStar::_bind_methods() { ClassDB::bind_method(D_METHOD("clear"), &AStar::clear); - ClassDB::bind_method(D_METHOD("get_closest_point", "to_pos"), &AStar::get_closest_point); - ClassDB::bind_method(D_METHOD("get_closest_pos_in_segment", "to_pos"), &AStar::get_closest_pos_in_segment); + ClassDB::bind_method(D_METHOD("get_closest_point", "to_position"), &AStar::get_closest_point); + ClassDB::bind_method(D_METHOD("get_closest_position_in_segment", "to_position"), &AStar::get_closest_position_in_segment); ClassDB::bind_method(D_METHOD("get_point_path", "from_id", "to_id"), &AStar::get_point_path); ClassDB::bind_method(D_METHOD("get_id_path", "from_id", "to_id"), &AStar::get_id_path); diff --git a/core/math/a_star.h b/core/math/a_star.h index 38d13d510b..2c1e2e2cf7 100644 --- a/core/math/a_star.h +++ b/core/math/a_star.h @@ -101,7 +101,7 @@ public: int get_available_point_id() const; void add_point(int p_id, const Vector3 &p_pos, real_t p_weight_scale = 1); - Vector3 get_point_pos(int p_id) const; + Vector3 get_point_position(int p_id) const; real_t get_point_weight_scale(int p_id) const; void remove_point(int p_id); bool has_point(int p_id) const; @@ -114,7 +114,7 @@ public: void clear(); int get_closest_point(const Vector3 &p_point) const; - Vector3 get_closest_pos_in_segment(const Vector3 &p_point) const; + Vector3 get_closest_position_in_segment(const Vector3 &p_point) const; PoolVector<Vector3> get_point_path(int p_from_id, int p_to_id); PoolVector<int> get_id_path(int p_from_id, int p_to_id); diff --git a/core/os/dir_access.cpp b/core/os/dir_access.cpp index 1437e7cdfc..0875f78478 100644 --- a/core/os/dir_access.cpp +++ b/core/os/dir_access.cpp @@ -312,7 +312,7 @@ Error DirAccess::copy(String p_from, String p_to, int chmod_flags) { } fsrc->seek_end(0); - int size = fsrc->get_pos(); + int size = fsrc->get_position(); fsrc->seek(0); err = OK; while (size--) { diff --git a/core/os/file_access.h b/core/os/file_access.h index 63692cb290..34e7549fa3 100644 --- a/core/os/file_access.h +++ b/core/os/file_access.h @@ -90,7 +90,7 @@ public: virtual void seek(size_t p_position) = 0; ///< seek to a given position virtual void seek_end(int64_t p_position = 0) = 0; ///< seek from the end of file - virtual size_t get_pos() const = 0; ///< get position in the file + virtual size_t get_position() const = 0; ///< get position in the file virtual size_t get_len() const = 0; ///< get size of the file virtual bool eof_reached() const = 0; ///< reading passed EOF diff --git a/core/os/input.cpp b/core/os/input.cpp index 65752662d7..a4b82299a7 100644 --- a/core/os/input.cpp +++ b/core/os/input.cpp @@ -80,7 +80,7 @@ void Input::_bind_methods() { ClassDB::bind_method(D_METHOD("get_mouse_button_mask"), &Input::get_mouse_button_mask); ClassDB::bind_method(D_METHOD("set_mouse_mode", "mode"), &Input::set_mouse_mode); ClassDB::bind_method(D_METHOD("get_mouse_mode"), &Input::get_mouse_mode); - ClassDB::bind_method(D_METHOD("warp_mouse_pos", "to"), &Input::warp_mouse_pos); + ClassDB::bind_method(D_METHOD("warp_mouse_position", "to"), &Input::warp_mouse_position); ClassDB::bind_method(D_METHOD("action_press", "action"), &Input::action_press); ClassDB::bind_method(D_METHOD("action_release", "action"), &Input::action_release); ClassDB::bind_method(D_METHOD("set_custom_mouse_cursor", "image", "hotspot"), &Input::set_custom_mouse_cursor, DEFVAL(Vector2())); diff --git a/core/os/input.h b/core/os/input.h index f98b97e647..97d3bef4f9 100644 --- a/core/os/input.h +++ b/core/os/input.h @@ -81,7 +81,7 @@ public: virtual Point2 get_last_mouse_speed() const = 0; virtual int get_mouse_button_mask() const = 0; - virtual void warp_mouse_pos(const Vector2 &p_to) = 0; + virtual void warp_mouse_position(const Vector2 &p_to) = 0; virtual Point2i warp_mouse_motion(const Ref<InputEventMouseMotion> &p_motion, const Rect2 &p_rect) = 0; virtual Vector3 get_gravity() const = 0; diff --git a/core/os/input_event.cpp b/core/os/input_event.cpp index 88037859aa..bef98ac3f2 100644 --- a/core/os/input_event.cpp +++ b/core/os/input_event.cpp @@ -781,7 +781,7 @@ void InputEventScreenTouch::_bind_methods() { ClassDB::bind_method(D_METHOD("set_index", "index"), &InputEventScreenTouch::set_index); ClassDB::bind_method(D_METHOD("get_index"), &InputEventScreenTouch::get_index); - ClassDB::bind_method(D_METHOD("set_position", "pos"), &InputEventScreenTouch::set_position); + ClassDB::bind_method(D_METHOD("set_position", "position"), &InputEventScreenTouch::set_position); ClassDB::bind_method(D_METHOD("get_position"), &InputEventScreenTouch::get_position); ClassDB::bind_method(D_METHOD("set_pressed", "pressed"), &InputEventScreenTouch::set_pressed); diff --git a/core/os/os.h b/core/os/os.h index 2fc87e44a0..38bbbc0a57 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -156,7 +156,7 @@ public: virtual void set_mouse_mode(MouseMode p_mode); virtual MouseMode get_mouse_mode() const; - virtual void warp_mouse_pos(const Point2 &p_to) {} + virtual void warp_mouse_position(const Point2 &p_to) {} virtual Point2 get_mouse_position() const = 0; virtual int get_mouse_button_state() const = 0; virtual void set_window_title(const String &p_title) = 0; diff --git a/core/project_settings.cpp b/core/project_settings.cpp index 7ea0d563a6..14ebe87dc5 100644 --- a/core/project_settings.cpp +++ b/core/project_settings.cpp @@ -910,7 +910,7 @@ Variant ProjectSettings::property_get_revert(const String &p_name) { void ProjectSettings::_bind_methods() { ClassDB::bind_method(D_METHOD("has", "name"), &ProjectSettings::has); - ClassDB::bind_method(D_METHOD("set_order", "name", "pos"), &ProjectSettings::set_order); + ClassDB::bind_method(D_METHOD("set_order", "name", "position"), &ProjectSettings::set_order); ClassDB::bind_method(D_METHOD("get_order", "name"), &ProjectSettings::get_order); ClassDB::bind_method(D_METHOD("set_initial_value", "name", "value"), &ProjectSettings::set_initial_value); ClassDB::bind_method(D_METHOD("add_property_info", "hint"), &ProjectSettings::_add_property_info_bind); diff --git a/core/variant_call.cpp b/core/variant_call.cpp index 19d9b0297f..7205280938 100644 --- a/core/variant_call.cpp +++ b/core/variant_call.cpp @@ -1394,7 +1394,7 @@ void register_variant_methods() { ADDFUNC2(STRING, STRING, String, format, NIL, "values", STRING, "placeholder", varray("{_}")); ADDFUNC2(STRING, STRING, String, replace, STRING, "what", STRING, "forwhat", varray()); ADDFUNC2(STRING, STRING, String, replacen, STRING, "what", STRING, "forwhat", varray()); - ADDFUNC2(STRING, STRING, String, insert, INT, "pos", STRING, "what", varray()); + ADDFUNC2(STRING, STRING, String, insert, INT, "position", STRING, "what", varray()); ADDFUNC0(STRING, STRING, String, capitalize, varray()); ADDFUNC2(STRING, POOL_STRING_ARRAY, String, split, STRING, "divisor", BOOL, "allow_empty", varray(true)); ADDFUNC2(STRING, POOL_REAL_ARRAY, String, split_floats, STRING, "divisor", BOOL, "allow_empty", varray(true)); @@ -1402,14 +1402,14 @@ void register_variant_methods() { ADDFUNC0(STRING, STRING, String, to_upper, varray()); ADDFUNC0(STRING, STRING, String, to_lower, varray()); - ADDFUNC1(STRING, STRING, String, left, INT, "pos", varray()); - ADDFUNC1(STRING, STRING, String, right, INT, "pos", varray()); + ADDFUNC1(STRING, STRING, String, left, INT, "position", varray()); + ADDFUNC1(STRING, STRING, String, right, INT, "position", varray()); ADDFUNC2(STRING, STRING, String, strip_edges, BOOL, "left", BOOL, "right", varray(true, true)); ADDFUNC0(STRING, STRING, String, get_extension, varray()); ADDFUNC0(STRING, STRING, String, get_basename, varray()); ADDFUNC1(STRING, STRING, String, plus_file, STRING, "file", varray()); ADDFUNC1(STRING, INT, String, ord_at, INT, "at", varray()); - ADDFUNC2(STRING, NIL, String, erase, INT, "pos", INT, "chars", varray()); + ADDFUNC2(STRING, NIL, String, erase, INT, "position", INT, "chars", varray()); ADDFUNC0(STRING, INT, String, hash, varray()); ADDFUNC0(STRING, STRING, String, md5_text, varray()); ADDFUNC0(STRING, STRING, String, sha256_text, varray()); @@ -1560,9 +1560,9 @@ void register_variant_methods() { ADDFUNC1(ARRAY, NIL, Array, push_back, NIL, "value", varray()); ADDFUNC1(ARRAY, NIL, Array, push_front, NIL, "value", varray()); ADDFUNC1(ARRAY, NIL, Array, append, NIL, "value", varray()); - ADDFUNC1(ARRAY, NIL, Array, resize, INT, "pos", varray()); - ADDFUNC2(ARRAY, NIL, Array, insert, INT, "pos", NIL, "value", varray()); - ADDFUNC1(ARRAY, NIL, Array, remove, INT, "pos", varray()); + ADDFUNC1(ARRAY, NIL, Array, resize, INT, "size", varray()); + ADDFUNC2(ARRAY, NIL, Array, insert, INT, "position", NIL, "value", varray()); + ADDFUNC1(ARRAY, NIL, Array, remove, INT, "position", varray()); ADDFUNC1(ARRAY, NIL, Array, erase, NIL, "value", varray()); ADDFUNC0(ARRAY, NIL, Array, front, varray()); ADDFUNC0(ARRAY, NIL, Array, back, varray()); @@ -1728,10 +1728,10 @@ void register_variant_methods() { _VariantCall::add_constructor(_VariantCall::Vector2_init1, Variant::VECTOR2, "x", Variant::REAL, "y", Variant::REAL); - _VariantCall::add_constructor(_VariantCall::Rect2_init1, Variant::RECT2, "pos", Variant::VECTOR2, "size", Variant::VECTOR2); + _VariantCall::add_constructor(_VariantCall::Rect2_init1, Variant::RECT2, "position", Variant::VECTOR2, "size", Variant::VECTOR2); _VariantCall::add_constructor(_VariantCall::Rect2_init2, Variant::RECT2, "x", Variant::REAL, "y", Variant::REAL, "width", Variant::REAL, "height", Variant::REAL); - _VariantCall::add_constructor(_VariantCall::Transform2D_init2, Variant::TRANSFORM2D, "rot", Variant::REAL, "pos", Variant::VECTOR2); + _VariantCall::add_constructor(_VariantCall::Transform2D_init2, Variant::TRANSFORM2D, "rotation", Variant::REAL, "position", Variant::VECTOR2); _VariantCall::add_constructor(_VariantCall::Transform2D_init3, Variant::TRANSFORM2D, "x_axis", Variant::VECTOR2, "y_axis", Variant::VECTOR2, "origin", Variant::VECTOR2); _VariantCall::add_constructor(_VariantCall::Vector3_init1, Variant::VECTOR3, "x", Variant::REAL, "y", Variant::REAL, "z", Variant::REAL); @@ -1746,7 +1746,7 @@ void register_variant_methods() { _VariantCall::add_constructor(_VariantCall::Color_init1, Variant::COLOR, "r", Variant::REAL, "g", Variant::REAL, "b", Variant::REAL, "a", Variant::REAL); _VariantCall::add_constructor(_VariantCall::Color_init2, Variant::COLOR, "r", Variant::REAL, "g", Variant::REAL, "b", Variant::REAL); - _VariantCall::add_constructor(_VariantCall::Rect3_init1, Variant::RECT3, "pos", Variant::VECTOR3, "size", Variant::VECTOR3); + _VariantCall::add_constructor(_VariantCall::Rect3_init1, Variant::RECT3, "position", Variant::VECTOR3, "size", Variant::VECTOR3); _VariantCall::add_constructor(_VariantCall::Basis_init1, Variant::BASIS, "x_axis", Variant::VECTOR3, "y_axis", Variant::VECTOR3, "z_axis", Variant::VECTOR3); _VariantCall::add_constructor(_VariantCall::Basis_init2, Variant::BASIS, "axis", Variant::VECTOR3, "phi", Variant::REAL); |