From 4bffce36703c7ed769faa6463ce16b1a7275ffb1 Mon Sep 17 00:00:00 2001 From: nikitalita <69168929+nikitalita@users.noreply.github.com> Date: Wed, 18 Dec 2024 20:43:28 -0800 Subject: [PATCH] resync with godotengine/godot master @ 46c8f8c5c5874c7c56ea5b1384259de9402d3449 --- .github/workflows/all_builds.yml | 2 +- README.md | 2 +- compat/file_access_encrypted_v3.cpp | 12 +++++++----- compat/file_access_encrypted_v3.h | 4 ++-- utility/file_access_apk.cpp | 8 ++++---- utility/file_access_apk.h | 4 ++-- utility/file_access_gdre.cpp | 8 ++++---- utility/file_access_gdre.h | 4 ++-- 8 files changed, 23 insertions(+), 21 deletions(-) diff --git a/.github/workflows/all_builds.yml b/.github/workflows/all_builds.yml index d6385d828..fdc7ee922 100644 --- a/.github/workflows/all_builds.yml +++ b/.github/workflows/all_builds.yml @@ -26,7 +26,7 @@ on: env: GODOT_BASE_BRANCH: master # Change the README too - GODOT_MAIN_SYNC_REF: ec6a1c0e792ac8be44990749800a4654a293b9ee + GODOT_MAIN_SYNC_REF: 46c8f8c5c5874c7c56ea5b1384259de9402d3449 SCONSFLAGS: verbose=yes warnings=all werror=no module_text_server_fb_enabled=yes minizip=yes deprecated=yes SCONSFLAGS_TEMPLATE: no_editor_splash=yes module_camera_enabled=no module_mobile_vr_enabled=no module_upnp_enabled=no module_websocket_enabled=no module_csg_enabled=yes module_gridmap_enabled=yes use_static_cpp=yes builtin_freetype=yes builtin_libpng=yes builtin_zlib=yes builtin_libwebp=yes builtin_libvorbis=yes builtin_libogg=yes disable_3d=no SCONS_CACHE_MSVC_CONFIG: true diff --git a/README.md b/README.md index fdfe67e2c..6c819b0d9 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ For ease of bootstrapping development, we have included launch, build, and setti ### Requirements -Godot 4.0 (master branch) @ ec6a1c0e792ac8be44990749800a4654a293b9ee +Godot 4.0 (master branch) @ 46c8f8c5c5874c7c56ea5b1384259de9402d3449 - Support for building on 3.x has been dropped and no new features are being pushed - Godot RE Tools still retains the ability to decompile 3.x and 2.x projects, however. diff --git a/compat/file_access_encrypted_v3.cpp b/compat/file_access_encrypted_v3.cpp index 174c7f5fa..e900c381b 100644 --- a/compat/file_access_encrypted_v3.cpp +++ b/compat/file_access_encrypted_v3.cpp @@ -228,9 +228,9 @@ Error FileAccessEncryptedv3::get_error() const { return eofed ? ERR_FILE_EOF : OK; } -void FileAccessEncryptedv3::store_buffer(const uint8_t *p_src, uint64_t p_length) { - ERR_FAIL_COND_MSG(!writing, "File has not been opened in write mode."); - ERR_FAIL_COND(!p_src && p_length > 0); +bool FileAccessEncryptedv3::store_buffer(const uint8_t *p_src, uint64_t p_length) { + ERR_FAIL_COND_V_MSG(!writing, false, "File has not been opened in write mode."); + ERR_FAIL_COND_V(!p_src && p_length > 0, false); if (pos < get_length()) { for (uint64_t i = 0; i < p_length; i++) { @@ -243,6 +243,7 @@ void FileAccessEncryptedv3::store_buffer(const uint8_t *p_src, uint64_t p_length } pos += p_length; } + return true; } void FileAccessEncryptedv3::flush() { @@ -251,8 +252,8 @@ void FileAccessEncryptedv3::flush() { // encrypted files keep data in memory till close() } -void FileAccessEncryptedv3::store_8(uint8_t p_dest) { - ERR_FAIL_COND_MSG(!writing, "File has not been opened in write mode."); +bool FileAccessEncryptedv3::store_8(uint8_t p_dest) { + ERR_FAIL_COND_V_MSG(!writing, false, "File has not been opened in write mode."); if (pos < get_length()) { data.write[pos] = p_dest; @@ -261,6 +262,7 @@ void FileAccessEncryptedv3::store_8(uint8_t p_dest) { data.push_back(p_dest); pos++; } + return true; } bool FileAccessEncryptedv3::file_exists(const String &p_name) { diff --git a/compat/file_access_encrypted_v3.h b/compat/file_access_encrypted_v3.h index 0e82b977b..ad3fb9c63 100644 --- a/compat/file_access_encrypted_v3.h +++ b/compat/file_access_encrypted_v3.h @@ -83,8 +83,8 @@ class FileAccessEncryptedv3 : public FileAccess { virtual Error resize(int64_t p_length) override { return ERR_UNAVAILABLE; } virtual void flush() override; - virtual void store_8(uint8_t p_dest) override; ///< store a byte - virtual void store_buffer(const uint8_t *p_src, uint64_t p_length) override; ///< store an array of bytes + virtual bool store_8(uint8_t p_dest) override; ///< store a byte + virtual bool store_buffer(const uint8_t *p_src, uint64_t p_length) override; ///< store an array of bytes virtual bool file_exists(const String &p_name) override; ///< return true if a file exists diff --git a/utility/file_access_apk.cpp b/utility/file_access_apk.cpp index c442e1ab4..b4051e7a4 100644 --- a/utility/file_access_apk.cpp +++ b/utility/file_access_apk.cpp @@ -391,11 +391,11 @@ void FileAccessAPK::flush() { ERR_FAIL(); } -void FileAccessAPK::store_8(uint8_t p_dest) { - ERR_FAIL(); +bool FileAccessAPK::store_8(uint8_t p_dest) { + ERR_FAIL_V(false); } -void FileAccessAPK::store_buffer(const uint8_t *p_src, uint64_t p_length) { - ERR_FAIL(); +bool FileAccessAPK::store_buffer(const uint8_t *p_src, uint64_t p_length) { + ERR_FAIL_V(false); } ///< store an array of bytes, needs to be overwritten by children. bool FileAccessAPK::file_exists(const String &p_name) { diff --git a/utility/file_access_apk.h b/utility/file_access_apk.h index 68ce6f2e6..eee922c61 100644 --- a/utility/file_access_apk.h +++ b/utility/file_access_apk.h @@ -103,8 +103,8 @@ class FileAccessAPK : public FileAccess { virtual Error resize(int64_t p_length) override { return ERR_UNAVAILABLE; } virtual void flush() override; - virtual void store_8(uint8_t p_dest) override; ///< store a byte - virtual void store_buffer(const uint8_t *p_src, uint64_t p_length) override; ///< store an array of bytes, needs to be overwritten by children. + virtual bool store_8(uint8_t p_dest) override; ///< store a byte + virtual bool store_buffer(const uint8_t *p_src, uint64_t p_length) override; ///< store an array of bytes, needs to be overwritten by children. virtual bool file_exists(const String &p_name) override; ///< return true if a file exists diff --git a/utility/file_access_gdre.cpp b/utility/file_access_gdre.cpp index 98891beeb..b36f6e53e 100644 --- a/utility/file_access_gdre.cpp +++ b/utility/file_access_gdre.cpp @@ -301,13 +301,13 @@ void FileAccessGDRE::flush() { return proxy->flush(); } -void FileAccessGDRE::store_8(uint8_t p_dest) { - ERR_FAIL_COND_MSG(proxy.is_null(), "File must be opened before use."); +bool FileAccessGDRE::store_8(uint8_t p_dest) { + ERR_FAIL_COND_V_MSG(proxy.is_null(), false, "File must be opened before use."); return proxy->store_8(p_dest); } -void FileAccessGDRE::store_buffer(const uint8_t *p_src, uint64_t p_length) { - ERR_FAIL_COND_MSG(proxy.is_null(), "File must be opened before use."); +bool FileAccessGDRE::store_buffer(const uint8_t *p_src, uint64_t p_length) { + ERR_FAIL_COND_V_MSG(proxy.is_null(), false, "File must be opened before use."); return proxy->store_buffer(p_src, p_length); } diff --git a/utility/file_access_gdre.h b/utility/file_access_gdre.h index c9baa3b0f..0142ebaf9 100644 --- a/utility/file_access_gdre.h +++ b/utility/file_access_gdre.h @@ -114,8 +114,8 @@ class FileAccessGDRE : public FileAccess { virtual String fix_path(const String &p_path) const override; ///< fix a path, i.e. make it absolute and in the OS format virtual Error resize(int64_t p_length) override; virtual void flush() override; - virtual void store_8(uint8_t p_dest) override; ///< store a byte - virtual void store_buffer(const uint8_t *p_src, uint64_t p_length) override; ///< store an array of bytes + virtual bool store_8(uint8_t p_dest) override; ///< store a byte + virtual bool store_buffer(const uint8_t *p_src, uint64_t p_length) override; ///< store an array of bytes virtual bool file_exists(const String &p_name) override; ///< return true if a file exists