summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_byte_codegen.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-05-03 12:25:26 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-05-03 12:25:26 +0200
commit03e6fbb010c3546593bd91a0dabc045a9882705a (patch)
tree3fecc6c86700d555245a71ac2b6421c5296a3132 /modules/gdscript/gdscript_byte_codegen.cpp
parentd898f37e35ac4966fc7d54a009d05181fd3b232e (diff)
parentf9b488508ccc294db03d427c15c182864fae74de (diff)
downloadredot-engine-03e6fbb010c3546593bd91a0dabc045a9882705a.tar.gz
Merge pull request #85474 from fire/packedvector4array
Add `PackedVector4Array` Variant type
Diffstat (limited to 'modules/gdscript/gdscript_byte_codegen.cpp')
-rw-r--r--modules/gdscript/gdscript_byte_codegen.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_byte_codegen.cpp b/modules/gdscript/gdscript_byte_codegen.cpp
index 5a50bd8648..4cda3d3037 100644
--- a/modules/gdscript/gdscript_byte_codegen.cpp
+++ b/modules/gdscript/gdscript_byte_codegen.cpp
@@ -109,6 +109,7 @@ uint32_t GDScriptByteCodeGenerator::add_temporary(const GDScriptDataType &p_type
case Variant::PACKED_VECTOR2_ARRAY:
case Variant::PACKED_VECTOR3_ARRAY:
case Variant::PACKED_COLOR_ARRAY:
+ case Variant::PACKED_VECTOR4_ARRAY:
case Variant::VARIANT_MAX:
// Arrays, dictionaries, and objects are reference counted, so we don't use the pool for them.
temp_type = Variant::NIL;
@@ -543,6 +544,9 @@ void GDScriptByteCodeGenerator::write_type_adjust(const Address &p_target, Varia
case Variant::PACKED_COLOR_ARRAY:
append_opcode(GDScriptFunction::OPCODE_TYPE_ADJUST_PACKED_COLOR_ARRAY);
break;
+ case Variant::PACKED_VECTOR4_ARRAY:
+ append_opcode(GDScriptFunction::OPCODE_TYPE_ADJUST_PACKED_VECTOR4_ARRAY);
+ break;
case Variant::NIL:
case Variant::VARIANT_MAX:
return;
@@ -1573,6 +1577,10 @@ void GDScriptByteCodeGenerator::write_for(const Address &p_variable, bool p_use_
begin_opcode = GDScriptFunction::OPCODE_ITERATE_BEGIN_PACKED_COLOR_ARRAY;
iterate_opcode = GDScriptFunction::OPCODE_ITERATE_PACKED_COLOR_ARRAY;
break;
+ case Variant::PACKED_VECTOR4_ARRAY:
+ begin_opcode = GDScriptFunction::OPCODE_ITERATE_BEGIN_PACKED_VECTOR4_ARRAY;
+ iterate_opcode = GDScriptFunction::OPCODE_ITERATE_PACKED_VECTOR4_ARRAY;
+ break;
default:
break;
}