diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-06-08 22:58:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-08 22:58:59 +0200 |
commit | 7e0c54e292f2813878d178bbb691a419ed6fb295 (patch) | |
tree | 13a9c5ed7a3c306481a85c6c9d755fe32d1d9938 | |
parent | b36d5878b15f02425245a3270d20afc53940b2bd (diff) | |
parent | bcdfa89ca5aeb99e9535906085b886b9636a0f4a (diff) |
Merge pull request #61807 from XutaxKamay/glb-float64-patch
-rw-r--r-- | core/io/resource_format_binary.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index 24458f20b4..2469e1a4be 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -1547,10 +1547,11 @@ void ResourceFormatSaverBinaryInstance::write_variant(Ref<FileAccess> f, const V case Variant::COLOR: { f->store_32(VARIANT_COLOR); Color val = p_property; - f->store_real(val.r); - f->store_real(val.g); - f->store_real(val.b); - f->store_real(val.a); + // Color are always floats + f->store_float(val.r); + f->store_float(val.g); + f->store_float(val.b); + f->store_float(val.a); } break; case Variant::STRING_NAME: { @@ -1685,7 +1686,7 @@ void ResourceFormatSaverBinaryInstance::write_variant(Ref<FileAccess> f, const V f->store_32(len); const float *r = arr.ptr(); for (int i = 0; i < len; i++) { - f->store_real(r[i]); + f->store_float(r[i]); } } break; @@ -1743,10 +1744,10 @@ void ResourceFormatSaverBinaryInstance::write_variant(Ref<FileAccess> f, const V f->store_32(len); const Color *r = arr.ptr(); for (int i = 0; i < len; i++) { - f->store_real(r[i].r); - f->store_real(r[i].g); - f->store_real(r[i].b); - f->store_real(r[i].a); + f->store_float(r[i].r); + f->store_float(r[i].g); + f->store_float(r[i].b); + f->store_float(r[i].a); } } break; |