summaryrefslogtreecommitdiff
path: root/modules/gdnative
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdnative')
-rw-r--r--modules/gdnative/gdnative/variant.cpp12
-rw-r--r--modules/gdnative/include/gdnative/pool_arrays.h4
-rw-r--r--modules/gdnative/include/gdnative/variant.h14
3 files changed, 16 insertions, 14 deletions
diff --git a/modules/gdnative/gdnative/variant.cpp b/modules/gdnative/gdnative/variant.cpp
index 1d8ba6087f..f0fc44ae8a 100644
--- a/modules/gdnative/gdnative/variant.cpp
+++ b/modules/gdnative/gdnative/variant.cpp
@@ -209,13 +209,13 @@ void GDAPI godot_variant_new_packed_byte_array(godot_variant *r_dest, const godo
void GDAPI godot_variant_new_packed_int_array(godot_variant *r_dest, const godot_packed_int_array *p_pia) {
Variant *dest = (Variant *)r_dest;
- PackedIntArray *pia = (PackedIntArray *)p_pia;
+ PackedInt32Array *pia = (PackedInt32Array *)p_pia;
memnew_placement_custom(dest, Variant, Variant(*pia));
}
void GDAPI godot_variant_new_packed_real_array(godot_variant *r_dest, const godot_packed_real_array *p_pra) {
Variant *dest = (Variant *)r_dest;
- PackedRealArray *pra = (PackedRealArray *)p_pra;
+ PackedFloat32Array *pra = (PackedFloat32Array *)p_pra;
memnew_placement_custom(dest, Variant, Variant(*pra));
}
@@ -402,8 +402,8 @@ godot_packed_byte_array GDAPI godot_variant_as_packed_byte_array(const godot_var
godot_packed_int_array GDAPI godot_variant_as_packed_int_array(const godot_variant *p_self) {
godot_packed_int_array raw_dest;
const Variant *self = (const Variant *)p_self;
- PackedIntArray *dest = (PackedIntArray *)&raw_dest;
- memnew_placement(dest, PackedIntArray(self->operator PackedIntArray())); // operator = is overloaded by PackedIntArray
+ PackedInt32Array *dest = (PackedInt32Array *)&raw_dest;
+ memnew_placement(dest, PackedInt32Array(self->operator PackedInt32Array())); // operator = is overloaded by PackedInt32Array
*dest = *self;
return raw_dest;
}
@@ -411,8 +411,8 @@ godot_packed_int_array GDAPI godot_variant_as_packed_int_array(const godot_varia
godot_packed_real_array GDAPI godot_variant_as_packed_real_array(const godot_variant *p_self) {
godot_packed_real_array raw_dest;
const Variant *self = (const Variant *)p_self;
- PackedRealArray *dest = (PackedRealArray *)&raw_dest;
- memnew_placement(dest, PackedRealArray(self->operator PackedRealArray())); // operator = is overloaded by PackedRealArray
+ PackedFloat32Array *dest = (PackedFloat32Array *)&raw_dest;
+ memnew_placement(dest, PackedFloat32Array(self->operator PackedFloat32Array())); // operator = is overloaded by PackedFloat32Array
*dest = *self;
return raw_dest;
}
diff --git a/modules/gdnative/include/gdnative/pool_arrays.h b/modules/gdnative/include/gdnative/pool_arrays.h
index 315fb7ada2..c610377f54 100644
--- a/modules/gdnative/include/gdnative/pool_arrays.h
+++ b/modules/gdnative/include/gdnative/pool_arrays.h
@@ -48,7 +48,7 @@ typedef struct {
} godot_packed_byte_array;
#endif
-/////// PackedIntArray
+/////// PackedInt32Array
#define GODOT_PACKED_INT_ARRAY_SIZE sizeof(void *)
@@ -59,7 +59,7 @@ typedef struct {
} godot_packed_int_array;
#endif
-/////// PackedRealArray
+/////// PackedFloat32Array
#define GODOT_PACKED_REAL_ARRAY_SIZE sizeof(void *)
diff --git a/modules/gdnative/include/gdnative/variant.h b/modules/gdnative/include/gdnative/variant.h
index 4d70f1143c..934e856fbf 100644
--- a/modules/gdnative/include/gdnative/variant.h
+++ b/modules/gdnative/include/gdnative/variant.h
@@ -56,31 +56,33 @@ typedef enum godot_variant_type {
GODOT_VARIANT_TYPE_STRING,
// math types
-
- GODOT_VARIANT_TYPE_VECTOR2, // 5
+ GODOT_VARIANT_TYPE_VECTOR2,
+ GODOT_VARIANT_TYPE_VECTOR2I,
GODOT_VARIANT_TYPE_RECT2,
+ GODOT_VARIANT_TYPE_RECT2I,
GODOT_VARIANT_TYPE_VECTOR3,
+ GODOT_VARIANT_TYPE_VECTOR3I,
GODOT_VARIANT_TYPE_TRANSFORM2D,
GODOT_VARIANT_TYPE_PLANE,
- GODOT_VARIANT_TYPE_QUAT, // 10
+ GODOT_VARIANT_TYPE_QUAT,
GODOT_VARIANT_TYPE_AABB,
GODOT_VARIANT_TYPE_BASIS,
GODOT_VARIANT_TYPE_TRANSFORM,
// misc types
GODOT_VARIANT_TYPE_COLOR,
- GODOT_VARIANT_TYPE_NODE_PATH, // 15
+ GODOT_VARIANT_TYPE_NODE_PATH,
GODOT_VARIANT_TYPE_RID,
GODOT_VARIANT_TYPE_OBJECT,
GODOT_VARIANT_TYPE_DICTIONARY,
- GODOT_VARIANT_TYPE_ARRAY, // 20
+ GODOT_VARIANT_TYPE_ARRAY,
// arrays
GODOT_VARIANT_TYPE_PACKED_BYTE_ARRAY,
GODOT_VARIANT_TYPE_PACKED_INT_ARRAY,
GODOT_VARIANT_TYPE_PACKED_REAL_ARRAY,
GODOT_VARIANT_TYPE_PACKED_STRING_ARRAY,
- GODOT_VARIANT_TYPE_PACKED_VECTOR2_ARRAY, // 25
+ GODOT_VARIANT_TYPE_PACKED_VECTOR2_ARRAY,
GODOT_VARIANT_TYPE_PACKED_VECTOR3_ARRAY,
GODOT_VARIANT_TYPE_PACKED_COLOR_ARRAY,
} godot_variant_type;