From 703004f830f39adcde9b9565f1aa49d1b10e8d27 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Mon, 16 Jun 2014 10:22:26 -0300 Subject: More 3D Work -=-=-=-=-=- -ESM Shadow Mapping for softer and less glitchy shadows -HDR Pipeline (convert to Linear on texture import, convert to SRGB at the end) -Fix to xml parse bug --- modules/gdscript/gd_functions.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'modules/gdscript/gd_functions.cpp') diff --git a/modules/gdscript/gd_functions.cpp b/modules/gdscript/gd_functions.cpp index f789493ae..0d11734bb 100644 --- a/modules/gdscript/gd_functions.cpp +++ b/modules/gdscript/gd_functions.cpp @@ -93,6 +93,7 @@ const char *GDFunctions::get_func_name(Function p_func) { "load", "inst2dict", "dict2inst", + "hash", "print_stack", }; @@ -863,6 +864,12 @@ void GDFunctions::call(Function p_func,const Variant **p_args,int p_arg_count,Va r_ret = gdscr->_new(NULL,0,r_error); + } break; + case HASH: { + + VALIDATE_ARG_COUNT(1); + r_ret=p_args[0]->hash(); + } break; case PRINT_STACK: { @@ -1238,6 +1245,12 @@ MethodInfo GDFunctions::get_info(Function p_func) { mi.return_val.type=Variant::OBJECT; return mi; } break; + case HASH: { + + MethodInfo mi("hash",PropertyInfo(Variant::NIL,"var:var")); + mi.return_val.type=Variant::INT; + return mi; + } break; case PRINT_STACK: { MethodInfo mi("print_stack"); -- cgit v1.2.3-70-g09d2