summaryrefslogtreecommitdiffstats
path: root/scene/resources/resource_format_text.cpp
diff options
context:
space:
mode:
authorK. S. Ernest (iFire) Lee <fire@users.noreply.github.com>2024-04-08 07:51:34 -0700
committerRémi Verschelde <rverschelde@gmail.com>2024-05-03 00:58:27 +0200
commitf9b488508ccc294db03d427c15c182864fae74de (patch)
tree4d48dd7b8b85c219faf6ecb8a43a9c3d57f71b38 /scene/resources/resource_format_text.cpp
parentb9e022302aa4a5d97f8b25a1db809e64b46b6f96 (diff)
downloadredot-engine-f9b488508ccc294db03d427c15c182864fae74de.tar.gz
Add PackedVector4Array Variant type
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
Diffstat (limited to 'scene/resources/resource_format_text.cpp')
-rw-r--r--scene/resources/resource_format_text.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp
index f70a00a9f6..2e27ac9198 100644
--- a/scene/resources/resource_format_text.cpp
+++ b/scene/resources/resource_format_text.cpp
@@ -37,11 +37,12 @@
#include "core/object/script_language.h"
#include "core/version.h"
-// Version 2: changed names for Basis, AABB, Vectors, etc.
-// Version 3: new string ID for ext/subresources, breaks forward compat.
-// Version 4: PackedByteArray is now stored as base64 encoded.
-#define FORMAT_VERSION_COMPAT 3
+// Version 2: Changed names for Basis, AABB, Vectors, etc.
+// Version 3: New string ID for ext/subresources, breaks forward compat.
+// Version 4: PackedByteArray can be base64 encoded, and PackedVector4Array was added.
#define FORMAT_VERSION 4
+// For compat, save as version 3 if not using PackedVector4Array or no big PackedByteArray.
+#define FORMAT_VERSION_COMPAT 3
#define BINARY_FORMAT_VERSION 4
@@ -1979,6 +1980,9 @@ void ResourceFormatSaverTextInstance::_find_resources(const Variant &p_variant,
use_compat = false;
}
} break;
+ case Variant::PACKED_VECTOR4_ARRAY: {
+ use_compat = false;
+ } break;
default: {
}
}