diff options
-rw-r--r-- | core/variant_call.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/variant_call.cpp b/core/variant_call.cpp index 2f7e0205dc..7dd0eb8a0c 100644 --- a/core/variant_call.cpp +++ b/core/variant_call.cpp @@ -750,6 +750,12 @@ static void _call_##m_type##_##m_method(Variant& r_ret,Variant& p_self,const Var r_ret=Rect2(*p_args[0],*p_args[1],*p_args[2],*p_args[3]); } + static void Matrix32_init2(Variant& r_ret,const Variant** p_args) { + + Matrix32 m(*p_args[0], *p_args[1]); + r_ret=m; + } + static void Matrix32_init3(Variant& r_ret,const Variant** p_args) { Matrix32 m; @@ -1544,6 +1550,7 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl _VariantCall::add_constructor(_VariantCall::Rect2_init1,Variant::RECT2,"pos",Variant::VECTOR2,"size",Variant::VECTOR2); _VariantCall::add_constructor(_VariantCall::Rect2_init2,Variant::RECT2,"x",Variant::REAL,"y",Variant::REAL,"width",Variant::REAL,"height",Variant::REAL); + _VariantCall::add_constructor(_VariantCall::Matrix32_init2,Variant::MATRIX32,"rot",Variant::REAL,"pos",Variant::VECTOR2); _VariantCall::add_constructor(_VariantCall::Matrix32_init3,Variant::MATRIX32,"x_axis",Variant::VECTOR2,"y_axis",Variant::VECTOR2,"origin",Variant::VECTOR2); _VariantCall::add_constructor(_VariantCall::Vector3_init1,Variant::VECTOR3,"x",Variant::REAL,"y",Variant::REAL,"z",Variant::REAL); |