Fix GDNative wrapper type sizes (RID, Variant, Packed*Array), add size checking static asserts.

This commit is contained in:
bruvzg
2020-05-16 13:58:14 +03:00
parent 988dd09047
commit 48d133a5fd
21 changed files with 53 additions and 9 deletions
+2
View File
@@ -37,6 +37,8 @@
extern "C" {
#endif
static_assert(sizeof(godot_vector2) == sizeof(Vector2), "Vector2 size mismatch");
void GDAPI godot_vector2_new(godot_vector2 *r_dest, const godot_real p_x, const godot_real p_y) {
Vector2 *dest = (Vector2 *)r_dest;
*dest = Vector2(p_x, p_y);