summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/bind/core_bind.cpp13
-rw-r--r--core/bind/core_bind.h3
-rw-r--r--core/rid.h6
-rw-r--r--core/variant_call.cpp5
4 files changed, 19 insertions, 8 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index 384813ecdf..4b23761e4e 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -553,6 +553,16 @@ void _OS::set_icon(const Image& p_icon) {
OS::get_singleton()->set_icon(p_icon);
}
+int _OS::get_exit_code() const {
+
+ return OS::get_singleton()->get_exit_code();
+}
+
+void _OS::set_exit_code(int p_code) {
+
+ OS::get_singleton()->set_exit_code(p_code);
+}
+
/**
* Get current datetime with consideration for utc and
* dst
@@ -1112,6 +1122,9 @@ void _OS::_bind_methods() {
ClassDB::bind_method(_MD("set_icon","icon"),&_OS::set_icon);
+ ClassDB::bind_method(_MD("get_exit_code"),&_OS::get_exit_code);
+ ClassDB::bind_method(_MD("set_exit_code","code"),&_OS::set_exit_code);
+
ClassDB::bind_method(_MD("delay_usec","usec"),&_OS::delay_usec);
ClassDB::bind_method(_MD("delay_msec","msec"),&_OS::delay_msec);
ClassDB::bind_method(_MD("get_ticks_msec"),&_OS::get_ticks_msec);
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index f1c98a58dc..59f243a0ee 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -246,6 +246,9 @@ public:
void set_use_file_access_save_and_swap(bool p_enable);
void set_icon(const Image& p_icon);
+
+ int get_exit_code() const;
+ void set_exit_code(int p_code);
Dictionary get_date(bool utc) const;
Dictionary get_time(bool utc) const;
Dictionary get_datetime(bool utc) const;
diff --git a/core/rid.h b/core/rid.h
index 466e922968..8dc535c9c1 100644
--- a/core/rid.h
+++ b/core/rid.h
@@ -113,15 +113,15 @@ protected:
#ifndef DEBUG_ENABLED
- _FORCE_INLINE_ bool _is_owner(RID& p_rid) const {
+ _FORCE_INLINE_ bool _is_owner(const RID& p_rid) const {
- return this==p_rid._owner;
+ return this==p_rid._data->_owner;
}
_FORCE_INLINE_ void _remove_owner(RID& p_rid) {
- return p_rid._owner=NULL;
+ p_rid._data->_owner=NULL;
}
#
diff --git a/core/variant_call.cpp b/core/variant_call.cpp
index 5c9e8e9248..6aa37601a0 100644
--- a/core/variant_call.cpp
+++ b/core/variant_call.cpp
@@ -423,10 +423,6 @@ static void _call_##m_type##_##m_method(Variant& r_ret,Variant& p_self,const Var
r_ret=Variant();
}
- static void _call_Vector2_floorf(Variant& r_ret,Variant& p_self,const Variant** p_args) {
- r_ret = reinterpret_cast<Vector2*>(p_self._data._mem)->floor();
- };
-
VCALL_LOCALMEM0R(Quat,length);
VCALL_LOCALMEM0R(Quat,length_squared);
VCALL_LOCALMEM0R(Quat,normalized);
@@ -1458,7 +1454,6 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl
ADDFUNC1(VECTOR2,VECTOR2,Vector2,rotated,REAL,"phi",varray());
ADDFUNC0(VECTOR2,VECTOR2,Vector2,tangent,varray());
ADDFUNC0(VECTOR2,VECTOR2,Vector2,floor,varray());
- ADDFUNC0(VECTOR2,VECTOR2,Vector2,floorf,varray());
ADDFUNC1(VECTOR2,VECTOR2,Vector2,snapped,VECTOR2,"by",varray());
ADDFUNC0(VECTOR2,REAL,Vector2,get_aspect,varray());
ADDFUNC1(VECTOR2,REAL,Vector2,dot,VECTOR2,"with",varray());