1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Remove misleading and incorrect notes about endianness. Fix FileAccess and StreamPeer not doing what name suggests.

This commit is contained in:
Pāvels Nadtočajevs
2025-04-09 09:58:29 +03:00
parent 4248411baf
commit bd98aad3fa
7 changed files with 166 additions and 16 deletions

View File

@@ -1342,13 +1342,10 @@ Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, cons
bool use_real64 = f->get_32();
f->set_big_endian(big_endian != 0); //read big endian if saved as big endian
#ifdef BIG_ENDIAN_ENABLED
fw->store_32(!big_endian);
#else
fw->store_32(big_endian);
#endif
fw->set_big_endian(big_endian != 0);
fw->store_32(use_real64); //use real64
fw->set_big_endian(big_endian != 0);
uint32_t ver_major = f->get_32();
uint32_t ver_minor = f->get_32();
@@ -2168,12 +2165,12 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const Ref<Re
if (big_endian) {
f->store_32(1);
f->set_big_endian(true);
} else {
f->store_32(0);
}
f->store_32(0); //64 bits file, false for now
f->set_big_endian(big_endian);
f->store_32(GODOT_VERSION_MAJOR);
f->store_32(GODOT_VERSION_MINOR);
f->store_32(FORMAT_VERSION);
@@ -2412,13 +2409,10 @@ Error ResourceFormatSaverBinaryInstance::set_uid(const String &p_path, ResourceU
big_endian = f->get_32();
bool use_real64 = f->get_32();
f->set_big_endian(big_endian != 0); //read big endian if saved as big endian
#ifdef BIG_ENDIAN_ENABLED
fw->store_32(!big_endian);
#else
fw->store_32(big_endian);
#endif
fw->set_big_endian(big_endian != 0);
fw->store_32(use_real64); //use real64
fw->set_big_endian(big_endian != 0);
uint32_t ver_major = f->get_32();
uint32_t ver_minor = f->get_32();