diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-01-11 00:52:51 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-01-11 00:52:51 -0300 |
commit | bc26f905817945300d397696330d1ab04a1af33c (patch) | |
tree | d06338399c8ea410042f6631fb3db3efcc100b05 /platform/android | |
parent | 710692278d1353aad08bc7bceb655afc1d6c950c (diff) |
Type renames:
Matrix32 -> Transform2D
Matrix3 -> Basis
AABB -> Rect3
RawArray -> PoolByteArray
IntArray -> PoolIntArray
FloatArray -> PoolFloatArray
Vector2Array -> PoolVector2Array
Vector3Array -> PoolVector3Array
ColorArray -> PoolColorArray
Diffstat (limited to 'platform/android')
-rw-r--r-- | platform/android/java_class_wrapper.h | 16 | ||||
-rw-r--r-- | platform/android/java_glue.cpp | 32 |
2 files changed, 24 insertions, 24 deletions
diff --git a/platform/android/java_class_wrapper.h b/platform/android/java_class_wrapper.h index ff213c7f33..f0156563b2 100644 --- a/platform/android/java_class_wrapper.h +++ b/platform/android/java_class_wrapper.h @@ -98,14 +98,14 @@ class JavaClass : public Reference { case ARG_TYPE_CLASS: r_type=Variant::OBJECT; break; case ARG_ARRAY_BIT|ARG_TYPE_VOID: r_type=Variant::NIL; break; case ARG_ARRAY_BIT|ARG_TYPE_BOOLEAN: r_type=Variant::ARRAY; break; - case ARG_ARRAY_BIT|ARG_TYPE_BYTE: r_type=Variant::RAW_ARRAY; likelyhood=1.0; break; - case ARG_ARRAY_BIT|ARG_TYPE_CHAR: r_type=Variant::RAW_ARRAY; likelyhood=0.5; break; - case ARG_ARRAY_BIT|ARG_TYPE_SHORT: r_type=Variant::INT_ARRAY; likelyhood=0.3; break; - case ARG_ARRAY_BIT|ARG_TYPE_INT: r_type=Variant::INT_ARRAY; likelyhood=1.0; break; - case ARG_ARRAY_BIT|ARG_TYPE_LONG: r_type=Variant::INT_ARRAY; likelyhood=0.5; break; - case ARG_ARRAY_BIT|ARG_TYPE_FLOAT: r_type=Variant::REAL_ARRAY; likelyhood=1.0; break; - case ARG_ARRAY_BIT|ARG_TYPE_DOUBLE: r_type=Variant::REAL_ARRAY; likelyhood=0.5; break; - case ARG_ARRAY_BIT|ARG_TYPE_STRING: r_type=Variant::STRING_ARRAY; break; + case ARG_ARRAY_BIT|ARG_TYPE_BYTE: r_type=Variant::POOL_BYTE_ARRAY; likelyhood=1.0; break; + case ARG_ARRAY_BIT|ARG_TYPE_CHAR: r_type=Variant::POOL_BYTE_ARRAY; likelyhood=0.5; break; + case ARG_ARRAY_BIT|ARG_TYPE_SHORT: r_type=Variant::POOL_INT_ARRAY; likelyhood=0.3; break; + case ARG_ARRAY_BIT|ARG_TYPE_INT: r_type=Variant::POOL_INT_ARRAY; likelyhood=1.0; break; + case ARG_ARRAY_BIT|ARG_TYPE_LONG: r_type=Variant::POOL_INT_ARRAY; likelyhood=0.5; break; + case ARG_ARRAY_BIT|ARG_TYPE_FLOAT: r_type=Variant::POOL_REAL_ARRAY; likelyhood=1.0; break; + case ARG_ARRAY_BIT|ARG_TYPE_DOUBLE: r_type=Variant::POOL_REAL_ARRAY; likelyhood=0.5; break; + case ARG_ARRAY_BIT|ARG_TYPE_STRING: r_type=Variant::POOL_STRING_ARRAY; break; case ARG_ARRAY_BIT|ARG_TYPE_CLASS: r_type=Variant::ARRAY; break; } } diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp index 3e8ce35910..63d53e35a3 100644 --- a/platform/android/java_glue.cpp +++ b/platform/android/java_glue.cpp @@ -120,7 +120,7 @@ jvalret _variant_to_jvalue(JNIEnv *env, Variant::Type p_type, const Variant* p_a v.val.l=jStr; v.obj=jStr; } break; - case Variant::STRING_ARRAY: { + case Variant::POOL_STRING_ARRAY: { PoolVector<String> sarray = *p_arg; jobjectArray arr = env->NewObjectArray(sarray.size(),env->FindClass("java/lang/String"),env->NewStringUTF("")); @@ -179,7 +179,7 @@ jvalret _variant_to_jvalue(JNIEnv *env, Variant::Type p_type, const Variant* p_a v.obj=jdict; } break; - case Variant::INT_ARRAY: { + case Variant::POOL_INT_ARRAY: { PoolVector<int> array = *p_arg; jintArray arr = env->NewIntArray(array.size()); @@ -189,7 +189,7 @@ jvalret _variant_to_jvalue(JNIEnv *env, Variant::Type p_type, const Variant* p_a v.obj=arr; } break; - case Variant::RAW_ARRAY: { + case Variant::POOL_BYTE_ARRAY: { PoolVector<uint8_t> array = *p_arg; jbyteArray arr = env->NewByteArray(array.size()); PoolVector<uint8_t>::Read r = array.read(); @@ -198,7 +198,7 @@ jvalret _variant_to_jvalue(JNIEnv *env, Variant::Type p_type, const Variant* p_a v.obj=arr; } break; - case Variant::REAL_ARRAY: { + case Variant::POOL_REAL_ARRAY: { PoolVector<float> array = *p_arg; jfloatArray arr = env->NewFloatArray(array.size()); @@ -324,10 +324,10 @@ Variant _jobject_to_variant(JNIEnv * env, jobject obj) { jdoubleArray arr = (jdoubleArray)obj; int fCount = env->GetArrayLength(arr); - RealArray sarr; + PoolRealArray sarr; sarr.resize(fCount); - RealArray::Write w = sarr.write(); + PoolRealArray::Write w = sarr.write(); for (int i=0; i<fCount; i++) { @@ -343,11 +343,11 @@ Variant _jobject_to_variant(JNIEnv * env, jobject obj) { jfloatArray arr = (jfloatArray)obj; int fCount = env->GetArrayLength(arr); - RealArray sarr; + PoolRealArray sarr; sarr.resize(fCount); - RealArray::Write w = sarr.write(); + PoolRealArray::Write w = sarr.write(); for (int i=0; i<fCount; i++) { @@ -384,7 +384,7 @@ Variant _jobject_to_variant(JNIEnv * env, jobject obj) { jmethodID get_keys = env->GetMethodID(oclass, "get_keys", "()[Ljava/lang/String;"); jobjectArray arr = (jobjectArray)env->CallObjectMethod(obj, get_keys); - StringArray keys = _jobject_to_variant(env, arr); + PoolStringArray keys = _jobject_to_variant(env, arr); env->DeleteLocalRef(arr); jmethodID get_values = env->GetMethodID(oclass, "get_values", "()[Ljava/lang/Object;"); @@ -527,7 +527,7 @@ public: ret = String::utf8(env->GetStringUTFChars((jstring)o, NULL)); env->DeleteLocalRef(o); } break; - case Variant::STRING_ARRAY: { + case Variant::POOL_STRING_ARRAY: { jobjectArray arr = (jobjectArray)env->CallObjectMethodA(instance,E->get().method,v); @@ -535,7 +535,7 @@ public: env->DeleteLocalRef(arr); } break; - case Variant::INT_ARRAY: { + case Variant::POOL_INT_ARRAY: { jintArray arr = (jintArray)env->CallObjectMethodA(instance,E->get().method,v); @@ -549,7 +549,7 @@ public: ret=sarr; env->DeleteLocalRef(arr); } break; - case Variant::REAL_ARRAY: { + case Variant::POOL_REAL_ARRAY: { jfloatArray arr = (jfloatArray)env->CallObjectMethodA(instance,E->get().method,v); @@ -1588,10 +1588,10 @@ static Variant::Type get_jni_type(const String& p_type) { {"float",Variant::REAL}, {"double", Variant::REAL}, {"java.lang.String",Variant::STRING}, - {"[I",Variant::INT_ARRAY}, - {"[B",Variant::RAW_ARRAY}, - {"[F",Variant::REAL_ARRAY}, - {"[Ljava.lang.String;",Variant::STRING_ARRAY}, + {"[I",Variant::POOL_INT_ARRAY}, + {"[B",Variant::POOL_BYTE_ARRAY}, + {"[F",Variant::POOL_REAL_ARRAY}, + {"[Ljava.lang.String;",Variant::POOL_STRING_ARRAY}, {"org.godotengine.godot.Dictionary", Variant::DICTIONARY}, {NULL,Variant::NIL} }; |