diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/bind/core_bind.cpp | 6 | ||||
-rw-r--r-- | core/bind/core_bind.h | 2 | ||||
-rw-r--r-- | core/math/math_funcs.h | 2 | ||||
-rw-r--r-- | core/register_core_types.cpp | 1 | ||||
-rw-r--r-- | core/variant_call.cpp | 6 |
5 files changed, 12 insertions, 5 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index ef943b2f7a..cc07a48368 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -12,9 +12,9 @@ Ref<ResourceInteractiveLoader> _ResourceLoader::load_interactive(const String& p return ResourceLoader::load_interactive(p_path,p_type_hint); } -RES _ResourceLoader::load(const String &p_path,const String& p_type_hint) { +RES _ResourceLoader::load(const String &p_path,const String& p_type_hint, bool p_no_cache) { - RES ret = ResourceLoader::load(p_path,p_type_hint); + RES ret = ResourceLoader::load(p_path,p_type_hint, p_no_cache); return ret; } @@ -59,7 +59,7 @@ void _ResourceLoader::_bind_methods() { ObjectTypeDB::bind_method(_MD("load_interactive:ResourceInteractiveLoader","path","type_hint"),&_ResourceLoader::load_interactive,DEFVAL("")); - ObjectTypeDB::bind_method(_MD("load:Resource","path","type_hint"),&_ResourceLoader::load,DEFVAL("")); + ObjectTypeDB::bind_method(_MD("load:Resource","path","type_hint", "p_no_cache"),&_ResourceLoader::load,DEFVAL(""), DEFVAL(false)); ObjectTypeDB::bind_method(_MD("get_recognized_extensions_for_type","type"),&_ResourceLoader::get_recognized_extensions_for_type); ObjectTypeDB::bind_method(_MD("set_abort_on_missing_resources","abort"),&_ResourceLoader::set_abort_on_missing_resources); ObjectTypeDB::bind_method(_MD("get_dependencies"),&_ResourceLoader::get_dependencies); diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index a76b4aa81f..12a4ae86eb 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -21,7 +21,7 @@ public: static _ResourceLoader *get_singleton() { return singleton; } Ref<ResourceInteractiveLoader> load_interactive(const String& p_path,const String& p_type_hint=""); - RES load(const String &p_path,const String& p_type_hint=""); + RES load(const String &p_path,const String& p_type_hint="", bool p_no_cache = false); DVector<String> get_recognized_extensions_for_type(const String& p_type); void set_abort_on_missing_resources(bool p_abort); StringArray get_dependencies(const String& p_path); diff --git a/core/math/math_funcs.h b/core/math/math_funcs.h index 28a8413325..6d43ed8e64 100644 --- a/core/math/math_funcs.h +++ b/core/math/math_funcs.h @@ -136,7 +136,7 @@ public: static int b; -#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0603 // windows 8? +#if (defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0603) || WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP // windows 8 phone? b = (int)((a>0.0f) ? (a + 0.5f):(a -0.5f)); #elif defined(_MSC_VER) && _MSC_VER < 1800 diff --git a/core/register_core_types.cpp b/core/register_core_types.cpp index 2f16e31de6..4935136eeb 100644 --- a/core/register_core_types.cpp +++ b/core/register_core_types.cpp @@ -110,6 +110,7 @@ void register_core_types() { ObjectTypeDB::register_type<Reference>(); + ObjectTypeDB::register_type<WeakRef>(); ObjectTypeDB::register_type<ResourceImportMetadata>(); ObjectTypeDB::register_type<Resource>(); ObjectTypeDB::register_type<FuncRef>(); diff --git a/core/variant_call.cpp b/core/variant_call.cpp index 93a9e6475f..3f2800494d 100644 --- a/core/variant_call.cpp +++ b/core/variant_call.cpp @@ -757,6 +757,11 @@ static void _call_##m_type##_##m_method(Variant& r_ret,Variant& p_self,const Var r_ret=Quat(*p_args[0],*p_args[1],*p_args[2],*p_args[3]); } + static void Quat_init2(Variant& r_ret,const Variant** p_args) { + + r_ret=Quat(((Vector3)(*p_args[0])),((float)(*p_args[1]))); + } + static void Color_init1(Variant& r_ret,const Variant** p_args) { r_ret=Color(*p_args[0],*p_args[1],*p_args[2],*p_args[3]); @@ -1509,6 +1514,7 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl _VariantCall::add_constructor(_VariantCall::Plane_init3,Variant::PLANE,"normal",Variant::VECTOR3,"d",Variant::REAL); _VariantCall::add_constructor(_VariantCall::Quat_init1,Variant::QUAT,"x",Variant::REAL,"y",Variant::REAL,"z",Variant::REAL,"w",Variant::REAL); + _VariantCall::add_constructor(_VariantCall::Quat_init2,Variant::QUAT,"axis",Variant::VECTOR3,"angle",Variant::REAL); _VariantCall::add_constructor(_VariantCall::Color_init1,Variant::COLOR,"r",Variant::REAL,"g",Variant::REAL,"b",Variant::REAL,"a",Variant::REAL); _VariantCall::add_constructor(_VariantCall::Color_init2,Variant::COLOR,"r",Variant::REAL,"g",Variant::REAL,"b",Variant::REAL); |