Fixed another bug in Data Downloader
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
|
||||
package com.sourceforge.sc2;
|
||||
package de.schwardtnet.alienblaster;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
|
||||
package com.sourceforge.sc2;
|
||||
package de.schwardtnet.alienblaster;
|
||||
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
|
||||
package com.sourceforge.sc2;
|
||||
package de.schwardtnet.alienblaster;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
@@ -243,6 +243,8 @@ class DataDownloader extends Thread
|
||||
System.out.println("Failed to connect to " + url);
|
||||
downloadUrlIndex++;
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( response == null )
|
||||
@@ -267,6 +269,10 @@ class DataDownloader extends Thread
|
||||
downloadUrls[downloadUrlIndex].indexOf(":", 1) ));
|
||||
OutputStream out = null;
|
||||
try {
|
||||
try {
|
||||
(new File( path.substring(0, path.lastIndexOf("/") ))).mkdirs();
|
||||
} catch( SecurityException e ) { };
|
||||
|
||||
out = new FileOutputStream( path );
|
||||
} catch( FileNotFoundException e ) {
|
||||
} catch( SecurityException e ) { };
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
fixed with a hammer and rasp to work with libSDL port */
|
||||
|
||||
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
|
||||
package com.sourceforge.sc2;
|
||||
package de.schwardtnet.alienblaster;
|
||||
|
||||
import java.io.Writer;
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount anywhere
|
||||
package com.sourceforge.sc2;
|
||||
package de.schwardtnet.alienblaster;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
|
||||
class Globals {
|
||||
public static String ApplicationName = "Ur-QuanMasters";
|
||||
public static String ApplicationName = "AlienBlaster";
|
||||
|
||||
// Should be zip file
|
||||
public static String DataDownloadUrl = "Game data is 14 Mb|https://sites.google.com/site/xpelyax/Home/sc2-data.zip?attredirects=0%26d=1|http://sitesproxy.goapk.com/site/xpelyax/Home/sc2-data.zip^3DO remixed music (19 Mb) - enable it in Setup->Sound Options->3DO Remixes|:addons/3domusic/3domusic.zip:https://sites.google.com/site/xpelyax/Home/3domusic.zip?attredirects=0%26d=1|:addons/3domusic/3domusic.zip:http://sitesproxy.goapk.com/site/xpelyax/Home/3domusic.zip^UQM music remix pack 1 (50 Mb) - enable it in Setup->Sound Options->UQM Remixes|:addons/remix/uqm-remix-pack1.zip:http://sourceforge.net/projects/sc2/files/UQM%20Remix%20Packs/UQM%20Remix%20Pack%201/uqm-remix-pack1.zip/download^UQM music remix pack 2 (60 Mb)|:addons/remix/uqm-remix-pack2.zip:http://sourceforge.net/projects/sc2/files/UQM%20Remix%20Packs/UQM%20Remix%20Pack%202/uqm-remix-pack2.zip/download^UQM music remix pack 3 (40 Mb)|:addons/remix/uqm-remix-pack3.zip:http://sourceforge.net/projects/sc2/files/UQM%20Remix%20Packs/UQM%20Remix%20Pack%203/uqm-remix-pack3.zip/download";
|
||||
public static String DataDownloadUrl = "Data size is 2 Mb|http://sites.google.com/site/xpelyax/Home/alienblaster110_data.zip?attredirects=0%26d=1|http://sitesproxy.goapk.com/site/xpelyax/Home/alienblaster110_data.zip";
|
||||
|
||||
// Set this value to true if you're planning to render 3D using OpenGL - it eats some GFX resources, so disabled for 2D
|
||||
public static boolean NeedDepthBuffer = false;
|
||||
@@ -17,7 +17,7 @@ class Globals {
|
||||
public static boolean HorizontalOrientation = true;
|
||||
|
||||
// Readme text to be shown on download page
|
||||
public static String ReadmeText = "^You may press \"Home\" now - the data will be downloaded in background".replace("^","\n");
|
||||
public static String ReadmeText = "^You can press \"Home\" now - the data will be downloaded in background^In game press \"Menu\" for secondary fire, \"Volume Up/Down\" to cycle weapons".replace("^","\n");
|
||||
|
||||
public static boolean AppUsesMouse = false;
|
||||
|
||||
@@ -27,9 +27,9 @@ class Globals {
|
||||
|
||||
public static boolean AppUsesMultitouch = false;
|
||||
|
||||
public static int AppTouchscreenKeyboardKeysAmount = 2;
|
||||
public static int AppTouchscreenKeyboardKeysAmount = 4;
|
||||
|
||||
public static int AppTouchscreenKeyboardKeysAmountAutoFire = 2;
|
||||
public static int AppTouchscreenKeyboardKeysAmountAutoFire = 1;
|
||||
|
||||
// Phone-specific config
|
||||
// It will download app data to /sdcard/alienblaster if set to true,
|
||||
@@ -48,5 +48,5 @@ class Globals {
|
||||
}
|
||||
|
||||
class LoadLibrary {
|
||||
public LoadLibrary() { System.loadLibrary("sdl"); System.loadLibrary("sdl_image"); };
|
||||
public LoadLibrary() { System.loadLibrary("sdl"); System.loadLibrary("sdl_mixer"); System.loadLibrary("sdl_image"); };
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
|
||||
package com.sourceforge.sc2;
|
||||
package de.schwardtnet.alienblaster;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
|
||||
package com.sourceforge.sc2;
|
||||
package de.schwardtnet.alienblaster;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
@@ -213,6 +213,7 @@ class Settings
|
||||
{
|
||||
public void onClick(DialogInterface dialog, int item, boolean isChecked)
|
||||
{
|
||||
System.out.println("Globals.OptionalDataDownload: set item " + String.valueOf(item + 1) + " to " + String.valueOf(isChecked));
|
||||
Globals.OptionalDataDownload[item+1] = isChecked;
|
||||
}
|
||||
});
|
||||
@@ -220,8 +221,13 @@ class Settings
|
||||
{
|
||||
public void onClick(DialogInterface dialog, int item)
|
||||
{
|
||||
dialog.dismiss();
|
||||
showKeyboardConfig(p);
|
||||
|
||||
System.out.println("Globals.OptionalDataDownload len" + String.valueOf(Globals.OptionalDataDownload.length));
|
||||
for(int i = 0; i < Globals.OptionalDataDownload.length; i++)
|
||||
System.out.println("Globals.OptionalDataDownload[" + String.valueOf(i) + "] = '" + String.valueOf(Globals.OptionalDataDownload[i]) + "'");
|
||||
|
||||
dialog.dismiss();
|
||||
showKeyboardConfig(p);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
|
||||
package com.sourceforge.sc2;
|
||||
package de.schwardtnet.alienblaster;
|
||||
|
||||
import javax.microedition.khronos.opengles.GL10;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user