summaryrefslogtreecommitdiff
path: root/core/bind
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-03-13 22:57:24 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-03-13 22:57:24 -0300
commit31ce3c5fd0300aac1e86bced1efc5f9ec94bdb6b (patch)
treeb6d3a290333c72940b49ed4c930ff6858a59515e /core/bind
parenta65edb4caabec21654c56552e11aacf0fd9291de (diff)
-fix bug in cache for atlas import/export
-fix some menus -fixed bug in out transition curves -detect and remove file:/// in collada -remove multiscript for now -remove dependencies on mouse in OS, moved to Input -avoid fscache from screwing up (fix might make it slower, but it works) -funcref was missing, it's there now
Diffstat (limited to 'core/bind')
-rw-r--r--core/bind/core_bind.cpp58
-rw-r--r--core/bind/core_bind.h9
2 files changed, 64 insertions, 3 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index 73f6f753b9..28906354ab 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -387,6 +387,12 @@ uint32_t _OS::get_ticks_msec() const {
return OS::get_singleton()->get_ticks_msec();
}
+
+bool _OS::can_use_threads() const {
+
+ return OS::get_singleton()->can_use_threads();
+}
+
bool _OS::can_draw() const {
return OS::get_singleton()->can_draw();
@@ -488,6 +494,27 @@ float _OS::get_frames_per_second() const {
return OS::get_singleton()->get_frames_per_second();
}
+Error _OS::native_video_play(String p_path) {
+
+ return OS::get_singleton()->native_video_play(p_path);
+};
+
+bool _OS::native_video_is_playing() {
+
+ return OS::get_singleton()->native_video_is_playing();
+};
+
+void _OS::native_video_pause() {
+
+ OS::get_singleton()->native_video_pause();
+};
+
+void _OS::native_video_stop() {
+
+ OS::get_singleton()->native_video_stop();
+};
+
+
String _OS::get_custom_level() const {
return OS::get_singleton()->get_custom_level();
@@ -496,7 +523,7 @@ _OS *_OS::singleton=NULL;
void _OS::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_mouse_pos"),&_OS::get_mouse_pos);
+ //ObjectTypeDB::bind_method(_MD("get_mouse_pos"),&_OS::get_mouse_pos);
//ObjectTypeDB::bind_method(_MD("is_mouse_grab_enabled"),&_OS::is_mouse_grab_enabled);
ObjectTypeDB::bind_method(_MD("set_clipboard","clipboard"),&_OS::set_clipboard);
@@ -550,7 +577,9 @@ void _OS::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_frames_drawn"),&_OS::get_frames_drawn);
ObjectTypeDB::bind_method(_MD("is_stdout_verbose"),&_OS::is_stdout_verbose);
- ObjectTypeDB::bind_method(_MD("get_mouse_button_state"),&_OS::get_mouse_button_state);
+ ObjectTypeDB::bind_method(_MD("can_use_threads"),&_OS::can_use_threads);
+
+ //ObjectTypeDB::bind_method(_MD("get_mouse_button_state"),&_OS::get_mouse_button_state);
ObjectTypeDB::bind_method(_MD("dump_memory_to_file","file"),&_OS::dump_memory_to_file);
ObjectTypeDB::bind_method(_MD("dump_resources_to_file","file"),&_OS::dump_resources_to_file);
@@ -568,6 +597,12 @@ void _OS::_bind_methods() {
ObjectTypeDB::bind_method(_MD("print_all_textures_by_size"),&_OS::print_all_textures_by_size);
+ ObjectTypeDB::bind_method(_MD("native_video_play"),&_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);
+
+
BIND_CONSTANT( DAY_SUNDAY );
BIND_CONSTANT( DAY_MONDAY );
BIND_CONSTANT( DAY_TUESDAY );
@@ -983,8 +1018,22 @@ void _File::store_string(const String& p_string){
f->store_string(p_string);
}
-void _File::store_line(const String& p_string){
+void _File::store_pascal_string(const String& p_string) {
+
+ ERR_FAIL_COND(!f);
+
+ f->store_pascal_string(p_string);
+};
+
+String _File::get_pascal_string() {
+
+ ERR_FAIL_COND_V(!f, "");
+
+ return f->get_pascal_string();
+};
+
+void _File::store_line(const String& p_string){
ERR_FAIL_COND(!f);
f->store_line(p_string);
@@ -1083,6 +1132,9 @@ void _File::_bind_methods() {
ObjectTypeDB::bind_method(_MD("store_string","string"),&_File::store_string);
ObjectTypeDB::bind_method(_MD("store_var","value"),&_File::store_var);
+ ObjectTypeDB::bind_method(_MD("store_pascal_string","string"),&_File::store_pascal_string);
+ ObjectTypeDB::bind_method(_MD("get_pascal_string"),&_File::get_pascal_string);
+
ObjectTypeDB::bind_method(_MD("file_exists","path"),&_File::file_exists);
BIND_CONSTANT( READ );
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index 9545fc65fb..0c80fb3fc4 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -98,6 +98,11 @@ public:
bool is_video_mode_resizable(int p_screen=0) const;
Array get_fullscreen_mode_list(int p_screen=0) const;
+ Error native_video_play(String p_path);
+ bool native_video_is_playing();
+ void native_video_pause();
+ void native_video_stop();
+
void set_iterations_per_second(int p_ips);
int get_iterations_per_second() const;
@@ -166,6 +171,7 @@ public:
void delay_msec(uint32_t p_msec) const;
uint32_t get_ticks_msec() const;
+ bool can_use_threads() const;
bool can_draw() const;
@@ -280,6 +286,9 @@ public:
void store_string(const String& p_string);
void store_line(const String& p_string);
+ virtual void store_pascal_string(const String& p_string);
+ virtual String get_pascal_string();
+
Vector<String> get_csv_line() const;