From d2aae675e92cbe99706564e2cffbc34ed7cea639 Mon Sep 17 00:00:00 2001 From: Rémi Verschelde Date: Fri, 13 Jan 2017 18:25:43 +0100 Subject: Replace Engine version API by preexisting OS one It outputs a single Dictionary with all relevant information as keys, that will less bloat the documentation and provide all details in one function call. --- core/bind/core_bind.cpp | 53 +++---------------------------------------------- core/bind/core_bind.h | 12 +---------- 2 files changed, 4 insertions(+), 61 deletions(-) (limited to 'core/bind') diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 80fe8b7c8..fe2be260d 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -986,11 +986,6 @@ void _OS::alert(const String& p_alert,const String& p_title) { OS::get_singleton()->alert(p_alert,p_title); } -Dictionary _OS::get_engine_version() const { - - return OS::get_singleton()->get_engine_version(); -} - _OS *_OS::singleton=NULL; void _OS::_bind_methods() { @@ -1134,8 +1129,6 @@ void _OS::_bind_methods() { ClassDB::bind_method(_MD("set_use_vsync","enable"),&_OS::set_use_vsync); ClassDB::bind_method(_MD("is_vsync_enabled"),&_OS::is_vsync_enabled); - ClassDB::bind_method(_MD("get_engine_version"),&_OS::get_engine_version); - BIND_CONSTANT( DAY_SUNDAY ); BIND_CONSTANT( DAY_MONDAY ); BIND_CONSTANT( DAY_TUESDAY ); @@ -2596,42 +2589,9 @@ MainLoop *_Engine::get_main_loop() const { return OS::get_singleton()->get_main_loop(); } -String _Engine::get_version() const { - - return Engine::get_singleton()->get_version(); -} -String _Engine::get_version_name() const{ - - return Engine::get_singleton()->get_version_name(); -} -String _Engine::get_version_short_name() const{ - - return Engine::get_singleton()->get_version_short_name(); -} -int _Engine::get_version_major() const{ - - return Engine::get_singleton()->get_version_major(); - -} -int _Engine::get_version_minor() const{ - - return Engine::get_singleton()->get_version_minor(); - -} -String _Engine::get_version_revision() const{ - - return Engine::get_singleton()->get_version_revision(); - -} -String _Engine::get_version_status() const{ - - return Engine::get_singleton()->get_version_status(); - -} -int _Engine::get_version_year() const{ - - return Engine::get_singleton()->get_version_year(); +Dictionary _Engine::get_version_info() const { + return Engine::get_singleton()->get_version_info(); } @@ -2652,14 +2612,7 @@ void _Engine::_bind_methods() { ClassDB::bind_method(_MD("get_main_loop:MainLoop"),&_Engine::get_main_loop); - ClassDB::bind_method(_MD("get_version"),&_Engine::get_version); - ClassDB::bind_method(_MD("get_version_name"),&_Engine::get_version_name); - ClassDB::bind_method(_MD("get_version_short_name"),&_Engine::get_version_short_name); - ClassDB::bind_method(_MD("get_version_major"),&_Engine::get_version_major); - ClassDB::bind_method(_MD("get_version_minor"),&_Engine::get_version_minor); - ClassDB::bind_method(_MD("get_version_revision"),&_Engine::get_version_revision); - ClassDB::bind_method(_MD("get_version_status"),&_Engine::get_version_status); - ClassDB::bind_method(_MD("get_version_year"),&_Engine::get_version_year); + ClassDB::bind_method(_MD("get_version_info"),&_Engine::get_version_info); } diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index 3401435c6..0774492f6 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -309,8 +309,6 @@ public: void set_use_vsync(bool p_enable); bool is_vsync_enabled() const; - Dictionary get_engine_version() const; - static _OS *get_singleton() { return singleton; } _OS(); @@ -647,15 +645,7 @@ public: MainLoop *get_main_loop() const; - String get_version() const; - String get_version_name() const; - String get_version_short_name() const; - int get_version_major() const; - int get_version_minor() const; - String get_version_revision() const; - String get_version_status() const; - int get_version_year() const; - + Dictionary get_version_info() const; _Engine(); }; -- cgit v1.2.3-70-g09d2