Misc Fixes

==========

-NOTIFICATION_WM_QUIT fixed on android (seems tha way this is reported changed in newer sdk)
-WIP implementation of APK Expansion APIs for publishing games larger than 50mb in Play Store
-Feaures in the new tutorials are all present in the sourcecode
-This (hopefully) should get rid of the animation list order getting corrupted
-Improved 3D Scene Importer (Skeletons, Animations and other stuff were not being merged). Anything missing?
-In code editor, the automatic syntax checker will only use file_exists() to check preload() else it might freeze the editor too much while typing if the preload is a big resource
-Fixed bugs in PolygonPathFinder, stil pending to do a node and a demo
This commit is contained in:
Juan Linietsky 2014-06-27 23:21:45 -03:00
parent 1cc96a4d74
commit 2af2a84a03
74 changed files with 1416 additions and 662 deletions

View file

@ -747,8 +747,34 @@ JNIEXPORT void JNICALL Java_com_android_godot_GodotLib_initialize(JNIEnv * env,
}
const char ** cmdline=NULL;
int cmdlen=0;
bool use_apk_expansion=false;
if (p_cmdline) {
int cmdlen = env->GetArrayLength(p_cmdline);
if (cmdlen) {
cmdline = (const char**)malloc((env->GetArrayLength(p_cmdline)+1)*sizeof(const char*));
cmdline[cmdlen]=NULL;
os_android = new OS_Android(_gfx_init_func,env,_open_uri,_get_data_dir,_get_locale, _get_model,_show_vk, _hide_vk,_set_screen_orient,_get_unique_id, _play_video, _is_video_playing, _pause_video, _stop_video);
for (int i=0; i<cmdlen; i++) {
jstring string = (jstring) env->GetObjectArrayElement(p_cmdline, i);
const char *rawString = env->GetStringUTFChars(string, 0);
if (!rawString) {
__android_log_print(ANDROID_LOG_INFO,"godot","cmdline arg %i is null\n",i);
} else {
// __android_log_print(ANDROID_LOG_INFO,"godot","cmdline arg %i is: %s\n",i,rawString);
if (strcmp(rawString,"-main_pack")==0)
use_apk_expansion=true;
}
cmdline[i]=rawString;
}
}
}
os_android = new OS_Android(_gfx_init_func,env,_open_uri,_get_data_dir,_get_locale, _get_model,_show_vk, _hide_vk,_set_screen_orient,_get_unique_id, _play_video, _is_video_playing, _pause_video, _stop_video,use_apk_expansion);
os_android->set_need_reload_hooks(p_need_reload_hook);
char wd[500];
@ -759,16 +785,6 @@ JNIEXPORT void JNICALL Java_com_android_godot_GodotLib_initialize(JNIEnv * env,
__android_log_print(ANDROID_LOG_INFO,"godot","**SETUP");
const char ** cmdline=NULL;
int cmdlen = env->GetArrayLength(p_cmdline);
cmdline = (const char**)malloc((env->GetArrayLength(p_cmdline)+1)*sizeof(const char*));
cmdline[cmdlen]=NULL;
for (int i=0; i<cmdlen; i++) {
jstring string = (jstring) env->GetObjectArrayElement(p_cmdline, i);
const char *rawString = env->GetStringUTFChars(string, 0);
cmdline[i]=rawString;
}
#if 0
char *args[]={"-test","render",NULL};
@ -833,6 +849,7 @@ JNIEXPORT void JNICALL Java_com_android_godot_GodotLib_quit(JNIEnv * env, jobjec
input_mutex->lock();
quit_request=true;
print_line("BACK PRESSED");
input_mutex->unlock();
}
@ -1289,7 +1306,10 @@ JNIEXPORT void JNICALL Java_com_android_godot_GodotLib_key(JNIEnv * env, jobject
} else if (val == 61453) {
ievent.key.scancode = KEY_ENTER;
ievent.key.unicode = KEY_ENTER;
}
} else if (p_scancode==4) {
quit_request=true;
}
input_mutex->lock();
key_events.push_back(ievent);
@ -1390,7 +1410,7 @@ static Variant::Type get_jni_type(const String& p_type) {
static const char* get_jni_sig(const String& p_type) {
print_line("getting sig for " + p_type);
static struct {
const char *name;
const char *sig;