summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-12-31 00:33:07 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-12-31 00:33:07 -0300
commit335c52ba03ecbccd0c9af8f9278b69da09a3e931 (patch)
tree5e4f5e2ea0d735228de7733e2fb689abbc2bc9c9 /core
parentfd836cad270f7eb9645356cd583c8f11bf737b0f (diff)
parentac13c8c0c6fc346462b21ee00139dddd2e4ec1e3 (diff)
downloadredot-engine-335c52ba03ecbccd0c9af8f9278b69da09a3e931.tar.gz
Merge branch 'master' of https://github.com/godotengine/godot
Diffstat (limited to 'core')
-rw-r--r--core/bind/core_bind.cpp12
-rw-r--r--core/compressed_translation.cpp8
-rw-r--r--core/globals.cpp10
-rw-r--r--core/io/config_file.cpp2
-rw-r--r--core/io/xml_parser.cpp12
-rw-r--r--core/math/math_2d.cpp1
-rw-r--r--core/object.cpp4
-rw-r--r--core/os/input.cpp4
-rw-r--r--core/resource.cpp2
-rw-r--r--core/script_language.h1
-rw-r--r--core/translation.cpp8
11 files changed, 32 insertions, 32 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index 438db5d518..f1edc3d7d7 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -62,8 +62,8 @@ void _ResourceLoader::_bind_methods() {
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);
- ObjectTypeDB::bind_method(_MD("has"),&_ResourceLoader::has);
+ ObjectTypeDB::bind_method(_MD("get_dependencies","path"),&_ResourceLoader::get_dependencies);
+ ObjectTypeDB::bind_method(_MD("has","path"),&_ResourceLoader::has);
}
_ResourceLoader::_ResourceLoader() {
@@ -96,7 +96,7 @@ _ResourceSaver *_ResourceSaver::singleton=NULL;
void _ResourceSaver::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("save","path","resource:Resource"),&_ResourceSaver::save, DEFVAL(0));
+ ObjectTypeDB::bind_method(_MD("save","path","resource:Resource","flags"),&_ResourceSaver::save,DEFVAL(0));
ObjectTypeDB::bind_method(_MD("get_recognized_extensions","type"),&_ResourceSaver::get_recognized_extensions);
BIND_CONSTANT(FLAG_RELATIVE_PATHS);
@@ -812,7 +812,7 @@ void _OS::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_unix_time"),&_OS::get_unix_time);
ObjectTypeDB::bind_method(_MD("get_system_time_msec"), &_OS::get_system_time_msec);
- ObjectTypeDB::bind_method(_MD("set_icon"),&_OS::set_icon);
+ ObjectTypeDB::bind_method(_MD("set_icon","icon"),&_OS::set_icon);
ObjectTypeDB::bind_method(_MD("delay_usec","usec"),&_OS::delay_usec);
ObjectTypeDB::bind_method(_MD("delay_msec","msec"),&_OS::delay_msec);
@@ -851,9 +851,9 @@ void _OS::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_frames_per_second"),&_OS::get_frames_per_second);
ObjectTypeDB::bind_method(_MD("print_all_textures_by_size"),&_OS::print_all_textures_by_size);
- ObjectTypeDB::bind_method(_MD("print_resources_by_type"),&_OS::print_resources_by_type);
+ ObjectTypeDB::bind_method(_MD("print_resources_by_type","types"),&_OS::print_resources_by_type);
- ObjectTypeDB::bind_method(_MD("native_video_play"),&_OS::native_video_play);
+ ObjectTypeDB::bind_method(_MD("native_video_play","path","volume","audio_track","subtitle_track"),&_OS::native_video_play);
ObjectTypeDB::bind_method(_MD("native_video_is_playing"),&_OS::native_video_is_playing);
ObjectTypeDB::bind_method(_MD("native_video_stop"),&_OS::native_video_stop);
ObjectTypeDB::bind_method(_MD("native_video_pause"),&_OS::native_video_pause);
diff --git a/core/compressed_translation.cpp b/core/compressed_translation.cpp
index 45fd4b5080..3f668dfade 100644
--- a/core/compressed_translation.cpp
+++ b/core/compressed_translation.cpp
@@ -410,15 +410,15 @@ bool PHashTranslation::_set(const StringName& p_name, const Variant& p_value) {
String name = p_name.operator String();
if (name=="hash_table") {
hash_table=p_value;
- print_line("translation: loaded hash table of size: "+itos(hash_table.size()));
+ //print_line("translation: loaded hash table of size: "+itos(hash_table.size()));
} else if (name=="bucket_table") {
bucket_table=p_value;
- print_line("translation: loaded bucket table of size: "+itos(bucket_table.size()));
+ //print_line("translation: loaded bucket table of size: "+itos(bucket_table.size()));
} else if (name=="strings") {
strings=p_value;
- print_line("translation: loaded string table of size: "+itos(strings.size()));
+ //print_line("translation: loaded string table of size: "+itos(strings.size()));
} else if (name=="load_from") {
- print_line("generating");
+ //print_line("generating");
generate(p_value);
} else
return false;
diff --git a/core/globals.cpp b/core/globals.cpp
index b48f34d2df..a3f8b11946 100644
--- a/core/globals.cpp
+++ b/core/globals.cpp
@@ -137,7 +137,7 @@ bool Globals::_set(const StringName& p_name, const Variant& p_value) {
props[p_name].order=last_order++;
}
} else {
- props[p_name]=VariantContainer(p_value,last_order++ + registering_order?0:NO_ORDER_BASE);
+ props[p_name]=VariantContainer(p_value,last_order++ + (registering_order?0:NO_ORDER_BASE));
}
}
@@ -1391,11 +1391,11 @@ void Globals::_bind_methods() {
ObjectTypeDB::bind_method(_MD("localize_path","path"),&Globals::localize_path);
ObjectTypeDB::bind_method(_MD("globalize_path","path"),&Globals::globalize_path);
ObjectTypeDB::bind_method(_MD("save"),&Globals::save);
- ObjectTypeDB::bind_method(_MD("has_singleton"),&Globals::has_singleton);
- ObjectTypeDB::bind_method(_MD("get_singleton"),&Globals::get_singleton_object);
- ObjectTypeDB::bind_method(_MD("load_resource_pack"),&Globals::_load_resource_pack);
+ ObjectTypeDB::bind_method(_MD("has_singleton","name"),&Globals::has_singleton);
+ ObjectTypeDB::bind_method(_MD("get_singleton","name"),&Globals::get_singleton_object);
+ ObjectTypeDB::bind_method(_MD("load_resource_pack","pack"),&Globals::_load_resource_pack);
- ObjectTypeDB::bind_method(_MD("save_custom"),&Globals::_save_custom_bnd);
+ ObjectTypeDB::bind_method(_MD("save_custom","file"),&Globals::_save_custom_bnd);
}
diff --git a/core/io/config_file.cpp b/core/io/config_file.cpp
index 7f74b61630..788fe7713c 100644
--- a/core/io/config_file.cpp
+++ b/core/io/config_file.cpp
@@ -205,7 +205,7 @@ void ConfigFile::_bind_methods(){
ObjectTypeDB::bind_method(_MD("has_section_key","section","key"),&ConfigFile::has_section_key);
ObjectTypeDB::bind_method(_MD("get_sections"),&ConfigFile::_get_sections);
- ObjectTypeDB::bind_method(_MD("get_section_keys"),&ConfigFile::_get_section_keys);
+ ObjectTypeDB::bind_method(_MD("get_section_keys","section"),&ConfigFile::_get_section_keys);
ObjectTypeDB::bind_method(_MD("load:Error","path"),&ConfigFile::load);
ObjectTypeDB::bind_method(_MD("save:Error","path"),&ConfigFile::save);
diff --git a/core/io/xml_parser.cpp b/core/io/xml_parser.cpp
index 1ff458f325..4fb175e639 100644
--- a/core/io/xml_parser.cpp
+++ b/core/io/xml_parser.cpp
@@ -385,15 +385,15 @@ void XMLParser::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_node_data"),&XMLParser::get_node_data);
ObjectTypeDB::bind_method(_MD("get_node_offset"),&XMLParser::get_node_offset);
ObjectTypeDB::bind_method(_MD("get_attribute_count"),&XMLParser::get_attribute_count);
- ObjectTypeDB::bind_method(_MD("get_attribute_name"),&XMLParser::get_attribute_name);
- ObjectTypeDB::bind_method(_MD("get_attribute_value"),(String (XMLParser::*)(int) const) &XMLParser::get_attribute_value);
- ObjectTypeDB::bind_method(_MD("has_attribute"),&XMLParser::has_attribute);
- ObjectTypeDB::bind_method(_MD("get_named_attribute_value"), (String (XMLParser::*)(const String&) const) &XMLParser::get_attribute_value);
- ObjectTypeDB::bind_method(_MD("get_named_attribute_value_safe"), &XMLParser::get_attribute_value_safe);
+ ObjectTypeDB::bind_method(_MD("get_attribute_name","idx"),&XMLParser::get_attribute_name);
+ ObjectTypeDB::bind_method(_MD("get_attribute_value","idx"),(String (XMLParser::*)(int) const) &XMLParser::get_attribute_value);
+ ObjectTypeDB::bind_method(_MD("has_attribute","name"),&XMLParser::has_attribute);
+ ObjectTypeDB::bind_method(_MD("get_named_attribute_value","name"), (String (XMLParser::*)(const String&) const) &XMLParser::get_attribute_value);
+ ObjectTypeDB::bind_method(_MD("get_named_attribute_value_safe","name"), &XMLParser::get_attribute_value_safe);
ObjectTypeDB::bind_method(_MD("is_empty"),&XMLParser::is_empty);
ObjectTypeDB::bind_method(_MD("get_current_line"),&XMLParser::get_current_line);
ObjectTypeDB::bind_method(_MD("skip_section"),&XMLParser::skip_section);
- ObjectTypeDB::bind_method(_MD("seek"),&XMLParser::seek);
+ ObjectTypeDB::bind_method(_MD("seek","pos"),&XMLParser::seek);
ObjectTypeDB::bind_method(_MD("open","file"),&XMLParser::open);
ObjectTypeDB::bind_method(_MD("open_buffer","buffer"),&XMLParser::open_buffer);
diff --git a/core/math/math_2d.cpp b/core/math/math_2d.cpp
index ce03f089e5..e76f044df3 100644
--- a/core/math/math_2d.cpp
+++ b/core/math/math_2d.cpp
@@ -187,7 +187,6 @@ Vector2 Vector2::snapped(const Vector2& p_by) const {
Vector2 Vector2::clamped(real_t p_len) const {
- return *this;
real_t l = length();
Vector2 v = *this;
if (l>0 && p_len<l) {
diff --git a/core/object.cpp b/core/object.cpp
index 9fdd11eb2e..773581d41d 100644
--- a/core/object.cpp
+++ b/core/object.cpp
@@ -1550,7 +1550,7 @@ void Object::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get","property"),&Object::_get_bind);
ObjectTypeDB::bind_method(_MD("get_property_list"),&Object::_get_property_list_bind);
ObjectTypeDB::bind_method(_MD("get_method_list"),&Object::_get_method_list_bind);
- ObjectTypeDB::bind_method(_MD("notification","what"),&Object::notification,DEFVAL(false));
+ ObjectTypeDB::bind_method(_MD("notification","what","reversed"),&Object::notification,DEFVAL(false));
ObjectTypeDB::bind_method(_MD("get_instance_ID"),&Object::get_instance_ID);
ObjectTypeDB::bind_method(_MD("set_script","script:Script"),&Object::set_script);
@@ -1615,7 +1615,7 @@ void Object::_bind_methods() {
ObjectTypeDB::bind_method(_MD("callv:Variant","method","arg_array"),&Object::callv);
- ObjectTypeDB::bind_method(_MD("has_method"),&Object::has_method);
+ ObjectTypeDB::bind_method(_MD("has_method","method"),&Object::has_method);
ObjectTypeDB::bind_method(_MD("get_signal_list"),&Object::_get_signal_list);
diff --git a/core/os/input.cpp b/core/os/input.cpp
index 15872d02fd..53358fd4f5 100644
--- a/core/os/input.cpp
+++ b/core/os/input.cpp
@@ -62,8 +62,8 @@ void Input::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_mouse_mode","mode"),&Input::set_mouse_mode);
ObjectTypeDB::bind_method(_MD("get_mouse_mode"),&Input::get_mouse_mode);
ObjectTypeDB::bind_method(_MD("warp_mouse_pos","to"),&Input::warp_mouse_pos);
- ObjectTypeDB::bind_method(_MD("action_press"),&Input::action_press);
- ObjectTypeDB::bind_method(_MD("action_release"),&Input::action_release);
+ ObjectTypeDB::bind_method(_MD("action_press","action"),&Input::action_press);
+ ObjectTypeDB::bind_method(_MD("action_release","action"),&Input::action_release);
ObjectTypeDB::bind_method(_MD("set_custom_mouse_cursor","image:Texture","hotspot"),&Input::set_custom_mouse_cursor,DEFVAL(Vector2()));
BIND_CONSTANT( MOUSE_MODE_VISIBLE );
diff --git a/core/resource.cpp b/core/resource.cpp
index 6967599f96..13e0f73b80 100644
--- a/core/resource.cpp
+++ b/core/resource.cpp
@@ -278,7 +278,7 @@ void Resource::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_import_metadata","metadata"),&Resource::set_import_metadata);
ObjectTypeDB::bind_method(_MD("get_import_metadata"),&Resource::get_import_metadata);
- ObjectTypeDB::bind_method(_MD("duplicate"),&Resource::duplicate,DEFVAL(false));
+ ObjectTypeDB::bind_method(_MD("duplicate","subresources"),&Resource::duplicate,DEFVAL(false));
ADD_SIGNAL( MethodInfo("changed") );
ADD_PROPERTY( PropertyInfo(Variant::STRING,"resource/path",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_EDITOR ), _SCS("set_path"),_SCS("get_path"));
ADD_PROPERTYNZ( PropertyInfo(Variant::STRING,"resource/name"), _SCS("set_name"),_SCS("get_name"));
diff --git a/core/script_language.h b/core/script_language.h
index 9660f141c7..52ae4e488f 100644
--- a/core/script_language.h
+++ b/core/script_language.h
@@ -165,6 +165,7 @@ public:
virtual String make_function(const String& p_class,const String& p_name,const StringArray& p_args) const=0;
virtual Error complete_code(const String& p_code, const String& p_base_path, Object*p_owner,List<String>* r_options,String& r_call_hint) { return ERR_UNAVAILABLE; }
virtual void auto_indent_code(String& p_code,int p_from_line,int p_to_line) const=0;
+ virtual void add_global_constant(const StringName& p_variable,const Variant& p_value)=0;
/* DEBUGGER FUNCTIONS */
diff --git a/core/translation.cpp b/core/translation.cpp
index 8247cd1201..de55224d5c 100644
--- a/core/translation.cpp
+++ b/core/translation.cpp
@@ -626,7 +626,7 @@ bool TranslationServer::_load_translations(const String& p_from) {
for(int i=0;i<tcount;i++) {
- print_line( "Loading translation from " + r[i] );
+ //print_line( "Loading translation from " + r[i] );
Ref<Translation> tr = ResourceLoader::load(r[i]);
if (tr.is_valid())
add_translation(tr);
@@ -670,10 +670,10 @@ void TranslationServer::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_locale","locale"),&TranslationServer::set_locale);
ObjectTypeDB::bind_method(_MD("get_locale"),&TranslationServer::get_locale);
- ObjectTypeDB::bind_method(_MD("translate"),&TranslationServer::translate);
+ ObjectTypeDB::bind_method(_MD("translate","message"),&TranslationServer::translate);
- ObjectTypeDB::bind_method(_MD("add_translation"),&TranslationServer::add_translation);
- ObjectTypeDB::bind_method(_MD("remove_translation"),&TranslationServer::remove_translation);
+ ObjectTypeDB::bind_method(_MD("add_translation","translation:Translation"),&TranslationServer::add_translation);
+ ObjectTypeDB::bind_method(_MD("remove_translation","translation:Translation"),&TranslationServer::remove_translation);
ObjectTypeDB::bind_method(_MD("clear"),&TranslationServer::clear);