summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gd_functions.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-01-11 00:52:51 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-01-11 00:52:51 -0300
commitbc26f905817945300d397696330d1ab04a1af33c (patch)
treed06338399c8ea410042f6631fb3db3efcc100b05 /modules/gdscript/gd_functions.cpp
parent710692278d1353aad08bc7bceb655afc1d6c950c (diff)
downloadredot-engine-bc26f905817945300d397696330d1ab04a1af33c.tar.gz
Type renames:
Matrix32 -> Transform2D Matrix3 -> Basis AABB -> Rect3 RawArray -> PoolByteArray IntArray -> PoolIntArray FloatArray -> PoolFloatArray Vector2Array -> PoolVector2Array Vector3Array -> PoolVector3Array ColorArray -> PoolColorArray
Diffstat (limited to 'modules/gdscript/gd_functions.cpp')
-rw-r--r--modules/gdscript/gd_functions.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/modules/gdscript/gd_functions.cpp b/modules/gdscript/gd_functions.cpp
index 64578e5f5c..bf73b14066 100644
--- a/modules/gdscript/gd_functions.cpp
+++ b/modules/gdscript/gd_functions.cpp
@@ -672,7 +672,7 @@ void GDFunctions::call(Function p_func,const Variant **p_args,int p_arg_count,Va
case VAR_TO_BYTES: {
VALIDATE_ARG_COUNT(1);
- ByteArray barr;
+ PoolByteArray barr;
int len;
Error err = encode_variant(*p_args[0],NULL,len);
if (err) {
@@ -685,7 +685,7 @@ void GDFunctions::call(Function p_func,const Variant **p_args,int p_arg_count,Va
barr.resize(len);
{
- ByteArray::Write w = barr.write();
+ PoolByteArray::Write w = barr.write();
encode_variant(*p_args[0],w.ptr(),len);
}
@@ -693,24 +693,24 @@ void GDFunctions::call(Function p_func,const Variant **p_args,int p_arg_count,Va
} break;
case BYTES_TO_VAR: {
VALIDATE_ARG_COUNT(1);
- if (p_args[0]->get_type()!=Variant::RAW_ARRAY) {
+ if (p_args[0]->get_type()!=Variant::POOL_BYTE_ARRAY) {
r_error.error=Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument=0;
- r_error.expected=Variant::RAW_ARRAY;
+ r_error.expected=Variant::POOL_BYTE_ARRAY;
r_ret=Variant();
return;
}
- ByteArray varr=*p_args[0];
+ PoolByteArray varr=*p_args[0];
Variant ret;
{
- ByteArray::Read r=varr.read();
+ PoolByteArray::Read r=varr.read();
Error err = decode_variant(ret,r.ptr(),varr.size(),NULL);
if (err!=OK) {
r_ret=RTR("Not enough bytes for decoding bytes, or invalid format.");
r_error.error=Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument=0;
- r_error.expected=Variant::RAW_ARRAY;
+ r_error.expected=Variant::POOL_BYTE_ARRAY;
return;
}
@@ -1531,13 +1531,13 @@ MethodInfo GDFunctions::get_info(Function p_func) {
} break;
case VAR_TO_BYTES: {
MethodInfo mi("var2bytes",PropertyInfo(Variant::NIL,"var"));
- mi.return_val.type=Variant::RAW_ARRAY;
+ mi.return_val.type=Variant::POOL_BYTE_ARRAY;
return mi;
} break;
case BYTES_TO_VAR: {
- MethodInfo mi("bytes2var:Variant",PropertyInfo(Variant::RAW_ARRAY,"bytes"));
+ MethodInfo mi("bytes2var:Variant",PropertyInfo(Variant::POOL_BYTE_ARRAY,"bytes"));
mi.return_val.type=Variant::NIL;
return mi;
} break;