Skip to content

Commit

Permalink
resync with godotengine/godot master @ 46c8f8c5c5874c7c56ea5b1384259d…
Browse files Browse the repository at this point in the history
…e9402d3449
  • Loading branch information
nikitalita committed Dec 19, 2024
1 parent 0bee941 commit 4bffce3
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/all_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
12 changes: 7 additions & 5 deletions compat/file_access_encrypted_v3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand All @@ -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() {
Expand All @@ -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;
Expand All @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions compat/file_access_encrypted_v3.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions utility/file_access_apk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions utility/file_access_apk.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions utility/file_access_gdre.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
4 changes: 2 additions & 2 deletions utility/file_access_gdre.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 4bffce3

Please sign in to comment.