diff --git a/doom/build.gradle b/doom/build.gradle index 2bad1482..78218936 100644 --- a/doom/build.gradle +++ b/doom/build.gradle @@ -22,9 +22,9 @@ android { signingConfigs { config { keyAlias 'key0' - keyPassword 'Ca$hm0n3y000' + keyPassword '' storeFile file('C:/Users/matth/Dropbox/Keystore/mkrupczak3.jks') - storePassword 'Ca$hm0n3y000' + storePassword '' } } @@ -34,8 +34,8 @@ android { defaultConfig { minSdkVersion 21 targetSdkVersion 26 - versionCode 17 - versionName "0.4.0" + versionCode 18 + versionName "0.4.1" } /* externalNativeBuild { diff --git a/doom/src/main/assets/brightmaps.pk3 b/doom/src/main/assets/brightmaps.pk3 new file mode 100644 index 00000000..338d4de4 Binary files /dev/null and b/doom/src/main/assets/brightmaps.pk3 differ diff --git a/doom/src/main/assets/lights.pk3 b/doom/src/main/assets/lights.pk3 new file mode 100644 index 00000000..68f2e679 Binary files /dev/null and b/doom/src/main/assets/lights.pk3 differ diff --git a/doom/src/main/java/net/nullsum/freedoom/LaunchFragmentGZdoom.java b/doom/src/main/java/net/nullsum/freedoom/LaunchFragmentGZdoom.java index fa8a300a..df116395 100644 --- a/doom/src/main/java/net/nullsum/freedoom/LaunchFragmentGZdoom.java +++ b/doom/src/main/java/net/nullsum/freedoom/LaunchFragmentGZdoom.java @@ -75,7 +75,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Utils.copyFreedoomFilesToSD(getActivity()); -// Nasty hack to refresh view if this is the first launch and freedoom files were copied +// Nasty hack to refresh view if this is the first launch and Freedoom files were copied File hasRunTester = new File ( fullBaseDir + "/" + "firstrun"); if (!hasRunTester.exists()) { Log.d(LOG, "firstrun file not found, proceeding with first launch hack"); diff --git a/doom/src/main/java/net/nullsum/freedoom/Utils.java b/doom/src/main/java/net/nullsum/freedoom/Utils.java index e7aae24f..1698954a 100644 --- a/doom/src/main/java/net/nullsum/freedoom/Utils.java +++ b/doom/src/main/java/net/nullsum/freedoom/Utils.java @@ -82,16 +82,24 @@ static void copyFreedoomFilesToSD(Activity responsibleActivity) { Log.d(LOG, "zdoom.ini file is already present"); } -// // Nasty hack to refresh view if this is the first launch -// File hasRunTester = new File ( fullBaseDir + "/" + "firstrun"); -// if (!hasRunTester.exists()) { -// Log.d(LOG, "firstrun file not found, proceeding with first launch hack"); -// Utils.copyAsset(responsibleActivity, "firstrun", fullBaseDir); -// // Info of hack -// // https://stackoverflow.com/questions/15262747/refresh-or-force-redraw-the-fragment -// -// -// } + // copy over gzdoom mod/package files + String modFolderName = "mods"; + String fullModDir = fullBaseDir + "/" + modFolderName; + + tester = new File( fullModDir + "/" + "brightmaps.pk3"); + if (!tester.exists()) { + Utils.copyAsset(responsibleActivity, "brightmaps.pk3", fullModDir); + } + + tester = new File( fullModDir + "/" + "gzdoom.pk3"); + if (!tester.exists()) { + Utils.copyAsset(responsibleActivity, "gzdoom.pk3", fullModDir); + } + + tester = new File( fullModDir + "/" + "lights.pk3"); + if (!tester.exists()) { + Utils.copyAsset(responsibleActivity, "lights.pk3", fullModDir); + } } private static void copyFile(InputStream in, OutputStream out) throws IOException {