From 118eed485e8f928a5a0dab530ae93211afa10525 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Mon, 2 Jan 2017 23:03:46 -0300 Subject: ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant. All usages of "type" to refer to classes were renamed to "class" ClassDB has been exposed to GDScript. OBJ_TYPE() macro is now GDCLASS() --- modules/gdscript/gd_function.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'modules/gdscript/gd_function.cpp') diff --git a/modules/gdscript/gd_function.cpp b/modules/gdscript/gd_function.cpp index 094e21bb4f..2bacb50d86 100644 --- a/modules/gdscript/gd_function.cpp +++ b/modules/gdscript/gd_function.cpp @@ -119,9 +119,9 @@ static String _get_var_type(const Variant* p_type) { #ifdef DEBUG_ENABLED if (ObjectDB::instance_validate(bobj)) { if (bobj->get_script_instance()) - basestr= bobj->get_type()+" ("+bobj->get_script_instance()->get_script()->get_path().get_file()+")"; + basestr= bobj->get_class()+" ("+bobj->get_script_instance()->get_script()->get_path().get_file()+")"; else - basestr = bobj->get_type(); + basestr = bobj->get_class(); } else { basestr="previously freed instance"; } @@ -395,11 +395,11 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a if (!nc) { - err_text="Right operand of 'extends' is not a class (type: '"+obj_B->get_type()+"')."; + err_text="Right operand of 'extends' is not a class (type: '"+obj_B->get_class()+"')."; break; } - extends_ok=ObjectTypeDB::is_type(obj_A->get_type_name(),nc->get_name()); + extends_ok=ClassDB::is_parent_class(obj_A->get_class_name(),nc->get_name()); } *dst=extends_ok; @@ -788,7 +788,7 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a if (*methodname!=GDScriptLanguage::get_singleton()->strings._init) { - MethodBind *mb = ObjectTypeDB::get_method(gds->native->get_name(),*methodname); + MethodBind *mb = ClassDB::get_method(gds->native->get_name(),*methodname); if (!mb) { err.error=Variant::CallError::CALL_ERROR_INVALID_METHOD; } else { @@ -1435,9 +1435,9 @@ Variant GDFunctionState::resume(const Variant& p_arg) { void GDFunctionState::_bind_methods() { - ObjectTypeDB::bind_method(_MD("resume:Variant","arg"),&GDFunctionState::resume,DEFVAL(Variant())); - ObjectTypeDB::bind_method(_MD("is_valid"),&GDFunctionState::is_valid); - ObjectTypeDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"_signal_callback",&GDFunctionState::_signal_callback,MethodInfo("_signal_callback")); + ClassDB::bind_method(_MD("resume:Variant","arg"),&GDFunctionState::resume,DEFVAL(Variant())); + ClassDB::bind_method(_MD("is_valid"),&GDFunctionState::is_valid); + ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"_signal_callback",&GDFunctionState::_signal_callback,MethodInfo("_signal_callback")); } -- cgit v1.2.3