summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-06-11 10:41:43 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-06-11 10:41:43 -0300
commit64e83bfd1404ea593f0c79b478d196a3fcde42a8 (patch)
treec18c61da239443532a94fb9fa54df702df12a90b /core
parent9b8696d3dd92e2ed6f310ad0f0bf3c2182c9c6ae (diff)
parent5f5cd5e6d1508f85ac1bffa44e122b4dc0e2bb1d (diff)
Merge branch 'master' of https://github.com/okamstudio/godot
Diffstat (limited to 'core')
-rw-r--r--core/bind/core_bind.cpp5
-rw-r--r--core/bind/core_bind.h1
-rw-r--r--core/io/file_access_pack.cpp5
-rw-r--r--core/io/file_access_pack.h1
-rw-r--r--core/io/packet_peer.cpp1
-rw-r--r--core/os/dir_access.h2
-rw-r--r--core/variant_call.cpp2
7 files changed, 16 insertions, 1 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index 8d6662157d..4f5358591a 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -1347,6 +1347,10 @@ bool _Directory::file_exists(String p_file){
return d->file_exists(p_file);
}
+bool _Directory::dir_exists(String p_dir) {
+ ERR_FAIL_COND_V(!d,false);
+ return d->dir_exists(p_dir);
+}
int _Directory::get_space_left(){
@@ -1386,6 +1390,7 @@ void _Directory::_bind_methods() {
ObjectTypeDB::bind_method(_MD("make_dir:Error","name"),&_Directory::make_dir);
ObjectTypeDB::bind_method(_MD("make_dir_recursive:Error","name"),&_Directory::make_dir_recursive);
ObjectTypeDB::bind_method(_MD("file_exists","name"),&_Directory::file_exists);
+ ObjectTypeDB::bind_method(_MD("dir_exists","name"),&_Directory::dir_exists);
// ObjectTypeDB::bind_method(_MD("get_modified_time","file"),&_Directory::get_modified_time);
ObjectTypeDB::bind_method(_MD("get_space_left"),&_Directory::get_space_left);
ObjectTypeDB::bind_method(_MD("copy:Error","from","to"),&_Directory::copy);
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index bb68bbaad8..02fe3e8874 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -350,6 +350,7 @@ public:
Error make_dir_recursive(String p_dir);
bool file_exists(String p_file);
+ bool dir_exists(String p_dir);
int get_space_left();
diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp
index 6a28fa9dae..e2cb300ebc 100644
--- a/core/io/file_access_pack.cpp
+++ b/core/io/file_access_pack.cpp
@@ -443,6 +443,11 @@ bool DirAccessPack::file_exists(String p_file){
return current->files.has(p_file);
}
+bool DirAccessPack::dir_exists(String p_dir) {
+
+ return current->subdirs.has(p_dir);
+}
+
Error DirAccessPack::make_dir(String p_dir){
return ERR_UNAVAILABLE;
diff --git a/core/io/file_access_pack.h b/core/io/file_access_pack.h
index 07ce8cbaf8..a4c750bf3c 100644
--- a/core/io/file_access_pack.h
+++ b/core/io/file_access_pack.h
@@ -190,6 +190,7 @@ public:
virtual bool file_exists(String p_file);
+ virtual bool dir_exists(String p_dir);
virtual Error make_dir(String p_dir);
diff --git a/core/io/packet_peer.cpp b/core/io/packet_peer.cpp
index f67a10df2e..37fc9c4a0a 100644
--- a/core/io/packet_peer.cpp
+++ b/core/io/packet_peer.cpp
@@ -112,6 +112,7 @@ void PacketPeer::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_var"),&PacketPeer::_bnd_get_var);
ObjectTypeDB::bind_method(_MD("put_var", "var:Variant"),&PacketPeer::put_var);
+ ObjectTypeDB::bind_method(_MD("get_available_packet_count"),&PacketPeer::get_available_packet_count);
};
/***************/
diff --git a/core/os/dir_access.h b/core/os/dir_access.h
index 58a925465a..d8672218bd 100644
--- a/core/os/dir_access.h
+++ b/core/os/dir_access.h
@@ -91,7 +91,7 @@ public:
virtual Error erase_contents_recursive(); //super dangerous, use with care!
virtual bool file_exists(String p_file)=0;
-
+ virtual bool dir_exists(String p_dir)=0;
virtual size_t get_space_left()=0;
diff --git a/core/variant_call.cpp b/core/variant_call.cpp
index 63d0fcec3a..c245e01ee0 100644
--- a/core/variant_call.cpp
+++ b/core/variant_call.cpp
@@ -567,6 +567,7 @@ static void _call_##m_type##_##m_method(Variant& r_ret,Variant& p_self,const Var
VCALL_PTR0R( Matrix32, affine_inverse );
VCALL_PTR0R( Matrix32, get_rotation );
VCALL_PTR0R( Matrix32, get_origin );
+ VCALL_PTR0R( Matrix32, get_scale );
VCALL_PTR0R( Matrix32, orthonormalized );
VCALL_PTR1R( Matrix32, rotated );
VCALL_PTR1R( Matrix32, scaled );
@@ -1377,6 +1378,7 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl
ADDFUNC0(MATRIX32,MATRIX32,Matrix32,affine_inverse,varray());
ADDFUNC0(MATRIX32,REAL,Matrix32,get_rotation,varray());
ADDFUNC0(MATRIX32,VECTOR2,Matrix32,get_origin,varray());
+ ADDFUNC0(MATRIX32,VECTOR2,Matrix32,get_scale,varray());
ADDFUNC0(MATRIX32,MATRIX32,Matrix32,orthonormalized,varray());
ADDFUNC1(MATRIX32,MATRIX32,Matrix32,rotated,REAL,"phi",varray());
ADDFUNC1(MATRIX32,MATRIX32,Matrix32,scaled,VECTOR2,"scale",varray());