Fix date in Dat files, Added IKO and HA3 sets, updated the manifest and build files, Added SD card support for Android, Fix the Android app crash when resuming from background, Improved Android downloader, added finger sliding popup menu for Android devices without sidebar menu, fixed several crashes during game, added the mutating card ability, fixed the adventure card ability, added new borderline primitives.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="0221" android:installLocation="preferExternal" android:versionName="@string/app_version" package="net.wagic.app">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="0223" android:installLocation="preferExternal" android:versionName="@string/app_version" package="net.wagic.app">
|
||||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
android:id="@+id/mainLayout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:keepScreenOn="true"
|
||||
>
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">Wagic</string>
|
||||
<string name="app_version">0.22.2</string>
|
||||
<string name="info_text">Wagic v0.22.2\\nAll Rights Reserved.</string>
|
||||
<string name="app_version">0.22.3</string>
|
||||
<string name="info_text">All Rights Reserved.</string>
|
||||
</resources>
|
||||
|
||||
@@ -1382,7 +1382,13 @@ public class ImgDownloader {
|
||||
cardurl = "https://img.scryfall.com/cards/large/front/1/d/1dee8c94-cdc8-42b2-a393-0c0c8e439125.jpg?1586453065";
|
||||
else if(id.equals("484902t") || id.equals("484904t"))
|
||||
cardurl = "https://img.scryfall.com/cards/large/front/7/2/720f3e68-84c0-462e-a0d1-90236ccc494a.jpg?1562539782";
|
||||
|
||||
else if(id.equals("294690t"))
|
||||
cardurl = "https://img.scryfall.com/cards/large/front/0/8/082c3bad-3fea-4c3f-8263-4b16139bb32a.jpg?1562701890";
|
||||
else if(id.equals("47963911t"))
|
||||
cardurl = "https://img.scryfall.com/cards/large/front/f/9/f918b740-1984-4090-8886-9e290a698b95.jpg?1586451994";
|
||||
else if(id.equals("479634t"))
|
||||
cardurl = "https://img.scryfall.com/cards/large/front/a/9/a9cc7c63-5d13-4fd6-af9d-4a26c2bab8e6.jpg?1588521003";
|
||||
|
||||
return cardurl;
|
||||
}
|
||||
|
||||
@@ -1824,7 +1830,7 @@ public class ImgDownloader {
|
||||
id.equals("470620") || id.equals("470754") || id.equals("470750") || id.equals("470739") || id.equals("470708") || id.equals("470581") ||
|
||||
id.equals("470578") || id.equals("470571") || id.equals("470552") || id.equals("394490") || id.equals("114921") || id.equals("49775") ||
|
||||
id.equals("473123") || id.equals("473160") || id.equals("16743") || id.equals("16741") || id.equals("294493") || id.equals("293253") ||
|
||||
id.equals("293198") || id.equals("479634") || id.equals("479702"))
|
||||
id.equals("293198") || id.equals("479634") || id.equals("479702"))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -2071,11 +2077,6 @@ public class ImgDownloader {
|
||||
ThumbY = 64;
|
||||
}
|
||||
|
||||
if(borderless){
|
||||
Border = (int)Math.round(ImgX*0.04);
|
||||
BorderThumb = (int)Math.round(ThumbX*0.04);
|
||||
}
|
||||
|
||||
File baseFolder = new File(basePath);
|
||||
File[] listOfFiles = baseFolder.listFiles();
|
||||
Map<String, String> mappa = new HashMap<String, String>();
|
||||
@@ -2132,6 +2133,29 @@ public class ImgDownloader {
|
||||
int lastIndex = lines.indexOf(findStr);
|
||||
String totals = lines.substring(lastIndex, lines.indexOf("\n", lastIndex));
|
||||
totalcards = Integer.parseInt(totals.split("=")[1]);
|
||||
|
||||
if(borderless){
|
||||
findStr = "year=";
|
||||
lastIndex = lines.indexOf(findStr);
|
||||
String date = lines.substring(lastIndex, lines.indexOf("\n", lastIndex));
|
||||
int year = Integer.parseInt(date.split("=")[1].split("-")[0]);
|
||||
int month = 1;
|
||||
int day = 1;
|
||||
if(date.split("=")[1].split("-").length > 1) {
|
||||
month = Integer.parseInt(date.split("=")[1].split("-")[1]);
|
||||
if(date.split("=")[1].split("-").length > 2) {
|
||||
day = Integer.parseInt(date.split("=")[1].split("-")[2]);
|
||||
}
|
||||
}
|
||||
if(year > 2014 || (year == 2014 && month > 6) || (year == 2014 && month == 6 && day > 15)){
|
||||
Border = (int)Math.round(ImgX*0.02);
|
||||
BorderThumb = (int)Math.round(ThumbX*0.02);
|
||||
} else {
|
||||
Border = (int)Math.round(ImgX*0.04);
|
||||
BorderThumb = (int)Math.round(ThumbX*0.04);
|
||||
}
|
||||
}
|
||||
|
||||
while (lines.contains("[card]")) {
|
||||
findStr = "[card]";
|
||||
lastIndex = lines.indexOf(findStr);
|
||||
@@ -2388,7 +2412,7 @@ public class ImgDownloader {
|
||||
|| scryset.equals("PMPS08") || scryset.equals("PMPS09") || scryset.equals("PMPS10") || scryset.equals("PMPS11") || scryset.equals("GN2")
|
||||
|| scryset.equals("PAL00") || scryset.equals("PAL01") || scryset.equals("PAL02") || scryset.equals("PAL03") || scryset.equals("PAL04")
|
||||
|| scryset.equals("PAL05") || scryset.equals("PAL06") || scryset.equals("PAL99") || scryset.equals("PARL") || scryset.equals("HA1")
|
||||
|| scryset.equals("SLD") || scryset.equals("MB1") || scryset.equals("HA2")){
|
||||
|| scryset.equals("SLD") || scryset.equals("MB1") || scryset.equals("HA2") || scryset.equals("HA3")){
|
||||
try {
|
||||
doc = Jsoup.connect(imageurl + scryset.toLowerCase()).get();
|
||||
Elements outlinks = doc.select("body a");
|
||||
@@ -2577,7 +2601,7 @@ public class ImgDownloader {
|
||||
&& !scryset.equals("PMPS08") && !scryset.equals("PMPS09") && !scryset.equals("PMPS10") && !scryset.equals("PMPS11") && !scryset.equals("GN2")
|
||||
&& !scryset.equals("PAL00") && !scryset.equals("PAL01") && !scryset.equals("PAL02") && !scryset.equals("PAL03") && !scryset.equals("PAL04")
|
||||
&& !scryset.equals("PAL05") && !scryset.equals("PAL06") && !scryset.equals("PAL99") && !scryset.equals("PARL") && !scryset.equals("HA1")
|
||||
&& !scryset.equals("SLD") && !scryset.equals("MB1") && !scryset.equals("HA2")){
|
||||
&& !scryset.equals("SLD") && !scryset.equals("MB1") && !scryset.equals("HA2") && !scryset.equals("HA3")){
|
||||
try {
|
||||
doc = Jsoup.connect(imageurl + scryset.toLowerCase()).get();
|
||||
Elements outlinks = doc.select("body a");
|
||||
@@ -2690,7 +2714,7 @@ public class ImgDownloader {
|
||||
&& !scryset.equals("PMPS08") && !scryset.equals("PMPS09") && !scryset.equals("PMPS10") && !scryset.equals("PMPS11") && !scryset.equals("GN2")
|
||||
&& !scryset.equals("PAL00") && !scryset.equals("PAL01") && !scryset.equals("PAL02") && !scryset.equals("PAL03") && !scryset.equals("PAL04")
|
||||
&& !scryset.equals("PAL05") && !scryset.equals("PAL06") && !scryset.equals("PAL99") && !scryset.equals("PARL") && !scryset.equals("HA1")
|
||||
&& !scryset.equals("SLD") && !scryset.equals("MB1") && !scryset.equals("HA2")){
|
||||
&& !scryset.equals("SLD") && !scryset.equals("MB1") && !scryset.equals("HA2") && !scryset.equals("HA3")){
|
||||
try {
|
||||
doc = Jsoup.connect(imageurl + scryset.toLowerCase()).get();
|
||||
} catch (Exception e) {
|
||||
@@ -2855,7 +2879,7 @@ public class ImgDownloader {
|
||||
|| scryset.equals("PMPS09") || scryset.equals("PMPS10") || scryset.equals("PMPS11") || scryset.equals("GN2") || scryset.equals("PAL00")
|
||||
|| scryset.equals("PAL01") || scryset.equals("PAL02") || scryset.equals("PAL03") || scryset.equals("PAL04") || scryset.equals("PAL05")
|
||||
|| scryset.equals("PAL06") || scryset.equals("PAL99") || scryset.equals("PARL") || scryset.equals("HA1") || scryset.equals("SLD")
|
||||
|| scryset.equals("MB1") || scryset.equals("HA2")){
|
||||
|| scryset.equals("MB1") || scryset.equals("HA2") || scryset.equals("HA3")){
|
||||
Elements metadata = doc.select("head meta");
|
||||
if(metadata != null) {
|
||||
for (int j = 0; j < metadata.size(); j++){
|
||||
|
||||
@@ -23,7 +23,7 @@ public class StorageOptions
|
||||
public static int count = 0;
|
||||
public static String defaultMountPoint;
|
||||
|
||||
public static void determineStorageOptions()
|
||||
public static void determineStorageOptions(android.content.Context mContext)
|
||||
{
|
||||
initializeMountPoints();
|
||||
if (findForcemount()){
|
||||
@@ -36,6 +36,16 @@ public class StorageOptions
|
||||
}
|
||||
compareMountsWithVold();
|
||||
testAndCleanMountsList();
|
||||
File[] externalStorageVolumes = mContext.getExternalFilesDirs("");
|
||||
for(int i = 0; i < externalStorageVolumes.length; i++){
|
||||
mMounts.add(externalStorageVolumes[i].getAbsolutePath());
|
||||
}
|
||||
for(int i = 0; i < mMounts.size(); i++){
|
||||
for(int j = 0; j < mMounts.size(); j++){
|
||||
if(i!=j && mMounts.get(i).startsWith(mMounts.get(j)))
|
||||
mMounts.remove(i);
|
||||
}
|
||||
}
|
||||
setProperties();
|
||||
}
|
||||
|
||||
@@ -264,22 +274,22 @@ public class StorageOptions
|
||||
for (String path : mMounts)
|
||||
{//with forcemount menu
|
||||
if ("/mnt/sdcard".equalsIgnoreCase(path) || "/storage/sdcard0".equalsIgnoreCase(path))
|
||||
mLabels.add("Internal SD " + "[" + path + "]");
|
||||
mLabels.add("Internal SD " + "[" + path + "/]");
|
||||
else if (path.contains("emulated"))
|
||||
mLabels.add("Emulated SD " + " [" + path + "]");
|
||||
mLabels.add("Emulated SD " + " [" + path + "/]");
|
||||
else
|
||||
mLabels.add("External SD " + " [" + path + "]");
|
||||
mLabels.add("External SD " + " [" + path + "/]");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (String path : mMounts)
|
||||
{
|
||||
// TODO: /mnt/sdcard is assumed to always mean internal storage. Use this comparison until there is a better way to do this
|
||||
if ("/mnt/sdcard".equalsIgnoreCase(path))
|
||||
mLabels.add("Built-in Storage");
|
||||
// TODO: /mnt/sdcard and emulated are assumed to always mean internal storage. Use this comparison until there is a better way to do this
|
||||
if ("/mnt/sdcard".equalsIgnoreCase(path) || path.contains("emulated"))
|
||||
mLabels.add("Built-in Storage " + "[" + path + "/]");
|
||||
else
|
||||
mLabels.add("External SD Card " + i++);
|
||||
mLabels.add("External SD Card " + "[" + path + "/]");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user